www.gusucode.com > Simulink Onramp 工具箱matlab源码程序 > Simulink Onramp/R2018b/web/academyinteractions/AcademyModules.js

    //>>built
/*
 Copyright 2013-2018 The MathWorks, Inc.
 Copyright 2013-2018 The MathWorks, Inc.
 Copyright 2015-2018 The MathWorks, Inc.
 @class _EditorBase
 Copyright 2015-2018 The MathWorks, Inc.
 @class _RendererBase
 Copyright 2017 MathWorks, Inc.
 Copyright 2016-2018 The MathWorks, Inc.
 Copyright 2013-2014 The MathWorks, Inc.
 @class ClientPeerView
 Copyright 2013-2014 The MathWorks, Inc.
 @class ClientArrayView
 Copyright 2013-2018 The MathWorks, Inc.
 Copyright 2013-2016 The MathWorks, Inc.
 Copyright 2014 The MathWorks, Inc.
 @class ClientArrayView
 Copyright 2015 The MathWorks, Inc.
 @class StringArrayView
 Copyright 2016-2018 The MathWorks, Inc.
 Copyright 2015-2018 The MathWorks, Inc.
 Copyright 2018 The MathWorks, Inc.
 Copyright 2018 The MathWorks, Inc.
 Copyright 2018 The MathWorks, Inc.
 Copyright 2016-2018 The MathWorks, Inc.
 Copyright 2015 The MathWorks, Inc.
 @class CellArrayView
 Copyright 2015 The MathWorks, Inc.
 @class VectorStructureArrayView
 Copyright 2016-2018 The MathWorks, Inc.
 Copyright 2016-2018 The MathWorks, Inc.
 Copyright 2014-2016 MathWorks, Inc.
 Copyright 2014-2016 MathWorks, Inc.
 Copyright 2014-2016 MathWorks, Inc.
 Copyright 2014-2016 MathWorks, Inc.
 Copyright 2014-2016 MathWorks, Inc.
 Copyright 2018 The MathWorks, Inc.
 Copyright 2015 The MathWorks, Inc.
 Copyright 2016 MathWorks, Inc.
 Copyright 2017 The MathWorks, Inc.
 Copyright 2017 The MathWorks, Inc.
*/
require({cache:{"dojo/require":function(){define(["./_base/loader"],function(g){return{dynamic:0,normalize:function(f){return f},load:g.require}})},"dojo/_base/loader":function(){define("./kernel ../has require module ../json ./lang ./array".split(" "),function(g,f,e,d,b,a,c){var h=function(a){return a.replace(/\./g,"/")},k=/\/\/>>built/,l=[],m=[],p=function(a,h,k){l.push(k);c.forEach(a.split(","),function(a){a=C(a,h.module);m.push(a);M(a)});n()},n=function(){var a,h;for(h in I)if(a=I[h],void 0===
a.noReqPluginCheck&&(a.noReqPluginCheck=/loadInit\!/.test(h)||/require\!/.test(h)?1:0),!a.executed&&!a.noReqPluginCheck&&a.injected==x)return;K(function(){var a=l;l=[];c.forEach(a,function(a){a(1)})})},q=function(a,c,h){var k=/\(|\)/g,b=1;for(k.lastIndex=c;(c=k.exec(a))&&!(b=")"==c[0]?b-1:b+1,0==b););if(0!=b)throw"unmatched paren around character "+k.lastIndex+" in: "+a;return[g.trim(a.substring(h,k.lastIndex))+";\n",k.lastIndex]},r=/(\/\*([\s\S]*?)\*\/|\/\/(.*)$)/mg,s=/(^|\s)dojo\.(loadInit|require|provide|requireLocalization|requireIf|requireAfterIf|platformRequire)\s*\(/mg,
t=/(^|\s)(require|define)\s*\(/m,u=function(a,c){var h,k,b,d=[],e=[];h=[];for(c=c||a.replace(r,function(a){s.lastIndex=t.lastIndex=0;return s.test(a)||t.test(a)?"":a});h=s.exec(c);)k=s.lastIndex,b=k-h[0].length,k=q(c,k,b),"loadInit"==h[2]?d.push(k[0]):e.push(k[0]),s.lastIndex=k[1];h=d.concat(e);return h.length||!t.test(c)?[a.replace(/(^|\s)dojo\.loadInit\s*\(/g,"\n0 \x26\x26 dojo.loadInit("),h.join(""),h]:0},v=e.initSyncLoader(p,n,function(a,c){var h,d,e=[],l=[];if(k.test(c)||!(h=u(c)))return 0;d=
a.mid+"-*loadInit";for(var f in C("dojo",a).result.scopeMap)e.push(f),l.push('"'+f+'"');return"// xdomain rewrite of "+a.mid+"\ndefine('"+d+"',{\n\tnames:"+b.stringify(e)+",\n\tdef:function("+e.join(",")+"){"+h[1]+"}});\n\ndefine("+b.stringify(e.concat(["dojo/loadInit!"+d]))+", function("+e.join(",")+"){\n"+h[0]+"});"}),w=v.sync,x=v.requested,y=v.arrived,B=v.nonmodule,D=v.executing,E=v.executed,F=v.syncExecStack,I=v.modules,L=v.execQ,C=v.getModule,M=v.injectModule,G=v.setArrived,N=v.signal,P=v.finishExec,
R=v.execModule,S=v.getLegacyMode,K=v.guardCheckComplete,p=v.dojoRequirePlugin;g.provide=function(c){var k=F[0],b=a.mixin(C(h(c),e.module),{executed:D,result:a.getObject(c,!0)});G(b);k&&(k.provides||(k.provides=[])).push(function(){b.result=a.getObject(c);delete b.provides;b.executed!==E&&P(b)});return b.result};f.add("config-publishRequireResult",1,0,0);g.require=function(c,k){var b=function(a,c){var k=C(h(a),e.module);if(F.length&&F[0].finish)F[0].finish.push(a);else{if(k.executed)return k.result;
c&&(k.result=B);var b=S();M(k);b=S();k.executed!==E&&k.injected===y&&v.guardCheckComplete(function(){R(k)});if(k.executed)return k.result;b==w?k.cjs?L.unshift(k):F.length&&(F[0].finish=[a]):L.push(k)}}(c,k);f("config-publishRequireResult")&&(!a.exists(c)&&void 0!==b)&&a.setObject(c,b);return b};g.loadInit=function(a){a()};g.registerModulePath=function(a,c){var h={};h[a.replace(/\./g,"/")]=c;e({paths:h})};g.platformRequire=function(c){c=(c.common||[]).concat(c[g._name]||c["default"]||[]);for(var h;c.length;)a.isArray(h=
c.shift())?g.require.apply(g,h):g.require(h)};g.requireIf=g.requireAfterIf=function(a,c,h){a&&g.require(c,h)};g.requireLocalization=function(a,c,h){e(["../i18n"],function(k){k.getLocalization(a,c,h)})};return{extractLegacyApiApplications:u,require:p,loadInit:function(a,c,k){c([a],function(a){c(a.names,function(){for(var b="",e=[],l=0;l<arguments.length;l++)b+="var "+a.names[l]+"\x3d arguments["+l+"]; ",e.push(arguments[l]);eval(b);var f=c.module,m=[],n,b={provide:function(a){a=h(a);a=C(a,f);a!==f&&
G(a)},require:function(a,c){a=h(a);c&&(C(a,f).result=B);m.push(a)},requireLocalization:function(a,c,k){n||(n=["dojo/i18n"]);k=(k||g.locale).toLowerCase();a=h(a)+"/nls/"+(/root/i.test(k)?"":k+"/")+h(c);C(a,f).isXd&&n.push("dojo/i18n!"+a)},loadInit:function(a){a()}},l={},q;try{for(q in b)l[q]=g[q],g[q]=b[q];a.def.apply(null,e)}catch(r){N("error",[{src:d.id,id:"failedDojoLoadInit"},r])}finally{for(q in b)g[q]=l[q]}n&&(m=m.concat(n));m.length?p(m.join(","),c,k):k()})})}}})},"dojo/cldr/nls/en/number":function(){define({group:",",
percentSign:"%",exponential:"E",scientificFormat:"#E0",percentFormat:"#,##0%",list:";",infinity:"\u221e",minusSign:"-",decimal:".",superscriptingExponent:"\u00d7",nan:"NaN",perMille:"\u2030",decimalFormat:"#,##0.###",currencyFormat:"\u00a4#,##0.00;(\u00a4#,##0.00)",plusSign:"+","decimalFormat-long":"000 trillion","decimalFormat-short":"000T"})},"dojo/cldr/nls/en/currency":function(){define({HKD_displayName:"Hong Kong Dollar",CHF_displayName:"Swiss Franc",JPY_symbol:"\u00a5",CAD_displayName:"Canadian Dollar",
CNY_displayName:"Chinese Yuan",USD_symbol:"$",AUD_displayName:"Australian Dollar",JPY_displayName:"Japanese Yen",USD_displayName:"US Dollar",GBP_displayName:"British Pound Sterling",EUR_displayName:"Euro"})},"dojo/cldr/nls/en/buddhist":function(){define({"field-second-relative+0":"now","field-weekday":"Day of the Week","field-wed-relative+0":"this Wednesday","field-wed-relative+1":"next Wednesday","dateFormatItem-GyMMMEd":"E, MMM d, y G","dateFormatItem-MMMEd":"E, MMM d","field-tue-relative+-1":"last Tuesday",
"days-format-short":"Su Mo Tu We Th Fr Sa".split(" "),"dateFormat-long":"MMMM d, y G","field-fri-relative+-1":"last Friday","field-wed-relative+-1":"last Wednesday","months-format-wide":"January February March April May June July August September October November December".split(" "),"dateFormatItem-yyyyQQQ":"QQQ y G","dateTimeFormat-medium":"{1}, {0}","dateFormat-full":"EEEE, MMMM d, y G","dateFormatItem-yyyyMEd":"E, M/d/y GGGGG","field-thu-relative+-1":"last Thursday","dateFormatItem-Md":"M/d",
"field-era":"Era","timeFormat-short":"h:mm a","quarters-format-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"timeFormat-long":"h:mm:ss a z","field-year":"Year","dateTimeFormats-appendItem-Era":"{0} {1}","field-hour":"Hour","months-format-abbr":"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),"field-sat-relative+0":"this Saturday","field-sat-relative+1":"next Saturday","timeFormat-full":"h:mm:ss a zzzz","field-day-relative+0":"today","field-thu-relative+0":"this Thursday",
"field-day-relative+1":"tomorrow","field-thu-relative+1":"next Thursday","dateFormatItem-GyMMMd":"MMM d, y G","dateFormatItem-Gy":"y G","dateFormatItem-yyyyMMMEd":"E, MMM d, y G","dateFormatItem-yyyyMMM":"MMM y G","dateFormatItem-yyyyMMMd":"MMM d, y G","timeFormat-medium":"h:mm:ss a","field-sun-relative+0":"this Sunday","field-sun-relative+1":"next Sunday",eraAbbr:["BE"],"field-minute":"Minute","field-dayperiod":"AM/PM","field-day-relative+-1":"yesterday","dateTimeFormat-long":"{1} 'at' {0}","dateFormatItem-MEd":"E, M/d",
"dateTimeFormat-full":"{1} 'at' {0}","field-fri-relative+0":"this Friday","field-fri-relative+1":"next Friday","field-day":"Day","days-format-wide":"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),"field-zone":"Time Zone","dateFormatItem-y":"y G","months-standAlone-narrow":"JFMAMJJASOND".split(""),"field-year-relative+-1":"last year","field-month-relative+-1":"last month","dateTimeFormats-appendItem-Year":"{0} {1}","dateFormatItem-yyyyMd":"M/d/y GGGGG","field-month":"Month","field-tue-relative+0":"this Tuesday",
"field-tue-relative+1":"next Tuesday","field-mon-relative+0":"this Monday","field-mon-relative+1":"next Monday","dateFormat-short":"M/d/y GGGGG","field-second":"Second","field-sat-relative+-1":"last Saturday","field-sun-relative+-1":"last Sunday","field-month-relative+0":"this month","field-month-relative+1":"next month","dateFormatItem-Ed":"d E","field-week":"Week","dateFormat-medium":"MMM d, y G","field-year-relative+0":"this year","field-week-relative+-1":"last week","dateFormatItem-yyyyM":"M/y GGGGG",
"field-year-relative+1":"next year","dateFormatItem-yyyyQQQQ":"QQQQ y G","dateTimeFormat-short":"{1}, {0}","dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"last Monday","dateFormatItem-yyyy":"y G","field-week-relative+0":"this week","field-week-relative+1":"next week"})},"dojo/cldr/nls/en/gregorian":function(){define({"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"Su Mo Tu We Th Fr Sa".split(" "),"months-format-narrow":"JFMAMJJASOND".split(""),"field-second-relative+0":"now","quarters-standAlone-narrow":["1",
"2","3","4"],"field-weekday":"Day of the Week","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E, M/d/y","field-wed-relative+0":"this Wednesday","field-wed-relative+1":"next Wednesday","dateFormatItem-GyMMMEd":"E, MMM d, y G","dateFormatItem-MMMEd":"E, MMM d",eraNarrow:["B","A"],"field-tue-relative+-1":"last Tuesday","days-format-short":"Su Mo Tu We Th Fr Sa".split(" "),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"MMMM d, y","field-fri-relative+-1":"last Friday","field-wed-relative+-1":"last Wednesday",
"months-format-wide":"January February March April May June July August September October November December".split(" "),"dateTimeFormat-medium":"{1}, {0}","dayPeriods-format-wide-pm":"PM","dateFormat-full":"EEEE, MMMM d, y","field-thu-relative+-1":"last Thursday","dateFormatItem-Md":"M/d","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dayPeriods-format-wide-noon":"noon","dateFormatItem-yMd":"M/d/y","field-era":"Era","dateFormatItem-yM":"M/y","months-standAlone-wide":"January February March April May June July August September October November December".split(" "),
"timeFormat-short":"h:mm a","quarters-format-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"dateFormatItem-yQQQQ":"QQQQ y","timeFormat-long":"h:mm:ss a z","field-year":"Year","dateFormatItem-yMMM":"MMM y","dateTimeFormats-appendItem-Era":"{0} {1}","field-hour":"Hour","months-format-abbr":"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),"field-sat-relative+0":"this Saturday","field-sat-relative+1":"next Saturday","timeFormat-full":"h:mm:ss a zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})",
"field-day-relative+0":"today","field-thu-relative+0":"this Thursday","field-day-relative+1":"tomorrow","field-thu-relative+1":"next Thursday","dateFormatItem-GyMMMd":"MMM d, y G","dateFormatItem-H":"HH","months-standAlone-abbr":"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),
"timeFormat-medium":"h:mm:ss a","field-sun-relative+0":"this Sunday","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"next Sunday",eraAbbr:["BC","AD"],"field-minute":"Minute","field-dayperiod":"AM/PM","dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","field-day-relative+-1":"yesterday","dateFormatItem-h":"h a","dateTimeFormat-long":"{1} 'at' {0}","dayPeriods-format-narrow-am":"a","dateFormatItem-MMMd":"MMM d","dateFormatItem-MEd":"E, M/d","dateTimeFormat-full":"{1} 'at' {0}","field-fri-relative+0":"this Friday",
"field-fri-relative+1":"next Friday","field-day":"Day","days-format-wide":"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),"field-zone":"Time Zone","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-y":"y","months-standAlone-narrow":"JFMAMJJASOND".split(""),"field-year-relative+-1":"last year","field-month-relative+-1":"last month","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","days-format-abbr":"Sun Mon Tue Wed Thu Fri Sat".split(" "),
"dateFormatItem-yMMMd":"MMM d, y",eraNames:["Before Christ","Anno Domini"],"days-standAlone-narrow":"SMTWTFS".split(""),"dateFormatItem-MMM":"LLL","field-month":"Month","field-tue-relative+0":"this Tuesday","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","field-tue-relative+1":"next Tuesday","dayPeriods-format-wide-am":"AM","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"this Monday",
"field-mon-relative+1":"next Monday","dateFormat-short":"M/d/yy","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","dayPeriods-format-narrow-noon":"n","field-second":"Second","field-sat-relative+-1":"last Saturday","dateFormatItem-yMMMEd":"E, MMM d, y","field-sun-relative+-1":"last Sunday","field-month-relative+0":"this month","field-month-relative+1":"next month","dateFormatItem-Ed":"d E","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"Week","dateFormat-medium":"MMM d, y",
"field-year-relative+0":"this year","field-week-relative+-1":"last week","field-year-relative+1":"next year","dayPeriods-format-narrow-pm":"p","dateTimeFormat-short":"{1}, {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"last Monday","field-week-relative+0":"this week","field-week-relative+1":"next week"})},"dojo/cldr/nls/en/islamic":function(){define({"field-second-relative+0":"now","field-weekday":"Day of the Week","field-wed-relative+0":"this Wednesday",
"field-wed-relative+1":"next Wednesday","dateFormatItem-GyMMMEd":"E, MMM d, y G","dateFormatItem-MMMEd":"E, MMM d","field-tue-relative+-1":"last Tuesday","days-format-short":"Su Mo Tu We Th Fr Sa".split(" "),"dateFormat-long":"MMMM d, y G","field-fri-relative+-1":"last Friday","field-wed-relative+-1":"last Wednesday","dateFormatItem-yyyyQQQ":"QQQ y G","dateTimeFormat-medium":"{1}, {0}","dateFormat-full":"EEEE, MMMM d, y G","dateFormatItem-yyyyMEd":"E, M/d/y GGGGG","field-thu-relative+-1":"last Thursday",
"dateFormatItem-Md":"M/d","field-era":"Era","timeFormat-short":"h:mm a","quarters-format-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"timeFormat-long":"h:mm:ss a z","field-year":"Year","dateTimeFormats-appendItem-Era":"{0} {1}","field-hour":"Hour","field-sat-relative+0":"this Saturday","field-sat-relative+1":"next Saturday","timeFormat-full":"h:mm:ss a zzzz","field-day-relative+0":"today","field-thu-relative+0":"this Thursday","field-day-relative+1":"tomorrow","field-thu-relative+1":"next Thursday",
"dateFormatItem-GyMMMd":"MMM d, y G","dateFormatItem-Gy":"y G","dateFormatItem-yyyyMMMEd":"E, MMM d, y G","dateFormatItem-yyyyMMM":"MMM y G","dateFormatItem-yyyyMMMd":"MMM d, y G","timeFormat-medium":"h:mm:ss a","field-sun-relative+0":"this Sunday","field-sun-relative+1":"next Sunday",eraAbbr:["AH"],"field-minute":"Minute","field-dayperiod":"AM/PM","field-day-relative+-1":"yesterday","dateTimeFormat-long":"{1} 'at' {0}","dateFormatItem-MEd":"E, M/d","dateTimeFormat-full":"{1} 'at' {0}","field-fri-relative+0":"this Friday",
"field-fri-relative+1":"next Friday","field-day":"Day","days-format-wide":"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),"field-zone":"Time Zone","dateFormatItem-y":"y G","field-year-relative+-1":"last year","field-month-relative+-1":"last month","dateTimeFormats-appendItem-Year":"{0} {1}","dateFormatItem-yyyyMd":"M/d/y GGGGG","field-month":"Month","field-tue-relative+0":"this Tuesday","field-tue-relative+1":"next Tuesday","field-mon-relative+0":"this Monday","field-mon-relative+1":"next Monday",
"dateFormat-short":"M/d/y GGGGG","field-second":"Second","field-sat-relative+-1":"last Saturday","field-sun-relative+-1":"last Sunday","field-month-relative+0":"this month","field-month-relative+1":"next month","dateFormatItem-Ed":"d E","field-week":"Week","dateFormat-medium":"MMM d, y G","field-year-relative+0":"this year","field-week-relative+-1":"last week","dateFormatItem-yyyyM":"M/y GGGGG","field-year-relative+1":"next year","dateFormatItem-yyyyQQQQ":"QQQQ y G","dateTimeFormat-short":"{1}, {0}",
"dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"last Monday","dateFormatItem-yyyy":"y G","field-week-relative+0":"this week","field-week-relative+1":"next week"})},"dijit/_base":function(){define("./main ./a11y ./WidgetSet ./_base/focus ./_base/manager ./_base/place ./_base/popup ./_base/scroll ./_base/sniff ./_base/typematic ./_base/wai ./_base/window".split(" "),function(g){return g._base})},"dijit/WidgetSet":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/_base/kernel",
"./registry"],function(g,f,e,d){var b=f("dijit.WidgetSet",null,{constructor:function(){this._hash={};this.length=0},add:function(a){if(this._hash[a.id])throw Error("Tried to register widget with id\x3d\x3d"+a.id+" but that id is already registered");this._hash[a.id]=a;this.length++},remove:function(a){this._hash[a]&&(delete this._hash[a],this.length--)},forEach:function(a,c){c=c||e.global;var h=0,k;for(k in this._hash)a.call(c,this._hash[k],h++,this._hash);return this},filter:function(a,c){c=c||e.global;
var h=new b,k=0,d;for(d in this._hash){var f=this._hash[d];a.call(c,f,k++,this._hash)&&h.add(f)}return h},byId:function(a){return this._hash[a]},byClass:function(a){var c=new b,h,k;for(h in this._hash)k=this._hash[h],k.declaredClass==a&&c.add(k);return c},toArray:function(){var a=[],c;for(c in this._hash)a.push(this._hash[c]);return a},map:function(a,c){return g.map(this.toArray(),a,c)},every:function(a,c){c=c||e.global;var h=0,k;for(k in this._hash)if(!a.call(c,this._hash[k],h++,this._hash))return!1;
return!0},some:function(a,c){c=c||e.global;var h=0,k;for(k in this._hash)if(a.call(c,this._hash[k],h++,this._hash))return!0;return!1}});g.forEach("forEach filter byClass map every some".split(" "),function(a){d[a]=b.prototype[a]});return b})},"dijit/_base/focus":function(){define("dojo/_base/array dojo/dom dojo/_base/lang dojo/topic dojo/_base/window ../focus ../selection ../main".split(" "),function(g,f,e,d,b,a,c,h){a.focus=function(c){if(c){var d="node"in c?c.node:c,e=c.bookmark;c=c.openedForWindow;
var f=e?e.isCollapsed:!1;if(d){var n="iframe"==d.tagName.toLowerCase()?d.contentWindow:d;if(n&&n.focus)try{n.focus()}catch(q){}a._onFocusNode(d)}if(e&&b.withGlobal(c||b.global,h.isCollapsed)&&!f){c&&c.focus();try{b.withGlobal(c||b.global,h.moveToBookmark,null,[e])}catch(g){}}}};a.watch("curNode",function(a,c,b){h._curFocus=b;h._prevFocus=c;b&&d.publish("focusNode",b)});a.watch("activeStack",function(a,c,b){h._activeStack=b});a.on("widget-blur",function(a,c){d.publish("widgetBlur",a,c)});a.on("widget-focus",
function(a,c){d.publish("widgetFocus",a,c)});e.mixin(h,{_curFocus:null,_prevFocus:null,isCollapsed:function(){return h.getBookmark().isCollapsed},getBookmark:function(){return(b.global==window?c:new c.SelectionManager(b.global)).getBookmark()},moveToBookmark:function(a){return(b.global==window?c:new c.SelectionManager(b.global)).moveToBookmark(a)},getFocus:function(c,d){var e=!a.curNode||c&&f.isDescendant(a.curNode,c.domNode)?h._prevFocus:a.curNode;return{node:e,bookmark:e&&e==a.curNode&&b.withGlobal(d||
b.global,h.getBookmark),openedForWindow:d}},_activeStack:[],registerIframe:function(c){return a.registerIframe(c)},unregisterIframe:function(a){a&&a.remove()},registerWin:function(c,h){return a.registerWin(c,h)},unregisterWin:function(a){a&&a.remove()}});return h})},"dijit/selection":function(){define("dojo/_base/array dojo/dom dojo/_base/lang dojo/sniff dojo/_base/window dijit/focus".split(" "),function(g,f,e,d,b,a){var c=function(c){var h=c.document;this.getType=function(){if(h.getSelection){var a=
"text",b;try{b=c.getSelection()}catch(d){}b&&1==b.rangeCount&&(b=b.getRangeAt(0),b.startContainer==b.endContainer&&(1==b.endOffset-b.startOffset&&3!=b.startContainer.nodeType)&&(a="control"));return a}return h.selection.type.toLowerCase()};this.getSelectedText=function(){if(h.getSelection){var a=c.getSelection();return a?a.toString():""}return"control"==this.getType()?null:h.selection.createRange().text};this.getSelectedHtml=function(){if(h.getSelection){var a=c.getSelection();if(a&&a.rangeCount){var b,
d="";for(b=0;b<a.rangeCount;b++){var e=a.getRangeAt(b).cloneContents(),f=h.createElement("div");f.appendChild(e);d+=f.innerHTML}return d}return null}return"control"==this.getType()?null:h.selection.createRange().htmlText};this.getSelectedElement=function(){if("control"==this.getType()){if(h.getSelection){var a=c.getSelection();return a.anchorNode.childNodes[a.anchorOffset]}if((a=h.selection.createRange())&&a.item)return h.selection.createRange().item(0)}return null};this.getParentElement=function(){if("control"==
this.getType()){var a=this.getSelectedElement();if(a)return a.parentNode}else if(h.getSelection){if(a=h.getSelection()){for(a=a.anchorNode;a&&1!=a.nodeType;)a=a.parentNode;return a}}else return a=h.selection.createRange(),a.collapse(!0),a.parentElement();return null};this.hasAncestorElement=function(a){return null!=this.getAncestorElement.apply(this,arguments)};this.getAncestorElement=function(a){var c=this.getSelectedElement()||this.getParentElement();return this.getParentOfType(c,arguments)};this.isTag=
function(a,c){if(a&&a.tagName)for(var h=a.tagName.toLowerCase(),k=0;k<c.length;k++){var b=String(c[k]).toLowerCase();if(h==b)return b}return""};this.getParentOfType=function(a,c){for(;a;){if(this.isTag(a,c).length)return a;a=a.parentNode}return null};this.collapse=function(a){if(h.getSelection){var b=c.getSelection();b.removeAllRanges?a?b.collapseToStart():b.collapseToEnd():b.collapse(a)}else b=h.selection.createRange(),b.collapse(a),b.select()};this.remove=function(){var a=h.selection;h.getSelection?
(a=c.getSelection(),a.deleteFromDocument()):"none"!=a.type.toLowerCase()&&a.clear();return a};this.selectElementChildren=function(a,b){var e;a=f.byId(a);if(h.getSelection){var q=c.getSelection();d("opera")?(e=q.rangeCount?q.getRangeAt(0):h.createRange(),e.setStart(a,0),e.setEnd(a,3==a.nodeType?a.length:a.childNodes.length),q.addRange(e)):q.selectAllChildren(a)}else if(e=a.ownerDocument.body.createTextRange(),e.moveToElementText(a),!b)try{e.select()}catch(g){}};this.selectElement=function(a,c){var k;
a=f.byId(a);if(h.getSelection){var e=h.getSelection();k=h.createRange();e.removeAllRanges&&(d("opera")&&e.getRangeAt(0)&&(k=e.getRangeAt(0)),k.selectNode(a),e.removeAllRanges(),e.addRange(k))}else try{e=a.tagName?a.tagName.toLowerCase():"",k="img"===e||"table"===e?b.body(h).createControlRange():b.body(h).createRange(),k.addElement(a),c||k.select()}catch(g){this.selectElementChildren(a,c)}};this.inSelection=function(a){if(a){var b,d;if(h.getSelection){var e=c.getSelection();e&&0<e.rangeCount&&(d=e.getRangeAt(0));
if(d&&d.compareBoundaryPoints&&h.createRange)try{if(b=h.createRange(),b.setStart(a,0),1===d.compareBoundaryPoints(d.START_TO_END,b))return!0}catch(f){}}else{d=h.selection.createRange();try{b=a.ownerDocument.body.createTextRange(),b.moveToElementText(a)}catch(g){}if(d&&b&&1===d.compareEndPoints("EndToStart",b))return!0}}return!1};this.getBookmark=function(){var b,d,e=h.selection,f=a.curNode;if(h.getSelection){if(e=c.getSelection())if(e.isCollapsed){if(b=f?f.tagName:"")if(b=b.toLowerCase(),"textarea"==
b||"input"==b&&(!f.type||"text"==f.type.toLowerCase()))return e={start:f.selectionStart,end:f.selectionEnd,node:f,pRange:!0},{isCollapsed:e.end<=e.start,mark:e};b={isCollapsed:!0};e.rangeCount&&(b.mark=e.getRangeAt(0).cloneRange())}else d=e.getRangeAt(0),b={isCollapsed:!1,mark:d.cloneRange()}}else if(e){b=f?f.tagName:"";b=b.toLowerCase();if(f&&b&&("button"==b||"textarea"==b||"input"==b)){if(e.type&&"none"==e.type.toLowerCase())return{isCollapsed:!0,mark:null};d=e.createRange();return{isCollapsed:d.text&&
d.text.length?!1:!0,mark:{range:d,pRange:!0}}}b={};try{d=e.createRange(),b.isCollapsed=!("Text"==e.type?d.htmlText.length:d.length)}catch(g){return b.isCollapsed=!0,b}if("CONTROL"==e.type.toUpperCase())if(d.length){b.mark=[];e=0;for(f=d.length;e<f;)b.mark.push(d.item(e++))}else b.isCollapsed=!0,b.mark=null;else b.mark=d.getBookmark()}return b};this.moveToBookmark=function(a){if(a=a.mark)if(h.getSelection){var b=c.getSelection();b&&b.removeAllRanges&&(a.pRange?(b=a.node,b.selectionStart=a.start,b.selectionEnd=
a.end):(b.removeAllRanges(),b.addRange(a)))}else if(h.selection&&a){var d;a.pRange?d=a.range:e.isArray(a)?(d=h.body.createControlRange(),g.forEach(a,function(a){d.addElement(a)})):(d=h.body.createTextRange(),d.moveToBookmark(a));d.select()}};this.isCollapsed=function(){return this.getBookmark().isCollapsed}},h=new c(window);h.SelectionManager=c;return h})},"dijit/_base/place":function(){define(["dojo/_base/array","dojo/_base/lang","dojo/window","../place","../main"],function(g,f,e,d,b){var a={getViewport:function(){return e.getBox()}};
a.placeOnScreen=d.at;a.placeOnScreenAroundElement=function(a,h,k,b){var e;if(f.isArray(k))e=k;else{e=[];for(var p in k)e.push({aroundCorner:p,corner:k[p]})}return d.around(a,h,e,!0,b)};a.placeOnScreenAroundNode=a.placeOnScreenAroundElement;a.placeOnScreenAroundRectangle=a.placeOnScreenAroundElement;a.getPopupAroundAlignment=function(a,h){var k={};g.forEach(a,function(a){var c=h;switch(a){case "after":k[h?"BR":"BL"]=h?"BL":"BR";break;case "before":k[h?"BL":"BR"]=h?"BR":"BL";break;case "below-alt":c=
!c;case "below":k[c?"BL":"BR"]=c?"TL":"TR";k[c?"BR":"BL"]=c?"TR":"TL";break;case "above-alt":c=!c;default:k[c?"TL":"TR"]=c?"BL":"BR",k[c?"TR":"TL"]=c?"BR":"BL"}});return k};f.mixin(b,a);return b})},"dijit/_base/popup":function(){define(["dojo/dom-class","dojo/_base/window","../popup","../BackgroundIframe"],function(g,f,e){var d=e._createWrapper;e._createWrapper=function(a){a.declaredClass||(a={_popupWrapper:a.parentNode&&g.contains(a.parentNode,"dijitPopup")?a.parentNode:null,domNode:a,destroy:function(){},
ownerDocument:a.ownerDocument,ownerDocumentBody:f.body(a.ownerDocument)});return d.call(this,a)};var b=e.open;e.open=function(a){if(a.orient&&"string"!=typeof a.orient&&!("length"in a.orient)){var c=[],h;for(h in a.orient)c.push({aroundCorner:h,corner:a.orient[h]});a.orient=c}return b.call(this,a)};return e})},"dijit/_base/scroll":function(){define(["dojo/window","../main"],function(g,f){f.scrollIntoView=function(e,d){g.scrollIntoView(e,d)}})},"dijit/_base/sniff":function(){define(["dojo/uacss"],
function(){})},"dijit/_base/typematic":function(){define(["../typematic"],function(){})},"dijit/_base/wai":function(){define(["dojo/dom-attr","dojo/_base/lang","../main","../hccss"],function(g,f,e){f.mixin(e,{hasWaiRole:function(d,b){var a=this.getWaiRole(d);return b?-1<a.indexOf(b):0<a.length},getWaiRole:function(d){return f.trim((g.get(d,"role")||"").replace("wairole:",""))},setWaiRole:function(d,b){g.set(d,"role",b)},removeWaiRole:function(d,b){var a=g.get(d,"role");a&&(b?(a=f.trim((" "+a+" ").replace(" "+
b+" "," ")),g.set(d,"role",a)):d.removeAttribute("role"))},hasWaiState:function(d,b){return d.hasAttribute?d.hasAttribute("aria-"+b):!!d.getAttribute("aria-"+b)},getWaiState:function(d,b){return d.getAttribute("aria-"+b)||""},setWaiState:function(d,b,a){d.setAttribute("aria-"+b,a)},removeWaiState:function(d,b){d.removeAttribute("aria-"+b)}});return e})},"dijit/_base/window":function(){define(["dojo/window","../main"],function(g,f){f.getDocumentWindow=function(e){return g.get(e)}})},"dojo/fx/Toggler":function(){define(["../_base/lang",
"../_base/declare","../_base/fx","../aspect"],function(g,f,e,d){return f("dojo.fx.Toggler",null,{node:null,showFunc:e.fadeIn,hideFunc:e.fadeOut,showDuration:200,hideDuration:200,constructor:function(b){g.mixin(this,b);this.node=b.node;this._showArgs=g.mixin({},b);this._showArgs.node=this.node;this._showArgs.duration=this.showDuration;this.showAnim=this.showFunc(this._showArgs);this._hideArgs=g.mixin({},b);this._hideArgs.node=this.node;this._hideArgs.duration=this.hideDuration;this.hideAnim=this.hideFunc(this._hideArgs);
d.after(this.showAnim,"beforeBegin",g.hitch(this.hideAnim,"stop",!0),!0);d.after(this.hideAnim,"beforeBegin",g.hitch(this.showAnim,"stop",!0),!0)},show:function(b){return this.showAnim.play(b||0)},hide:function(b){return this.hideAnim.play(b||0)}})})},"dijit/TooltipDialog":function(){define("dojo/_base/declare dojo/dom-class dojo/has dojo/keys dojo/_base/lang dojo/on ./focus ./layout/ContentPane ./_DialogMixin ./form/_FormMixin ./_TemplatedMixin dojo/text!./templates/TooltipDialog.html ./main".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){g=g("dijit.TooltipDialog",[h,m,l,k],{title:"",doLayout:!1,autofocus:!0,baseClass:"dijitTooltipDialog",_firstFocusItem:null,_lastFocusItem:null,templateString:p,_setTitleAttr:"containerNode",postCreate:function(){this.inherited(arguments);this.own(a(this.domNode,"keydown",b.hitch(this,"_onKey")))},orient:function(a,c,h){a={"MR-ML":"dijitTooltipRight","ML-MR":"dijitTooltipLeft","TM-BM":"dijitTooltipAbove","BM-TM":"dijitTooltipBelow","BL-TL":"dijitTooltipBelow dijitTooltipABLeft",
"TL-BL":"dijitTooltipAbove dijitTooltipABLeft","BR-TR":"dijitTooltipBelow dijitTooltipABRight","TR-BR":"dijitTooltipAbove dijitTooltipABRight","BR-BL":"dijitTooltipRight","BL-BR":"dijitTooltipLeft","BR-TL":"dijitTooltipBelow dijitTooltipABLeft","BL-TR":"dijitTooltipBelow dijitTooltipABRight","TL-BR":"dijitTooltipAbove dijitTooltipABRight","TR-BL":"dijitTooltipAbove dijitTooltipABLeft"}[c+"-"+h];f.replace(this.domNode,a,this._currentOrientClass||"");this._currentOrientClass=a},focus:function(){this._getFocusItems();
c.focus(this._firstFocusItem)},onOpen:function(a){this.orient(this.domNode,a.aroundCorner,a.corner);var c=a.aroundNodePos;"M"==a.corner.charAt(0)&&"M"==a.aroundCorner.charAt(0)?(this.connectorNode.style.top=c.y+(c.h-this.connectorNode.offsetHeight>>1)-a.y+"px",this.connectorNode.style.left=""):"M"==a.corner.charAt(1)&&"M"==a.aroundCorner.charAt(1)&&(this.connectorNode.style.left=c.x+(c.w-this.connectorNode.offsetWidth>>1)-a.x+"px");this._onShow()},onClose:function(){this.onHide()},_onKey:function(a){if(a.keyCode==
d.ESCAPE)this.defer("onCancel"),a.stopPropagation(),a.preventDefault();else if(a.keyCode==d.TAB){var h=a.target;this._getFocusItems();this._firstFocusItem==this._lastFocusItem?(a.stopPropagation(),a.preventDefault()):h==this._firstFocusItem&&a.shiftKey?(c.focus(this._lastFocusItem),a.stopPropagation(),a.preventDefault()):h==this._lastFocusItem&&!a.shiftKey?(c.focus(this._firstFocusItem),a.stopPropagation(),a.preventDefault()):a.stopPropagation()}}});e("dojo-bidi")&&g.extend({_setTitleAttr:function(a){this.containerNode.title=
this.textDir&&this.enforceTextDirWithUcc?this.enforceTextDirWithUcc(null,a):a;this._set("title",a)},_setTextDirAttr:function(a){if(!this._created||this.textDir!=a)this._set("textDir",a),this.textDir&&this.title&&(this.containerNode.title=this.enforceTextDirWithUcc(null,this.title))}});return g})},"dojo/dnd/AutoSource":function(){define(["../_base/declare","./Source"],function(g,f){return g("dojo.dnd.AutoSource",f,{constructor:function(){this.autoSync=!0}})})},"dgrid/TouchScroll":function(){define("dojo/_base/declare dojo/on ./util/touch ./util/has-css3 put-selector/put xstyle/css!./css/TouchScroll.css".split(" "),
function(g,f,e,d,b){function a(a,c,h,k){k=a.touchNode;var b=s[a.id],d,e,l;if("object"!==typeof c)l=c,c=h,h=e=!0;else{h="x"in c;e="y"in c;if(!h||!e)d=a.getScrollPosition();l=h?c.x:d.x;c=e?c.y:d.y}k.style[I]=L+-l+"px,"+-c+"px"+C;b&&(h&&a._scrollbarXNode)&&(a._scrollbarXNode.style[I]=L+l*b.parentWidth/b.scrollWidth+"px,0"+C);b&&(e&&a._scrollbarYNode)&&(a._scrollbarYNode.style[I]=L+"0,"+c*b.parentHeight/b.scrollHeight+"px"+C);f.emit(a.touchNode.parentNode,"scroll",{scrollLeft:l,scrollTop:c})}function c(a){return s[a.id]?
x.exec(window.getComputedStyle(a.touchNode)[I]):w.exec(a.touchNode.style[I])}function h(a){var c=this.widget,c=[this.node,c._scrollbarXNode,c._scrollbarYNode],h=c.length;this.timer&&(clearTimeout(this.timer),this.timer=null);for(this.transitionHandler&&this.transitionHandler.remove();h--;)c[h]&&(c[h].style[F+"Duration"]="0");(!a||!a.preserveScrollbars)&&b(this.node.parentNode,".touchscroll-fadeout");delete this.resetEffects}function k(a){var h=a.widget,k=h.touchNode,b=h.id,d=0,l=0,f;if(e.countCurrentTouches(a,
k)===h.touchesToScroll){if(f=c(h))d=+f[1],l=+f[2];if(f=s[b])f.resetEffects&&f.resetEffects({preserveScrollbars:!0}),k.style[I]=L+d+"px,"+l+"px"+C,t[b]=f;a=a.targetTouches[0];f=s[b]={widget:h,node:k,startX:d-a.pageX,startY:l-a.pageY,lastX:d,lastY:l,pageX:a.pageX,pageY:a.pageY,tickFunc:function(){var a=s[b],c,h;a&&(c=a.node,(h=w.exec(c.style[I]))?(c=+h[1],h=+h[2],a.velX=c-a.lastX,a.velY=h-a.lastY,a.lastX=c,a.lastY=h):a.lastX=a.lastY=0,a.timer=setTimeout(a.tickFunc,q))}};f.timer=setTimeout(f.tickFunc,
q)}}function l(c){var h=c.widget,k=h.id,d=h.touchesToScroll,l=s[k],f,m;if(!l||(f=e.countCurrentTouches(c,h.touchNode))!==d)f>d&&h.cancelTouchScroll();else{f=c.targetTouches;d=f[0];if(!l.scrollbarsShown&&(t[k]||Math.abs(d.pageX-l.pageX)>h.scrollThreshold||Math.abs(d.pageY-l.pageY)>h.scrollThreshold)){var k=h.touchNode,n=k.parentNode,p=n.offsetWidth-v,q=n.offsetHeight-v,g=l.scrollWidth=k.scrollWidth,r=l.scrollHeight=k.scrollHeight,u=l.parentWidth=n.offsetWidth,w=l.parentHeight=n.offsetHeight;g>u?(h._scrollbarXNode||
(m=b(n,"div.touchscroll-x")),m=h._scrollbarXNode=h._scrollbarXNode||b(m,"div.touchscroll-bar"),m.style.width=p*p/g+"px",m.style.left=k.offsetLeft+"px",b(n,".touchscroll-scrollable-x"),l.scrollableX=!0):b(n,"!touchscroll-scrollable-x");r>w?(h._scrollbarYNode||(m=b(n,"div.touchscroll-y")),m=h._scrollbarYNode=h._scrollbarYNode||b(m,"div.touchscroll-bar"),m.style.height=q*q/r+"px",m.style.top=k.offsetTop+"px",b(n,".touchscroll-scrollable-y"),l.scrollableY=!0):b(n,"!touchscroll-scrollable-y");b(n,"!touchscroll-fadeout");
l.scrollbarsShown=!0;for(m=f.length;m--;)f[m].touchScrolled=!0}if(l.scrollbarsShown&&(l.scrollableX||l.scrollableY))c.preventDefault(),c=l.scrollableX?l.startX+d.pageX:0,d=l.scrollableY?l.startY+d.pageY:0,m=l.scrollableX?-(l.scrollWidth-l.parentWidth):0,l=l.scrollableY?-(l.scrollHeight-l.parentHeight):0,0<c?c/=2:c<m&&(c=m-(m-c)/2),0<d?d/=2:d<l&&(d=l-(l-d)/2),a(h,-c,-d)}}function m(a){var c=a.widget,h=c.id;s[h]&&e.countCurrentTouches(a,c.touchNode)==c.touchesToScroll-1&&n(h)}function p(a,c,h){function k(){delete b.transitionHandler;
b.resetEffects();delete s[a]}var b=s[a],d=b.widget,e=b.node,l=b.scrollableX?Math.max(Math.min(0,c),-(b.scrollWidth-b.parentWidth)):c,m=b.scrollableY?Math.max(Math.min(0,h),-(b.scrollHeight-b.parentHeight)):h;delete b.timer;l!=c||m!=h?(b.transitionHandler=f.once(e,B,k),e.style[F+"Duration"]=d.bounceDuration+"ms",e.style[I]=L+l+"px,"+m+"px"+C,l!=c&&b.scrollableX&&(e=b.widget._scrollbarXNode,e.style[F+"Duration"]=d.bounceDuration+"ms",e.style[I]=c>l?L+"0,0"+C:L+(e.parentNode.offsetWidth-e.offsetWidth)+
"px,0"+C),m!=h&&b.scrollableY&&(e=b.widget._scrollbarYNode,e.style[F+"Duration"]=d.bounceDuration+"ms",e.style[I]=h>m?L+"0,0"+C:L+"0,"+(e.parentNode.offsetHeight-e.offsetHeight)+"px"+C)):k()}function n(c){var k=s[c],b=t[c],d,e;delete t[c];k.timer&&clearTimeout(k.timer);k.resetEffects=h;(d=w.exec(k.node.style[I]))?(e=+d[1],d=+d[2]):e=d=0;if(!k.velX&&!k.velY||(0<=e||e<=-(k.scrollWidth-k.parentWidth))&&(0<=d||d<=-(k.scrollHeight-k.parentHeight)))p(c,e,d);else{if(b&&(b.velX||b.velY)&&(0>=k.velX&&0>=b.velX||
0<=k.velX&&0<=b.velX)&&(0>=k.velY&&0>=b.velY||0<=k.velY&&0<=b.velY))k.velX=1.15*(k.velX+b.velX),k.velY=1.15*(k.velY+b.velY);k.lastX=e;k.lastY=d;k.calcFunc=function(){var h=s[c],k,b,d,e,l,f;if(h)if(k=h.widget,l=k.glideDecel(h.velX),f=k.glideDecel(h.velY),Math.abs(l)>=u||Math.abs(f)>=u){d=h.lastX+l;e=h.lastY+f;if(0<d||d<-(h.scrollWidth-h.parentWidth))for(b=6;b--;)l=k.glideDecel(l);if(0<e||e<-(h.scrollHeight-h.parentHeight))for(b=6;b--;)f=k.glideDecel(f);a(k,-d,-e);h.lastX=d;h.lastY=e;h.velX=l;h.velY=
f;h.timer=setTimeout(h.calcFunc,r)}else p(c,h.lastX,h.lastY)};k.timer=setTimeout(k.calcFunc,r)}}var q=50,r=30,s={},t={},u=1,v=8,w=/^translate(?:3d)?\((-?\d+)(?:\.\d*)?(?:px)?, (-?\d+)/,x=/^matrix\(1, 0, 0, 1, (-?\d+)(?:\.\d*)?(?:px)?, (-?\d+)/,y=d("css-transitions"),B=d("transitionend"),D=d("css-transforms");d=d("css-transforms3d");var E,F,I,L,C;d?(L="translate3d(",C=",0)"):D&&(L="translate(",C=")");if(!y||!L)return function(){};I=d||D;I=!0===I?"transform":I+"Transform";F=!0===y?"transition":y+"Transition";
E=!0===D?"":"-"+D.toLowerCase()+"-";return g(null,{touchesToScroll:1,touchNode:null,scrollThreshold:10,bounceDuration:300,postCreate:function(){this._initTouch();this.inherited(arguments)},_initTouch:function(){function a(){b.cancelTouchScroll()}function c(h){return function(c){c.widget=b;c.cancelTouchScroll=a;h.call(this,c)}}var h=this.touchNode=this.touchNode||this.containerNode,b=this,d;h&&h.parentNode&&(d=h.parentNode,d.style.overflow="hidden",h.style[F+"Property"]=E+"transform",h.style[F+"TimingFunction"]=
"cubic-bezier(0.33, 0.66, 0.66, 1)",this._touchScrollListeners=[f(d,"touchstart",c(k)),f(d,"touchmove",c(l)),f(d,"touchend,touchcancel",c(m))])},destroy:function(){for(var a=this._touchScrollListeners.length;a--;)this._touchScrollListeners[a].remove();delete s[this.id];this.inherited(arguments)},scrollTo:function(c){var h=s[this.id],k=this.touchNode,b=k.parentNode;!c.preserveMomentum&&(h&&h.resetEffects)&&h.resetEffects();c.x&&(c.x=Math.max(0,Math.min(c.x,k.scrollWidth-b.offsetWidth)));c.y&&(c.y=
Math.max(0,Math.min(c.y,k.scrollHeight-b.offsetHeight)));a(this,c)},getScrollPosition:function(){var a=c(this);return a?{x:-a[1],y:-a[2]}:{x:0,y:0}},cancelTouchScroll:function(){var a=s[this.id];a&&(a.resetEffects?a.resetEffects():(a.timer&&clearTimeout(a.timer),b(a.node.parentNode,".touchscroll-fadeout")),delete s[this.id])},glideDecel:function(a){return 0.9*a}})})},"dgrid/util/touch":function(){define(["dojo/on","dojo/query"],function(g,f){function e(b,a,c,h){if(!(1<c.targetTouches.length)){var k=
c.changedTouches[0],e=k.screenX,f=k.screenY;h&&c.preventDefault();var p=g(b,"touchend",function(c){var k=c.changedTouches[0];c.targetTouches.length||(Math.abs(k.screenX-e)<d.tapRadius&&Math.abs(k.screenY-f)<d.tapRadius&&(h&&c.preventDefault(),a.call(this,c)),p.remove())})}}var d={tapRadius:10,dbltapTime:250,selector:function(b,a,c){return function(h,k){var d=a.bubble;d?a=d:!1!==c&&(c=!0);return g(h,a,function(a){var d=a.target;3==d.nodeType&&(d=d.parentNode);for(;!f.matches(d,b,h);)if(d==h||!c||!(d=
d.parentNode))return;return k.call(d,a)})}},countCurrentTouches:function(b,a){if(!("touches"in b))return-1;var c,h,k;for(h=c=0;k=b.touches[c];++c)a.contains(k.target)&&++h;return h},tap:function(b,a){return g(b,"touchstart",function(c){e(b,a,c)})},dbltap:function(b,a){var c,h;return g(b,"touchstart",function(k){c?e(b,function(k){if(c){var b=k.changedTouches[0];Math.abs(b.screenX-c.screenX)<d.tapRadius&&Math.abs(b.screenY-c.screenY)<d.tapRadius&&(h&&clearTimeout(h),c=h=null,a.call(this,k))}},k,!0):
e(b,function(a){c=a.changedTouches[0];h=setTimeout(function(){c=h=null},d.dbltapTime)},k)})}};return d})},"dgrid/util/has-css3":function(){define(["dojo/has"],function(g){function f(d,b){var a=d.style,c;if(b in a)return!0;b=b.slice(0,1).toUpperCase()+b.slice(1);for(c=e.length;c--;)if(e[c]+b in a)return e[c];return!1}var e=["ms","O","Moz","Webkit"];g.add("css-transitions",function(d,b,a){return f(a,"transitionProperty")});g.add("css-transforms",function(d,b,a){return f(a,"transform")});g.add("css-transforms3d",
function(d,b,a){return f(a,"perspective")});g.add("transitionend",function(){var d=g("css-transitions");return!d?!1:!0===d?"transitionend":{ms:"MSTransitionEnd",O:"oTransitionEnd",Moz:"transitionend",Webkit:"webkitTransitionEnd"}[d]});return g})},"put-selector/put":function(){(function(g){var f,e=/[-+,> ]/;g([],f=function(d,b){function a(b){function f(){t&&(s&&t!=s)&&(s==b&&(n||(n=e.test(x)&&d.createDocumentFragment()))?n:s).insertBefore(t,g||null)}for(var n,q,g,s,t,u=arguments,v=u[0],w=0;w<u.length;w++){var x=
u[w];if("object"==typeof x){q=!1;if(x instanceof Array){t=d.createDocumentFragment();for(var y=0;y<x.length;y++)t.appendChild(a(x[y]));x=t}if(x.nodeType)t=x,f(),s=x,g=0;else for(y in x)t[y]=x[y]}else if(q)q=!1,t.appendChild(d.createTextNode(x));else{1>w&&(b=null);q=!0;if(v=x.replace(c,function(c,e,n,q,v,y){e&&(f(),"-"==e||"+"==e?(s=(g=t||s).parentNode,t=null,"+"==e&&(g=g.nextSibling)):("\x3c"==e?s=t=(t||s).parentNode:(","==e?s=b:t&&(s=t),t=null),g=0),t&&(s=t));if((c=!n&&q)||!t&&(n||v))"$"==c?(c=u[++w],
s.appendChild(d.createTextNode(c))):(c=c||a.defaultTag,(e=l&&u[w+1]&&u[w+1].name)&&(c="\x3c"+c+' name\x3d"'+e+'"\x3e'),t=k&&~(h=c.indexOf("|"))?d.createElementNS(k[c.slice(0,h)],c.slice(h+1)):d.createElement(c));if(n)if("$"==q&&(q=u[++w]),"#"==n)t.id=q;else if(e=(c=t.className)&&(" "+c+" ").replace(" "+q+" "," "),"."==n)t.className=c?(e+q).substring(1):q;else if("!"==x){var C;l?a("div",t,"\x3c").innerHTML="":(C=t.parentNode)&&C.removeChild(t)}else e=e.substring(1,e.length-1),e!=c&&(t.className=e);
v&&("$"==y&&(y=u[++w]),"style"==v?t.style.cssText=y:(n="!"==v.charAt(0)?(v=v.substring(1))&&"removeAttribute":"setAttribute",y=""===y?v:y,k&&~(h=v.indexOf("|"))?t[n+"NS"](k[v.slice(0,h)],v.slice(h+1),y):t[n](v,y)));return""}))throw new SyntaxError("Unexpected char "+v+" in "+x);f();s=v=t||s}}b&&n&&b.appendChild(n);return v}e=b||e;var c=/(?:\s*([-+ ,<>]))?\s*(\.|!\.?|#)?([-\w\u00A0-\uFFFF%$|]+)?(?:\[([^\]=]+)=?['"]?([^\]'"]*)['"]?\])?/g,h,k=!1;d=d||document;var l="object"==typeof d.createElement;a.addNamespace=
function(a,c){d.createElementNS?(k||(k={}))[a]=c:d.namespaces.add(a,c)};a.defaultTag="div";a.forDocument=f;return a})})(function(g,f,e){e=e||f;"function"===typeof define?define([],function(){return e()}):"undefined"==typeof window?require("./node-html")(module,e):put=e()})},"xstyle/css":function(){define(["require"],function(g){function f(e,d,b){var a=document.documentElement;e=a.insertBefore(document.createElement(e),a.firstChild);e.id=d;d=(e.currentStyle||getComputedStyle(e,null))[b];a.removeChild(e);
return d}return{load:function(e,d,b,a){function c(a){var c=f("x-parse",null,"content"),h=a&&(a.sheet||a.styleSheet);c&&"none"!=c&&"normal"!=c?d([eval(c)],function(c){a?c.process(a,b):(c.processAll(),b(h))}):b(h)}var h=d.toUrl(e),k;h.match(/!$/)&&(k={wait:!1},h=h.slice(0,-1));var l=d.cache&&d.cache["url:"+h];if(l)l.xCss&&(l=l.cssText),g(["./core/load-css"],function(a){c(a.insertCss(l))});else{if("none"==f("div",e.replace(/\//g,"-").replace(/\..*/,"")+"-loaded","display"))return c();g(["./core/load-css"],
function(a){a(h,c,k)})}}}})},"dgrid/extensions/_DnD-touch-autoscroll":function(){define(["dojo/aspect","dojo/dom-geometry","dojo/dnd/autoscroll","../List"],function(g,f,e,d){var b=e.autoScrollNodes,a,c;a={};g.after(d.prototype,"postCreate",function(c){a[this.id]=this;return c});g.after(d.prototype,"destroy",function(c){delete a[this.id];return c});c=function(c){for(var k,b;c;){if((k=c.id)&&(b=a[k]))return b;c=c.parentNode}};e.autoScrollNodes=function(a){var k=a.target,d=c(k),m,p,n,q,g,s;if(d&&(k=
d.touchNode.parentNode,k=f.position(k,!0),m=a.pageX-k.x,p=a.pageY-k.y,n=Math.min(e.H_TRIGGER_AUTOSCROLL,k.w/2),q=Math.min(e.V_TRIGGER_AUTOSCROLL,k.h/2),m<n?g=-n:m>k.w-n&&(g=n),p<q?s=-q:p>k.h-q&&(s=q),g||s)){a=d.getScrollPosition();k={};g&&(k.x=a.x+g);s&&(k.y=a.y+s);d.scrollTo(k);return}b.call(this,a)};return e})},"dgrid/List":function(){define("dojo/_base/kernel dojo/_base/declare dojo/dom dojo/on dojo/has ./util/misc ./TouchScroll xstyle/has-class put-selector/put dojo/_base/sniff xstyle/css!./css/dgrid.css".split(" "),
function(g,f,e,d,b,a,c,h,k){function l(a,c){k(document.body,a,".dgrid-scrollbar-measure");var h=a["offset"+c]-a["client"+c];a.className="";document.body.removeChild(a);return h}function m(a){var c=a?"."+a.replace(u,"."):"";this._class&&(c="!"+this._class.replace(u,"!")+c);k(this.domNode,c);this._class=a}function p(){return this._class}function n(){return{x:this.bodyNode.scrollLeft,y:this.bodyNode.scrollTop}}function q(a){"undefined"!==typeof a.x&&(this.bodyNode.scrollLeft=a.x);"undefined"!==typeof a.y&&
(this.bodyNode.scrollTop=a.y)}h("mozilla","opera","webkit","ie","ie-6","ie-6-7","quirks","no-quirks","touch");var r,s;b.add("dom-scrollbar-width",function(a,c,h){return l(h,"Width")});b.add("dom-scrollbar-height",function(a,c,h){return l(h,"Height")});b.add("dom-rtl-scrollbar-left",function(a,c,h){a=k("div");k(document.body,h,".dgrid-scrollbar-measure[dir\x3drtl]");k(h,a);c=!!b("ie")||!!b("trident")||a.offsetLeft>=b("dom-scrollbar-width");h.className="";document.body.removeChild(h);k(a,"!");h.removeAttribute("dir");
return c});var t=0,u=/ +/g,v=7>b("ie")&&!b("quirks")?function(){var a,c,h;if(this._started&&(a=document.documentElement,c=a.clientWidth,a=a.clientHeight,h=this._prevWinDims||[],h[0]!==c||h[1]!==a))this.resize(),this._prevWinDims=[c,a]}:function(){this._started&&this.resize()};return f(b("touch")?c:null,{tabableHeader:!1,showHeader:!1,showFooter:!1,maintainOddEven:!0,cleanAddedRules:!0,useTouchScroll:null,addUiClasses:!0,cleanEmptyObservers:!0,highlightDuration:250,postscript:function(a,c){var h=this;
(this._Row=function(a,c,h){this.id=a;this.data=c;this.element=h}).prototype.remove=function(){h.removeRow(this.element)};c&&(this.srcNodeRef=c=c.nodeType?c:document.getElementById(c));this.create(a,c)},listType:"list",create:function(a,c){var h=this.domNode=c||k("div"),d;a?(this.params=a,f.safeMixin(this,a),d=a["class"]||a.className||h.className,this._sort=a.sort||[],delete this.sort):this._sort=[];this.observers=[];this._numObservers=0;this._listeners=[];this._rowIdToObject={};this.postMixInProperties&&
this.postMixInProperties();this.id=h.id=h.id||this.id||"dgrid_"+t++;null===this.useTouchScroll&&(this.useTouchScroll=!b("dom-scrollbar-width"));this.buildRendering();d&&m.call(this,d);this.postCreate();delete this.srcNodeRef;this.domNode.offsetHeight&&this.startup()},buildRendering:function(){var c=this.domNode,h=this.addUiClasses,e=this,l,f,m,n;n=this.isRTL="rtl"==(document.body.dir||document.documentElement.dir||document.body.style.direction).toLowerCase();c.className="";k(c,"[role\x3dgrid].dgrid.dgrid-"+
this.listType+(h?".ui-widget":""));l=this.headerNode=k(c,"div.dgrid-header.dgrid-header-row"+(h?".ui-widget-header":"")+(this.showHeader?"":".dgrid-header-hidden"));(b("quirks")||8>b("ie"))&&k(c,"div.dgrid-spacer");f=this.bodyNode=k(c,"div.dgrid-scroller");b("ff")&&(f.tabIndex=-1);this.headerScrollNode=k(c,"div.dgrid-header.dgrid-header-scroll.dgrid-scrollbar-width"+(h?".ui-widget-header":""));m=this.footerNode=k("div.dgrid-footer"+(this.showFooter?"":".dgrid-footer-hidden"));k(c,m);n&&(c.className+=
" dgrid-rtl"+(b("dom-rtl-scrollbar-left")?" dgrid-rtl-swap":""));d(f,"scroll",function(a){e.showHeader&&(l.scrollLeft=a.scrollLeft||f.scrollLeft);a.stopPropagation();d.emit(c,"scroll",{scrollTarget:f})});this.configStructure();this.renderHeader();this.contentNode=this.touchNode=k(this.bodyNode,"div.dgrid-content"+(h?".ui-widget-content":""));this._listeners.push(this._resizeHandle=d(window,"resize",a.throttleDelayed(v,this)))},postCreate:b("touch")?function(){this.useTouchScroll&&this.inherited(arguments)}:
function(){},startup:function(){this._started||(this.inherited(arguments),this._started=!0,this.resize(),this.set("sort",this._sort))},configStructure:function(){},resize:function(){var c=this.bodyNode,h=this.headerNode,k=this.footerNode,d=h.offsetHeight,e=this.showFooter?k.offsetHeight:0,l=b("quirks")||7>b("ie");this.headerScrollNode.style.height=c.style.marginTop=d+"px";c.style.marginBottom=e+"px";l&&(c.style.height="",c.style.height=Math.max(this.domNode.offsetHeight-d-e,0)+"px",e&&(k.style.bottom=
"1px",setTimeout(function(){k.style.bottom=""},0)));r||(r=b("dom-scrollbar-width"),s=b("dom-scrollbar-height"),b("ie")&&(r++,s++),a.addCssRule(".dgrid-scrollbar-width","width: "+r+"px"),a.addCssRule(".dgrid-scrollbar-height","height: "+s+"px"),17!=r&&!l&&(a.addCssRule(".dgrid-header-row","right: "+r+"px"),a.addCssRule(".dgrid-rtl-swap .dgrid-header-row","left: "+r+"px")));l&&(h.style.width=c.clientWidth+"px",setTimeout(function(){h.scrollLeft=c.scrollLeft},0))},addCssRule:function(c,h){var k=a.addCssRule(c,
h);this.cleanAddedRules&&this._listeners.push(k);return k},on:function(a,c){var h=d(this.domNode,a,c);b("dom-addeventlistener")||this._listeners.push(h);return h},cleanup:function(){var a=this.observers,c;for(c in this._rowIdToObject)if(this._rowIdToObject[c]!=this.columns){var h=document.getElementById(c);h&&this.removeRow(h,!0)}for(c=0;c<a.length;c++)(h=a[c])&&h.cancel();this.observers=[];this._numObservers=0;this.preload=null},destroy:function(){if(this._listeners){for(var a=this._listeners.length;a--;)this._listeners[a].remove();
delete this._listeners}this._started=!1;this.cleanup();k(this.domNode,"!");this.useTouchScroll&&this.inherited(arguments)},refresh:function(){this.cleanup();this._rowIdToObject={};this._autoId=0;this.contentNode.innerHTML="";this.scrollTo({x:0,y:0})},newRow:function(a,c,h,b,d){if(c){var e=this.insertRow(a,c,h,b,d);k(e,".dgrid-highlight"+(this.addUiClasses?".ui-state-highlight":""));setTimeout(function(){k(e,"!dgrid-highlight!ui-state-highlight")},this.highlightDuration);return e}},adjustRowIndices:function(a){var c=
a.rowIndex;if(-1<c){do-1<a.rowIndex&&(this.maintainOddEven&&-1<(a.className+" ").indexOf("dgrid-row ")&&k(a,"."+(1==c%2?"dgrid-row-odd":"dgrid-row-even")+"!"+(0==c%2?"dgrid-row-odd":"dgrid-row-even")),a.rowIndex=c++);while((a=a.nextSibling)&&a.rowIndex!=c)}},renderArray:function(a,c,h){function k(){var c=arguments;if(-1<g)for(var d=0;d<c.length;d++){var e=c[d],l=p[e?0:p.length-1];if(l=l&&b(l)){var m=l[e?"previousSibling":"nextSibling"];m&&(m=f.row(m));m&&m.element!=l&&(e=e?"unshift":"push",a[e](m.data),
p[e](m.element),h.count++)}}}function b(a){return!e.isDescendant(a,f.domNode)&&document.getElementById(a.id)?f.row(a.id.slice(f.id.length+5)).element:a}function d(a){t=f.insertRow(a,s,null,m++,h);t.observerIndex=g;return t}function l(a){u=a.slice(0);(q=c?c.parentNode:f.contentNode)&&q.parentNode&&(q!==f.contentNode||a.length)?(q.insertBefore(s,c||null),(t=a[a.length-1])&&f.adjustRowIndices(t)):n[g]&&f.cleanEmptyObservers&&"undefined"!==typeof g&&(n[g].cancel(),n[g]=0,f._numObservers--);p=a;r&&(r.rows=
p)}h=h||{};var f=this,m=h.start||0,n=this.observers,p,q,g;c||(this._lastCollection=a);if(a.observe){f._numObservers++;var r=a.observe(function(d,e,l){var m,n,r;-1<e&&p[e]&&(m=p.splice(e,1)[0],m.parentNode==q&&((n=m.nextSibling)&&e!=l&&n.rowIndex--,f.removeRow(m)),h.count--,f._processScroll&&f._processScroll());if(-1<l){if(p.length)if(0===l)r=(r=p[l])&&b(r);else{if(r=p[l-1])r=b(r),r=(r.connected||r).nextSibling}else r=f._getFirstRowSibling&&f._getFirstRowSibling(q);m&&(r&&m.id===r.id)&&(r=(r.connected||
r).nextSibling);r&&!r.parentNode&&(r=document.getElementById(r.id));m=c&&c.parentNode||r&&r.parentNode||f.contentNode;if(m=f.newRow(d,m,r,h.start+l,h))if(m.observerIndex=g,p.splice(l,0,m),!n||l<e)n=m.previousSibling,n=!n||n.rowIndex+1==m.rowIndex||0==m.rowIndex?m:n;h.count++}0===e?k(1,1):e===a.length-(-1===l?0:1)&&k(0,0);e!=l&&n&&f.adjustRowIndices(n);f._onNotification(p,d,e,l)},!0);g=n.push(r)-1}var s=document.createDocumentFragment(),t,u;if(a.map){if(p=a.map(d,console.error),p.then)return a.then(function(c){a=
c;return p.then(function(a){l(a);k(1,1,0,0);return u})})}else{p=[];for(var v=0,U=a.length;v<U;v++)p[v]=d(a[v])}l(p);k(1,1,0,0);return u},_onNotification:function(a,c,h,k){},renderHeader:function(){},_autoId:0,insertRow:function(a,c,h,k,b){var d=b.parentId,d=this.id+"-row-"+(d?d+"-":"")+(this.store&&this.store.getIdentity?this.store.getIdentity(a):this._autoId++),e=document.getElementById(d),l=e&&e.previousSibling;e&&(e===h&&(h=(h.connected||h).nextSibling),this.removeRow(e));e=this.renderRow(a,b);
e.className=(e.className||"")+" dgrid-row "+(1==k%2?"dgrid-row-odd":"dgrid-row-even")+(this.addUiClasses?" ui-state-default":"");this._rowIdToObject[e.id=d]=a;c.insertBefore(e,h||null);l&&this.adjustRowIndices(l);e.rowIndex=k;return e},renderRow:function(a,c){return k("div",""+a)},removeRow:function(a,c){a=a.element||a;delete this._rowIdToObject[a.id];c||k(a,"!")},row:function(a){var c;if(a instanceof this._Row)return a;a.target&&a.target.nodeType&&(a=a.target);if(a.nodeType){do{var h=a.id;if(c=this._rowIdToObject[h])return new this._Row(h.substring(this.id.length+
5),c,a);a=a.parentNode}while(a&&a!=this.domNode)}else return"object"==typeof a?c=this.store.getIdentity(a):(c=a,a=this._rowIdToObject[this.id+"-row-"+c]),new this._Row(c,a,document.getElementById(this.id+"-row-"+c))},cell:function(a){return{row:this.row(a)}},_move:function(a,c,h,k){var b,d;d=b=a.element;c=c||1;do if(a=b[0>c?"previousSibling":"nextSibling"]){do if((b=a)&&-1<(b.className+" ").indexOf(h+" ")){d=b;c+=0>c?1:-1;break}while(a=(!k||!b.hidden)&&b[0>c?"lastChild":"firstChild"])}else if(b=b.parentNode,
!b||b===this.bodyNode||b===this.headerNode)break;while(c);return d},up:function(a,c,h){a.element||(a=this.row(a));return this.row(this._move(a,-(c||1),"dgrid-row",h))},down:function(a,c,h){a.element||(a=this.row(a));return this.row(this._move(a,c||1,"dgrid-row",h))},scrollTo:b("touch")?function(a){return this.useTouchScroll?this.inherited(arguments):q.call(this,a)}:q,getScrollPosition:b("touch")?function(){return this.useTouchScroll?this.inherited(arguments):n.call(this)}:n,get:function(a){var c=
"_get"+a.charAt(0).toUpperCase()+a.slice(1);return"function"===typeof this[c]?this[c].apply(this,[].slice.call(arguments,1)):this[a]},set:function(a,c){if("object"===typeof a)for(var h in a)this.set(h,a[h]);else h="_set"+a.charAt(0).toUpperCase()+a.slice(1),"function"===typeof this[h]?this[h].apply(this,[].slice.call(arguments,1)):this[a]=c;return this},_getClass:p,_setClass:m,_getClassName:p,_setClassName:m,_setSort:function(a,c){this._sort="string"!=typeof a?a:[{attribute:a,descending:c}];this.refresh();
this._lastCollection&&(a.length&&("string"!=typeof a&&(c=a[0].descending,a=a[0].attribute),this._lastCollection.sort(function(h,k){var b=h[a],d=k[a];void 0===b&&(b="");void 0===d&&(d="");return b==d?0:b>d==!c?1:-1})),this.renderArray(this._lastCollection))},sort:function(a,c){g.deprecated("sort(...)",'use set("sort", ...) instead',"dgrid 0.4");this.set("sort",a,c)},_getSort:function(){return this._sort},_setShowHeader:function(a){var c=this.headerNode;this.showHeader=a;k(c,(a?"!":".")+"dgrid-header-hidden");
this.renderHeader();this.resize();a&&(c.scrollLeft=this.getScrollPosition().x)},setShowHeader:function(a){g.deprecated("setShowHeader(...)",'use set("showHeader", ...) instead',"dgrid 0.4");this.set("showHeader",a)},_setShowFooter:function(a){this.showFooter=a;k(this.footerNode,(a?"!":".")+"dgrid-footer-hidden");this.resize()}})})},"dgrid/util/misc":function(){define(["dojo/has","put-selector/put"],function(g,f){g.add("dom-contains",function(a,c,h){return!!h.contains});var e=[],d,b,a,c=/([^A-Za-z0-9_\u00A0-\uFFFF-])/g,
h={defaultDelay:15,throttle:function(a,c,b){var d=!1;b=b||h.defaultDelay;return function(){d||(d=!0,a.apply(c,arguments),setTimeout(function(){d=!1},b))}},throttleDelayed:function(a,c,b){var d=!1;b=b||h.defaultDelay;return function(){if(!d){d=!0;var h=arguments;setTimeout(function(){d=!1;a.apply(c,h)},b)}}},debounce:function(a,c,b){var d;b=b||h.defaultDelay;return function(){d&&(clearTimeout(d),d=null);var h=arguments;d=setTimeout(function(){a.apply(c,h)},b)}},each:function(a,c,h){var b,d;if(a)if("number"===
typeof a.length){b=0;for(d=a.length;b<d;b++)c.call(h,a[b],b,a)}else for(b in a)c.call(h,a[b],b,a)},contains:function(a,c){return g("dom-contains")?a.contains(c):a.compareDocumentPosition(c)&8},addCssRule:function(c,h){d||(d=f(document.getElementsByTagName("head")[0],"style"),d=d.sheet||d.styleSheet,b=d.deleteRule?"deleteRule":"removeRule",a=d.cssRules?"cssRules":"rules");var m=e.length;e[m]=(d.cssRules||d.rules).length;d.addRule?d.addRule(c,h):d.insertRule(c+"{"+h+"}",e[m]);return{get:function(c){return d[a][e[m]].style[c]},
set:function(c,h){"undefined"!==typeof e[m]&&(d[a][e[m]].style[c]=h)},remove:function(){var a=e[m],c,h;if(void 0!==a){d[b](a);e[m]=void 0;c=m+1;for(h=e.length;c<h;c++)e[c]>a&&e[c]--}}}},escapeCssIdentifier:function(a,h){return"string"===typeof a?a.replace(c,h||"\\$1"):a}};return h})},"xstyle/has-class":function(){define(["dojo/has"],function(g){var f={};return function(){for(var e,d=arguments,b=0;b<d.length;b++)if(e=d[b],!f[e]){f[e]=!0;var a=e.match(/^(no-)?(.+?)((-[\d\.]+)(-[\d\.]+)?)?$/),c=g(a[2]),
h=-a[4];if((0<h?h<=c&&(-a[5]||h)>=c:!!c)==!a[1])document.documentElement.className+=" has-"+e}}})},"dgrid/tree":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/Deferred dojo/query dojo/on dojo/aspect ./util/has-css3 ./Grid ./util/touch put-selector/put".split(" "),function(g,f,e,d,b,a,c,h,k,l){function m(a,c,h,k){k=this.grid.isRTL?"right":"left";var b=".dgrid-expando-icon";c&&(b+=".ui-icon.ui-icon-triangle-1-"+(h?"se":"e"));a=l("div"+b+"[style\x3dmargin-"+k+": "+a*(this.indentWidth||
9)+"px; float: "+k+"]");a.innerHTML="\x26nbsp;";return a}function p(a){var c=this,h=this.style.height;h&&(this.style.display="0px"==h?"none":"block");a&&(l(this,".dgrid-tree-resetting"),setTimeout(function(){l(c,"!dgrid-tree-resetting")}));this.style.height=""}function n(n){var g=n.renderCell||h.defaultRenderCell,s,t;n||(n={});n.shouldExpand=n.shouldExpand||function(a,c,h){return h};a.after(n,"init",function(){var h=n.grid,g=".dgrid-content .dgrid-column-"+n.id,r=[];h.cleanEmptyObservers=!1;if(!h.store)throw Error("dgrid tree column plugin requires a store to operate.");
n.renderExpando||(n.renderExpando=m);r.push(h.on(n.expandOn||".dgrid-expando-icon:click,"+g+":dblclick,"+g+":keydown",function(a){var c=h.row(a);(!h.store.mayHaveChildren||h.store.mayHaveChildren(c.data))&&(("keydown"!=a.type||32==a.keyCode)&&!("dblclick"==a.type&&t&&1<t.count&&c.id==t.id&&-1<a.target.className.indexOf("dgrid-expando-icon")))&&h.expand(c);-1<a.target.className.indexOf("dgrid-expando-icon")&&(t&&t.id==h.row(a).id?t.count++:t={id:h.row(a).id,count:1})}));c("touch")&&r.push(h.on(k.selector(g,
k.dbltap),function(){h.expand(this)}));h._expanded||(h._expanded={});r.push(a.after(h,"insertRow",function(a){var c=this.row(a);n.shouldExpand(c,s,this._expanded[c.id])&&this.expand(a,!0,!0);return a}));r.push(a.before(h,"removeRow",function(a,c){var k=a.connected;k&&(d("\x3e.dgrid-row",k).forEach(function(a){h.removeRow(a,!0)}),c||l(k,"!"))}));n.collapseOnRefresh&&r.push(a.after(h,"cleanup",function(){this._expanded={}}));h._calcRowHeight=function(a){var c=a.connected;return a.offsetHeight+(c?c.offsetHeight:
0)};h.expand=function(a,k,f){var m=a.element?a:h.row(a),g=c("transitionend");a=new e;var r=a.promise;a.resolve();a=m.element;a=-1<a.className.indexOf("dgrid-expando-icon")?a:d(".dgrid-expando-icon",a)[0];f=f||!1===n.enableTransitions;if(a&&a.mayHaveChildren&&(f||k!==!!this._expanded[m.id])){var s=void 0===k?!this._expanded[m.id]:k;l(a,".ui-icon-triangle-1-"+(s?"se":"e")+"!ui-icon-triangle-1-"+(s?"e":"se"));k=m.element;var t=k.connected,w,v,G={originalQuery:this.query};if(!t){var t=G.container=k.connected=
l(k,"+div.dgrid-tree-container"),N=function(a){return h.store.getChildren(m.data,a)};n.allowDuplicates&&(G.parentId=m.id);"level"in a&&(N.level=a.level);r=r.then(function(){if(h.renderQuery)return h.renderQuery(N,G);var a=l(t,"div"),c=h.renderArray(N(G),a,"level"in N?{queryLevel:N.level}:{});e.when(c,function(){l(a,"!")});return c});g?b(t,g,p):p.call(t)}t.hidden=!s;w=t.style;!g||f?(w.display=s?"block":"none",w.height=""):(s?(w.display="block",v=t.scrollHeight,w.height="0px"):(l(t,".dgrid-tree-resetting"),
w.height=t.scrollHeight+"px"),setTimeout(function(){l(t,"!dgrid-tree-resetting");w.height=s?v?v+"px":"auto":"0px"}));s?this._expanded[m.id]=!0:delete this._expanded[m.id]}return r};a.after(n,"destroy",function(){f.forEach(r,function(a){a.remove()});delete h.expand;delete h._calcRowHeight})});n.renderCell=function(a,c,h,k){var b=n.grid,d=Number(k&&k.queryLevel)+1,e=!b.store.mayHaveChildren||b.store.mayHaveChildren(a),f=k.parentId,d=s=isNaN(d)?0:d,b=n.renderExpando(d,e,b._expanded[(f?f+"-":"")+b.store.getIdentity(a)],
a);b.level=d;b.mayHaveChildren=e;(a=g.call(n,a,c,h,k))&&a.nodeType?(l(h,b),l(h,a)):h.insertBefore(b,h.firstChild)};return n}n.defaultRenderExpando=m;return n})},"dgrid/Grid":function(){define("dojo/_base/kernel dojo/_base/declare dojo/on dojo/has put-selector/put ./List ./util/misc dojo/_base/sniff".split(" "),function(g,f,e,d,b,a,c){function h(a,c){c&&c.nodeType&&a.appendChild(c)}function k(a,c,h,k){if(this.formatter){k=this.formatter;var b=this.grid.formatterScope;h.innerHTML="string"===typeof k&&
b?b[k](c,a):this.formatter(c,a)}else null!=c&&h.appendChild(document.createTextNode(c))}var l=8>d("ie")&&!d("quirks");f=f(a,{columns:null,cellNavigation:!0,tabableHeader:!0,showHeader:!0,column:function(a){return"object"!=typeof a?this.columns[a]:this.cell(a).column},listType:"grid",cell:function(a,c){if(a.column&&a.element)return a;a.target&&a.target.nodeType&&(a=a.target);var h;if(a.nodeType){do{if(this._rowIdToObject[a.id])break;var k=a.columnId;if(k){c=k;h=a;break}a=a.parentNode}while(a&&a!=this.domNode)
}if(!h&&"undefined"!=typeof c){var b=this.row(a);if(k=b&&b.element)for(var k=k.getElementsByTagName("td"),d=0;d<k.length;d++)if(k[d].columnId==c){h=k[d];break}}if(null!=a)return{row:b||this.row(a),column:c&&this.column(c),element:h}},createRowCells:function(a,h,k,e){var f=b("table.dgrid-row-table[role\x3dpresentation]"),g=9>d("ie")||d("quirks")?b(f,"tbody"):f,t,u,v,w,x,y,B,D,E,F;k=k||this.subRows;u=0;for(v=k.length;u<v;u++){y=k[u];t=b(g,"tr");y.className&&b(t,"."+y.className);w=0;for(x=y.length;w<
x;w++){B=y[w];D=B.id;E=B.field?".field-"+c.escapeCssIdentifier(B.field,"-"):"";(F="function"===typeof B.className?B.className(e):B.className)&&(E+="."+F);E=b(a+(".dgrid-cell.dgrid-cell-padding"+(D?".dgrid-column-"+c.escapeCssIdentifier(D,"-"):"")+E.replace(/ +/g,"."))+"[role\x3d"+("th"===a?"columnheader":"gridcell")+"]");E.columnId=D;l?(D=b(E,"!dgrid-cell-padding div.dgrid-cell-padding"),E.contents=D):D=E;if(F=B.colSpan)E.colSpan=F;if(F=B.rowSpan)E.rowSpan=F;h(D,B);t.appendChild(E)}}return f},left:function(a,
c){a.element||(a=this.cell(a));return this.cell(this._move(a,-(c||1),"dgrid-cell"))},right:function(a,c){a.element||(a=this.cell(a));return this.cell(this._move(a,c||1,"dgrid-cell"))},renderRow:function(a,c){var d=this.createRowCells("td",function(b,d){var e=a;d.get?e=d.get(a):"field"in d&&"_item"!=d.field&&(e=e[d.field]);d.renderCell?h(b,d.renderCell(a,e,b,c)):k.call(d,a,e,b,c)},c&&c.subRows,a);return b("div[role\x3drow]\x3e",d)},renderHeader:function(){var a=this,c=this.headerNode,k=c.childNodes.length;
for(c.setAttribute("role","row");k--;)b(c.childNodes[k],"!");k=this.createRowCells("th",function(a,c){var k=c.headerNode=a;l&&(a=a.parentNode);var b=c.field;b&&(a.field=b);if(c.renderHeaderCell)h(k,c.renderHeaderCell(k));else if("label"in c||c.field)k.appendChild(document.createTextNode("label"in c?c.label:c.field));!1!==c.sortable&&(b&&"_item"!=b)&&(a.sortable=!0,a.className+=" dgrid-sortable")},this.subRows&&this.subRows.headerRows);this._rowIdToObject[k.id=this.id+"-header"]=this.columns;c.appendChild(k);
this._sortListener&&this._sortListener.remove();this._sortListener=e(k,"click,keydown",function(h){if("click"==h.type||32==h.keyCode||!d("opera")&&13==h.keyCode){var k=h.target,b,l,f;do if(k.sortable){f=[{attribute:b=k.field||k.columnId,descending:(l=a._sort[0])&&l.attribute==b&&!l.descending}];b={bubbles:!0,cancelable:!0,grid:a,parentType:h.type,sort:f};e.emit(h.target,"dgrid-sort",b)&&(a._sortNode=k,a.set("sort",f));break}while((k=k.parentNode)&&k!=c)}})},resize:function(){var a=this.headerNode.firstChild,
c=this.contentNode,h;this.inherited(arguments);if(!d("ie")||7<d("ie")&&!d("quirks"))if(c.style.width="",c&&a&&(h=a.offsetWidth)!=c.offsetWidth)c.style.width=h+"px"},destroy:function(){this._destroyColumns();this._sortListener&&this._sortListener.remove();this.inherited(arguments)},_setSort:function(a,c){this.inherited(arguments);this.updateSortArrow(this._sort)},_findSortArrowParent:function(a){var c=this.columns,h;for(h in c){var k=c[h];if(k.field==a)return k.headerNode}},updateSortArrow:function(a,
c){this._lastSortedArrow&&(b(this._lastSortedArrow,"\x3c!dgrid-sort-up!dgrid-sort-down"),b(this._lastSortedArrow,"!"),delete this._lastSortedArrow);c&&(this._sort=a);if(a[0]){var h=a[0].attribute,k=a[0].descending,h=this._sortNode||this._findSortArrowParent(h),d;delete this._sortNode;h&&(h=h.contents||h,d=this._lastSortedArrow=b("div.dgrid-sort-arrow.ui-icon[role\x3dpresentation]"),d.innerHTML="\x26nbsp;",h.insertBefore(d,h.firstChild),b(h,k?".dgrid-sort-down":".dgrid-sort-up"),this.resize())}},styleColumn:function(a,
h){return this.addCssRule("#"+c.escapeCssIdentifier(this.domNode.id)+" .dgrid-column-"+c.escapeCssIdentifier(a,"-"),h)},_configColumns:function(a,h){var k=[],b=h instanceof Array;c.each(h,function(c,d){"string"==typeof c&&(h[d]=c={label:c});!b&&!c.field&&(c.field=d);d=c.id=c.id||(isNaN(d)?d:a+d);this._configColumn&&(this._configColumn(c,d,h,a),d=c.id);b&&(this.columns[d]=c);c.grid=this;"function"===typeof c.init&&c.init();k.push(c)},this);return b?h:k},_destroyColumns:function(){var a=this.subRows,
c=a&&a.length,h,k,b,d;this.cleanup();for(h=0;h<c;h++){k=0;for(d=a[h].length;k<d;k++)b=a[h][k],"function"===typeof b.destroy&&b.destroy()}},configStructure:function(){var a=this.subRows,c=this._columns=this.columns;this.columns=!c||c instanceof Array?{}:c;if(a)for(c=0;c<a.length;c++)a[c]=this._configColumns(c+"-",a[c]);else this.subRows=[this._configColumns("",c)]},_getColumns:function(){return this._columns||this.columns},_setColumns:function(a){this._destroyColumns();this.subRows=null;this.columns=
a;this._updateColumns()},_setSubRows:function(a){this._destroyColumns();this.subRows=a;this._updateColumns()},setColumns:function(a){g.deprecated("setColumns(...)",'use set("columns", ...) instead',"dgrid 0.4");this.set("columns",a)},setSubRows:function(a){g.deprecated("setSubRows(...)",'use set("subRows", ...) instead',"dgrid 0.4");this.set("subRows",a)},_updateColumns:function(){this.configStructure();this.renderHeader();this.refresh();this._lastCollection&&this.renderArray(this._lastCollection);
this._started&&(this._sort&&this._sort.length?this.updateSortArrow(this._sort):this.resize())}});f.appendIfNode=h;f.defaultRenderCell=k;return f})},"xstyle/core/load-css":function(){define([],function(){function g(a){if(d.createStyleSheet){var c=d.createStyleSheet();c.cssText=a;return c.owningElement}c=d.createElement("style");c.setAttribute("type","text/css");c.appendChild(d.createTextNode(a));b.insertBefore(c,b.firstChild);return c}function f(a,c,h){var k=e[a];if(k)return l=g(k),c(l);var l=d.createElement("link");
l.type="text/css";l.rel="stylesheet";l.href=a;var f=!h||!1!==h.wait;a=(a=navigator.userAgent.match(/AppleWebKit\/(\d+\.?\d*)/))&&+a[1];if(null===l.onload&&!(536>a))l.onload=function(){l.onload=null;l.onerror=null;f&&c(l)},l.onerror=function(){f&&c(l)};else if(f)var p=setInterval(function(){l.style&&(clearInterval(p),c(l))},15);(b||d.getElementsByTagName("head")[0]).appendChild(l);f||c(l)}var e="undefined"==typeof _css_cache?{}:_css_cache,d=document,b=d.head;f.insertCss=g;return f})},"MOTW/layout/LayoutConfigTouch":function(){define(["dojo/_base/declare",
"./LayoutConfig"],function(g,f){return g([f],{getNextFocusableModule:function(e){return{}[e]}})})},"MOTW/layout/LayoutConfig":function(){define(["dojo/_base/declare"],function(g){return g(null,{getDefaultModuleConfig:function(){return{focusBorder:!1,enabled:!0,closable:!0}},getDefaultLayoutConfig:function(){return{layoutId:"root",containerType:"root",modules:[{layoutId:"motwDesktop",containerType:"border",style:"width:100%;height:100%;",modules:[{layoutId:"appWindowGroup",containerType:"appWindow",
region:"none",modules:[{layoutId:"appWindow",title:"MATLAB"},{layoutId:"mggPopup",title:"MATLAB","class":"mgg"}]},{layoutId:"dialog",containerType:"dialog",region:"none",modules:[{layoutId:"faultDialog",title:""},{layoutId:"messageDialog",title:""},{layoutId:"newDialog",title:"New"},{layoutId:"mggDialog",title:""}]},{layoutId:"webDdgNonModalDialog",containerType:"floatingPane",region:"none",title:"",modules:[{layoutId:"webDdgDialog",title:"",style:"position:absolute;width:500px;height:400px;visibility:visible;"}]},
{layoutId:"dockableFloatingPaneGroup",containerType:"dockableFloatingPane",title:"",region:"none",modules:[{layoutId:"mggFloatingPane",style:"position:absolute",title:"MATLAB",closable:!0},{layoutId:"iframeFloatingPane",style:"position:absolute",title:"MATLAB",closable:!0}]},{layoutId:"veNonModalDialog",containerType:"floatingPane",title:"Variable Editor",region:"none",modules:[{layoutId:"veDialogGroup",title:"",containerType:"tabgroup",focusOnTabChildren:!0,style:"position:absolute;width:500px;height:400px;visibility:visible;",
modules:[{layoutId:"vEditor",title:"Variable",closable:!0}]}]},{layoutId:"chNonModalDialog",containerType:"floatingPane",title:"Command History",region:"none",modules:[{layoutId:"historyContent",title:"",style:"position:absolute;width:300px;height:400px;visibility:visible;"}]},{layoutId:"inspectorNonModalDialog",containerType:"floatingPane",title:"Property Inspector",region:"none",modules:[{layoutId:"propertyInspector",style:"position:absolute;",title:""}]},{layoutId:"dockableInspectorNonModalDialog",
containerType:"dockableFloatingPane",title:"Property Inspector",region:"none",modules:[{layoutId:"propertyInspector",style:"position:absolute;",title:"",closable:!0}]},{layoutId:"rteNonModalFindDialog",containerType:"floatingPane",title:"Find \x26 Replace",region:"none",modules:[{layoutId:"rteFindDialog",title:"",style:"position:absolute;visibility:visible;"}]},{layoutId:"main",region:"center",title:"Center",containerType:"main",initialState:{left:{proportion:0.22,isCollapsed:!1,panels:[{panelId:"cfb",
collapsed:!1,portion:0.5},{panelId:"workspace",collapsed:!1,portion:0.5}]},bottom:{proportion:0.33,isCollapsed:!1}},modules:[{layoutId:"documents",title:"Documents",containerType:"document",typeInfo:{editorFile:{defaultRegion:"left",collectiveLabel:"Editor Files",willReopen:!0,plusActions:["motw.newFile","motw.newFunction","motw.newExample","motw.newClass"]},figure:{defaultRegion:"right",collectiveLabel:"Figures",willReopen:!0,plusActions:["motw.newFigure"]},variable:{defaultRegion:"right",collectiveLabel:"Variables",
willReopen:!0}},hasOwnFocusPolicy:!0,style:"height:50%;",splitter:!0,region:"center",collapsible:!0,minSize:120,modules:[{layoutId:"figure",title:"Figure",documentType:"figure",focusBorder:!0,focusUponShow:!1,closable:!0},{layoutId:"mggDocked",title:"Figure",documentType:"figure",focusBorder:!0,focusUponShow:!1,closable:!0,"class":"mgg"}]},{layoutId:"commandWindow",title:"Command Window",style:"height:50%;",focusBorder:!0,splitter:!0,region:"bottom",collapsible:!0,minSize:120,closable:!1}]},{layoutId:"footer",
region:"bottom",title:"Footer",style:"height:30px;"}]}]}},getNextFocusableModule:function(f){return{documents:"commandWindow"}[f]}})})},"MOTW/mgg/utils/_TouchEvents":function(){define("dojo/_base/declare dojo/_base/event dojo/_base/kernel dojo/_base/lang dojo/_base/window dojo/dom-geometry dojo/on dojo/touch".split(" "),function(g,f,e,d,b,a,c,h){return g([],{CONTEXT_MENU_TIMEOUT:1500,constructor:function(){this._mouseEvents=[];this._docEvents=[]},setupMouseEvents:function(k){this._mouseNode=k;this._mouseEvents.push(c(k,
h.press,d.hitch(this,this._onMouseDown)));this._mouseEvents.push(c(k,h.move,d.hitch(this,this._onMouseMove)));this._mouseEvents.push(c(k,h.cancel,d.hitch(this,this._onMouseOut)));this._mouseEvents.push(c(k,h.out,d.hitch(this,this._onMouseOut)));this._nodePos=a.position(this._mouseNode)},cleanupMouseEvents:function(){this._mouseEvents.forEach(function(a){a.remove()});this._mouseEvents=[];this.cleanupDocumentEvents();this._mouseNode=null},cleanupDocumentEvents:function(){this._docEvents.forEach(function(a){a.remove()});
this._docEvents=[]},duplicateEvent:function(a){return{offsetX:a.offsetX,offsetY:a.offsetY,pageX:a.pageX,pageY:a.pageY,layerX:a.layerX,layerY:a.layerY,altKey:a.altKey,ctrlKey:a.ctrlKey,shiftKey:a.shiftKey,metaKey:a.metaKey,button:a.button}},makeMouseEvent:function(c){var h={altKey:!1,ctrlKey:!1,shiftKey:!1,metaKey:!1,button:"right"===c.button?"right":"left",timestamp:Date.now()},b=0,d=0;if(c.pageX||c.pageY)b=c.pageX,d=c.pageY;else if(c.clientX||c.clientY)b=c.clientX+e.global.document.body.scrollLeft+
e.global.document.documentElement.scrollLeft,d=c.clientY+e.global.document.body.scrollTop+e.global.document.documentElement.scrollTop;this._nodePos=a.position(this._mouseNode);h.x=b-this._nodePos.x;h.y=d-this._nodePos.y;return this._lastEvent=h},getLastEvent:function(){return this._lastEvent},onDragStart:function(a){},onDrag:function(a){},onDragStop:function(a){},onMouseDown:function(a){},onMouseMove:function(a){},onMouseOut:function(a){},onMouseUp:function(a){},onMouseClick:function(a){},onMouseDoubleClick:function(a){},
_onMouseDown:function(a){f.stop(a);this._mouseDownTime=Date.now();this._lastMouseDownEvent=this.duplicateEvent(a);this._mouseDown=!0;if(!this.dragging){this._docEvents.push(c(e.global.document,h.over,d.hitch(f,f.stop)));this._docEvents.push(c(e.global.document,h.out,d.hitch(f,f.stop)));this._docEvents.push(c(e.global.document,h.enter,d.hitch(f,f.stop)));this._docEvents.push(c(e.global.document,h.cancel,d.hitch(f,f.stop)));this._docEvents.push(c(e.global.document,h.move,d.hitch(this,this._onDocumentMouseMove)));
this._docEvents.push(c(e.global.document,h.release,d.hitch(this,this._onDocumentMouseUp)));var l=this;this.contextMenuTimeout=setTimeout(function(){b.global.contextMenuPosition={x:l._lastMouseDownEvent.pageX,y:l._lastMouseDownEvent.pageY};l._lastMouseDownEvent.button="right";l.onMouseClick(l._lastMouseDownEvent);l._mouseDown=!1},this.CONTEXT_MENU_TIMEOUT)}},_onDocumentMouseMove:function(a){clearTimeout(this.contextMenuTimeout);this._mouseDown&&!this.dragging&&(this.dragging=!0,this.onDragStart(this._lastMouseDownEvent));
this.dragging&&(f.stop(a),this.onDrag(a))},_onDocumentMouseUp:function(a){clearTimeout(this.contextMenuTimeout);if(this.dragging||this._mouseDown){f.stop(a);this.dragging=!1;if(250>Date.now()-this._mouseDownTime)this.onMouseClick(a);this.onDragStop(a)}this.cleanupDocumentEvents();this._mouseDown=!1},_onMouseMove:function(a){clearTimeout(this.contextMenuTimeout);this._mouseDown&&!this.dragging&&(this.dragging=!0,this.onDragStart(this._lastMouseDownEvent));this.dragging&&(f.stop(a),this.onDrag(a))},
_onMouseOut:function(a){clearTimeout(this.contextMenuTimeout);if(!this.dragging)this.onMouseOut(a);this._mouseDown=!1}})})},"dijit/form/DropDownButton":function(){define("dojo/_base/declare dojo/_base/kernel dojo/_base/lang dojo/query ../registry ../popup ./Button ../_Container ../_HasDropDown dojo/text!./templates/DropDownButton.html ../a11yclick".split(" "),function(g,f,e,d,b,a,c,h,k,l){return g("dijit.form.DropDownButton",[c,h,k],{baseClass:"dijitDropDownButton",templateString:l,_fillContent:function(){var a=
this.srcNodeRef,c=this.containerNode;if(a&&c)for(;a.hasChildNodes();){var h=a.firstChild;h.hasAttribute&&(h.hasAttribute("data-dojo-type")||h.hasAttribute("dojoType")||h.hasAttribute("data-"+f._scopeName+"-type")||h.hasAttribute(f._scopeName+"Type"))?(this.dropDownContainer=this.ownerDocument.createElement("div"),this.dropDownContainer.appendChild(h)):c.appendChild(h)}},startup:function(){this._started||(!this.dropDown&&this.dropDownContainer&&(this.dropDown=b.byNode(this.dropDownContainer.firstChild),
delete this.dropDownContainer),this.dropDown&&a.hide(this.dropDown),this.inherited(arguments))},isLoaded:function(){var a=this.dropDown;return!!a&&(!a.href||a.isLoaded)},loadDropDown:function(a){var c=this.dropDown,h=c.on("load",e.hitch(this,function(){h.remove();a()}));c.refresh()},isFocusable:function(){return this.inherited(arguments)&&!this._mouseDown}})})},"dijit/form/ComboButton":function(){define("dojo/_base/declare dojo/keys ../focus ./DropDownButton dojo/text!./templates/ComboButton.html ../a11yclick".split(" "),
function(g,f,e,d,b){return g("dijit.form.ComboButton",d,{templateString:b,_setIdAttr:"",_setTabIndexAttr:["focusNode","titleNode"],_setTitleAttr:"titleNode",optionsTitle:"",baseClass:"dijitComboButton",cssStateNodes:{buttonNode:"dijitButtonNode",titleNode:"dijitButtonContents",_popupStateNode:"dijitDownArrowButton"},_focusedNode:null,_onButtonKeyDown:function(a){if(a.keyCode==f[this.isLeftToRight()?"RIGHT_ARROW":"LEFT_ARROW"])e.focus(this._popupStateNode),a.stopPropagation(),a.preventDefault()},_onArrowKeyDown:function(a){if(a.keyCode==
f[this.isLeftToRight()?"LEFT_ARROW":"RIGHT_ARROW"])e.focus(this.titleNode),a.stopPropagation(),a.preventDefault()},focus:function(a){this.disabled||e.focus("start"==a?this.titleNode:this._popupStateNode)}})})},"dijit/PopupMenuItem":function(){define("dojo/_base/declare dojo/dom-style dojo/_base/lang dojo/query ./popup ./registry ./MenuItem ./hccss".split(" "),function(g,f,e,d,b,a,c){return g("dijit.PopupMenuItem",c,{baseClass:"dijitMenuItem dijitPopupMenuItem",_fillContent:function(){if(this.srcNodeRef){var a=
d("*",this.srcNodeRef);this.inherited(arguments,[a[0]]);this.dropDownContainer=this.srcNodeRef}},_openPopup:function(a,c){var d=this.popup;b.open(e.delegate(a,{popup:this.popup,around:this.domNode}));c&&d.focus&&d.focus()},_closePopup:function(){b.close(this.popup);this.popup.parentMenu=null},startup:function(){if(!this._started){this.inherited(arguments);if(!this.popup){var c=d("[widgetId]",this.dropDownContainer)[0];this.popup=a.byNode(c)}this.ownerDocumentBody.appendChild(this.popup.domNode);this.popup.domNode.setAttribute("aria-labelledby",
this.containerNode.id);this.popup.startup();this.popup.domNode.style.display="none";this.arrowWrapper&&f.set(this.arrowWrapper,"visibility","");this.focusNode.setAttribute("aria-haspopup","true")}},destroyDescendants:function(a){this.popup&&(this.popup._destroyed||this.popup.destroyRecursive(a),delete this.popup);this.inherited(arguments)}})})},"dijit/CheckedMenuItem":function(){define(["dojo/_base/declare","dojo/dom-class","./MenuItem","dojo/text!./templates/CheckedMenuItem.html","./hccss"],function(g,
f,e,d){return g("dijit.CheckedMenuItem",e,{baseClass:"dijitMenuItem dijitCheckedMenuItem",templateString:d,checked:!1,_setCheckedAttr:function(b){this.domNode.setAttribute("aria-checked",b?"true":"false");this._set("checked",b)},iconClass:"",role:"menuitemcheckbox",checkedChar:"\x26#10003;",onChange:function(){},_onClick:function(b){this.disabled||(this.set("checked",!this.checked),this.onChange(this.checked));this.onClick(b)}})})},"dijit/MenuSeparator":function(){define("dojo/_base/declare dojo/dom ./_WidgetBase ./_TemplatedMixin ./_Contained dojo/text!./templates/MenuSeparator.html".split(" "),
function(g,f,e,d,b,a){return g("dijit.MenuSeparator",[e,d,b],{templateString:a,buildRendering:function(){this.inherited(arguments);f.setSelectable(this.domNode,!1)},isFocusable:function(){return!1}})})},"dijit/layout/AccordionPane":function(){define(["dojo/_base/declare","dojo/_base/kernel","./ContentPane"],function(g,f,e){return g("dijit.layout.AccordionPane",e,{constructor:function(){f.deprecated("dijit.layout.AccordionPane deprecated, use ContentPane instead","","2.0")},onSelected:function(){}})})},
"variableeditor/ClientPeerManagerFactory":function(){define("variableeditor/ClientPeerManagerFactory",["variableeditor/ClientPeerManager","variableeditor/VariableEditorUtils","dojo/topic"],function(g,f,e){function d(){c||(c=new g({channel:"/VariableEditorManager"}),h[c.channel]=c,c.manager.addEventListener("rootSet",function(a){f.logDebug("VE: Factory Root Set");var c=a.target;a=c.getProperty("Debug");void 0!==a&&f.setDebug(a.Debug);c.addEventListener("propertySet",function(a){a.data&&a.data.key&&
"Managers"===a.data.key?f.logDebug("VE: Factory Managers Updated"):a.data&&(a.data.key&&"Debug"===a.data.key)&&f.setDebug(a.data.newValue.Debug)});c.addEventListener("peerEvent",function(a){a.data.type&&"FactoryInitialized"===a.data.type?(f.logDebug("VE: Factory Initialized"),b()):a.data.type&&"ManagerCreated"===a.data.type?a.data.Channel&&(h[a.data.Channel]&&h[a.data.Channel].start&&h[a.data.Channel].autoStart)&&(h[a.data.Channel].start(),f.logDebug("VE: Factory Auto Starting Manager ("+a.data.Channel+
")")):a.data.type&&"log"===a.data.type&&a.data.message&&f.logDebug("VE: Server Log ("+a.data.message+")")});e.subscribe("variableeditor/isDebug",function(a){var h=c.getProperty("Debug");a&&(void 0!==a.Debug&&h&&a.Debug!==h.Debug)&&c.setProperty("Debug",{Debug:a.Debug,Source:"client"})});c&&(c.getProperty("Initialized")&&c.getProperty("Initialized").Initialized)&&b()}));return c}function b(){c&&c.getRoot()&&(k.forEach(function(a,h,k){h=c.getRoot();f.logDebug("VE: Factory Create Manager From Queue ("+
a.channel+")");h.dispatchEvent("peerEvent",h,a)}),k=[])}function a(a){a&&!a.isError&&(l=!0,b())}var c,h={},k=[],l=!1,m=0;return{createManager:function(a){d();a.channel||(m+=1,a.channel="/VE_"+m);if(h&&h[a.channel]&&!a.forceNewManager)return h[a.channel];var c=h,b=a.channel,e;if(a){var l=d();a.manager&&(l=a.manager);e=a.channel;var f=a.ignoreUpdates||!1;l||(l=d());(l=l.getRoot())?l.dispatchEvent("peerEvent",l,{type:"CreateManager",channel:e,ignoreUpdates:f||!1}):k.push({type:"CreateManager",channel:e,
ignoreUpdates:f||!1});e=new g(a)}else e=null;c[b]=e;return h[a.channel]},deleteManager:function(a){if(!a&&a.channel)return null;var c=d(),b=a.channel;c||(c=d());(c=c.getRoot())?c.dispatchEvent("peerEvent",c,{type:"DeleteManager",channel:b}):k.push({type:"DeleteManager",channel:b});h[a.channel]=null},start:function(c){c?f.runFactoryInitInMATLAB("internal.matlab.variableeditor.peer.PeerManagerFactory.startup",a):l=!0;d().start()},isStarted:function(){return l}}})},"variableeditor/ClientPeerManager":function(){define("variableeditor/ClientPeerManager",
"dojo/_base/declare dojo/_base/connect mw-peermodel/PeerModelManager mw-peermodel/Observable datatoolsservices/ActionService/ActionDataServiceFactory datatoolsservices/ContextMenuService/ContextMenuManager variableeditor/ClientPeerDocument variableeditor/ContextUpdateManager variableeditor/VariableEditorUtils datatoolsservices/DataToolsUtils dojo/topic mw-log/Log".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p){var n="";return g("variableeditor.ClientPeerManager",[d.Impl],{constructor:function(a){this.channel=
"/VariableEditorManager";this.editable=!0;this.cssSpecifier="mw_type_VariableEditorTable";this.defaultContextId="variable";a&&(this.messageService=a.messageService,this.executionService=a.executionService,this.helpDataService=a.helpDataService,this.channel=a.channel||"/VariableEditorManager",this.editable=void 0===a.editable?!0:a.editable,this.ignoreUpdates=void 0===a.ignoreUpdates?!1:a.ignoreUpdates,this.cssSpecifier=a.cssSpecifier||"mw_type_VariableEditorTable",this.allArgs=a,this.autoStart=void 0===
a.autoStart?!0:a.autoStart);this.topicBase="/ML/"+this.channel;this.allArgs.topicBase=this.topicBase;this.contextUpdateChannel=this.allArgs.contextUpdateChannel=this.topicBase+"/ContextUpdate";this.contextId=this.allArgs.contextId="VariableEditor";f.subscribe("/nonModalDialogClose",this,"purgeAll");this.manager=e.getInstance(this.channel);this.peerDocuments=[];this.variableListeners=[];this.hasFocus=!1;this.contextUpdateManager=this.contextMenuManager=this.actionDataService=this.focusedDocument=null;
this.contextNameSpace=this.actionNameSpace="";this.managerListeners=[];this._init()},_addDocument:function(a){try{if(a.hasProperty("docID")){this.contextUpdateManager||(this.contextUpdateManager=new h({defaultContextId:this.defaultContextId,contextId:this.contextId,contextUpdateChannel:this.contextUpdateChannel,managerChannel:this.channel}));this.allArgs=l.mergeObjects(this.allArgs,{documentNode:a,rootNode:a&&a.getRoot?a.getRoot():void 0,clientPeerManager:this});var k=a.hasProperty("userContext")?
a.getProperty("userContext"):null;if(k&&"string"===typeof k&&"{"===k.charAt(0))try{k=JSON.parse(a.getProperty("userContext"))}catch(b){p.error(b),p.error(b.stack)}a.getProperty("docID")&&this.peerDocuments[a.getProperty("docID")]?this.peerDocuments[a.getProperty("docID")].init(this.allArgs):k&&k.veTempID&&this.peerDocuments[k.veTempID]?(this.peerDocuments[a.getProperty("docID")]=this.peerDocuments[k.veTempID],this.peerDocuments[a.getProperty("docID")].init(this.allArgs),delete this.peerDocuments[k.veTempID]):
this.peerDocuments[a.getProperty("docID")]=new c(this.allArgs);this.dispatchEvent("variableAdded",this,{peerDoc:this.peerDocuments[a.getProperty("docID")]})}else p.error("Variable Editor Peer Document missing docID properties in childAdded")}catch(d){p.error(d),p.error(d.stack)}},_init:function(){var a=this;this.manager.addEventListener("rootSet",function(c){c=c.target;a.dispatchEvent("managerReady",a,{peerManager:a});c.addEventListener("childAdded",function(c){a._addDocument(c.data.child)});if(c.getChildren&&
0<c.getChildren().length)for(var h=0;h<c.getChildren().length;h+=1){var k=c.getChildren()[h];a._addDocument(k)}c.addEventListener("childRemoved",function(c){if(c.data.child.hasProperty("docID")){c=c.data.child.getProperty("docID");var h=a.peerDocuments[c];delete a.peerDocuments[c];a.dispatchEvent("variableRemoved",a,{peerDoc:h})}else p.error("Variable Editor Peer Document missing docID properties in childRemoved")});c.addEventListener("peerEvent",function(a){a.data.type&&"errormsg"===a.data.type&&
(a.data.message?l.displayErrorMessage(a.data.message):p.warn("VE Server error with no message."))});c.addEventListener("propertySet",function(c){a._handlePropertySet(c)},c);a._initializeExistingProperties(c)})},_initializeExistingProperties:function(a){if(a.hasProperty("ActionsInitialized")&&!this.actionDataService){var c=a.getProperty("ActionsInitialized");this._initActionService(c.ActionsInitialized,"ActAsClient")}a.hasProperty("ContextMenuInitialized")&&!this.contextMenuManager&&(c=a.getProperty("ContextMenuInitialized"),
this._initContextMenuManager(c.ContextMenuInitialized,"ActAsClient"));a.hasProperty("HasFocus")&&(this.hasFocus=!0)},getRoot:function(){return this.manager.getRoot()},_initActionService:function(a,c){this.actionNameSpace=a;this.actionDataService=b.getInstance({nameSpace:a,mode:c});this.allArgs.actionDataService=this.actionDataService;this.actionDataServiceAdded()},actionDataServiceAdded:function(){},_initContextMenuManager:function(c,h){this.contextNameSpace=c;this.contextMenuManager=new a({namespace:c,
mode:h,contextAppID:this.channel})},_handlePropertySet:function(a){if(!a.data||!a.data.newValue||!(a.data.newValue.Source&&"server"!==a.data.newValue.Source)){if("ActionsInitialized"===a.data.key&&!this.actionDataService)namespace=a.data.newValue,namespace.ActionsInitialized&&(namespace=namespace.ActionsInitialized),this._initActionService(namespace,"ActAsClient");else if("ContextMenuInitialized"===a.data.key&&!this.contextMenuManager)contextnamespace=a.data.newValue,contextnamespace.ContextMenuInitialized&&
(contextnamespace=contextnamespace.ContextMenuInitialized),this._initContextMenuManager(contextnamespace,"ActAsClient");else if("HasFocus"===a.data.key){var c=a.data.newValue;void 0!==c.HasFocus&&(this.hasFocus=c.HasFocus,this.dispatchEvent("managerFocusChanged",this,{peerManager:this,hasFocus:this.hasFocus}))}else if("FocusedDocument"===a.data.key)if((a=a.data.newValue.FocusedDocument)&&this.peerDocuments){for(c in this.peerDocuments)if(this.peerDocuments.hasOwnProperty(c)&&this.peerDocuments[c].varDocID===
a){this.focusedDocument=this.peerDocuments[c];break}this.dispatchEvent("variableFocusGained",this,{peerDoc:this.focusedDocument})}else this.focusedDocument&&this.dispatchEvent("variableFocusLost",this,{peerDoc:this.focusedDocument}),this.focusedDocument=null;this.hasFocus&&(this.focusedDocument&&this.focusedDocument.focus)&&this.focusedDocument.focus()}},setFocusedDocument:function(a){this.focusedDocument=a;this.hasFocus||(n!==a.clientPeerManager.channel&&(m.publish("/datatools/selectionChanged",
""),n=a.clientPeerManager.channel),this.manager.getRoot().setProperty("HasFocus",{HasFocus:!0,Source:"client",Channel:this.manager.channel,Document:a.varName}));this.manager.getRoot().setProperty("FocusedDocument",{HasFocus:!0,Source:"client",Channel:this.manager.channel,Document:a.varDocID});this.hasFocus=!0;this.dispatchEvent("managerFocusChanged",this,{peerManager:this,hasFocus:!0})},removeFocusedDocument:function(a){this.focusedDocument===a&&(this.focusedDocument=[],this.hasFocus&&this.manager.getRoot().setProperty("HasFocus",
{HasFocus:!1,Source:"client",Channel:this.manager.channel,Document:a.varName}),this.hasFocus=!1,this.dispatchEvent("managerFocusChanged",this,{peerManager:this,hasFocus:!1}))},openDocument:function(a,h){k.logDebug("VE: Open Document");if(this.peerDocuments[a])return this.peerDocuments[a];var b=null,b=new c(h);return this.peerDocuments[a]=b},openVariable:function(a,h,b,d){k.logDebug("VE: Open Variable");var e=null;if(!this.ignoreUpdates)for(var l in this.peerDocuments)if(this.peerDocuments.hasOwnProperty(l)){var f=
this.peerDocuments[l];a===f.varName&&(e=f)}e||(e=new c,e.varName=a,this._lastTempID||(this._lastTempID=1),this._lastTempID+=1,e.tempID="_temp_id_"+this._lastTempID,this.peerDocuments[e.tempID]=e);l=h||{};l.veTempID=e.tempID;h=this.manager.getRoot();a={type:"OpenVariable",variable:a,userContext:l};b&&(a.value=b);d&&(a.workspace=d);h&&h.dispatchEvent("peerEvent",h,a);return e},closeVariable:function(a){k.logDebug("VE: Close Variable");var c=this.manager.getRoot();c.dispatchEvent("peerEvent",c,{type:"RemoveDocument",
variable:a,userContext:this.userContext})},closeAllVariables:function(){k.logDebug("VE: Close All Variables");var a=this.manager.getRoot();a.dispatchEvent("peerEvent",a,{type:"CloseAll",userContext:this.userContext})},purgeAll:function(){this.closeFcn()},start:function(){this.manager.setSyncEnabled(!0)},stop:function(){this.manager.setSyncEnabled(!1);var a=this.manager.getRoot();a&&a.destroy&&a.destroy()},destroy:function(){this.inherited(arguments);var a=this;require(["variableeditor/ClientPeerManagerFactory"],
function(c){c.deleteManager(a)})}})})},"datatoolsservices/ActionService/ActionDataServiceFactory":function(){define("datatoolsservices/ActionService/ActionDataServiceFactory",["dojo/_base/declare","datatoolsservices/ActionService/ActionDataServiceProvider"],function(g,f){var e={};return{getInstance:function(d){var b=null,a=d.nameSpace;e[a]?b=e[a]:(b=new f(d),e[a]=b);return b}}})},"datatoolsservices/ActionService/ActionDataServiceProvider":function(){define("datatoolsservices/ActionService/ActionDataServiceProvider",
["dojo/_base/declare","datatoolsservices/ActionService/Action","mw-actiondataservice/ActionDataService"],function(g,f,e){return g("datatoolsservices.ActionService.ActionDataServiceProvider",[e],{constructor:function(d){this.allArgs=d;this._actionMap={}},onActionRemove:function(d){(d=d.id)&&this._actionMap[d]&&delete this._actionMap[d]},onChildAdd:function(d){var b=d.data.child,a=null,c={};if(b){c=b.getProperties();b.hasProperty("id")||b.setProperty("id",b.getId());var a=new f(c),h=this;a.execute=
function(c){h.executeAction(a.getProperty("id"),c)};this._actionMap[b.getProperty("id")]=a}this.inherited(arguments)},onActionChange:function(d){if(d.id&&this._actionMap[d.id]){var b=this._actionMap[d.id];b._updateProperty(d.key,d.newValue);var a="on"+d.key+"Change";if(b.hasOwnProperty(a)&&"function"===typeof b[a])b[a](d)}},getActionMap:function(){return this._actionMap},getAction:function(d){if(d)return this._actionMap[d]}})})},"datatoolsservices/ActionService/Action":function(){define("datatoolsservices/ActionService/Action",
["dojo/_base/declare","dojo/_base/lang"],function(g,f){return g("datatoolsservices.ActionService.Action",[],{constructor:function(e){this._actionProps={};e&&(this._actionProps=f.mixin({},e))},_updateProperty:function(e,d){e&&(this._actionProps[e]=d)},getProperty:function(e){if(this._actionProps&&this._actionProps.hasOwnProperty(e))return this._actionProps[e]}})})},"datatoolsservices/ContextMenuService/ContextMenuManager":function(){define("datatoolsservices/ContextMenuService/ContextMenuManager",
"dojo/_base/declare datatoolsservices/ContextMenuService/ContextMenuBuilder mw-menu/ContextMenu MW/uiframework/contextmanager/ContextManagerFactory datatoolsservices/ActionService/ActionDataServiceFactory mw-peermodel/PeerModelManager mw-peermodel/_PeerModelListenerMixin MW/uiframework/UIBuilderFactory".split(" "),function(g,f,e,d,b,a,c,h){return g("datatoolsservices.ContextMenuService.ContextMenuManager",[c],{constructor:function(a){a=a||{};this.mode=a.mode||"ActAsClient";this.namespace=a.namespace||
"/ContextMenuManager";this.contextAppID=a.contextAppID||"";this.previousContext="";this._cacheUpdated=!1;this.contextWatchHandle=null;this._contextMenuMap={};this._initProps={};this._startPeerModelService();this._initOnContextChange()},_initServices:function(){this.actionService=b.getInstance({mode:this.mode,nameSpace:this._initProps.actionNamespace});this.contextMenuBuilder=new f({actionService:this.actionService,namespace:this.namespace})},_startPeerModelService:function(){this._peerModelManager=
this._getPeerModelInstance(this.namespace);this.addManagerListeners(this._peerModelManager);this.start(this._peerModelManager);var a=this;this._peerModelManager.addEventListener("rootSet",function(c){var h=c.target;c=h.getProperty("actionNamespace");h=h.getProperty("queryString");a._initProps={actionNamespace:c,queryString:h};a._initServices()})},_initOnContextChange:function(){var a=this;this.contextWatchHandle=this._getDefaultContextManager().watch("currentContext",function(c,h,b){h=b.appId;"currentContext"===
c&&(h&&h===a.contextAppID)&&(!a._cacheUpdated&&a._peerModelManager)&&(c=a._peerModelManager.getRoot(),h=a._getPeerModelInstance(a._initProps.actionNamespace).getRoot(),c&&(0<c._children.length&&h)&&(a.createContextMenu(c),a.contextWatchHandle.unwatch()))})},createContextMenu:function(a){var c=this._initProps.queryString;this._contextMenuMap=this.contextMenuBuilder.constructMenuItems(a);this._contextMenu=new e({targetNodes:[c]});this._addContextMenuCallBack();this._cacheUpdated=!0},_addContextMenuCallBack:function(){var a=
this;this._contextMenu.willOpenCallback=function(){var c=a._getDefaultContextManager().get("currentContext"),h=c.contextIdList.toString();if(h!==a.previousContext){var b=a._contextMenu;b.hasChildren()&&b.getChildren().forEach(function(a){b.removeChild(a)});a._getMenuItemsForContext(c.contextIdList).forEach(function(a){b.addChild(a)});a.previousContext=h}}},_getDefaultContextManager:function(){var a=null;try{a=d.getInstance()}catch(c){}null===a&&"/WSBContextMenuManager"===this.namespace&&(h.getInstance({actionService:null}).create({tag:"motwToolstrip",
type:"Toolstrip"}),a=d.getInstance({parentAppId:"motw",toolstripTag:"motwToolstrip",toolstripId:"toolstripId",uiContainer:null,qabContextualControlsActionMap:{}}));return a},_getPeerModelInstance:function(c){var h=null;return h="ActAsServer"===this.mode?a.getServerInstance(c):a.getClientInstance(c)},_getMenuItemsForContext:function(a){var c=this._contextMenuMap[this.namespace],h=[],b;for(b in c)if(c.hasOwnProperty(b)&&c[b].MatchContext){var d=c[b].MatchContext.split(",");c[b].ExactMatch?("global"===
a[0]&&a.shift(),this.compareArrayValues(a,d)&&(h=h.concat(c[b].ContextMenuItems))):d.every(function(c){return-1<a.indexOf(c)})&&(h=h.concat(c[b].ContextMenuItems))}return h.slice()},destroy:function(){a.cleanup(this.namespace)},compareArrayValues:function(a,c){return!a||!c||a.length!==c.length?!1:a.every(function(a,h){var k=!1;c.forEach(function(c,h){a===c&&(k=!0)});return k})}})})},"datatoolsservices/ContextMenuService/ContextMenuBuilder":function(){define("datatoolsservices/ContextMenuService/ContextMenuBuilder",
"dojo/_base/declare dojo/_base/lang datatoolsservices/ContextMenuService/ActionMenuItem datatoolsservices/ContextMenuService/ActionPopupMenuItem mw-menu/Menu mw-menu/MenuSeparator dojo/on".split(" "),function(g,f,e,d,b,a,c){return g("datatoolsservices.ContextMenuService.ContextMenuBuilder",[],{constructor:function(a){this.actionService=a.actionService;this._contextMenuMap={};this._contextMap={};this.namespace=a.namespace},constructMenuItems:function(a){if(a)return this._contextMap[this.namespace]=
{},this.parseNodes(a),this._contextMap},parseNodes:function(a){var c=this;a.getChildren().forEach(function(b){var d=b.getType(),e=a.getProperty("ID"),n=b.getProperty("ID"),q=c._getContextMenuFromParent(e);"Action"===d?(b=c._constructSubMenuItem(b,a))&&q.push(b):"ActionGroup"===d?(c._createActionGroupItem(e,q,b),c.parseNodes(b)):"Context"===d?(c._contextMap[c.namespace][n]=f.mixin(b.getProperties(),{ContextMenuItems:[]}),c.parseNodes(b)):"MenuSeparator"===d&&c._createMenuSeparator(e,q)})},_createMenuSeparator:function(c,
k){var b=new a({tag:"ContextMenuSeparator"}),d=this._contextMenuMap[c];d&&d.popUpMenu?(d=d.popUpMenu.menu,this._isValidPosForSeparator(d.getChildren())&&d.addChild(b)):this._isValidPosForSeparator(k)&&k.push(b)},_isValidPosForSeparator:function(a){return 0<a.length&&"ContextMenuSeparator"!==a[a.length-1].Tag},_createActionGroupItem:function(a,c,b){var d=b.getProperty("ID"),e=this._contextMenuMap[a]?this._contextMenuMap[a].popUpMenu:null;this._contextMenuMap[d]={menuItems:c,popUpMenu:e};b.hasProperty("Expanded")&&
!b.getProperty("Expanded")&&(e=this._createPopUpMenuItem(b,a),(a=this._contextMenuMap[a])&&a.popUpMenu?a.popUpMenu.menu.addChild(e):c.push(e))},_createPopUpMenuItem:function(a){a=this._getNodeAttributes(a);var c=new b({}),c=new d({Id:a.menuId,text:a.displayName,action:a.menuAction,menu:c});return this._contextMenuMap[a.menuId].popUpMenu=c},_getContextMenuFromParent:function(a){var c=this._contextMap[this.namespace];if(c){if(c[a])return c[a].ContextMenuItems;if(this._contextMenuMap[a]&&this._contextMenuMap[a].menuItems)return this._contextMenuMap[a].menuItems}},
_constructSubMenuItem:function(a,c){var b=this._getNodeAttributes(a),d=c.getProperty("ID"),b=this._createMenu(b.menuId,b.displayName,b.menuAction);if(this._contextMenuMap[d]&&this._contextMenuMap[d].popUpMenu)this._contextMenuMap[d].popUpMenu.menu.addChild(b);else return b},_getNodeAttributes:function(a){var c=a.getProperty("ID");a=a.getProperty("DisplayName")||c;var b=this.actionService.getAction(c);return{menuId:c,displayName:a,menuAction:b}},_createMenu:function(a,c,b){c=new e({action:b,Id:a,text:c});
return this._contextMenuMap[a]=c}})})},"datatoolsservices/ContextMenuService/ActionMenuItem":function(){define("datatoolsservices/ContextMenuService/ActionMenuItem","dojo/_base/declare dojo/_base/lang mw-menu/MenuItem mw-menu/Menu mw-menu/MenuSeparator dojo/on".split(" "),function(g,f,e,d,b,a){return g("datatoolsservices.ContextMenuService.ActionMenuItem",[e],{constructor:function(a){this.allArgs=a},postCreate:function(a){this.inherited(arguments);if(this.action){this.on("click",f.hitch(this,"_executeMenuAction"));
var h=this;this.action.onenabledChange=function(a){h.disabled=!a.newValue;h._setStateClass();h._onEnabledStateChanged&&h._onEnabledStateChanged(a)};this.disabled=!this.action.getProperty("enabled")}this._setStateClass()},_executeMenuAction:function(a){(a=dijit.getEnclosingWidget(a.target))&&a.Id&&this.action.execute()}})})},"datatoolsservices/ContextMenuService/ActionPopupMenuItem":function(){define("datatoolsservices/ContextMenuService/ActionPopupMenuItem",["dojo/_base/declare","dojo/_base/lang",
"mw-menu/PopupMenuItem","dojo/on"],function(g,f,e,d){return g("datatoolsservices.ContextMenuService.ActionPopupMenuItem",[e],{constructor:function(b){this.allArgs=b},postCreate:function(){this.inherited(arguments);this._initActionsForMenu();this._setStateClass()},_initActionsForMenu:function(){var b=this;if(this.menu){var a=this.menu.addChild;this.menu.addChild=function(c){a.apply(this,[c]);b._ToggleActionGroupEnabled();c.action&&(c._onEnabledStateChanged=function(a){b._ToggleActionGroupEnabled()})}}},
_ToggleActionGroupEnabled:function(){var b=this.menu;if(b&&0<b.getChildren().length){for(var b=b.getChildren(),a=!1,c=0;c<b.length;c++)if(b[c].action&&b[c].action.getProperty("enabled")){a=!0;break}this.disabled=!a;this._setStateClass()}}})})},"variableeditor/ClientPeerDocument":function(){define("variableeditor/ClientPeerDocument","dojo/_base/declare dojo/_base/lang dijit/_TemplatedMixin dijit/layout/ContentPane variableeditor/VariableEditorUtils datatoolsservices/DataToolsUtils variableeditor/ContextPublishingUtils variableeditor/_ArgumentsMixin mw-peermodel/Observable mw-log/Log dijit/focus dojo/aspect dojo/dom dojo/dom-construct dojo/dom-class dojo/query dojo/dom-geometry dojo/Deferred dojo/topic mw-browser-utils/BrowserUtils dojo/on variableeditor/views/SummaryBar datatoolsservices/CmdLineCodePublishService dojo/text!variableeditor/ClientPeerDocument.html".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x,y,B,D){return g("variableeditor.ClientPeerDocument",[d,h,e,k.Impl],{allArgs:{},varName:"",varDocID:"",userContext:{},clientPeerView:null,viewListeners:[],clientPeerManager:[],dataTagRoot:"",resizeBehaviour:"default",summaryBar:null,showSummaryBar:!0,templateString:D,varSize:"",varType:"",varSecondaryType:"",varSecondaryStatus:"",requestFocusOnStart:!0,cmdLineCodePublishSvc:null,cmdLineCodeEnabled:!1,constructor:function(a){this.allArgs={};this.userContext=
{};this.clientPeerView=null;this.viewListeners=[];this.clientPeerManager=[];this.varType=this.varSize=this.varName=this.dataTagRoot="";this.init(a)},init:function(h){if(h&&(this.allArgs=h,this.contextChannel=h.contextUpdateChannel||"",this.currentContext=h.contextId||"",this.setArgument("documentNode",this.allArgs),this.setArgument("rootNode",this.allArgs),this.setArgument("executionService",this.allArgs),this.allArgs.resizeBehaviour||(this.allArgs.resizeBehaviour=this.resizeBehaviour),this.setArgumentWithDefault("editable",
this.allArgs,!0),this.setArgumentWithDefault("resizeBehaviour",this.allArgs,"default"),this.setArgumentWithDefault("requestFocusOnStart",this.allArgs,!0),this.setArgumentWithDefault("showSummaryBar",this.allArgs,!0),this.setArgumentWithDefault("cssSpecifier",this.allArgs,""),this.setArgumentWithDefault("userContext",this.allArgs,{}),this.setArgumentWithDefault("clientPeerManager",this.allArgs,{}),this.setArgumentWithDefault("dataTagRoot",this.allArgs,""),h.rootNode&&h.rootNode.getProperty)){var k=
h.rootNode.getProperty("VECmdLineCodeGenEnabled");this.cmdLineCodeEnabled=k&&k.VECmdLineCodeGenEnabled?k.VECmdLineCodeGenEnabled:!1;h.rootNode.addEventListener("propertySet",f.hitch(this,"_handleRootPropertySet"))}var d=this;d.documentNode&&(d.documentNode.hasProperty("name")&&d.documentNode.hasProperty("docID"))&&(d.varName=d.documentNode.getProperty("name"),d.varSize=d.documentNode.getProperty("size"),d.varType=d.documentNode.getProperty("type"),d.varSecondaryType=d.documentNode.getProperty("secondaryType"),
d.varSecondaryStatus=d.documentNode.getProperty("secondaryStatus"),d.varDocID=d.documentNode.getProperty("docID"),d.userContext=d.documentNode.hasProperty("userContext")?d.documentNode.getProperty("userContext"):{},d.onClose=function(){b.logDebug("VE: Document Closed");d.clientPeerManager&&d.clientPeerManager.removeFocusedDocument(d);d.rootNode.dispatchEvent("peerEvent",d.rootNode,{type:"RemoveDocument",variable:d.varName,workspace:d.documentNode.getProperty("workspace")})},d.onShow=function(){d.domNode&&
!d.domNode.hasAttribute("data-tag")&&(d.dataTagRoot?d.domNode.setAttribute("data-tag",a.concatenateDataTagStrings(d.dataTagRoot,"document",d.varName)):d.domNode.setAttribute("data-tag",b.createDataTag("document",d.varName)));d.clientPeerManager&&(d.requestFocusOnStart&&d.clientPeerManager.setFocusedDocument(d),d.domNode.setAttribute("data-ManagerChannel",d.clientPeerManager.channel))},d.onFocus=function(){if(d.clientPeerManager){var a=[d.currentContext];d.varType&&a.push(d.varType);c.addToContext(d.contextChannel,
a,!1);d.clientPeerManager.setFocusedDocument(d)}},d.onBlur=function(){d.clientPeerManager&&d.clientPeerManager.removeFocusedDocument(d)},d.documentNode.addEventListener("childAdded",function(a){d._createView(a.data.child,a.target)}),d.documentNode.getChildren&&0<d.documentNode.getChildren().length&&(h=d.documentNode.getChildren()[0],d._createView(h,d.documentNode)),d.documentNode.addEventListener("childRemoved",function(a){d._removeView(d,a.data.child)}),d.showSummaryBar&&(d.documentNode.addEventListener("propertySet",
f.hitch(d,"_handlePropertySet")),d.summaryBar&&(d.summaryBar.setName(d.varName),d.summaryBar.setSize(d.varSize),d.summaryBar.setSecondaryType(d.varSecondaryType),d.summaryBar.setType(d.varType),d.summaryBar.setStatus(d.varSecondaryStatus),d.summaryBar.setStatusRef(d.varSecondaryStatus),d.summaryBar.initServices(d.allArgs.executionService,d.allArgs.helpDataService))),this.domNode&&r.add(this.domNode,"fullWidthHeight"))},_createView:function(a,c){var h=c.getProperty("name"),k=a.getProperty("Editor");
this._initOnViewAdded();this._addView(k,this,a,h)},_initOnViewAdded:function(){var a=this;if(!this.allArgs.actionDataService)var c=p.after(this.clientPeerManager,"actionDataServiceAdded",function(h){a.clientPeerView.initArgs({actionDataService:a.clientPeerManager.allArgs.actionDataService});c.remove()})},_updateCssStyle:function(){var a=this.domNode.getElementsByClassName("clientPeerViewDiv")[0];r.add(a,"hasSummaryBar")},_addView:function(c,h,k,d,e){try{b.logDebug("VE: Attempting module load of "+
c),require([c],function(l){b.logDebug("VE: Loaded class "+c);h.clientPeerView=new l;var f=h.domNode.getElementsByClassName("clientPeerViewDiv");l=h;f&&f.hasOwnProperty(0)&&(f=f[0],l={domNode:f,addChild:function(a){q.place(a.domNode,f,"last")}});h.allArgs=a.mergeObjects(h.allArgs,{peerNode:k,varName:d,container:l});h.clientPeerView.init(h.allArgs);h.resize();b.logDebug("VE: Dispatching Event viewAdded ");h.dispatchEvent("viewAdded",h.domNode,{peerDoc:h,peerView:h.clientPeerView});e&&e("success");h.cmdLineCodePublishSvc=
new B({executionService:h.executionService,context:"VariableEditor/"+d,enabled:h.cmdLineCodeEnabled})}),b.logDebug("VE: Passed required module load.")}catch(f){l.error(f),l.error(f.stack),e&&e("error",f)}},_removeView:function(a,c){b.logDebug("VE: childRemoved listener fired");a.dispatchEvent("viewRemoved",a.domNode,{peerDoc:a,peerView:a.clientPeerView});a&&a.clientPeerView&&(b.logDebug("VE: destroying the clientPeerView"),a.clientPeerView.destroy(),b.logDebug("VE: destroyed the clientPeerView"));
if(a.domNode){var h=a.domNode.getElementsByClassName("clientPeerViewDiv");h&&h.hasOwnProperty(0)&&(h=h[0],q.empty(h))}c&&c.destroy();this.cmdLineCodePublishSvc&&this.cmdLineCodePublishSvc.unregister();a.clientPeerView={}},postCreate:function(){var a=this;this.own(x(window,"resize",function(){a.resize&&a.resize()}));this.showSummaryBar&&(this.setSummaryBar(),this._updateCssStyle())},getView:function(a){if(a)return this.clientPeerView;var c=!1,h=new u(function(){c=!0});if(this.clientPeerView)h.resolve(this.clientPeerView);
else{var k=this,b=function(){k.removeEventListener("viewAdded",b,this);c||h.resolve(k.clientPeerView)};this.addEventListener("viewAdded",b)}return h},focus:function(){if(this.id){var a=n.byId(this.id);n.isDescendant(m.curNode,a)||m.focus(n.byId(this.id))}},resize:function(){var a=300,c=300,h=0;switch(this.resizeBehaviour){case "fixed":this.allArgs.size&&(a=this.allArgs.size.width,c=this.allArgs.size.height);break;case "data":h=s(".dataBody",this.domNode);if(0===h.length)break;a=h[0];a.style.minWidth=
"initial";a.style.minHeight="initial";h=t.position(a);this.clientPeerView&&this.clientPeerView.table&&this.clientPeerView.table.defaultProperties?(c=h.h+this.clientPeerView.table.rowHeight+2,a=h.w+this.clientPeerView.table.rowHeaderWidth+2):(c=h.h+20,a=h.w+32);h=this.limitSize(a,c);c=h.height;a=h.width;break;case "window":a=window.innerWidth;c=window.innerHeight;h=this.limitSize(a,c);c=h.height;a=h.width;break;case "container":a=this.domNode.parentElement;if(!a){this.inherited(arguments);return}h=
t.position(a);if(0>=h.w||0>=h.h){this.inherited(arguments);return}a=h.w;c=h.h;h=this.limitSize(a,c);c=h.height;a=h.width;break;default:this.inherited(arguments);return}this.domNode.style.width=a+"px";this.domNode.style.height=c+"px";this.inherited(arguments)},limitSize:function(a,c){this.allArgs.maxSize&&(this.allArgs.maxSize.width&&a>this.allArgs.maxSize.width&&(c+=w.getScrollbarWidth()),this.allArgs.maxSize.height&&c>this.allArgs.maxSize.height&&(a+=w.getScrollbarWidth()),this.allArgs.maxSize.width&&
(a=Math.min(this.allArgs.maxSize.width,a)),this.allArgs.maxSize.height&&(c=Math.min(this.allArgs.maxSize.height,c)));this.allArgs.minSize&&(this.allArgs.minSize.width&&(a=Math.max(this.allArgs.minSize.width,a)),this.allArgs.minSize.height&&(c=Math.max(this.allArgs.minSize.height,c)));return{width:a,height:c}},_handlePropertySet:function(a){a&&(a.data&&"size"===a.data.key)&&(this.varSize=a.data.newValue,this.summaryBar.setSize(a.data.newValue),v.publish("/datatools/sizeChanged",{doc:this,size:a.data.newValue}));
a&&(a.data&&"type"===a.data.key)&&this.summaryBar.setType(a.data.newValue)},_handleRootPropertySet:function(a){a&&(a.data&&"VECmdLineCodeGenEnabled"===a.data.key)&&this.cmdLineCodePublishSvc.setEnabled(a.data.newValue.VECmdLineCodeGenEnabled)},setSummaryBar:function(){this.documentNode&&(this.varName=this.documentNode.getProperty("name"),this.varSize=this.documentNode.getProperty("size"),this.varType=this.documentNode.getProperty("type"),this.varSecondaryStatus=this.documentNode.getProperty("secondaryStatus"),
this.varSecondaryType=this.documentNode.getProperty("secondaryType"));if(this.showSummaryBar){this.summaryBar=new y(this.varName,this.varSize,this.varType,this.varSecondaryType,this.varSecondaryStatus,this.allArgs.executionService,this.allArgs.helpDataService);this.summaryBar.startup();var a=this.domNode.getElementsByClassName("summaryBarDiv");a&&a.hasOwnProperty(0)&&(a=a[0],q.place(this.summaryBar.domNode,a,"last"));var h=this;x(a,"click",function(a){c.addToContext(h.contextChannel,["SummaryBar"],
!0)})}}})})},"variableeditor/VariableEditorUtils":function(){define("variableeditor/VariableEditorUtils",["mw-remote/Remote","mw-log/Log","mw-messageservice/MessageService","datatoolsservices/DataToolsUtils"],function(g,f,e,d){function b(a){"setLogFlagFromServer"===a.data.eventType&&(c=a.data.flag)}var a=0,c=0;e.subscribe("/VELogChannel",b);return{DEFAULT_VE_DATA_TAG_ROOT:"datatools.variableeditor",runFactoryInitInMATLAB:function(c,k,b){try{a+=1;var d="VariableEditorUtilsResponse_"+a;k&&g.registerResponseHandler("EvalResponse:"+
d,k,this);b&&g.registerFaultHandler("Eval:"+d,b,this);c.endsWith(";")&&(c=c.substring(0,c.length-1));g.sendMessage({FEval:{"function":c,nargout:0,dequeMode:"idle"}},{},d)}catch(e){f.error(e),f.trace(e.stack)}},createDataTag:function(){return d.concatenateDataTagStrings("datatools.variableeditor",arguments)},isDebug:function(){return c&2},isPerformance:function(){return c&1},isInfo:function(){return c&4},setDebug:function(a){a?this.addLogLevel(2):this.isDebug()&&this.removeLogLevel(2);this.publishLogLevel(c)},
addLogLevel:function(a){c|=a},removeLogLevel:function(a){a<=c&&(c^=a)},publishLogLevel:function(a){try{e.publish("/VELogChannel",{eventType:"setLogFlagFromClient",LogLevel:a})}catch(c){}},logDebug:function(a){this.isDebug()&&f.debug(a)},receivedLogInfo:b,setLogLevel:function(a){c=a;this.publishLogLevel(c)},logDebugStackTraceMessage:function(){if(this.isDebug()){var a=this.getStackTrace();a.shift();a=a.join("\n");f.debug("VECallStack: "+a)}},logDebugStackTraceArray:function(){if(this.isDebug()){var a=
this.getStackTrace();a.shift();f.debug(a)}},getStackTrace:function(){var a=[];try{throw Error("Generating Stack");}catch(c){if(c.stack){for(var b=c.stack.split("\n"),d=0;d<b.length;d++){var e=b[d].split("at").join("").trim();a.push(e)}a.shift()}}a.shift();return a}}})},"datatoolsservices/DataToolsUtils":function(){define("datatoolsservices/DataToolsUtils","dijit/focus dojo/_base/declare dojo/dnd/Target dojo/dom-class dojo/dom-construct dojo/dom-style dojo/has dojo/i18n!datatoolsservices/l10n/nls/datatoolsservices mw-log/Log mw-notifications/Notifications".split(" "),
function(g,f,e,d,b,a,c,h,k,l){function m(a,c){var h,k;if(!a||!c||a.length!==c.length)return!1;h=0;for(k=a.length;h<k;h+=1)if(a[h]instanceof Array&&c[h]instanceof Array){if(!m(a[h],c[h]))return!1}else if(a[h]!==c[h])return!1;return!0}function p(a){for(var c=a,h=1;h<arguments.length;h+=1)c=arguments[h]instanceof Object&&arguments[h].length?c+"."+p.apply(this,arguments[h]):c+"."+arguments[h];return c}function n(a,c,h){try{if(void 0!==a.selectionStart)a.selectionStart=c,a.selectionEnd=h,g.curNode!==a&&
g.focus(a);else if(a.createTextRange){var b=a.createTextRange();b.collapse(!0);b.moveStart("character",c);b.moveEnd("character",h);b.select();g.curNode!==a&&g.focus(a)}else a.setSelectionRange&&(g.curNode!==a&&g.focus(a),a.setSelectionRange(c,h))}catch(d){k.log(d)}}function q(a){n(a,0,a.value.length)}var r=null,s=f(e,{onSelectStart:function(a){}});return{addToClassList:function(a,c){void 0!==a&&(null!==a&&void 0!==c&&null!==c)&&d.add(a,c)},compareArrays:m,compareValues:function(a,c){a instanceof Array&&
(a=a.toString());c instanceof Array&&(c=c.toString());return JSON.stringify(a)===JSON.stringify(c)},concatenateDataTagStrings:p,createDebounceFn:function(a,c,h){var k=null;return function(){clearTimeout(k);k=setTimeout(function(){if(a.domNode)for(var h=0;h<c.length;h+=1)c[h].apply(a)},h)}},createSelectableDnDTarget:function(a,c){var h=new s(a,c);c&&c.dropCallback&&(h.onDrop=c.dropCallback);c&&c.checkAcceptanceCallback&&(h.checkAcceptance=c.checkAcceptanceCallback);return h},displayErrorMessage:function(a,
c,k){k={icon:k?k:"error","data-test-id":"fileDataServiceFaultDialog"};c||(c=h.errorDialogTitle);l.displayAlertDialog(c,a,k)},displayErrorMessageWithSpecifiedWidth:function(c,k,b,d){k=k?k:300;d={icon:d?d:"error","data-test-id":"fileDataServiceFaultDialog"};b||(b=h.errorDialogTitle);c=l.displayAlertDialog(b,c,d);a.set(c.domNode,"min-width",k+"px");a.set(c.domNode,"width",k+"px");return c},formatString:function(a){if(a&&(-1<a.indexOf("\n")||-1<a.indexOf("\t")))a=a.replace(/\n/g,"\u21b5"),a=a.replace(/\t/g,
"\t");return a},getBrowserScrollBarWidth:function(a){if(!r)if(c("mac")){a=document.createElement("div");a.className="scrollbar-measure";a.style.width="100px";a.style.height="100px";a.style.overflow="scroll";a.style.position="absolute";a.style.top="-9999px";document.body.appendChild(a);var h=a.offsetWidth-a.clientWidth;document.body.removeChild(a);r=h+2;setTimeout(function(){r=null},500)}else r=a.scrollbarWidth;return r},getClassNameForIconList:function(a){-1<a.indexOf("sparse")?a="sparse":-1<a.indexOf("complex")?
a="complex":""===a.trim()&&(a="novardisplay");return a},getColumnHeaderPositions:function(a){var c=HTMLElement.prototype.getBoundingClientRect;HTMLElement.prototype.getBoundingClientRect=function(){try{return c.apply(this,arguments)}catch(a){return{left:0,right:0,top:0,bottom:0,height:0,width:0}}};if(null===a)return[];for(var h=[],k=0;k<a.length;k++)h[k]=a[k].getBoundingClientRect();HTMLElement.prototype.getBoundingClientRect=c;return h},getComputedColumnHeaderWidth:function(a,c){if(a&&c){var h=document.createElement("canvas").getContext("2d");
h.font=c;return parseInt(h.measureText(a).width)}return 0},getLogicalValue:function(a,c){var h=void 0!==c?!0===c:!1;"string"===typeof a||a instanceof String?(a=a.toLowerCase(),h="false"===a||"0"===a||"off"===a||"no"===a?!1:"true"===a||"1"===a||"on"===a||"yes"===a?!0:void 0!==c?!0===c:!0):"boolean"===typeof a?h=a:"number"===typeof a&&(h=0!==a);return h},getSelectionEnd:function(a){if(void 0!==a.selectionStart&&null!==a.selectionStart)return a.selectionEnd;if(a.createTextRange){var c=document.selection.createRange().duplicate();
c.moveStart("character",-a.value.length);return c.text.length}},getSelectionStart:function(a){if(void 0!==a.selectionStart&&null!==a.selectionStart)return a.selectionStart;if(a.createTextRange){var c=document.selection.createRange().duplicate();c.moveEnd("character",a.value.length);return""===c.text?a.value.length:a.value.lastIndexOf(c.text)}},getStylesFromClasses:function(a,c){var h=b.create("div",{style:"display: none; width: 0px; height: 0px;"});if(a)for(var k=0;k<a.length;k+=1)d.add(h,a[k]);b.place(h,
document.body,"last");var e=window.getComputedStyle(h),l={};if(e&&c)for(k=0;k<c.length;k+=1){var f=c[k];l[f]=e.getPropertyValue(f)}b.destroy(h);return l},handleFormatting:function(a,c,h){var k=null,b=null;"newLine"===h?k="\n":"tab"===h&&(k="\t");a&&(h=a[0],a=a[1],b=c.slice(0,a>h?h:a)+k+c.slice(a,c.length),b=b.replace(/\u21b5/g,"\n"),b=b.replace(/\u0009/g,"\t"));return b},mergeObjects:function(a,c){var h={},k;for(k in a)a.hasOwnProperty(k)&&(h[k]=a[k]);for(k in c)c.hasOwnProperty(k)&&(h[k]=c[k]);return h},
preventDefaultMouseClick:function(a){a.preventDefault()},removeFromClassList:function(a,c){void 0!==a&&(null!==a&&void 0!==c&&null!==c)&&d.remove(a,c)},selectAll:q,clearAllSelection:function(a){n(a,a.selectionEnd,a.selectionEnd)},selectAllText:function(a){a&&a.value&&(!/^\".*\"$/.test(a.value)&&!/^\'.*\'$/.test(a.value)?q(a):n(a,1,a.value.length-1))},selectRange:n,stripOuterDoubleQuotes:function(a){if(a&&("string"===typeof a||a instanceof String))a=a.replace(/^\s*"/,""),a=a.replace(/"\s*$/,"");return a},
stripOuterSingleQuotes:function(a){if(a&&("string"===typeof a||a instanceof String))a=a.replace(/^\s*'/,""),a=a.replace(/'\s*$/,"");return a},unescapeMatlabQuotes:function(a){if(a&&("string"===typeof a||a instanceof String))a=a.replace(/\'\'/g,"'");return a},selectTextInNode:function(a){if(document.selection){var c=document.body.createTextRange();c.moveToElementText(a);c.select()}else window.getSelection&&(c=document.createRange(),c.selectNodeContents(a),window.getSelection().removeAllRanges(),window.getSelection().addRange(c))},
getClassList:function(a){return a.className.split(" ")},filterFloat:function(a){if("string"===typeof a){var c=parseFloat(a).toString();if(0===a.indexOf(c)&&a.length!==c.length)for(c=c.length;c<a.length;c+=1)if("0">a.charAt(c)||"9"<a.charAt(c))return NaN}return parseFloat(a)}}})},"variableeditor/ContextPublishingUtils":function(){define("variableeditor/ContextPublishingUtils",["dojo/_base/declare","dojo/topic"],function(g,f){return{addToContext:function(e,d,b){if(e){var a={};b?a.subContext=d:a.mainContext=
d;f.publish(e,a)}},removeFromContext:function(e,d){if(e){var b={};d?b.subContext=[]:b.mainContext=[];f.publish(e,b)}}}})},"variableeditor/_ArgumentsMixin":function(){define("variableeditor/_ArgumentsMixin",["dojo/_base/declare"],function(g){return g("variableeditor._ArgumentsMixin",[],{setArgument:function(f,e){void 0!==e&&null!==e&&void 0!==e[f]&&null!==e[f]&&(this[f]=e[f])},setArgumentWithDefault:function(f,e,d){void 0!==e&&null!==e&&(this[f]=void 0!==e[f]&&null!==e[f]?e[f]:d)}})})},"variableeditor/views/SummaryBar":function(){define("variableeditor/views/SummaryBar",
"dojo/_base/declare dojo/_base/lang dijit/_WidgetBase dijit/_TemplatedMixin dojo/on dojo/query datatoolsservices/constants/ClassTypeMaps datatoolsservices/constants/CssClassConstants datatoolsservices/DataToolsUtils dojo/text!variableeditor/views/SummaryBar.html".split(" "),function(g,f,e,d,b,a,c,h,k,l){return g("variableeditor.views.SummaryBar",[e,d],{name:"",size:"",type:"",link:"",secondaryType:"",status:"",statuslink:"",templateString:l,constructor:function(a,c,h,k,b,d,e){this.name=a||"";this.size=
c||"";this.type=h||"";this.secondaryType=k||"";this.status=b||"";this.executionService=d||"";this.helpDataService=e||""},postCreate:function(){this.setName(this.name);this.setSize(this.size);this.setType(this.type);this.setSecondaryType(this.secondaryType);this.setStatus(this.status);this.setStatusRef(this.status);this._handleDocLink()},initServices:function(a,c){this.executionService=a;this.helpDataService=c},_handleDocLink:function(){var a=this,c=function(c,h,k){"statuslink"===k&&a.helpDataService?
(h=a.helpDataService.addMOQueryParameter(h),a.helpDataService.iframeContainer.showIframe({host:h,name:"MATLAB Online Help",maximizeUrl:a.helpDataService.getMaximizeUrl(h)})):a.executionService&&a.executionService.executionEval("doc "+h);c.preventDefault()};b(this.summaryBarLink,"click",f.hitch(this,function(h){c(h,a.type,"status")}));b(this.summaryBarStatusLink,"click",f.hitch(this,function(h){c(h,a.statuslink,"statuslink")}))},updateIconClass:function(){var b=a(".summaryBarSize",this.domNode)[0],
d=k.getClassNameForIconList(this.type),e=d;this.secondaryType&&(e=d+"_"+this.secondaryType);k.removeFromClassList(b,c.ClassArray);k.addToClassList(b,h.VE_RENDERERS);c.IconTypeMap.hasOwnProperty(e)?k.addToClassList(b,c.IconTypeMap[e]):c.IconTypeMap.hasOwnProperty(d)?k.addToClassList(b,c.IconTypeMap[d]):k.addToClassList(b,c.IconTypeMap.UNKNOWN)},setName:function(a){this.name=a||""},setSize:function(c){this.size=c||"";"0"===c&&(this.size=this.name);a(".summaryBarSize",this.domNode)[0].textContent=this.size},
setType:function(c){var h=null;if(c){var k=c,h=c,b=c.split(/[.]+/);b&&1<b.length?k=b.pop():(c=c.split(/[ ]+/))&&1<c.length&&(h=c.pop());this.type=h}else this.resetToDefault();a(".summaryBarRef",this.domNode)[0].textContent=k;this.updateIconClass()},resetToDefault:function(){this.link=this.type=" "},setStatus:function(c){this.status=c||"";c=a(".summaryBarStatus",this.domNode)[0];!this.hasStatusHyperlink()&&this.status&&0<this.status.length?c.textContent="("+this.status+")":c.textContent=""},setStatusRef:function(c){this.status=
c||"";c=a(".summaryBarStatusRef",this.domNode)[0];this.hasStatusHyperlink()&&this.status&&0<this.status.length?(this.statuslink=this.getStatusHyperlink(),c.textContent=" ("+this.status+")"):c.textContent=""},hasStatusHyperlink:function(){return this.type&&"tall"===this.type},getStatusHyperlink:function(){var a;switch(this.type){case "tall":a="https://www.mathworks.com/help/matlab/import_export/deferred-evaluation-of-tall-arrays.html"}return a},setSecondaryType:function(a){this.secondaryType=a||"";
a=this.domNode.getElementsByClassName("summaryBarSecondaryType");a=a[0];a.textContent=this.secondaryType}})})},"datatoolsservices/constants/ClassTypeMaps":function(){define(["datatoolsservices/constants/TypeConstants","datatoolsservices/constants/CssClassConstants"],function(g,f){return{ClassTypeMap:function(){var e={};e[g.DOUBLE]=f.MATRIX;e[g.SINGLE]=f.MATRIX;e[g.UINT8]=f.MATRIX;e[g.UINT16]=f.MATRIX;e[g.UINT32]=f.MATRIX;e[g.UINT64]=f.MATRIX;e[g.INT8]=f.MATRIX;e[g.INT16]=f.MATRIX;e[g.INT32]=f.MATRIX;
e[g.INT64]=f.MATRIX;e[g.HALF]=f.MATRIX;e[g.COMPLEX]=f.MATRIX;e[g.CHAR]=f.CHAR;e[g.STRING]=f.STRING;e[g.CELL]=f.CELL;e[g.LOGICAL]=f.LOGICAL;e[g.STRUCT]=f.STRUCT;e[g.TIMESERIES]=f.TIMESERIES;e[g.TIMETABLE]=f.TIMETABLE;e[g.SPARSE]=f.SPARSE;e[g.DATETIME]=f.DATETIME;e[g.DURATION]=f.DURATION;e[g.CALENDAR_DURATION]=f.CALENDAR_DURATION;e[g.OBJECT]=f.OBJECT;e[g.TALL]=f.TALL;e[g.TALL_DOUBLE]=f.TALL_MATRIX;e[g.TALL_UINT8]=f.TALL_MATRIX;e[g.TALL_UINT16]=f.TALL_MATRIX;e[g.TALL_UINT32]=f.TALL_MATRIX;e[g.TALL_UINT64]=
f.TALL_MATRIX;e[g.TALL_INT8]=f.TALL_MATRIX;e[g.TALL_INT16]=f.TALL_MATRIX;e[g.TALL_INT32]=f.TALL_MATRIX;e[g.TALL_INT64]=f.TALL_MATRIX;e[g.TALL_SINGLE]=f.TALL_MATRIX;e[g.TALL_HALF]=f.TALL_MATRIX;e[g.TALL_CELL]=f.TALL_CELL;e[g.TALL_LOGICAL]=f.TALL_LOGICAL;e[g.TALL_OBJECT]=f.TALL_OBJECT;e[g.TALL_SPARSE]=f.TALL_SPARSE;e[g.TALL_CHAR]=f.TALL_CHAR;e[g.TALL_STRUCT]=f.TALL_STRUCT;e[g.TALL_TIMETABLE]=f.TALL_TIMETABLE;e[g.TALL_MATLAB_TABLE]=f.TALL_MATLAB_TABLE;e[g.TALL_CATEGORICAL]=f.TALL_CATEGORICAL;e[g.TALL_ORDINAL]=
f.TALL_CATEGORICAL;e[g.TALL_NOMINAL]=f.TALL_CATEGORICAL;e[g.TALL_DATETIME]=f.TALL_DATETIME;e[g.TALL_DURATION]=f.TALL_DURATION;e[g.TALL_CALENDAR_DURATION]=f.TALL_CALENDAR_DURATION;e[g.TALL_STRING]=f.TALL_STRING;e[g.MIXED]=f.MIXED;e[g.UNKNOWN]=f.OBJECT;e[g.DEFAULT]=f.OBJECT;e[g.NOVARDISPLAY]=f.NOVARDISPLAY;return e}(),IconTypeMap:function(){var e={};e[g.DOUBLE]=f.MATRIX_ICON;e[g.SINGLE]=f.MATRIX_ICON;e[g.UINT8]=f.MATRIX_ICON;e[g.UINT16]=f.MATRIX_ICON;e[g.UINT32]=f.MATRIX_ICON;e[g.UINT64]=f.MATRIX_ICON;
e[g.INT8]=f.MATRIX_ICON;e[g.INT16]=f.MATRIX_ICON;e[g.INT32]=f.MATRIX_ICON;e[g.INT64]=f.MATRIX_ICON;e[g.HALF]=f.MATRIX_ICON;e[g.COMPLEX]=f.MATRIX_ICON;e[g.CHAR]=f.CHAR_ICON;e[g.STRING]=f.STRING_ICON;e[g.CELL]=f.CELL_ICON;e[g.LOGICAL]=f.LOGICAL_ICON;e[g.STRUCT]=f.STRUCT_ICON;e[g.TIMESERIES]=f.TIMESERIES_ICON;e[g.TIMETABLE]=f.TIMETABLE_ICON;e[g.SPARSE]=f.SPARSE_ICON;e[g.OBJECT]=f.OBJECT_ICON;e[g.MATLAB_TABLE]=f.TABLE_ICON;e[g.DATASET]=f.TABLE_ICON;e[g.CATEGORICAL]=f.CATEGORICAL_ICON;e[g.ORDINAL]=f.CATEGORICAL_ICON;
e[g.NOMINAL]=f.CATEGORICAL_ICON;e[g.DATETIME]=f.DATETIME_ICON;e[g.DURATION]=f.DURATION_ICON;e[g.CALENDAR_DURATION]=f.CALENDAR_DURATION_ICON;e[g.TALL]=f.TALL_ICON;e[g.TALL_DOUBLE]=f.TALL_MATRIX_ICON;e[g.TALL_UINT8]=f.TALL_MATRIX_ICON;e[g.TALL_UINT16]=f.TALL_MATRIX_ICON;e[g.TALL_UINT32]=f.TALL_MATRIX_ICON;e[g.TALL_UINT64]=f.TALL_MATRIX_ICON;e[g.TALL_INT8]=f.TALL_MATRIX_ICON;e[g.TALL_INT16]=f.TALL_MATRIX_ICON;e[g.TALL_INT32]=f.TALL_MATRIX_ICON;e[g.TALL_INT64]=f.TALL_MATRIX_ICON;e[g.TALL_SINGLE]=f.TALL_MATRIX_ICON;
e[g.TALL_HALF]=f.TALL_MATRIX_ICON;e[g.TALL_CELL]=f.TALL_CELL_ICON;e[g.TALL_LOGICAL]=f.TALL_LOGICAL_ICON;e[g.TALL_OBJECT]=f.TALL_OBJECT_ICON;e[g.TALL_SPARSE]=f.TALL_SPARSE_ICON;e[g.TALL_CHAR]=f.TALL_CHAR_ICON;e[g.TALL_STRUCT]=f.TALL_STRUCT_ICON;e[g.TALL_TIMETABLE]=f.TALL_TIMETABLE_ICON;e[g.TALL_MATLAB_TABLE]=f.TALL_MATLAB_TABLE_ICON;e[g.TALL_CATEGORICAL]=f.TALL_CATEGORICAL_ICON;e[g.TALL_DATETIME]=f.TALL_DATETIME_ICON;e[g.TALL_DURATION]=f.TALL_DURATION_ICON;e[g.TALL_CALENDAR_DURATION]=f.TALL_CALENDAR_DURATION_ICON;
e[g.TALL_STRING]=f.TALL_STRING_ICON;e[g.TALL_ORDINAL]=f.TALL_CATEGORICAL_ICON;e[g.TALL_NOMINAL]=f.TALL_CATEGORICAL_ICON;e[g.MIXED]=f.MIXED_ICON;e[g.UNKNOWN]=f.OBJECT_ICON;e[g.DEFAULT]=f.OBJECT_ICON;e[g.NOVARDISPLAY]=f.NOVARDISPLAY_ICON;return e}(),ClassArray:function(){var e=[],d;for(d in f)f.hasOwnProperty(d)&&e.push(f[d]);return e}()}})},"datatoolsservices/constants/TypeConstants":function(){define([],function(){return{CHAR:"char",STRING:"string",DOUBLE:"double",CELL:"cell",LOGICAL:"logical",STRUCT:"struct",
TIMESERIES:"timeseries",TIMETABLE:"timetable",SPARSE:"sparse",COMPLEX:"complex",MATLAB_TABLE:"table",DATASET:"dataset",CATEGORICAL:"categorical",ORDINAL:"ordinal",NOMINAL:"nominal",DATETIME:"datetime",DURATION:"duration",CALENDAR_DURATION:"calendarDuration",UINT8:"uint8",UINT16:"uint16",UINT32:"uint32",UINT64:"uint64",INT8:"int8",INT16:"int16",INT32:"int32",INT64:"int64",SINGLE:"single",HALF:"half",OBJECT:"object",TALL:"tall",TALL_DOUBLE:"tall_double",TALL_CELL:"tall_cell",TALL_LOGICAL:"tall_logical",
TALL_OBJECT:"tall_object",TALL_SPARSE:"tall_sparse",TALL_CHAR:"tall_char",TALL_STRUCT:"tall_struct",TALL_TIMETABLE:"tall_timetable",TALL_MATLAB_TABLE:"tall_table",TALL_CATEGORICAL:"tall_categorical",TALL_DATETIME:"tall_datetime",TALL_DURATION:"tall_duration",TALL_CALENDAR_DURATION:"tall_calendarDuration",TALL_STRING:"tall_string",TALL_UINT8:"tall_uint8",TALL_UINT16:"tall_uint16",TALL_UINT32:"tall_uint32",TALL_UINT64:"tall_uint64",TALL_INT8:"tall_int8",TALL_INT16:"tall_int16",TALL_INT32:"tall_int32",
TALL_INT64:"tall_int64",TALL_SINGLE:"tall_single",TALL_HALF:"tall_half",TALL_ORDINAL:"tall_ordinal",TALL_NOMINAL:"tall_nominal",UNKNOWN:"UNKNOWN",DEFAULT:"default",MIXED:"mixed",NOVARDISPLAY:"novardisplay"}})},"datatoolsservices/constants/CssClassConstants":function(){define([],function(){return{MGG_CELL:"cell",VE_RENDERERS:"variableEditorRenderers",IS_METADATA:"variableEditorIsMetaData",NOT_EDITABLE:"variableEditorNotEditable",TEMPORARY:"variableEditorTemporary",MATRIX:"variableEditorMatrix",CHAR:"variableEditorChar",
STRING:"variableEditorString",CELL:"variableEditorCell",LOGICAL:"variableEditorLogic",STRUCT:"variableEditorStruct",TIMESERIES:"variableEditorTimeseries",TIMETABLE:"variableEditorTimetable",SPARSE:"variableEditorSparse",DATETIME:"variableEditorDatetime",DURATION:"variableEditorDuration",CALENDAR_DURATION:"variableEditorCalendarDuration",OBJECT:"variableEditorObject",MIXED:"variableEditorMixed",TALL:"variableEditorTall",TALL_MATRIX:"variableEditorTallMatrix",TALL_CELL:"variableEditorTallCell",TALL_LOGICAL:"variableEditorTallLogical",
TALL_OBJECT:"variableEditorTallObject",TALL_SPARSE:"variableEditorTallSparse",TALL_CHAR:"variableEditorTallChar",TALL_STRUCT:"variableEditorTallStruct",TALL_TIMETABLE:"variableEditorTallTimetable",TALL_MATLAB_TABLE:"variableEditorTallMatlabTable",TALL_CATEGORICAL:"variableEditorTallCategorical",TALL_DATETIME:"variableEditorTallDatetime",TALL_DURATION:"variableEditorTallDuration",TALL_CALENDAR_DURATION:"variableEditorTallCalendarDuration",TALL_STRING:"variableEditorTallString",MATRIX_ICON:"iconVariableEditorMatrix",
CHAR_ICON:"iconVariableEditorChar",STRING_ICON:"iconVariableEditorString",CELL_ICON:"iconVariableEditorCell",LOGICAL_ICON:"iconVariableEditorLogic",STRUCT_ICON:"iconVariableEditorStruct",TIMESERIES_ICON:"iconVariableEditorTimeseries",TIMETABLE_ICON:"iconVariableEditorTimetable",SPARSE_ICON:"iconVariableEditorSparse",OBJECT_ICON:"iconVariableEditorObject",TABLE_ICON:"iconVariableEditorMatlabTable",CATEGORICAL_ICON:"iconVariableEditorCategorical",DATETIME_ICON:"iconVariableEditorDatetime",DURATION_ICON:"iconVariableEditorDuration",
CALENDAR_DURATION_ICON:"iconVariableEditorCalendarDuration",MIXED_ICON:"iconVariableEditorMixed",TALL_ICON:"iconVariableEditorTall",TALL_MATRIX_ICON:"iconVariableEditorTallMatrix",TALL_CELL_ICON:"iconVariableEditorTallCell",TALL_LOGICAL_ICON:"iconVariableEditorTallLogical",TALL_OBJECT_ICON:"iconVariableEditorTallObject",TALL_SPARSE_ICON:"iconVariableEditorTallSparse",TALL_CHAR_ICON:"iconVariableEditorTallChar",TALL_STRUCT_ICON:"iconVariableEditorTallStruct",TALL_TIMETABLE_ICON:"iconVariableEditorTallTimetable",
TALL_MATLAB_TABLE_ICON:"iconVariableEditorTallMatlabTable",TALL_CATEGORICAL_ICON:"iconVariableEditorTallCategorical",TALL_DATETIME_ICON:"iconVariableEditorTallDatetime",TALL_DURATION_ICON:"iconVariableEditorTallDuration",TALL_CALENDAR_DURATION_ICON:"iconVariableEditorTallCalendarDuration",TALL_STRING_ICON:"iconVariableEditorTallString",NOVARDISPLAY_ICON:"iconVariableEditorNoVarDisplay"}})},"datatoolsservices/CmdLineCodePublishService":function(){define("datatoolsservices/CmdLineCodePublishService",
["dojo/_base/declare","dojo/_base/lang","dojo/aspect","mw-messageservice/MessageService","dojo/domReady!"],function(g,f,e,d){return g("datatoolsservices.CmdLineCodePublishService",[],{executionService:[],context:"",enabled:!1,codeObj:[],constructor:function(b){this.executionService=b.executionService;this.context=b.context;b.enabled&&(this.enabled=b.enabled);d.subscribe("/DataToolsCodePubChannel/"+this.context,"_publishCode",this)},unregister:function(){d.unsubscribe("/DataToolsCodePubChannel/"+this.context,
"_publishCode",this)},_publishCode:function(b){if(b&&b.data&&(this.codeObj=b=JSON.parse(b.data),this.executionService)){if(this.executionService._setExecutionState)var a=e.after(this.executionService,"_setExecutionState",f.hitch(this,function(c,k){if(c&&"ready"===c){a.remove();var b=this.executionService.historyStore.items.length;this.executionService.historyStore.items[b-1].isError&&(b=this.executionService.historyStore.items[b-1].value.trim().split("\n"),b=this.codeObj.errorFcn.replace("%1$s",b[b.length-
1]),this.executionService.executionEval(b))}}),!0);if(b.code)if(Array.isArray(b.code))for(var c=0;c<b.code.length;c+=1)this._executeCode(b.code[c]);else this._executeCode(b.code)}},_executeCode:function(b){this.enabled?this.executionService.authoringEval(b):this.executionService.executionEval(b)},setEnabled:function(b){this.enabled=b}})})},"variableeditor/ContextUpdateManager":function(){define("variableeditor/ContextUpdateManager",["dojo/_base/declare","dojo/topic","MW/uiframework/contextmanager/ContextManagerFactory",
"MW/uiframework/UIBuilderFactory"],function(g,f,e,d){return g("variableeditor.ContextUpdateManager",[],{constructor:function(b){this.defaultContextId=b.defaultContextId||"";this.contextChannel=b.contextUpdateChannel||"";this.managerChannel=b.managerChannel||"";this.contextManager=null;this.currentContext=[];this.init()},init:function(){try{this.contextManager=e.getInstance()}catch(b){}null===this.contextManager&&"/WorkspaceBrowser"===this.managerChannel&&(d.getInstance({actionService:null}).create({tag:"motwToolstrip",
type:"Toolstrip"}),this.contextManager=e.getInstance({parentAppId:"motw",toolstripTag:"motwToolstrip",toolstripId:"toolstripId",uiContainer:null,qabContextualControlsActionMap:{}}));this._setUpContextWatch();var a=this;this.contextManager&&f.subscribe(this.contextChannel,function(c){c.subContext&&a._updateSubContext(c)})},_setUpContextWatch:function(){if(this.contextManager){var b=this,a=this.defaultContextId;this.contextManager.watch("currentContext",function(c,h,k){var d=k.appId;"currentContext"===
c&&(d&&d===a&&h!==k)&&b.setCurrentContext(b.currentContext.slice())})}},setCurrentContext:function(b){var a=this.managerChannel;b&&(this.contextManager&&this.contextManager.set)&&this.contextManager.set("currentContext",{appId:a,contextIdList:b})},_updateSubContext:function(b){0<b.subContext.length?(this.currentContext=b.subContext,this.setCurrentContext(b.subContext)):this.setCurrentContext(this.currentContext)}})})},"variableeditor/VariableEditorMain":function(){define("variableeditor/VariableEditorMain",
"dojo/_base/declare dojo/_base/lang variableeditor/ClientPeerManagerFactory variableeditor/VariableEditorUtils variableeditor/VariableEditorDnD mw-log/Log dojo/on mw-messageservice/MessageService".split(" "),function(g,f,e,d,b,a,c,h){var k=g("variableeditor.VariableEditorMain",[b],{layoutService:[],clientPeerManager:{},orig_updateDataStyles:null,orig_updateColumnStyles:null,currentVariables:[],dropZoneClass:"VEDropZone",constructor:function(a){this.layoutService=[];this.executionService=[];this.helpDataService=
[];this.clientPeerManager={};this.orig_updateColumnStyles=this.orig_updateDataStyles=null;this.currentVariables=[];this.focusedDocument={};this.initArgs(a);a&&(this.clientPeerManager=e.createManager({messageService:a.messageService,executionService:a.executionService,helpDataService:a.helpDataService,channel:"/VariableEditor",ignoreUpdates:!1,editable:!0}),this.init())},initArgs:function(a){a&&(this.layoutService=a.layoutService,this.executionService=a.executionService,this.helpDataService=a.helpDataService)},
init:function(){var c=this;this.clientPeerManager.addEventListener("variableAdded",function(k){try{if(k.data.peerDoc){var b=k.data.peerDoc;c.addWidget(b);c.currentVariables.push(b.varName);d.logDebug("VE: Document Added");if(d.isPerformance())var e=(new Date).getTime();b.addEventListener("viewAdded",function(k){try{d.logDebug("VE: View Added");var b=k.data.peerView;c._attachDndHandles(k.data.peerDoc);var f=function(a){d.logDebug("VE: View Ready");var c=a.data.peerView;c.table.startup&&c.table.startup();
if(d.isPerformance()&&0!==a.data.peerView.table.dataModel._partialData.length){var k=JSON.parse(a.data.peerView.table.dataModel._partialData[0][0]),b=a.data.peerView.table.dataModel._rowCount,l=a.data.peerView.table.dataModel._columnCount;k.isTemporaryValue||(k=(new Date).getTime()-e,h.publish("/VELogChannel",{eventType:"VELoadPerformance",dataType:a.data.peerView.declaredClass,loadTime:k,rows:b,columns:l}))}c.removeEventListener("viewReady",f,this)};b.addEventListener("viewReady",f)}catch(m){a.error(m)}});
b.addEventListener("viewRemoved",function(c){try{d.logDebug("VE: View Removed")}catch(h){a.error(h)}})}}catch(f){a.error(f)}});this.clientPeerManager.addEventListener("variableRemoved",function(a){a.data.peerDoc&&(a=a.data.peerDoc,c.removeWidget(a),c.currentVariables.pop(a.varName))});this.clientPeerManager.addEventListener("variableFocusGained",function(a){a.data.peerDoc&&(a=a.data.peerDoc,c.layoutService.showWidget(a.varDocID),this.focusedDocument=a)});this.clientPeerManager.addEventListener("variableFocusLost",
function(a){this.focusedDocument={}})},_attachDndHandles:function(a){this.dragEnterListener=c(a,"dragenter",f.hitch(this,this._onDragEnter,a.domNode,this.dropZoneClass));this.dragOverListener=c(a,"dragover",f.hitch(this,this._onDragOver));this.dragLeaveListener=c(a,"dragleave",f.hitch(this,this._onDragLeave,a.domNode,this.dropZoneClass));this.dropListener=c(a,"drop",f.hitch(this,this._onDrop,a.domNode,this.dropZoneClass))},_onDrop:function(a,c,h){var k=h.dataTransfer.getData("text/workspacebrowser").split(","),
b=this.clientPeerManager;k.forEach(function(a){a&&b&&b.openVariable(a)});this.inherited(arguments)},openVariable:function(a,c,h){this.clientPeerManager&&this.clientPeerManager.openVariable&&this.clientPeerManager.openVariable(a,c,h)},closeVariable:function(a){this.clientPeerManager.closeVariable(a)},closeAllVariables:function(){this.clientPeerManager.closeAllVariables()},start:function(){this.clientPeerManager.start()},stop:function(){this.clientPeerManager.stop()},addWidget:function(a){this.layoutService.addWidget(a.varDocID,
"vEditor2",a,{title:a.varName,tooltip:a.varName,userContext:a.userContext});this.layoutService.showWidget(a.varDocID)},showWidget:function(a){this.layoutService.showWidget(a.varDocID)},removeWidget:function(a){this.layoutService.removeWidget(a.varDocID)},getVariables:function(){return this.currentVariables}});k.getInstance=function(a){if(!k._instance)return k._instance=new k(a),k._instance;a&&k._instance.initArgs(a);return k._instance};return{getInstance:k.getInstance}})},"variableeditor/VariableEditorDnD":function(){define("variableeditor/VariableEditorDnD",
["dojo/_base/declare","dojo/dom-geometry","dojo/dom-class","dojo/domReady!"],function(g,f,e){return g("variableeditor.VariableEditorDnD",[],{ValidDataFlavor:"text/workspacebrowser",ValidDropEffect:"copy",InvalidDropEffect:"none",_onDragEnter:function(d,b,a){a.preventDefault();a.stopPropagation();this.isDropZone(d,a)&&this.isValidDropObject(a)&&e.add(d,b)},isDropZone:function(d,b){var a=!1,c=f.position(d,!0);c&&(b.pageX>c.x&&b.pageX<c.x+c.w&&b.pageY>c.y&&b.pageY+5<c.y+c.h)&&(a=!0);return a},isValidDropObject:function(d){if(d.dataTransfer){if(d.dataTransfer.types.indexOf)return-1<
d.dataTransfer.types.indexOf(this.ValidDataFlavor);if(d.dataTransfer.types.contains)return d.dataTransfer.types.contains(this.ValidDataFlavor)}return!1},_onDragOver:function(d){d.preventDefault();d.stopPropagation();this.isValidDropObject(d)?d.dataTransfer.dropEffect=this.ValidDropEffect:d.dataTransfer.dropEffect=this.InvalidDropEffect;return!1},_onDragLeave:function(d,b,a){a.preventDefault();a.stopPropagation();this.isDropZone(d,a)||e.remove(d,b)},_onDrop:function(d,b,a){a.preventDefault();a.stopPropagation();
e.remove(d,b);return!1}})})},"workspacebrowser/WorkspaceBrowserMain":function(){define("workspacebrowser/WorkspaceBrowserMain",["dojo/_base/declare","workspacebrowser/WorkspaceBrowserFactory","variableeditor/VariableEditorUtils","mw-peermodel/Observable"],function(g,f,e,d){var b=g("workspacebrowser.WorkspaceBrowserMain",[d.Impl],{layoutService:[],uiContainer:[],clientPeerManager:{},orig_updateDataStyles:null,orig_updateColumnStyles:null,currentVariables:[],variableListeners:[],constructor:function(a){e.logDebug("WSB: Constructor");
this.layoutService=[];this.uiContainer=[];this.clientPeerManager={};this.orig_updateColumnStyles=this.orig_updateDataStyles=null;this.currentVariables=[];this.variableListeners=[];this.initArgs(a);this.init()},initArgs:function(a){a&&(e.logDebug("WSB: initialize arguments"),this.layoutService=a.layoutService,this.uiContainer=a.uiContainer,this.clientPeerManager=f.createWorkspaceBrowser({messageService:a.messageService,layoutService:a.layoutService,executionService:a.executionService,fileDataService:a.fileDataService,
workspace:"caller",channel:"/WorkspaceBrowser",editable:!0,cssSpecifier:"mw_type_WorkspaceBrowser",fixedColumnWidths:!1,ignoreUpdates:!1,requestFocusOnStart:!1,dataTagRoot:"motw.datatools.workspacebrowser",keyboardAccessibility:!0}))},init:function(){var a=this;this.clientPeerManager.addEventListener("variableAdded",function(c){c=c.data.peerDoc;e.logDebug("WSB: Document Added");a.addWidget(c);c.addEventListener("viewRemoved",function(a){e.logDebug("WSB: View Removed")})});this.clientPeerManager.addEventListener("variableRemoved",
function(c){c=c.data.peerDoc;e.logDebug("WSB: Document Removed");a.removeWidget(c)});this.clientPeerManager.addEventListener("variablesAdded",function(c){e.logDebug("WSB: VariablesAdded: "+c.data.variables);a.dispatchEvent("variablesAdded",c.target,{workspaceBrowser:a,variables:c.data.variables})});this.clientPeerManager.addEventListener("variablesRemoved",function(c){e.logDebug("WSB: VariablesRemoved: "+c.data.variables);a.dispatchEvent("variablesRemoved",c.target,{workspaceBrowser:a,variables:c.data.variables})});
this.clientPeerManager.addEventListener("variablesChanged",function(c){e.logDebug("WSB: VariablesChanged: "+c.data.variables);a.dispatchEvent("variablesChanged",c.target,{workspaceBrowser:a,variables:c.data.variables})})},start:function(){f.start();this.clientPeerManager.start()},stop:function(){this.clientPeerManager.stop()},addWidget:function(a){this.layoutService.addWidget("workspace","workspace",a)},showWidget:function(a){this.layoutService.showWidget("workspace")},removeWidget:function(a){this.layoutService.removeWidget("workspace")},
getVariables:function(){return this.currentVariables},onStackChanged:function(a,c){var h="";0<a.length&&(c<a.length&&a[c].getName)&&(h=a[c].getName());for(var k=this.uiContainer.getPanels(),b=0;b<k.length;b+=1)"workspace"===k[b].properties.panelId&&(0===h.length||"Base"===h?k[b].properties.set("title","Workspace"):k[b].properties.set("title","Workspace - "+h))}});b.getInstance=function(a){if(!b._instance)return b._instance=new b(a),b._instance;a&&b._instance.initArgs(a);return b._instance};return{getInstance:b.getInstance}})},
"workspacebrowser/WorkspaceBrowserFactory":function(){define("workspacebrowser/WorkspaceBrowserFactory",["workspacebrowser/WorkspaceBrowserManager","variableeditor/VariableEditorUtils","dojo/topic"],function(g,f,e){function d(){h||(h=new g({channel:"/WorkspaceBrowserManager"}),k[h.channel]=h,h.manager.addEventListener("rootSet",function(a){f.logDebug("WSB: Factory Root Set");var c=a.target;a=c.getProperty("Debug");void 0!==a&&f.setDebug(a.Debug);c.addEventListener("propertySet",function(a){a.data&&
a.data.key&&"Managers"===a.data.key?f.logDebug("WSB: Factory Managers Updated"):a.data&&(a.data.key&&"Debug"===a.data.key)&&f.setDebug(a.data.newValue.Debug)});c.addEventListener("peerEvent",function(a){a.data.type&&"FactoryInitialized"===a.data.type?(f.logDebug("WSB: Factory Initialized"),b()):a.data.type&&"WorkspaceBrowserCreated"===a.data.type?a.data.Channel&&(k[a.data.Channel]&&k[a.data.Channel].start&&k[a.data.Channel].autoStart)&&(k[a.data.Channel].start(),f.logDebug("WSB: Factory Auto Starting Manager ("+
a.data.Channel+")")):a.data.type&&"log"===a.data.type&&a.data.message&&f.logDebug("WSB: Server Log ("+a.data.message+")")});e.subscribe("variableeditor/isDebug",function(a){var h=c.getProperty("Debug");a&&(void 0!==a.Debug&&h&&a.Debug!==h.Debug)&&c.setProperty("Debug",{Debug:a.Debug,Source:"client"})});c&&(c.getProperty("Initialized")&&c.getProperty("Initialized").Initialized)&&b()}));return h}function b(){h&&h.getRoot()&&(l.forEach(function(a,c,k){c=h.getRoot();f.logDebug("WSB: Factory Create WSB From Queue ("+
a.channel+")");c.dispatchEvent("peerEvent",c,a)}),l=[])}function a(a){d();a.channel||(p+=1,a.channel="/CWSB_"+p);a.workspace||(a.workspace="caller");void 0===a.editable&&(a.editable=!0);void 0===a.fixedColumnWidths&&(a.fixedColumnWidths=!1);void 0===a.ignoreUpdates&&(a.ignoreUpdates=!1);void 0===a.requestFocusOnStart&&(a.requestFocusOnStart=!1);a.cssSpecifier=a.cssSpecifier||"mw_type_WorkspaceBrowser";a.dataTagRoot=a.dataTagRoot||"motw.datatools.workspacebrowser";if(k&&k[a.channel]&&!a.forceNewManager)return k[a.channel];
var c=k,h=a.channel,b;if(a){var e=d();a.manager&&(e=a.manager);b=a.workspace;var f=a.channel;e||(e=d());(e=e.getRoot())?e.dispatchEvent("peerEvent",e,{type:"CreateWorkspaceBrowser",workspace:b,channel:f}):l.push({type:"CreateWorkspaceBrowser",workspace:b,channel:f});b=new g(a)}else b=null;c[h]=b;return k[a.channel]}function c(a){a&&!a.isError&&(m=!0,b())}var h,k={},l=[],m=!1,p=0;return{createManager:a,createWorkspaceBrowser:a,deleteWorkspaceBrowser:function(a){if(!a&&a.channel)return null;var c=d(),
h=a.workspace,b=a.channel;c||(c=d());(c=c.getRoot())?c.dispatchEvent("peerEvent",c,{type:"DeleteWorkspaceBrowser",workspace:h,channel:b}):l.push({type:"DeleteWorkspaceBrowser",workspace:h,channel:b});k[a.channel]=null},start:function(a){a?f.runFactoryInitInMATLAB("internal.matlab.workspace.peer.PeerWorkspaceBrowserFactory.startup",c):m=!0;d().start()},isStarted:function(){return m}}})},"workspacebrowser/WorkspaceBrowserManager":function(){define("workspacebrowser/WorkspaceBrowserManager","dojo/_base/declare dojo/_base/connect dojo/_base/lang dojo/dom-class mw-peermodel/PeerModelManager variableeditor/ClientPeerManager variableeditor/VariableEditorUtils workspacebrowser/WorkspaceBrowserDnD workspacebrowser/WorkspaceBrowserFactory mw-log/Log".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return g("workspacebrowser.WorkspaceBrowserManager",[h,a],{_WSB_DOC_CLASS:"WorkspaceBrowserDocument",constructor:function(a){this.allArgs=a},_init:function(){this.inherited(arguments);this.channel="/WorkspaceBrowserManager";this.editable=!0;this.cssSpecifier="mw_type_WorkspaceBrowser";this.workspace="caller";this.requestFocusOnStart=this.ignoreUpdates=this.fixedColumnWidths=!1;this.cssSpecifier="mw_type_WorkspaceBrowser";this.dataTagRoot="motw.datatools.workspacebrowser";
this.workspaceDocument=null;this.useJsDragDrop=!0;this.defaultContextId="workspace";this.allArgs&&(this.messageService=this.allArgs.messageService,this.channel=this.allArgs.channel||"/WorkspaceBrowserManager",this.contextId=this.allArgs.contextId="WorkspaceBrowser",this.workspace=this.allArgs.workspace||"caller",this.editable=void 0===this.allArgs.editable?!0:this.allArgs.editable,this.ignoreUpdates=void 0===this.allArgs.ignoreUpdates?!1:this.allArgs.ignoreUpdates,this.cssSpecifier=this.allArgs.cssSpecifier||
"mw_type_WorkspaceBrowser",this.allArgs=this.allArgs,this.dataTagRoot=this.allArgs.dataTagRoot||"motw.datatools.workspacebrowser",this.cssSpecifier=this.allArgs.cssSpecifier||"mw_type_WorkspaceBrowser",this.autoStart=void 0===this.allArgs.autoStart?!0:this.allArgs.autoStart,this.fixedColumnWidths=void 0===this.allArgs.fixedColumnWidths?!1:this.allArgs.fixedColumnWidths,this.requestFocusOnStart=void 0===this.allArgs.requestFocusOnStart?!1:this.allArgs.requestFocusOnStart);this.allArgs.showSummaryBar=
!1;this.topicBase="/ML/"+this.channel;this.allArgs.topicBase=this.topicBase;f.subscribe("/nonModalDialogClose",this,"purgeAll");this.manager=b.getInstance(this.channel);this.peerDocuments=[];this.variableListeners=[];this.hasFocus=!1;this.focusedDocument=null;this.managerListeners=[];this._setupListeners()},_setupListeners:function(){var a=this;this.addEventListener("variableAdded",function(h){h=h.data.peerDoc;a.workspaceDocument=h;c.logDebug("WSBManager: Document Added");h.addEventListener("viewAdded",
function(h){c.logDebug("WSBManager: View Added");var k=h.data.peerDoc;h=h.data.peerView;a.dispatchEvent("workspaceReady",k.domNode,{workspaceBrowser:a,widget:k,view:h});h.peerNode.addEventListener("peerEvent",e.hitch(a,"_handleVariableEvents"));var b=function(h){c.logDebug("WSBManager: View Ready");h=h.data.peerView;var k=h.table,d=k.domNode;k.startup&&k.startup();a.useJsDragDrop&&!k.useDojoDnD&&(k.dragEnterListener=d.addEventListener("dragenter",e.hitch(a,a._onDragEnter,d,a.dropZoneClass)),k.dragOverListener=
d.addEventListener("dragover",e.hitch(a,a._onDragOver)),k.dragLeaveListener=d.addEventListener("dragleave",e.hitch(a,a._onDragLeave,d,a.dropZoneClass)),k.dropListener=d.addEventListener("drop",e.hitch(a,a._onDrop,d,a.dropZoneClass)));h.table.sendSelectionRanges=!1;h.removeEventListener("viewReady",b,this)};h.addEventListener("viewReady",b)});h.addEventListener("viewRemoved",function(a){c.logDebug("WSBManager: View Removed")})});this.addEventListener("variableRemoved",function(a){c.logDebug("WSBManager: Document Removed")})},
_addDocument:function(a){this.inherited(arguments);var c=this.peerDocuments[a.getProperty("docID")];d.add(c.domNode,this._WSB_DOC_CLASS);this.allArgs.keyboardAccessibility&&(c.allArgs.keyBindingSelector="."+this._WSB_DOC_CLASS)},_handleVariableEvents:function(a){c.logDebug("WSBManager: peerEvent: "+a.data.type);a.data.type&&"VariablesAdded"===a.data.type&&this.workspaceDocument?a.data.Variables?(c.logDebug("WSBManager: VariablesAdded: "+a.data.Variables),this.dispatchEvent("variablesAdded",this.workspaceDocument.domNode,
{workspaceBrowser:this,variables:a.data.Variables})):l.warn("WSBManager Server VariablesAdded with no variables."):a.data.type&&"VariablesRemoved"===a.data.type&&this.workspaceDocument?a.data.Variables?(c.logDebug("WSB: VariablesRemoved: "+a.data.Variables),this.dispatchEvent("variablesRemoved",this.workspaceDocument.domNode,{workspaceBrowser:this,variables:a.data.Variables})):l.warn("WSBManager Server VariablesRemoved with no variables."):a.data.type&&"VariablesChanged"===a.data.type&&this.workspaceDocument?
a.data.Variables?(c.logDebug("WSBManager: VariablesChanged: "+a.data.Variables),this.dispatchEvent("variablesChanged",this.workspaceDocument.domNode,{workspaceBrowser:this,variables:a.data.Variables})):l.warn("WSBManager Server VariablesChanged with no variables."):a.data.type&&"error"===a.data.type&&(a.data.message?l.error(a.data.message):l.warn("WSBManager Server error with no message."))},getSelectedFields:function(){if(this.workspaceDocument&&this.workspaceDocument.clientPeerView&&this.workspaceDocument.clientPeerView.getSelectedFields)return this.workspaceDocument.clientPeerView.getSelectedFields()},
destroy:function(){k.deleteWorkspaceBrowser(this)}})})},"workspacebrowser/WorkspaceBrowserDnD":function(){define("workspacebrowser/WorkspaceBrowserDnD","dojo/_base/declare dojo/_base/lang variableeditor/VariableEditorDnD datatoolsservices/DataToolsUtils dojo/string mw-remote/Remote workspacebrowser/UploadFilesWidget dojo/i18n!workspacebrowser/app/l10n/nls/app dojo/domReady!".split(" "),function(g,f,e,d,b,a,c,h){return g("workspacebrowser.WorkspaceBrowserDnD",[e],{dropZoneClass:"WSBDropZone",loadCommand:"load",
importCommand:"uiimport",validType:"Files",constructor:function(a){this.layoutService=a.layoutService;this.executionService=a.executionService;this.fileDataService=a.fileDataService;this.connectorUpload=!1;this.ValidDataFlavor=this.validType},_onDrop:function(c,b,d){var e=d.dataTransfer.files;0<e.length?(-1<a.getEndPoint().indexOf("localhost")&&(this.connectorUpload=!0),this.handleUpload(e)):d.dataTransfer.types.contains&&d.dataTransfer.types.contains("Files")&&this._displayDialog(h.unsupportedEmptyUpload);
this.inherited(arguments)},handleUpload:function(a){var b=this.unsupportedFileSize(a);b.emptyFileOrFolder?this._displayDialog(h.unsupportedEmptyUpload):!this.connectorUpload&&b.largeFile?this._displayDialog(h.unsupportedLargeUpload,b.largeFileName):this.unsupportedUpload(a)?this._displayDialog(h.importWizardWarning):(this.uploadFilesWidget=new c({fileDataService:this.fileDataService,layoutService:this.layoutService,fileList:a,connectorUpload:this.connectorUpload}),this.uploadFilesWidget.onuploadSuccess=
f.hitch(this,"uploadFiles",a),this.layoutService.addWidget("uploadWidget","newDialog",this.uploadFilesWidget,{title:"UploadDialog"}))},_displayDialog:function(a,c){c&&(a=b.substitute(a,[c]));d.displayErrorMessage(a,h.errorDialogTitle,"info")},unsupportedUpload:function(a){return 1<a.length?!this.isMATFileList(a):!1},unsupportedFileSize:function(a){for(var c={},h=0;h<a.length;h++){var b=a[h].size;if(0===b||!a[h].type&&0===b%4096){c.emptyFileOrFolder=!0;break}else if(268435456<b){c.largeFile=!0;c.largeFileName=
a[h].name;break}}return c},isMATFileList:function(a){for(var c=0;c<a.length;c++)if("mat"!==a[c].name.split(".").pop())return!1;return!0},loadFiles:function(a,c){1==a.length&&!this.isMATFileList(a)?this.executeCommand(a,c,this.importCommand):this.executeCommand(a,c,this.loadCommand)},executeCommand:function(a,c,h){if(this.executionService)for(var b=h,d=0;d<a.length;d++)h=b+"('"+c+"/"+a[d].name+"')",this.uploadFilesWidget.connectorUpload&&(h=b+"([pwd '\\' '"+a[d].name+"'])"),this.executionService.executionEval(h)},
uploadFiles:function(a){this.loadFiles(a,this.uploadFilesWidget.uploadDestinationUrl);this.uploadFilesWidget.onClose()}})})},"workspacebrowser/UploadFilesWidget":function(){define("dojo/_base/declare dojo/dom-attr dojo/dom-construct dojo/dom-style dojo/on dojo/string dijit/_TemplatedMixin dijit/_WidgetBase dijit/_WidgetsInTemplateMixin mw-remote/Remote mw-filename-utils/FileNameUtil mw-html-utils/HtmlUtils dojo/i18n!workspacebrowser/app/l10n/nls/app dojo/text!./UploadWidget.html".split(" "),function(g,
f,e,d,b,a,c,h,k,l,m,p,n,q){var r=function(a){return p.parseUrl(a).hostname};g=g([h,c,k],{templateString:q,constructor:function(a){a=a||{};this.fileDataService=a.fileDataService;this.layoutService=a.layoutService;this.fileList=a.fileList;this.uploadDestinationUrl="";this.connectorUpload=a.connectorUpload},postCreate:function(){var c=this,h=c.iframe,k=c.progressBarContainer,p=c.progressBar,q=0,g=c.message,y=l.getWorkerRoutingHost();this.connectorUpload&&(y=y.slice(0,-1));var B=c.fileDataService;c.own(b(window,
"message",function(f){if(r(f.origin)===r(y))switch(f.data.type){case "iframeIsReady":h.contentWindow&&h.contentWindow.postMessage(c.fileList,y);q=c.fileList.length;f=a.substitute(n.uploadingFiles,[q]);g.textContent=f;break;case "updateProgressBar":f=Math.round(100*f.data.loaded/f.data.total);d.set(p,"width",f+"%");100===f&&(g.textContent=n.waitingForServerResponse);break;case "uploadFinished":e.destroy(k);var l=f.data.response;200===f.data.status&&-1<l.indexOf("SUCCESS")?b.emit(c,"uploadSuccess"):
g.textContent=n.uploadFailed;break;case "uploadCanceled":c.onClose()}}));var D="",E=l.getUploadIframeProxyUrl();this.connectorUpload?D=encodeURI(y+"/users/"):(B=this.uploadDestinationUrl=m.pathFromFileInfo(B.currentWorkingFolder),D=encodeURI(y+B.substring(1,B.length)));f.set(h,"src",E+"\x26uploadDestinationUrl\x3d"+D);this.inherited(arguments)},onClose:function(){this.layoutService.removeWidget("uploadWidget")},startup:function(){this.inherited(arguments)}});g._forTestingOnly={getHostName:r};return g})},
"variableeditor/views/ViewManifest":function(){require(["variableeditor/views/InspectorViews","variableeditor/views/VariableEditorViews","variableeditor/views/UITableViews"],function(){})},"variableeditor/views/InspectorViews":function(){require("variableeditor/views/editors/ArrayOfValuesTextBoxEditor variableeditor/views/editors/ArrayOfStringsTextBoxEditor variableeditor/views/editors/ArrayOfDatesTextBoxEditor variableeditor/views/editors/ArrayOfNumbersTextBoxEditor variableeditor/views/editors/FontNameEditor variableeditor/views/editors/BinaryToggleButtonEditor variableeditor/views/editors/ToggleButtonGroupEditor variableeditor/views/editors/ScaleColorsTextBoxEditor variableeditor/views/editors/PopupVariableEditor variableeditor/views/editors/ColorEditor variableeditor/views/editors/ColorTextBoxEditor variableeditor/views/editors/ColormapEditor variableeditor/views/editors/RGBColorEditor variableeditor/views/editors/ObjectEditor/GraphicsObjectEditor variableeditor/views/renderers/ColorOrderRenderer variableeditor/views/editors/ColorOrderEditor variableeditor/views/editors/DisplayFormatTextBoxEditor variableeditor/views/editors/FilePickerEditor variableeditor/views/editors/UITableColumnTextBoxEditor".split(" "),
function(){})},"variableeditor/views/editors/ArrayOfValuesTextBoxEditor":function(){define("variableeditor/views/editors/ArrayOfValuesTextBoxEditor",["dojo/_base/declare","datatoolsservices/DataToolsUtils","variableeditor/views/editors/TextBoxEditor"],function(g,f,e){return g("variableeditor.views.editors.ArrayOfValuesTextBoxEditor",[e],{_applyFormatting:function(d,b){var a=null;if("client"===!b)return d;if(!Array.isArray(d)&&"string"===typeof d){if(""===d)return this._getEmptyReturnValue();try{a=
JSON.parse(d),a instanceof Array||(a=[a])}catch(c){0===d.indexOf("[")&&d.lastIndexOf("]")===d.length-1&&(d=d.substring(1,d.length-1)),a=d.replace(/,/g," ").split(/\s+/)}var h=!0;if("categorical"===this._state.classname||"datetime"==this._state.classname||"duration"==this._state.classname)h=!1;h&&(a=a.map(function(a){var c=f.filterFloat(a);return c!==c?a:c}.bind(this)));return a}return d},setCursorPosition:function(){var d=this._getUIValue().length;f.selectRange(this._inputBox.inputNode,d,d)},_getEmptyReturnValue:function(){return[""]}})})},
"variableeditor/views/editors/TextBoxEditor":function(){define("variableeditor/views/editors/TextBoxEditor","dojo/_base/declare dojo/_base/lang dojo/dom-style dojo/keys dojo/on datatoolsservices/DataToolsUtils datatoolsservices/constants/CssClassConstants variableeditor/views/editors/_EditorBase mw-form/TextField dijit/focus".split(" "),function(g,f,e,d,b,a,c,h,k,l){return g("variableeditor.views.editors.TextBoxEditor",[h],{_inputBox:void 0,_removeQuotes:!1,_originalEditValue:void 0,formattedVal:"",
setValue:function(c,h,b){c=this._applyFormatting(c,h);if(c===this._value)this._value=""+this._value;else{var k=b||this.formattedVal?b||this.formattedVal:c;this.formattedVal=null;c&&c.hasOwnProperty("value")&&(k=c.value);this._inputBox&&this._setUIValue(k);c=k;a.compareValues(this._value,c)||(c=this.updateBeforeSendToServer(c,h),this.inherited(arguments))}},startup:function(){this._setReadOnly(!0)},updateBeforeSendToServer:function(a,c){return a},setEditValue:function(c,h,b){c=this._applyFormatting(c,
h);a.compareValues(this._editValue,c)||(this.inherited(arguments),this._editValue=b||this.formattedVal?b||this.formattedVal:c,this.formattedVal=null,void 0===h&&(h="client"),this.dispatchEvent("editValueChanged",this,{renderer:this,oldValue:this.oldValue,newValue:c,source:h}))},setState:function(c){this.domNode&&JSON.stringify(this._oldState)!==JSON.stringify(c)&&(this._oldState=JSON.parse(JSON.stringify(c)),this._inputBox||this._setupInputNode(),this._setupDomClasses(c),this._inputBox.inputNode.setAttribute("data-tag",
this.createDataTag("value")),this.inherited(arguments),void 0!==c.isMetaData&&(this._state.isMetaData=a.getLogicalValue(c.isMetaData,!1)),this._state.isMetaData&&(this._commitOnBlur=!1),void 0===c.doCommitEmptyMetaData&&(this._state.doCommitEmptyMetaData=!0))},_setupDomClasses:function(h){var b=h?h.dataType?h.dataType:h["class"]?h["class"]:"char":"char",k=h?h.isTemporaryValue:!1;h=a.getLogicalValue(h?h.isMetaData:!1,!1);this._applyCssClass(b,k,!1,this._inputBox.domNode);this._applyCssClass(b,k,!1,
this._inputBox.inputNode);this.addCSSClasses("cellRenderer",this.domNode);this.isEditable()?this.removeCSSClasses("variableEditorNotEditable",this.domNode):this.addCSSClasses("variableEditorNotEditable",this.domNode);e.set(this._inputBox.inputNode,"width","inherit");h&&a.addToClassList(this._inputBox.inputNode,c.IS_METADATA)},_handleKeyboardEvent:function(a){if(this.isEditing()){"keypress"===a.type?this._handleKeyPress(a):"keydown"===a.type&&this._handleKeyDown(a);var c=a;c.editor=this;this.dispatchEvent(a.type,
this.domNode,c);a.stopPropagation()}else this.inherited(arguments)},_handleStringFormatting:function(c){var h=this.getCursorPosition(),b=this._getUIValue(),k=null;this._handleFormatting?k=this._handleFormatting(h,b,c):this._state&&(this._state.dataType&&"string"===this._state.dataType)&&(k=a.handleFormatting(h,b,c));k&&(c=a.formatString(k,"client"),this.formattedVal=k,this._setUIValue(c),this.setCursorPosition(h[0]+1,h[0]+1))},_handleKeyDown:function(a){if(a){var c=this._getKeyCode(a);null!==c&&c===
d.ESCAPE?(this.cancelEditing(),a.preventDefault()):c===d.TAB?this._handleStringFormatting("tab"):null!==c&&c===d.ENTER&&(a.altKey?this._handleStringFormatting("newLine"):(this.formattedVal&&(this.setValue(this.formattedVal,"client",this._getUIValue()),this.formattedVal=""),this.stopEditing(),this.addCSSClasses("focused"),this._setupBlurListener(),a.preventDefault()))}},_handleKeyPress:function(a){if(a){var c=this._getKeyCode(a);null!==c&&c===d.ENTER&&(this.stopEditing(),a.preventDefault())}},_handleMouseUp:function(){this.isEditable()&&
this.isEditOnSingleClick()&&this._setReadOnly(!1);this._focus()},_setupInputNode:function(){this._inputBox=new k({readOnly:!0,value:this._value,editable:this._allArgs.editable});this._inputBox.domNode.setAttribute("data-tag",this.createDataTag("textboxeditor"));this.own(this._inputBox);this._setupInputNodeListeners();this._inputBox._handleEnterKey=function(){};this.domNode.appendChild(this._inputBox.domNode);this.focusNode=this._inputBox.focusNode},_editOnFocus:function(){!this.isEditing()&&(this.isEditOnSingleClick()&&
this.isEditable())&&(this._inPlaceEditor===this||!this._inPlaceEditor?this.edit():this._inPlaceEditor&&this._inPlaceEditor.edit&&this._inPlaceEditor.edit())},_setupInputNodeListeners:function(){var a=this,c=f.hitch(this,"_handleKeyboardEvent");this._inputNodeListeners={};this._inputNodeListeners.keypress=b(this._inputBox.domNode,"keypress",c);this._inputNodeListeners.keydown=b(this._inputBox.domNode,"keydown",c);this._inputNodeListeners.mouseup=this._inputBox.on("mouseup",function(){var c=a._inputBox.inputNode.selectionStart,
h=a._inputBox.inputNode.selectionEnd;a._inputBox.set("cursorPosition",[c,h]);a.set("cursorPosition",[c,h])});this._inputNodeListeners.focus=l.on("widget-focus",function(c){c===a._inputBox&&a._editOnFocus()})},getCursorPosition:function(){return[a.getSelectionStart(this._inputBox.inputNode),a.getSelectionEnd(this._inputBox.inputNode)]},setCursorPosition:function(c,h){a.selectRange(this._inputBox.inputNode,c,h)},_getDefaultState:function(){return{isMetaData:!1,doCommitEmptyMetaData:!0,editorValue:""}},
_handleClick:function(a){this._editOnSingleClick&&(void 0===this._doubleClickTimer&&!a.metaKey&&!a.ctrlKey&&!this.isEditing()&&this.isEditable())&&(this._setReadOnly(!1),a=this.getCursorPosition(),this.setCursorPosition(a[0],a[1]))},postCreate:function(){this._inputBox||this._setupInputNode();this.own(b(this._inputBox,"click",this._handleClick.bind(this)));this.inherited(arguments)},stopEditing:function(){this.isEditing()&&(this._setReadOnly(!0),this.setCursorPosition(-1,-1),this.inherited(arguments))},
edit:function(){this.isEditing()||(this._setReadOnly(!1),this.inherited(arguments),this._editValue&&this._setUIValue(this._editValue),this._getUIValue(),a.getLogicalValue(this.getState().isMetaData,!1)&&this._setUIValue(""),!1===this._editOnSingleClick&&a.selectAllText(this._inputBox.inputNode))},editOverride:function(a){this.isEditing()||(this._setReadOnly(!1),this.inherited(arguments),this._setUIValue(a),this.setCursorPosition(a.length,a.length))},cancelEditing:function(){this.isEditing()&&(this.formattedVal&&
(this.formattedVal=""),this._setUIValue(this._originalValue),this._editValue=this._originalEditValue,this.inherited(arguments))},hasValueChanged:function(a){var c=this.inherited(arguments),h=this._getPossibleBooleanFunctionValue(this.getState().isMetaData),b=this._getPossibleBooleanFunctionValue(this.getState().doCommitEmptyMetaData);!0===h&&!1===b&&(c=c&&""!==a);return c},_commit:function(){if(this.formattedVal)this.setValue(this.formattedVal,"client",this._getUIValue()),this.formattedVal="";else{var a=
this._getUIValue();null!==a&&void 0!==a&&this.hasValueChanged(a)?this.setValue(a,"client"):this._setUIValue(this._originalValue)}},_revert:function(){this.inherited(arguments);this._editValue=this._originalEditValue},_getUIValue:function(){return this._inputBox.inputNode.value},_setUIValue:function(a){a!==this._getUIValue("value")&&(this._inputBox.set("value",a+" "),this._inputBox.set("value",a))},setEditable:function(a){this.inherited(arguments);this._inputBox&&(this._inputBox.set("editable",this.isEditable()),
this.isEditable()?this.removeCSSClasses(this._notEditableCSSClass,this._inputBox.inputNode):this.addCSSClasses(this._notEditableCSSClass,this._inputBox.inputNode))},_setReadOnly:function(a){this._inputBox&&(!0===a?this._inputBox.set("readOnly",!0):this._inputBox.set("readOnly",!1))},_focus:function(){this._inputBox&&this._inputBox.focusNode&&this._inputBox.focusNode.focus&&l.curNode!==this._inputBox.focusNode&&l.focus(this._inputBox.focusNode)},setRemoveQuotes:function(a){this._removeQuotes=a},getRemoveQuotes:function(){return this._getPossibleBooleanFunctionValue(this._removeQuotes,
!1)},_applyFormatting:function(c,h){var b=c;if("server"===h){if(!0===this.getRemoveQuotes())b=a.stripOuterSingleQuotes(c);else{var k=a.stripOuterSingleQuotes(c);c!==k&&(b="'"+k.replace(/\'/g,"''")+"'")}this._state&&"string"===this._state.dataType&&(this.formattedVal=a.formatString(c,h))}return b},getStyleNode:function(a){return"backgroundColor"===a?this.domNode:this.focusNode},destroy:function(){this._changeObjectListenersState(this._inputNodeListeners,"remove");this.inherited(arguments)},_handleBlurEvent:function(a){a===
this&&(this.removeCSSClasses("Editing"),this.removeCSSClasses("focused"),this.inherited(arguments))}})})},"variableeditor/views/editors/_EditorBase":function(){define("variableeditor/views/editors/_EditorBase","dojo/_base/declare dojo/_base/lang dojo/on dojo/dom-construct dijit/focus variableeditor/views/renderers/_RendererBase mw-peermodel/Observable".split(" "),function(g,f,e,d,b,a,c){return g("variableeditor.views.editors._EditorBase",[a,c.Impl],{_renderer:void 0,_editing:!1,_commitOnBlur:!0,_originalValue:void 0,
_originalState:void 0,_blurListeners:void 0,_notEditableCSSClass:"venoteditable",constructor:function(a){this._editing=!1;this._commitOnBlur=!0;this._renderer=void 0;a&&this.init(a);this._blurListeners={}},destroy:function(){this.inherited(arguments);this.commitOnBlur=this._commitOnBlur=null;delete this._allArgs.commitOnBlur;this._allArgs.commitOnBlur=null},init:function(a){a&&(this._allArgs=f.mixin({},a),this._renderer=a.renderer||this,this._commitOnBlur=void 0!==a.commitOnBlur?a.commitOnBlur:void 0!==
a.editable?a.editable:!0,this._originalValue=a.value,this._originalState=a.state,this._value=a.value,this._state=a.state,this._editable=this._getPossibleBooleanFunctionValue(a.editable));this.inherited(arguments)},setRenderer:function(a){this._renderer=a},postCreate:function(){this.inherited(arguments)},_setupBlurListener:function(){this._changeObjectListenersState(this._blurListeners,"remove");var a=e(b,"widget-blur",this._handleBlurEvent.bind(this));this._blurListeners.widgetBlur=a},_handleBlurEvent:function(a){a===
this&&(this._clickCount=0,this._getPossibleBooleanFunctionValue(this._commitOnBlur,!0)&&this._editing?this.stopEditing():this._editing&&this.cancelEditing())},_changeListenerState:function(a){a&&"string"===typeof a&&(this.inherited(arguments),this._changeObjectListenersState(this._blurListeners,a))},_handleMouseEvent:function(a){if(this._renderer===this)this.inherited(arguments);else{var c=a;c.renderer=this;this.dispatchEvent(a.type,this,c);a.stopPropagation()}},_handleKeyboardEvent:function(a){this.isEditing()||
this.inherited(arguments)},_focus:function(a){a&&a.isFocusable&&a.isFocusable()&&a.focusNode?b.focus(a.focusNode):a&&(a.domNode&&a.domNode.focus)&&a.domNode.focus()},_swapOutRenderer:function(){this._renderer&&this._renderer!==this&&(this._renderer.domNode&&this.domNode)&&(d.place(this.domNode,this._renderer.domNode,"replace"),this._resumeListeners());(!this.application||"EmbeddedInspectorInRichEditor"!==this.application)&&this._focus(this)},_swapInRenderer:function(){this._renderer&&this._renderer!==
this&&(this._renderer.domNode&&this.domNode)&&(d.place(this._renderer.domNode,this.domNode,"replace"),this._pauseListeners());(!this.application||"EmbeddedInspectorInRichEditor"!==this.application)&&this._focus(this._renderer)},edit:function(){this._editing||(this.addCSSClasses("Editing"),this.addCSSClasses("focused"),this._originalValue=this._value,this._originalState=this.getState(),this._editing=!0,this._swapOutRenderer(),this.dispatchEvent("editingStarted",this,{editor:this,currentValue:this._value,
currentState:this._state}));this._changeObjectListenersState(this._mouseListeners,"pause");this._setupBlurListener();this._keyboardListeners.keypress.pause()},editOverride:function(a){this._editing||(this.addCSSClasses("Editing"),this.addCSSClasses("focused"),this._originalValue=this._value,this._originalState=this.getState(),this._editing=!0,this._swapOutRenderer(),this.dispatchEvent("editingStarted",this,{editor:this,overrideValue:a,currentValue:this._value,currentState:this._state}));this._changeObjectListenersState(this._mouseListeners,
"pause");this._setupBlurListener();this._keyboardListeners.keypress.pause()},stopEditing:function(){this._editing&&(this.removeCSSClasses("Editing"),this.removeCSSClasses("focused"),this._commit(),this._clickCount=0,this._originalState=this.getState(),this._editing=!1,this._swapInRenderer(),this.dispatchEvent("editingStopped",this,{editor:this,value:this._value,state:this._state}));this._changeObjectListenersState(this._mouseListeners,"resume");this._changeObjectListenersState(this._blurListeners,
"remove");this._keyboardListeners.keypress.resume()},cancelEditing:function(){this._editing&&(this.removeCSSClasses("Editing"),this.removeCSSClasses("focused"),this._value=this._originalValue,this._state=this._originalState,this.dispatchEvent("editingCanceled",this,{editor:this}),this.stopEditing())},isEditing:function(){return this._editing},setEditable:function(a){this._getPossibleBooleanFunctionValue(this._editable)!==this._getPossibleBooleanFunctionValue(a)&&(this._editable=a,a=this._getPossibleBooleanFunctionValue(this._editable),
this.domNode&&(a||this.isEditing()&&this.cancelEditing(),this._setReadOnly(!a)))},_getUIValue:function(){return"Method must be overridden"},_setUIValue:function(){return"Method must be overridden"},_commit:function(){var a=this._getUIValue();null!==a&&void 0!==a&&this.hasValueChanged(a)?this.setValue(a,"client"):this._setUIValue(this._originalValue)},_revert:function(){this._setUIValue(this._originalValue);this._value=this._originalValue;this._state=this._originalState},setDependentProperties:function(a,
c){}})})},"variableeditor/views/renderers/_RendererBase":function(){define("variableeditor/views/renderers/_RendererBase","dojo/_base/declare dojo/_base/lang dojo/on dojo/mouse dojo/keys dojo/dom-class dijit/focus dijit/_WidgetBase datatoolsservices/constants/ClassTypeMaps datatoolsservices/constants/CssClassConstants datatoolsservices/DataToolsUtils mw-log/Log mw-peermodel/Observable".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p,n){return g("variableeditor.views.renderers._RendererBase",[h,n.Impl],
{_editable:!1,_editOnSingleClick:!1,_editOnKeyPress:!0,_editor:void 0,_inPlaceEditor:void 0,_value:void 0,_editValue:void 0,_state:void 0,_mouseListeners:{},_keyboardListeners:{},_allArgs:{},_lastEditTimeStamp:(new Date).getTime(),_clickCount:0,_doubleClickTimer:void 0,_doubleClickDuration:300,_editorListenersPaused:!1,_rendererBlurListeners:null,constructor:function(a){this._editOnSingleClick=this._editable=!1;this._editOnKeyPress=!0;this._state=this._editValue=this._value=this._inPlaceEditor=this._editor=
void 0;this._mouseListeners={};this._keyboardListeners={};this._allArgs=f.mixin({},a);this._lastEditTimeStamp=(new Date).getTime();this._clickCount=0;a&&this.init(a)},init:function(a){a&&(this.setEditable(void 0!==a.editable?this._getPossibleBooleanFunctionValue(a.editable,!1):!1),this.setEditOnSingleClick(void 0!==a.editOnSingleClick?this._getPossibleBooleanFunctionValue(a.editOnSingleClick,!1):!1),this.setEditOnKeyPress(void 0!==a.editOnKeyPress?this._getPossibleBooleanFunctionValue(a.editOnKeyPress,
!0):!0),this.setValue(a.value),this.setEditValue(a.editValue),this.setState(a.state),this.setInPlaceEditor(a.inPlaceEditor),this.setEditor(a.editor))},postCreate:function(){this._setupKeyboardListeners();this._setupMouseListeners();void 0!==this._allArgs.value&&this.setValue(this._allArgs.value);void 0!==this._allArgs.state&&this.setState(this._allArgs.state);void 0!==this._allArgs.cssSpecifier&&this.addCSSClasses(this._allArgs.cssSpecifier)},destroy:function(){this._removeListeners();this._editor&&
void 0===this._editor._destroyed&&(this._editor.destroy(),this._editor=null);this._inPlaceEditor=this._renderer=null;this._rendererBlurListeners&&this._rendererBlurListeners.widgetBlur&&(this._rendererBlurListeners.widgetBlur.remove(),delete this._rendererBlurListeners.widgetBlur,this._rendererBlurListeners=null,delete this._rendererBlurListeners);this.inherited(arguments)},_setupRendererBlurListeners:function(){var a=f.hitch(this,"_handleRendererBlurEvent");this._rendererBlurListeners={widgetBlur:e.pausable(c,
"widget-blur",a)}},_handleRendererBlurEvent:function(a){a===this&&(this._clickCount=0,this._rendererBlurListeners&&this._rendererBlurListeners.widgetBlur&&(this._rendererBlurListeners.widgetBlur.remove(),this._rendererBlurListeners=null))},_setupMouseListeners:function(){this._changeObjectListenersState(this._mouseListeners,"remove");var a=f.hitch(this,"_handleMouseEvent");this._mouseListeners.mousedown=e.pausable(this.domNode,"mousedown",a);this._mouseListeners.mouseup=e.pausable(this.domNode,"mouseup",
a);this._mouseListeners.click=e.pausable(this.domNode,"click",a);this._mouseListeners.dblclick=e.pausable(this.domNode,"dblclick",a);this._mouseListeners.mousemove=e.pausable(this.domNode,"mousemove",a);this._mouseListeners.mouseover=e.pausable(this.domNode,"mouseover",a);this._mouseListeners.mouseout=e.pausable(this.domNode,"mouseout",a);this._mouseListeners.mouseenter=e.pausable(this.domNode,"mouseenter",a);this._mouseListeners.mouseleave=e.pausable(this.domNode,d.leave,a)},_handleMouseEvent:function(a){a.renderer=
this;this.dispatchEvent(a.type,this,a);"dblclick"===a.type&&(!a.metaKey&&!a.ctrlKey)&&(this._doubleClickTimer&&(clearTimeout(this._doubleClickTimer),this._doubleClickTimer=void 0),this._edit(),this._clickCount=0);"mouseup"===a.type&&(this._setupRendererBlurListeners(),!this._editOnSingleClick&&this._inPlaceEditor===this&&this._focus());if(this.isEditable()){if("mouseup"===a.type){if(this._handleMouseUp){!this._editOnSingleClick&&this._inPlaceEditor===this&&this._handleMouseUp();return}a.stopPropagation()}if("click"===
a.type){this._clickCount+=1;var c=f.hitch(this,this._delayedInPlaceEdit);this._editOnSingleClick?void 0===this._doubleClickTimer&&(!a.metaKey&&!a.ctrlKey)&&(this._doubleClickTimer=setTimeout(c,this._doubleClickDuration)):void 0===this._doubleClickTimer&&2===this._clickCount&&(!a.metaKey&&!a.ctrlKey)&&(this._doubleClickTimer=setTimeout(c,this._doubleClickDuration));a.stopPropagation()}("mousedown"===a.type||"dblclick"===a.type)&&a.stopPropagation()}},_delayedInPlaceEdit:function(){this._inPlaceEdit();
this._doubleClickTimer=void 0;this._clickCount=0},_edit:function(){var a=(new Date).getTime()-this._lastEditTimeStamp>=this._doubleClickDuration;this._editor&&this._editor.edit&&(!this.isEditing()||!a)?(this._editor!==this&&(this._editor.setValue(this._value),this._editor.setEditValue(this._editValue),this._editor.setState(this._state)),this._editor.edit(),this._lastEditTimeStamp=(new Date).getTime()):this._inPlaceEdit()},edit:function(){this._inPlaceEditor?this._inPlaceEdit():this._edit()},stopEditing:function(){this.isEditing()&&
(this._inPlaceEditor&&this._inPlaceEditor.stopEditing&&this._inPlaceEditor.stopEditing(),this._editor&&this._editor.stopEditing&&this._editor.stopEditing())},cancelEditing:function(){this.isEditing()&&(this._inPlaceEditor&&this._inPlaceEditor.cancelEditing&&this._inPlaceEditor.cancelEditing(),this._editor&&this._editor.cancelEditing&&this._editor.cancelEditing())},_inPlaceEdit:function(){this.isEditable()&&(this._inPlaceEditor&&this._inPlaceEditor.edit&&!this.isEditing())&&(this._inPlaceEditor!==
this&&(this._editorListenersPaused=!0,this._inPlaceEditor.setValue(this._value),this._inPlaceEditor.setEditValue(this._editValue),this._inPlaceEditor.setState(this._state),this._editorListenersPaused=!1),this._lastEditTimeStamp=(new Date).getTime(),this._inPlaceEditor.edit())},_setupKeyboardListeners:function(){this._changeObjectListenersState(this._keyboardListeners,"remove");var a=f.hitch(this,"_handleKeyboardEvent");this._keyboardListeners.keypress=e.pausable(this.domNode,"keypress",a);this._keyboardListeners.keydown=
e.pausable(this.domNode,"keydown",a)},_handleKeyboardEvent:function(a){a.renderer=this;this.dispatchEvent(a.type,this,a);if(this.isEditable()&&"keypress"===a.type&&this._isValidKeyPressEvent(a)&&this.isEditOnKeyPress()){var c=this._getKeyCode(a);this._inPlaceEditor&&(this._inPlaceEditor.editOverride&&null!==c&&c!==b.ENTER)&&(this._inPlaceEditor.editOverride(this._getStringForEvent(a)),a.preventDefault())}8===this._getKeyCode(a)&&a.preventDefault()},_setupEventListeners:function(a){this.addEventListener&&
(this.addEventListener("valueChanged",f.hitch(a,a.onValueChanged)),this.addEventListener("editingStarted",f.hitch(a,a.onEditingStarted)),this.addEventListener("editingStopped",f.hitch(a,a.onEditingStopped)),this.addEventListener("mousedown",f.hitch(a,a.onMouseDown)),this.addEventListener("mouseenter",f.hitch(a,a.onMouseEnter)),this.addEventListener("mouseup",f.hitch(a,a.onMouseUp)))},setEditable:function(a){this._editable=a},_getPossibleBooleanFunctionValue:function(a,c){if("function"===typeof a)return a.call(this,
this._state,this._value);void 0===c&&(c=!0);return m.getLogicalValue(a,c)},isEditable:function(){return this._getPossibleBooleanFunctionValue(this._editable)},setEditOnSingleClick:function(a){this._editOnSingleClick=a},isEditOnSingleClick:function(){return this._getPossibleBooleanFunctionValue(this._editOnSingleClick)},setEditOnKeyPress:function(a){this._editOnKeyPress=a},isEditOnKeyPress:function(){return this._getPossibleBooleanFunctionValue(this._editOnKeyPress)},setEditor:function(a,c){var h=
this;a===this?this._editor=this:this._createEditor(a,"_editor",function(a){h._editor=a.editor;h._setupEditorListeners("_editor");c&&"function"===typeof c&&c({renderer:a.renderer,editor:a.editor})})},getEditor:function(){return this._editor},setInPlaceEditor:function(a,c){var h=this;a===this?this._inPlaceEditor=this:""===a||null===a||void 0===a?this._setReadOnly&&this._setReadOnly(!0):this._createEditor(a,"_inPlaceEditor",function(a){h._inPlaceEditor=a.editor;h._setupEditorListeners("_inPlaceEditor");
c&&"function"===typeof c&&c({renderer:a.renderer,inPlaceEditor:a.editor})})},getInPlaceEditor:function(){return this._inPlaceEditor},_createEditor:function(a,c,h){if(a&&"string"===typeof a){var b=this;try{require([a],function(a){try{if(b.isInstanceOf(a))b[c]=b,b._renderer=b;else{var k=b[c];if(k&&k.isInstanceOf(a))k.setValue(b._value),k.setEditValue(b._editValue),k.setState(b._state);else{var d=f.mixin(b._allArgs,{renderer:b,value:b.getValue(),state:b._state,inPlaceEditor:void 0,editor:void 0}),e=
new a(d);e.startup&&e.startup();b.own(e);b._createEditor(e,c,h)}}}catch(l){p.error(l)}})}catch(k){p.error(k)}}else h&&"function"===typeof h&&h({renderer:this,editor:a})},_setupEditorListeners:function(a){if(a=this[a])a.addEventListener("valueChanged",f.hitch(this,"_editorValueChanged")),a.addEventListener("stateChanged",f.hitch(this,"_editorStateChanged")),a.addEventListener("editingStarted",f.hitch(this,"_handleEditorEditingStarted")),a.addEventListener("editingStopped",f.hitch(this,"_handleEditorEditingStopped")),
a.addEventListener("editingCanceled",f.hitch(this,"_handleEditorEditingCanceled"))},_handleEditorEditingStarted:function(a){a=f.mixin(a.data,{renderer:this});this.dispatchEvent("editingStarted",this,a);this._changeObjectListenersState(this._mouseListeners,"pause");this._changeObjectListenersState(this._keyboardListeners,"pause")},_handleEditorEditingStopped:function(a){a=f.mixin(a.data,{renderer:this});this.dispatchEvent("editingStopped",this,a);this._clickCount=0;this._changeObjectListenersState(this._mouseListeners,
"resume");this._changeObjectListenersState(this._keyboardListeners,"resume")},_handleEditorEditingCanceled:function(a){a=f.mixin(a.data,{renderer:this});this.dispatchEvent("editingCanceled",this,a);this._changeObjectListenersState(this._mouseListeners,"resume");this._changeObjectListenersState(this._keyboardListeners,"resume")},_editorValueChanged:function(a){this._editorListenersPaused||this.setValue(a.data.newValue)},_editorStateChanged:function(a){this._editorListenersPaused||this.setState(a.data.newState)},
setValue:function(a,c,h){m.compareValues(this._value,a)||(void 0===c&&(c="client"),this._originalValue=h=this._value,this._value=a,this._originalEditValue=this._editValue,this._editValue=a,this._inPlaceEditor&&(this._inPlaceEditor!==this&&this._inPlaceEditor.setValue)&&this._inPlaceEditor.setValue(a),this.dispatchEvent("valueChanged",this,{renderer:this,oldValue:h,newValue:a,source:c}))},getValue:function(){return this._value},hasValueChanged:function(a){return this._originalValue!==a&&this._editValue!==
a},setEditValue:function(a,c){if(JSON.stringify(this._editValue)!==JSON.stringify(a)){var h=this._editValue;this._editValue=a;void 0===c&&(c="client");this._inPlaceEditor&&(this._inPlaceEditor!==this&&this._inPlaceEditor.setEditValue)&&this._inPlaceEditor.setEditValue(a);this.dispatchEvent("editValueChanged",this,{renderer:this,oldValue:h,newValue:a,source:c})}},getEditValue:function(){return this._editValue},setState:function(a,c){if(JSON.stringify(this._state)!==JSON.stringify(a)){var h=this.getState();
this._state=a;this._inPlaceEditor&&(this._inPlaceEditor!==this&&this._inPlaceEditor.setState)&&this._inPlaceEditor.setState(a);this._editor&&(this._editor!==this&&this._editor.setState)&&this._editor.setState(a);void 0===c&&(c="client");this.dispatchEvent("stateChanged",this,{renderer:this,oldState:h,newState:a,source:c})}},getState:function(){void 0===this._state&&(this._state=this._getDefaultState());return this._state},_pauseListeners:function(){this._changeListenerState("pause")},_resumeListeners:function(){this._changeListenerState("resume")},
_removeListeners:function(){this._changeListenerState("remove");this._mouseListeners={};this._keyboardListeners={}},_changeListenerState:function(a){a&&"string"===typeof a&&(this._changeObjectListenersState(this._mouseListeners,a),this._changeObjectListenersState(this._keyboardListeners,a))},_changeObjectListenersState:function(a,c){if(a)for(var h in a)if(a.hasOwnProperty(h)){var b=a[h];if(b&&b[c])b[c]()}},_applyCssClass:function(a,c,h,b){a=m.getClassNameForIconList(void 0===a?"object":a);b||(b=this.domNode);
this.removeCSSClasses(k.ClassArray,b);c?(this.addCSSClasses(l.MGG_CELL,b),this.addCSSClasses(l.TEMPORARY,b)):(this.addCSSClasses(l.VE_RENDERERS,b),h?(k.IconTypeMap.hasOwnProperty(a)?m.addToClassList(b,k.IconTypeMap[a]):m.addToClassList(b,k.IconTypeMap.object),this.addCSSClasses("icon",b)):(this.addCSSClasses(l.MGG_CELL,b),this.addCSSClasses(k.ClassTypeMap[a],b)))},createDataTag:function(){return m.concatenateDataTagStrings("datatools.variableeditor","views","renderers",arguments)},_isValidKeyPressEvent:function(a){var c=
this._getKeyCode(a);return 64<c&&91>c&&(a.ctrlKey||a.metaKey)?!1:32<c&&127>c||32===c||13===c||c!==b.CTRL&&c!==b.META},_getKeyCode:function(a){return a.which?a.which:a.keyCode?a.keyCode:a.charCode?a.charCode:a.key?a.key:null},_getStringForEvent:function(a){var c=this._getKeyCode(a);222===a.which&&0===a.charCode&&(c=39);if(190===c||110===c)c=46;c=String.fromCharCode(c);c=c.trim();a.shiftKey||(c=c.toLocaleLowerCase());return c},addCSSClasses:function(c,h){c&&(h||(h=this.domNode),a.add(h,c))},removeCSSClasses:function(c,
h){c&&(h||(h=this.domNode),a.remove(h,c))},replaceCSSClasses:function(a,c,h){h||(h=this.domNode);a&&this.removeCSSClasses(a,h);c&&this.addCSSClasses(c,h)},_getDefaultState:function(){return{}},isEditing:function(){var a=this.isEditable(),c=this._editor&&this._editor.isEditing&&this._editor.isEditing(),h=this._inPlaceEditor&&this._inPlaceEditor.isEditing&&this._inPlaceEditor.isEditing();return a&&(c||h)},_setReadOnly:function(a){},getStyleNode:function(a){return this.domNode}})})},"variableeditor/views/editors/ArrayOfStringsTextBoxEditor":function(){define("variableeditor/views/editors/ArrayOfStringsTextBoxEditor",
["dojo/_base/declare","datatoolsservices/DataToolsUtils","variableeditor/views/editors/TextBoxEditor"],function(g,f,e){return g("variableeditor.views.editors.ArrayOfStringsTextBoxEditor",[e],{_commit:function(){var d=this._getUIValue();""===d?d=[]:(0==d.indexOf("{")&&d.indexOf("}")==d.length-1&&(d=d.substring(1,d.length-1).replace(/'/g,"")),d=d.split(","),1==d.length&&0<d[0].indexOf(";")&&(d=d[0].split(";")),d=d.map(function(b){return b.trim()}));null!==d&&void 0!==d&&this.hasValueChanged(d)?this.setValue(d,
"client"):this._setUIValue(this._originalValue);d=this._getUIValue();null!==d&&(void 0!==d&&this.hasValueChanged(d))&&(this._originalEditValue=this._editValue,this._editValue=d)},setCursorPosition:function(){var d=this._getUIValue().length;f.selectRange(this._inputBox.inputNode,d,d)}})})},"variableeditor/views/editors/ArrayOfDatesTextBoxEditor":function(){define("variableeditor/views/editors/ArrayOfDatesTextBoxEditor",["dojo/_base/declare","dojo/_base/lang","dojo/on","variableeditor/views/editors/TextBoxEditor",
"mw-datepicker/utils/locale"],function(g,f,e,d,b){return g("variableeditor.views.editors.ArrayOfDatesTextBoxEditor",[d],{_dateSettingsPlugin:void 0,_displayFormat:void 0,_locale:void 0,postCreate:function(){this.inherited(arguments);this.domNode.setAttribute("data-tag","datatools.variableeditor.views.editors.ArrayOfDatesTextBoxEditor");this.plugins&&this.plugins.dateSettingsPlugin&&(this._dateSettingsPlugin=this.plugins.dateSettingsPlugin,this._displayFormat=this._dateSettingsPlugin.datetimeDefaultDateFormat,
this._locale=this._dateSettingsPlugin.datetimeDisplayLocale,e(this._dateSettingsPlugin,"settingsUpdated",f.hitch(this,"_settingsChanged")))},_applyFormatting:function(a,c){return void 0===c?(this.currentValue=a,this._formattingValue(a)):a},_settingsChanged:function(a){this._displayFormat=a.datetimeDefaultDateFormat;this._locale=a.datetimeDisplayLocale;a=this._formattingValue(this.currentValue);this._setUIValue(a)},_formattingValue:function(a){dateStrings=[];Array.isArray(a.Year)||(a.Year=[a.Year],
a.Month=[a.Month],a.Day=[a.Day]);var c=a.Year.length;if(this._displayFormat&&this._locale)var h={datePattern:this._displayFormat,locale:this._locale};for(var k=0;k<c;k++)if(null!==a.Year[k]&&null!==a.Month[k]&&null!==a.Month[k]){unShiftedDate=new Date(a.Year[k],a.Month[k]-1,a.Day[k]);unShiftedDate.setFullYear(a.Year[k]);if(h){h.locale=b.adjustLocale(h.locale);var d=b.format(unShiftedDate,h)}else d=unShiftedDate.toDateString().split(" "),d=d[2]+"-"+d[1]+"-"+d[3];dateStrings.push(d)}return dateStrings}})})},
"mw-datepicker/utils/locale":function(){define("dojo/_base/lang dojo/_base/array dojo/date dojo/i18n dojo/regexp dojo/string ./GregorianResources".split(" "),function(g,f,e,d,b,a,c){function h(a){if(void 0===a||null===a)return null;var c=a,c=!1,h=a.match(/(''|[^'])+/g);a="'"===a.charAt(0);var b=[];if(null!==h)for(var k=0;k<h.length;k++){var d=h[k];if(d){if(a)b.push("'"+d+"'");else{for(var e=0;e<n.length;e++)-1!==d.indexOf(n[e])&&(c=!0);b.push(d)}a=!a}else b.push(d)}return c=c?null:b.join("")}function k(c,
h,b,k){return k.replace(/([a-z])\1*/ig,function(b){var d,e,f=b.charAt(0);b=b.length;d=["abbr","wide","narrow"];switch(f){case "G":d=1>c.getFullYear()?"BCE":"CE";break;case "u":d=c.getFullYear();e=!0;break;case "y":d=c.getFullYear();switch(b){case 1:break;case 2:d=String(d);d=d.substr(d.length-2);e=!0;break;default:e=!0}break;case "Q":d=Math.ceil((c.getMonth()+1)/3);switch(b){case 1:d=h["quarters-standAlone-narrow"][d-1];break;case 2:d=a.pad(d,2);break;case 3:d=h["quarters-standAlone-abbr"][d-1];break;
default:d=h["quarters-standAlone-wide"][d-1]}break;case "M":f=c.getMonth();3>b||5<b?(d=f+1,e=!0):(d=["months-format",d[b-3]].join("-"),d=h[d][f],d=d.replace(".",""));break;case "W":e=p._getWeekOfYear(c,0);d=new Date(c);d.setFullYear(c.getFullYear());d.setDate(1);d=p._getWeekOfYear(d,0);d=e-d+1;e=!0;break;case "d":d=c.getDate();e=!0;break;case "D":d=p._getDayOfYear(c);e=!0;break;case "e":f=c.getDay();if(2>b){d=f+1;break}f=c.getDay();3>b?(d=f+1,e=!0):(d=6>b?["days-format",d[b-3]].join("-"):6===b?"days-format-short":
"days-format-abbr",d=h[d][f],d=d.replace(".",""));break;default:throw Error("mw-datepicker.utils.locale.format: invalid pattern char: "+k);}e&&(d=a.pad(d,b));return d})}function l(a,c,h,b){var k=function(a){return a};c=c||k;h=h||k;b=b||k;var d=a.match(/(''|[^'])+/g),e="'"===a.charAt(0);f.forEach(d,function(a,b){a?(d[b]=(e?h:c)(a.replace(/''/g,"'")),e=!e):d[b]=""});return b(d.join(""))}function m(a,c,h,k){k=b.escapeString(k);return k.replace(/([a-z])\1*/ig,function(c){var h;h=c.charAt(0);var b=c.length;
switch(h){case "u":case "y":h="\\d{1,}";break;case "M":h=2<b&&6>b?"\\S+?":"0*1[0-2]|0*[1-9]";break;case "D":h="0*[12][0-9][0-9]|0*3[0-5][0-9]|0*36[0-6]|0*[1-9][0-9]|0*[1-9]";break;case "d":h="0*3[01]|0*[12]\\d|0*[1-9]";break;case "e":h=".+?";break;default:h=".*"}a&&a.push(c);return"("+h+")"}).replace(/[\xa0 ]/g,"[\\s\\xa0]")}var p={},n="acEhHkKLmqsSvwxXzZ";p.format=function(a,c){c=c||{};if(void 0===c||null===c||null===h(c.datePattern))return null;var b=d.normalizeLocale(c.locale),e=c.formatLength||
"short",b=p._getGregorianBundle(b),f=[],m=g.hitch(this,k,a,b,c),n=c.datePattern||b["dateFormat-"+e];n&&f.push(l(n,m));return 1===f.length?f[0]:b["dateTimeFormat-"+e].replace(/'/g,"").replace(/\{(\d+)\}/g,function(a,c){return f[c]})};p._parseInfo=function(a){a=a||{};var c=d.normalizeLocale(a.locale),c=p._getGregorianBundle(c),h=a.formatLength||"short",b=[];return{regexp:l(a.datePattern||c["dateFormat-"+h],g.hitch(this,m,b,c,a)),tokens:b,bundle:c}};p.parse=function(a,c){if(void 0===c||null===c||null===
h(c.datePattern))return null;var b=/[\u200E\u200F\u202A\u202E]/g,k=p._parseInfo(c),d=k.tokens,e=k.bundle,b=RegExp("^"+k.regexp.replace(b,"")+"$",k.strict?"":"i").exec(a&&a.replace(b,""));if(!b)return null;k=new Date;k.setFullYear(k.getFullYear());k.setHours(0,0,0,0);var l=["abbr","wide","narrow"],m=[k.getFullYear(),k.getMonth(),k.getDate(),0,0,0,0],b=f.every(b,function(a,h){if(!h)return!0;var b=d[h-1],k=b.length;switch(b.charAt(0)){case "u":case "y":if((2===k||4===k)&&(1===a.length||2===a.length))if(b=
new Date,k=b.getFullYear().toString().substring(0,2)-0,50>Math.abs(100*k+(a-0)-b.getFullYear()))m[0]=k.toString()+(1===a.length?"0":"")+a;else{var n=k+1;50>Math.abs(100*n+(a-0)-b.getFullYear())?m[0]=n.toString()+(1===a.length?"0":"")+a:m[0]=(k-1).toString()+(1===a.length?"0":"")+a}else m[0]=a;break;case "M":if(2<k&&6>k){if(b=e["months-format-"+l[k-3]].concat(),c.strict||(a=a.replace(".","").toLowerCase(),b=f.map(b,function(a){return a.replace(".","").toLowerCase()})),a=f.indexOf(b,a),-1===a)return!1}else a--;
m[1]=a;break;case "D":m[1]=0;case "d":m[2]=a}return!0}),k=d.join(""),n=-1!==k.indexOf("d"),q=-1!==k.indexOf("M"),g=-1!==k.indexOf("y")||-1!==k.indexOf("u"),k=-1!==k.indexOf("D");g&&(!q&&!k&&(m[1]=0),!n&&!k&&(m[2]=1));q&&!n&&(m[2]=1);n=new Date(m[0],m[1],m[2]);n.setFullYear(m[0]);q=n.setHours(0,0,0,0);!k&&n.getDate()!==parseInt(m[2])&&(n.setHours(1,0,0,0),n.setDate(m[2]),q=n.valueOf());g=n.getHours();0!==g&&(n=new Date(q-36E5*g));return!b||n.toString()===(new Date("")).toString()||!k&&m[1]!==n.getMonth()?
null:n};var q={};p._getGregorianBundle=function(a){if(q[a])return q[a];var h=c.getGregorianBundle(a);q[a]=h;return q[a]};p.getNames=function(a,c,h,b){var k;b=p._getGregorianBundle(b);a=[a,h,c];"standAlone"===h&&(h=a.join("-"),k=b[h],1===k[0]&&(k=void 0));a[1]="format";h=(k||b[a.join("-")]).concat();h.forEach(function(a,c,h){h[c]=h[c].replace(".","")});return h};p.isWeekend=function(a,c){var h=0,b=(a||new Date).getDay();6>h&&(h+=7,6>b&&(b+=7));return 6<=b&&b<=h};p._getDayOfYear=function(a){var c=new Date(a.getFullYear(),
0,1,a.getHours());c.setFullYear(a.getFullYear());return e.difference(c,a)+1};p._getWeekOfYear=function(a,c){1===arguments.length&&(c=0);var h=new Date(a.getFullYear(),0,1);h.setFullYear(a.getFullYear());var h=h.getDay(),b=Math.floor((p._getDayOfYear(a)+(h-c+7)%7-1)/7);h===c&&b++;return b};var r={"ar-AE":"dd/MM/yyyy","ar-BH":"dd/MM/yyyy","ar-DZ":"dd-MM-yyyy","ar-EG":"dd/MM/yyyy","ar-IQ":"dd/MM/yyyy","ar-JO":"dd/MM/yyyy","ar-KW":"dd/MM/yyyy","ar-LB":"dd/MM/yyyy","ar-LY":"dd/MM/yyyy","ar-MA":"dd-MM-yyyy",
"ar-OM":"dd/MM/yyyy","ar-QA":"dd/MM/yyyy","ar-SA":"dd/MM/yy","ar-SY":"dd/MM/yyyy","ar-TN":"dd-MM-yyyy","ar-YE":"dd/MM/yyyy","bs-Cyrl-BA":"d.M.yyyy","bs-Latn-BA":"d.M.yyyy","ca-ES":"dd/MM/yyyy","cs-CZ":"d.M.yyyy","da-DK":"dd-MM-yyyy","de-AT":"dd.MM.yyyy","de-CH":"dd.MM.yyyy","de-DE":"dd.MM.yyyy","de-LI":"dd.MM.yyyy","de-LU":"dd.MM.yyyy","el-GR":"d/M/yyyy","en-029":"MM/dd/yyyy","en-AU":"d/MM/yyyy","en-BZ":"dd/MM/yyyy","en-CA":"dd/MM/yyyy","en-GB":"dd/MM/yyyy","en-IE":"dd/MM/yyyy","en-IN":"dd-MM-yyyy",
"en-JM":"dd/MM/yyyy","en-MY":"d/M/yyyy","en-NZ":"d/MM/yyyy","en-PH":"M/d/yyyy","en-SG":"d/M/yyyy","en-TT":"dd/MM/yyyy","en-US":"M/d/yyyy","en-ZA":"yyyy/MM/dd","en-ZW":"M/d/yyyy","es-AR":"dd/MM/yyyy","es-BO":"dd/MM/yyyy","es-CL":"dd-MM-yyyy","es-CO":"dd/MM/yyyy","es-CR":"dd/MM/yyyy","es-DO":"dd/MM/yyyy","es-EC":"dd/MM/yyyy","es-ES":"dd/MM/yyyy","es-GT":"dd/MM/yyyy","es-HN":"dd/MM/yyyy","es-MX":"dd/MM/yyyy","es-NI":"dd/MM/yyyy","es-PA":"MM/dd/yyyy","es-PE":"dd/MM/yyyy","es-PR":"dd/MM/yyyy","es-PY":"dd/MM/yyyy",
"es-SV":"dd/MM/yyyy","es-US":"M/d/yyyy","es-UY":"dd/MM/yyyy","es-VE":"dd/MM/yyyy","fi-FI":"d.M.yyyy","fr-BE":"d/MM/yyyy","fr-CA":"yyyy-MM-dd","fr-CH":"dd.MM.yyyy","fr-FR":"dd/MM/yyyy","fr-LU":"dd/MM/yyyy","fr-MC":"dd/MM/yyyy","he-IL":"dd/MM/yyyy","hr-BA":"d.M.yyyy.","hr-HR":"d.M.yyyy","hu-HU":"yyyy. MM. dd.","it-CH":"dd.MM.yyyy","it-IT":"dd/MM/yyyy","ja-JP":"yyyy/MM/dd","ko-KR":"yyyy-MM-dd","mk-MK":"dd.MM.yyyy","nb-NO":"dd.MM.yyyy","nl-BE":"d/MM/yyyy","nl-NL":"d-M-yyyy","pl-PL":"yyyy-MM-dd","pt-BR":"d/M/yyyy",
"pt-PT":"dd-MM-yyyy","ro-RO":"dd.MM.yyyy","ru-RU":"dd.MM.yyyy","sk-SK":"d. M. yyyy","sl-SI":"d.M.yyyy","sr-Cyrl-BA":"d.M.yyyy","sr-Cyrl-CS":"d.M.yyyy","sr-Cyrl-ME":"d.M.yyyy","sr-Cyrl-RS":"d.M.yyyy","sr-Latn-BA":"d.M.yyyy","sr-Latn-CS":"d.M.yyyy","sr-Latn-ME":"d.M.yyyy","sr-Latn-RS":"d.M.yyyy","sv-FI":"d.M.yyyy","sv-SE":"yyyy-MM-dd","th-TH":"d/M/yyyy","tr-TR":"dd.MM.yyyy","zh-CN":"yyyy/M/d","zh-HK":"d/M/yyyy","zh-MO":"d/M/yyyy","zh-SG":"d/M/yyyy","zh-TW":"yyyy/M/d"};p.getLocaleDateFormatInfo=function(a){a=
this.adjustLocale(a);return r[a]||null};p.getBrowserDefaultLocale=function(){return this.adjustLocale(navigator.language||navigator.userLanguage||"en-US")};p.adjustLocale=function(a){a=a.replace(/_/g,"-").split("-",3);0<a.length&&(a[0]=a[0].toLowerCase());2===a.length?a[1]=a[1].toUpperCase():3===a.length&&(a[1]=a[1].toLowerCase(),0<a[1].length&&(a[1]=a[1][0].toUpperCase()+a[1].substring(1)),a[2]=a[2].toUpperCase());a=a.join("-");if(2===a.length)switch(a){case "ar":a="ar-AE";break;case "bs":a="bs-Cyrl-BA";
break;case "ca":a="ca-ES";break;case "cs":a="cs-CZ";break;case "da":a="da-DK";break;case "de":a="de-AT";break;case "el":a="el-GR";break;case "en":a="en-US";break;case "es":a="es-AR";break;case "fi":a="fi-FI";break;case "fr":a="fr-FR";break;case "he":a="he-IL";break;case "hr":a="hr-BA";break;case "hu":a="hu-HU";break;case "it":a="it-IT";break;case "ja":a="ja-JP";break;case "ko":a="ko-KR";break;case "mk":a="mk-MK";break;case "nb":a="nb-NO";break;case "nl":a="nl-BE";break;case "pl":a="pl-PL";break;case "pt":a=
"pt-BR";break;case "ro":a="ro-RO";break;case "ru":a="ru-RU";break;case "sk":a="sk-SK";break;case "sl":a="sl-SI";break;case "sr":a="sr-Cyrl-BA";break;case "sv":a="sv-FI";break;case "th":a="th-TH";break;case "tr":a="tr-TR";break;case "zh":a="zh-CN"}return a};return p})},"mw-datepicker/utils/GregorianResources":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array ../gregorian/nls/root/gregorian ../gregorian/nls/ar/gregorian ../gregorian/nls/bs/gregorian ../gregorian/nls/ca/gregorian ../gregorian/nls/cs/gregorian ../gregorian/nls/da/gregorian ../gregorian/nls/de/gregorian ../gregorian/nls/el/gregorian ../gregorian/nls/en/gregorian ../gregorian/nls/en-au/gregorian ../gregorian/nls/en-ca/gregorian ../gregorian/nls/en-gb/gregorian ../gregorian/nls/es/gregorian ../gregorian/nls/fi/gregorian ../gregorian/nls/fr/gregorian ../gregorian/nls/fr-ch/gregorian ../gregorian/nls/he/gregorian ../gregorian/nls/hr/gregorian ../gregorian/nls/hu/gregorian ../gregorian/nls/it/gregorian ../gregorian/nls/ja/gregorian ../gregorian/nls/ja-jp/gregorian ../gregorian/nls/ko/gregorian ../gregorian/nls/ko-kr/gregorian ../gregorian/nls/mk/gregorian ../gregorian/nls/nb/gregorian ../gregorian/nls/nl/gregorian ../gregorian/nls/pl/gregorian ../gregorian/nls/pt/gregorian ../gregorian/nls/pt-pt/gregorian ../gregorian/nls/ro/gregorian ../gregorian/nls/ru/gregorian ../gregorian/nls/sk/gregorian ../gregorian/nls/sl/gregorian ../gregorian/nls/sr/gregorian ../gregorian/nls/sv/gregorian ../gregorian/nls/th/gregorian ../gregorian/nls/tr/gregorian ../gregorian/nls/zh/gregorian ../gregorian/nls/zh-cn/gregorian ../gregorian/nls/zh-hant/gregorian ../gregorian/nls/zh-hk/gregorian ../gregorian/nls/zh-tw/gregorian".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x,y,B,D,E,F,I,L,C,M,G,N,P,R,S,K,Q,U,T,X,$,V,ka,la,da,ma){var ga={root:d,ar:b,bs:a,ca:c,cs:h,da:k,de:l,el:m,en:p,"en-au":n,"en-ca":q,"en-gb":r,es:s,fi:t,fr:u,"fr-ch":v,he:w,hr:x,hu:y,it:B,ja:D,"ja-jp":E,ko:F,"ko-kr":I,mk:L,nb:C,nl:M,pl:G,pt:N,"pt-pt":P,ro:R,ru:S,sk:K,sl:Q,sr:U,sv:T,th:X,tr:$,zh:V,"zh-cn":ka,"zh-hant":la,"zh-hk":da,"zh-tw":ma};return{getGregorianBundle:function(a){var c={},h=ga.root.root,c=f.mixin(c,h),b="en";a=a?a.toLowerCase():dojo.locale.toLowerCase();
a.replace(/_/g,"-").toLowerCase();h=a.split("-",3);0<h.length&&(b=h[0].toLowerCase());void 0!==ga[b]&&(h=ga[b],c=f.mixin(c,h));a!==b&&void 0!==ga[a]&&(h=ga[a],c=f.mixin(c,h));return c}}})},"mw-datepicker/gregorian/nls/root/gregorian":function(){define({root:{"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"Sun Mon Tue Wed Thu Fri Sat".split(" "),"months-format-narrow":"1 2 3 4 5 6 7 8 9 10 11 12".split(" "),"field-second-relative+0":"now","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Day of the Week",
"dateFormatItem-yQQQ":"y QQQ","dateFormatItem-yMEd":"y-MM-dd, E","field-wed-relative+0":"this Wednesday","field-wed-relative+1":"next Wednesday","dateFormatItem-GyMMMEd":"G y MMM d, E","dateFormatItem-MMMEd":"MMM d, E",eraNarrow:["BCE","CE"],"field-tue-relative+-1":"last Tuesday","days-format-short":"Sun Mon Tue Wed Thu Fri Sat".split(" "),"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"y MMMM d","field-fri-relative+-1":"last Friday","field-wed-relative+-1":"last Wednesday",
"months-format-wide":"M01 M02 M03 M04 M05 M06 M07 M08 M09 M10 M11 M12".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"PM","dateFormat-full":"y MMMM d, EEEE","field-thu-relative+-1":"last Thursday","dateFormatItem-Md":"MM-dd","dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})","dayPeriods-format-wide-noon":"noon","dateFormatItem-yMd":"y-MM-dd","field-era":"Era","dateFormatItem-yM":"y-MM","months-standAlone-wide":"M01 M02 M03 M04 M05 M06 M07 M08 M09 M10 M11 M12".split(" "),
"timeFormat-short":"HH:mm","quarters-format-wide":["Q1","Q2","Q3","Q4"],"dateFormatItem-yQQQQ":"y QQQQ","timeFormat-long":"HH:mm:ss z","field-year":"Year","dateFormatItem-yMMM":"y MMM","dateTimeFormats-appendItem-Era":"{1} {0}","field-hour":"Hour","months-format-abbr":"M01 M02 M03 M04 M05 M06 M07 M08 M09 M10 M11 M12".split(" "),"field-sat-relative+0":"this Saturday","field-sat-relative+1":"next Saturday","timeFormat-full":"HH:mm:ss zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"today",
"field-thu-relative+0":"this Thursday","field-day-relative+1":"tomorrow","field-thu-relative+1":"next Thursday","dateFormatItem-GyMMMd":"G y MMM d","dateFormatItem-H":"HH","months-standAlone-abbr":"M01 M02 M03 M04 M05 M06 M07 M08 M09 M10 M11 M12".split(" "),"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["Q1","Q2","Q3","Q4"],"dateFormatItem-Gy":"G y","dateFormatItem-M":"L","days-standAlone-wide":"Sun Mon Tue Wed Thu Fri Sat".split(" "),"dayPeriods-format-abbr-noon":"noon",
"timeFormat-medium":"HH:mm:ss","field-sun-relative+0":"this Sunday","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"next Sunday","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],eraAbbr:["BCE","CE"],"field-minute":"Minute","field-dayperiod":"Dayperiod","days-standAlone-abbr":"Sun Mon Tue Wed Thu Fri Sat".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"yesterday","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"a",
"dateFormatItem-h":"h a","dateFormatItem-MMMd":"MMM d","dateFormatItem-MEd":"MM-dd, E","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"this Friday","field-fri-relative+1":"next Friday","field-day":"Day","days-format-wide":"Sun Mon Tue Wed Thu Fri Sat".split(" "),"field-zone":"Zone","months-standAlone-narrow":"1 2 3 4 5 6 7 8 9 10 11 12".split(" "),"dateFormatItem-y":"y","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","field-year-relative+-1":"last year","field-month-relative+-1":"last month",
"dateTimeFormats-appendItem-Year":"{1} {0}","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"Sun Mon Tue Wed Thu Fri Sat".split(" "),eraNames:["BCE","CE"],"dateFormatItem-yMMMd":"y MMM d","days-format-narrow":"SMTWTFS".split(""),"field-month":"Month","days-standAlone-narrow":"SMTWTFS".split(""),"dateFormatItem-MMM":"LLL","field-tue-relative+0":"this Tuesday","dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","field-tue-relative+1":"next Tuesday",
"dayPeriods-format-wide-am":"AM","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"this Monday","field-mon-relative+1":"next Monday","dateFormat-short":"y-MM-dd","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","dayPeriods-format-narrow-noon":"n","field-second":"Second","field-sat-relative+-1":"last Saturday","dateFormatItem-yMMMEd":"y MMM d, E","field-sun-relative+-1":"last Sunday",
"field-month-relative+0":"this month","field-month-relative+1":"next month","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-Ed":"d, E","field-week":"Week","dateFormat-medium":"y MMM d","field-week-relative+-1":"last week","field-year-relative+0":"this year","field-year-relative+1":"next year","dayPeriods-format-narrow-pm":"p","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"G y MMM","field-mon-relative+-1":"last Monday",
"field-week-relative+0":"this week","field-week-relative+1":"next week"},ar:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,"en-au":!0,"en-ca":!0,"en-gb":!0,es:!0,fi:!0,fr:!0,"fr-ch":!0,he:!0,hr:!0,hu:!0,it:!0,ja:!0,ko:!0,mk:!0,nb:!0,nl:!0,pl:!0,pt:!0,"pt-pt":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,zh:!0,"zh-hant":!0,"zh-hk":!0,"zh-tw":!0})},"mw-datepicker/gregorian/nls/ar/gregorian":function(){define({"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"\u0627\u0644\u0623\u062d\u062f \u0627\u0644\u0627\u062b\u0646\u064a\u0646 \u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621 \u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621 \u0627\u0644\u062e\u0645\u064a\u0633 \u0627\u0644\u062c\u0645\u0639\u0629 \u0627\u0644\u0633\u0628\u062a".split(" "),
"months-format-narrow":"\u064a\u0641\u0645\u0623\u0648\u0646\u0644\u063a\u0633\u0643\u0628\u062f".split(""),"field-second-relative+0":"\u0627\u0644\u0622\u0646","quarters-standAlone-narrow":["\u0661","\u0662","\u0663","\u0664"],"field-weekday":"\u0627\u0644\u064a\u0648\u0645","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E\u060c d/\u200fM/\u200fy","field-wed-relative+0":"\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621 \u0627\u0644\u062d\u0627\u0644\u064a","field-wed-relative+1":"\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621 \u0627\u0644\u062a\u0627\u0644\u064a",
"dateFormatItem-GyMMMEd":"E\u060c d MMM\u060c y G","dateFormatItem-MMMEd":"E\u060c d MMM",eraNarrow:["\u0642.\u0645","\u0645"],"dateFormatItem-yMM":"MM\u200f/y","field-tue-relative+-1":"\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621 \u0627\u0644\u0645\u0627\u0636\u064a","days-format-short":"\u0627\u0644\u0623\u062d\u062f \u0627\u0644\u0627\u062b\u0646\u064a\u0646 \u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621 \u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621 \u0627\u0644\u062e\u0645\u064a\u0633 \u0627\u0644\u062c\u0645\u0639\u0629 \u0627\u0644\u0633\u0628\u062a".split(" "),
"dateFormat-long":"d MMMM\u060c y","field-fri-relative+-1":"\u0627\u0644\u062c\u0645\u0639\u0629 \u0627\u0644\u0645\u0627\u0636\u064a\u0629","field-wed-relative+-1":"\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621 \u0627\u0644\u0645\u0627\u0636\u064a","months-format-wide":"\u064a\u0646\u0627\u064a\u0631 \u0641\u0628\u0631\u0627\u064a\u0631 \u0645\u0627\u0631\u0633 \u0623\u0628\u0631\u064a\u0644 \u0645\u0627\u064a\u0648 \u064a\u0648\u0646\u064a\u0648 \u064a\u0648\u0644\u064a\u0648 \u0623\u063a\u0633\u0637\u0633 \u0633\u0628\u062a\u0645\u0628\u0631 \u0623\u0643\u062a\u0648\u0628\u0631 \u0646\u0648\u0641\u0645\u0628\u0631 \u062f\u064a\u0633\u0645\u0628\u0631".split(" "),
"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"\u0645","dateFormat-full":"EEEE\u060c d MMMM\u060c y","field-thu-relative+-1":"\u0627\u0644\u062e\u0645\u064a\u0633 \u0627\u0644\u0645\u0627\u0636\u064a","dateFormatItem-Md":"d/\u200fM","dateFormatItem-yMd":"d\u200f/M\u200f/y","field-era":"\u0627\u0644\u0639\u0635\u0631","dateFormatItem-yM":"M\u200f/y","months-standAlone-wide":"\u064a\u0646\u0627\u064a\u0631 \u0641\u0628\u0631\u0627\u064a\u0631 \u0645\u0627\u0631\u0633 \u0623\u0628\u0631\u064a\u0644 \u0645\u0627\u064a\u0648 \u064a\u0648\u0646\u064a\u0648 \u064a\u0648\u0644\u064a\u0648 \u0623\u063a\u0633\u0637\u0633 \u0633\u0628\u062a\u0645\u0628\u0631 \u0623\u0643\u062a\u0648\u0628\u0631 \u0646\u0648\u0641\u0645\u0628\u0631 \u062f\u064a\u0633\u0645\u0628\u0631".split(" "),
"timeFormat-short":"h:mm a","quarters-format-wide":["\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0623\u0648\u0644","\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0646\u064a","\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0644\u062b","\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0631\u0627\u0628\u0639"],"dateFormatItem-yQQQQ":"QQQQ y","timeFormat-long":"h:mm:ss a z","field-year":"\u0627\u0644\u0633\u0646\u0629","dateFormatItem-yMMM":"MMM y","field-hour":"\u0627\u0644\u0633\u0627\u0639\u0627\u062a",
"dateFormatItem-MMdd":"dd\u200f/MM","months-format-abbr":"\u064a\u0646\u0627\u064a\u0631 \u0641\u0628\u0631\u0627\u064a\u0631 \u0645\u0627\u0631\u0633 \u0623\u0628\u0631\u064a\u0644 \u0645\u0627\u064a\u0648 \u064a\u0648\u0646\u064a\u0648 \u064a\u0648\u0644\u064a\u0648 \u0623\u063a\u0633\u0637\u0633 \u0633\u0628\u062a\u0645\u0628\u0631 \u0623\u0643\u062a\u0648\u0628\u0631 \u0646\u0648\u0641\u0645\u0628\u0631 \u062f\u064a\u0633\u0645\u0628\u0631".split(" "),"field-sat-relative+0":"\u0627\u0644\u0633\u0628\u062a \u0627\u0644\u062d\u0627\u0644\u064a",
"field-sat-relative+1":"\u0627\u0644\u0633\u0628\u062a \u0627\u0644\u062a\u0627\u0644\u064a","timeFormat-full":"h:mm:ss a zzzz","field-day-relative+0":"\u0627\u0644\u064a\u0648\u0645","field-thu-relative+0":"\u0627\u0644\u062e\u0645\u064a\u0633 \u0627\u0644\u062d\u0627\u0644\u064a","field-day-relative+1":"\u063a\u062f\u064b\u0627","field-thu-relative+1":"\u0627\u0644\u062e\u0645\u064a\u0633 \u0627\u0644\u062a\u0627\u0644\u064a","dateFormatItem-GyMMMd":"d MMM\u060c y G","field-day-relative+2":"\u0628\u0639\u062f \u0627\u0644\u063a\u062f",
"dateFormatItem-H":"HH","months-standAlone-abbr":"\u064a\u0646\u0627\u064a\u0631 \u0641\u0628\u0631\u0627\u064a\u0631 \u0645\u0627\u0631\u0633 \u0623\u0628\u0631\u064a\u0644 \u0645\u0627\u064a\u0648 \u064a\u0648\u0646\u064a\u0648 \u064a\u0648\u0644\u064a\u0648 \u0623\u063a\u0633\u0637\u0633 \u0633\u0628\u062a\u0645\u0628\u0631 \u0623\u0643\u062a\u0648\u0628\u0631 \u0646\u0648\u0641\u0645\u0628\u0631 \u062f\u064a\u0633\u0645\u0628\u0631".split(" "),"quarters-format-abbr":["\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0623\u0648\u0644",
"\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0646\u064a","\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0644\u062b","\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0631\u0627\u0628\u0639"],"quarters-standAlone-wide":["\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0623\u0648\u0644","\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0646\u064a","\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0644\u062b","\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0631\u0627\u0628\u0639"],
"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"\u0627\u0644\u0623\u062d\u062f \u0627\u0644\u0627\u062b\u0646\u064a\u0646 \u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621 \u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621 \u0627\u0644\u062e\u0645\u064a\u0633 \u0627\u0644\u062c\u0645\u0639\u0629 \u0627\u0644\u0633\u0628\u062a".split(" "),"dateFormatItem-MMMMd":"d MMMM","timeFormat-medium":"h:mm:ss a","field-sun-relative+0":"\u0627\u0644\u0623\u062d\u062f \u0627\u0644\u062d\u0627\u0644\u064a",
"dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"\u0627\u0644\u0623\u062d\u062f \u0627\u0644\u062a\u0627\u0644\u064a","quarters-standAlone-abbr":["\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0623\u0648\u0644","\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0646\u064a","\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u062b\u0627\u0644\u062b","\u0627\u0644\u0631\u0628\u0639 \u0627\u0644\u0631\u0627\u0628\u0639"],eraAbbr:["\u0642.\u0645","\u0645"],"field-minute":"\u0627\u0644\u062f\u0642\u0627\u0626\u0642",
"field-dayperiod":"\u0635/\u0645","days-standAlone-abbr":"\u0627\u0644\u0623\u062d\u062f \u0627\u0644\u0627\u062b\u0646\u064a\u0646 \u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621 \u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621 \u0627\u0644\u062e\u0645\u064a\u0633 \u0627\u0644\u062c\u0645\u0639\u0629 \u0627\u0644\u0633\u0628\u062a".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["\u0661","\u0662","\u0663","\u0664"],"field-day-relative+-1":"\u0623\u0645\u0633",
"dateFormatItem-h":"h a","dateTimeFormat-long":"{1} {0}","field-day-relative+-2":"\u0623\u0648\u0644 \u0623\u0645\u0633","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E\u060c d/M","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"\u0627\u0644\u062c\u0645\u0639\u0629 \u0627\u0644\u062d\u0627\u0644\u064a\u0629","dateFormatItem-yMMMM":"MMMM y","field-fri-relative+1":"\u0627\u0644\u062c\u0645\u0639\u0629 \u0627\u0644\u062a\u0627\u0644\u064a\u0629","field-day":"\u064a\u0648\u0645","days-format-wide":"\u0627\u0644\u0623\u062d\u062f \u0627\u0644\u0627\u062b\u0646\u064a\u0646 \u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621 \u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621 \u0627\u0644\u062e\u0645\u064a\u0633 \u0627\u0644\u062c\u0645\u0639\u0629 \u0627\u0644\u0633\u0628\u062a".split(" "),
"field-zone":"\u0627\u0644\u062a\u0648\u0642\u064a\u062a","dateFormatItem-y":"y","months-standAlone-narrow":"\u064a\u0641\u0645\u0623\u0648\u0646\u0644\u063a\u0633\u0643\u0628\u062f".split(""),"field-year-relative+-1":"\u0627\u0644\u0633\u0646\u0629 \u0627\u0644\u0645\u0627\u0636\u064a\u0629","field-month-relative+-1":"\u0627\u0644\u0634\u0647\u0631 \u0627\u0644\u0645\u0627\u0636\u064a","dateFormatItem-hm":"h:mm a","days-format-abbr":"\u0627\u0644\u0623\u062d\u062f \u0627\u0644\u0627\u062b\u0646\u064a\u0646 \u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621 \u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621 \u0627\u0644\u062e\u0645\u064a\u0633 \u0627\u0644\u062c\u0645\u0639\u0629 \u0627\u0644\u0633\u0628\u062a".split(" "),
"dateFormatItem-yMMMd":"d MMM\u060c y",eraNames:["\u0642\u0628\u0644 \u0627\u0644\u0645\u064a\u0644\u0627\u062f","\u0645\u064a\u0644\u0627\u062f\u064a"],"days-format-narrow":"\u062d\u0646\u062b\u0631\u062e\u062c\u0633".split(""),"days-standAlone-narrow":"\u062d\u0646\u062b\u0631\u062e\u062c\u0633".split(""),"dateFormatItem-MMM":"LLL","field-month":"\u0627\u0644\u0634\u0647\u0631","field-tue-relative+0":"\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621 \u0627\u0644\u062d\u0627\u0644\u064a","field-tue-relative+1":"\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621 \u0627\u0644\u062a\u0627\u0644\u064a",
"dayPeriods-format-wide-am":"\u0635","dateFormatItem-MMMMEd":"E\u060c d MMMM","dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"\u0627\u0644\u0627\u062b\u0646\u064a\u0646 \u0627\u0644\u062d\u0627\u0644\u064a","field-mon-relative+1":"\u0627\u0644\u0627\u062b\u0646\u064a\u0646 \u0627\u0644\u062a\u0627\u0644\u064a","dateFormat-short":"d\u200f/M\u200f/y","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","field-second":"\u0627\u0644\u062b\u0648\u0627\u0646\u064a","field-sat-relative+-1":"\u0627\u0644\u0633\u0628\u062a \u0627\u0644\u0645\u0627\u0636\u064a",
"dateFormatItem-yMMMEd":"E\u060c d MMM\u060c y","field-sun-relative+-1":"\u0627\u0644\u0623\u062d\u062f \u0627\u0644\u0645\u0627\u0636\u064a","field-month-relative+0":"\u0647\u0630\u0627 \u0627\u0644\u0634\u0647\u0631","field-month-relative+1":"\u0627\u0644\u0634\u0647\u0631 \u0627\u0644\u062a\u0627\u0644\u064a","dateFormatItem-Ed":"E\u060c d","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"\u0627\u0644\u0623\u0633\u0628\u0648\u0639","dateFormat-medium":"dd\u200f/MM\u200f/y","field-year-relative+0":"\u0647\u0630\u0647 \u0627\u0644\u0633\u0646\u0629",
"field-week-relative+-1":"\u0627\u0644\u0623\u0633\u0628\u0648\u0639 \u0627\u0644\u0645\u0627\u0636\u064a","field-year-relative+1":"\u0627\u0644\u0633\u0646\u0629 \u0627\u0644\u062a\u0627\u0644\u064a\u0629","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"\u0627\u0644\u0627\u062b\u0646\u064a\u0646 \u0627\u0644\u0645\u0627\u0636\u064a","field-week-relative+0":"\u0647\u0630\u0627 \u0627\u0644\u0623\u0633\u0628\u0648\u0639",
"field-week-relative+1":"\u0627\u0644\u0623\u0633\u0628\u0648\u0639 \u0627\u0644\u062a\u0627\u0644\u064a"})},"mw-datepicker/gregorian/nls/bs/gregorian":function(){define({"dateFormatItem-yM":"MM.y.","field-dayperiod":"pre podne/ popodne","dayPeriods-format-wide-pm":"popodne","field-minute":"minut",eraNames:["Pre nove ere","Nove ere"],"dateFormatItem-MMMEd":"E, dd. MMM","field-day-relative+-1":"ju\u010de","field-weekday":"dan u nedelji","dateFormatItem-hms":"hh:mm:ss a","dateFormatItem-yQQQ":"y QQQ",
"field-day-relative+-2":"prekju\u010de","days-standAlone-wide":"nedjelja ponedjeljak utorak srijeda \u010detvrtak petak subota".split(" "),"dateFormatItem-MMM":"LLL","months-standAlone-narrow":"jfmamjjasond".split(""),"field-era":"era","dateFormatItem-Gy":"y. G","field-hour":"\u010das","dayPeriods-format-wide-am":"pre podne","quarters-standAlone-abbr":["K1","K2","K3","K4"],"dateFormatItem-y":"y.","timeFormat-full":"HH:mm:ss zzzz","months-standAlone-abbr":"jan feb mar apr maj jun jul avg sep okt nov dec".split(" "),
"dateFormatItem-Ed":"E, dd.","dateFormatItem-yMMM":"MMM y.","field-day-relative+0":"danas","field-day-relative+1":"sutra",eraAbbr:["p. n. e.","n. e"],"field-day-relative+2":"prekosutra","dateFormatItem-GyMMMd":"dd. MMM y. G","dateFormat-long":"dd. MMMM y.","timeFormat-medium":"HH:mm:ss","field-zone":"zona","dateFormatItem-Hm":"HH:mm","dateFormat-medium":"dd.MM.y.","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-yMd":"dd.MM.y.","quarters-standAlone-wide":["Prvi kvartal","Drugi kvartal","Tre\u0107i kvartal",
"\u010cetvrti kvartal"],"dateFormatItem-ms":"mm:ss","field-year":"godina","field-week":"nedelja","months-standAlone-wide":"januar februar mart april maj juni juli avgust septembar oktobar novembar decembar".split(" "),"dateFormatItem-MMMd":"dd. MMM","timeFormat-long":"HH:mm:ss z","months-format-abbr":"jan feb mar apr maj jun jul avg sep okt nov dec".split(" "),"dateFormatItem-yQQQQ":"y QQQQ","timeFormat-short":"HH:mm","field-month":"mesec","quarters-format-abbr":["K1","K2","K3","K4"],"days-format-abbr":"ned pon uto sri \u010det pet sub".split(" "),
"dateFormatItem-M":"L","dateFormatItem-yMMMd":"dd. MMM y.","field-second":"sekund","dateFormatItem-GyMMMEd":"E, dd. MMM y. G","dateFormatItem-GyMMM":"MMM y. G","field-day":"dan","dateFormatItem-MEd":"E, dd.MM.","months-format-narrow":"jfmamjjasond".split(""),"days-standAlone-short":"ned pon uto sri \u010det pet sub".split(" "),"dateFormatItem-hm":"hh:mm a","days-standAlone-abbr":"ned pon uto sri \u010det pet sub".split(" "),"dateFormat-short":"dd.MM.yy.","dateFormatItem-yMMMEd":"E, dd. MMM y.","dateFormat-full":"EEEE, dd. MMMM y.",
"dateFormatItem-Md":"dd.MM.","dateFormatItem-yMEd":"E, dd.MM.y.","months-format-wide":"januar februar mart april maj juni juli avgust septembar oktobar novembar decembar".split(" "),"days-format-short":"ned pon uto sri \u010det pet sub".split(" "),"dateFormatItem-d":"d","quarters-format-wide":["Prvi kvartal","Drugi kvartal","Tre\u0107i kvartal","\u010cetvrti kvartal"],"days-format-wide":"nedjelja ponedjeljak utorak srijeda \u010detvrtak petak subota".split(" "),eraNarrow:["p. n. e.","n. e"]})},"mw-datepicker/gregorian/nls/ca/gregorian":function(){define({"dateFormatItem-Ehm":"E h:mm a",
"days-standAlone-short":"dg. dl. dm. dc. dj. dv. ds.".split(" "),"months-format-narrow":"GN FB M\u00c7 AB MG JN JL AG ST OC NV DS".split(" "),"field-second-relative+0":"ara","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"dia de la setmana","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E, d/M/y","field-wed-relative+0":"aquest dimecres","dateFormatItem-GyMMMEd":"E, d MMM, y G","dateFormatItem-MMMEd":"E d MMM","field-wed-relative+1":"dimecres que ve",eraNarrow:["aC","dC"],"field-tue-relative+-1":"dimarts passat",
"days-format-short":"dg. dl. dt. dc. dj. dv. ds.".split(" "),"dateFormat-long":"d MMMM 'de' y","field-fri-relative+-1":"divendres passat","field-wed-relative+-1":"dimecres passat","months-format-wide":"gener febrer mar\u00e7 abril maig juny juliol agost setembre octubre novembre desembre".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"p. m.","dateFormat-full":"EEEE, d MMMM 'de' y","field-thu-relative+-1":"dijous passat","dateFormatItem-Md":"d/M","dateFormatItem-GyMMMM":"LLLL 'de' y G",
"dateFormatItem-yMd":"d/M/y","dateFormatItem-yM":"M/y","field-era":"era","months-standAlone-wide":"gener febrer mar\u00e7 abril maig juny juliol agost setembre octubre novembre desembre".split(" "),"timeFormat-short":"H:mm","quarters-format-wide":["1r trimestre","2n trimestre","3r trimestre","4t trimestre"],"timeFormat-long":"H:mm:ss z","dateFormatItem-yMMM":"LLL y","dateFormatItem-yQQQQ":"QQQQ y","field-year":"any","field-hour":"hora","months-format-abbr":"gen. feb. mar\u00e7 abr. maig juny jul. ag. set. oct. nov. des.".split(" "),
"field-sat-relative+0":"aquest dissabte","field-sat-relative+1":"dissabte que ve","timeFormat-full":"H:mm:ss zzzz","field-day-relative+0":"avui","field-day-relative+1":"dem\u00e0","field-thu-relative+0":"aquest dijous","dateFormatItem-GyMMMd":"d MMM y G","field-day-relative+2":"dem\u00e0 passat","field-thu-relative+1":"dijous que ve","dateFormatItem-H":"H","months-standAlone-abbr":"gen. feb. mar\u00e7 abr. maig juny jul. ag. set. oct. nov. des.".split(" "),"quarters-format-abbr":["1T","2T","3T","4T"],
"quarters-standAlone-wide":["1r trimestre","2n trimestre","3r trimestre","4t trimestre"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"diumenge dilluns dimarts dimecres dijous divendres dissabte".split(" "),"dateFormatItem-MMMMd":"d MMMM","timeFormat-medium":"H:mm:ss","field-sun-relative+0":"aquest diumenge","dateFormatItem-Hm":"HH:mm","quarters-standAlone-abbr":["1T","2T","3T","4T"],"field-sun-relative+1":"diumenge que ve",eraAbbr:["aC","dC"],"field-minute":"minut","field-dayperiod":"a. m./p. m.",
"days-standAlone-abbr":"dg. dl. dt. dc. dj. dv. ds.".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"ahir","dateFormatItem-h":"h a","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"a.m.","field-day-relative+-2":"abans-d'ahir","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E d/M","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"aquest divendres","dateFormatItem-yMMMM":"LLLL 'de' y","field-fri-relative+1":"divendres que ve",
"field-day":"dia","days-format-wide":"diumenge dilluns dimarts dimecres dijous divendres dissabte".split(" "),"field-zone":"zona","dateFormatItem-y":"y","months-standAlone-narrow":"GN FB M\u00c7 AB MG JN JL AG ST OC NV DS".split(" "),"field-year-relative+-1":"l'any passat","field-month-relative+-1":"el mes passat","dateFormatItem-hm":"h:mm a","days-format-abbr":"dg. dl. dt. dc. dj. dv. ds.".split(" "),"dateFormatItem-yMMMd":"d MMM y",eraNames:["abans de Crist","a. de la n. e.","despr\u00e9s de Crist",
"de la n. e."],"days-format-narrow":"dg dl dt dc dj dv ds".split(" "),"days-standAlone-narrow":"dg dl dt dc dj dv ds".split(" "),"dateFormatItem-MMM":"LLL","field-month":"mes","field-tue-relative+0":"aquest dimarts","field-tue-relative+1":"dimarts que ve","dayPeriods-format-wide-am":"a. m.","dateFormatItem-MMMMEd":"E d MMMM","dateFormatItem-EHm":"E H:mm","field-mon-relative+0":"aquest dilluns","field-mon-relative+1":"dilluns que ve","dateFormat-short":"d/M/yy","dateFormatItem-EHms":"E H:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a",
"field-second":"segon","field-sat-relative+-1":"dissabte passat","dateFormatItem-yMMMEd":"E, d MMM, y","field-sun-relative+-1":"diumenge passat","field-month-relative+0":"aquest mes","field-month-relative+1":"el mes que ve","dateFormatItem-Ed":"E d","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"setmana","dateFormat-medium":"dd/MM/y","field-year-relative+0":"enguany","field-week-relative+-1":"la setmana passada","field-year-relative+1":"l'any que ve","dayPeriods-format-narrow-pm":"p.m.",
"dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"LLL y G","field-mon-relative+-1":"dilluns passat","field-week-relative+0":"aquesta setmana","field-week-relative+1":"la setmana que ve"})},"mw-datepicker/gregorian/nls/cs/gregorian":function(){define({"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"ne po \u00fat st \u010dt p\u00e1 so".split(" "),"months-format-narrow":"1 2 3 4 5 6 7 8 9 10 11 12".split(" "),"field-second-relative+0":"nyn\u00ed",
"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Den v t\u00fddnu","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E d. M. y","field-wed-relative+0":"tuto st\u0159edu","dateFormatItem-GyMMMEd":"E d. M. y G","dateFormatItem-MMMEd":"E d. M.","field-wed-relative+1":"p\u0159\u00ed\u0161t\u00ed st\u0159edu",eraNarrow:["p\u0159.n.l.","n.l."],"field-tue-relative+-1":"minul\u00e9 \u00fater\u00fd","days-format-short":"ne po \u00fat st \u010dt p\u00e1 so".split(" "),"dateFormat-long":"d. MMMM y",
"field-fri-relative+-1":"minul\u00fd p\u00e1tek","field-wed-relative+-1":"minulou st\u0159edu","months-format-wide":"ledna \u00fanora b\u0159ezna dubna kv\u011btna \u010dervna \u010dervence srpna z\u00e1\u0159\u00ed \u0159\u00edjna listopadu prosince".split(" "),"dateTimeFormat-medium":"{1} {0}","dateFormatItem-yMMMMd":"d. MMMM y","dayPeriods-format-wide-pm":"PM","dateFormat-full":"EEEE d. MMMM y","field-thu-relative+-1":"minul\u00fd \u010dtvrtek","dateFormatItem-Md":"d. M.","dateFormatItem-yMd":"d. M. y",
"dateFormatItem-yM":"M/y","field-era":"Letopo\u010det","months-standAlone-wide":"leden \u00fanor b\u0159ezen duben kv\u011bten \u010derven \u010dervenec srpen z\u00e1\u0159\u00ed \u0159\u00edjen listopad prosinec".split(" "),"timeFormat-short":"H:mm","quarters-format-wide":["1. \u010dtvrtlet\u00ed","2. \u010dtvrtlet\u00ed","3. \u010dtvrtlet\u00ed","4. \u010dtvrtlet\u00ed"],"timeFormat-long":"H:mm:ss z","dateFormatItem-yMMM":"LLLL y","dateFormatItem-yQQQQ":"QQQQ y","field-year":"Rok","field-hour":"Hodina",
"months-format-abbr":"led \u00fano b\u0159e dub kv\u011b \u010dvn \u010dvc srp z\u00e1\u0159 \u0159\u00edj lis pro".split(" "),"field-sat-relative+0":"tuto sobotu","field-sat-relative+1":"p\u0159\u00ed\u0161t\u00ed sobotu","timeFormat-full":"H:mm:ss zzzz","field-day-relative+0":"dnes","field-day-relative+1":"z\u00edtra","field-thu-relative+0":"tento \u010dtvrtek","dateFormatItem-GyMMMd":"d. M. y G","field-day-relative+2":"poz\u00edt\u0159\u00ed","field-thu-relative+1":"p\u0159\u00ed\u0161t\u00ed \u010dtvrtek",
"dateFormatItem-H":"H","months-standAlone-abbr":"led \u00fano b\u0159e dub kv\u011b \u010dvn \u010dvc srp z\u00e1\u0159 \u0159\u00edj lis pro".split(" "),"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["1. \u010dtvrtlet\u00ed","2. \u010dtvrtlet\u00ed","3. \u010dtvrtlet\u00ed","4. \u010dtvrtlet\u00ed"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"ned\u011ble pond\u011bl\u00ed \u00fater\u00fd st\u0159eda \u010dtvrtek p\u00e1tek sobota".split(" "),
"dateFormatItem-MMMMd":"d. MMMM","dateFormatItem-GyMMMMd":"d. MMMM y G","timeFormat-medium":"H:mm:ss","field-sun-relative+0":"tuto ned\u011bli","dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],"field-sun-relative+1":"p\u0159\u00ed\u0161t\u00ed ned\u011bli",eraAbbr:["p\u0159. n. l.","n. l."],"field-minute":"Minuta","field-dayperiod":"AM/PM","days-standAlone-abbr":"ne po \u00fat st \u010dt p\u00e1 so".split(" "),"dateFormatItem-d":"d.","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1",
"2","3","4"],"field-day-relative+-1":"v\u010dera","dateFormatItem-h":"h a","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"AM","field-day-relative+-2":"p\u0159edev\u010d\u00edrem","dateFormatItem-MMMd":"d. M.","dateFormatItem-MEd":"E d. M.","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"tento p\u00e1tek","dateFormatItem-yMMMM":"LLLL y","field-fri-relative+1":"p\u0159\u00ed\u0161t\u00ed p\u00e1tek","field-day":"Den","days-format-wide":"ned\u011ble pond\u011bl\u00ed \u00fater\u00fd st\u0159eda \u010dtvrtek p\u00e1tek sobota".split(" "),
"field-zone":"\u010casov\u00e9 p\u00e1smo","dateFormatItem-y":"y","months-standAlone-narrow":"l\u00fabdk\u010d\u010dsz\u0159lp".split(""),"field-year-relative+-1":"minul\u00fd rok","field-month-relative+-1":"minul\u00fd m\u011bs\u00edc","dateFormatItem-hm":"h:mm a","days-format-abbr":"ne po \u00fat st \u010dt p\u00e1 so".split(" "),eraNames:["p\u0159. n. l.","n. l."],"dateFormatItem-yMMMd":"d. M. y","days-format-narrow":"NP\u00daS\u010cPS".split(""),"days-standAlone-narrow":"NP\u00daS\u010cPS".split(""),
"dateFormatItem-MMM":"LLL","field-month":"M\u011bs\u00edc","field-tue-relative+0":"toto \u00fater\u00fd","field-tue-relative+1":"p\u0159\u00ed\u0161t\u00ed \u00fater\u00fd","dayPeriods-format-wide-am":"AM","dateFormatItem-MMMMEd":"E d. MMMM","dateFormatItem-EHm":"E H:mm","field-mon-relative+0":"toto pond\u011bl\u00ed","field-mon-relative+1":"p\u0159\u00ed\u0161t\u00ed pond\u011bl\u00ed","dateFormat-short":"dd.MM.yy","dateFormatItem-EHms":"E H:mm:ss","dateFormatItem-yMMMMEd":"E d. MMMM y","dateFormatItem-Ehms":"E h:mm:ss a",
"field-second":"Sekunda","field-sat-relative+-1":"minulou sobotu","dateFormatItem-yMMMEd":"E d. M. y","field-sun-relative+-1":"minulou ned\u011bli","field-month-relative+0":"tento m\u011bs\u00edc","field-month-relative+1":"p\u0159\u00ed\u0161t\u00ed m\u011bs\u00edc","dateFormatItem-Ed":"E d.","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"T\u00fdden","dateFormat-medium":"d. M. y","field-year-relative+0":"tento rok","field-week-relative+-1":"minul\u00fd t\u00fdden","field-year-relative+1":"p\u0159\u00ed\u0161t\u00ed rok",
"dayPeriods-format-narrow-pm":"PM","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"LLLL y G","dateFormatItem-GyMMMMEd":"E d. MMMM y G","field-mon-relative+-1":"minul\u00e9 pond\u011bl\u00ed","field-week-relative+0":"tento t\u00fdden","field-week-relative+1":"p\u0159\u00ed\u0161t\u00ed t\u00fdden"})},"mw-datepicker/gregorian/nls/da/gregorian":function(){define({"dateFormatItem-Ehm":"E h.mm a","days-standAlone-short":"s\u00f8 ma ti on to fr l\u00f8".split(" "),
"months-format-narrow":"JFMAMJJASOND".split(""),"field-second-relative+0":"nu","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Ugedag","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E d/M/y","field-wed-relative+0":"denne onsdag","dateFormatItem-GyMMMEd":"E d. MMM y G","dateFormatItem-MMMEd":"E d. MMM","field-wed-relative+1":"n\u00e6ste onsdag",eraNarrow:["fKr","fvt","eKr","vt"],"dateFormatItem-yMM":"MM/y","field-tue-relative+-1":"sidste tirsdag","days-format-short":"s\u00f8 ma ti on to fr l\u00f8".split(" "),
"dateFormat-long":"d. MMM y","field-fri-relative+-1":"sidste fredag","field-wed-relative+-1":"sidste onsdag","months-format-wide":"januar februar marts april maj juni juli august september oktober november december".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"PM","dateFormat-full":"EEEE 'den' d. MMMM y","field-thu-relative+-1":"sidste torsdag","dateFormatItem-Md":"d/M","dayPeriods-format-wide-noon":"middag","dateFormatItem-yMd":"d/M/y","dateFormatItem-yM":"M/y","field-era":"\u00c6ra",
"months-standAlone-wide":"januar februar marts april maj juni juli august september oktober november december".split(" "),"timeFormat-short":"HH.mm","quarters-format-wide":["1. kvartal","2. kvartal","3. kvartal","4. kvartal"],"timeFormat-long":"HH.mm.ss z","dateFormatItem-yMMM":"MMM y","dateFormatItem-yQQQQ":"QQQQ y","field-year":"\u00c5r","dateFormatItem-MMdd":"dd/MM","field-hour":"Time","months-format-abbr":"jan. feb. mar. apr. maj jun. jul. aug. sep. okt. nov. dec.".split(" "),"field-sat-relative+0":"denne l\u00f8rdag",
"field-sat-relative+1":"n\u00e6ste l\u00f8rdag","timeFormat-full":"HH.mm.ss zzzz","field-day-relative+0":"i dag","field-day-relative+1":"i morgen","field-thu-relative+0":"denne torsdag","dateFormatItem-GyMMMd":"d. MMM y G","field-day-relative+2":"i overmorgen","field-thu-relative+1":"n\u00e6ste torsdag","dateFormatItem-H":"HH","months-standAlone-abbr":"jan feb mar apr maj jun jul aug sep okt nov dec".split(" "),"quarters-format-abbr":["K1","K2","K3","K4"],"quarters-standAlone-wide":["1. kvartal",
"2. kvartal","3. kvartal","4. kvartal"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"M","days-standAlone-wide":"s\u00f8ndag mandag tirsdag onsdag torsdag fredag l\u00f8rdag".split(" "),"dayPeriods-format-abbr-noon":"middag","timeFormat-medium":"HH.mm.ss","field-sun-relative+0":"denne s\u00f8ndag","dateFormatItem-Hm":"HH.mm","quarters-standAlone-abbr":["K1","K2","K3","K4"],"field-sun-relative+1":"n\u00e6ste s\u00f8ndag",eraAbbr:["f.Kr.","e.Kr."],"field-minute":"Minut","field-dayperiod":"AM/PM","days-standAlone-abbr":"s\u00f8n man tir ons tor fre l\u00f8r".split(" "),
"dateFormatItem-d":"d.","dateFormatItem-ms":"mm.ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"i g\u00e5r","dateFormatItem-h":"h a","dateTimeFormat-long":"{1} 'kl.' {0}","field-day-relative+-2":"i forg\u00e5rs","dateFormatItem-MMMd":"d. MMM","dateFormatItem-MEd":"E d/M","dateTimeFormat-full":"{1} 'kl.' {0}","field-fri-relative+0":"denne fredag","field-fri-relative+1":"n\u00e6ste fredag","field-day":"Dag","days-format-wide":"s\u00f8ndag mandag tirsdag onsdag torsdag fredag l\u00f8rdag".split(" "),
"field-zone":"Tidszone","dateFormatItem-y":"y","months-standAlone-narrow":"JFMAMJJASOND".split(""),"field-year-relative+-1":"sidste \u00e5r","field-month-relative+-1":"sidste m\u00e5ned","dateFormatItem-hm":"h.mm a","days-format-abbr":"s\u00f8n. man. tir. ons. tor. fre. l\u00f8r.".split(" "),eraNames:["f.Kr.","f\u00f8r vesterlandsk tidsregning","e.Kr.","vesterlandsk tidsregning"],"dateFormatItem-yMMMd":"d. MMM y","days-format-narrow":"SMTOTFL".split(""),"days-standAlone-narrow":"SMTOTFL".split(""),
"dateFormatItem-MMM":"MMM","field-month":"M\u00e5ned","field-tue-relative+0":"denne tirsdag","field-tue-relative+1":"n\u00e6ste tirsdag","dayPeriods-format-wide-am":"AM","dateFormatItem-MMMMEd":"E d. MMMM","dateFormatItem-EHm":"E HH.mm","field-mon-relative+0":"denne mandag","field-mon-relative+1":"n\u00e6ste mandag","dateFormat-short":"dd/MM/yy","dateFormatItem-EHms":"E HH.mm.ss","dateFormatItem-Ehms":"E h.mm.ss a","dayPeriods-format-narrow-noon":"middag","field-second":"Sekund","field-sat-relative+-1":"sidste l\u00f8rdag",
"dateFormatItem-yMMMEd":"E d. MMM y","field-sun-relative+-1":"sidste s\u00f8ndag","field-month-relative+0":"denne m\u00e5ned","field-month-relative+1":"n\u00e6ste m\u00e5ned","dateFormatItem-Ed":"E 'd'. d.","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"Uge","dateFormat-medium":"dd/MM/y","field-year-relative+0":"i \u00e5r","field-week-relative+-1":"sidste uge","field-year-relative+1":"n\u00e6ste \u00e5r","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH.mm.ss","dateFormatItem-hms":"h.mm.ss a",
"dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"sidste mandag","field-week-relative+0":"denne uge","field-week-relative+1":"n\u00e6ste uge"})},"mw-datepicker/gregorian/nls/de/gregorian":function(){define({"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"So. Mo. Di. Mi. Do. Fr. Sa.".split(" "),"months-format-narrow":"JFMAMJJASOND".split(""),"field-second-relative+0":"jetzt","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Wochentag","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E, d.M.y",
"field-wed-relative+0":"Diesen Mittwoch","dateFormatItem-GyMMMEd":"E, d. MMM y G","dateFormatItem-MMMEd":"E, d. MMM","field-wed-relative+1":"N\u00e4chsten Mittwoch",eraNarrow:["v. Chr.","n. Chr."],"dateFormatItem-yMM":"MM.y","dayPeriods-format-wide-earlyMorning":"morgens","field-tue-relative+-1":"Letzten Dienstag","dayPeriods-format-wide-morning":"vormittags","days-format-short":"So. Mo. Di. Mi. Do. Fr. Sa.".split(" "),"dateFormat-long":"d. MMMM y","field-fri-relative+-1":"Letzten Freitag","field-wed-relative+-1":"Letzten Mittwoch",
"months-format-wide":"Januar Februar M\u00e4rz April Mai Juni Juli August September Oktober November Dezember".split(" "),"dayPeriods-format-wide-evening":"abends","dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"nachm.","dateFormat-full":"EEEE, d. MMMM y","field-thu-relative+-1":"Letzten Donnerstag","dateFormatItem-Md":"d.M.","dayPeriods-format-wide-noon":"Mittag","dateFormatItem-yMd":"d.M.y","dateFormatItem-yM":"M.y","field-era":"Epoche","months-standAlone-wide":"Januar Februar M\u00e4rz April Mai Juni Juli August September Oktober November Dezember".split(" "),
"timeFormat-short":"HH:mm","quarters-format-wide":["1. Quartal","2. Quartal","3. Quartal","4. Quartal"],"timeFormat-long":"HH:mm:ss z","dateFormatItem-yMMM":"MMM y","dateFormatItem-yQQQQ":"QQQQ y","field-year":"Jahr","dateFormatItem-MMdd":"dd.MM.","field-hour":"Stunde","months-format-abbr":"Jan. Feb. M\u00e4rz Apr. Mai Juni Juli Aug. Sep. Okt. Nov. Dez.".split(" "),"field-sat-relative+0":"Diesen Samstag","field-sat-relative+1":"N\u00e4chsten Samstag","timeFormat-full":"HH:mm:ss zzzz","field-day-relative+0":"Heute",
"field-day-relative+1":"Morgen","field-thu-relative+0":"Diesen Donnerstag","dateFormatItem-GyMMMd":"d. MMM y G","field-day-relative+2":"\u00dcbermorgen","field-thu-relative+1":"N\u00e4chsten Donnerstag","dateFormatItem-H":"HH 'Uhr'","months-standAlone-abbr":"Jan Feb M\u00e4r Apr Mai Jun Jul Aug Sep Okt Nov Dez".split(" "),"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["1. Quartal","2. Quartal","3. Quartal","4. Quartal"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag".split(" "),
"timeFormat-medium":"HH:mm:ss","dateFormatItem-yMMdd":"dd.MM.y","field-sun-relative+0":"Diesen Sonntag","dateFormatItem-Hm":"HH:mm","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],"field-sun-relative+1":"N\u00e4chsten Sonntag",eraAbbr:["v. Chr.","n. Chr."],"field-minute":"Minute","field-dayperiod":"Tagesh\u00e4lfte","days-standAlone-abbr":"So Mo Di Mi Do Fr Sa".split(" "),"dayPeriods-format-wide-night":"nachts","dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2",
"3","4"],"field-day-relative+-1":"Gestern","dateFormatItem-h":"h a","dateTimeFormat-long":"{1} {0}","field-day-relative+-2":"Vorgestern","dateFormatItem-MMMd":"d. MMM","dateFormatItem-MEd":"E, d.M.","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"Diesen Freitag","dateFormatItem-yMMMM":"MMMM y","field-fri-relative+1":"N\u00e4chsten Freitag","field-day":"Tag","days-format-wide":"Sonntag Montag Dienstag Mittwoch Donnerstag Freitag Samstag".split(" "),"field-zone":"Zeitzone","dateFormatItem-y":"y",
"months-standAlone-narrow":"JFMAMJJASOND".split(""),"field-year-relative+-1":"Letztes Jahr","field-month-relative+-1":"Letzter Monat","dateFormatItem-hm":"h:mm a","days-format-abbr":"So. Mo. Di. Mi. Do. Fr. Sa.".split(" "),eraNames:["v. Chr.","n. Chr."],"dateFormatItem-yMMMd":"d. MMM y","days-format-narrow":"SMDMDFS".split(""),"days-standAlone-narrow":"SMDMDFS".split(""),"dateFormatItem-MMM":"LLL","field-month":"Monat","field-tue-relative+0":"Diesen Dienstag","field-tue-relative+1":"N\u00e4chsten Dienstag",
"dayPeriods-format-wide-am":"vorm.","dateFormatItem-MMMMEd":"E, d. MMMM","dateFormatItem-EHm":"E, HH:mm","field-mon-relative+0":"Diesen Montag","field-mon-relative+1":"N\u00e4chsten Montag","dateFormat-short":"dd.MM.yy","dateFormatItem-MMd":"d.MM.","dayPeriods-format-wide-afternoon":"nachmittags","dateFormatItem-EHms":"E, HH:mm:ss","dateFormatItem-Ehms":"E, h:mm:ss a","field-second":"Sekunde","field-sat-relative+-1":"Letzten Samstag","dateFormatItem-yMMMEd":"E, d. MMM y","field-sun-relative+-1":"Letzten Sonntag",
"field-month-relative+0":"Dieser Monat","field-month-relative+1":"N\u00e4chster Monat","dateFormatItem-Ed":"E, d.","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"Woche","dateFormat-medium":"dd.MM.y","field-year-relative+0":"Dieses Jahr","field-week-relative+-1":"Letzte Woche","field-year-relative+1":"N\u00e4chstes Jahr","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"Letzten Montag",
"field-week-relative+0":"Diese Woche","field-week-relative+1":"N\u00e4chste Woche"})},"mw-datepicker/gregorian/nls/el/gregorian":function(){define({"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"\u039a\u03c5 \u0394\u03b5 \u03a4\u03c1 \u03a4\u03b5 \u03a0\u03ad \u03a0\u03b1 \u03a3\u03ac".split(" "),"months-format-narrow":"\u0399\u03a6\u039c\u0391\u039c\u0399\u0399\u0391\u03a3\u039f\u039d\u0394".split(""),"field-second-relative+0":"\u03c4\u03ce\u03c1\u03b1","quarters-standAlone-narrow":["1",
"2","3","4"],"field-weekday":"\u0397\u03bc\u03ad\u03c1\u03b1 \u03b5\u03b2\u03b4\u03bf\u03bc\u03ac\u03b4\u03b1\u03c2","dateFormatItem-yQQQ":"y QQQ","dateFormatItem-yMEd":"E, d/M/y","field-wed-relative+0":"\u03b1\u03c5\u03c4\u03ae\u03bd \u03c4\u03b7\u03bd \u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7","field-wed-relative+1":"\u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03b7 \u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7","dateFormatItem-GyMMMEd":"E, d MMM y G","dateFormatItem-MMMEd":"E, d MMM",eraNarrow:["\u03c0.\u03a7.",
"\u03bc.\u03a7."],"field-tue-relative+-1":"\u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03b7 \u03a4\u03c1\u03af\u03c4\u03b7","days-format-short":"\u039a\u03c5 \u0394\u03b5 \u03a4\u03c1 \u03a4\u03b5 \u03a0\u03ad \u03a0\u03b1 \u03a3\u03ac".split(" "),"dateFormat-long":"d MMMM y","field-fri-relative+-1":"\u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03b7 \u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae","field-wed-relative+-1":"\u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03b7 \u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7",
"months-format-wide":"\u0399\u03b1\u03bd\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5 \u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03b1\u03c1\u03af\u03bf\u03c5 \u039c\u03b1\u03c1\u03c4\u03af\u03bf\u03c5 \u0391\u03c0\u03c1\u03b9\u03bb\u03af\u03bf\u03c5 \u039c\u03b1\u0390\u03bf\u03c5 \u0399\u03bf\u03c5\u03bd\u03af\u03bf\u03c5 \u0399\u03bf\u03c5\u03bb\u03af\u03bf\u03c5 \u0391\u03c5\u03b3\u03bf\u03cd\u03c3\u03c4\u03bf\u03c5 \u03a3\u03b5\u03c0\u03c4\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5 \u039f\u03ba\u03c4\u03c9\u03b2\u03c1\u03af\u03bf\u03c5 \u039d\u03bf\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5 \u0394\u03b5\u03ba\u03b5\u03bc\u03b2\u03c1\u03af\u03bf\u03c5".split(" "),
"dateTimeFormat-medium":"{1} - {0}","dayPeriods-format-wide-pm":"\u03bc.\u03bc.","dateFormat-full":"EEEE, d MMMM y","field-thu-relative+-1":"\u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03b7 \u03a0\u03ad\u03bc\u03c0\u03c4\u03b7","dateFormatItem-Md":"d/M","dateFormatItem-yMd":"d/M/y","field-era":"\u03a0\u03b5\u03c1\u03af\u03bf\u03b4\u03bf\u03c2","dateFormatItem-yM":"M/y","months-standAlone-wide":"\u0399\u03b1\u03bd\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2 \u03a6\u03b5\u03b2\u03c1\u03bf\u03c5\u03ac\u03c1\u03b9\u03bf\u03c2 \u039c\u03ac\u03c1\u03c4\u03b9\u03bf\u03c2 \u0391\u03c0\u03c1\u03af\u03bb\u03b9\u03bf\u03c2 \u039c\u03ac\u03b9\u03bf\u03c2 \u0399\u03bf\u03cd\u03bd\u03b9\u03bf\u03c2 \u0399\u03bf\u03cd\u03bb\u03b9\u03bf\u03c2 \u0391\u03cd\u03b3\u03bf\u03c5\u03c3\u03c4\u03bf\u03c2 \u03a3\u03b5\u03c0\u03c4\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2 \u039f\u03ba\u03c4\u03ce\u03b2\u03c1\u03b9\u03bf\u03c2 \u039d\u03bf\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2 \u0394\u03b5\u03ba\u03ad\u03bc\u03b2\u03c1\u03b9\u03bf\u03c2".split(" "),
"timeFormat-short":"h:mm a","quarters-format-wide":["1\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf","2\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf","3\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf","4\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf"],"dateFormatItem-yQQQQ":"y QQQQ","timeFormat-long":"h:mm:ss a z","field-year":"\u0388\u03c4\u03bf\u03c2","dateFormatItem-yMMM":"LLL y","field-hour":"\u038f\u03c1\u03b1","months-format-abbr":"\u0399\u03b1\u03bd \u03a6\u03b5\u03b2 \u039c\u03b1\u03c1 \u0391\u03c0\u03c1 \u039c\u03b1\u0390 \u0399\u03bf\u03c5\u03bd \u0399\u03bf\u03c5\u03bb \u0391\u03c5\u03b3 \u03a3\u03b5\u03c0 \u039f\u03ba\u03c4 \u039d\u03bf\u03b5 \u0394\u03b5\u03ba".split(" "),
"field-sat-relative+0":"\u03b1\u03c5\u03c4\u03cc \u03c4\u03bf \u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf","field-sat-relative+1":"\u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03bf \u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf","timeFormat-full":"h:mm:ss a zzzz","field-day-relative+0":"\u03c3\u03ae\u03bc\u03b5\u03c1\u03b1","field-thu-relative+0":"\u03b1\u03c5\u03c4\u03ae\u03bd \u03c4\u03b7\u03bd \u03a0\u03ad\u03bc\u03c0\u03c4\u03b7","field-day-relative+1":"\u03b1\u03cd\u03c1\u03b9\u03bf","field-thu-relative+1":"\u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03b7 \u03a0\u03ad\u03bc\u03c0\u03c4\u03b7",
"dateFormatItem-GyMMMd":"d MMM y G","field-day-relative+2":"\u03bc\u03b5\u03b8\u03b1\u03cd\u03c1\u03b9\u03bf","dateFormatItem-H":"HH","months-standAlone-abbr":"\u0399\u03b1\u03bd \u03a6\u03b5\u03b2 \u039c\u03ac\u03c1 \u0391\u03c0\u03c1 \u039c\u03ac\u03b9 \u0399\u03bf\u03cd\u03bd \u0399\u03bf\u03cd\u03bb \u0391\u03cd\u03b3 \u03a3\u03b5\u03c0 \u039f\u03ba\u03c4 \u039d\u03bf\u03ad \u0394\u03b5\u03ba".split(" "),"quarters-format-abbr":["\u03a41","\u03a42","\u03a43","\u03a44"],"quarters-standAlone-wide":["1\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf",
"2\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf","3\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf","4\u03bf \u03c4\u03c1\u03af\u03bc\u03b7\u03bd\u03bf"],"dateFormatItem-Gy":"y G","dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-M":"L","days-standAlone-wide":"\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae \u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1 \u03a4\u03c1\u03af\u03c4\u03b7 \u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7 \u03a0\u03ad\u03bc\u03c0\u03c4\u03b7 \u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae \u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf".split(" "),
"dateFormatItem-MMMMd":"d MMMM","timeFormat-medium":"h:mm:ss a","field-sun-relative+0":"\u03b1\u03c5\u03c4\u03ae\u03bd \u03c4\u03b7\u03bd \u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"\u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03b7 \u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae","quarters-standAlone-abbr":["\u03a41","\u03a42","\u03a43","\u03a44"],eraAbbr:["\u03c0.\u03a7.","\u03bc.\u03a7."],"field-minute":"\u039b\u03b5\u03c0\u03c4\u03cc","field-dayperiod":"\u03c0.\u03bc./\u03bc.\u03bc.",
"days-standAlone-abbr":"\u039a\u03c5\u03c1 \u0394\u03b5\u03c5 \u03a4\u03c1\u03af \u03a4\u03b5\u03c4 \u03a0\u03ad\u03bc \u03a0\u03b1\u03c1 \u03a3\u03ac\u03b2".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"\u03c7\u03b8\u03b5\u03c2","dateFormatItem-h":"h a","dateTimeFormat-long":"{1} - {0}","field-day-relative+-2":"\u03c0\u03c1\u03bf\u03c7\u03b8\u03ad\u03c2","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E, d/M",
"dateTimeFormat-full":"{1} - {0}","field-fri-relative+0":"\u03b1\u03c5\u03c4\u03ae\u03bd \u03c4\u03b7\u03bd \u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae","dateFormatItem-yMMMM":"LLLL y","field-fri-relative+1":"\u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03b7 \u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae","field-day":"\u0397\u03bc\u03ad\u03c1\u03b1","days-format-wide":"\u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae \u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1 \u03a4\u03c1\u03af\u03c4\u03b7 \u03a4\u03b5\u03c4\u03ac\u03c1\u03c4\u03b7 \u03a0\u03ad\u03bc\u03c0\u03c4\u03b7 \u03a0\u03b1\u03c1\u03b1\u03c3\u03ba\u03b5\u03c5\u03ae \u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf".split(" "),
"field-zone":"\u0396\u03ce\u03bd\u03b7","dateFormatItem-y":"y","months-standAlone-narrow":"\u0399\u03a6\u039c\u0391\u039c\u0399\u0399\u0391\u03a3\u039f\u039d\u0394".split(""),"field-year-relative+-1":"\u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03bf \u03ad\u03c4\u03bf\u03c2","field-month-relative+-1":"\u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03bf\u03c2 \u03bc\u03ae\u03bd\u03b1\u03c2","dateFormatItem-hm":"h:mm a","days-format-abbr":"\u039a\u03c5\u03c1 \u0394\u03b5\u03c5 \u03a4\u03c1\u03af \u03a4\u03b5\u03c4 \u03a0\u03ad\u03bc \u03a0\u03b1\u03c1 \u03a3\u03ac\u03b2".split(" "),
"dateFormatItem-yMMMd":"d MMM y",eraNames:["\u03c0.\u03a7.","\u03bc.\u03a7."],"days-format-narrow":"\u039a\u0394\u03a4\u03a4\u03a0\u03a0\u03a3".split(""),"days-standAlone-narrow":"\u039a\u0394\u03a4\u03a4\u03a0\u03a0\u03a3".split(""),"dateFormatItem-MMM":"LLL","field-month":"\u039c\u03ae\u03bd\u03b1\u03c2","dateFormatItem-HHmm":"HH:mm","field-tue-relative+0":"\u03b1\u03c5\u03c4\u03ae\u03bd \u03c4\u03b7\u03bd \u03a4\u03c1\u03af\u03c4\u03b7","field-tue-relative+1":"\u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03b7 \u03a4\u03c1\u03af\u03c4\u03b7",
"dayPeriods-format-wide-am":"\u03c0.\u03bc.","dateFormatItem-MMMMEd":"E, d MMMM","dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"\u03b1\u03c5\u03c4\u03ae\u03bd \u03c4\u03b7 \u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1","field-mon-relative+1":"\u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03b7 \u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1","dateFormat-short":"d/M/yy","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","field-second":"\u0394\u03b5\u03c5\u03c4\u03b5\u03c1\u03cc\u03bb\u03b5\u03c0\u03c4\u03bf",
"field-sat-relative+-1":"\u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03bf \u03a3\u03ac\u03b2\u03b2\u03b1\u03c4\u03bf","dateFormatItem-yMMMEd":"E, d MMM y","field-sun-relative+-1":"\u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03b7 \u039a\u03c5\u03c1\u03b9\u03b1\u03ba\u03ae","field-month-relative+0":"\u03c4\u03c1\u03ad\u03c7\u03c9\u03bd \u03bc\u03ae\u03bd\u03b1\u03c2","field-month-relative+1":"\u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03bf\u03c2 \u03bc\u03ae\u03bd\u03b1\u03c2",
"dateFormatItem-Ed":"E d","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"\u0395\u03b2\u03b4\u03bf\u03bc\u03ac\u03b4\u03b1","dateFormat-medium":"d MMM y","field-year-relative+0":"\u03c6\u03ad\u03c4\u03bf\u03c2","field-week-relative+-1":"\u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03b7 \u03b5\u03b2\u03b4\u03bf\u03bc\u03ac\u03b4\u03b1","field-year-relative+1":"\u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03bf \u03ad\u03c4\u03bf\u03c2","dateTimeFormat-short":"{1} - {0}","dateFormatItem-Hms":"HH:mm:ss",
"dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"LLL y G","field-mon-relative+-1":"\u03c0\u03c1\u03bf\u03b7\u03b3\u03bf\u03cd\u03bc\u03b5\u03bd\u03b7 \u0394\u03b5\u03c5\u03c4\u03ad\u03c1\u03b1","field-week-relative+0":"\u03b1\u03c5\u03c4\u03ae\u03bd \u03c4\u03b7\u03bd \u03b5\u03b2\u03b4\u03bf\u03bc\u03ac\u03b4\u03b1","field-week-relative+1":"\u03b5\u03c0\u03cc\u03bc\u03b5\u03bd\u03b7 \u03b5\u03b2\u03b4\u03bf\u03bc\u03ac\u03b4\u03b1"})},"mw-datepicker/gregorian/nls/en/gregorian":function(){define({"dateFormatItem-Ehm":"E h:mm a",
"days-standAlone-short":"Su Mo Tu We Th Fr Sa".split(" "),"months-format-narrow":"JFMAMJJASOND".split(""),"field-second-relative+0":"now","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Day of the Week","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E, M/d/y","field-wed-relative+0":"this Wednesday","field-wed-relative+1":"next Wednesday","dateFormatItem-GyMMMEd":"E, MMM d, y G","dateFormatItem-MMMEd":"E, MMM d",eraNarrow:["B","A"],"field-tue-relative+-1":"last Tuesday","days-format-short":"Su Mo Tu We Th Fr Sa".split(" "),
"dateTimeFormats-appendItem-Day-Of-Week":"{0} {1}","dateFormat-long":"MMMM d, y","field-fri-relative+-1":"last Friday","field-wed-relative+-1":"last Wednesday","months-format-wide":"January February March April May June July August September October November December".split(" "),"dateTimeFormat-medium":"{1}, {0}","dayPeriods-format-wide-pm":"PM","dateFormat-full":"EEEE, MMMM d, y","field-thu-relative+-1":"last Thursday","dateFormatItem-Md":"M/d","dateTimeFormats-appendItem-Second":"{0} ({2}: {1})",
"dayPeriods-format-wide-noon":"noon","dateFormatItem-yMd":"M/d/y","field-era":"Era","dateFormatItem-yM":"M/y","months-standAlone-wide":"January February March April May June July August September October November December".split(" "),"timeFormat-short":"h:mm a","quarters-format-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"dateFormatItem-yQQQQ":"QQQQ y","timeFormat-long":"h:mm:ss a z","field-year":"Year","dateFormatItem-yMMM":"MMM y","dateTimeFormats-appendItem-Era":"{0} {1}","field-hour":"Hour",
"months-format-abbr":"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),"field-sat-relative+0":"this Saturday","field-sat-relative+1":"next Saturday","timeFormat-full":"h:mm:ss a zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}: {1})","field-day-relative+0":"today","field-thu-relative+0":"this Thursday","field-day-relative+1":"tomorrow","field-thu-relative+1":"next Thursday","dateFormatItem-GyMMMd":"MMM d, y G","dateFormatItem-H":"HH","months-standAlone-abbr":"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),
"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["1st quarter","2nd quarter","3rd quarter","4th quarter"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),"timeFormat-medium":"h:mm:ss a","field-sun-relative+0":"this Sunday","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"next Sunday",eraAbbr:["BC","AD"],"field-minute":"Minute","field-dayperiod":"AM/PM","dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss",
"field-day-relative+-1":"yesterday","dateFormatItem-h":"h a","dateTimeFormat-long":"{1} 'at' {0}","dayPeriods-format-narrow-am":"a","dateFormatItem-MMMd":"MMM d","dateFormatItem-MEd":"E, M/d","dateTimeFormat-full":"{1} 'at' {0}","field-fri-relative+0":"this Friday","field-fri-relative+1":"next Friday","field-day":"Day","days-format-wide":"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),"field-zone":"Time Zone","dateTimeFormats-appendItem-Day":"{0} ({2}: {1})","dateFormatItem-y":"y",
"months-standAlone-narrow":"JFMAMJJASOND".split(""),"field-year-relative+-1":"last year","field-month-relative+-1":"last month","dateFormatItem-hm":"h:mm a","dateTimeFormats-appendItem-Year":"{0} {1}","dateTimeFormats-appendItem-Hour":"{0} ({2}: {1})","days-format-abbr":"Sun Mon Tue Wed Thu Fri Sat".split(" "),"dateFormatItem-yMMMd":"MMM d, y",eraNames:["Before Christ","Anno Domini"],"days-standAlone-narrow":"SMTWTFS".split(""),"dateFormatItem-MMM":"LLL","field-month":"Month","field-tue-relative+0":"this Tuesday",
"dateTimeFormats-appendItem-Quarter":"{0} ({2}: {1})","field-tue-relative+1":"next Tuesday","dayPeriods-format-wide-am":"AM","dateTimeFormats-appendItem-Month":"{0} ({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}: {1})","dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"this Monday","field-mon-relative+1":"next Monday","dateFormat-short":"M/d/yy","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","dayPeriods-format-narrow-noon":"n","field-second":"Second","field-sat-relative+-1":"last Saturday",
"dateFormatItem-yMMMEd":"E, MMM d, y","field-sun-relative+-1":"last Sunday","field-month-relative+0":"this month","field-month-relative+1":"next month","dateFormatItem-Ed":"d E","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"Week","dateFormat-medium":"MMM d, y","field-year-relative+0":"this year","field-week-relative+-1":"last week","field-year-relative+1":"next year","dayPeriods-format-narrow-pm":"p","dateTimeFormat-short":"{1}, {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a",
"dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"last Monday","field-week-relative+0":"this week","field-week-relative+1":"next week"})},"mw-datepicker/gregorian/nls/en-au/gregorian":function(){define({"dateFormatItem-yMd":"d/M/y","dateFormat-medium":"d MMM y","field-year-relative+-1":"Last year","dateFormatItem-yMEd":"E, d/M/y","field-month-relative+-1":"Last month","field-day-relative+-1":"Yesterday","timeFormat-full":"h:mm:ss a zzzz","field-week-relative+0":"This week","field-week-relative+1":"Next week",
"timeFormat-medium":"h:mm:ss a","field-week-relative+-1":"Last week","field-day-relative+0":"Today","field-day-relative+1":"Tomorrow","dateFormat-long":"d MMMM y","field-month-relative+0":"This month","field-month-relative+1":"Next month","dateFormat-short":"d/MM/y","field-year-relative+0":"This year","field-year-relative+1":"Next year","timeFormat-short":"h:mm a","timeFormat-long":"h:mm:ss a z","dateFormat-full":"EEEE, d MMMM y"})},"mw-datepicker/gregorian/nls/en-ca/gregorian":function(){define({"dateFormatItem-yMEd":"E, y-MM-dd",
"dateFormatItem-yMd":"y-MM-dd","dateFormat-short":"y-MM-dd","dateFormatItem-MEd":"E, MM-dd","dateFormatItem-yM":"y-MM","dateFormatItem-Md":"MM-dd"})},"mw-datepicker/gregorian/nls/en-gb/gregorian":function(){define({"dateFormat-medium":"d MMM y","dateFormatItem-yMd":"dd/MM/y","dateFormatItem-MMMEd":"E d MMM","dateFormatItem-MEd":"E dd/MM","dateFormatItem-MMdd":"dd/MM","dateFormatItem-yMEd":"E, dd/MM/y","dateTimeFormat-medium":"{1} {0}","dateFormatItem-GyMMMd":"d MMM y G","timeFormat-full":"HH:mm:ss zzzz",
"dateFormatItem-yMMMd":"d MMM y","dateFormatItem-Md":"dd/MM","dateFormatItem-GyMMMEd":"E, d MMM y G","dateFormatItem-M":"LL","dayPeriods-format-wide-pm":"pm","dateFormatItem-MMMMd":"d MMMM","dateTimeFormat-long":"{1} {0}","dayPeriods-format-wide-am":"am","timeFormat-medium":"HH:mm:ss","dateFormat-long":"d MMMM y","field-dayperiod":"am/pm","dateFormat-short":"dd/MM/y","dateFormatItem-yMMMEd":"E, d MMM y","dateTimeFormat-short":"{1} {0}","dateFormatItem-yMMMM":"MMMM y","dateTimeFormat-full":"{1} {0}",
"dateFormatItem-yM":"MM/y","timeFormat-short":"HH:mm","timeFormat-long":"HH:mm:ss z","dateFormat-full":"EEEE, d MMMM y","dateFormatItem-MMMd":"d MMM","dateFormatItem-Ed":"E d"})},"mw-datepicker/gregorian/nls/es/gregorian":function(){define({"dateFormatItem-Ehm":"E, h:mm a","days-standAlone-short":"DO LU MA MI JU VI SA".split(" "),"months-format-narrow":"EFMAMJJASOND".split(""),"field-second-relative+0":"ahora","quarters-standAlone-narrow":["1T","2T","3T","4T"],"field-weekday":"d\u00eda de la semana",
"dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"EEE, d/M/y","field-wed-relative+0":"este mi\u00e9rcoles","field-wed-relative+1":"el pr\u00f3ximo mi\u00e9rcoles","dateFormatItem-GyMMMEd":"E, d 'de' MMMM 'de' y G","dateFormatItem-MMMEd":"E d 'de' MMM",eraNarrow:["a. C.","d. C."],"dateFormatItem-yMM":"M/y","field-tue-relative+-1":"el martes pasado","dateFormatItem-MMMdd":"dd-MMM","days-format-short":"DO LU MA MI JU VI SA".split(" "),"dateFormat-long":"d 'de' MMMM 'de' y","field-fri-relative+-1":"el viernes pasado",
"field-wed-relative+-1":"el mi\u00e9rcoles pasado","months-format-wide":"enero febrero marzo abril mayo junio julio agosto septiembre octubre noviembre diciembre".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"p. m.","dateFormat-full":"EEEE, d 'de' MMMM 'de' y","field-thu-relative+-1":"el jueves pasado","dateFormatItem-Md":"d/M","dateFormatItem-yMd":"d/M/y","field-era":"era","dateFormatItem-yM":"M/y","months-standAlone-wide":"Enero Febrero Marzo Abril Mayo Junio Julio Agosto Septiembre Octubre Noviembre Diciembre".split(" "),
"timeFormat-short":"H:mm","quarters-format-wide":["1.er trimestre","2.\u00ba trimestre","3.er trimestre","4.\u00ba trimestre"],"dateFormatItem-yQQQQ":"QQQQ 'de' y","timeFormat-long":"H:mm:ss z","field-year":"a\u00f1o","dateFormatItem-yMMM":"MMM 'de' y","field-hour":"hora","dateFormatItem-MMdd":"d/M","months-format-abbr":"ene. feb. mar. abr. may. jun. jul. ago. sept. oct. nov. dic.".split(" "),"field-sat-relative+0":"este s\u00e1bado","field-sat-relative+1":"el pr\u00f3ximo s\u00e1bado","timeFormat-full":"H:mm:ss (zzzz)",
"field-day-relative+0":"hoy","field-thu-relative+0":"este jueves","field-day-relative+1":"ma\u00f1ana","field-thu-relative+1":"el pr\u00f3ximo jueves","dateFormatItem-GyMMMd":"d MMM 'de' y G","field-day-relative+2":"pasado ma\u00f1ana","dateFormatItem-H":"H","months-standAlone-abbr":"Ene. Feb. Mar. Abr. May. Jun. Jul. Ago. Sept. Oct. Nov. Dic.".split(" "),"quarters-format-abbr":["T1","T2","T3","T4"],"quarters-standAlone-wide":["1.er trimestre","2.\u00ba trimestre","3.er trimestre","4.\u00ba trimestre"],
"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"Domingo Lunes Martes Mi\u00e9rcoles Jueves Viernes S\u00e1bado".split(" "),"dateFormatItem-MMMMd":"d 'de' MMMM","timeFormat-medium":"H:mm:ss","field-sun-relative+0":"este domingo","dateFormatItem-Hm":"H:mm","field-sun-relative+1":"el pr\u00f3ximo domingo","quarters-standAlone-abbr":["T1","T2","T3","T4"],eraAbbr:["a. C.","d. C."],"field-minute":"minuto","field-dayperiod":"periodo del d\u00eda","days-standAlone-abbr":"Dom. Lun. Mar. Mi\u00e9. Jue. Vie. S\u00e1b.".split(" "),
"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1T","2T","3T","4T"],"field-day-relative+-1":"ayer","dateFormatItem-h":"h a","dateTimeFormat-long":"{1}, {0}","dayPeriods-format-narrow-am":"a.m.","field-day-relative+-2":"antes de ayer","dateFormatItem-MMMd":"d 'de' MMM","dateFormatItem-MEd":"E, d/M","dateTimeFormat-full":"{1}, {0}","field-fri-relative+0":"este viernes","dateFormatItem-yMMMM":"MMMM 'de' y","field-fri-relative+1":"el pr\u00f3ximo viernes","field-day":"d\u00eda",
"days-format-wide":"domingo lunes martes mi\u00e9rcoles jueves viernes s\u00e1bado".split(" "),"field-zone":"zona horaria","dateFormatItem-y":"y","months-standAlone-narrow":"EFMAMJJASOND".split(""),"field-year-relative+-1":"el a\u00f1o pasado","field-month-relative+-1":"el mes pasado","dateFormatItem-hm":"h:mm a","days-format-abbr":"dom. lun. mar. mi\u00e9. jue. vie. s\u00e1b.".split(" "),eraNames:["antes de Cristo","anno D\u00f3mini"],"dateFormatItem-yMMMd":"d 'de' MMM 'de' y","days-format-narrow":"DLMXJVS".split(""),
"days-standAlone-narrow":"DLMXJVS".split(""),"dateFormatItem-MMM":"LLL","field-month":"mes","field-tue-relative+0":"este martes","field-tue-relative+1":"el pr\u00f3ximo martes","dayPeriods-format-wide-am":"a. m.","dateFormatItem-EHm":"E, H:mm","field-mon-relative+0":"este lunes","field-mon-relative+1":"el pr\u00f3ximo lunes","dateFormat-short":"d/M/yy","dateFormatItem-MMd":"d/M","dateFormatItem-EHms":"E, H:mm:ss","dateFormatItem-Ehms":"E, h:mm:ss a","field-second":"segundo","field-sat-relative+-1":"el s\u00e1bado pasado",
"dateFormatItem-yMMMEd":"EEE, d 'de' MMMM 'de' y","field-sun-relative+-1":"el domingo pasado","field-month-relative+0":"este mes","field-month-relative+1":"el pr\u00f3ximo mes","dateFormatItem-Ed":"E d","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"semana","dateFormat-medium":"d/M/y","field-year-relative+0":"este a\u00f1o","field-week-relative+-1":"la semana pasada","field-year-relative+1":"el pr\u00f3ximo a\u00f1o","dayPeriods-format-narrow-pm":"p.m.","dateTimeFormat-short":"{1} {0}",
"dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"MMM 'de' y G","field-mon-relative+-1":"el lunes pasado","field-week-relative+0":"esta semana","field-week-relative+1":"la pr\u00f3xima semana"})},"mw-datepicker/gregorian/nls/fi/gregorian":function(){define({"dateFormatItem-Ehm":"E h.mm a","days-standAlone-short":"su ma ti ke to pe la".split(" "),"months-format-narrow":"THMHTKHESLMJ".split(""),"field-second-relative+0":"nyt","quarters-standAlone-narrow":["1","2",
"3","4"],"field-weekday":"viikonp\u00e4iv\u00e4","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E d.M.y","field-wed-relative+0":"t\u00e4n\u00e4 keskiviikkona","dateFormatItem-GyMMMEd":"E d. MMM y G","dateFormatItem-MMMEd":"ccc d. MMM","field-wed-relative+1":"ensi keskiviikkona",eraNarrow:["eK","jK"],"dateFormatItem-yMM":"M.y","field-tue-relative+-1":"viime tiistaina","days-format-short":"su ma ti ke to pe la".split(" "),"dateFormat-long":"d. MMMM y","field-fri-relative+-1":"viime perjantaina",
"field-wed-relative+-1":"viime keskiviikkona","months-format-wide":"tammikuuta helmikuuta maaliskuuta huhtikuuta toukokuuta kes\u00e4kuuta hein\u00e4kuuta elokuuta syyskuuta lokakuuta marraskuuta joulukuuta".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"ip.","dateFormat-full":"cccc d. MMMM y","field-thu-relative+-1":"viime torstaina","dateFormatItem-Md":"d.M.","dayPeriods-standAlone-wide-pm":"ip.","dayPeriods-format-abbr-am":"ap.","dateFormatItem-yMd":"d.M.y","dateFormatItem-yM":"L.y",
"field-era":"aikakausi","months-standAlone-wide":"tammikuu helmikuu maaliskuu huhtikuu toukokuu kes\u00e4kuu hein\u00e4kuu elokuu syyskuu lokakuu marraskuu joulukuu".split(" "),"timeFormat-short":"H.mm","quarters-format-wide":["1. nelj\u00e4nnes","2. nelj\u00e4nnes","3. nelj\u00e4nnes","4. nelj\u00e4nnes"],"timeFormat-long":"H.mm.ss z","dateFormatItem-yMMM":"LLL y","dateFormatItem-yQQQQ":"QQQQ y","field-year":"vuosi","field-hour":"tunti","months-format-abbr":"tammikuuta helmikuuta maaliskuuta huhtikuuta toukokuuta kes\u00e4kuuta hein\u00e4kuuta elokuuta syyskuuta lokakuuta marraskuuta joulukuuta".split(" "),
"field-sat-relative+0":"t\u00e4n\u00e4 lauantaina","field-sat-relative+1":"ensi lauantaina","timeFormat-full":"H.mm.ss zzzz","field-day-relative+0":"t\u00e4n\u00e4\u00e4n","field-day-relative+1":"huomenna","field-thu-relative+0":"t\u00e4n\u00e4 torstaina","dateFormatItem-GyMMMd":"d. MMM y G","field-day-relative+2":"ylihuomenna","field-thu-relative+1":"ensi torstaina","dateFormatItem-H":"H","months-standAlone-abbr":"tammi helmi maalis huhti touko kes\u00e4 hein\u00e4 elo syys loka marras joulu".split(" "),
"quarters-format-abbr":["1. nelj.","2. nelj.","3. nelj.","4. nelj."],"quarters-standAlone-wide":["1. nelj\u00e4nnes","2. nelj\u00e4nnes","3. nelj\u00e4nnes","4. nelj\u00e4nnes"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"sunnuntai maanantai tiistai keskiviikko torstai perjantai lauantai".split(" "),"timeFormat-medium":"H.mm.ss","field-sun-relative+0":"t\u00e4n\u00e4 sunnuntaina","dateFormatItem-Hm":"H.mm","quarters-standAlone-abbr":["1. nelj.","2. nelj.","3. nelj.","4. nelj."],
"field-sun-relative+1":"ensi sunnuntaina",eraAbbr:["eKr.","jKr."],"field-minute":"minuutti","field-dayperiod":"vuorokaudenaika","days-standAlone-abbr":"su ma ti ke to pe la".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"m.ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"eilen","dateFormatItem-h":"h a","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"ap.","field-day-relative+-2":"toissap\u00e4iv\u00e4n\u00e4","dateFormatItem-MMMd":"d. MMM","dateFormatItem-MEd":"E d.M.",
"dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"t\u00e4n\u00e4 perjantaina","dateFormatItem-yMMMM":"LLLL y","field-fri-relative+1":"ensi perjantaina","dateFormatItem-yMMMMccccd":"cccc d. MMMM y","field-day":"p\u00e4iv\u00e4","days-format-wide":"sunnuntaina maanantaina tiistaina keskiviikkona torstaina perjantaina lauantaina".split(" "),"field-zone":"aikavy\u00f6hyke","dateFormatItem-y":"y","months-standAlone-narrow":"THMHTKHESLMJ".split(""),"field-year-relative+-1":"viime vuonna","field-month-relative+-1":"viime kuussa",
"dateFormatItem-hm":"h.mm a","dayPeriods-format-abbr-pm":"ip.","days-format-abbr":"su ma ti ke to pe la".split(" "),eraNames:["ennen Kristuksen syntym\u00e4\u00e4","j\u00e4lkeen Kristuksen syntym\u00e4n"],"dateFormatItem-yMMMd":"d. MMM y","days-format-narrow":"SMTKTPL".split(""),"days-standAlone-narrow":"SMTKTPL".split(""),"dateFormatItem-MMM":"LLL","field-month":"kuukausi","field-tue-relative+0":"t\u00e4n\u00e4 tiistaina","field-tue-relative+1":"ensi tiistaina","dayPeriods-format-wide-am":"ap.",
"dayPeriods-standAlone-wide-am":"ap.","dateFormatItem-EHm":"E H.mm","field-mon-relative+0":"t\u00e4n\u00e4 maanantaina","field-mon-relative+1":"ensi maanantaina","dateFormat-short":"d.M.y","dateFormatItem-EHms":"E H.mm.ss","dateFormatItem-Ehms":"E h.mm.ss a","field-second":"sekunti","field-sat-relative+-1":"viime lauantaina","dateFormatItem-yMMMEd":"E d. MMM y","field-sun-relative+-1":"viime sunnuntaina","field-month-relative+0":"t\u00e4ss\u00e4 kuussa","field-month-relative+1":"ensi kuussa","dateFormatItem-Ed":"E d.",
"dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"viikko","dateFormat-medium":"d.M.y","field-year-relative+0":"t\u00e4n\u00e4 vuonna","field-week-relative+-1":"viime viikolla","field-year-relative+1":"ensi vuonna","dayPeriods-format-narrow-pm":"ip.","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H.mm.ss","dateFormatItem-hms":"h.mm.ss a","dateFormatItem-GyMMM":"LLL y G","field-mon-relative+-1":"viime maanantaina","field-week-relative+0":"t\u00e4ll\u00e4 viikolla","field-week-relative+1":"ensi viikolla"})},
"mw-datepicker/gregorian/nls/fr/gregorian":function(){define({"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"dim. lun. mar. mer. jeu. ven. sam.".split(" "),"months-format-narrow":"JFMAMJJASOND".split(""),"field-second-relative+0":"maintenant","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"jour de la semaine","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E d/M/y","field-wed-relative+0":"ce mercredi","dateFormatItem-GyMMMEd":"E d MMM y G","dateFormatItem-MMMEd":"E d MMM",
"field-wed-relative+1":"mercredi prochain",eraNarrow:["av. J.-C.","ap. J.-C."],"field-tue-relative+-1":"mardi dernier","dayPeriods-format-wide-morning":"matin","days-format-short":"di lu ma me je ve sa".split(" "),"dateFormat-long":"d MMMM y","field-fri-relative+-1":"vendredi dernier","field-wed-relative+-1":"mercredi dernier","months-format-wide":"janvier f\u00e9vrier mars avril mai juin juillet ao\u00fbt septembre octobre novembre d\u00e9cembre".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"PM",
"dateFormat-full":"EEEE d MMMM y","field-thu-relative+-1":"jeudi dernier","dateFormatItem-Md":"d/M","dayPeriods-format-abbr-am":"AM","dayPeriods-format-wide-noon":"midi","dateFormatItem-yMd":"d/M/y","dateFormatItem-yM":"M/y","field-era":"\u00e8re","months-standAlone-wide":"janvier f\u00e9vrier mars avril mai juin juillet ao\u00fbt septembre octobre novembre d\u00e9cembre".split(" "),"timeFormat-short":"HH:mm","quarters-format-wide":["1er trimestre","2e trimestre","3e trimestre","4e trimestre"],"timeFormat-long":"HH:mm:ss z",
"dateFormatItem-yMMM":"MMM y","dateFormatItem-yQQQQ":"QQQQ y","field-year":"ann\u00e9e","field-hour":"heure","months-format-abbr":"janv. f\u00e9vr. mars avr. mai juin juil. ao\u00fbt sept. oct. nov. d\u00e9c.".split(" "),"field-sat-relative+0":"ce samedi","field-sat-relative+1":"samedi prochain","timeFormat-full":"HH:mm:ss zzzz","dayPeriods-format-narrow-morning":"matin","field-day-relative+0":"aujourd\u2019hui","field-day-relative+1":"demain","field-thu-relative+0":"ce jeudi","dateFormatItem-GyMMMd":"d MMM y G",
"field-day-relative+2":"apr\u00e8s-demain","field-thu-relative+1":"jeudi prochain","dateFormatItem-H":"HH 'h'","months-standAlone-abbr":"janv. f\u00e9vr. mars avr. mai juin juil. ao\u00fbt sept. oct. nov. d\u00e9c.".split(" "),"quarters-format-abbr":["T1","T2","T3","T4"],"quarters-standAlone-wide":["1er trimestre","2e trimestre","3e trimestre","4e trimestre"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"dimanche lundi mardi mercredi jeudi vendredi samedi".split(" "),"timeFormat-medium":"HH:mm:ss",
"field-sun-relative+0":"ce dimanche","dateFormatItem-Hm":"HH:mm","quarters-standAlone-abbr":["T1","T2","T3","T4"],"field-sun-relative+1":"dimanche prochain",eraAbbr:["av. J.-C.","ap. J.-C."],"field-minute":"minute","field-dayperiod":"cadran","days-standAlone-abbr":"dim. lun. mar. mer. jeu. ven. sam.".split(" "),"dayPeriods-format-wide-night":"soir","dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"hier","dateFormatItem-h":"h a",
"dateTimeFormat-long":"{1} {0}","field-day-relative+-2":"avant-hier","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E d/M","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"ce vendredi","dateFormatItem-yMMMM":"MMMM y","field-fri-relative+1":"vendredi prochain","field-day":"jour","days-format-wide":"dimanche lundi mardi mercredi jeudi vendredi samedi".split(" "),"field-zone":"fuseau horaire","dateFormatItem-y":"y","months-standAlone-narrow":"JFMAMJJASOND".split(""),"field-year-relative+-1":"l\u2019ann\u00e9e derni\u00e8re",
"dayPeriods-format-narrow-night":"soir","field-month-relative+-1":"le mois dernier","dateFormatItem-hm":"h:mm a","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"dim. lun. mar. mer. jeu. ven. sam.".split(" "),eraNames:["avant J\u00e9sus-Christ","apr\u00e8s J\u00e9sus-Christ"],"dateFormatItem-yMMMd":"d MMM y","days-format-narrow":"DLMMJVS".split(""),"days-standAlone-narrow":"DLMMJVS".split(""),"dateFormatItem-MMM":"LLL","field-month":"mois","field-tue-relative+0":"ce mardi","field-tue-relative+1":"mardi prochain",
"dayPeriods-format-wide-am":"AM","dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"ce lundi","field-mon-relative+1":"lundi prochain","dateFormat-short":"dd/MM/y","dayPeriods-format-wide-afternoon":"apr\u00e8s-midi","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","dayPeriods-format-narrow-noon":"midi","field-second":"seconde","field-sat-relative+-1":"samedi dernier","dateFormatItem-yMMMEd":"E d MMM y","field-sun-relative+-1":"dimanche dernier","field-month-relative+0":"ce mois-ci",
"field-month-relative+1":"le mois prochain","dateFormatItem-Ed":"E d","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"semaine","dateFormat-medium":"d MMM y","field-year-relative+0":"cette ann\u00e9e","field-week-relative+-1":"la semaine derni\u00e8re","field-year-relative+1":"l\u2019ann\u00e9e prochaine","dayPeriods-format-narrow-pm":"p","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"lundi dernier",
"field-week-relative+0":"cette semaine","field-week-relative+1":"la semaine prochaine"})},"mw-datepicker/gregorian/nls/fr-ch/gregorian":function(){define({"timeFormat-full":"HH.mm:ss 'h' zzzz","dateFormat-full":"EEEE, d MMMM y","dateFormat-short":"dd.MM.yy"})},"mw-datepicker/gregorian/nls/he/gregorian":function(){define({"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"\u05d0\u05f3 \u05d1\u05f3 \u05d2\u05f3 \u05d3\u05f3 \u05d4\u05f3 \u05d5\u05f3 \u05e9\u05f3".split(" "),"months-format-narrow":"1 2 3 4 5 6 7 8 9 10 11 12".split(" "),
"field-second-relative+0":"\u05e2\u05db\u05e9\u05d9\u05d5","quarters-standAlone-narrow":["\u05e81","\u05e82","\u05e83","\u05e84"],"field-weekday":"\u05d9\u05d5\u05dd \u05d1\u05e9\u05d1\u05d5\u05e2","dateFormatItem-yQQQ":"y QQQ","dateFormatItem-yMEd":"E, d/M/y","field-wed-relative+0":"\u05d9\u05d5\u05dd \u05e8\u05d1\u05d9\u05e2\u05d9","field-wed-relative+1":"\u05d9\u05d5\u05dd \u05e8\u05d1\u05d9\u05e2\u05d9 \u05d4\u05d1\u05d0","dateFormatItem-GyMMMEd":"E, d \u05d1MMM y G","dateFormatItem-MMMEd":"E, d \u05d1MMM",
eraNarrow:["\u05dc\u05e4\u05e0\u05d4\u05f4\u05e1","BCE","\u05dc\u05e1\u05d4\u05f4\u05e0","CE"],"dateFormatItem-yMM":"MM/y","field-tue-relative+-1":"\u05d9\u05d5\u05dd \u05e9\u05dc\u05d9\u05e9\u05d9 \u05e9\u05e2\u05d1\u05e8","days-format-short":"\u05d0\u05f3 \u05d1\u05f3 \u05d2\u05f3 \u05d3\u05f3 \u05d4\u05f3 \u05d5\u05f3 \u05e9\u05f3".split(" "),"dateFormat-long":"d \u05d1MMMM y","field-fri-relative+-1":"\u05d9\u05d5\u05dd \u05e9\u05d9\u05e9\u05d9 \u05e9\u05e2\u05d1\u05e8","field-wed-relative+-1":"\u05d9\u05d5\u05dd \u05e8\u05d1\u05d9\u05e2\u05d9 \u05e9\u05e2\u05d1\u05e8",
"months-format-wide":"\u05d9\u05e0\u05d5\u05d0\u05e8 \u05e4\u05d1\u05e8\u05d5\u05d0\u05e8 \u05de\u05e8\u05e5 \u05d0\u05e4\u05e8\u05d9\u05dc \u05de\u05d0\u05d9 \u05d9\u05d5\u05e0\u05d9 \u05d9\u05d5\u05dc\u05d9 \u05d0\u05d5\u05d2\u05d5\u05e1\u05d8 \u05e1\u05e4\u05d8\u05de\u05d1\u05e8 \u05d0\u05d5\u05e7\u05d8\u05d5\u05d1\u05e8 \u05e0\u05d5\u05d1\u05de\u05d1\u05e8 \u05d3\u05e6\u05de\u05d1\u05e8".split(" "),"dateTimeFormat-medium":"{1}, {0}","dayPeriods-format-wide-pm":"\u05d0\u05d7\u05d4\u05f4\u05e6",
"dateFormat-full":"EEEE, d \u05d1MMMM y","field-thu-relative+-1":"\u05d9\u05d5\u05dd \u05d7\u05de\u05d9\u05e9\u05d9 \u05e9\u05e2\u05d1\u05e8","dateFormatItem-Md":"d/M","dateFormatItem-yMd":"d.M.y","field-era":"\u05ea\u05e7\u05d5\u05e4\u05d4","dateFormatItem-yM":"M.y","months-standAlone-wide":"\u05d9\u05e0\u05d5\u05d0\u05e8 \u05e4\u05d1\u05e8\u05d5\u05d0\u05e8 \u05de\u05e8\u05e5 \u05d0\u05e4\u05e8\u05d9\u05dc \u05de\u05d0\u05d9 \u05d9\u05d5\u05e0\u05d9 \u05d9\u05d5\u05dc\u05d9 \u05d0\u05d5\u05d2\u05d5\u05e1\u05d8 \u05e1\u05e4\u05d8\u05de\u05d1\u05e8 \u05d0\u05d5\u05e7\u05d8\u05d5\u05d1\u05e8 \u05e0\u05d5\u05d1\u05de\u05d1\u05e8 \u05d3\u05e6\u05de\u05d1\u05e8".split(" "),
"timeFormat-short":"HH:mm","quarters-format-wide":["\u05e8\u05d1\u05e2\u05d5\u05df 1","\u05e8\u05d1\u05e2\u05d5\u05df 2","\u05e8\u05d1\u05e2\u05d5\u05df 3","\u05e8\u05d1\u05e2\u05d5\u05df 4"],"dateFormatItem-yQQQQ":"y QQQQ","timeFormat-long":"HH:mm:ss z","field-year":"\u05e9\u05e0\u05d4","dateFormatItem-yMMM":"MMM y","field-hour":"\u05e9\u05e2\u05d4","months-format-abbr":"\u05d9\u05e0\u05d5\u05f3 \u05e4\u05d1\u05e8\u05f3 \u05de\u05e8\u05e5 \u05d0\u05e4\u05e8\u05f3 \u05de\u05d0\u05d9 \u05d9\u05d5\u05e0\u05d9 \u05d9\u05d5\u05dc\u05d9 \u05d0\u05d5\u05d2\u05f3 \u05e1\u05e4\u05d8\u05f3 \u05d0\u05d5\u05e7\u05f3 \u05e0\u05d5\u05d1\u05f3 \u05d3\u05e6\u05de\u05f3".split(" "),
"field-sat-relative+0":"\u05d4\u05e9\u05d1\u05ea \u05d4\u05d6\u05d0\u05ea","field-sat-relative+1":"\u05d4\u05e9\u05d1\u05ea \u05d4\u05d1\u05d0\u05d4","timeFormat-full":"HH:mm:ss zzzz","field-day-relative+0":"\u05d4\u05d9\u05d5\u05dd","field-thu-relative+0":"\u05d9\u05d5\u05dd \u05d7\u05de\u05d9\u05e9\u05d9","field-day-relative+1":"\u05de\u05d7\u05e8","field-thu-relative+1":"\u05d9\u05d5\u05dd \u05d7\u05de\u05d9\u05e9\u05d9 \u05d4\u05d1\u05d0","dateFormatItem-GyMMMd":"d \u05d1MMM y G","field-day-relative+2":"\u05de\u05d7\u05e8\u05ea\u05d9\u05d9\u05dd",
"dateFormatItem-H":"HH","months-standAlone-abbr":"\u05d9\u05e0\u05d5\u05f3 \u05e4\u05d1\u05e8\u05f3 \u05de\u05e8\u05e5 \u05d0\u05e4\u05e8\u05f3 \u05de\u05d0\u05d9 \u05d9\u05d5\u05e0\u05d9 \u05d9\u05d5\u05dc\u05d9 \u05d0\u05d5\u05d2\u05f3 \u05e1\u05e4\u05d8\u05f3 \u05d0\u05d5\u05e7\u05f3 \u05e0\u05d5\u05d1\u05f3 \u05d3\u05e6\u05de\u05f3".split(" "),"quarters-format-abbr":["\u05e8\u05d1\u05e2\u05d5\u05df 1","\u05e8\u05d1\u05e2\u05d5\u05df 2","\u05e8\u05d1\u05e2\u05d5\u05df 3","\u05e8\u05d1\u05e2\u05d5\u05df 4"],
"quarters-standAlone-wide":["\u05e8\u05d1\u05e2\u05d5\u05df 1","\u05e8\u05d1\u05e2\u05d5\u05df 2","\u05e8\u05d1\u05e2\u05d5\u05df 3","\u05e8\u05d1\u05e2\u05d5\u05df 4"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"\u05d9\u05d5\u05dd \u05e8\u05d0\u05e9\u05d5\u05df;\u05d9\u05d5\u05dd \u05e9\u05e0\u05d9;\u05d9\u05d5\u05dd \u05e9\u05dc\u05d9\u05e9\u05d9;\u05d9\u05d5\u05dd \u05e8\u05d1\u05d9\u05e2\u05d9;\u05d9\u05d5\u05dd \u05d7\u05de\u05d9\u05e9\u05d9;\u05d9\u05d5\u05dd \u05e9\u05d9\u05e9\u05d9;\u05d9\u05d5\u05dd \u05e9\u05d1\u05ea".split(";"),
"timeFormat-medium":"HH:mm:ss","field-sun-relative+0":"\u05d9\u05d5\u05dd \u05e8\u05d0\u05e9\u05d5\u05df","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"\u05d9\u05d5\u05dd \u05e8\u05d0\u05e9\u05d5\u05df \u05d4\u05d1\u05d0","quarters-standAlone-abbr":["\u05e8\u05d1\u05e2\u05d5\u05df 1","\u05e8\u05d1\u05e2\u05d5\u05df 2","\u05e8\u05d1\u05e2\u05d5\u05df 3","\u05e8\u05d1\u05e2\u05d5\u05df 4"],eraAbbr:["\u05dc\u05e4\u05e0\u05d4\u05f4\u05e1","BCE","\u05dc\u05e1\u05d4\u05f4\u05e0","CE"],"field-minute":"\u05d3\u05e7\u05d4",
"field-dayperiod":"\u05dc\u05e4\u05e0\u05d4\u05f4\u05e6/\u05d0\u05d7\u05d4\u05f4\u05e6","days-standAlone-abbr":"\u05d9\u05d5\u05dd \u05d0\u05f3;\u05d9\u05d5\u05dd \u05d1\u05f3;\u05d9\u05d5\u05dd \u05d2\u05f3;\u05d9\u05d5\u05dd \u05d3\u05f3;\u05d9\u05d5\u05dd \u05d4\u05f3;\u05d9\u05d5\u05dd \u05d5\u05f3;\u05e9\u05d1\u05ea".split(";"),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"\u05d0\u05ea\u05de\u05d5\u05dc","dateFormatItem-h":"\u200fh a",
"dateTimeFormat-long":"{1} \u05d1\u05e9\u05e2\u05d4 {0}","field-day-relative+-2":"\u05e9\u05dc\u05e9\u05d5\u05dd","dateFormatItem-MMMd":"d \u05d1MMM","dateFormatItem-MEd":"E, d/M","dateTimeFormat-full":"{1} \u05d1\u05e9\u05e2\u05d4 {0}","field-fri-relative+0":"\u05d9\u05d5\u05dd \u05e9\u05d9\u05e9\u05d9","dateFormatItem-yMMMM":"MMMM y","field-fri-relative+1":"\u05d9\u05d5\u05dd \u05e9\u05d9\u05e9\u05d9 \u05d4\u05d1\u05d0","field-day":"\u05d9\u05d5\u05dd","days-format-wide":"\u05d9\u05d5\u05dd \u05e8\u05d0\u05e9\u05d5\u05df;\u05d9\u05d5\u05dd \u05e9\u05e0\u05d9;\u05d9\u05d5\u05dd \u05e9\u05dc\u05d9\u05e9\u05d9;\u05d9\u05d5\u05dd \u05e8\u05d1\u05d9\u05e2\u05d9;\u05d9\u05d5\u05dd \u05d7\u05de\u05d9\u05e9\u05d9;\u05d9\u05d5\u05dd \u05e9\u05d9\u05e9\u05d9;\u05d9\u05d5\u05dd \u05e9\u05d1\u05ea".split(";"),
"field-zone":"\u05d0\u05d6\u05d5\u05e8","dateFormatItem-y":"y","months-standAlone-narrow":"1 2 3 4 5 6 7 8 9 10 11 12".split(" "),"field-year-relative+-1":"\u05d4\u05e9\u05e0\u05d4 \u05e9\u05e2\u05d1\u05e8\u05d4","field-month-relative+-1":"\u05d4\u05d7\u05d5\u05d3\u05e9 \u05e9\u05e2\u05d1\u05e8","dateFormatItem-hm":"h:mm a","days-format-abbr":"\u05d9\u05d5\u05dd \u05d0\u05f3;\u05d9\u05d5\u05dd \u05d1\u05f3;\u05d9\u05d5\u05dd \u05d2\u05f3;\u05d9\u05d5\u05dd \u05d3\u05f3;\u05d9\u05d5\u05dd \u05d4\u05f3;\u05d9\u05d5\u05dd \u05d5\u05f3;\u05e9\u05d1\u05ea".split(";"),
"dateFormatItem-yMMMd":"d \u05d1MMM y",eraNames:["\u05dc\u05e4\u05e0\u05d9 \u05d4\u05e1\u05e4\u05d9\u05e8\u05d4","\u05dc\u05e1\u05e4\u05d9\u05e8\u05d4","\u05dc\u05e1\u05d4\u05f4\u05e0","CE"],"days-format-narrow":"\u05d0\u05f3 \u05d1\u05f3 \u05d2\u05f3 \u05d3\u05f3 \u05d4\u05f3 \u05d5\u05f3 \u05e9\u05f3".split(" "),"days-standAlone-narrow":"\u05d0\u05f3 \u05d1\u05f3 \u05d2\u05f3 \u05d3\u05f3 \u05d4\u05f3 \u05d5\u05f3 \u05e9\u05f3".split(" "),"dateFormatItem-MMM":"LLL","field-month":"\u05d7\u05d5\u05d3\u05e9",
"field-tue-relative+0":"\u05d9\u05d5\u05dd \u05e9\u05dc\u05d9\u05e9\u05d9","field-tue-relative+1":"\u05d9\u05d5\u05dd \u05e9\u05dc\u05d9\u05e9\u05d9 \u05d4\u05d1\u05d0","dayPeriods-format-wide-am":"\u05dc\u05e4\u05e0\u05d4\u05f4\u05e6","dateFormatItem-EHm":"E H:mm","field-mon-relative+0":"\u05d9\u05d5\u05dd \u05e9\u05e0\u05d9 \u05d4\u05d6\u05d4","field-mon-relative+1":"\u05d9\u05d5\u05dd \u05e9\u05e0\u05d9 \u05d4\u05d1\u05d0","dateFormat-short":"dd/MM/yy","dateFormatItem-EHms":"E H:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a",
"field-second":"\u05e9\u05e0\u05d9\u05d9\u05d4","field-sat-relative+-1":"\u05d4\u05e9\u05d1\u05ea \u05e9\u05e2\u05d1\u05e8\u05d4","dateFormatItem-yMMMEd":"E, d \u05d1MMM y","field-sun-relative+-1":"\u05d9\u05d5\u05dd \u05e8\u05d0\u05e9\u05d5\u05df \u05e9\u05e2\u05d1\u05e8","field-month-relative+0":"\u05d4\u05d7\u05d5\u05d3\u05e9","field-month-relative+1":"\u05d4\u05d7\u05d5\u05d3\u05e9 \u05d4\u05d1\u05d0","dateFormatItem-Ed":"E \u05d4-d","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"\u05e9\u05d1\u05d5\u05e2",
"dateFormat-medium":"d \u05d1MMM y","field-year-relative+0":"\u05d4\u05e9\u05e0\u05d4","field-week-relative+-1":"\u05d4\u05e9\u05d1\u05d5\u05e2 \u05e9\u05e2\u05d1\u05e8","field-year-relative+1":"\u05d4\u05e9\u05e0\u05d4 \u05d4\u05d1\u05d0\u05d4","dateTimeFormat-short":"{1}, {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"\u05d9\u05d5\u05dd \u05e9\u05e0\u05d9 \u05e9\u05e2\u05d1\u05e8","field-week-relative+0":"\u05d4\u05e9\u05d1\u05d5\u05e2",
"field-week-relative+1":"\u05d4\u05e9\u05d1\u05d5\u05e2 \u05d4\u05d1\u05d0"})},"mw-datepicker/gregorian/nls/hr/gregorian":function(){define({"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"ned pon uto sri \u010det pet sub".split(" "),"months-format-narrow":"1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12.".split(" "),"field-second-relative+0":"sada","quarters-standAlone-narrow":["1.","2.","3.","4."],"field-weekday":"Dan u tjednu","dateFormatItem-yQQQ":"QQQ y.","dateFormatItem-yMEd":"E, d. M. y.","field-wed-relative+0":"ova srijeda",
"dateFormatItem-GyMMMEd":"E, d. MMM y. G","dateFormatItem-MMMEd":"E, d. MMM","field-wed-relative+1":"sljede\u0107a srijeda",eraNarrow:["pr.n.e.","AD"],"dateFormatItem-yMM":"MM. y.","field-tue-relative+-1":"pro\u0161li utorak","days-format-short":"ned pon uto sri \u010det pet sub".split(" "),"dateFormat-long":"d. MMMM y.","field-fri-relative+-1":"pro\u0161li petak","field-wed-relative+-1":"pro\u0161la srijeda","months-format-wide":"sije\u010dnja velja\u010de o\u017eujka travnja svibnja lipnja srpnja kolovoza rujna listopada studenoga prosinca".split(" "),
"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"PM","dateFormat-full":"EEEE, d. MMMM y.","field-thu-relative+-1":"pro\u0161li \u010detvrtak","dateFormatItem-Md":"d. M.","dayPeriods-format-wide-noon":"podne","dateFormatItem-yMd":"d. M. y.","dateFormatItem-yM":"M. y.","field-era":"Era","months-standAlone-wide":"sije\u010danj velja\u010da o\u017eujak travanj svibanj lipanj srpanj kolovoz rujan listopad studeni prosinac".split(" "),"timeFormat-short":"HH:mm","quarters-format-wide":["1. kvartal",
"2. kvartal","3. kvartal","4. kvartal"],"timeFormat-long":"HH:mm:ss z","dateFormatItem-yMMM":"LLL y.","dateFormatItem-yQQQQ":"QQQQ y.","field-year":"Godina","dateFormatItem-MMdd":"dd. MM.","field-hour":"Sat","months-format-abbr":"sij velj o\u017eu tra svi lip srp kol ruj lis stu pro".split(" "),"field-sat-relative+0":"ova subota","field-sat-relative+1":"sljede\u0107a subota","timeFormat-full":"HH:mm:ss zzzz","dayPeriods-format-narrow-morning":"prijepodne","field-day-relative+0":"danas","field-day-relative+1":"sutra",
"field-thu-relative+0":"ovaj \u010detvrtak","dateFormatItem-GyMMMd":"d. MMM y. G","field-day-relative+2":"prekosutra","field-thu-relative+1":"sljede\u0107i \u010detvrtak","dateFormatItem-H":"HH","months-standAlone-abbr":"sij velj o\u017eu tra svi lip srp kol ruj lis stu pro".split(" "),"quarters-format-abbr":["1kv","2kv","3kv","4kv"],"quarters-standAlone-wide":["1. kvartal","2. kvartal","3. kvartal","4. kvartal"],"dateFormatItem-Gy":"y. G","dateFormatItem-M":"L.","days-standAlone-wide":"nedjelja ponedjeljak utorak srijeda \u010detvrtak petak subota".split(" "),
"dayPeriods-format-narrow-evening":"nave\u010der","dateFormatItem-MMMMd":"d. MMMM","dayPeriods-format-abbr-noon":"podne","timeFormat-medium":"HH:mm:ss","field-sun-relative+0":"ova nedjelja","dateFormatItem-Hm":"HH:mm","quarters-standAlone-abbr":["1kv","2kv","3kv","4kv"],"field-sun-relative+1":"sljede\u0107a nedjelja",eraAbbr:["pr. Kr.","p. Kr."],"field-minute":"Minuta","field-dayperiod":"Prijepodne/popodne","days-standAlone-abbr":"ned pon uto sri \u010det pet sub".split(" "),"dateFormatItem-d":"d.",
"dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1.","2.","3.","4."],"field-day-relative+-1":"ju\u010der","dateFormatItem-h":"h a","dateTimeFormat-long":"{1} 'u' {0}","field-day-relative+-2":"prekju\u010der","dateFormatItem-MMMd":"d. MMM","dateFormatItem-MEd":"E, d. M.","dateTimeFormat-full":"{1} 'u' {0}","field-fri-relative+0":"ovaj petak","dateFormatItem-yMMMM":"LLLL y.","field-fri-relative+1":"sljede\u0107i petak","field-day":"Dan","days-format-wide":"nedjelja ponedjeljak utorak srijeda \u010detvrtak petak subota".split(" "),
"field-zone":"Vremenska zona","months-standAlone-narrow":"1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12.".split(" "),"dateFormatItem-y":"y.","field-year-relative+-1":"pro\u0161le godine","dayPeriods-format-narrow-night":"no\u0107u","field-month-relative+-1":"pro\u0161li mjesec","dateFormatItem-hm":"hh:mm a","days-format-abbr":"ned pon uto sri \u010det pet sub".split(" "),eraNames:["Prije Krista","Poslije Krista"],"dateFormatItem-yMMMd":"d. MMM y.","days-format-narrow":"NPUS\u010cPS".split(""),"dayPeriods-format-narrow-earlyMorning":"ujutro",
"days-standAlone-narrow":"npus\u010dps".split(""),"dateFormatItem-MMM":"LLL","field-month":"Mjesec","field-tue-relative+0":"ovaj utorak","field-tue-relative+1":"sljede\u0107i utorak","dayPeriods-format-wide-am":"AM","dateFormatItem-MMMMEd":"E, d. MMMM","dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"ovaj ponedjeljak","field-mon-relative+1":"sljede\u0107i ponedjeljak","dateFormat-short":"d.M.yy.","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","dayPeriods-format-narrow-afternoon":"popodne",
"dayPeriods-format-narrow-noon":"n","field-second":"Sekunda","field-sat-relative+-1":"pro\u0161la subota","dateFormatItem-yMMMEd":"E, d. MMM y.","field-sun-relative+-1":"pro\u0161la nedjelja","field-month-relative+0":"ovaj mjesec","field-month-relative+1":"sljede\u0107i mjesec","dateFormatItem-Ed":"E, d.","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"Tjedan","dateFormat-medium":"d. MMM y.","field-year-relative+0":"ove godine","field-week-relative+-1":"pro\u0161li tjedan","field-year-relative+1":"sljede\u0107e godine",
"dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"hh:mm:ss a","dateFormatItem-GyMMM":"LLL y. G","field-mon-relative+-1":"pro\u0161li ponedjeljak","field-week-relative+0":"ovaj tjedan","field-week-relative+1":"sljede\u0107i tjedan"})},"mw-datepicker/gregorian/nls/hu/gregorian":function(){define({"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"V H K Sze Cs P Szo".split(" "),"months-format-narrow":"J F M \u00c1 M J J A Sz O N D".split(" "),"field-second-relative+0":"most",
"quarters-standAlone-narrow":["1.","2.","3.","4."],"field-weekday":"h\u00e9t napja","dateFormatItem-yQQQ":"y. QQQ","dateFormatItem-yMEd":"y. MM. dd., E","field-wed-relative+0":"ez a szerda","dateFormatItem-GyMMMEd":"G y. MMM d., E","dateFormatItem-MMMEd":"MMM d., E","field-wed-relative+1":"k\u00f6vetkez\u0151 szerda",eraNarrow:["ie.","isz."],"field-tue-relative+-1":"el\u0151z\u0151 kedd","days-format-short":"V H K Sze Cs P Szo".split(" "),"dateFormat-long":"y. MMMM d.","field-fri-relative+-1":"el\u0151z\u0151 p\u00e9ntek",
"field-wed-relative+-1":"el\u0151z\u0151 szerda","months-format-wide":"janu\u00e1r febru\u00e1r m\u00e1rcius \u00e1prilis m\u00e1jus j\u00fanius j\u00falius augusztus szeptember okt\u00f3ber november december".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"du.","dateFormat-full":"y. MMMM d., EEEE","field-thu-relative+-1":"el\u0151z\u0151 cs\u00fct\u00f6rt\u00f6k","dateFormatItem-Md":"M. d.","dateFormatItem-yMd":"y. MM. dd.","dateFormatItem-yM":"y. M.","field-era":"\u00e9ra",
"months-standAlone-wide":"janu\u00e1r febru\u00e1r m\u00e1rcius \u00e1prilis m\u00e1jus j\u00fanius j\u00falius augusztus szeptember okt\u00f3ber november december".split(" "),"timeFormat-short":"H:mm","quarters-format-wide":["I. negyed\u00e9v","II. negyed\u00e9v","III. negyed\u00e9v","IV. negyed\u00e9v"],"timeFormat-long":"H:mm:ss z","dateFormatItem-yMMM":"y. MMM","dateFormatItem-yQQQQ":"y. QQQQ","field-year":"\u00e9v","field-hour":"\u00f3ra","months-format-abbr":"jan. febr. m\u00e1rc. \u00e1pr. m\u00e1j. j\u00fan. j\u00fal. aug. szept. okt. nov. dec.".split(" "),
"field-sat-relative+0":"ez a szombat","field-sat-relative+1":"k\u00f6vetkez\u0151 szombat","timeFormat-full":"H:mm:ss zzzz","field-day-relative+0":"ma","field-day-relative+1":"holnap","field-thu-relative+0":"ez a cs\u00fct\u00f6rt\u00f6k","dateFormatItem-GyMMMd":"G y. MMM d.","field-day-relative+2":"holnaput\u00e1n","field-thu-relative+1":"k\u00f6vetkez\u0151 cs\u00fct\u00f6rt\u00f6k","dateFormatItem-H":"H","months-standAlone-abbr":"jan. febr. m\u00e1rc. \u00e1pr. m\u00e1j. j\u00fan. j\u00fal. aug. szept. okt. nov. dec.".split(" "),
"quarters-format-abbr":["N1","N2","N3","N4"],"quarters-standAlone-wide":["1. negyed\u00e9v","2. negyed\u00e9v","3. negyed\u00e9v","4. negyed\u00e9v"],"dateFormatItem-Gy":"G y.","dateFormatItem-M":"L","days-standAlone-wide":"vas\u00e1rnap h\u00e9tf\u0151 kedd szerda cs\u00fct\u00f6rt\u00f6k p\u00e9ntek szombat".split(" "),"dateFormatItem-MMMMd":"MMMM d.","timeFormat-medium":"H:mm:ss","field-sun-relative+0":"ez a vas\u00e1rnap","dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["N1","N2","N3","N4"],
"field-sun-relative+1":"k\u00f6vetkez\u0151 vas\u00e1rnap",eraAbbr:["i. e.","i. sz."],"field-minute":"perc","field-dayperiod":"napszak","days-standAlone-abbr":"V H K Sze Cs P Szo".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1.","2.","3.","4."],"field-day-relative+-1":"tegnap","dateFormatItem-h":"a h","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"de.","field-day-relative+-2":"tegnapel\u0151tt","dateFormatItem-MMMd":"MMM d.","dateFormatItem-MEd":"M. d., E",
"dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"ez a p\u00e9ntek","dateFormatItem-yMMMM":"y. MMMM","field-fri-relative+1":"k\u00f6vetkez\u0151 p\u00e9ntek","field-day":"nap","days-format-wide":"vas\u00e1rnap h\u00e9tf\u0151 kedd szerda cs\u00fct\u00f6rt\u00f6k p\u00e9ntek szombat".split(" "),"field-zone":"id\u0151z\u00f3na","dateFormatItem-y":"y.","months-standAlone-narrow":"J F M \u00c1 M J J A Sz O N D".split(" "),"field-year-relative+-1":"el\u0151z\u0151 \u00e9v","field-month-relative+-1":"el\u0151z\u0151 h\u00f3nap",
"dateFormatItem-hm":"a h:mm","days-format-abbr":"V H K Sze Cs P Szo".split(" "),"dateFormatItem-yMMMd":"y. MMM d.",eraNames:["id\u0151sz\u00e1m\u00edt\u00e1sunk el\u0151tt","id\u0151sz\u00e1m\u00edt\u00e1sunk szerint"],"days-format-narrow":"V H K Sz Cs P Sz".split(" "),"days-standAlone-narrow":"V H K Sz Cs P Sz".split(" "),"dateFormatItem-MMM":"LLL","field-month":"h\u00f3nap","field-tue-relative+0":"ez a kedd","field-tue-relative+1":"k\u00f6vetkez\u0151 kedd","dayPeriods-format-wide-am":"de.","dateFormatItem-EHm":"E HH:mm",
"field-mon-relative+0":"ez a h\u00e9tf\u0151","field-mon-relative+1":"k\u00f6vetkez\u0151 h\u00e9tf\u0151","dateFormat-short":"y. MM. dd.","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","field-second":"m\u00e1sodperc","field-sat-relative+-1":"el\u0151z\u0151 szombat","dateFormatItem-yMMMEd":"y. MMM d., E","field-sun-relative+-1":"el\u0151z\u0151 vas\u00e1rnap","field-month-relative+0":"ez a h\u00f3nap","field-month-relative+1":"k\u00f6vetkez\u0151 h\u00f3nap","dateFormatItem-Ed":"d., E",
"dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"h\u00e9t","dateFormat-medium":"y. MMM d.","field-year-relative+0":"ez az \u00e9v","field-week-relative+-1":"el\u0151z\u0151 h\u00e9t","field-year-relative+1":"k\u00f6vetkez\u0151 \u00e9v","dateFormatItem-mmss":"mm:ss","dayPeriods-format-narrow-pm":"du.","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"a h:mm:ss","dateFormatItem-GyMMM":"G y. MMM","field-mon-relative+-1":"el\u0151z\u0151 h\u00e9tf\u0151",
"field-week-relative+0":"ez a h\u00e9t","field-week-relative+1":"k\u00f6vetkez\u0151 h\u00e9t"})},"mw-datepicker/gregorian/nls/it/gregorian":function(){define({"dateFormatItem-Ehm":"E h.mm a","days-standAlone-short":"dom lun mar mer gio ven sab".split(" "),"months-format-narrow":"GFMAMGLASOND".split(""),"field-second-relative+0":"ora","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"giorno della settimana","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E d/M/y","field-wed-relative+0":"questo mercoled\u00ec",
"dateFormatItem-GyMMMEd":"E d MMM y G","dateFormatItem-MMMEd":"E d MMM","field-wed-relative+1":"mercoled\u00ec prossimo",eraNarrow:["aC","BCE","dC","CE"],"field-tue-relative+-1":"marted\u00ec scorso","days-format-short":"dom lun mar mer gio ven sab".split(" "),"dateFormat-long":"dd MMMM y","field-fri-relative+-1":"venerd\u00ec scorso","field-wed-relative+-1":"mercoled\u00ec scorso","months-format-wide":"gennaio febbraio marzo aprile maggio giugno luglio agosto settembre ottobre novembre dicembre".split(" "),
"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"PM","dateFormat-full":"EEEE d MMMM y","field-thu-relative+-1":"gioved\u00ec scorso","dateFormatItem-Md":"d/M","dateFormatItem-yMd":"d/M/y","dateFormatItem-yM":"M/y","field-era":"era","months-standAlone-wide":"Gennaio Febbraio Marzo Aprile Maggio Giugno Luglio Agosto Settembre Ottobre Novembre Dicembre".split(" "),"timeFormat-short":"HH:mm","quarters-format-wide":["1\u00ba trimestre","2\u00ba trimestre","3\u00ba trimestre","4\u00ba trimestre"],
"timeFormat-long":"HH:mm:ss z","dateFormatItem-yMMM":"MMM y","dateFormatItem-yQQQQ":"QQQQ y","field-year":"anno","field-hour":"ora","months-format-abbr":"gen feb mar apr mag giu lug ago set ott nov dic".split(" "),"field-sat-relative+0":"questo sabato","field-sat-relative+1":"sabato prossimo","timeFormat-full":"HH:mm:ss zzzz","field-day-relative+0":"oggi","field-day-relative+1":"domani","field-thu-relative+0":"questo gioved\u00ec","dateFormatItem-GyMMMd":"d MMM y G","field-day-relative+2":"dopodomani",
"field-thu-relative+1":"gioved\u00ec prossimo","dateFormatItem-H":"HH","months-standAlone-abbr":"gen feb mar apr mag giu lug ago set ott nov dic".split(" "),"quarters-format-abbr":["T1","T2","T3","T4"],"quarters-standAlone-wide":["Primo trimestre","Secondo trimestre","Terzo trimestre","Quarto trimestre"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"Domenica Luned\u00ec Marted\u00ec Mercoled\u00ec Gioved\u00ec Venerd\u00ec Sabato".split(" "),"timeFormat-medium":"HH:mm:ss",
"field-sun-relative+0":"questa domenica","dateFormatItem-Hm":"HH:mm","quarters-standAlone-abbr":["T1","T2","T3","T4"],"field-sun-relative+1":"domenica prossima",eraAbbr:["aC","BCE","dC","CE"],"field-minute":"minuto","field-dayperiod":"periodo del giorno","days-standAlone-abbr":"dom lun mar mer gio ven sab".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"ieri","dateFormatItem-h":"hh a","dateTimeFormat-long":"{1} {0}",
"dayPeriods-format-narrow-am":"m.","field-day-relative+-2":"l'altro ieri","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E d/M","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"questo venerd\u00ec","dateFormatItem-yMMMM":"MMMM y","field-fri-relative+1":"venerd\u00ec prossimo","field-day":"giorno","days-format-wide":"domenica luned\u00ec marted\u00ec mercoled\u00ec gioved\u00ec venerd\u00ec sabato".split(" "),"field-zone":"fuso orario","dateFormatItem-y":"y","months-standAlone-narrow":"GFMAMGLASOND".split(""),
"field-year-relative+-1":"anno scorso","field-month-relative+-1":"mese scorso","dateFormatItem-hm":"hh:mm a","days-format-abbr":"dom lun mar mer gio ven sab".split(" "),"dateFormatItem-yMMMd":"d MMM y",eraNames:["a.C.","BCE","d.C.","CE"],"days-format-narrow":"DLMMGVS".split(""),"days-standAlone-narrow":"DLMMGVS".split(""),"dateFormatItem-MMM":"LLL","field-month":"mese","field-tue-relative+0":"questo marted\u00ec","field-tue-relative+1":"marted\u00ec prossimo","dayPeriods-format-wide-am":"AM","dateFormatItem-EHm":"E HH.mm",
"field-mon-relative+0":"questo luned\u00ec","field-mon-relative+1":"luned\u00ec prossimo","dateFormat-short":"dd/MM/yy","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","field-second":"secondo","field-sat-relative+-1":"sabato scorso","dateFormatItem-yMMMEd":"E d MMM y","field-sun-relative+-1":"domenica scorsa","field-month-relative+0":"questo mese","field-month-relative+1":"mese prossimo","dateFormatItem-Ed":"E d","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"settimana",
"dateFormat-medium":"dd/MMM/y","field-year-relative+0":"quest'anno","field-week-relative+-1":"settimana scorsa","field-year-relative+1":"anno prossimo","dayPeriods-format-narrow-pm":"p.","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"hh:mm:ss a","dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"luned\u00ec scorso","field-week-relative+0":"questa settimana","field-week-relative+1":"settimana prossima"})},"mw-datepicker/gregorian/nls/ja/gregorian":function(){define({"dateFormatItem-Ehm":"a K \u6642 mm \u5206 (E)",
"days-standAlone-short":"\u65e5\u6708\u706b\u6c34\u6728\u91d1\u571f".split(""),"months-format-narrow":"1 2 3 4 5 6 7 8 9 10 11 12".split(" "),"field-second-relative+0":"\u4eca\u3059\u3050","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"\u66dc\u65e5","dateFormatItem-yQQQ":"y/QQQ","dateFormatItem-yMEd":"y/M/d(E)","field-wed-relative+0":"\u4eca\u9031\u306e\u6c34\u66dc\u65e5","dateFormatItem-GyMMMEd":"Gy\u5e74M\u6708d\u65e5(E)","dateFormatItem-MMMEd":"M\u6708d\u65e5(E)","field-wed-relative+1":"\u6765\u9031\u306e\u6c34\u66dc\u65e5",
eraNarrow:["BC","BCE","AD","CE"],"dateFormatItem-yMM":"y/MM","field-tue-relative+-1":"\u5148\u9031\u306e\u706b\u66dc\u65e5","days-format-short":"\u65e5\u6708\u706b\u6c34\u6728\u91d1\u571f".split(""),"dateFormat-long":"y\u5e74M\u6708d\u65e5","field-fri-relative+-1":"\u5148\u9031\u306e\u91d1\u66dc\u65e5","field-wed-relative+-1":"\u5148\u9031\u306e\u6c34\u66dc\u65e5","months-format-wide":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),"dateTimeFormat-medium":"{1} {0}",
"dayPeriods-format-wide-pm":"\u5348\u5f8c","dateFormat-full":"y\u5e74M\u6708d\u65e5EEEE","field-thu-relative+-1":"\u5148\u9031\u306e\u6728\u66dc\u65e5","dateFormatItem-Md":"M/d","dayPeriods-format-wide-noon":"\u6b63\u5348","dateFormatItem-yMd":"y/M/d","dateFormatItem-yM":"y/M","field-era":"\u6642\u4ee3","months-standAlone-wide":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),"timeFormat-short":"H:mm","quarters-format-wide":["\u7b2c1\u56db\u534a\u671f",
"\u7b2c2\u56db\u534a\u671f","\u7b2c3\u56db\u534a\u671f","\u7b2c4\u56db\u534a\u671f"],"dateFormatItem-MEEEEd":"M/dEEEE","timeFormat-long":"H:mm:ss z","dateFormatItem-yMMM":"y\u5e74M\u6708","dateFormatItem-yQQQQ":"yQQQQ","field-year":"\u5e74","field-hour":"\u6642","months-format-abbr":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),"field-sat-relative+0":"\u4eca\u9031\u306e\u571f\u66dc\u65e5","field-sat-relative+1":"\u6765\u9031\u306e\u571f\u66dc\u65e5",
"timeFormat-full":"H\u6642mm\u5206ss\u79d2 zzzz","dateFormatItem-yMEEEEd":"y/M/dEEEE","field-day-relative+0":"\u4eca\u65e5","field-day-relative+1":"\u660e\u65e5","field-thu-relative+0":"\u4eca\u9031\u306e\u6728\u66dc\u65e5","dateFormatItem-GyMMMd":"Gy\u5e74M\u6708d\u65e5","field-day-relative+2":"\u660e\u5f8c\u65e5","field-thu-relative+1":"\u6765\u9031\u306e\u6728\u66dc\u65e5","dateFormatItem-H":"H\u6642","months-standAlone-abbr":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),
"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["\u7b2c1\u56db\u534a\u671f","\u7b2c2\u56db\u534a\u671f","\u7b2c3\u56db\u534a\u671f","\u7b2c4\u56db\u534a\u671f"],"dateFormatItem-Gy":"Gy\u5e74","dateFormatItem-M":"M\u6708","days-standAlone-wide":"\u65e5\u66dc\u65e5 \u6708\u66dc\u65e5 \u706b\u66dc\u65e5 \u6c34\u66dc\u65e5 \u6728\u66dc\u65e5 \u91d1\u66dc\u65e5 \u571f\u66dc\u65e5".split(" "),"dateFormatItem-yMMMEEEEd":"y\u5e74M\u6708d\u65e5EEEE","timeFormat-medium":"H:mm:ss","field-sun-relative+0":"\u4eca\u9031\u306e\u65e5\u66dc\u65e5",
"dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],"field-sun-relative+1":"\u6765\u9031\u306e\u65e5\u66dc\u65e5",eraAbbr:["\u7d00\u5143\u524d","\u897f\u66a6"],"field-minute":"\u5206","field-dayperiod":"\u5348\u524d/\u5348\u5f8c","days-standAlone-abbr":"\u65e5\u6708\u706b\u6c34\u6728\u91d1\u571f".split(""),"dateFormatItem-d":"d\u65e5","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"\u6628\u65e5","dateFormatItem-h":"aK\u6642",
"dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"\u5348\u524d","field-day-relative+-2":"\u4e00\u6628\u65e5","dateFormatItem-MMMd":"M\u6708d\u65e5","dateFormatItem-EEEEd":"d\u65e5EEEE","dateFormatItem-MEd":"M/d(E)","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"\u4eca\u9031\u306e\u91d1\u66dc\u65e5","field-fri-relative+1":"\u6765\u9031\u306e\u91d1\u66dc\u65e5","field-day":"\u65e5","days-format-wide":"\u65e5\u66dc\u65e5 \u6708\u66dc\u65e5 \u706b\u66dc\u65e5 \u6c34\u66dc\u65e5 \u6728\u66dc\u65e5 \u91d1\u66dc\u65e5 \u571f\u66dc\u65e5".split(" "),
"field-zone":"\u30bf\u30a4\u30e0\u30be\u30fc\u30f3","dateFormatItem-y":"y\u5e74","months-standAlone-narrow":"1 2 3 4 5 6 7 8 9 10 11 12".split(" "),"field-year-relative+-1":"\u6628\u5e74","field-month-relative+-1":"\u5148\u6708","dateFormatItem-hm":"aK:mm","dateFormatItem-GyMMMEEEEd":"Gy\u5e74M\u6708d\u65e5EEEE","days-format-abbr":"\u65e5\u6708\u706b\u6c34\u6728\u91d1\u571f".split(""),eraNames:["\u7d00\u5143\u524d","\u897f\u66a6\u7d00\u5143\u524d","\u897f\u66a6"],"dateFormatItem-yMMMd":"y\u5e74M\u6708d\u65e5",
"days-format-narrow":"\u65e5\u6708\u706b\u6c34\u6728\u91d1\u571f".split(""),"dateFormatItem-MMMEEEEd":"M\u6708d\u65e5EEEE","days-standAlone-narrow":"\u65e5\u6708\u706b\u6c34\u6728\u91d1\u571f".split(""),"dateFormatItem-MMM":"M\u6708","field-month":"\u6708","field-tue-relative+0":"\u4eca\u9031\u306e\u706b\u66dc\u65e5","field-tue-relative+1":"\u6765\u9031\u306e\u706b\u66dc\u65e5","dayPeriods-format-wide-am":"\u5348\u524d","dateFormatItem-EHm":"HH \u6642 mm \u5206 (E)","field-mon-relative+0":"\u4eca\u9031\u306e\u6708\u66dc\u65e5",
"field-mon-relative+1":"\u6765\u9031\u306e\u6708\u66dc\u65e5","dateFormat-short":"y/MM/dd","dateFormatItem-EHms":"HH \u6642 mm \u5206 ss \u79d2 (E)","dateFormatItem-Ehms":"a K \u6642 mm \u5206 ss \u79d2 (E)","dayPeriods-format-narrow-noon":"\u6b63\u5348","field-second":"\u79d2","field-sat-relative+-1":"\u5148\u9031\u306e\u571f\u66dc\u65e5","dateFormatItem-yMMMEd":"y\u5e74M\u6708d\u65e5(E)","field-sun-relative+-1":"\u5148\u9031\u306e\u65e5\u66dc\u65e5","field-month-relative+0":"\u4eca\u6708","field-month-relative+1":"\u7fcc\u6708",
"dateFormatItem-Ed":"d\u65e5(E)","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"\u9031","dateFormat-medium":"y/MM/dd","field-year-relative+0":"\u4eca\u5e74","field-week-relative+-1":"\u5148\u9031","field-year-relative+1":"\u7fcc\u5e74","dayPeriods-format-narrow-pm":"\u5348\u5f8c","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"aK:mm:ss","dateFormatItem-GyMMM":"Gy\u5e74M\u6708","field-mon-relative+-1":"\u5148\u9031\u306e\u6708\u66dc\u65e5","field-week-relative+0":"\u4eca\u9031",
"field-week-relative+1":"\u7fcc\u9031"})},"mw-datepicker/gregorian/nls/ja-jp/gregorian":function(){define({"dateFormatItem-Ehm":"a K \u6642 mm \u5206 (E)","days-standAlone-short":"\u65e5\u6708\u706b\u6c34\u6728\u91d1\u571f".split(""),"months-format-narrow":"1 2 3 4 5 6 7 8 9 10 11 12".split(" "),"field-second-relative+0":"\u4eca\u3059\u3050","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"\u66dc\u65e5","dateFormatItem-yQQQ":"y/QQQ","dateFormatItem-yMEd":"y/M/d(E)","field-wed-relative+0":"\u4eca\u9031\u306e\u6c34\u66dc\u65e5",
"dateFormatItem-GyMMMEd":"Gy\u5e74M\u6708d\u65e5(E)","dateFormatItem-MMMEd":"M\u6708d\u65e5(E)","field-wed-relative+1":"\u6765\u9031\u306e\u6c34\u66dc\u65e5",eraNarrow:["BC","BCE","AD","CE"],"dateFormatItem-yMM":"y/MM","field-tue-relative+-1":"\u5148\u9031\u306e\u706b\u66dc\u65e5","days-format-short":"\u65e5\u6708\u706b\u6c34\u6728\u91d1\u571f".split(""),"dateFormat-long":"y\u5e74M\u6708d\u65e5","field-fri-relative+-1":"\u5148\u9031\u306e\u91d1\u66dc\u65e5","field-wed-relative+-1":"\u5148\u9031\u306e\u6c34\u66dc\u65e5",
"months-format-wide":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"\u5348\u5f8c","dateFormat-full":"y\u5e74M\u6708d\u65e5EEEE","field-thu-relative+-1":"\u5148\u9031\u306e\u6728\u66dc\u65e5","dateFormatItem-Md":"M/d","dayPeriods-format-wide-noon":"\u6b63\u5348","dateFormatItem-yMd":"y/M/d","dateFormatItem-yM":"y/M","field-era":"\u6642\u4ee3","months-standAlone-wide":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),
"timeFormat-short":"H:mm","quarters-format-wide":["\u7b2c1\u56db\u534a\u671f","\u7b2c2\u56db\u534a\u671f","\u7b2c3\u56db\u534a\u671f","\u7b2c4\u56db\u534a\u671f"],"dateFormatItem-MEEEEd":"M/dEEEE","timeFormat-long":"H:mm:ss z","dateFormatItem-yMMM":"y\u5e74M\u6708","dateFormatItem-yQQQQ":"yQQQQ","field-year":"\u5e74","field-hour":"\u6642","months-format-abbr":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),"field-sat-relative+0":"\u4eca\u9031\u306e\u571f\u66dc\u65e5",
"field-sat-relative+1":"\u6765\u9031\u306e\u571f\u66dc\u65e5","timeFormat-full":"H\u6642mm\u5206ss\u79d2 zzzz","dateFormatItem-yMEEEEd":"y/M/dEEEE","field-day-relative+0":"\u4eca\u65e5","field-day-relative+1":"\u660e\u65e5","field-thu-relative+0":"\u4eca\u9031\u306e\u6728\u66dc\u65e5","dateFormatItem-GyMMMd":"Gy\u5e74M\u6708d\u65e5","field-day-relative+2":"\u660e\u5f8c\u65e5","field-thu-relative+1":"\u6765\u9031\u306e\u6728\u66dc\u65e5","dateFormatItem-H":"H\u6642","months-standAlone-abbr":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),
"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["\u7b2c1\u56db\u534a\u671f","\u7b2c2\u56db\u534a\u671f","\u7b2c3\u56db\u534a\u671f","\u7b2c4\u56db\u534a\u671f"],"dateFormatItem-Gy":"Gy\u5e74","dateFormatItem-M":"M\u6708","days-standAlone-wide":"\u65e5\u66dc\u65e5 \u6708\u66dc\u65e5 \u706b\u66dc\u65e5 \u6c34\u66dc\u65e5 \u6728\u66dc\u65e5 \u91d1\u66dc\u65e5 \u571f\u66dc\u65e5".split(" "),"dateFormatItem-yMMMEEEEd":"y\u5e74M\u6708d\u65e5EEEE","timeFormat-medium":"H:mm:ss","field-sun-relative+0":"\u4eca\u9031\u306e\u65e5\u66dc\u65e5",
"dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],"field-sun-relative+1":"\u6765\u9031\u306e\u65e5\u66dc\u65e5",eraAbbr:["\u7d00\u5143\u524d","\u897f\u66a6"],"field-minute":"\u5206","field-dayperiod":"\u5348\u524d/\u5348\u5f8c","days-standAlone-abbr":"\u65e5\u6708\u706b\u6c34\u6728\u91d1\u571f".split(""),"dateFormatItem-d":"d\u65e5","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"\u6628\u65e5","dateFormatItem-h":"aK\u6642",
"dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"\u5348\u524d","field-day-relative+-2":"\u4e00\u6628\u65e5","dateFormatItem-MMMd":"M\u6708d\u65e5","dateFormatItem-EEEEd":"d\u65e5EEEE","dateFormatItem-MEd":"M/d(E)","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"\u4eca\u9031\u306e\u91d1\u66dc\u65e5","field-fri-relative+1":"\u6765\u9031\u306e\u91d1\u66dc\u65e5","field-day":"\u65e5","days-format-wide":"\u65e5\u66dc\u65e5 \u6708\u66dc\u65e5 \u706b\u66dc\u65e5 \u6c34\u66dc\u65e5 \u6728\u66dc\u65e5 \u91d1\u66dc\u65e5 \u571f\u66dc\u65e5".split(" "),
"field-zone":"\u30bf\u30a4\u30e0\u30be\u30fc\u30f3","dateFormatItem-y":"y\u5e74","months-standAlone-narrow":"1 2 3 4 5 6 7 8 9 10 11 12".split(" "),"field-year-relative+-1":"\u6628\u5e74","field-month-relative+-1":"\u5148\u6708","dateFormatItem-hm":"aK:mm","dateFormatItem-GyMMMEEEEd":"Gy\u5e74M\u6708d\u65e5EEEE","days-format-abbr":"\u65e5\u6708\u706b\u6c34\u6728\u91d1\u571f".split(""),eraNames:["\u7d00\u5143\u524d","\u897f\u66a6\u7d00\u5143\u524d","\u897f\u66a6"],"dateFormatItem-yMMMd":"y\u5e74M\u6708d\u65e5",
"days-format-narrow":"\u65e5\u6708\u706b\u6c34\u6728\u91d1\u571f".split(""),"dateFormatItem-MMMEEEEd":"M\u6708d\u65e5EEEE","days-standAlone-narrow":"\u65e5\u6708\u706b\u6c34\u6728\u91d1\u571f".split(""),"dateFormatItem-MMM":"M\u6708","field-month":"\u6708","field-tue-relative+0":"\u4eca\u9031\u306e\u706b\u66dc\u65e5","field-tue-relative+1":"\u6765\u9031\u306e\u706b\u66dc\u65e5","dayPeriods-format-wide-am":"\u5348\u524d","dateFormatItem-EHm":"HH \u6642 mm \u5206 (E)","field-mon-relative+0":"\u4eca\u9031\u306e\u6708\u66dc\u65e5",
"field-mon-relative+1":"\u6765\u9031\u306e\u6708\u66dc\u65e5","dateFormat-short":"y/MM/dd","dateFormatItem-EHms":"HH \u6642 mm \u5206 ss \u79d2 (E)","dateFormatItem-Ehms":"a K \u6642 mm \u5206 ss \u79d2 (E)","dayPeriods-format-narrow-noon":"\u6b63\u5348","field-second":"\u79d2","field-sat-relative+-1":"\u5148\u9031\u306e\u571f\u66dc\u65e5","dateFormatItem-yMMMEd":"y\u5e74M\u6708d\u65e5(E)","field-sun-relative+-1":"\u5148\u9031\u306e\u65e5\u66dc\u65e5","field-month-relative+0":"\u4eca\u6708","field-month-relative+1":"\u7fcc\u6708",
"dateFormatItem-Ed":"d\u65e5(E)","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"\u9031","dateFormat-medium":"y/MM/dd","field-year-relative+0":"\u4eca\u5e74","field-week-relative+-1":"\u5148\u9031","field-year-relative+1":"\u7fcc\u5e74","dayPeriods-format-narrow-pm":"\u5348\u5f8c","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"aK:mm:ss","dateFormatItem-GyMMM":"Gy\u5e74M\u6708","field-mon-relative+-1":"\u5148\u9031\u306e\u6708\u66dc\u65e5","field-week-relative+0":"\u4eca\u9031",
"field-week-relative+1":"\u7fcc\u9031"})},"mw-datepicker/gregorian/nls/ko/gregorian":function(){define({"dateFormatItem-Ehm":"(E) a h:mm","days-standAlone-short":"\uc77c\uc6d4\ud654\uc218\ubaa9\uae08\ud1a0".split(""),"months-format-narrow":"1\uc6d4 2\uc6d4 3\uc6d4 4\uc6d4 5\uc6d4 6\uc6d4 7\uc6d4 8\uc6d4 9\uc6d4 10\uc6d4 11\uc6d4 12\uc6d4".split(" "),"field-second-relative+0":"\uc9c0\uae08","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"\uc694\uc77c","dateFormatItem-yQQQ":"y\ub144 QQQ",
"dateFormatItem-yMEd":"y. M. d. (E)","field-wed-relative+0":"\uc774\ubc88 \uc218\uc694\uc77c","field-wed-relative+1":"\ub2e4\uc74c \uc218\uc694\uc77c","dateFormatItem-GyMMMEd":"G y\ub144 MMM d\uc77c (E)","dateFormatItem-MMMEd":"MMM d\uc77c (E)",eraNarrow:["\uae30\uc6d0\uc804","\uc11c\uae30"],"dateFormatItem-yMM":"y. M.","field-tue-relative+-1":"\uc9c0\ub09c \ud654\uc694\uc77c","days-format-short":"\uc77c\uc6d4\ud654\uc218\ubaa9\uae08\ud1a0".split(""),"dateFormat-long":"y\ub144 M\uc6d4 d\uc77c","field-fri-relative+-1":"\uc9c0\ub09c \uae08\uc694\uc77c",
"field-wed-relative+-1":"\uc9c0\ub09c \uc218\uc694\uc77c","months-format-wide":"1\uc6d4 2\uc6d4 3\uc6d4 4\uc6d4 5\uc6d4 6\uc6d4 7\uc6d4 8\uc6d4 9\uc6d4 10\uc6d4 11\uc6d4 12\uc6d4".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"\uc624\ud6c4","dateFormat-full":"y\ub144 M\uc6d4 d\uc77c EEEE","field-thu-relative+-1":"\uc9c0\ub09c \ubaa9\uc694\uc77c","dateFormatItem-Md":"M. d.","dateFormatItem-yMd":"y. M. d.","field-era":"\uc5f0\ud638","dateFormatItem-yM":"y. M.","months-standAlone-wide":"1\uc6d4 2\uc6d4 3\uc6d4 4\uc6d4 5\uc6d4 6\uc6d4 7\uc6d4 8\uc6d4 9\uc6d4 10\uc6d4 11\uc6d4 12\uc6d4".split(" "),
"timeFormat-short":"a h:mm","quarters-format-wide":["\uc81c 1/4\ubd84\uae30","\uc81c 2/4\ubd84\uae30","\uc81c 3/4\ubd84\uae30","\uc81c 4/4\ubd84\uae30"],"dateFormatItem-MEEEEd":"M. d. EEEE","dateFormatItem-yQQQQ":"y\ub144 QQQQ","timeFormat-long":"a h\uc2dc m\ubd84 s\ucd08 z","field-year":"\ub144","dateFormatItem-yMMM":"y\ub144 MMM","field-hour":"\uc2dc","months-format-abbr":"1\uc6d4 2\uc6d4 3\uc6d4 4\uc6d4 5\uc6d4 6\uc6d4 7\uc6d4 8\uc6d4 9\uc6d4 10\uc6d4 11\uc6d4 12\uc6d4".split(" "),"field-sat-relative+0":"\uc774\ubc88 \ud1a0\uc694\uc77c",
"field-sat-relative+1":"\ub2e4\uc74c \ud1a0\uc694\uc77c","dateFormatItem-yMEEEEd":"y. M. d. EEEE","timeFormat-full":"a h\uc2dc m\ubd84 s\ucd08 zzzz","field-day-relative+0":"\uc624\ub298","field-thu-relative+0":"\uc774\ubc88 \ubaa9\uc694\uc77c","field-day-relative+1":"\ub0b4\uc77c","field-thu-relative+1":"\ub2e4\uc74c \ubaa9\uc694\uc77c","dateFormatItem-GyMMMd":"G y\ub144 MMM d\uc77c","field-day-relative+2":"\ubaa8\ub808","dateFormatItem-H":"H\uc2dc","months-standAlone-abbr":"1\uc6d4 2\uc6d4 3\uc6d4 4\uc6d4 5\uc6d4 6\uc6d4 7\uc6d4 8\uc6d4 9\uc6d4 10\uc6d4 11\uc6d4 12\uc6d4".split(" "),
"quarters-format-abbr":["1\ubd84\uae30","2\ubd84\uae30","3\ubd84\uae30","4\ubd84\uae30"],"quarters-standAlone-wide":["\uc81c 1/4\ubd84\uae30","\uc81c 2/4\ubd84\uae30","\uc81c 3/4\ubd84\uae30","\uc81c 4/4\ubd84\uae30"],"dateFormatItem-Gy":"G y\ub144","dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-M":"M\uc6d4","days-standAlone-wide":"\uc77c\uc694\uc77c \uc6d4\uc694\uc77c \ud654\uc694\uc77c \uc218\uc694\uc77c \ubaa9\uc694\uc77c \uae08\uc694\uc77c \ud1a0\uc694\uc77c".split(" "),"dateFormatItem-yMMMEEEEd":"y\ub144 MMM d\uc77c EEEE",
"timeFormat-medium":"a h:mm:ss","field-sun-relative+0":"\uc774\ubc88 \uc77c\uc694\uc77c","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"\ub2e4\uc74c \uc77c\uc694\uc77c","quarters-standAlone-abbr":["1\ubd84\uae30","2\ubd84\uae30","3\ubd84\uae30","4\ubd84\uae30"],eraAbbr:["\uae30\uc6d0\uc804","\uc11c\uae30"],"field-minute":"\ubd84","field-dayperiod":"\uc624\uc804/\uc624\ud6c4","days-standAlone-abbr":"\uc77c\uc6d4\ud654\uc218\ubaa9\uae08\ud1a0".split(""),"dateFormatItem-d":"d\uc77c","dateFormatItem-ms":"mm:ss",
"quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"\uc5b4\uc81c","dateFormatItem-h":"a h\uc2dc","dateTimeFormat-long":"{1} {0}","field-day-relative+-2":"\uadf8\uc800\uaed8","dateFormatItem-MMMd":"MMM d\uc77c","dateFormatItem-EEEEd":"d\uc77c EEEE","dateFormatItem-MEd":"M. d. (E)","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"\uc774\ubc88 \uae08\uc694\uc77c","field-fri-relative+1":"\ub2e4\uc74c \uae08\uc694\uc77c","field-day":"\uc77c","days-format-wide":"\uc77c\uc694\uc77c \uc6d4\uc694\uc77c \ud654\uc694\uc77c \uc218\uc694\uc77c \ubaa9\uc694\uc77c \uae08\uc694\uc77c \ud1a0\uc694\uc77c".split(" "),
"field-zone":"\uc2dc\uac04\ub300","dateFormatItem-y":"y\ub144","months-standAlone-narrow":"1\uc6d4 2\uc6d4 3\uc6d4 4\uc6d4 5\uc6d4 6\uc6d4 7\uc6d4 8\uc6d4 9\uc6d4 10\uc6d4 11\uc6d4 12\uc6d4".split(" "),"field-year-relative+-1":"\uc9c0\ub09c\ud574","field-month-relative+-1":"\uc9c0\ub09c\ub2ec","dateFormatItem-hm":"a h:mm","dateFormatItem-GyMMMEEEEd":"G y\ub144 MMM d\uc77c EEEE","days-format-abbr":"\uc77c\uc6d4\ud654\uc218\ubaa9\uae08\ud1a0".split(""),"dateFormatItem-yMMMd":"y\ub144 MMM d\uc77c",eraNames:["\uc11c\ub825\uae30\uc6d0\uc804",
"\uc11c\ub825\uae30\uc6d0"],"days-format-narrow":"\uc77c\uc6d4\ud654\uc218\ubaa9\uae08\ud1a0".split(""),"dateFormatItem-MMMEEEEd":"MMM d\uc77c EEEE","days-standAlone-narrow":"\uc77c\uc6d4\ud654\uc218\ubaa9\uae08\ud1a0".split(""),"dateFormatItem-MMM":"LLL","field-month":"\uc6d4","field-tue-relative+0":"\uc774\ubc88 \ud654\uc694\uc77c","field-tue-relative+1":"\ub2e4\uc74c \ud654\uc694\uc77c","dayPeriods-format-wide-am":"\uc624\uc804","dateFormatItem-EHm":"(E) HH:mm","field-mon-relative+0":"\uc774\ubc88 \uc6d4\uc694\uc77c",
"field-mon-relative+1":"\ub2e4\uc74c \uc6d4\uc694\uc77c","dateFormat-short":"yy. M. d.","dateFormatItem-EHms":"(E) HH:mm:ss","dateFormatItem-Ehms":"(E) a h:mm:ss","field-second":"\ucd08","field-sat-relative+-1":"\uc9c0\ub09c \ud1a0\uc694\uc77c","dateFormatItem-yMMMEd":"y\ub144 MMM d\uc77c (E)","field-sun-relative+-1":"\uc9c0\ub09c \uc77c\uc694\uc77c","field-month-relative+0":"\uc774\ubc88 \ub2ec","field-month-relative+1":"\ub2e4\uc74c \ub2ec","dateFormatItem-Ed":"d\uc77c (E)","dateTimeFormats-appendItem-Timezone":"{0} {1}",
"field-week":"\uc8fc","dateFormat-medium":"y. M. d.","field-year-relative+0":"\uc62c\ud574","field-week-relative+-1":"\uc9c0\ub09c\uc8fc","field-year-relative+1":"\ub0b4\ub144","dateFormatItem-mmss":"mm:ss","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H\uc2dc m\ubd84 s\ucd08","dateFormatItem-hms":"a h:mm:ss","dateFormatItem-GyMMM":"G y\ub144 MMM","field-mon-relative+-1":"\uc9c0\ub09c \uc6d4\uc694\uc77c","field-week-relative+0":"\uc774\ubc88 \uc8fc","field-week-relative+1":"\ub2e4\uc74c \uc8fc"})},
"mw-datepicker/gregorian/nls/ko-kr/gregorian":function(){define({"dateFormatItem-Ehm":"(E) a h:mm","days-standAlone-short":"\uc77c\uc6d4\ud654\uc218\ubaa9\uae08\ud1a0".split(""),"months-format-narrow":"1\uc6d4 2\uc6d4 3\uc6d4 4\uc6d4 5\uc6d4 6\uc6d4 7\uc6d4 8\uc6d4 9\uc6d4 10\uc6d4 11\uc6d4 12\uc6d4".split(" "),"field-second-relative+0":"\uc9c0\uae08","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"\uc694\uc77c","dateFormatItem-yQQQ":"y\ub144 QQQ","dateFormatItem-yMEd":"y. M. d. (E)",
"field-wed-relative+0":"\uc774\ubc88 \uc218\uc694\uc77c","field-wed-relative+1":"\ub2e4\uc74c \uc218\uc694\uc77c","dateFormatItem-GyMMMEd":"G y\ub144 MMM d\uc77c (E)","dateFormatItem-MMMEd":"MMM d\uc77c (E)",eraNarrow:["\uae30\uc6d0\uc804","\uc11c\uae30"],"dateFormatItem-yMM":"y. M.","field-tue-relative+-1":"\uc9c0\ub09c \ud654\uc694\uc77c","days-format-short":"\uc77c\uc6d4\ud654\uc218\ubaa9\uae08\ud1a0".split(""),"dateFormat-long":"y\ub144 M\uc6d4 d\uc77c","field-fri-relative+-1":"\uc9c0\ub09c \uae08\uc694\uc77c",
"field-wed-relative+-1":"\uc9c0\ub09c \uc218\uc694\uc77c","months-format-wide":"1\uc6d4 2\uc6d4 3\uc6d4 4\uc6d4 5\uc6d4 6\uc6d4 7\uc6d4 8\uc6d4 9\uc6d4 10\uc6d4 11\uc6d4 12\uc6d4".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"\uc624\ud6c4","dateFormat-full":"y\ub144 M\uc6d4 d\uc77c EEEE","field-thu-relative+-1":"\uc9c0\ub09c \ubaa9\uc694\uc77c","dateFormatItem-Md":"M. d.","dateFormatItem-yMd":"y. M. d.","field-era":"\uc5f0\ud638","dateFormatItem-yM":"y. M.","months-standAlone-wide":"1\uc6d4 2\uc6d4 3\uc6d4 4\uc6d4 5\uc6d4 6\uc6d4 7\uc6d4 8\uc6d4 9\uc6d4 10\uc6d4 11\uc6d4 12\uc6d4".split(" "),
"timeFormat-short":"a h:mm","quarters-format-wide":["\uc81c 1/4\ubd84\uae30","\uc81c 2/4\ubd84\uae30","\uc81c 3/4\ubd84\uae30","\uc81c 4/4\ubd84\uae30"],"dateFormatItem-MEEEEd":"M. d. EEEE","dateFormatItem-yQQQQ":"y\ub144 QQQQ","timeFormat-long":"a h\uc2dc m\ubd84 s\ucd08 z","field-year":"\ub144","dateFormatItem-yMMM":"y\ub144 MMM","field-hour":"\uc2dc","months-format-abbr":"1\uc6d4 2\uc6d4 3\uc6d4 4\uc6d4 5\uc6d4 6\uc6d4 7\uc6d4 8\uc6d4 9\uc6d4 10\uc6d4 11\uc6d4 12\uc6d4".split(" "),"field-sat-relative+0":"\uc774\ubc88 \ud1a0\uc694\uc77c",
"field-sat-relative+1":"\ub2e4\uc74c \ud1a0\uc694\uc77c","dateFormatItem-yMEEEEd":"y. M. d. EEEE","timeFormat-full":"a h\uc2dc m\ubd84 s\ucd08 zzzz","field-day-relative+0":"\uc624\ub298","field-thu-relative+0":"\uc774\ubc88 \ubaa9\uc694\uc77c","field-day-relative+1":"\ub0b4\uc77c","field-thu-relative+1":"\ub2e4\uc74c \ubaa9\uc694\uc77c","dateFormatItem-GyMMMd":"G y\ub144 MMM d\uc77c","field-day-relative+2":"\ubaa8\ub808","dateFormatItem-H":"H\uc2dc","months-standAlone-abbr":"1\uc6d4 2\uc6d4 3\uc6d4 4\uc6d4 5\uc6d4 6\uc6d4 7\uc6d4 8\uc6d4 9\uc6d4 10\uc6d4 11\uc6d4 12\uc6d4".split(" "),
"quarters-format-abbr":["1\ubd84\uae30","2\ubd84\uae30","3\ubd84\uae30","4\ubd84\uae30"],"quarters-standAlone-wide":["\uc81c 1/4\ubd84\uae30","\uc81c 2/4\ubd84\uae30","\uc81c 3/4\ubd84\uae30","\uc81c 4/4\ubd84\uae30"],"dateFormatItem-Gy":"G y\ub144","dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-M":"M\uc6d4","days-standAlone-wide":"\uc77c\uc694\uc77c \uc6d4\uc694\uc77c \ud654\uc694\uc77c \uc218\uc694\uc77c \ubaa9\uc694\uc77c \uae08\uc694\uc77c \ud1a0\uc694\uc77c".split(" "),"dateFormatItem-yMMMEEEEd":"y\ub144 MMM d\uc77c EEEE",
"timeFormat-medium":"a h:mm:ss","field-sun-relative+0":"\uc774\ubc88 \uc77c\uc694\uc77c","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"\ub2e4\uc74c \uc77c\uc694\uc77c","quarters-standAlone-abbr":["1\ubd84\uae30","2\ubd84\uae30","3\ubd84\uae30","4\ubd84\uae30"],eraAbbr:["\uae30\uc6d0\uc804","\uc11c\uae30"],"field-minute":"\ubd84","field-dayperiod":"\uc624\uc804/\uc624\ud6c4","days-standAlone-abbr":"\uc77c\uc6d4\ud654\uc218\ubaa9\uae08\ud1a0".split(""),"dateFormatItem-d":"d\uc77c","dateFormatItem-ms":"mm:ss",
"quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"\uc5b4\uc81c","dateFormatItem-h":"a h\uc2dc","dateTimeFormat-long":"{1} {0}","field-day-relative+-2":"\uadf8\uc800\uaed8","dateFormatItem-MMMd":"MMM d\uc77c","dateFormatItem-EEEEd":"d\uc77c EEEE","dateFormatItem-MEd":"M. d. (E)","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"\uc774\ubc88 \uae08\uc694\uc77c","field-fri-relative+1":"\ub2e4\uc74c \uae08\uc694\uc77c","field-day":"\uc77c","days-format-wide":"\uc77c\uc694\uc77c \uc6d4\uc694\uc77c \ud654\uc694\uc77c \uc218\uc694\uc77c \ubaa9\uc694\uc77c \uae08\uc694\uc77c \ud1a0\uc694\uc77c".split(" "),
"field-zone":"\uc2dc\uac04\ub300","dateFormatItem-y":"y\ub144","months-standAlone-narrow":"1\uc6d4 2\uc6d4 3\uc6d4 4\uc6d4 5\uc6d4 6\uc6d4 7\uc6d4 8\uc6d4 9\uc6d4 10\uc6d4 11\uc6d4 12\uc6d4".split(" "),"field-year-relative+-1":"\uc9c0\ub09c\ud574","field-month-relative+-1":"\uc9c0\ub09c\ub2ec","dateFormatItem-hm":"a h:mm","dateFormatItem-GyMMMEEEEd":"G y\ub144 MMM d\uc77c EEEE","days-format-abbr":"\uc77c\uc6d4\ud654\uc218\ubaa9\uae08\ud1a0".split(""),"dateFormatItem-yMMMd":"y\ub144 MMM d\uc77c",eraNames:["\uc11c\ub825\uae30\uc6d0\uc804",
"\uc11c\ub825\uae30\uc6d0"],"days-format-narrow":"\uc77c\uc6d4\ud654\uc218\ubaa9\uae08\ud1a0".split(""),"dateFormatItem-MMMEEEEd":"MMM d\uc77c EEEE","days-standAlone-narrow":"\uc77c\uc6d4\ud654\uc218\ubaa9\uae08\ud1a0".split(""),"dateFormatItem-MMM":"LLL","field-month":"\uc6d4","field-tue-relative+0":"\uc774\ubc88 \ud654\uc694\uc77c","field-tue-relative+1":"\ub2e4\uc74c \ud654\uc694\uc77c","dayPeriods-format-wide-am":"\uc624\uc804","dateFormatItem-EHm":"(E) HH:mm","field-mon-relative+0":"\uc774\ubc88 \uc6d4\uc694\uc77c",
"field-mon-relative+1":"\ub2e4\uc74c \uc6d4\uc694\uc77c","dateFormat-short":"yy. M. d.","dateFormatItem-EHms":"(E) HH:mm:ss","dateFormatItem-Ehms":"(E) a h:mm:ss","field-second":"\ucd08","field-sat-relative+-1":"\uc9c0\ub09c \ud1a0\uc694\uc77c","dateFormatItem-yMMMEd":"y\ub144 MMM d\uc77c (E)","field-sun-relative+-1":"\uc9c0\ub09c \uc77c\uc694\uc77c","field-month-relative+0":"\uc774\ubc88 \ub2ec","field-month-relative+1":"\ub2e4\uc74c \ub2ec","dateFormatItem-Ed":"d\uc77c (E)","dateTimeFormats-appendItem-Timezone":"{0} {1}",
"field-week":"\uc8fc","dateFormat-medium":"y. M. d.","field-year-relative+0":"\uc62c\ud574","field-week-relative+-1":"\uc9c0\ub09c\uc8fc","field-year-relative+1":"\ub0b4\ub144","dateFormatItem-mmss":"mm:ss","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H\uc2dc m\ubd84 s\ucd08","dateFormatItem-hms":"a h:mm:ss","dateFormatItem-GyMMM":"G y\ub144 MMM","field-mon-relative+-1":"\uc9c0\ub09c \uc6d4\uc694\uc77c","field-week-relative+0":"\uc774\ubc88 \uc8fc","field-week-relative+1":"\ub2e4\uc74c \uc8fc"})},
"mw-datepicker/gregorian/nls/mk/gregorian":function(){define({"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"\u043d\u0435\u0434. \u043f\u043e\u043d. \u0432\u0442\u043e. \u0441\u0440\u0435. \u0447\u0435\u0442. \u043f\u0435\u0442. \u0441\u0430\u0431.".split(" "),"months-format-narrow":"\u0458\u0444\u043c\u0430\u043c\u0458\u0458\u0430\u0441\u043e\u043d\u0434".split(""),"field-second-relative+0":"\u0441\u0435\u0433\u0430","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"\u0414\u0435\u043d \u0432\u043e \u043d\u0435\u0434\u0435\u043b\u0430\u0442\u0430",
"dateFormatItem-yQQQ":"QQQ y '\u0433'.","dateFormatItem-yMEd":"E, d.M.y","field-wed-relative+0":"\u043e\u0432\u0430\u0430 \u0441\u0440\u0435\u0434\u0430","field-wed-relative+1":"\u0441\u043b\u0435\u0434\u043d\u0430\u0442\u0430 \u0441\u0440\u0435\u0434\u0430","dateFormatItem-GyMMMEd":"E, dd MMM y '\u0433'. G","dateFormatItem-MMMEd":"E d MMM",eraNarrow:["\u043f\u0440.\u043d.\u0435.","\u043d.\u0435."],"field-tue-relative+-1":"\u043c\u0438\u043d\u0430\u0442\u0438\u043e\u0442 \u0432\u0442\u043e\u0440\u043d\u0438\u043a",
"days-format-short":"\u043d\u0435\u0434. \u043f\u043e\u043d. 3 \u0441\u0440\u0435. \u0447\u0435\u0442. \u043f\u0435\u0442. 7".split(" "),"dateFormat-long":"dd MMMM y '\u0433'.","field-fri-relative+-1":"\u043c\u0438\u043d\u0430\u0442\u0438\u043e\u0442 \u043f\u0435\u0442\u043e\u043a","field-wed-relative+-1":"\u043c\u0438\u043d\u0430\u0442\u0430\u0442\u0430 \u0441\u0440\u0435\u0434\u0430","months-format-wide":"\u0458\u0430\u043d\u0443\u0430\u0440\u0438 \u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438 \u043c\u0430\u0440\u0442 \u0430\u043f\u0440\u0438\u043b \u043c\u0430\u0458 \u0458\u0443\u043d\u0438 \u0458\u0443\u043b\u0438 \u0430\u0432\u0433\u0443\u0441\u0442 \u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438 \u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438 \u043d\u043e\u0435\u043c\u0432\u0440\u0438 \u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438".split(" "),
"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"\u043f\u043e\u043f\u043b\u0430\u0434\u043d\u0435","dateFormat-full":"EEEE, dd MMMM y '\u0433'.","field-thu-relative+-1":"\u043c\u0438\u043d\u0430\u0442\u0438\u043e\u0442 \u0447\u0435\u0442\u0432\u0440\u0442\u043e\u043a","dateFormatItem-Md":"d.M","dateFormatItem-yMd":"d.M.y","field-era":"\u0415\u0440\u0430","dateFormatItem-yM":"M.y","months-standAlone-wide":"\u0458\u0430\u043d\u0443\u0430\u0440\u0438 \u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438 \u043c\u0430\u0440\u0442 \u0430\u043f\u0440\u0438\u043b \u043c\u0430\u0458 \u0458\u0443\u043d\u0438 \u0458\u0443\u043b\u0438 \u0430\u0432\u0433\u0443\u0441\u0442 \u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438 \u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438 \u043d\u043e\u0435\u043c\u0432\u0440\u0438 \u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438".split(" "),
"timeFormat-short":"HH:mm","quarters-format-wide":["\u043f\u0440\u0432\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435","\u0432\u0442\u043e\u0440\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435","\u0442\u0440\u0435\u0442\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435","\u0447\u0435\u0442\u0432\u0440\u0442\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435"],"dateFormatItem-yQQQQ":"QQQQ y '\u0433'.","timeFormat-long":"HH:mm:ss z",
"field-year":"\u0433\u043e\u0434\u0438\u043d\u0430","dateFormatItem-yMMM":"MMM y '\u0433'.","field-hour":"\u0427\u0430\u0441","months-format-abbr":"\u0458\u0430\u043d. \u0444\u0435\u0432. \u043c\u0430\u0440. \u0430\u043f\u0440. \u043c\u0430\u0458 \u0458\u0443\u043d. \u0458\u0443\u043b. \u0430\u0432\u0433. \u0441\u0435\u043f\u0442. \u043e\u043a\u0442. \u043d\u043e\u0435\u043c. \u0434\u0435\u043a.".split(" "),"field-sat-relative+0":"\u043e\u0432\u0430\u0430 \u0441\u0430\u0431\u043e\u0442\u0430","field-sat-relative+1":"\u0441\u043b\u0435\u0434\u043d\u0430\u0442\u0430 \u0441\u0430\u0431\u043e\u0442\u0430",
"timeFormat-full":"HH:mm:ss zzzz","field-day-relative+0":"\u0414\u0435\u043d\u0435\u0441","field-thu-relative+0":"\u043e\u0432\u043e\u0458 \u0447\u0435\u0442\u0432\u0440\u0442\u043e\u043a","field-day-relative+1":"\u0443\u0442\u0440\u0435","field-thu-relative+1":"\u0441\u043b\u0435\u0434\u043d\u0438\u043e\u0442 \u0447\u0435\u0442\u0432\u0440\u0442\u043e\u043a","dateFormatItem-GyMMMd":"dd MMM y '\u0433'. G","field-day-relative+2":"\u0437\u0430\u0434\u0443\u0442\u0440\u0435","dateFormatItem-H":"HH",
"months-standAlone-abbr":"\u0458\u0430\u043d. \u0444\u0435\u0432. \u043c\u0430\u0440. \u0430\u043f\u0440. \u043c\u0430\u0458 \u0458\u0443\u043d. \u0458\u0443\u043b. \u0430\u0432\u0433. \u0441\u0435\u043f\u0442. \u043e\u043a\u0442. \u043d\u043e\u0435\u043c. \u0434\u0435\u043a.".split(" "),"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["\u043f\u0440\u0432\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435","\u0432\u0442\u043e\u0440\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
"\u0442\u0440\u0435\u0442\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435","\u0447\u0435\u0442\u0432\u0440\u0442\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435"],"dateFormatItem-Gy":"y '\u0433'. G","dateFormatItem-M":"L","days-standAlone-wide":"\u043d\u0435\u0434\u0435\u043b\u0430 \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a \u0432\u0442\u043e\u0440\u043d\u0438\u043a \u0441\u0440\u0435\u0434\u0430 \u0447\u0435\u0442\u0432\u0440\u0442\u043e\u043a \u043f\u0435\u0442\u043e\u043a \u0441\u0430\u0431\u043e\u0442\u0430".split(" "),
"dateFormatItem-MMMMd":"d MMMM","timeFormat-medium":"HH:mm:ss","field-sun-relative+0":"\u043e\u0432\u0430\u0430 \u043d\u0435\u0434\u0435\u043b\u0430","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"\u0441\u043b\u0435\u0434\u043d\u0430\u0442\u0430 \u043d\u0435\u0434\u0435\u043b\u0430","quarters-standAlone-abbr":["\u0458\u0430\u043d-\u043c\u0430\u0440","\u0430\u043f\u0440-\u0458\u0443\u043d","\u0458\u0443\u043b-\u0441\u0435\u043f","\u043e\u043a\u0442-\u0434\u0435\u043a"],eraAbbr:["\u043f\u0440.\u043d.\u0435.",
"\u043d.\u0435."],"field-minute":"\u041c\u0438\u043d\u0443\u0442\u0430","field-dayperiod":"\u043f\u0440\u0435\u0442\u043f\u043b\u0430\u0434\u043d\u0435/\u043f\u043e\u043f\u043b\u0430\u0434\u043d\u0435","days-standAlone-abbr":"\u043d\u0435\u0434. \u043f\u043e\u043d. \u0432\u0442. \u0441\u0440\u0435. \u0447\u0435\u0442. \u043f\u0435\u0442. \u0441\u0430\u0431.".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"\u0432\u0447\u0435\u0440\u0430",
"dateFormatItem-h":"h a","dateTimeFormat-long":"{1} {0}","field-day-relative+-2":"\u0437\u0430\u0432\u0447\u0435\u0440\u0430","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E, d.M","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"\u043e\u0432\u043e\u0458 \u043f\u0435\u0442\u043e\u043a","dateFormatItem-yMMMM":"MMMM y '\u0433'.","field-fri-relative+1":"\u0441\u043b\u0435\u0434\u043d\u0438\u043e\u0442 \u043f\u0435\u0442\u043e\u043a","field-day":"\u0434\u0435\u043d","days-format-wide":"\u043d\u0435\u0434\u0435\u043b\u0430 \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a \u0432\u0442\u043e\u0440\u043d\u0438\u043a \u0441\u0440\u0435\u0434\u0430 \u0447\u0435\u0442\u0432\u0440\u0442\u043e\u043a \u043f\u0435\u0442\u043e\u043a \u0441\u0430\u0431\u043e\u0442\u0430".split(" "),
"dateFormatItem-Mdd":"dd.M","field-zone":"\u0437\u043e\u043d\u0430","dateFormatItem-y":"y '\u0433'.","months-standAlone-narrow":"\u0458\u0444\u043c\u0430\u043c\u0458\u0458\u0430\u0441\u043e\u043d\u0434".split(""),"field-year-relative+-1":"\u043c\u0438\u043d\u0430\u0442\u0430\u0442\u0430 \u0433\u043e\u0434\u0438\u043d\u0430","field-month-relative+-1":"\u043c\u0438\u043d\u0430\u0442\u0438\u043e\u0442 \u043c\u0435\u0441\u0435\u0446","dateFormatItem-hm":"h:mm a","days-format-abbr":"\u043d\u0435\u0434. \u043f\u043e\u043d. \u0432\u0442. \u0441\u0440\u0435. \u0447\u0435\u0442. \u043f\u0435\u0442. \u0441\u0430\u0431.".split(" "),
"dateFormatItem-yMMMd":"d MMM y '\u0433'.",eraNames:["\u043f\u0440.\u043d.\u0435.","\u043d.\u0435."],"days-format-narrow":"\u043d\u043f\u0432\u0441\u0447\u043f\u0441".split(""),"days-standAlone-narrow":"\u043d\u043f\u0432\u0441\u0447\u043f\u0441".split(""),"dateFormatItem-MMM":"LLL","field-month":"\u041c\u0435\u0441\u0435\u0446","field-tue-relative+0":"\u043e\u0432\u043e\u0458 \u0432\u0442\u043e\u0440\u043d\u0438\u043a","field-tue-relative+1":"\u0441\u043b\u0435\u0434\u043d\u0438\u043e\u0442 \u0432\u0442\u043e\u0440\u043d\u0438\u043a",
"dayPeriods-format-wide-am":"\u043f\u0440\u0435\u0442\u043f\u043b\u0430\u0434\u043d\u0435","dateFormatItem-MMMMEd":"E d MMMM","dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"\u043e\u0432\u043e\u0458 \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a","field-mon-relative+1":"\u0441\u043b\u0435\u0434\u043d\u0438\u043e\u0442 \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a","dateFormat-short":"dd.M.yy","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a",
"field-second":"\u0421\u0435\u043a\u0443\u043d\u0434\u0430","field-sat-relative+-1":"\u043c\u0438\u043d\u0430\u0442\u0430\u0442\u0430 \u0441\u0430\u0431\u043e\u0442\u0430","dateFormatItem-yMMMEd":"E, d MMM y '\u0433'.","field-sun-relative+-1":"\u043c\u0438\u043d\u0430\u0442\u0430\u0442\u0430 \u043d\u0435\u0434\u0435\u043b\u0430","field-month-relative+0":"\u043e\u0432\u043e\u0458 \u043c\u0435\u0441\u0435\u0446","field-month-relative+1":"\u0441\u043b\u0435\u0434\u043d\u0438\u043e\u0442 \u043c\u0435\u0441\u0435\u0446",
"dateFormatItem-Ed":"E, d","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"\u041d\u0435\u0434\u0435\u043b\u0430","dateFormat-medium":"dd.M.y","field-year-relative+0":"\u043e\u0432\u0430\u0430 \u0433\u043e\u0434\u0438\u043d\u0430","field-week-relative+-1":"\u043c\u0438\u043d\u0430\u0442\u0430\u0442\u0430 \u0441\u0435\u0434\u043c\u0438\u0446\u0430","field-year-relative+1":"\u0441\u043b\u0435\u0434\u043d\u0430\u0442\u0430 \u0433\u043e\u0434\u0438\u043d\u0430","dateTimeFormat-short":"{1} {0}",
"dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"MMM y '\u0433'. G","field-mon-relative+-1":"\u043c\u0438\u043d\u0430\u0442\u0438\u043e\u0442 \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a","field-week-relative+0":"\u043e\u0432\u0430\u0430 \u0441\u0435\u0434\u043c\u0438\u0446\u0430","field-week-relative+1":"\u0441\u043b\u0435\u0434\u043d\u0430\u0442\u0430 \u0441\u0435\u0434\u043c\u0438\u0446\u0430"})},"mw-datepicker/gregorian/nls/nb/gregorian":function(){define({"dateFormatItem-Ehm":"E h.mm a",
"days-standAlone-short":"s\u00f8. ma. ti. on. to. fr. l\u00f8.".split(" "),"months-format-narrow":"JFMAMJJASOND".split(""),"field-second-relative+0":"n\u00e5","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Ukedag","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E d.MM.y","field-wed-relative+0":"onsdag denne uken","dateFormatItem-GyMMMEd":"E d. MMM y G","dateFormatItem-MMMEd":"E d. MMM","field-wed-relative+1":"onsdag neste uke",eraNarrow:["f.Kr.","fvt.","e.Kr.","vt"],"dateFormatItem-yMM":"MM.y",
"field-tue-relative+-1":"tirsdag sist uke","days-format-short":"s\u00f8. ma. ti. on. to. fr. l\u00f8.".split(" "),"dateFormat-long":"d. MMMM y","field-fri-relative+-1":"fredag sist uke","field-wed-relative+-1":"onsdag sist uke","months-format-wide":"januar februar mars april mai juni juli august september oktober november desember".split(" "),"dateTimeFormat-medium":"{1}, {0}","dayPeriods-format-wide-pm":"p.m.","dateFormat-full":"EEEE d. MMMM y","field-thu-relative+-1":"torsdag sist uke","dateFormatItem-Md":"d.M.",
"dayPeriods-format-abbr-am":"a.m.","dateFormatItem-yMd":"d.M.y","dateFormatItem-yM":"M.y","field-era":"Tidsalder","months-standAlone-wide":"januar februar mars april mai juni juli august september oktober november desember".split(" "),"timeFormat-short":"HH.mm","quarters-format-wide":["1. kvartal","2. kvartal","3. kvartal","4. kvartal"],"timeFormat-long":"HH.mm.ss z","dateFormatItem-yMMM":"MMM y","dateFormatItem-yQQQQ":"QQQQ y","field-year":"\u00c5r","dateFormatItem-MMdd":"d.M.","field-hour":"Time",
"months-format-abbr":"jan. feb. mar. apr. mai jun. jul. aug. sep. okt. nov. des.".split(" "),"field-sat-relative+0":"l\u00f8rdag denne uken","field-sat-relative+1":"l\u00f8rdag neste uke","timeFormat-full":"HH.mm.ss zzzz","field-day-relative+0":"i dag","field-day-relative+1":"i morgen","field-thu-relative+0":"torsdag denne uken","dateFormatItem-GyMMMd":"d. MMM y G","field-day-relative+2":"i overmorgen","field-thu-relative+1":"torsdag neste uke","dateFormatItem-H":"HH","months-standAlone-abbr":"jan feb mar apr mai jun jul aug sep okt nov des".split(" "),
"quarters-format-abbr":["K1","K2","K3","K4"],"quarters-standAlone-wide":["1. kvartal","2. kvartal","3. kvartal","4. kvartal"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L.","days-standAlone-wide":"s\u00f8ndag mandag tirsdag onsdag torsdag fredag l\u00f8rdag".split(" "),"timeFormat-medium":"HH.mm.ss","field-sun-relative+0":"s\u00f8ndag denne uken","dateFormatItem-Hm":"HH.mm","quarters-standAlone-abbr":["K1","K2","K3","K4"],"field-sun-relative+1":"s\u00f8ndag neste uke",eraAbbr:["f.Kr.","e.Kr."],
"field-minute":"Minutt","field-dayperiod":"AM/PM","days-standAlone-abbr":"s\u00f8. ma. ti. on. to. fr. l\u00f8.".split(" "),"dateFormatItem-d":"d.","dateFormatItem-ms":"mm.ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"i g\u00e5r","dateFormatItem-h":"h a","dateTimeFormat-long":"{1} 'kl.' {0}","dayPeriods-format-narrow-am":"a","field-day-relative+-2":"i forg\u00e5rs","dateFormatItem-MMMd":"d. MMM","dateFormatItem-MEd":"E d.M","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"fredag denne uken",
"dateFormatItem-yMMMM":"MMMM y","field-fri-relative+1":"fredag neste uke","field-day":"Dag","days-format-wide":"s\u00f8ndag mandag tirsdag onsdag torsdag fredag l\u00f8rdag".split(" "),"field-zone":"Tidssone","dateFormatItem-y":"y","months-standAlone-narrow":"JFMAMJJASOND".split(""),"field-year-relative+-1":"I fjor","field-month-relative+-1":"Sist m\u00e5ned","dateFormatItem-hm":"h.mm a","dayPeriods-format-abbr-pm":"p.m.","days-format-abbr":"s\u00f8n. man. tir. ons. tor. fre. l\u00f8r.".split(" "),
eraNames:["f.Kr.","e.Kr."],"dateFormatItem-yMMMd":"d. MMM y","days-format-narrow":"SMTOTFL".split(""),"days-standAlone-narrow":"SMTOTFL".split(""),"dateFormatItem-MMM":"LLL","field-month":"M\u00e5ned","field-tue-relative+0":"tirsdag denne uken","field-tue-relative+1":"tirsdag neste uke","dayPeriods-format-wide-am":"a.m.","dateFormatItem-EHm":"E HH.mm","field-mon-relative+0":"mandag denne uken","field-mon-relative+1":"mandag neste uke","dateFormat-short":"dd.MM.yy","dateFormatItem-EHms":"E HH.mm.ss",
"dateFormatItem-Ehms":"E h.mm.ss a","field-second":"Sekund","field-sat-relative+-1":"l\u00f8rdag sist uke","dateFormatItem-yMMMEd":"E d. MMM y","field-sun-relative+-1":"s\u00f8ndag sist uke","field-month-relative+0":"Denne m\u00e5neden","field-month-relative+1":"Neste m\u00e5ned","dateFormatItem-Ed":"E d.","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"Uke","dateFormat-medium":"d. MMM y","field-year-relative+0":"Dette \u00e5ret","field-week-relative+-1":"Sist uke","field-year-relative+1":"Neste \u00e5r",
"dayPeriods-format-narrow-pm":"p","dateTimeFormat-short":"{1}, {0}","dateFormatItem-Hms":"HH.mm.ss","dateFormatItem-hms":"h.mm.ss a","dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"mandag sist uke","field-week-relative+0":"Denne uken","field-week-relative+1":"Neste uke"})},"mw-datepicker/gregorian/nls/nl/gregorian":function(){define({"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"zo ma di wo do vr za".split(" "),"months-format-narrow":"JFMAMJJASOND".split(""),"field-second-relative+0":"nu",
"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Dag van de week","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E d-M-y","field-wed-relative+0":"deze woensdag","dateFormatItem-GyMMMEd":"E d MMM y G","dateFormatItem-MMMEd":"E d MMM","field-wed-relative+1":"volgende week woensdag",eraNarrow:["v.C.","vgj","n.C.","gj"],"field-tue-relative+-1":"afgelopen dinsdag","days-format-short":"zo ma di wo do vr za".split(" "),"dateFormat-long":"d MMMM y","field-fri-relative+-1":"afgelopen vrijdag",
"field-wed-relative+-1":"afgelopen woensdag","months-format-wide":"januari februari maart april mei juni juli augustus september oktober november december".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"PM","dateFormat-full":"EEEE d MMMM y","field-thu-relative+-1":"afgelopen donderdag","dateFormatItem-Md":"d-M","dayPeriods-format-wide-noon":"12 uur 's middags","dateFormatItem-yMd":"d-M-y","dateFormatItem-yM":"M-y","field-era":"Tijdperk","months-standAlone-wide":"januari februari maart april mei juni juli augustus september oktober november december".split(" "),
"timeFormat-short":"HH:mm","quarters-format-wide":["1e kwartaal","2e kwartaal","3e kwartaal","4e kwartaal"],"timeFormat-long":"HH:mm:ss z","dateFormatItem-yMMM":"MMM y","dateFormatItem-yQQQQ":"QQQQ y","field-year":"Jaar","field-hour":"Uur","months-format-abbr":"jan. feb. mrt. apr. mei jun. jul. aug. sep. okt. nov. dec.".split(" "),"field-sat-relative+0":"deze zaterdag","field-sat-relative+1":"volgende week zaterdag","timeFormat-full":"HH:mm:ss zzzz","field-day-relative+0":"vandaag","field-day-relative+1":"morgen",
"field-thu-relative+0":"deze donderdag","dateFormatItem-GyMMMd":"d MMM y G","field-day-relative+2":"overmorgen","field-thu-relative+1":"volgende week donderdag","dateFormatItem-H":"HH","months-standAlone-abbr":"jan feb mrt apr mei jun jul aug sep okt nov dec".split(" "),"quarters-format-abbr":["K1","K2","K3","K4"],"quarters-standAlone-wide":["1e kwartaal","2e kwartaal","3e kwartaal","4e kwartaal"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"zondag maandag dinsdag woensdag donderdag vrijdag zaterdag".split(" "),
"dateFormatItem-MMMMd":"d MMMM","dayPeriods-format-abbr-noon":"12 uur 's middags","timeFormat-medium":"HH:mm:ss","field-sun-relative+0":"deze zondag","dateFormatItem-Hm":"HH:mm","quarters-standAlone-abbr":["K1","K2","K3","K4"],"field-sun-relative+1":"volgende week zondag",eraAbbr:["v.Chr.","n.Chr."],"field-minute":"Minuut","field-dayperiod":"AM/PM","days-standAlone-abbr":"zo ma di wo do vr za".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],
"field-day-relative+-1":"gisteren","dateFormatItem-h":"h a","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"AM","field-day-relative+-2":"eergisteren","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E d-M","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"deze vrijdag","dateFormatItem-yMMMM":"MMMM y","field-fri-relative+1":"volgende week vrijdag","field-day":"Dag","days-format-wide":"zondag maandag dinsdag woensdag donderdag vrijdag zaterdag".split(" "),"field-zone":"Zone",
"dateFormatItem-y":"y","months-standAlone-narrow":"JFMAMJJASOND".split(""),"field-year-relative+-1":"vorig jaar","field-month-relative+-1":"vorige maand","dateFormatItem-hm":"h:mm a","days-format-abbr":"zo ma di wo do vr za".split(" "),eraNames:["Voor Christus","v\u00f3\u00f3r gewone jaartelling","na Christus","gewone jaartelling"],"dateFormatItem-yMMMd":"d MMM y","days-format-narrow":"ZMDWDVZ".split(""),"days-standAlone-narrow":"ZMDWDVZ".split(""),"dateFormatItem-MMM":"LLL","field-month":"Maand",
"field-tue-relative+0":"deze dinsdag","field-tue-relative+1":"volgende week dinsdag","dayPeriods-format-wide-am":"AM","dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"deze maandag","field-mon-relative+1":"volgende week maandag","dateFormat-short":"dd-MM-yy","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","dayPeriods-format-narrow-noon":"n","field-second":"Seconde","field-sat-relative+-1":"afgelopen zaterdag","dateFormatItem-yMMMEd":"E d MMM y","field-sun-relative+-1":"afgelopen zondag",
"field-month-relative+0":"deze maand","field-month-relative+1":"volgende maand","dateFormatItem-Ed":"E d","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"Week","dateFormat-medium":"d MMM y","field-year-relative+0":"dit jaar","field-week-relative+-1":"vorige week","field-year-relative+1":"volgend jaar","dayPeriods-format-narrow-pm":"PM","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"afgelopen maandag",
"field-week-relative+0":"deze week","field-week-relative+1":"volgende week"})},"mw-datepicker/gregorian/nls/pl/gregorian":function(){define({"dateFormatItem-Ehm":"E, h:mm a","days-standAlone-short":"niedz. pon. wt. \u015br. czw. pt. sob.".split(" "),"months-format-narrow":"slmkmclswplg".split(""),"field-second-relative+0":"teraz","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"dzie\u0144 tygodnia","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E, d.MM.y","field-wed-relative+0":"w t\u0119 \u015brod\u0119",
"field-wed-relative+1":"w przysz\u0142\u0105 \u015brod\u0119","dateFormatItem-GyMMMEd":"E, d MMM y G","dateFormatItem-MMMEd":"E, d MMM",eraNarrow:["p.n.e.","n.e."],"dateFormatItem-yMM":"MM.y","field-tue-relative+-1":"w zesz\u0142y wtorek","dayPeriods-format-wide-earlyMorning":"nad ranem","dayPeriods-format-wide-morning":"rano","days-format-short":"niedz. pon. wt. \u015br. czw. pt. sob.".split(" "),"dateFormat-long":"d MMMM y","field-fri-relative+-1":"w zesz\u0142y pi\u0105tek","field-wed-relative+-1":"w zesz\u0142\u0105 \u015brod\u0119",
"months-format-wide":"stycznia lutego marca kwietnia maja czerwca lipca sierpnia wrze\u015bnia pa\u017adziernika listopada grudnia".split(" "),"dayPeriods-format-wide-evening":"wieczorem","dateTimeFormat-medium":"{1}, {0}","dayPeriods-format-wide-pm":"PM","dateFormat-full":"EEEE, d MMMM y","field-thu-relative+-1":"w zesz\u0142y czwartek","dateFormatItem-Md":"d.MM","dayPeriods-format-wide-noon":"w po\u0142udnie","dateFormatItem-yMd":"d.MM.y","field-era":"era","dateFormatItem-yM":"MM.y","months-standAlone-wide":"stycze\u0144 luty marzec kwiecie\u0144 maj czerwiec lipiec sierpie\u0144 wrzesie\u0144 pa\u017adziernik listopad grudzie\u0144".split(" "),
"timeFormat-short":"HH:mm","quarters-format-wide":["I kwarta\u0142","II kwarta\u0142","III kwarta\u0142","IV kwarta\u0142"],"dateFormatItem-yQQQQ":"QQQQ y","timeFormat-long":"HH:mm:ss z","field-year":"rok","dateFormatItem-yMMM":"LLL y","field-hour":"godzina","dateFormatItem-MMdd":"d.MM","months-format-abbr":"sty lut mar kwi maj cze lip sie wrz pa\u017a lis gru".split(" "),"field-sat-relative+0":"w t\u0119 sobot\u0119","field-sat-relative+1":"w przysz\u0142\u0105 sobot\u0119","timeFormat-full":"HH:mm:ss zzzz",
"field-day-relative+0":"dzisiaj","field-thu-relative+0":"w ten czwartek","field-day-relative+1":"jutro","field-thu-relative+1":"w przysz\u0142y czwartek","dateFormatItem-GyMMMd":"d MMM y G","field-day-relative+2":"pojutrze","dateFormatItem-H":"HH","months-standAlone-abbr":"sty lut mar kwi maj cze lip sie wrz pa\u017a lis gru".split(" "),"quarters-format-abbr":["K1","K2","K3","K4"],"quarters-standAlone-wide":["I kwarta\u0142","II kwarta\u0142","III kwarta\u0142","IV kwarta\u0142"],"dateFormatItem-Gy":"y G",
"dateFormatItem-M":"L","days-standAlone-wide":"niedziela poniedzia\u0142ek wtorek \u015broda czwartek pi\u0105tek sobota".split(" "),"dateFormatItem-MMMMd":"d MMMM","timeFormat-medium":"HH:mm:ss","field-sun-relative+0":"w t\u0119 niedziel\u0119","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"w przysz\u0142\u0105 niedziel\u0119","quarters-standAlone-abbr":["1 kw.","2 kw.","3 kw.","4 kw."],eraAbbr:["p.n.e.","n.e."],"field-minute":"minuta","field-dayperiod":"rano / po po\u0142udniu / wieczorem",
"days-standAlone-abbr":"niedz. pon. wt. \u015br. czw. pt. sob.".split(" "),"dayPeriods-format-wide-night":"w nocy","dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"wczoraj","dateFormatItem-h":"h a","dateTimeFormat-long":"{1} {0}","field-day-relative+-2":"przedwczoraj","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E, d.MM","dayPeriods-format-wide-lateMorning":"przed po\u0142udniem","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"w ten pi\u0105tek",
"dateFormatItem-yMMMM":"LLLL y","field-fri-relative+1":"w przysz\u0142y pi\u0105tek","field-day":"dzie\u0144","days-format-wide":"niedziela poniedzia\u0142ek wtorek \u015broda czwartek pi\u0105tek sobota".split(" "),"field-zone":"strefa czasowa","dateFormatItem-y":"y","months-standAlone-narrow":"slmkmclswplg".split(""),"field-year-relative+-1":"w zesz\u0142ym roku","field-month-relative+-1":"w zesz\u0142ym miesi\u0105cu","dateFormatItem-hm":"h:mm a","days-format-abbr":"niedz. pon. wt. \u015br. czw. pt. sob.".split(" "),
eraNames:["p.n.e.","n.e."],"dateFormatItem-yMMMd":"d MMM y","days-format-narrow":"NPW\u015aCPS".split(""),"days-standAlone-narrow":"NPW\u015aCPS".split(""),"dateFormatItem-MMM":"LLL","field-month":"miesi\u0105c","field-tue-relative+0":"w ten wtorek","field-tue-relative+1":"w przysz\u0142y wtorek","dayPeriods-format-wide-am":"AM","dateFormatItem-EHm":"E, HH:mm","field-mon-relative+0":"w ten poniedzia\u0142ek","field-mon-relative+1":"w przysz\u0142y poniedzia\u0142ek","dateFormat-short":"dd.MM.y","dayPeriods-format-wide-afternoon":"po po\u0142udniu",
"dateFormatItem-EHms":"E, HH:mm:ss","dateFormatItem-Ehms":"E, h:mm:ss a","field-second":"sekunda","field-sat-relative+-1":"w zesz\u0142\u0105 sobot\u0119","dateFormatItem-yMMMEd":"E, d MMM y","field-sun-relative+-1":"w zesz\u0142\u0105 niedziel\u0119","field-month-relative+0":"w tym miesi\u0105cu","field-month-relative+1":"w przysz\u0142ym miesi\u0105cu","dateFormatItem-Ed":"E, d","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"tydzie\u0144","dateFormat-medium":"d MMM y","field-year-relative+0":"w tym roku",
"field-week-relative+-1":"Zesz\u0142y tydzie\u0144","field-year-relative+1":"w przysz\u0142ym roku","dateTimeFormat-short":"{1}, {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"w zesz\u0142y poniedzia\u0142ek","field-week-relative+0":"w tym tygodniu","field-week-relative+1":"w przysz\u0142ym tygodniu"})},"mw-datepicker/gregorian/nls/pt/gregorian":function(){define({"dateFormatItem-Ehm":"E, h:mm a","days-standAlone-short":"dom seg ter qua qui sex s\u00e1b".split(" "),
"months-format-narrow":"JFMAMJJASOND".split(""),"field-second-relative+0":"agora","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Dia da semana","dateFormatItem-yQQQ":"y QQQ","dateFormatItem-yMEd":"E, dd/MM/y","field-wed-relative+0":"esta quarta-feira","field-wed-relative+1":"pr\u00f3xima quarta-feira","dateFormatItem-GyMMMEd":"E, d 'de' MMM 'de' y G","dateFormatItem-MMMEd":"E, d 'de' MMM",eraNarrow:["a.C.","d.C."],"dateFormatItem-yMM":"MM/y","field-tue-relative+-1":"ter\u00e7a-feira passada",
"dayPeriods-format-wide-morning":"manh\u00e3","days-format-short":"dom seg ter qua qui sex s\u00e1b".split(" "),"dateFormat-long":"d 'de' MMMM 'de' y","field-fri-relative+-1":"sexta-feira passada","field-wed-relative+-1":"quarta-feira passada","months-format-wide":"janeiro fevereiro mar\u00e7o abril maio junho julho agosto setembro outubro novembro dezembro".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"PM","dateFormat-full":"EEEE, d 'de' MMMM 'de' y","field-thu-relative+-1":"quinta-feira passada",
"dateFormatItem-Md":"d/M","dayPeriods-format-abbr-am":"AM","dayPeriods-format-wide-noon":"meio-dia","dateFormatItem-yMd":"dd/MM/y","field-era":"Era","dateFormatItem-yM":"MM/y","months-standAlone-wide":"janeiro fevereiro mar\u00e7o abril maio junho julho agosto setembro outubro novembro dezembro".split(" "),"timeFormat-short":"HH:mm","quarters-format-wide":["1\u00ba trimestre","2\u00ba trimestre","3\u00ba trimestre","4\u00ba trimestre"],"dateFormatItem-yQQQQ":"y QQQQ","timeFormat-long":"HH:mm:ss z",
"field-year":"Ano","dateFormatItem-yMMM":"MMM 'de' y","field-hour":"Hora","dateFormatItem-MMdd":"dd/MM","months-format-abbr":"jan fev mar abr mai jun jul ago set out nov dez".split(" "),"field-sat-relative+0":"este s\u00e1bado","field-sat-relative+1":"pr\u00f3ximo s\u00e1bado","timeFormat-full":"HH:mm:ss zzzz","field-day-relative+0":"hoje","field-thu-relative+0":"esta quinta-feira","field-day-relative+1":"amanh\u00e3","field-thu-relative+1":"pr\u00f3xima quinta-feira","dateFormatItem-GyMMMd":"d 'de' MMM 'de' y G",
"field-day-relative+2":"depois de amanh\u00e3","dateFormatItem-H":"HH","months-standAlone-abbr":"jan fev mar abr mai jun jul ago set out nov dez".split(" "),"quarters-format-abbr":["T1","T2","T3","T4"],"quarters-standAlone-wide":["1\u00ba trimestre","2\u00ba trimestre","3\u00ba trimestre","4\u00ba trimestre"],"dateFormatItem-Gy":"y G","dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-M":"L","days-standAlone-wide":"domingo segunda-feira ter\u00e7a-feira quarta-feira quinta-feira sexta-feira s\u00e1bado".split(" "),
"timeFormat-medium":"HH:mm:ss","field-sun-relative+0":"este domingo","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"pr\u00f3ximo domingo","quarters-standAlone-abbr":["T1","T2","T3","T4"],eraAbbr:["a.C.","d.C."],"field-minute":"Minuto","field-dayperiod":"Per\u00edodo do dia","days-standAlone-abbr":"dom seg ter qua qui sex s\u00e1b".split(" "),"dayPeriods-format-wide-night":"noite","dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"ontem",
"dateFormatItem-h":"h a","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"a","field-day-relative+-2":"anteontem","dateFormatItem-MMMd":"d 'de' MMM","dateFormatItem-MEd":"E, dd/MM","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"esta sexta-feira","field-fri-relative+1":"pr\u00f3xima sexta-feira","field-day":"Dia","days-format-wide":"domingo segunda-feira ter\u00e7a-feira quarta-feira quinta-feira sexta-feira s\u00e1bado".split(" "),"field-zone":"Fuso","dateFormatItem-y":"y","months-standAlone-narrow":"JFMAMJJASOND".split(""),
"field-year-relative+-1":"ano passado","field-month-relative+-1":"m\u00eas passado","dateFormatItem-hm":"h:mm a","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"dom seg ter qua qui sex s\u00e1b".split(" "),eraNames:["Antes de Cristo","Ano do Senhor"],"dateFormatItem-yMMMd":"d 'de' MMM 'de' y","days-format-narrow":"DSTQQSS".split(""),"days-standAlone-narrow":"DSTQQSS".split(""),"dateFormatItem-MMM":"LLL","field-month":"M\u00eas","dateFormatItem-HHmm":"HH:mm","field-tue-relative+0":"esta ter\u00e7a-feira",
"field-tue-relative+1":"pr\u00f3xima ter\u00e7a-feira","dayPeriods-format-wide-am":"AM","dateFormatItem-EHm":"E, HH:mm","field-mon-relative+0":"esta segunda-feira","field-mon-relative+1":"pr\u00f3xima segunda-feira","dateFormat-short":"dd/MM/yy","dayPeriods-format-wide-afternoon":"tarde","dateFormatItem-EHms":"E, HH:mm:ss","dateFormatItem-Ehms":"E, h:mm:ss a","field-second":"Segundo","field-sat-relative+-1":"s\u00e1bado passado","dateFormatItem-yMMMEd":"E, d 'de' MMM 'de' y","field-sun-relative+-1":"domingo passado",
"field-month-relative+0":"este m\u00eas","field-month-relative+1":"pr\u00f3ximo m\u00eas","dateFormatItem-Ed":"E, d","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"Semana","dateFormat-medium":"dd/MM/y","field-year-relative+0":"este ano","field-week-relative+-1":"semana passada","field-year-relative+1":"pr\u00f3ximo ano","dayPeriods-format-narrow-pm":"p","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"MMM 'de' y G",
"field-mon-relative+-1":"segunda-feira passada","field-week-relative+0":"esta semana","field-week-relative+1":"pr\u00f3xima semana"})},"mw-datepicker/gregorian/nls/pt-pt/gregorian":function(){define({"dateFormatItem-Ehm":"E, h:mm a","days-standAlone-short":"do sg te qu qi sx sb".split(" "),"months-format-narrow":"JFMAMJJASOND".split(""),"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Dia da semana","dateFormatItem-yQQQ":"QQQQ 'de' y","dateFormatItem-yMEd":"E, dd/MM/y","field-wed-relative+0":"esta quarta-feira",
"field-wed-relative+1":"pr\u00f3xima quarta-feira","dateFormatItem-GyMMMEd":"E, d 'de' MMM 'de' y G","dateFormatItem-MMMEd":"E, d/MM",eraNarrow:["a.C.","d.C."],"dateFormatItem-yMM":"MM/y","field-tue-relative+-1":"ter\u00e7a-feira passada","days-format-short":"do sg te qu qi sx sb".split(" "),"dateFormat-long":"d 'de' MMMM 'de' y","field-fri-relative+-1":"sexta-feira passada","field-wed-relative+-1":"quarta-feira passada","months-format-wide":"Janeiro Fevereiro Mar\u00e7o Abril Maio Junho Julho Agosto Setembro Outubro Novembro Dezembro".split(" "),
"dateTimeFormat-medium":"{1}, {0}","dateFormatItem-yMMMMd":"d 'de' MMMM 'de' y","dayPeriods-format-wide-pm":"da tarde","dateFormat-full":"EEEE, d 'de' MMMM 'de' y","field-thu-relative+-1":"quinta-feira passada","dateFormatItem-Md":"d/M","dayPeriods-standAlone-wide-pm":"p.m.","dayPeriods-format-abbr-am":"a.m.","dateFormatItem-yMd":"dd/MM/y","field-era":"Era","dateFormatItem-yM":"MM/y","months-standAlone-wide":"Janeiro Fevereiro Mar\u00e7o Abril Maio Junho Julho Agosto Setembro Outubro Novembro Dezembro".split(" "),
"timeFormat-short":"HH:mm","dayPeriods-standAlone-abbr-am":"a.m.","quarters-format-wide":["1.\u00ba trimestre","2.\u00ba trimestre","3.\u00ba trimestre","4.\u00ba trimestre"],"dateFormatItem-yQQQQ":"QQQQ 'de' y","timeFormat-long":"HH:mm:ss z","field-year":"Ano","dateFormatItem-yMMM":"MM/y","field-hour":"Hora","dateFormatItem-MMdd":"dd/MM","months-format-abbr":"Jan Fev Mar Abr Mai Jun Jul Ago Set Out Nov Dez".split(" "),"field-sat-relative+0":"este s\u00e1bado","field-sat-relative+1":"pr\u00f3ximo s\u00e1bado",
"timeFormat-full":"HH:mm:ss zzzz","field-day-relative+0":"hoje","field-thu-relative+0":"esta quinta-feira","field-day-relative+1":"amanh\u00e3","field-thu-relative+1":"pr\u00f3xima quinta-feira","dateFormatItem-GyMMMd":"d 'de' MMM 'de' y G","field-day-relative+2":"depois de amanh\u00e3","dateFormatItem-H":"HH","months-standAlone-abbr":"Jan Fev Mar Abr Mai Jun Jul Ago Set Out Nov Dez".split(" "),"quarters-format-abbr":["T1","T2","T3","T4"],"quarters-standAlone-wide":["1.\u00ba trimestre","2.\u00ba trimestre",
"3.\u00ba trimestre","4.\u00ba trimestre"],"dateFormatItem-Gy":"y G","dateFormatItem-HHmmss":"HH:mm:ss","dateFormatItem-M":"L","days-standAlone-wide":"domingo segunda-feira ter\u00e7a-feira quarta-feira quinta-feira sexta-feira s\u00e1bado".split(" "),"dateFormatItem-MMMMd":"d 'de' MMMM","dateFormatItem-yMMMEEEEd":"EEEE, d/MM/y","timeFormat-medium":"HH:mm:ss","field-sun-relative+0":"este domingo","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"pr\u00f3ximo domingo","quarters-standAlone-abbr":["T1",
"T2","T3","T4"],eraAbbr:["a.C.","d.C."],"field-minute":"Minuto","field-dayperiod":"Da manh\u00e3/da tarde","days-standAlone-abbr":"dom seg ter qua qui sex s\u00e1b".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"ontem","dateFormatItem-h":"h a","dateTimeFormat-long":"{1} '\u00e0s' {0}","dayPeriods-format-narrow-am":"a.m.","field-day-relative+-2":"anteontem","dateFormatItem-MMMd":"d/MM","dateFormatItem-MEd":"E, dd/MM",
"dateTimeFormat-full":"{1} '\u00e0s' {0}","field-fri-relative+0":"esta sexta-feira","dateFormatItem-yMMMM":"MMMM 'de' y","field-fri-relative+1":"pr\u00f3xima sexta-feira","field-day":"Dia","days-format-wide":"domingo segunda-feira ter\u00e7a-feira quarta-feira quinta-feira sexta-feira s\u00e1bado".split(" "),"field-zone":"Fuso hor\u00e1rio","months-standAlone-narrow":"JFMAMJJASOND".split(""),"dateFormatItem-y":"y","field-year-relative+-1":"ano passado","field-month-relative+-1":"m\u00eas passado",
"dateFormatItem-hm":"h:mm a","dayPeriods-format-abbr-pm":"p.m.","days-format-abbr":"dom seg ter qua qui sex s\u00e1b".split(" "),"dayPeriods-standAlone-abbr-pm":"p.m.","dateFormatItem-yMMMd":"d/MM/y",eraNames:["a.C.","d.C."],"days-format-narrow":"DSTQQSS".split(""),"days-standAlone-narrow":"DSTQQSS".split(""),"dateFormatItem-MMM":"LLL","field-month":"M\u00eas","dateFormatItem-HHmm":"HH:mm","field-tue-relative+0":"esta ter\u00e7a-feira","field-tue-relative+1":"pr\u00f3xima ter\u00e7a-feira","dayPeriods-format-wide-am":"da manh\u00e3",
"dayPeriods-standAlone-wide-am":"a.m.","dateFormatItem-MMMMEd":"E, d 'de' MMMM","dateFormatItem-EHm":"E, HH:mm","field-mon-relative+0":"esta segunda-feira","field-mon-relative+1":"pr\u00f3xima segunda-feira","dateFormat-short":"dd/MM/yy","dateFormatItem-EHms":"E, HH:mm:ss","dateFormatItem-yMMMMEd":"E, d 'de' MMMM 'de' y","dateFormatItem-Ehms":"E, h:mm:ss a","field-second":"Segundo","field-sat-relative+-1":"s\u00e1bado passado","dateFormatItem-yMMMEd":"E, d/MM/y","field-sun-relative+-1":"domingo passado",
"field-month-relative+0":"este m\u00eas","field-month-relative+1":"pr\u00f3ximo m\u00eas","dateFormatItem-Ed":"E, d","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"Semana","dateFormat-medium":"dd/MM/y","field-year-relative+0":"este ano","field-week-relative+-1":"semana passada","field-year-relative+1":"pr\u00f3ximo ano","dayPeriods-format-narrow-pm":"p.m.","dateTimeFormat-short":"{1}, {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"MMM 'de' y G",
"field-mon-relative+-1":"segunda-feira passada","field-week-relative+0":"esta semana","field-week-relative+1":"pr\u00f3xima semana"})},"mw-datepicker/gregorian/nls/ro/gregorian":function(){define({"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"Du Lu Ma Mi Jo Vi S\u00e2".split(" "),"months-format-narrow":"IFMAMIIASOND".split(""),"field-second-relative+0":"acum","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"zi a s\u0103pt\u0103m\u00e2nii","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E, dd.MM.y",
"field-wed-relative+0":"miercurea aceasta","field-wed-relative+1":"miercurea viitoare","dateFormatItem-GyMMMEd":"E, d MMM y G","dateFormatItem-MMMEd":"E, d MMM",eraNarrow:["\u00ee.Hr.","\u00ee.e.n","d.Hr.","e.n."],"dateFormatItem-yMM":"MM.y","field-tue-relative+-1":"mar\u021bea trecut\u0103","days-format-short":"Du Lu Ma Mi Jo Vi S\u00e2".split(" "),"dateFormat-long":"d MMMM y","field-fri-relative+-1":"vinerea trecut\u0103","field-wed-relative+-1":"miercurea trecut\u0103","months-format-wide":"ianuarie februarie martie aprilie mai iunie iulie august septembrie octombrie noiembrie decembrie".split(" "),
"dateTimeFormat-medium":"{1}, {0}","dayPeriods-format-wide-pm":"p.m.","dateFormat-full":"EEEE, d MMMM y","field-thu-relative+-1":"joia trecut\u0103","dateFormatItem-Md":"dd.MM","dateFormatItem-yMd":"dd.MM.y","field-era":"er\u0103","dateFormatItem-yM":"MM.y","months-standAlone-wide":"ianuarie februarie martie aprilie mai iunie iulie august septembrie octombrie noiembrie decembrie".split(" "),"timeFormat-short":"HH:mm","quarters-format-wide":["trimestrul I","trimestrul al II-lea","trimestrul al III-lea",
"trimestrul al IV-lea"],"dateFormatItem-yQQQQ":"QQQQ y","timeFormat-long":"HH:mm:ss z","field-year":"an","dateFormatItem-yMMM":"MMM y","field-hour":"or\u0103","dateFormatItem-MMdd":"dd.MM","months-format-abbr":"ian. feb. mar. apr. mai iun. iul. aug. sept. oct. nov. dec.".split(" "),"field-sat-relative+0":"s\u00e2mb\u0103ta aceasta","field-sat-relative+1":"s\u00e2mb\u0103ta viitoare","timeFormat-full":"HH:mm:ss zzzz","field-day-relative+0":"azi","field-thu-relative+0":"joia aceasta","field-day-relative+1":"m\u00e2ine",
"field-thu-relative+1":"joia viitoare","dateFormatItem-GyMMMd":"d MMM y G","field-day-relative+2":"poim\u00e2ine","dateFormatItem-H":"HH","months-standAlone-abbr":"ian. feb. mar. apr. mai iun. iul. aug. sept. oct. nov. dec.".split(" "),"quarters-format-abbr":["trim. I","trim. II","trim. III","trim. IV"],"quarters-standAlone-wide":["trimestrul I","trimestrul al II-lea","trimestrul al III-lea","trimestrul al IV-lea"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"duminic\u0103 luni mar\u021bi miercuri joi vineri s\u00e2mb\u0103t\u0103".split(" "),
"dateFormatItem-MMMMd":"d MMMM","timeFormat-medium":"HH:mm:ss","field-sun-relative+0":"duminica aceasta","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"duminica viitoare","quarters-standAlone-abbr":["T1","T2","T3","T4"],eraAbbr:["\u00ee.Hr.","\u00ee.e.n","d.Hr.","e.n."],"field-minute":"minut","field-dayperiod":"a.m./p.m","days-standAlone-abbr":"Dum Lun Mar Mie Joi Vin S\u00e2m".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"ieri",
"dateFormatItem-h":"h a","dateTimeFormat-long":"{1}, {0}","field-day-relative+-2":"alalt\u0103ieri","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E, dd.MM","dateTimeFormat-full":"{1}, {0}","field-fri-relative+0":"vinerea aceasta","dateFormatItem-yMMMM":"MMMM y","field-fri-relative+1":"vinerea viitoare","field-day":"zi","days-format-wide":"duminic\u0103 luni mar\u021bi miercuri joi vineri s\u00e2mb\u0103t\u0103".split(" "),"field-zone":"fus orar","dateFormatItem-y":"y","months-standAlone-narrow":"IFMAMIIASOND".split(""),
"field-year-relative+-1":"anul trecut","field-month-relative+-1":"luna trecut\u0103","dateFormatItem-hm":"h:mm a","days-format-abbr":"Dum Lun Mar Mie Joi Vin S\u00e2m".split(" "),"dateFormatItem-yMMMd":"d MMM y",eraNames:["\u00eenainte de Hristos","dup\u0103 Hristos","d.Hr.","e.n."],"days-format-narrow":"DLMMJVS".split(""),"days-standAlone-narrow":"DLMMJVS".split(""),"dateFormatItem-MMM":"LLL","field-month":"lun\u0103","field-tue-relative+0":"mar\u021bea aceasta","field-tue-relative+1":"mar\u021bea viitoare",
"dayPeriods-format-wide-am":"a.m.","dateFormatItem-MMMMEd":"E, d MMMM","dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"lunea aceasta","field-mon-relative+1":"lunea viitoare","dateFormat-short":"dd.MM.y","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","field-second":"secund\u0103","field-sat-relative+-1":"s\u00e2mb\u0103ta trecut\u0103","dateFormatItem-yMMMEd":"E, d MMM y","field-sun-relative+-1":"duminica trecut\u0103","field-month-relative+0":"luna aceasta","field-month-relative+1":"luna viitoare",
"dateFormatItem-Ed":"E d","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"s\u0103pt\u0103m\u00e2n\u0103","dateFormat-medium":"d MMM y","field-year-relative+0":"anul acesta","field-week-relative+-1":"s\u0103pt\u0103m\u00e2na trecut\u0103","field-year-relative+1":"anul viitor","dateTimeFormat-short":"{1}, {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"lunea trecut\u0103","field-week-relative+0":"s\u0103pt\u0103m\u00e2na aceasta",
"field-week-relative+1":"s\u0103pt\u0103m\u00e2na viitoare"})},"mw-datepicker/gregorian/nls/ru/gregorian":function(){define({"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"\u0432\u0441 \u043f\u043d \u0432\u0442 \u0441\u0440 \u0447\u0442 \u043f\u0442 \u0441\u0431".split(" "),"months-format-narrow":"\u042f\u0424\u041c\u0410\u041c\u0418\u0418\u0410\u0421\u041e\u041d\u0414".split(""),"field-second-relative+0":"\u0441\u0435\u0439\u0447\u0430\u0441","quarters-standAlone-narrow":["1","2","3","4"],
"field-weekday":"\u0414\u0435\u043d\u044c \u043d\u0435\u0434\u0435\u043b\u0438","dateFormatItem-yQQQ":"QQQ y '\u0433'.","dateFormatItem-yMEd":"ccc, d.MM.y '\u0433'.","field-wed-relative+0":"\u0432 \u044d\u0442\u0443 \u0441\u0440\u0435\u0434\u0443","dateFormatItem-GyMMMEd":"E, d MMM y G","dateFormatItem-MMMEd":"ccc, d MMM","field-wed-relative+1":"\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0440\u0435\u0434\u0443",eraNarrow:["\u0434\u043e \u043d.\u044d.","\u043d.\u044d."],
"dateFormatItem-yMM":"MM.y","field-tue-relative+-1":"\u0432 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0432\u0442\u043e\u0440\u043d\u0438\u043a","days-format-short":"\u0432\u0441 \u043f\u043d \u0432\u0442 \u0441\u0440 \u0447\u0442 \u043f\u0442 \u0441\u0431".split(" "),"dateFormat-long":"d MMMM y '\u0433'.","field-fri-relative+-1":"\u0432 \u043f\u0440\u043e\u0448\u043b\u0443\u044e \u043f\u044f\u0442\u043d\u0438\u0446\u0443","field-wed-relative+-1":"\u0432 \u043f\u0440\u043e\u0448\u043b\u0443\u044e \u0441\u0440\u0435\u0434\u0443",
"months-format-wide":"\u044f\u043d\u0432\u0430\u0440\u044f \u0444\u0435\u0432\u0440\u0430\u043b\u044f \u043c\u0430\u0440\u0442\u0430 \u0430\u043f\u0440\u0435\u043b\u044f \u043c\u0430\u044f \u0438\u044e\u043d\u044f \u0438\u044e\u043b\u044f \u0430\u0432\u0433\u0443\u0441\u0442\u0430 \u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f \u043e\u043a\u0442\u044f\u0431\u0440\u044f \u043d\u043e\u044f\u0431\u0440\u044f \u0434\u0435\u043a\u0430\u0431\u0440\u044f".split(" "),"dateTimeFormat-medium":"{1}, {0}",
"dayPeriods-format-wide-pm":"PM","dateFormat-full":"EEEE, d MMMM y '\u0433'.","field-thu-relative+-1":"\u0432 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u0447\u0435\u0442\u0432\u0435\u0440\u0433","dateFormatItem-Md":"dd.MM","dayPeriods-format-abbr-am":"AM","dateFormatItem-yMd":"dd.MM.y","dateFormatItem-yM":"MM.y","field-era":"\u042d\u0440\u0430","months-standAlone-wide":"\u042f\u043d\u0432\u0430\u0440\u044c \u0424\u0435\u0432\u0440\u0430\u043b\u044c \u041c\u0430\u0440\u0442 \u0410\u043f\u0440\u0435\u043b\u044c \u041c\u0430\u0439 \u0418\u044e\u043d\u044c \u0418\u044e\u043b\u044c \u0410\u0432\u0433\u0443\u0441\u0442 \u0421\u0435\u043d\u0442\u044f\u0431\u0440\u044c \u041e\u043a\u0442\u044f\u0431\u0440\u044c \u041d\u043e\u044f\u0431\u0440\u044c \u0414\u0435\u043a\u0430\u0431\u0440\u044c".split(" "),
"timeFormat-short":"H:mm","quarters-format-wide":["1-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b","2-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b","3-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b","4-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b"],"timeFormat-long":"H:mm:ss z","dateFormatItem-yMMM":"LLL y","dateFormatItem-yQQQQ":"QQQQ y '\u0433'.","field-year":"\u0413\u043e\u0434","dateFormatItem-MMdd":"dd.MM","field-hour":"\u0427\u0430\u0441","months-format-abbr":"\u044f\u043d\u0432. \u0444\u0435\u0432\u0440. \u043c\u0430\u0440\u0442\u0430 \u0430\u043f\u0440. \u043c\u0430\u044f \u0438\u044e\u043d\u044f \u0438\u044e\u043b\u044f \u0430\u0432\u0433. \u0441\u0435\u043d\u0442. \u043e\u043a\u0442. \u043d\u043e\u044f\u0431. \u0434\u0435\u043a.".split(" "),
"field-sat-relative+0":"\u0432 \u044d\u0442\u0443 \u0441\u0443\u0431\u0431\u043e\u0442\u0443","field-sat-relative+1":"\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u0441\u0443\u0431\u0431\u043e\u0442\u0443","timeFormat-full":"H:mm:ss zzzz","dateFormatItem-E":"ccc","field-day-relative+0":"\u0441\u0435\u0433\u043e\u0434\u043d\u044f","field-day-relative+1":"\u0437\u0430\u0432\u0442\u0440\u0430","field-thu-relative+0":"\u0432 \u044d\u0442\u043e\u0442 \u0447\u0435\u0442\u0432\u0435\u0440\u0433",
"dateFormatItem-GyMMMd":"d MMM y '\u0433'. G","field-day-relative+2":"\u043f\u043e\u0441\u043b\u0435\u0437\u0430\u0432\u0442\u0440\u0430","field-thu-relative+1":"\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0447\u0435\u0442\u0432\u0435\u0440\u0433","dateFormatItem-H":"H","months-standAlone-abbr":"\u042f\u043d\u0432. \u0424\u0435\u0432\u0440. \u041c\u0430\u0440\u0442 \u0410\u043f\u0440. \u041c\u0430\u0439 \u0418\u044e\u043d\u044c \u0418\u044e\u043b\u044c \u0410\u0432\u0433. \u0421\u0435\u043d\u0442. \u041e\u043a\u0442. \u041d\u043e\u044f\u0431. \u0414\u0435\u043a.".split(" "),
"quarters-format-abbr":["1-\u0439 \u043a\u0432.","2-\u0439 \u043a\u0432.","3-\u0439 \u043a\u0432.","4-\u0439 \u043a\u0432."],"quarters-standAlone-wide":["1-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b","2-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b","3-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b","4-\u0439 \u043a\u0432\u0430\u0440\u0442\u0430\u043b"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"\u0412\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435 \u041f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a \u0412\u0442\u043e\u0440\u043d\u0438\u043a \u0421\u0440\u0435\u0434\u0430 \u0427\u0435\u0442\u0432\u0435\u0440\u0433 \u041f\u044f\u0442\u043d\u0438\u0446\u0430 \u0421\u0443\u0431\u0431\u043e\u0442\u0430".split(" "),
"dateFormatItem-yLLLL":"LLLL y","timeFormat-medium":"H:mm:ss","field-sun-relative+0":"\u0432 \u044d\u0442\u043e \u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435","dateFormatItem-Hm":"H:mm","quarters-standAlone-abbr":["1-\u0439 \u043a\u0432.","2-\u0439 \u043a\u0432.","3-\u0439 \u043a\u0432.","4-\u0439 \u043a\u0432."],"field-sun-relative+1":"\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435",eraAbbr:["\u0434\u043e \u043d. \u044d.",
"\u043d. \u044d."],"field-minute":"\u041c\u0438\u043d\u0443\u0442\u0430","field-dayperiod":"\u0414\u041f/\u041f\u041f","days-standAlone-abbr":"\u0412\u0441 \u041f\u043d \u0412\u0442 \u0421\u0440 \u0427\u0442 \u041f\u0442 \u0421\u0431".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"\u0432\u0447\u0435\u0440\u0430","dateFormatItem-h":"h a","dateTimeFormat-long":"{1}, {0}","dayPeriods-format-narrow-am":"AM","field-day-relative+-2":"\u043f\u043e\u0437\u0430\u0432\u0447\u0435\u0440\u0430",
"dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E, dd.MM","dateTimeFormat-full":"{1}, {0}","field-fri-relative+0":"\u0432 \u044d\u0442\u0443 \u043f\u044f\u0442\u043d\u0438\u0446\u0443","dateFormatItem-yMMMM":"LLLL y","field-fri-relative+1":"\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043f\u044f\u0442\u043d\u0438\u0446\u0443","field-day":"\u0414\u0435\u043d\u044c","days-format-wide":"\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435 \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a \u0432\u0442\u043e\u0440\u043d\u0438\u043a \u0441\u0440\u0435\u0434\u0430 \u0447\u0435\u0442\u0432\u0435\u0440\u0433 \u043f\u044f\u0442\u043d\u0438\u0446\u0430 \u0441\u0443\u0431\u0431\u043e\u0442\u0430".split(" "),
"field-zone":"\u0427\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441","dateFormatItem-y":"y","months-standAlone-narrow":"\u042f\u0424\u041c\u0410\u041c\u0418\u0418\u0410\u0421\u041e\u041d\u0414".split(""),"field-year-relative+-1":"\u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u0433\u043e\u0434\u0443","field-month-relative+-1":"\u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u043c\u0435\u0441\u044f\u0446\u0435","dateFormatItem-hm":"h:mm a","dayPeriods-format-abbr-pm":"PM","days-format-abbr":"\u0432\u0441 \u043f\u043d \u0432\u0442 \u0441\u0440 \u0447\u0442 \u043f\u0442 \u0441\u0431".split(" "),
eraNames:["\u0434\u043e \u043d.\u044d.","\u043d.\u044d."],"dateFormatItem-yMMMd":"d MMM y '\u0433'.","days-format-narrow":"\u0432\u0441 \u043f\u043d \u0432\u0442 \u0441\u0440 \u0447\u0442 \u043f\u0442 \u0441\u0431".split(" "),"days-standAlone-narrow":"\u0412\u041f\u0412\u0421\u0427\u041f\u0421".split(""),"dateFormatItem-MMM":"LLL","field-month":"\u041c\u0435\u0441\u044f\u0446","field-tue-relative+0":"\u0432 \u044d\u0442\u043e\u0442 \u0432\u0442\u043e\u0440\u043d\u0438\u043a","field-tue-relative+1":"\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0432\u0442\u043e\u0440\u043d\u0438\u043a",
"dayPeriods-format-wide-am":"AM","dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"\u0432 \u044d\u0442\u043e\u0442 \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a","field-mon-relative+1":"\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a","dateFormat-short":"dd.MM.yy","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","field-second":"\u0421\u0435\u043a\u0443\u043d\u0434\u0430",
"field-sat-relative+-1":"\u0432 \u043f\u0440\u043e\u0448\u043b\u0443\u044e \u0441\u0443\u0431\u0431\u043e\u0442\u0443","dateFormatItem-yMMMEd":"E, d MMM y","field-sun-relative+-1":"\u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u0435 \u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435","field-month-relative+0":"\u0432 \u044d\u0442\u043e\u043c \u043c\u0435\u0441\u044f\u0446\u0435","field-month-relative+1":"\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043c\u0435\u0441\u044f\u0446\u0435",
"dateFormatItem-Ed":"ccc, d","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"\u041d\u0435\u0434\u0435\u043b\u044f","dateFormat-medium":"d MMM y '\u0433'.","field-year-relative+0":"\u0432 \u044d\u0442\u043e\u043c\u0443 \u0433\u043e\u0434\u0443","field-week-relative+-1":"\u043d\u0430 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u043d\u0435\u0434\u0435\u043b\u0435","field-year-relative+1":"\u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0433\u043e\u0434\u0443","dayPeriods-format-narrow-pm":"PM",
"dateTimeFormat-short":"{1}, {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"LLL y G","field-mon-relative+-1":"\u0432 \u043f\u0440\u043e\u0448\u043b\u044b\u0439 \u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a","field-week-relative+0":"\u043d\u0430 \u044d\u0442\u043e\u0439 \u043d\u0435\u0434\u0435\u043b\u0435","field-week-relative+1":"\u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u043d\u0435\u0434\u0435\u043b\u0435"})},
"mw-datepicker/gregorian/nls/sk/gregorian":function(){define({"dateFormatItem-Ehm":"E h:mm","days-standAlone-short":"Ne Po Ut St \u0160t Pi So".split(" "),"months-format-narrow":"jfmamjjasond".split(""),"field-second-relative+0":"teraz","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"De\u0148 v t\u00fd\u017edni","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E d. M. y","field-wed-relative+0":"T\u00fato stredu","field-wed-relative+1":"Bud\u00facu stredu","dateFormatItem-GyMMMEd":"E, d. MMM y G",
"dateFormatItem-MMMEd":"E, d. MMM.",eraNarrow:["pred n.l.","n.l."],"field-tue-relative+-1":"Minul\u00fd utorok","days-format-short":"Ne Po Ut St \u0160t Pi So".split(" "),"dateFormat-long":"d. MMMM y","field-fri-relative+-1":"Minul\u00fd piatok","field-wed-relative+-1":"Minul\u00fa stredu","months-format-wide":"janu\u00e1ra febru\u00e1ra marca apr\u00edla m\u00e1ja j\u00fana j\u00fala augusta septembra okt\u00f3bra novembra decembra".split(" "),"dateTimeFormat-medium":"{1} {0}","dateFormatItem-yMMMMd":"d. MMMM y",
"dayPeriods-format-wide-pm":"PM","dateFormat-full":"EEEE, d. MMMM y","field-thu-relative+-1":"Minul\u00fd \u0161tvrtok","dateFormatItem-Md":"d.M.","dateFormatItem-yMd":"d.M.y","field-era":"\u00c9ra","dateFormatItem-yM":"M.y","months-standAlone-wide":"janu\u00e1r febru\u00e1r marec apr\u00edl m\u00e1j j\u00fan j\u00fal august september okt\u00f3ber november december".split(" "),"timeFormat-short":"H:mm","quarters-format-wide":["1. \u0161tvr\u0165rok","2. \u0161tvr\u0165rok","3. \u0161tvr\u0165rok",
"4. \u0161tvr\u0165rok"],"dateFormatItem-yQQQQ":"QQQQ y","timeFormat-long":"H:mm:ss z","field-year":"Rok","dateFormatItem-yMMM":"LLL y","field-hour":"Hodina","months-format-abbr":"jan feb mar apr m\u00e1j j\u00fan j\u00fal aug sep okt nov dec".split(" "),"field-sat-relative+0":"T\u00fato sobotu","field-sat-relative+1":"Bud\u00facu sobotu","timeFormat-full":"H:mm:ss zzzz","field-day-relative+0":"Dnes","field-thu-relative+0":"Tento \u0161tvrtok","field-day-relative+1":"Zajtra","field-thu-relative+1":"Bud\u00faci \u0161tvrtok",
"dateFormatItem-GyMMMd":"d.M.y G","field-day-relative+2":"Pozajtra","dateFormatItem-H":"H","months-standAlone-abbr":"jan feb mar apr m\u00e1j j\u00fan j\u00fal aug sep okt nov dec".split(" "),"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["1. \u0161tvr\u0165rok","2. \u0161tvr\u0165rok","3. \u0161tvr\u0165rok","4. \u0161tvr\u0165rok"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L.","days-standAlone-wide":"nede\u013ea pondelok utorok streda \u0161tvrtok piatok sobota".split(" "),
"dateFormatItem-MMMMd":"d. MMMM","dateFormatItem-GyMMMMd":"d. MMMM y G","timeFormat-medium":"H:mm:ss","field-sun-relative+0":"T\u00fato nede\u013eu","dateFormatItem-Hm":"H:mm","field-sun-relative+1":"Bud\u00facu nede\u013eu","quarters-standAlone-abbr":["1Q","2Q","3Q","4Q"],eraAbbr:["pred n.l.","n.l."],"field-minute":"Min\u00fata","field-dayperiod":"\u010cas\u0165 d\u0148a","days-standAlone-abbr":"ne po ut st \u0161t pi so".split(" "),"dateFormatItem-d":"d.","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1",
"2","3","4"],"field-day-relative+-1":"V\u010dera","dateFormatItem-h":"h a","dateTimeFormat-long":"{1} {0}","field-day-relative+-2":"Predv\u010derom","dateFormatItem-MMMd":"d. MMM.","dateFormatItem-MEd":"E, d.M.","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"Tento piatok","dateFormatItem-yMMMM":"LLLL y","field-fri-relative+1":"Bud\u00faci piatok","field-day":"De\u0148","days-format-wide":"nede\u013ea pondelok utorok streda \u0161tvrtok piatok sobota".split(" "),"field-zone":"\u010casov\u00e9 p\u00e1smo",
"dateFormatItem-y":"y","months-standAlone-narrow":"jfmamjjasond".split(""),"field-year-relative+-1":"Minul\u00fd rok","field-month-relative+-1":"Posledn\u00fd mesiac","dateFormatItem-hm":"h:mm a","days-format-abbr":"ne po ut st \u0161t pi so".split(" "),"dateFormatItem-yMMMd":"d.M.y",eraNames:["pred n.l.","n.l."],"days-format-narrow":"NPUS\u0160PS".split(""),"days-standAlone-narrow":"NPUS\u0160PS".split(""),"dateFormatItem-MMM":"LLL","field-month":"Mesiac","field-tue-relative+0":"Tento utorok","field-tue-relative+1":"Bud\u00faci utorok",
"dayPeriods-format-wide-am":"AM","dateFormatItem-MMMMEd":"E, d. MMMM","dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"Tento pondelok","field-mon-relative+1":"Bud\u00faci pondelok","dateFormat-short":"d.M.y","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss","field-second":"Sekunda","field-sat-relative+-1":"Minul\u00fa sobotu","dateFormatItem-yMMMEd":"E, d. MMM y","field-sun-relative+-1":"Minul\u00fa nede\u013eu","field-month-relative+0":"Tento mesiac","field-month-relative+1":"Bud\u00faci mesiac",
"dateFormatItem-Ed":"E d.","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"T\u00fd\u017ede\u0148","dateFormat-medium":"d.M.y","field-year-relative+0":"Tento rok","field-week-relative+-1":"Minul\u00fd t\u00fd\u017ede\u0148","field-year-relative+1":"Bud\u00faci rok","dateFormatItem-mmss":"mm:ss","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"H:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"LLL y G","field-mon-relative+-1":"Minul\u00fd pondelok","field-week-relative+0":"Tento t\u00fd\u017ede\u0148",
"field-week-relative+1":"Bud\u00faci t\u00fd\u017ede\u0148"})},"mw-datepicker/gregorian/nls/sl/gregorian":function(){define({"dateFormatItem-Ehm":"E h.mm a","days-standAlone-short":"ned. pon. tor. sre. \u010det. pet. sob.".split(" "),"months-format-narrow":"jfmamjjasond".split(""),"field-second-relative+0":"zdaj","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Dan v tednu","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E, d. M. y","field-wed-relative+0":"To sredo","field-wed-relative+1":"Naslednjo sredo",
"dateFormatItem-GyMMMEd":"E, d. MMM y G","dateFormatItem-MMMEd":"E, d. MMM",eraNarrow:["pr. n. \u0161t.","po Kr.","po n. \u0161t."],"field-tue-relative+-1":"Prej\u0161nji torek","days-format-short":"ned. pon. tor. sre. \u010det. pet. sob.".split(" "),"dateFormat-long":"dd. MMMM y","field-fri-relative+-1":"Prej\u0161nji petek","field-wed-relative+-1":"Prej\u0161njo sredo","months-format-wide":"januar februar marec april maj junij julij avgust september oktober november december".split(" "),"dateTimeFormat-medium":"{1} {0}",
"dayPeriods-format-wide-pm":"pop.","dateFormat-full":"EEEE, dd. MMMM y","field-thu-relative+-1":"Prej\u0161nji \u010detrtek","dateFormatItem-Md":"d. M.","dateFormatItem-yMd":"d. M. y","field-era":"Doba","dateFormatItem-yM":"M/y","months-standAlone-wide":"januar februar marec april maj junij julij avgust september oktober november december".split(" "),"timeFormat-short":"HH.mm","quarters-format-wide":["1. \u010detrtletje","2. \u010detrtletje","3. \u010detrtletje","4. \u010detrtletje"],"dateFormatItem-yQQQQ":"QQQQ y",
"timeFormat-long":"HH.mm.ss z","field-year":"Leto","dateFormatItem-yMMM":"MMM y","field-hour":"Ura","months-format-abbr":"jan. feb. mar. apr. maj jun. jul. avg. sep. okt. nov. dec.".split(" "),"field-sat-relative+0":"To soboto","field-sat-relative+1":"Naslednjo soboto","timeFormat-full":"HH.mm.ss zzzz","field-day-relative+0":"Danes","field-thu-relative+0":"Ta \u010detrtek","field-day-relative+1":"Jutri","field-thu-relative+1":"Naslednji \u010detrtek","dateFormatItem-GyMMMd":"d. MMM y G","field-day-relative+2":"Pojutri\u0161njem",
"dateFormatItem-H":"HH","months-standAlone-abbr":"jan feb mar apr maj jun jul avg sep okt nov dec".split(" "),"quarters-format-abbr":["Q1","Q2","Q3","Q4"],"quarters-standAlone-wide":["1. \u010detrtletje","2. \u010detrtletje","3. \u010detrtletje","4. \u010detrtletje"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"nedelja ponedeljek torek sreda \u010detrtek petek sobota".split(" "),"timeFormat-medium":"HH.mm.ss","field-sun-relative+0":"To nedeljo","dateFormatItem-Hm":"HH.mm",
"field-sun-relative+1":"Naslednjo nedeljo","quarters-standAlone-abbr":["Q1","Q2","Q3","Q4"],eraAbbr:["pr. n. \u0161t.","po Kr.","po n. \u0161t."],"field-minute":"Minuta","field-dayperiod":"\u010cas dneva","days-standAlone-abbr":"ned pon tor sre \u010det pet sob".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm.ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"V\u010deraj","dateFormatItem-h":"h a","dateTimeFormat-long":"{1} {0}","field-day-relative+-2":"Predv\u010deraj\u0161njim",
"dateFormatItem-MMMd":"d. MMM","dateFormatItem-MEd":"E, d. MM.","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"Ta petek","dateFormatItem-yMMMM":"MMMM y","field-fri-relative+1":"Naslednji petek","field-day":"Dan","days-format-wide":"nedelja ponedeljek torek sreda \u010detrtek petek sobota".split(" "),"field-zone":"Obmo\u010dje","dateFormatItem-y":"y","months-standAlone-narrow":"jfmamjjasond".split(""),"field-year-relative+-1":"Lani","field-month-relative+-1":"Prej\u0161nji mesec","dateFormatItem-hm":"h.mm a",
"days-format-abbr":"ned. pon. tor. sre. \u010det. pet. sob.".split(" "),"dateFormatItem-GyM":"M/y G","dateFormatItem-yMMMd":"d. MMM y",eraNames:["pred na\u0161im \u0161tetjem","na\u0161e \u0161tetje","po n. \u0161t."],"days-format-narrow":"npts\u010dps".split(""),"days-standAlone-narrow":"npts\u010dps".split(""),"dateFormatItem-MMM":"LLL","field-month":"Mesec","field-tue-relative+0":"Ta torek","field-tue-relative+1":"Naslednji torek","dayPeriods-format-wide-am":"dop.","dateFormatItem-EHm":"E HH.mm",
"field-mon-relative+0":"Ta ponedeljek","field-mon-relative+1":"Naslednji ponedeljek","dateFormat-short":"d. MM. yy","dateFormatItem-EHms":"E HH.mm.ss","dateFormatItem-Ehms":"E h.mm.ss a","field-second":"Sekunda","field-sat-relative+-1":"Prej\u0161njo soboto","dateFormatItem-yMMMEd":"E, d. MMM y","field-sun-relative+-1":"Prej\u0161njo nedeljo","field-month-relative+0":"Ta mesec","field-month-relative+1":"Naslednji mesec","dateFormatItem-Ed":"E, d.","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"Teden",
"dateFormat-medium":"d. MMM y","field-year-relative+0":"Letos","field-week-relative+-1":"Prej\u0161nji teden","field-year-relative+1":"Naslednje leto","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH.mm.ss","dateFormatItem-hms":"h.mm.ss a","dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"Prej\u0161nji ponedeljek","field-week-relative+0":"Ta teden","field-week-relative+1":"Naslednji teden"})},"mw-datepicker/gregorian/nls/sr/gregorian":function(){define({"dateFormatItem-Ehm":"E, h:mm a",
"days-standAlone-short":"\u043d\u0435 \u043f\u043e \u0443\u0442 \u0441\u0440 \u0447\u0435 \u043f\u0435 \u0441\u0443".split(" "),"months-format-narrow":"\u0458\u0444\u043c\u0430\u043c\u0458\u0458\u0430\u0441\u043e\u043d\u0434".split(""),"field-second-relative+0":"\u0441\u0430\u0434\u0430","quarters-standAlone-narrow":["1.","2.","3.","4."],"field-weekday":"\u0434\u0430\u043d \u0443 \u043d\u0435\u0434\u0435\u0459\u0438","dateFormatItem-yQQQ":"QQQ. y","dateFormatItem-yMEd":"E, d.M.y.","field-wed-relative+0":"\u043e\u0432\u0435 \u0441\u0440\u0435\u0434\u0435",
"dateFormatItem-GyMMMEd":"E, d. MMM y. G","dateFormatItem-MMMEd":"E d. MMM","field-wed-relative+1":"\u0441\u043b\u0435\u0434\u0435\u045b\u0435 \u0441\u0440\u0435\u0434\u0435",eraNarrow:["\u043f.\u043d.\u0435.","\u043d.\u0435."],"dateFormatItem-yMM":"MM.y.","field-tue-relative+-1":"\u043f\u0440\u043e\u0448\u043b\u043e\u0433 \u0443\u0442\u043e\u0440\u043a\u0430","dateFormatItem-MMMdd":"dd.MMM","days-format-short":"\u043d\u0435\u0434 \u043f\u043e\u043d \u0443\u0442\u043e \u0441\u0440\u0435 \u0447\u0435\u0442 \u043f\u0435\u0442 \u0441\u0443\u0431".split(" "),
"dateFormat-long":"dd. MMMM y.","field-fri-relative+-1":"\u043f\u0440\u043e\u0448\u043b\u043e\u0433 \u043f\u0435\u0442\u043a\u0430","field-wed-relative+-1":"\u043f\u0440\u043e\u0448\u043b\u0435 \u0441\u0440\u0435\u0434\u0435","months-format-wide":"\u0458\u0430\u043d\u0443\u0430\u0440 \u0444\u0435\u0431\u0440\u0443\u0430\u0440 \u043c\u0430\u0440\u0442 \u0430\u043f\u0440\u0438\u043b \u043c\u0430\u0458 \u0458\u0443\u043d \u0458\u0443\u043b \u0430\u0432\u0433\u0443\u0441\u0442 \u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440 \u043e\u043a\u0442\u043e\u0431\u0430\u0440 \u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440 \u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440".split(" "),
"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"\u043f\u043e\u043f\u043e\u0434\u043d\u0435","dateFormat-full":"EEEE, dd. MMMM y.","field-thu-relative+-1":"\u043f\u0440\u043e\u0448\u043b\u043e\u0433 \u0447\u0435\u0442\u0432\u0440\u0442\u043a\u0430","dateFormatItem-Md":"d/M","dateFormatItem-yMd":"d.M.y.","dateFormatItem-yM":"M.y.","field-era":"\u0435\u0440\u0430","months-standAlone-wide":"\u0458\u0430\u043d\u0443\u0430\u0440 \u0444\u0435\u0431\u0440\u0443\u0430\u0440 \u043c\u0430\u0440\u0442 \u0430\u043f\u0440\u0438\u043b \u043c\u0430\u0458 \u0458\u0443\u043d \u0458\u0443\u043b \u0430\u0432\u0433\u0443\u0441\u0442 \u0441\u0435\u043f\u0442\u0435\u043c\u0431\u0430\u0440 \u043e\u043a\u0442\u043e\u0431\u0430\u0440 \u043d\u043e\u0432\u0435\u043c\u0431\u0430\u0440 \u0434\u0435\u0446\u0435\u043c\u0431\u0430\u0440".split(" "),
"timeFormat-short":"HH.mm","quarters-format-wide":["\u041f\u0440\u0432\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435","\u0414\u0440\u0443\u0433\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435","\u0422\u0440\u0435\u045b\u0435 \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435","\u0427\u0435\u0442\u0432\u0440\u0442\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435"],"timeFormat-long":"HH.mm.ss z","dateFormatItem-yMMM":"MMM y.","dateFormatItem-yQQQQ":"QQQQ. y",
"field-year":"\u0433\u043e\u0434\u0438\u043d\u0430","dateFormatItem-MMdd":"MM-dd","field-hour":"\u0447\u0430\u0441","months-format-abbr":"\u0458\u0430\u043d \u0444\u0435\u0431 \u043c\u0430\u0440 \u0430\u043f\u0440 \u043c\u0430\u0458 \u0458\u0443\u043d \u0458\u0443\u043b \u0430\u0432\u0433 \u0441\u0435\u043f \u043e\u043a\u0442 \u043d\u043e\u0432 \u0434\u0435\u0446".split(" "),"field-sat-relative+0":"\u043e\u0432\u0435 \u0441\u0443\u0431\u043e\u0442\u0435","field-sat-relative+1":"\u0441\u043b\u0435\u0434\u0435\u045b\u0435 \u0441\u0443\u0431\u043e\u0442\u0435",
"timeFormat-full":"HH.mm.ss zzzz","field-day-relative+0":"\u0434\u0430\u043d\u0430\u0441","field-day-relative+1":"\u0441\u0443\u0442\u0440\u0430","field-thu-relative+0":"\u043e\u0432\u043e\u0433 \u0447\u0435\u0442\u0432\u0440\u0442\u043a\u0430","dateFormatItem-GyMMMd":"d. MMM y. G","field-day-relative+2":"\u043f\u0440\u0435\u043a\u043e\u0441\u0443\u0442\u0440\u0430","field-thu-relative+1":"\u0441\u043b\u0435\u0434\u0435\u045b\u0435\u0433 \u0447\u0435\u0442\u0432\u0440\u0442\u043a\u0430","dateFormatItem-H":"HH",
"months-standAlone-abbr":"\u0458\u0430\u043d \u0444\u0435\u0431 \u043c\u0430\u0440 \u0430\u043f\u0440 \u043c\u0430\u0458 \u0458\u0443\u043d \u0458\u0443\u043b \u0430\u0432\u0433 \u0441\u0435\u043f \u043e\u043a\u0442 \u043d\u043e\u0432 \u0434\u0435\u0446".split(" "),"quarters-format-abbr":["\u041a1","\u041a2","\u041a3","\u041a4"],"quarters-standAlone-wide":["\u041f\u0440\u0432\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435","\u0414\u0440\u0443\u0433\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435",
"\u0422\u0440\u0435\u045b\u0435 \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435","\u0427\u0435\u0442\u0432\u0440\u0442\u043e \u0442\u0440\u043e\u043c\u0435\u0441\u0435\u0447\u0458\u0435"],"dateFormatItem-Gy":"y. G","dateFormatItem-M":"L","days-standAlone-wide":"\u043d\u0435\u0434\u0435\u0459\u0430 \u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a \u0443\u0442\u043e\u0440\u0430\u043a \u0441\u0440\u0435\u0434\u0430 \u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a \u043f\u0435\u0442\u0430\u043a \u0441\u0443\u0431\u043e\u0442\u0430".split(" "),
"dateFormatItem-MMMMd":"d. MMMM","timeFormat-medium":"HH.mm.ss","dateFormatItem-yMMdd":"dd.MM.y.","field-sun-relative+0":"\u043e\u0432\u0435 \u043d\u0435\u0434\u0435\u0459\u0435","dateFormatItem-Hm":"HH.mm","quarters-standAlone-abbr":["\u041a1","\u041a2","\u041a3","\u041a4"],"field-sun-relative+1":"\u0441\u043b\u0435\u0434\u0435\u045b\u0435 \u043d\u0435\u0434\u0435\u0459\u0435",eraAbbr:["\u043f. \u043d. \u0435.","\u043d. \u0435."],"field-minute":"\u043c\u0438\u043d\u0443\u0442","field-dayperiod":"\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435/\u043f\u043e\u043f\u043e\u0434\u043d\u0435",
"days-standAlone-abbr":"\u043d\u0435\u0434 \u043f\u043e\u043d \u0443\u0442\u043e \u0441\u0440\u0435 \u0447\u0435\u0442 \u043f\u0435\u0442 \u0441\u0443\u0431".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm.ss","quarters-format-narrow":["1.","2.","3.","4."],"field-day-relative+-1":"\u0458\u0443\u0447\u0435","dateFormatItem-h":"hh a","dateTimeFormat-long":"{1} {0}","field-day-relative+-2":"\u043f\u0440\u0435\u043a\u0458\u0443\u0447\u0435","dateFormatItem-MMMd":"d. MMM","dateFormatItem-MEd":"E, M-d",
"dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"\u043e\u0432\u043e\u0433 \u043f\u0435\u0442\u043a\u0430","dateFormatItem-yMMMM":"MMMM y.","field-fri-relative+1":"\u0441\u043b\u0435\u0434\u0435\u045b\u0435\u0433 \u043f\u0435\u0442\u043a\u0430","field-day":"\u0434\u0430\u043d","days-format-wide":"\u043d\u0435\u0434\u0435\u0459\u0430 \u043f\u043e\u043d\u0435\u0434\u0435\u0459\u0430\u043a \u0443\u0442\u043e\u0440\u0430\u043a \u0441\u0440\u0435\u0434\u0430 \u0447\u0435\u0442\u0432\u0440\u0442\u0430\u043a \u043f\u0435\u0442\u0430\u043a \u0441\u0443\u0431\u043e\u0442\u0430".split(" "),
"field-zone":"\u0437\u043e\u043d\u0430","dateFormatItem-y":"y.","months-standAlone-narrow":"\u0458\u0444\u043c\u0430\u043c\u0458\u0458\u0430\u0441\u043e\u043d\u0434".split(""),"field-year-relative+-1":"\u041f\u0440\u043e\u0448\u043b\u0435 \u0433\u043e\u0434\u0438\u043d\u0435","field-month-relative+-1":"\u041f\u0440\u043e\u0448\u043b\u043e\u0433 \u043c\u0435\u0441\u0435\u0446\u0430","dateFormatItem-hm":"hh.mm a","days-format-abbr":"\u043d\u0435\u0434 \u043f\u043e\u043d \u0443\u0442\u043e \u0441\u0440\u0435 \u0447\u0435\u0442 \u043f\u0435\u0442 \u0441\u0443\u0431".split(" "),
eraNames:["\u041f\u0440\u0435 \u043d\u043e\u0432\u0435 \u0435\u0440\u0435","\u041d\u043e\u0432\u0435 \u0435\u0440\u0435"],"dateFormatItem-yMMMd":"d. MMM y.","days-format-narrow":"\u043d\u043f\u0443\u0441\u0447\u043f\u0441".split(""),"days-standAlone-narrow":"\u043d\u043f\u0443\u0441\u0447\u043f\u0441".split(""),"dateFormatItem-MMM":"LLL","field-month":"\u043c\u0435\u0441\u0435\u0446","field-tue-relative+0":"\u043e\u0432\u043e\u0433 \u0443\u0442\u043e\u0440\u043a\u0430","field-tue-relative+1":"\u0441\u043b\u0435\u0434\u0435\u045b\u0435\u0433 \u0443\u0442\u043e\u0440\u043a\u0430",
"dayPeriods-format-wide-am":"\u043f\u0440\u0435 \u043f\u043e\u0434\u043d\u0435","dateFormatItem-MMMMEd":"E d. MMMM","dateFormatItem-EHm":"E, HH:mm","field-mon-relative+0":"\u043e\u0432\u043e\u0433 \u043f\u043e\u043d\u0435\u0434\u0435\u0459\u043a\u0430","field-mon-relative+1":"\u0441\u043b\u0435\u0434\u0435\u045b\u0435\u0433 \u043f\u043e\u043d\u0435\u0434\u0435\u0459\u043a\u0430","dateFormat-short":"d.M.yy.","dateFormatItem-EHms":"E, HH:mm:ss","dateFormatItem-Ehms":"E, h:mm:ss a","field-second":"\u0441\u0435\u043a\u0443\u043d\u0434",
"field-sat-relative+-1":"\u043f\u0440\u043e\u0448\u043b\u0435 \u0441\u0443\u0431\u043e\u0442\u0435","dateFormatItem-yMMMEd":"E, d. MMM y.","field-sun-relative+-1":"\u043f\u0440\u043e\u0448\u043b\u0435 \u043d\u0435\u0434\u0435\u0459\u0435","field-month-relative+0":"\u041e\u0432\u043e\u0433 \u043c\u0435\u0441\u0435\u0446\u0430","field-month-relative+1":"\u0421\u043b\u0435\u0434\u0435\u045b\u0435\u0433 \u043c\u0435\u0441\u0435\u0446\u0430","dateFormatItem-Ed":"E d.","dateTimeFormats-appendItem-Timezone":"{0} {1}",
"field-week":"\u043d\u0435\u0434\u0435\u0459\u0430","dateFormat-medium":"dd.MM.y.","field-year-relative+0":"\u041e\u0432\u0435 \u0433\u043e\u0434\u0438\u043d\u0435","field-week-relative+-1":"\u041f\u0440\u043e\u0448\u043b\u0435 \u043d\u0435\u0434\u0435\u0459\u0435","field-year-relative+1":"\u0421\u043b\u0435\u0434\u0435\u045b\u0435 \u0433\u043e\u0434\u0438\u043d\u0435","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH.mm.ss","dateFormatItem-hms":"hh.mm.ss a","dateFormatItem-GyMMM":"MMM y. G",
"field-mon-relative+-1":"\u043f\u0440\u043e\u0448\u043b\u043e\u0433 \u043f\u043e\u043d\u0435\u0434\u0435\u0459\u043a\u0430","field-week-relative+0":"\u041e\u0432\u0435 \u043d\u0435\u0434\u0435\u0459\u0435","field-week-relative+1":"\u0421\u043b\u0435\u0434\u0435\u045b\u0435 \u043d\u0435\u0434\u0435\u0459\u0435"})},"mw-datepicker/gregorian/nls/sv/gregorian":function(){define({"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"S\u00f6 M\u00e5 Ti On To Fr L\u00f6".split(" "),"months-format-narrow":"JFMAMJJASOND".split(""),
"field-second-relative+0":"nu","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"Veckodag","dateFormatItem-yQQQ":"y QQQ","dateFormatItem-yMEd":"E, y-MM-dd","field-wed-relative+0":"onsdag denna vecka","dateFormatItem-GyMMMEd":"E d MMM y G","dateFormatItem-MMMEd":"E d MMM","field-wed-relative+1":"onsdag n\u00e4sta vecka",eraNarrow:["f.Kr.","fvt","e.Kr.","vt"],"dateFormatItem-yMM":"y-MM","field-tue-relative+-1":"tisdag f\u00f6rra veckan","days-format-short":"s\u00f6 m\u00e5 ti on to fr l\u00f6".split(" "),
"dateFormat-long":"d MMMM y","field-fri-relative+-1":"fredag f\u00f6rra veckan","field-wed-relative+-1":"onsdag f\u00f6rra veckan","months-format-wide":"januari februari mars april maj juni juli augusti september oktober november december".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"em","dateFormat-full":"EEEE d MMMM y","field-thu-relative+-1":"torsdag f\u00f6rra veckan","dateFormatItem-Md":"d/M","dayPeriods-format-abbr-am":"FM","dateFormatItem-yMd":"y-MM-dd","dateFormatItem-yM":"y-MM",
"field-era":"Era","months-standAlone-wide":"Januari Februari Mars April Maj Juni Juli Augusti September Oktober November December".split(" "),"timeFormat-short":"HH:mm","quarters-format-wide":["1:a kvartalet","2:a kvartalet","3:e kvartalet","4:e kvartalet"],"timeFormat-long":"HH:mm:ss z","dateFormatItem-yMMM":"MMM y","dateFormatItem-yQQQQ":"y QQQQ","field-year":"\u00c5r","dateFormatItem-MMdd":"dd/MM","field-hour":"timme","months-format-abbr":"jan feb mar apr maj jun jul aug sep okt nov dec".split(" "),
"field-sat-relative+0":"l\u00f6rdag denna vecka","field-sat-relative+1":"l\u00f6rdag n\u00e4sta vecka","timeFormat-full":"'kl'. HH:mm:ss zzzz","field-day-relative+0":"i dag","field-day-relative+1":"i morgon","field-thu-relative+0":"torsdag denna vecka","dateFormatItem-GyMMMd":"d MMM y G","field-day-relative+2":"i \u00f6vermorgon","field-thu-relative+1":"torsdag n\u00e4sta vecka","dateFormatItem-H":"HH","months-standAlone-abbr":"Jan Feb Mar Apr Maj Jun Jul Aug Sep Okt Nov Dec".split(" "),"quarters-format-abbr":["K1",
"K2","K3","K4"],"quarters-standAlone-wide":["1:a kvartalet","2:a kvartalet","3:e kvartalet","4:e kvartalet"],"dateFormatItem-Gy":"y G","dateFormatItem-M":"L","days-standAlone-wide":"S\u00f6ndag M\u00e5ndag Tisdag Onsdag Torsdag Fredag L\u00f6rdag".split(" "),"dateFormatItem-MMMMd":"d MMMM","timeFormat-medium":"HH:mm:ss","field-sun-relative+0":"s\u00f6ndag denna vecka","dateFormatItem-Hm":"HH:mm","quarters-standAlone-abbr":["K1","K2","K3","K4"],"field-sun-relative+1":"s\u00f6ndag n\u00e4sta vecka",
eraAbbr:["f.Kr.","e.Kr."],"field-minute":"Minut","field-dayperiod":"fm/em","days-standAlone-abbr":"S\u00f6n M\u00e5n Tis Ons Tor Fre L\u00f6r".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"i g\u00e5r","dateFormatItem-h":"h a","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"f","field-day-relative+-2":"i f\u00f6rrg\u00e5r","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E d/M","dateTimeFormat-full":"{1} {0}",
"field-fri-relative+0":"fredag denna vecka","field-fri-relative+1":"fredag n\u00e4sta vecka","field-day":"Dag","days-format-wide":"s\u00f6ndag m\u00e5ndag tisdag onsdag torsdag fredag l\u00f6rdag".split(" "),"field-zone":"Tidszon","dateFormatItem-y":"y","months-standAlone-narrow":"JFMAMJJASOND".split(""),"field-year-relative+-1":"i fjol","field-month-relative+-1":"f\u00f6rra m\u00e5naden","dateFormatItem-hm":"h:mm a","dayPeriods-format-abbr-pm":"EM","days-format-abbr":"s\u00f6n m\u00e5n tis ons tors fre l\u00f6r".split(" "),
eraNames:["f\u00f6re Kristus","f\u00f6re v\u00e4sterl\u00e4ndsk tider\u00e4kning","efter Kristus","v\u00e4sterl\u00e4ndsk tider\u00e4kning"],"dateFormatItem-yMMMd":"d MMM y","days-format-narrow":"SMTOTFL".split(""),"days-standAlone-narrow":"SMTOTFL".split(""),"dateFormatItem-MMM":"LLL","field-month":"M\u00e5nad","field-tue-relative+0":"tisdag denna vecka","field-tue-relative+1":"tisdag n\u00e4sta vecka","dayPeriods-format-wide-am":"fm","dateFormatItem-MMMMEd":"E d MMMM","dateFormatItem-EHm":"E HH:mm",
"field-mon-relative+0":"m\u00e5ndag denna vecka","field-mon-relative+1":"m\u00e5ndag n\u00e4sta vecka","dateFormat-short":"y-MM-dd","dateFormatItem-MMd":"d/M","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","field-second":"Sekund","field-sat-relative+-1":"l\u00f6rdag f\u00f6rra veckan","dateFormatItem-yMMMEd":"E d MMM y","field-sun-relative+-1":"s\u00f6ndag f\u00f6rra veckan","field-month-relative+0":"denna m\u00e5nad","field-month-relative+1":"n\u00e4sta m\u00e5nad","dateFormatItem-Ed":"E d",
"dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"Vecka","dateFormat-medium":"d MMM y","field-year-relative+0":"i \u00e5r","field-week-relative+-1":"f\u00f6rra veckan","field-year-relative+1":"n\u00e4sta \u00e5r","dayPeriods-format-narrow-pm":"e","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"MMM y G","field-mon-relative+-1":"m\u00e5ndag f\u00f6rra veckan","field-week-relative+0":"denna vecka","field-week-relative+1":"n\u00e4sta vecka"})},
"mw-datepicker/gregorian/nls/th/gregorian":function(){define({"dateFormatItem-Ehm":"E h:mm a","days-standAlone-short":"\u0e2d\u0e32. \u0e08. \u0e2d. \u0e1e. \u0e1e\u0e24. \u0e28. \u0e2a.".split(" "),"months-format-narrow":"\u0e21.\u0e04. \u0e01.\u0e1e. \u0e21\u0e35.\u0e04. \u0e40\u0e21.\u0e22. \u0e1e.\u0e04. \u0e21\u0e34.\u0e22. \u0e01.\u0e04. \u0e2a.\u0e04. \u0e01.\u0e22. \u0e15.\u0e04. \u0e1e.\u0e22. \u0e18.\u0e04.".split(" "),"field-second-relative+0":"\u0e02\u0e13\u0e30\u0e19\u0e35\u0e49","quarters-standAlone-narrow":["1",
"2","3","4"],"field-weekday":"\u0e27\u0e31\u0e19\u0e43\u0e19\u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c","dateFormatItem-yQQQ":"QQQ y","dateFormatItem-yMEd":"E d/M/y","field-wed-relative+0":"\u0e1e\u0e38\u0e18\u0e19\u0e35\u0e49","field-wed-relative+1":"\u0e1e\u0e38\u0e18\u0e2b\u0e19\u0e49\u0e32","dateFormatItem-GyMMMEd":"E d MMM G y","dateFormatItem-MMMEd":"E d MMM",eraNarrow:["\u0e01\u0e48\u0e2d\u0e19 \u0e04.\u0e28.","\u0e01.\u0e2a.\u0e28.","\u0e04.\u0e28.","\u0e2a.\u0e28."],"field-tue-relative+-1":"\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27",
"days-format-short":"\u0e2d\u0e32. \u0e08. \u0e2d. \u0e1e. \u0e1e\u0e24. \u0e28. \u0e2a.".split(" "),"dateFormat-long":"d MMMM y","field-fri-relative+-1":"\u0e28\u0e38\u0e01\u0e23\u0e4c\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27","field-wed-relative+-1":"\u0e1e\u0e38\u0e18\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27","months-format-wide":"\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21 \u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e21\u0e35\u0e19\u0e32\u0e04\u0e21 \u0e40\u0e21\u0e29\u0e32\u0e22\u0e19 \u0e1e\u0e24\u0e29\u0e20\u0e32\u0e04\u0e21 \u0e21\u0e34\u0e16\u0e38\u0e19\u0e32\u0e22\u0e19 \u0e01\u0e23\u0e01\u0e0e\u0e32\u0e04\u0e21 \u0e2a\u0e34\u0e07\u0e2b\u0e32\u0e04\u0e21 \u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19 \u0e15\u0e38\u0e25\u0e32\u0e04\u0e21 \u0e1e\u0e24\u0e28\u0e08\u0e34\u0e01\u0e32\u0e22\u0e19 \u0e18\u0e31\u0e19\u0e27\u0e32\u0e04\u0e21".split(" "),
"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"\u0e2b\u0e25\u0e31\u0e07\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07","dateFormat-full":"EEEE\u0e17\u0e35\u0e48 d MMMM G y","field-thu-relative+-1":"\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27","dateFormatItem-Md":"d/M","dateFormatItem-yMd":"d/M/y","field-era":"\u0e2a\u0e21\u0e31\u0e22","dateFormatItem-yM":"M/y","months-standAlone-wide":"\u0e21\u0e01\u0e23\u0e32\u0e04\u0e21 \u0e01\u0e38\u0e21\u0e20\u0e32\u0e1e\u0e31\u0e19\u0e18\u0e4c \u0e21\u0e35\u0e19\u0e32\u0e04\u0e21 \u0e40\u0e21\u0e29\u0e32\u0e22\u0e19 \u0e1e\u0e24\u0e29\u0e20\u0e32\u0e04\u0e21 \u0e21\u0e34\u0e16\u0e38\u0e19\u0e32\u0e22\u0e19 \u0e01\u0e23\u0e01\u0e0e\u0e32\u0e04\u0e21 \u0e2a\u0e34\u0e07\u0e2b\u0e32\u0e04\u0e21 \u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19 \u0e15\u0e38\u0e25\u0e32\u0e04\u0e21 \u0e1e\u0e24\u0e28\u0e08\u0e34\u0e01\u0e32\u0e22\u0e19 \u0e18\u0e31\u0e19\u0e27\u0e32\u0e04\u0e21".split(" "),
"timeFormat-short":"HH:mm","quarters-format-wide":["\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 1","\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 2","\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 3","\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 4"],"dateFormatItem-yQQQQ":"QQQQ y","timeFormat-long":"H \u0e19\u0e32\u0e2c\u0e34\u0e01\u0e32 mm \u0e19\u0e32\u0e17\u0e35 ss \u0e27\u0e34\u0e19\u0e32\u0e17\u0e35 z","field-year":"\u0e1b\u0e35","dateFormatItem-yMMM":"MMM y","field-hour":"\u0e0a\u0e31\u0e48\u0e27\u0e42\u0e21\u0e07","months-format-abbr":"\u0e21.\u0e04. \u0e01.\u0e1e. \u0e21\u0e35.\u0e04. \u0e40\u0e21.\u0e22. \u0e1e.\u0e04. \u0e21\u0e34.\u0e22. \u0e01.\u0e04. \u0e2a.\u0e04. \u0e01.\u0e22. \u0e15.\u0e04. \u0e1e.\u0e22. \u0e18.\u0e04.".split(" "),
"field-sat-relative+0":"\u0e40\u0e2a\u0e32\u0e23\u0e4c\u0e19\u0e35\u0e49","field-sat-relative+1":"\u0e40\u0e2a\u0e32\u0e23\u0e4c\u0e2b\u0e19\u0e49\u0e32","timeFormat-full":"H \u0e19\u0e32\u0e2c\u0e34\u0e01\u0e32 mm \u0e19\u0e32\u0e17\u0e35 ss \u0e27\u0e34\u0e19\u0e32\u0e17\u0e35 zzzz","field-day-relative+0":"\u0e27\u0e31\u0e19\u0e19\u0e35\u0e49","field-thu-relative+0":"\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e19\u0e35\u0e49","field-day-relative+1":"\u0e1e\u0e23\u0e38\u0e48\u0e07\u0e19\u0e35\u0e49","field-thu-relative+1":"\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e2b\u0e19\u0e49\u0e32",
"dateFormatItem-GyMMMd":"d MMM G y","field-day-relative+2":"\u0e21\u0e30\u0e23\u0e37\u0e19\u0e19\u0e35\u0e49","dateFormatItem-H":"HH","months-standAlone-abbr":"\u0e21.\u0e04. \u0e01.\u0e1e. \u0e21\u0e35.\u0e04. \u0e40\u0e21.\u0e22. \u0e1e.\u0e04. \u0e21\u0e34.\u0e22. \u0e01.\u0e04. \u0e2a.\u0e04. \u0e01.\u0e22. \u0e15.\u0e04. \u0e1e.\u0e22. \u0e18.\u0e04.".split(" "),"quarters-format-abbr":["\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 1","\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 2","\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 3",
"\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 4"],"quarters-standAlone-wide":["\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 1","\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 2","\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 3","\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 4"],"dateFormatItem-Gy":"G y","dateFormatItem-M":"L","days-standAlone-wide":"\u0e27\u0e31\u0e19\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c \u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c \u0e27\u0e31\u0e19\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23 \u0e27\u0e31\u0e19\u0e1e\u0e38\u0e18 \u0e27\u0e31\u0e19\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35 \u0e27\u0e31\u0e19\u0e28\u0e38\u0e01\u0e23\u0e4c \u0e27\u0e31\u0e19\u0e40\u0e2a\u0e32\u0e23\u0e4c".split(" "),
"dateFormatItem-MMMMd":"d MMMM","timeFormat-medium":"HH:mm:ss","field-sun-relative+0":"\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c\u0e19\u0e35\u0e49","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c\u0e2b\u0e19\u0e49\u0e32","quarters-standAlone-abbr":["\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 1","\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 2","\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 3","\u0e44\u0e15\u0e23\u0e21\u0e32\u0e2a 4"],eraAbbr:["\u0e1b\u0e35\u0e01\u0e48\u0e2d\u0e19 \u0e04.\u0e28.",
"\u0e04.\u0e28."],"field-minute":"\u0e19\u0e32\u0e17\u0e35","field-dayperiod":"\u0e0a\u0e48\u0e27\u0e07\u0e27\u0e31\u0e19","days-standAlone-abbr":"\u0e2d\u0e32. \u0e08. \u0e2d. \u0e1e. \u0e1e\u0e24. \u0e28. \u0e2a.".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e27\u0e32\u0e19","dateFormatItem-h":"h a","dateTimeFormat-long":"{1} {0}","field-day-relative+-2":"\u0e40\u0e21\u0e37\u0e48\u0e2d\u0e27\u0e32\u0e19\u0e0b\u0e37\u0e19",
"dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E d/M","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"\u0e28\u0e38\u0e01\u0e23\u0e4c\u0e19\u0e35\u0e49","dateFormatItem-yMMMM":"MMMM y","field-fri-relative+1":"\u0e28\u0e38\u0e01\u0e23\u0e4c\u0e2b\u0e19\u0e49\u0e32","field-day":"\u0e27\u0e31\u0e19","days-format-wide":"\u0e27\u0e31\u0e19\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c \u0e27\u0e31\u0e19\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c \u0e27\u0e31\u0e19\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23 \u0e27\u0e31\u0e19\u0e1e\u0e38\u0e18 \u0e27\u0e31\u0e19\u0e1e\u0e24\u0e2b\u0e31\u0e2a\u0e1a\u0e14\u0e35 \u0e27\u0e31\u0e19\u0e28\u0e38\u0e01\u0e23\u0e4c \u0e27\u0e31\u0e19\u0e40\u0e2a\u0e32\u0e23\u0e4c".split(" "),
"field-zone":"\u0e40\u0e02\u0e15\u0e40\u0e27\u0e25\u0e32","dateFormatItem-y":"y","months-standAlone-narrow":"\u0e21.\u0e04. \u0e01.\u0e1e. \u0e21\u0e35.\u0e04. \u0e40\u0e21.\u0e22. \u0e1e.\u0e04. \u0e21\u0e34.\u0e22. \u0e01.\u0e04. \u0e2a.\u0e04. \u0e01.\u0e22. \u0e15.\u0e04. \u0e1e.\u0e22. \u0e18.\u0e04.".split(" "),"field-year-relative+-1":"\u0e1b\u0e35\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27","field-month-relative+-1":"\u0e40\u0e14\u0e37\u0e2d\u0e19\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27",
"dateFormatItem-hm":"h:mm a","days-format-abbr":"\u0e2d\u0e32. \u0e08. \u0e2d. \u0e1e. \u0e1e\u0e24. \u0e28. \u0e2a.".split(" "),"dateFormatItem-yMMMd":"d MMM y",eraNames:["\u0e1b\u0e35\u0e01\u0e48\u0e2d\u0e19\u0e04\u0e23\u0e34\u0e2a\u0e15\u0e4c\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a","\u0e01\u0e48\u0e2d\u0e19\u0e2a\u0e32\u0e21\u0e31\u0e0d\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a","\u0e04\u0e23\u0e34\u0e2a\u0e15\u0e4c\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a","\u0e2a\u0e32\u0e21\u0e31\u0e0d\u0e28\u0e31\u0e01\u0e23\u0e32\u0e0a"],
"days-format-narrow":"\u0e2d\u0e32 \u0e08 \u0e2d \u0e1e \u0e1e\u0e24 \u0e28 \u0e2a".split(" "),"days-standAlone-narrow":"\u0e2d\u0e32 \u0e08 \u0e2d \u0e1e \u0e1e\u0e24 \u0e28 \u0e2a".split(" "),"dateFormatItem-MMM":"LLL","field-month":"\u0e40\u0e14\u0e37\u0e2d\u0e19","field-tue-relative+0":"\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23\u0e19\u0e35\u0e49","field-tue-relative+1":"\u0e2d\u0e31\u0e07\u0e04\u0e32\u0e23\u0e2b\u0e19\u0e49\u0e32","dayPeriods-format-wide-am":"\u0e01\u0e48\u0e2d\u0e19\u0e40\u0e17\u0e35\u0e48\u0e22\u0e07",
"dateFormatItem-MMMMEd":"E d MMMM","dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e19\u0e35\u0e49","field-mon-relative+1":"\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e2b\u0e19\u0e49\u0e32","dateFormat-short":"d/M/yy","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E h:mm:ss a","field-second":"\u0e27\u0e34\u0e19\u0e32\u0e17\u0e35","field-sat-relative+-1":"\u0e40\u0e2a\u0e32\u0e23\u0e4c\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27","dateFormatItem-yMMMEd":"E d MMM y",
"field-sun-relative+-1":"\u0e2d\u0e32\u0e17\u0e34\u0e15\u0e22\u0e4c\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27","field-month-relative+0":"\u0e40\u0e14\u0e37\u0e2d\u0e19\u0e19\u0e35\u0e49","field-month-relative+1":"\u0e40\u0e14\u0e37\u0e2d\u0e19\u0e2b\u0e19\u0e49\u0e32","dateFormatItem-Ed":"E d","dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"\u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c","dateFormat-medium":"d MMM y","field-year-relative+0":"\u0e1b\u0e35\u0e19\u0e35\u0e49","field-week-relative+-1":"\u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27",
"field-year-relative+1":"\u0e1b\u0e35\u0e2b\u0e19\u0e49\u0e32","dateFormatItem-mmss":"mm:ss","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss a","dateFormatItem-GyMMM":"MMM G y","field-mon-relative+-1":"\u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e17\u0e35\u0e48\u0e41\u0e25\u0e49\u0e27","field-week-relative+0":"\u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c\u0e19\u0e35\u0e49","field-week-relative+1":"\u0e2a\u0e31\u0e1b\u0e14\u0e32\u0e2b\u0e4c\u0e2b\u0e19\u0e49\u0e32"})},
"mw-datepicker/gregorian/nls/tr/gregorian":function(){define({"dateFormatItem-Ehm":"E a h:mm","days-standAlone-short":"Pa Pt Sa \u00c7a Pe Cu Ct".split(" "),"months-format-narrow":"O\u015eMNMHTAEEKA".split(""),"field-second-relative+0":"\u015fimdi","quarters-standAlone-narrow":["1.","2.","3.","4."],"field-weekday":"Haftan\u0131n G\u00fcn\u00fc","dateFormatItem-yQQQ":"y/QQQ","dateFormatItem-yMEd":"dd.MM.y E","field-wed-relative+0":"bu \u00e7ar\u015famba","field-wed-relative+1":"gelecek \u00e7ar\u015famba",
"dateFormatItem-GyMMMEd":"G d MMM y E","dateFormatItem-MMMEd":"d MMMM E",eraNarrow:["M\u00d6","MS"],"dateFormatItem-yMM":"MM.y","field-tue-relative+-1":"ge\u00e7en sal\u0131","days-format-short":"Pa Pt Sa \u00c7a Pe Cu Ct".split(" "),"dateFormat-long":"d MMMM y","field-fri-relative+-1":"ge\u00e7en cuma","field-wed-relative+-1":"ge\u00e7en \u00e7ar\u015famba","months-format-wide":"Ocak \u015eubat Mart Nisan May\u0131s Haziran Temmuz A\u011fustos Eyl\u00fcl Ekim Kas\u0131m Aral\u0131k".split(" "),"dateTimeFormat-medium":"{1} {0}",
"dayPeriods-format-wide-pm":"\u00d6S","dateFormat-full":"d MMMM y EEEE","field-thu-relative+-1":"ge\u00e7en per\u015fembe","dateFormatItem-Md":"dd/MM","dateFormatItem-yMd":"dd.MM.y","field-era":"Miladi D\u00f6nem","dateFormatItem-yM":"MM/y","months-standAlone-wide":"Ocak \u015eubat Mart Nisan May\u0131s Haziran Temmuz A\u011fustos Eyl\u00fcl Ekim Kas\u0131m Aral\u0131k".split(" "),"timeFormat-short":"HH:mm","quarters-format-wide":["1. \u00e7eyrek","2. \u00e7eyrek","3. \u00e7eyrek","4. \u00e7eyrek"],
"dateFormatItem-yQQQQ":"y/QQQQ","timeFormat-long":"HH:mm:ss z","field-year":"Y\u0131l","dateFormatItem-yMMM":"MMM y","field-hour":"Saat","months-format-abbr":"Oca \u015eub Mar Nis May Haz Tem A\u011fu Eyl Eki Kas Ara".split(" "),"field-sat-relative+0":"bu cumartesi","field-sat-relative+1":"gelecek cumartesi","timeFormat-full":"HH:mm:ss zzzz","field-day-relative+0":"bug\u00fcn","field-thu-relative+0":"bu per\u015fembe","field-day-relative+1":"yar\u0131n","field-thu-relative+1":"gelecek per\u015fembe",
"dateFormatItem-GyMMMd":"G dd MMM y","field-day-relative+2":"\u00f6b\u00fcr g\u00fcn","dateFormatItem-H":"HH","months-standAlone-abbr":"Oca \u015eub Mar Nis May Haz Tem A\u011fu Eyl Eki Kas Ara".split(" "),"quarters-format-abbr":["\u00c71","\u00c72","\u00c73","\u00c74"],"quarters-standAlone-wide":["1. \u00e7eyrek","2. \u00e7eyrek","3. \u00e7eyrek","4. \u00e7eyrek"],"dateFormatItem-Gy":"G y","dateFormatItem-M":"L","days-standAlone-wide":"Pazar Pazartesi Sal\u0131 \u00c7ar\u015famba Per\u015fembe Cuma Cumartesi".split(" "),
"dateFormatItem-MMMMd":"dd MMMM","timeFormat-medium":"HH:mm:ss","field-sun-relative+0":"bu pazar","dateFormatItem-Hm":"HH:mm","field-sun-relative+1":"gelecek pazar","quarters-standAlone-abbr":["\u00c71","\u00c72","\u00c73","\u00c74"],eraAbbr:["M\u00d6","MS"],"field-minute":"Dakika","field-dayperiod":"\u00d6\u00d6/\u00d6S","days-standAlone-abbr":"Paz Pzt Sal \u00c7ar Per Cum Cmt".split(" "),"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1.","2.","3.","4."],"field-day-relative+-1":"d\u00fcn",
"dateFormatItem-h":"a h","dateTimeFormat-long":"{1} {0}","field-day-relative+-2":"evvelsi g\u00fcn","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"dd/MM E","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"bu cuma","dateFormatItem-yMMMM":"MMMM y","field-fri-relative+1":"gelecek cuma","field-day":"G\u00fcn","days-format-wide":"Pazar Pazartesi Sal\u0131 \u00c7ar\u015famba Per\u015fembe Cuma Cumartesi".split(" "),"field-zone":"Saat Dilimi","dateFormatItem-y":"y","months-standAlone-narrow":"O\u015eMNMHTAEEKA".split(""),
"field-year-relative+-1":"ge\u00e7en y\u0131l","field-month-relative+-1":"ge\u00e7en ay","dateFormatItem-hm":"a h:mm","days-format-abbr":"Paz Pzt Sal \u00c7ar Per Cum Cmt".split(" "),"dateFormatItem-yMMMd":"dd MMM y",eraNames:["Milattan \u00d6nce","Milattan Sonra"],"days-format-narrow":"PPS\u00c7PCC".split(""),"days-standAlone-narrow":"PPS\u00c7PCC".split(""),"dateFormatItem-MMM":"LLL","field-month":"Ay","field-tue-relative+0":"bu sal\u0131","field-tue-relative+1":"gelecek sal\u0131","dayPeriods-format-wide-am":"\u00d6\u00d6",
"dateFormatItem-MMMMEd":"dd MMMM E","dateFormatItem-EHm":"E HH:mm","field-mon-relative+0":"bu pazartesi","field-mon-relative+1":"gelecek pazartesi","dateFormat-short":"d.MM.y","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E a h:mm:ss","field-second":"Saniye","field-sat-relative+-1":"ge\u00e7en cumartesi","dateFormatItem-yMMMEd":"d MMM y E","field-sun-relative+-1":"ge\u00e7en pazar","field-month-relative+0":"bu ay","field-month-relative+1":"gelecek ay","dateFormatItem-Ed":"d E","dateTimeFormats-appendItem-Timezone":"{0} {1}",
"field-week":"Hafta","dateFormat-medium":"d MMM y","field-year-relative+0":"bu y\u0131l","field-week-relative+-1":"ge\u00e7en hafta","field-year-relative+1":"gelecek y\u0131l","dateFormatItem-mmss":"mm:ss","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"a h:mm:ss","dateFormatItem-GyMMM":"G MMM y","field-mon-relative+-1":"ge\u00e7en pazartesi","field-week-relative+0":"bu hafta","field-week-relative+1":"gelecek hafta"})},"mw-datepicker/gregorian/nls/zh/gregorian":function(){define({"dateFormatItem-Ehm":"Eah:mm",
"days-standAlone-short":"\u5468\u65e5 \u5468\u4e00 \u5468\u4e8c \u5468\u4e09 \u5468\u56db \u5468\u4e94 \u5468\u516d".split(" "),"months-format-narrow":"1 2 3 4 5 6 7 8 9 10 11 12".split(" "),"field-second-relative+0":"\u73b0\u5728","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"\u661f\u671f","dateFormatItem-yQQQ":"y\u5e74\u7b2cQ\u5b63\u5ea6","dateFormatItem-yMEd":"y/M/dE","field-wed-relative+0":"\u672c\u5468\u4e09","dateFormatItem-GyMMMEd":"Gy\u5e74M\u6708d\u65e5E","dateFormatItem-MMMEd":"M\u6708d\u65e5E",
"field-wed-relative+1":"\u4e0b\u5468\u4e09",eraNarrow:["\u516c\u5143\u524d","\u516c\u5143"],"dateFormatItem-yMM":"y\u5e74M\u6708","dayPeriods-format-wide-earlyMorning":"\u6e05\u6668","field-tue-relative+-1":"\u4e0a\u5468\u4e8c","dayPeriods-format-wide-morning":"\u4e0a\u5348","days-format-short":"\u5468\u65e5 \u5468\u4e00 \u5468\u4e8c \u5468\u4e09 \u5468\u56db \u5468\u4e94 \u5468\u516d".split(" "),"dateFormat-long":"y\u5e74M\u6708d\u65e5","field-fri-relative+-1":"\u4e0a\u5468\u4e94","field-wed-relative+-1":"\u4e0a\u5468\u4e09",
"months-format-wide":"\u4e00\u6708 \u4e8c\u6708 \u4e09\u6708 \u56db\u6708 \u4e94\u6708 \u516d\u6708 \u4e03\u6708 \u516b\u6708 \u4e5d\u6708 \u5341\u6708 \u5341\u4e00\u6708 \u5341\u4e8c\u6708".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"\u4e0b\u5348","dateFormat-full":"y\u5e74M\u6708d\u65e5EEEE","field-thu-relative+-1":"\u4e0a\u5468\u56db","dateFormatItem-Md":"M/d","dayPeriods-format-narrow-midDay":"\u4e2d\u5348","dayPeriods-format-wide-noon":"\u4e2d\u5348","dateFormatItem-yMd":"y/M/d",
"dateFormatItem-yM":"y/M","field-era":"\u7eaa\u5143","months-standAlone-wide":"\u4e00\u6708 \u4e8c\u6708 \u4e09\u6708 \u56db\u6708 \u4e94\u6708 \u516d\u6708 \u4e03\u6708 \u516b\u6708 \u4e5d\u6708 \u5341\u6708 \u5341\u4e00\u6708 \u5341\u4e8c\u6708".split(" "),"timeFormat-short":"ah:mm","quarters-format-wide":["\u7b2c\u4e00\u5b63\u5ea6","\u7b2c\u4e8c\u5b63\u5ea6","\u7b2c\u4e09\u5b63\u5ea6","\u7b2c\u56db\u5b63\u5ea6"],"timeFormat-long":"zah:mm:ss","dateFormatItem-yMMM":"y\u5e74M\u6708","dateFormatItem-yQQQQ":"y\u5e74\u7b2cQ\u5b63\u5ea6",
"field-year":"\u5e74","dateFormatItem-MMdd":"MM/dd","field-hour":"\u5c0f\u65f6","months-format-abbr":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),"field-sat-relative+0":"\u672c\u5468\u516d","field-sat-relative+1":"\u4e0b\u5468\u516d","timeFormat-full":"zzzzah:mm:ss","dayPeriods-format-narrow-morning":"\u4e0a\u5348","field-day-relative+0":"\u4eca\u5929","field-day-relative+1":"\u660e\u5929","field-thu-relative+0":"\u672c\u5468\u56db",
"dateFormatItem-GyMMMd":"Gy\u5e74M\u6708d\u65e5","field-day-relative+2":"\u540e\u5929","field-thu-relative+1":"\u4e0b\u5468\u56db","dateFormatItem-H":"H\u65f6","months-standAlone-abbr":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),"quarters-format-abbr":["1\u5b63\u5ea6","2\u5b63\u5ea6","3\u5b63\u5ea6","4\u5b63\u5ea6"],"quarters-standAlone-wide":["\u7b2c\u4e00\u5b63\u5ea6","\u7b2c\u4e8c\u5b63\u5ea6","\u7b2c\u4e09\u5b63\u5ea6","\u7b2c\u56db\u5b63\u5ea6"],
"dateFormatItem-Gy":"Gy\u5e74","dateFormatItem-M":"M\u6708","days-standAlone-wide":"\u661f\u671f\u65e5 \u661f\u671f\u4e00 \u661f\u671f\u4e8c \u661f\u671f\u4e09 \u661f\u671f\u56db \u661f\u671f\u4e94 \u661f\u671f\u516d".split(" "),"timeFormat-medium":"ah:mm:ss","field-sun-relative+0":"\u672c\u5468\u65e5","dateFormatItem-Hm":"HH:mm","quarters-standAlone-abbr":["1\u5b63\u5ea6","2\u5b63\u5ea6","3\u5b63\u5ea6","4\u5b63\u5ea6"],"field-sun-relative+1":"\u4e0b\u5468\u65e5",eraAbbr:["\u516c\u5143\u524d","\u516c\u5143"],
"field-minute":"\u5206\u949f","field-dayperiod":"\u4e0a\u5348/\u4e0b\u5348","days-standAlone-abbr":"\u5468\u65e5 \u5468\u4e00 \u5468\u4e8c \u5468\u4e09 \u5468\u56db \u5468\u4e94 \u5468\u516d".split(" "),"dayPeriods-format-wide-night":"\u665a\u4e0a","dateFormatItem-d":"d\u65e5","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"\u6628\u5929","dateFormatItem-h":"ah\u65f6","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"\u4e0a\u5348","field-day-relative+-2":"\u524d\u5929",
"dateFormatItem-MMMd":"M\u6708d\u65e5","dayPeriods-format-wide-midDay":"\u4e2d\u5348","dateFormatItem-MEd":"M/dE","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"\u672c\u5468\u4e94","dateFormatItem-yMMMM":"y\u5e74M\u6708","field-fri-relative+1":"\u4e0b\u5468\u4e94","field-day":"\u65e5","days-format-wide":"\u661f\u671f\u65e5 \u661f\u671f\u4e00 \u661f\u671f\u4e8c \u661f\u671f\u4e09 \u661f\u671f\u56db \u661f\u671f\u4e94 \u661f\u671f\u516d".split(" "),"field-zone":"\u65f6\u533a","months-standAlone-narrow":"1 2 3 4 5 6 7 8 9 10 11 12".split(" "),
"dateFormatItem-y":"y\u5e74","field-year-relative+-1":"\u53bb\u5e74","dayPeriods-format-narrow-night":"\u665a\u4e0a","field-month-relative+-1":"\u4e0a\u4e2a\u6708","dateFormatItem-hm":"ah:mm","dayPeriods-format-narrow-weeHours":"\u51cc\u6668","days-format-abbr":"\u5468\u65e5 \u5468\u4e00 \u5468\u4e8c \u5468\u4e09 \u5468\u56db \u5468\u4e94 \u5468\u516d".split(" "),eraNames:["\u516c\u5143\u524d","\u516c\u5143"],"dateFormatItem-yMMMd":"y\u5e74M\u6708d\u65e5","days-format-narrow":"\u65e5\u4e00\u4e8c\u4e09\u56db\u4e94\u516d".split(""),
"dayPeriods-format-narrow-earlyMorning":"\u6e05\u6668","days-standAlone-narrow":"\u65e5\u4e00\u4e8c\u4e09\u56db\u4e94\u516d".split(""),"dateFormatItem-MMM":"LLL","field-month":"\u6708","field-tue-relative+0":"\u672c\u5468\u4e8c","field-tue-relative+1":"\u4e0b\u5468\u4e8c","dayPeriods-format-wide-am":"\u4e0a\u5348","dateFormatItem-EHm":"EHH:mm","dayPeriods-format-wide-weeHours":"\u51cc\u6668","dateFormatItem-MMMMdd":"M\u6708dd\u65e5","field-mon-relative+0":"\u672c\u5468\u4e00","field-mon-relative+1":"\u4e0b\u5468\u4e00",
"dateFormat-short":"yy/M/d","dayPeriods-format-wide-afternoon":"\u4e0b\u5348","dateFormatItem-EHms":"EHH:mm:ss","dateFormatItem-Ehms":"Eah:mm:ss","dayPeriods-format-narrow-afternoon":"\u4e0b\u5348","dayPeriods-format-narrow-noon":"\u4e2d\u5348","field-second":"\u79d2\u949f","field-sat-relative+-1":"\u4e0a\u5468\u516d","dateFormatItem-yMMMEd":"y\u5e74M\u6708d\u65e5E","field-sun-relative+-1":"\u4e0a\u5468\u65e5","field-month-relative+0":"\u672c\u6708","field-month-relative+1":"\u4e0b\u4e2a\u6708","dateFormatItem-Ed":"d\u65e5E",
"dateTimeFormats-appendItem-Timezone":"{1}{0}","field-week":"\u5468","dateFormat-medium":"y\u5e74M\u6708d\u65e5","field-year-relative+0":"\u4eca\u5e74","field-week-relative+-1":"\u4e0a\u5468","field-year-relative+1":"\u660e\u5e74","dayPeriods-format-narrow-pm":"\u4e0b\u5348","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"ah:mm:ss","dateFormatItem-GyMMM":"Gy\u5e74M\u6708","field-mon-relative+-1":"\u4e0a\u5468\u4e00","field-week-relative+0":"\u672c\u5468","field-week-relative+1":"\u4e0b\u5468"})},
"mw-datepicker/gregorian/nls/zh-cn/gregorian":function(){define({"dateFormatItem-Ehm":"Eah:mm","days-standAlone-short":"\u5468\u65e5 \u5468\u4e00 \u5468\u4e8c \u5468\u4e09 \u5468\u56db \u5468\u4e94 \u5468\u516d".split(" "),"months-format-narrow":"1 2 3 4 5 6 7 8 9 10 11 12".split(" "),"field-second-relative+0":"\u73b0\u5728","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"\u661f\u671f","dateFormatItem-yQQQ":"y\u5e74\u7b2cQ\u5b63\u5ea6","dateFormatItem-yMEd":"y/M/dE","field-wed-relative+0":"\u672c\u5468\u4e09",
"dateFormatItem-GyMMMEd":"Gy\u5e74M\u6708d\u65e5E","dateFormatItem-MMMEd":"M\u6708d\u65e5E","field-wed-relative+1":"\u4e0b\u5468\u4e09",eraNarrow:["\u516c\u5143\u524d","\u516c\u5143"],"dateFormatItem-yMM":"y\u5e74M\u6708","dayPeriods-format-wide-earlyMorning":"\u6e05\u6668","field-tue-relative+-1":"\u4e0a\u5468\u4e8c","dayPeriods-format-wide-morning":"\u4e0a\u5348","days-format-short":"\u5468\u65e5 \u5468\u4e00 \u5468\u4e8c \u5468\u4e09 \u5468\u56db \u5468\u4e94 \u5468\u516d".split(" "),"dateFormat-long":"y\u5e74M\u6708d\u65e5",
"field-fri-relative+-1":"\u4e0a\u5468\u4e94","field-wed-relative+-1":"\u4e0a\u5468\u4e09","months-format-wide":"\u4e00\u6708 \u4e8c\u6708 \u4e09\u6708 \u56db\u6708 \u4e94\u6708 \u516d\u6708 \u4e03\u6708 \u516b\u6708 \u4e5d\u6708 \u5341\u6708 \u5341\u4e00\u6708 \u5341\u4e8c\u6708".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"\u4e0b\u5348","dateFormat-full":"y\u5e74M\u6708d\u65e5EEEE","field-thu-relative+-1":"\u4e0a\u5468\u56db","dateFormatItem-Md":"M/d","dayPeriods-format-narrow-midDay":"\u4e2d\u5348",
"dayPeriods-format-wide-noon":"\u4e2d\u5348","dateFormatItem-yMd":"y/M/d","dateFormatItem-yM":"y/M","field-era":"\u7eaa\u5143","months-standAlone-wide":"\u4e00\u6708 \u4e8c\u6708 \u4e09\u6708 \u56db\u6708 \u4e94\u6708 \u516d\u6708 \u4e03\u6708 \u516b\u6708 \u4e5d\u6708 \u5341\u6708 \u5341\u4e00\u6708 \u5341\u4e8c\u6708".split(" "),"timeFormat-short":"ah:mm","quarters-format-wide":["\u7b2c\u4e00\u5b63\u5ea6","\u7b2c\u4e8c\u5b63\u5ea6","\u7b2c\u4e09\u5b63\u5ea6","\u7b2c\u56db\u5b63\u5ea6"],"timeFormat-long":"zah:mm:ss",
"dateFormatItem-yMMM":"y\u5e74M\u6708","dateFormatItem-yQQQQ":"y\u5e74\u7b2cQ\u5b63\u5ea6","field-year":"\u5e74","dateFormatItem-MMdd":"MM/dd","field-hour":"\u5c0f\u65f6","months-format-abbr":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),"field-sat-relative+0":"\u672c\u5468\u516d","field-sat-relative+1":"\u4e0b\u5468\u516d","timeFormat-full":"zzzzah:mm:ss","dayPeriods-format-narrow-morning":"\u4e0a\u5348","field-day-relative+0":"\u4eca\u5929",
"field-day-relative+1":"\u660e\u5929","field-thu-relative+0":"\u672c\u5468\u56db","dateFormatItem-GyMMMd":"Gy\u5e74M\u6708d\u65e5","field-day-relative+2":"\u540e\u5929","field-thu-relative+1":"\u4e0b\u5468\u56db","dateFormatItem-H":"H\u65f6","months-standAlone-abbr":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),"quarters-format-abbr":["1\u5b63\u5ea6","2\u5b63\u5ea6","3\u5b63\u5ea6","4\u5b63\u5ea6"],"quarters-standAlone-wide":["\u7b2c\u4e00\u5b63\u5ea6",
"\u7b2c\u4e8c\u5b63\u5ea6","\u7b2c\u4e09\u5b63\u5ea6","\u7b2c\u56db\u5b63\u5ea6"],"dateFormatItem-Gy":"Gy\u5e74","dateFormatItem-M":"M\u6708","days-standAlone-wide":"\u661f\u671f\u65e5 \u661f\u671f\u4e00 \u661f\u671f\u4e8c \u661f\u671f\u4e09 \u661f\u671f\u56db \u661f\u671f\u4e94 \u661f\u671f\u516d".split(" "),"timeFormat-medium":"ah:mm:ss","field-sun-relative+0":"\u672c\u5468\u65e5","dateFormatItem-Hm":"HH:mm","quarters-standAlone-abbr":["1\u5b63\u5ea6","2\u5b63\u5ea6","3\u5b63\u5ea6","4\u5b63\u5ea6"],
"field-sun-relative+1":"\u4e0b\u5468\u65e5",eraAbbr:["\u516c\u5143\u524d","\u516c\u5143"],"field-minute":"\u5206\u949f","field-dayperiod":"\u4e0a\u5348/\u4e0b\u5348","days-standAlone-abbr":"\u5468\u65e5 \u5468\u4e00 \u5468\u4e8c \u5468\u4e09 \u5468\u56db \u5468\u4e94 \u5468\u516d".split(" "),"dayPeriods-format-wide-night":"\u665a\u4e0a","dateFormatItem-d":"d\u65e5","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"\u6628\u5929","dateFormatItem-h":"ah\u65f6",
"dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"\u4e0a\u5348","field-day-relative+-2":"\u524d\u5929","dateFormatItem-MMMd":"M\u6708d\u65e5","dayPeriods-format-wide-midDay":"\u4e2d\u5348","dateFormatItem-MEd":"M/dE","dateTimeFormat-full":"{1} {0}","field-fri-relative+0":"\u672c\u5468\u4e94","dateFormatItem-yMMMM":"y\u5e74M\u6708","field-fri-relative+1":"\u4e0b\u5468\u4e94","field-day":"\u65e5","days-format-wide":"\u661f\u671f\u65e5 \u661f\u671f\u4e00 \u661f\u671f\u4e8c \u661f\u671f\u4e09 \u661f\u671f\u56db \u661f\u671f\u4e94 \u661f\u671f\u516d".split(" "),
"field-zone":"\u65f6\u533a","months-standAlone-narrow":"1 2 3 4 5 6 7 8 9 10 11 12".split(" "),"dateFormatItem-y":"y\u5e74","field-year-relative+-1":"\u53bb\u5e74","dayPeriods-format-narrow-night":"\u665a\u4e0a","field-month-relative+-1":"\u4e0a\u4e2a\u6708","dateFormatItem-hm":"ah:mm","dayPeriods-format-narrow-weeHours":"\u51cc\u6668","days-format-abbr":"\u5468\u65e5 \u5468\u4e00 \u5468\u4e8c \u5468\u4e09 \u5468\u56db \u5468\u4e94 \u5468\u516d".split(" "),eraNames:["\u516c\u5143\u524d","\u516c\u5143"],
"dateFormatItem-yMMMd":"y\u5e74M\u6708d\u65e5","days-format-narrow":"\u65e5\u4e00\u4e8c\u4e09\u56db\u4e94\u516d".split(""),"dayPeriods-format-narrow-earlyMorning":"\u6e05\u6668","days-standAlone-narrow":"\u65e5\u4e00\u4e8c\u4e09\u56db\u4e94\u516d".split(""),"dateFormatItem-MMM":"LLL","field-month":"\u6708","field-tue-relative+0":"\u672c\u5468\u4e8c","field-tue-relative+1":"\u4e0b\u5468\u4e8c","dayPeriods-format-wide-am":"\u4e0a\u5348","dateFormatItem-EHm":"EHH:mm","dayPeriods-format-wide-weeHours":"\u51cc\u6668",
"dateFormatItem-MMMMdd":"M\u6708dd\u65e5","field-mon-relative+0":"\u672c\u5468\u4e00","field-mon-relative+1":"\u4e0b\u5468\u4e00","dateFormat-short":"yy/M/d","dayPeriods-format-wide-afternoon":"\u4e0b\u5348","dateFormatItem-EHms":"EHH:mm:ss","dateFormatItem-Ehms":"Eah:mm:ss","dayPeriods-format-narrow-afternoon":"\u4e0b\u5348","dayPeriods-format-narrow-noon":"\u4e2d\u5348","field-second":"\u79d2\u949f","field-sat-relative+-1":"\u4e0a\u5468\u516d","dateFormatItem-yMMMEd":"y\u5e74M\u6708d\u65e5E","field-sun-relative+-1":"\u4e0a\u5468\u65e5",
"field-month-relative+0":"\u672c\u6708","field-month-relative+1":"\u4e0b\u4e2a\u6708","dateFormatItem-Ed":"d\u65e5E","dateTimeFormats-appendItem-Timezone":"{1}{0}","field-week":"\u5468","dateFormat-medium":"y\u5e74M\u6708d\u65e5","field-year-relative+0":"\u4eca\u5e74","field-week-relative+-1":"\u4e0a\u5468","field-year-relative+1":"\u660e\u5e74","dayPeriods-format-narrow-pm":"\u4e0b\u5348","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"ah:mm:ss","dateFormatItem-GyMMM":"Gy\u5e74M\u6708",
"field-mon-relative+-1":"\u4e0a\u5468\u4e00","field-week-relative+0":"\u672c\u5468","field-week-relative+1":"\u4e0b\u5468"})},"mw-datepicker/gregorian/nls/zh-hant/gregorian":function(){define({"dateFormatItem-Ehm":"E a h:mm","days-standAlone-short":"\u65e5\u4e00\u4e8c\u4e09\u56db\u4e94\u516d".split(""),"months-format-narrow":"1 2 3 4 5 6 7 8 9 10 11 12".split(" "),"field-second-relative+0":"\u73fe\u5728","quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"\u9031\u5929","dateFormatItem-yQQQ":"y\u5e74QQQ",
"dateFormatItem-yMEd":"y/M/d\uff08E\uff09","field-wed-relative+0":"\u672c\u9031\u4e09","dateFormatItem-GyMMMEd":"G y \u5e74 M \u6708 d \u65e5E","dateFormatItem-MMMEd":"M\u6708d\u65e5E","field-wed-relative+1":"\u4e0b\u9031\u4e09",eraNarrow:["\u897f\u5143\u524d","\u516c\u5143\u524d","\u897f\u5143","\u516c\u5143"],"dateFormatItem-yMM":"y-MM","dayPeriods-format-wide-earlyMorning":"\u6e05\u6668","field-tue-relative+-1":"\u4e0a\u9031\u4e8c","dayPeriods-format-wide-morning":"\u4e0a\u5348","days-format-short":"\u65e5\u4e00\u4e8c\u4e09\u56db\u4e94\u516d".split(""),
"dateFormat-long":"y\u5e74M\u6708d\u65e5","field-fri-relative+-1":"\u4e0a\u9031\u4e94","field-wed-relative+-1":"\u4e0a\u9031\u4e09","months-format-wide":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),"dateTimeFormat-medium":"{1} {0}","dayPeriods-format-wide-pm":"\u4e0b\u5348","dateFormat-full":"y\u5e74M\u6708d\u65e5EEEE","field-thu-relative+-1":"\u4e0a\u9031\u56db","dateFormatItem-Md":"M/d","dayPeriods-format-narrow-midDay":"\u4e2d\u5348",
"dayPeriods-format-wide-noon":"\u4e2d\u5348","dateFormatItem-yMd":"y/M/d","dateFormatItem-yM":"y/M","field-era":"\u5e74\u4ee3","months-standAlone-wide":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),"timeFormat-short":"ah:mm","quarters-format-wide":["\u7b2c1\u5b63","\u7b2c2\u5b63","\u7b2c3\u5b63","\u7b2c4\u5b63"],"timeFormat-long":"zah\u6642mm\u5206ss\u79d2","dateFormatItem-yMMM":"y\u5e74M\u6708","dateFormatItem-yQQQQ":"y\u5e74QQQQ",
"field-year":"\u5e74","dateFormatItem-MMdd":"MM/dd","field-hour":"\u5c0f\u6642","months-format-abbr":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),"field-sat-relative+0":"\u672c\u9031\u516d","field-sat-relative+1":"\u4e0b\u9031\u516d","timeFormat-full":"zzzzah\u6642mm\u5206ss\u79d2","dayPeriods-format-narrow-morning":"\u4e0a\u5348","field-day-relative+0":"\u4eca\u5929","field-day-relative+1":"\u660e\u5929","field-thu-relative+0":"\u672c\u9031\u56db",
"dateFormatItem-GyMMMd":"G y \u5e74 M \u6708 d \u65e5","field-day-relative+2":"\u5f8c\u5929","field-thu-relative+1":"\u4e0b\u9031\u56db","dateFormatItem-H":"H\u6642","months-standAlone-abbr":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),"quarters-format-abbr":["1\u5b63","2\u5b63","3\u5b63","4\u5b63"],"quarters-standAlone-wide":["\u7b2c1\u5b63","\u7b2c2\u5b63","\u7b2c3\u5b63","\u7b2c4\u5b63"],"dateFormatItem-Gy":"G y \u5e74","dateFormatItem-M":"M\u6708",
"days-standAlone-wide":"\u661f\u671f\u65e5 \u661f\u671f\u4e00 \u661f\u671f\u4e8c \u661f\u671f\u4e09 \u661f\u671f\u56db \u661f\u671f\u4e94 \u661f\u671f\u516d".split(" "),"timeFormat-medium":"ah:mm:ss","field-sun-relative+0":"\u672c\u9031\u65e5","dateFormatItem-Hm":"HH:mm","quarters-standAlone-abbr":["1\u5b63","2\u5b63","3\u5b63","4\u5b63"],"field-sun-relative+1":"\u4e0b\u9031\u65e5",eraAbbr:["\u897f\u5143\u524d","\u897f\u5143"],"field-minute":"\u5206\u9418","field-dayperiod":"\u4e0a\u5348/\u4e0b\u5348",
"days-standAlone-abbr":"\u9031\u65e5 \u9031\u4e00 \u9031\u4e8c \u9031\u4e09 \u9031\u56db \u9031\u4e94 \u9031\u516d".split(" "),"dayPeriods-format-wide-night":"\u665a\u4e0a","dateFormatItem-d":"d\u65e5","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"\u6628\u5929","dateFormatItem-h":"ah\u6642","dateTimeFormat-long":"{1} {0}","dayPeriods-format-narrow-am":"\u4e0a\u5348","field-day-relative+-2":"\u524d\u5929","dateFormatItem-MMMd":"M\u6708d\u65e5","dayPeriods-format-wide-midDay":"\u4e2d\u5348",
"dateFormatItem-MEd":"M/d\uff08E\uff09","dateTimeFormat-full":"{1}{0}","field-fri-relative+0":"\u672c\u9031\u4e94","dateFormatItem-yMMMM":"y\u5e74M\u6708","field-fri-relative+1":"\u4e0b\u9031\u4e94","field-day":"\u65e5","days-format-wide":"\u661f\u671f\u65e5 \u661f\u671f\u4e00 \u661f\u671f\u4e8c \u661f\u671f\u4e09 \u661f\u671f\u56db \u661f\u671f\u4e94 \u661f\u671f\u516d".split(" "),"field-zone":"\u6642\u5340","months-standAlone-narrow":"1 2 3 4 5 6 7 8 9 10 11 12".split(" "),"dateFormatItem-y":"y\u5e74",
"field-year-relative+-1":"\u53bb\u5e74","dayPeriods-format-narrow-night":"\u665a\u4e0a","field-month-relative+-1":"\u4e0a\u500b\u6708","dateFormatItem-hm":"ah:mm","dayPeriods-format-narrow-weeHours":"\u51cc\u6668","days-format-abbr":"\u9031\u65e5 \u9031\u4e00 \u9031\u4e8c \u9031\u4e09 \u9031\u56db \u9031\u4e94 \u9031\u516d".split(" "),eraNames:["\u897f\u5143\u524d","\u516c\u5143\u524d","\u897f\u5143","\u516c\u5143"],"dateFormatItem-yMMMd":"y\u5e74M\u6708d\u65e5","days-format-narrow":"\u65e5\u4e00\u4e8c\u4e09\u56db\u4e94\u516d".split(""),
"dayPeriods-format-narrow-earlyMorning":"\u6e05\u6668","days-standAlone-narrow":"\u65e5\u4e00\u4e8c\u4e09\u56db\u4e94\u516d".split(""),"dateFormatItem-MMM":"LLL","field-month":"\u6708","field-tue-relative+0":"\u672c\u9031\u4e8c","field-tue-relative+1":"\u4e0b\u9031\u4e8c","dayPeriods-format-wide-am":"\u4e0a\u5348","dateFormatItem-EHm":"E HH:mm","dayPeriods-format-wide-weeHours":"\u51cc\u6668","dateFormatItem-MMMMdd":"M\u6708dd\u65e5","field-mon-relative+0":"\u672c\u9031\u4e00","field-mon-relative+1":"\u4e0b\u9031\u4e00",
"dateFormat-short":"y/M/d","dayPeriods-format-wide-afternoon":"\u4e0b\u5348","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-Ehms":"E a h:mm:ss","dayPeriods-format-narrow-afternoon":"\u4e0b\u5348","dayPeriods-format-narrow-noon":"\u4e2d\u5348","field-second":"\u79d2","field-sat-relative+-1":"\u4e0a\u9031\u516d","dateFormatItem-yMMMEd":"y\u5e74M\u6708d\u65e5E","field-sun-relative+-1":"\u4e0a\u9031\u65e5","field-month-relative+0":"\u672c\u6708","field-month-relative+1":"\u4e0b\u500b\u6708","dateFormatItem-Ed":"d\u65e5\uff08E\uff09",
"dateTimeFormats-appendItem-Timezone":"{0} {1}","field-week":"\u9031","dateFormat-medium":"y\u5e74M\u6708d\u65e5","field-year-relative+0":"\u4eca\u5e74","field-week-relative+-1":"\u4e0a\u9031","field-year-relative+1":"\u660e\u5e74","dayPeriods-format-narrow-pm":"\u4e0b\u5348","dateTimeFormat-short":"{1} {0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"ah:mm:ss","dateFormatItem-GyMMM":"G y \u5e74 M \u6708","field-mon-relative+-1":"\u4e0a\u9031\u4e00","field-week-relative+0":"\u672c\u9031",
"field-week-relative+1":"\u4e0b\u9031"})},"mw-datepicker/gregorian/nls/zh-hk/gregorian":function(){define({"field-sat-relative+0":"\u672c\u9031\u516d","field-sat-relative+1":"\u4e0b\u9031\u516d","field-sun-relative+-1":"\u4e0a\u9031\u65e5","field-mon-relative+-1":"\u4e0a\u9031\u4e00","field-minute":"\u5206\u9418",eraNames:["\u897f\u5143\u524d","\u897f\u5143"],"dateTimeFormat-full":"{1}{0}","field-weekday":"\u9031\u5929","dateFormatItem-yQQQ":"y\u5e74QQQ","field-era":"\u5e74\u4ee3","dateFormatItem-Gy":"G y \u5e74",
"field-hour":"\u5c0f\u6642","quarters-standAlone-abbr":["\u7b2c1\u5b63","\u7b2c2\u5b63","\u7b2c3\u5b63","\u7b2c4\u5b63"],"timeFormat-full":"zzzzah\u6642mm\u5206ss\u79d2","dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-yMM":"y-MM","field-sun-relative+0":"\u672c\u9031\u65e5","field-sun-relative+1":"\u4e0b\u9031\u65e5","field-wed-relative+-1":"\u4e0a\u9031\u4e09","dateFormatItem-Ed":"d\u65e5\uff08E\uff09",eraAbbr:["\u897f\u5143\u524d","\u897f\u5143"],"field-day-relative+2":"\u5f8c\u5929",
"dateFormatItem-GyMMMd":"G y \u5e74 M \u6708 d \u65e5","field-zone":"\u6642\u5340","field-tue-relative+0":"\u672c\u9031\u4e8c","dateFormatItem-Ehm":"E a h:mm","field-tue-relative+1":"\u4e0b\u9031\u4e8c","field-week-relative+-1":"\u4e0a\u9031","field-sat-relative+-1":"\u4e0a\u9031\u516d",$locale:"zh-hant-hk","quarters-standAlone-wide":["\u7b2c1\u5b63","\u7b2c2\u5b63","\u7b2c3\u5b63","\u7b2c4\u5b63"],"field-fri-relative+0":"\u672c\u9031\u4e94","field-fri-relative+1":"\u4e0b\u9031\u4e94","months-standAlone-wide":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),
"field-week":"\u9031","field-week-relative+0":"\u672c\u9031","dateFormatItem-Ehms":"E a h:mm:ss","field-week-relative+1":"\u4e0b\u9031","timeFormat-long":"zah\u6642mm\u5206ss\u79d2","dateFormatItem-yQQQQ":"y\u5e74QQQQ","field-month-relative+1":"\u4e0b\u500b\u6708","dateFormatItem-H":"H\u6642","field-fri-relative+-1":"\u4e0a\u9031\u4e94","quarters-format-abbr":["\u7b2c1\u5b63","\u7b2c2\u5b63","\u7b2c3\u5b63","\u7b2c4\u5b63"],"field-second":"\u79d2","dateFormatItem-GyMMMEd":"G y \u5e74 M \u6708 d \u65e5E",
"field-tue-relative+-1":"\u4e0a\u9031\u4e8c","dateFormatItem-GyMMM":"G y \u5e74 M \u6708","dateFormatItem-MEd":"M/d\uff08E\uff09","field-mon-relative+0":"\u672c\u9031\u4e00","field-mon-relative+1":"\u4e0b\u9031\u4e00","field-second-relative+0":"\u73fe\u5728","field-thu-relative+0":"\u672c\u9031\u56db","dateFormat-short":"y/M/d","field-thu-relative+1":"\u4e0b\u9031\u56db","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-EHm":"E HH:mm","dateFormatItem-yMEd":"y/M/d\uff08E\uff09","field-wed-relative+0":"\u672c\u9031\u4e09",
"months-format-wide":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),"field-wed-relative+1":"\u4e0b\u9031\u4e09","field-month-relative+-1":"\u4e0a\u500b\u6708","quarters-format-wide":["\u7b2c1\u5b63","\u7b2c2\u5b63","\u7b2c3\u5b63","\u7b2c4\u5b63"],eraNarrow:["\u897f\u5143\u524d","\u897f\u5143"],"dateFormatItem-h":"ah\u6642","field-thu-relative+-1":"\u4e0a\u9031\u56db"})},"mw-datepicker/gregorian/nls/zh-tw/gregorian":function(){define({"field-sat-relative+0":"\u672c\u9031\u516d",
"field-sat-relative+1":"\u4e0b\u9031\u516d","field-sun-relative+-1":"\u4e0a\u9031\u65e5","field-mon-relative+-1":"\u4e0a\u9031\u4e00","field-minute":"\u5206\u9418",eraNames:["\u897f\u5143\u524d","\u897f\u5143"],"dateTimeFormat-full":"{1}{0}","field-weekday":"\u9031\u5929","dateFormatItem-yQQQ":"y\u5e74QQQ","field-era":"\u5e74\u4ee3","dateFormatItem-Gy":"G y \u5e74","field-hour":"\u5c0f\u6642","quarters-standAlone-abbr":["\u7b2c1\u5b63","\u7b2c2\u5b63","\u7b2c3\u5b63","\u7b2c4\u5b63"],"timeFormat-full":"zzzzah\u6642mm\u5206ss\u79d2",
"dateTimeFormats-appendItem-Timezone":"{0} {1}","dateFormatItem-yMM":"y-MM","field-sun-relative+0":"\u672c\u9031\u65e5","field-sun-relative+1":"\u4e0b\u9031\u65e5","field-wed-relative+-1":"\u4e0a\u9031\u4e09","dateFormatItem-Ed":"d\u65e5\uff08E\uff09",eraAbbr:["\u897f\u5143\u524d","\u897f\u5143"],"field-day-relative+2":"\u5f8c\u5929","dateFormatItem-GyMMMd":"G y \u5e74 M \u6708 d \u65e5","field-zone":"\u6642\u5340","field-tue-relative+0":"\u672c\u9031\u4e8c","dateFormatItem-Ehm":"E a h:mm","field-tue-relative+1":"\u4e0b\u9031\u4e8c",
"field-week-relative+-1":"\u4e0a\u9031","field-sat-relative+-1":"\u4e0a\u9031\u516d",$locale:"zh-hant-tw","quarters-standAlone-wide":["\u7b2c1\u5b63","\u7b2c2\u5b63","\u7b2c3\u5b63","\u7b2c4\u5b63"],"field-fri-relative+0":"\u672c\u9031\u4e94","field-fri-relative+1":"\u4e0b\u9031\u4e94","months-standAlone-wide":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),"field-week":"\u9031","field-week-relative+0":"\u672c\u9031","dateFormatItem-Ehms":"E a h:mm:ss",
"field-week-relative+1":"\u4e0b\u9031","timeFormat-long":"zah\u6642mm\u5206ss\u79d2","dateFormatItem-yQQQQ":"y\u5e74QQQQ","field-month-relative+1":"\u4e0b\u500b\u6708","dateFormatItem-H":"H\u6642","field-fri-relative+-1":"\u4e0a\u9031\u4e94","quarters-format-abbr":["\u7b2c1\u5b63","\u7b2c2\u5b63","\u7b2c3\u5b63","\u7b2c4\u5b63"],"field-second":"\u79d2","dateFormatItem-GyMMMEd":"G y \u5e74 M \u6708 d \u65e5E","field-tue-relative+-1":"\u4e0a\u9031\u4e8c","dateFormatItem-GyMMM":"G y \u5e74 M \u6708",
"dateFormatItem-MEd":"M/d\uff08E\uff09","field-mon-relative+0":"\u672c\u9031\u4e00","field-mon-relative+1":"\u4e0b\u9031\u4e00","field-second-relative+0":"\u73fe\u5728","field-thu-relative+0":"\u672c\u9031\u56db","dateFormat-short":"y/M/d","field-thu-relative+1":"\u4e0b\u9031\u56db","dateFormatItem-EHms":"E HH:mm:ss","dateFormatItem-EHm":"E HH:mm","dateFormatItem-yMEd":"y/M/d\uff08E\uff09","field-wed-relative+0":"\u672c\u9031\u4e09","months-format-wide":"1\u6708 2\u6708 3\u6708 4\u6708 5\u6708 6\u6708 7\u6708 8\u6708 9\u6708 10\u6708 11\u6708 12\u6708".split(" "),
"field-wed-relative+1":"\u4e0b\u9031\u4e09","field-month-relative+-1":"\u4e0a\u500b\u6708","quarters-format-wide":["\u7b2c1\u5b63","\u7b2c2\u5b63","\u7b2c3\u5b63","\u7b2c4\u5b63"],eraNarrow:["\u897f\u5143\u524d","\u897f\u5143"],"dateFormatItem-h":"ah\u6642","field-thu-relative+-1":"\u4e0a\u9031\u56db"})},"variableeditor/views/editors/ArrayOfNumbersTextBoxEditor":function(){define("variableeditor/views/editors/ArrayOfNumbersTextBoxEditor",["dojo/_base/declare","datatoolsservices/DataToolsUtils","variableeditor/views/editors/ArrayOfValuesTextBoxEditor"],
function(g,f,e){return g("variableeditor.views.editors.ArrayOfNumbersTextBoxEditor",[e],{_getEmptyReturnValue:function(){return[]}})})},"variableeditor/views/editors/FontNameEditor":function(){define("variableeditor/views/editors/FontNameEditor",["dojo/_base/lang","dojo/_base/declare","variableeditor/views/editors/ComboBoxEditor","variableeditor/views/editors/FontNameHelper"],function(g,f,e,d){var b;return f("variableeditor.views.editors.ComboBoxEditor",[e],{constructor:function(){b||this._getMATLABFontList()},
postCreate:function(){this.inherited(arguments);b&&this._updateCategories(b)},_createComboBox:function(){this.inherited(arguments);b?(this._categories=b,this._comboBox.store=this.getStore()):this._getMATLABFontList()},_getMATLABFontList:function(){(new d).getFonts().then(g.hitch(this,function(a){this._setMATLABFontNames(a)}))},_setMATLABFontNames:function(a){a&&a[0]&&(b=a=a[0],this._updateCategories(a))}})})},"variableeditor/views/editors/ComboBoxEditor":function(){define("variableeditor/views/editors/ComboBoxEditor",
"dojo/_base/declare dojo/_base/lang dojo/dom-style dojo/dom-construct dojo/keys dojo/on datatoolsservices/DataToolsUtils variableeditor/views/editors/_EditorBase dijit/form/ComboBox dijit/form/FilteringSelect dojo/store/Memory dijit/focus".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p){return g("variableeditor.views.editors.ComboBoxEditor",[h],{_comboBox:void 0,_isProtected:!1,_isOverrideMode:!1,_showUndefined:!0,_categories:[],_comboChangeListeners:void 0,_showDropDownArrow:!0,_doubleClickDuration:0,
_clientValidation:!0,_oldState:null,setValue:function(a,c){var h=a;a&&a.hasOwnProperty("value")&&(h=a.value);this.inherited(arguments);this.domNode&&(this._comboBox||this._createComboBox(),this._value=""+h,this._comboBox.set("value",h),this._comboBox.set("displayedValue",h))},startup:function(){this._setReadOnly(!0)},_focus:function(){this._comboBox&&this._comboBox.focusNode&&this._comboBox.focusNode.focus&&p.curNode!==this._comboBox.focusNode&&p.focus(this._comboBox.focusNode)},setState:function(a){this.domNode&&
JSON.stringify(this._oldState)!==JSON.stringify(a)&&(this._oldState=JSON.parse(JSON.stringify(a)),a&&(this._clientValidation=void 0!==a.clientValidation?a.clientValidation:!0,this._isProtected=void 0!==a.isProtected?a.isProtected:!1,this._showUndefined=void 0!==a.showUndefined?a.showUndefined:!0,this._categories=a.categories?a.categories:this._categories,this._showDropDownArrow=void 0!==a.showDropDownArrow?this._getPossibleBooleanFunctionValue(a.showDropDownArrow):this.isEditable(),this._createComboBox(),
this._comboBox.textbox.setAttribute("data-tag",this.createDataTag("value")),this._setupDomClasses(a)),this.inherited(arguments))},_setupDomClasses:function(a){this.addCSSClasses("cellRenderer",this.domNode);this.isEditable()?this.removeCSSClasses("variableEditorNotEditable",this.domNode):this.addCSSClasses("variableEditorNotEditable",this.domNode)},getStore:function(){var a=this._categories,c=new m;if(a){for(var h=0;h<a.length;h+=1)c.put({name:a[h],id:a[h]});this._getPossibleBooleanFunctionValue(this._showUndefined,
!1)&&c.put({name:"\x3cundefined\x3e",id:"\x3cundefined\x3e"})}return c},updateStore:function(a){var c=this.getStore();if(!(0<c.query({name:a}).length)){c.put({name:a,id:a});a=c.query({});for(var c=[],h=0;h<a.length;h+=1)c[h]=a[h].name;this._updateCategories(c)}},_updateCategories:function(a){var c=this.getState(),h={isProtected:this._isProtected,showUndefined:this._showUndefined};c&&(h=f.clone(c));h.categories=a;this.setState(h)},isInStore:function(a){return 0<this.getStore().query({name:a}).length},
_createComboBox:function(){var h=this._getPossibleBooleanFunctionValue(this._isProtected,!1);if(h?this._comboBox&&this._comboBox.isInstanceOf&&this._comboBox.isInstanceOf(l):this._comboBox&&this._comboBox.isInstanceOf&&this._comboBox.isInstanceOf(k))this._comboBox.store=this.getStore(),this._comboBox.set("value",this._value),this._comboBox.set("displayedValue",this._value),this._showDropDownArrow?this.removeCSSClasses("noArrow",this._comboBox.domNode):this.addCSSClasses("noArrow",this._comboBox.domNode);
else{var b="";this._comboBox&&this._comboBox.focusNode&&(b=this._comboBox.focusNode.getAttribute("style"));this._comboBox&&this._comboBox.destroyRecursive&&this._comboBox.destroyRecursive();var m=c.mergeObjects(this._allArgs,{"class":"vecombobox",value:this._value,displayedValue:this._value,store:this.getStore(),autoComplete:!0,searchAttribute:"name",invalidMessage:"",missingMessage:"",readOnly:!0,commitOnBlur:null});h?(m.name="categories",this._comboBox=this._clientValidation?new l(m,"vecombobox"):
new k(m,"vecombobox")):this._comboBox=new k(m,"vecombobox");this._comboBox.domNode.setAttribute("data-tag",this.createDataTag("comboboxeditor"));this.addCSSClasses(["variableEditorRenderers","cell","vecombobox"],this._comboBox.domNode);this._comboBox.focusNode.style=b;h=f.hitch(this,"_handleKeyboardEvent");a(this._comboBox.domNode,"keypress",h);this._showDropDownArrow?this.removeCSSClasses("noArrow",this._comboBox.domNode):this.addCSSClasses("noArrow",this._comboBox.domNode);this._comboChangeListeners=
{};this._comboChangeListeners._onChangeListener=a.pausable(this._comboBox,"change",f.hitch(this,"_comboBoxChanged"));this._changeObjectListenersState(this._comboChangeListeners,"pause");var p=this,g=this._comboBox.openDropDown;this._comboBox.openDropDown=function(){g.apply(this);p.addCSSClasses("DropDownOpen");p._isOverrideMode||p._selectAllText();var c=[];p._allArgs.cssSpecifier&&c.push(p._allArgs.cssSpecifier);c.push("variableEditorRenderers");c.push("veComboBoxDropDown");p.addCSSClasses(c,p._comboBox.dropDown.domNode);
p._comboBox.dropDown.domNode.parentNode&&"scroll"===e.get(p._comboBox.dropDown.domNode.parentNode,"overflow-y")&&e.set(p._comboBox.dropDown.domNode.parentNode,"border","1px solid rgb(126, 171, 205)");a(p._comboBox.dropDown,"close",f.hitch(this,function(){p.removeCSSClasses("DropDownOpen")}))};this._comboBox.startup();d.empty(this.domNode);this.domNode.appendChild(this._comboBox.domNode);this.own(this._comboBox)}},_handleKeyboardEvent:function(a){if(this.isEditing()){"keypress"===a.type?this._handleKeyPress(a):
"keydown"===a.type&&this._handleKeyDown(a);var c=f.mixin({editor:this},a);this.dispatchEvent(a.type,this.domNode,c);a.stopPropagation()}else this.inherited(arguments)},_handleKeyDown:function(a){var c=this._getKeyCode(a);a&&(null!==c&&c===b.ESCAPE)&&this.cancelEditing()},_handleKeyPress:function(a){var c=this._getKeyCode(a);a&&(null!==c&&c===b.ENTER)&&(!this._clientValidation&&!this.isInStore(this._getUIValue())?this.cancelEditing():this.stopEditing())},_handleBlurEvent:function(a){a===this&&(this.isEditing()&&
(!this._clientValidation&&!this.isInStore(this._getUIValue()))&&this.cancelEditing(),this.inherited(arguments))},postCreate:function(){this._comboBox||this._createComboBox();this._setReadOnly(!0);this.inherited(arguments)},stopEditing:function(){this._changeObjectListenersState(this._comboChangeListeners,"pause");this._comboBox&&this._comboBox.closeDropDown();this.inherited(arguments);this._showDropDownArrow?this.removeCSSClasses("noArrow",this._comboBox.domNode):this.addCSSClasses("noArrow",this._comboBox.domNode);
this._setReadOnly(!0)},edit:function(){this.inherited(arguments);this.removeCSSClasses("noArrow",this._comboBox.domNode);this._setReadOnly(!1);this._comboBox.loadAndOpenDropDown();this._comboBox.dropDown&&(this._comboChangeListeners._onDDChangeListener||(this._comboChangeListeners._onDDChangeListener=a.pausable(this._comboBox.dropDown,"change",f.hitch(this,"_comboBoxChanged"))),this._comboChangeListeners._onDDSelectListener||(this._comboChangeListeners._onDDSelectListener=a.pausable(this._comboBox.dropDown,
"select",f.hitch(this,"_comboBoxChanged"))));this._changeObjectListenersState(this._comboChangeListeners,"resume")},_getDefaultState:function(){return{categories:[],showDropDownArrow:!0,showUndefined:!0,isProtected:!1}},_handleMouseUp:function(){this._comboBox.textbox.focus()},_handleMouseEvent:function(a){this._editOnSingleClick&&(a&&"mouseover"===a.type?this.removeCSSClasses("noArrow",this._comboBox.domNode):a&&"mouseout"===a.type&&(this._showDropDownArrow?this.removeCSSClasses("noArrow",this._comboBox.domNode):
this.addCSSClasses("noArrow",this._comboBox.domNode)));this.inherited(arguments)},_comboBoxChanged:function(a){this.isEditing()&&(a&&a.textContent&&(a=a.textContent),0<a.trim().length&&(this._setUIValue(a),this.updateStore(a),this.stopEditing()))},editOverride:function(a){this.isEditing()||(a&&this._comboBox&&this._comboBox.textbox&&this._comboBox.textbox?(this._isOverrideMode=!0,this._comboBox.textbox.value=a,this.edit()):(this.edit(),this._selectAllText()))},cancelEditing:function(){this.isEditing()&&
this._setUIValue(this._originalValue);this.inherited(arguments)},_selectAllText:function(){this._comboBox&&(this._comboBox.textbox&&this._comboBox.textbox.select)&&this._comboBox.textbox.select()},_getUIValue:function(){return this._comboBox.textbox.value},_setUIValue:function(a){return this._comboBox.set("value",a)},setEditable:function(a){this.inherited(arguments);this._comboBox&&(this.isEditable()?this.removeCSSClasses(this._notEditableCSSClass,this._comboBox.textbox):this.addCSSClasses(this._notEditableCSSClass,
this._comboBox.textbox))},_setReadOnly:function(a){this._comboBox&&(!0===a?this._comboBox.set("readOnly",!0):this._comboBox.set("readOnly",!1))},getStyleNode:function(a){return"backgroundColor"===a?this.domNode:this._comboBox.focusNode},hasValueChanged:function(a){var c=this._originalValue!==a&&this._editValue!==a;return!this._isProtected||!this._clientValidation?c:c&&this.isInStore(a)}})})},"dijit/form/ComboBox":function(){define(["dojo/_base/declare","./ValidationTextBox","./ComboBoxMixin"],function(g,
f,e){return g("dijit.form.ComboBox",[f,e],{})})},"dijit/form/ValidationTextBox":function(){define("dojo/_base/declare dojo/_base/kernel dojo/_base/lang dojo/i18n ./TextBox ../Tooltip dojo/text!./templates/ValidationTextBox.html dojo/i18n!./nls/validate".split(" "),function(g,f,e,d,b,a,c){var h=g("dijit.form.ValidationTextBox",b,{templateString:c,required:!1,promptMessage:"",invalidMessage:"$_unset_$",missingMessage:"$_unset_$",message:"",constraints:{},pattern:".*",regExp:"",regExpGen:function(){},
state:"",tooltipPosition:[],_deprecateRegExp:function(a,c){c!=h.prototype[a]&&(f.deprecated("ValidationTextBox id\x3d"+this.id+", set('"+a+"', ...) is deprecated.  Use set('pattern', ...) instead.","","2.0"),this.set("pattern",c))},_setRegExpGenAttr:function(a){this._deprecateRegExp("regExpGen",a);this._set("regExpGen",this._computeRegexp)},_setRegExpAttr:function(a){this._deprecateRegExp("regExp",a)},_setValueAttr:function(){this.inherited(arguments);this._refreshState()},validator:function(a,c){return RegExp("^(?:"+
this._computeRegexp(c)+")"+(this.required?"":"?")+"$").test(a)&&(!this.required||!this._isEmpty(a))&&(this._isEmpty(a)||void 0!==this.parse(a,c))},_isValidSubset:function(){return 0==this.textbox.value.search(this._partialre)},isValid:function(){return this.validator(this.textbox.value,this.get("constraints"))},_isEmpty:function(a){return(this.trim?/^\s*$/:/^$/).test(a)},getErrorMessage:function(){var a="$_unset_$"==this.invalidMessage?this.messages.invalidMessage:!this.invalidMessage?this.promptMessage:
this.invalidMessage,c="$_unset_$"==this.missingMessage?this.messages.missingMessage:!this.missingMessage?a:this.missingMessage;return this.required&&this._isEmpty(this.textbox.value)?c:a},getPromptMessage:function(){return this.promptMessage},_maskValidSubsetError:!0,validate:function(a){var c="",h=this.disabled||this.isValid(a);h&&(this._maskValidSubsetError=!0);var b=this._isEmpty(this.textbox.value),d=!h&&a&&this._isValidSubset();this._set("state",h?"":((!this._hasBeenBlurred||a)&&b||d)&&(this._maskValidSubsetError||
d&&!this._hasBeenBlurred&&a)?"Incomplete":"Error");this.focusNode.setAttribute("aria-invalid","Error"==this.state?"true":"false");"Error"==this.state?(this._maskValidSubsetError=a&&d,c=this.getErrorMessage(a)):"Incomplete"==this.state?(c=this.getPromptMessage(a),this._maskValidSubsetError=!this._hasBeenBlurred||a):b&&(c=this.getPromptMessage(a));this.set("message",c);return h},displayMessage:function(c){c&&this.focused?a.show(c,this.domNode,this.tooltipPosition,!this.isLeftToRight()):a.hide(this.domNode)},
_refreshState:function(){this._created&&this.validate(this.focused);this.inherited(arguments)},constructor:function(a){this.constraints=e.clone(this.constraints);this.baseClass+=" dijitValidationTextBox"},startup:function(){this.inherited(arguments);this._refreshState()},_setConstraintsAttr:function(a){!a.locale&&this.lang&&(a.locale=this.lang);this._set("constraints",a);this._refreshState()},_setPatternAttr:function(a){this._set("pattern",a);this._refreshState()},_computeRegexp:function(a){var c=
this.pattern;"function"==typeof c&&(c=c.call(this,a));if(c!=this._lastRegExp){var h="";this._lastRegExp=c;".*"!=c&&c.replace(/\\.|\[\]|\[.*?[^\\]{1}\]|\{.*?\}|\(\?[=:!]|./g,function(a){switch(a.charAt(0)){case "{":case "+":case "?":case "*":case "^":case "$":case "|":case "(":h+=a;break;case ")":h+="|$)";break;default:h+="(?:"+a+"|$)"}});try{"".search(h)}catch(b){h=this.pattern}this._partialre="^(?:"+h+")$"}return c},postMixInProperties:function(){this.inherited(arguments);this.messages=d.getLocalization("dijit.form",
"validate",this.lang);this._setConstraintsAttr(this.constraints)},_setDisabledAttr:function(a){this.inherited(arguments);this._refreshState()},_setRequiredAttr:function(a){this._set("required",a);this.focusNode.setAttribute("aria-required",a);this._refreshState()},_setMessageAttr:function(a){this._set("message",a);this.displayMessage(a)},reset:function(){this._maskValidSubsetError=!0;this.inherited(arguments)},_onBlur:function(){this.displayMessage("");this.inherited(arguments)},destroy:function(){a.hide(this.domNode);
this.inherited(arguments)}});return h})},"dijit/form/TextBox":function(){define("dojo/_base/declare dojo/dom-construct dojo/dom-style dojo/_base/kernel dojo/_base/lang dojo/on dojo/sniff ./_FormValueWidget ./_TextBoxMixin dojo/text!./templates/TextBox.html ../main ../_mw/utils/deprecation".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p){p.deprecated({deprecated:{module:"dijit/form/TextBox"},replacement:{module:"mw-form/TextField"},geckNumber:1352405});h=g("dijit.form.TextBox"+(c("dojo-bidi")?"_NoBidi":
""),[h,k],{templateString:l,_singleNodeTemplate:'\x3cinput class\x3d"dijit dijitReset dijitLeft dijitInputField" data-dojo-attach-point\x3d"textbox,focusNode" autocomplete\x3d"off" type\x3d"${type}" ${!nameAttrSetting} /\x3e',_buttonInputDisabled:c("ie")?"disabled":"",baseClass:"dijitTextBox",postMixInProperties:function(){var a=this.type.toLowerCase();if(this.templateString&&"input"==this.templateString.toLowerCase()||("hidden"==a||"file"==a)&&this.templateString==this.constructor.prototype.templateString)this.templateString=
this._singleNodeTemplate;this.inherited(arguments)},postCreate:function(){this.inherited(arguments);9>c("ie")&&this.defer(function(){try{var a=e.getComputedStyle(this.domNode);if(a){var c=a.fontFamily;if(c){var h=this.domNode.getElementsByTagName("INPUT");if(h)for(a=0;a<h.length;a++)h[a].style.fontFamily=c}}}catch(b){}})},_setPlaceHolderAttr:function(c){this._set("placeHolder",c);this._phspan||(this._attachPoints.push("_phspan"),this._phspan=f.create("span",{className:"dijitPlaceHolder dijitInputField"},
this.textbox,"after"),this.own(a(this._phspan,"mousedown",function(a){a.preventDefault()}),a(this._phspan,"touchend, pointerup, MSPointerUp",b.hitch(this,function(){this.focus()}))));this._phspan.innerHTML="";this._phspan.appendChild(this._phspan.ownerDocument.createTextNode(c));this._updatePlaceHolder()},_onInput:function(a){this.inherited(arguments);this._updatePlaceHolder()},_updatePlaceHolder:function(){this._phspan&&(this._phspan.style.display=this.placeHolder&&!this.textbox.value?"":"none")},
_setValueAttr:function(a,c,h){this.inherited(arguments);this._updatePlaceHolder()},getDisplayedValue:function(){d.deprecated(this.declaredClass+"::getDisplayedValue() is deprecated. Use get('displayedValue') instead.","","2.0");return this.get("displayedValue")},setDisplayedValue:function(a){d.deprecated(this.declaredClass+"::setDisplayedValue() is deprecated. Use set('displayedValue', ...) instead.","","2.0");this.set("displayedValue",a)},_onBlur:function(a){this.disabled||(this.inherited(arguments),
this._updatePlaceHolder(),c("mozilla")&&this.selectOnClick&&(this.textbox.selectionStart=this.textbox.selectionEnd=void 0))},_onFocus:function(a){!this.disabled&&!this.readOnly&&(this.inherited(arguments),this._updatePlaceHolder())}});9>c("ie")&&(h.prototype._isTextSelected=function(){var a=this.ownerDocument.selection.createRange();return a.parentElement()==this.textbox&&0<a.text.length},m._setSelectionRange=k._setSelectionRange=function(a,c,h){a.createTextRange&&(a=a.createTextRange(),a.collapse(!0),
a.moveStart("character",-99999),a.moveStart("character",c),a.moveEnd("character",h-c),a.select())});c("dojo-bidi")&&(h=g("dijit.form.TextBox",h,{_setPlaceHolderAttr:function(a){this.inherited(arguments);this.applyTextDir(this._phspan)}}));return h})},"dijit/form/_TextBoxMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom dojo/sniff dojo/keys dojo/_base/lang dojo/on ../main".split(" "),function(g,f,e,d,b,a,c,h){var k=f("dijit.form._TextBoxMixin"+(d("dojo-bidi")?"_NoBidi":""),null,
{trim:!1,uppercase:!1,lowercase:!1,propercase:!1,maxLength:"",selectOnClick:!1,placeHolder:"",_getValueAttr:function(){return this.parse(this.get("displayedValue"),this.constraints)},_setValueAttr:function(a,c,h){var b;void 0!==a&&(b=this.filter(a),"string"!=typeof h&&(h=null!==b&&("number"!=typeof b||!isNaN(b))?this.filter(this.format(b,this.constraints)):"",0!=this.compare(b,this.filter(this.parse(h,this.constraints)))&&(h=null)));if(null!=h&&("number"!=typeof h||!isNaN(h))&&this.textbox.value!=
h)this.textbox.value=h,this._set("displayedValue",this.get("displayedValue"));this.inherited(arguments,[b,c])},displayedValue:"",_getDisplayedValueAttr:function(){return this.filter(this.textbox.value)},_setDisplayedValueAttr:function(a){null==a?a="":"string"!=typeof a&&(a=String(a));this.textbox.value=a;this._setValueAttr(this.get("value"),void 0);this._set("displayedValue",this.get("displayedValue"))},format:function(a){return null==a?"":a.toString?a.toString():a},parse:function(a){return a},_refreshState:function(){},
onInput:function(){},_onInput:function(a){this._lastInputEventValue=this.textbox.value;this._processInput(this._lastInputProducingEvent||a);delete this._lastInputProducingEvent;this.intermediateChanges&&this._handleOnChange(this.get("value"),!1)},_processInput:function(){this._refreshState();this._set("displayedValue",this.get("displayedValue"))},postCreate:function(){this.textbox.setAttribute("value",this.textbox.value);this.inherited(arguments);this.own(c(this.textbox,"keydown, keypress, paste, cut, compositionend",
a.hitch(this,function(h){var k;if("keydown"==h.type&&229!=h.keyCode){k=h.keyCode;switch(k){case b.SHIFT:case b.ALT:case b.CTRL:case b.META:case b.CAPS_LOCK:case b.NUM_LOCK:case b.SCROLL_LOCK:return}if(!h.ctrlKey&&!h.metaKey&&!h.altKey){switch(k){case b.NUMPAD_0:case b.NUMPAD_1:case b.NUMPAD_2:case b.NUMPAD_3:case b.NUMPAD_4:case b.NUMPAD_5:case b.NUMPAD_6:case b.NUMPAD_7:case b.NUMPAD_8:case b.NUMPAD_9:case b.NUMPAD_MULTIPLY:case b.NUMPAD_PLUS:case b.NUMPAD_ENTER:case b.NUMPAD_MINUS:case b.NUMPAD_PERIOD:case b.NUMPAD_DIVIDE:return}if(65<=
k&&90>=k||48<=k&&57>=k||k==b.SPACE)return;k=!1;for(var e in b)if(b[e]===h.keyCode){k=!0;break}if(!k)return}}(k=32<=h.charCode?String.fromCharCode(h.charCode):h.charCode)||(k=65<=h.keyCode&&90>=h.keyCode||48<=h.keyCode&&57>=h.keyCode||h.keyCode==b.SPACE?String.fromCharCode(h.keyCode):h.keyCode);k||(k=229);if("keypress"==h.type){if("string"!=typeof k)return;if("a"<=k&&"z">=k||"A"<=k&&"Z">=k||"0"<=k&&"9">=k||" "===k)if(h.ctrlKey||h.metaKey||h.altKey)return}var f={faux:!0},q;for(q in h)/^(layer[XY]|returnValue|keyLocation)$/.test(q)||
(e=h[q],"function"!=typeof e&&"undefined"!=typeof e&&(f[q]=e));a.mixin(f,{charOrCode:k,_wasConsumed:!1,preventDefault:function(){f._wasConsumed=!0;h.preventDefault()},stopPropagation:function(){h.stopPropagation()}});this._lastInputProducingEvent=f;!1===this.onInput(f)&&(f.preventDefault(),f.stopPropagation());if(!f._wasConsumed&&9>=d("ie"))switch(h.keyCode){case b.TAB:case b.ESCAPE:case b.DOWN_ARROW:case b.UP_ARROW:case b.LEFT_ARROW:case b.RIGHT_ARROW:break;default:if(h.keyCode==b.ENTER&&"textarea"!=
this.textbox.tagName.toLowerCase())break;this.defer(function(){this.textbox.value!==this._lastInputEventValue&&c.emit(this.textbox,"input",{bubbles:!0})})}})),c(this.textbox,"input",a.hitch(this,"_onInput")),c(this.domNode,"keypress",function(a){a.stopPropagation()}))},_blankValue:"",filter:function(c){if(null===c)return this._blankValue;if("string"!=typeof c)return c;this.trim&&(c=a.trim(c));this.uppercase&&(c=c.toUpperCase());this.lowercase&&(c=c.toLowerCase());this.propercase&&(c=c.replace(/[^\s]+/g,
function(a){return a.substring(0,1).toUpperCase()+a.substring(1)}));return c},_setBlurValue:function(){this._setValueAttr(this.get("value"),!0)},_onBlur:function(a){this.disabled||(this._setBlurValue(),this.inherited(arguments))},_isTextSelected:function(){return this.textbox.selectionStart!=this.textbox.selectionEnd},_onFocus:function(h){!this.disabled&&!this.readOnly&&(this.selectOnClick&&"mouse"==h&&(this._selectOnClickHandle=c.once(this.domNode,"mouseup, touchend",a.hitch(this,function(a){this._isTextSelected()||
k.selectInputText(this.textbox)})),this.own(this._selectOnClickHandle),this.defer(function(){this._selectOnClickHandle&&(this._selectOnClickHandle.remove(),this._selectOnClickHandle=null)},500)),this.inherited(arguments),this._refreshState())},reset:function(){this.textbox.value="";this.inherited(arguments)}});d("dojo-bidi")&&(k=f("dijit.form._TextBoxMixin",k,{_setValueAttr:function(){this.inherited(arguments);this.applyTextDir(this.focusNode)},_setDisplayedValueAttr:function(){this.inherited(arguments);
this.applyTextDir(this.focusNode)},_onInput:function(){this.applyTextDir(this.focusNode);this.inherited(arguments)}}));k._setSelectionRange=h._setSelectionRange=function(a,c,h){a.setSelectionRange&&a.setSelectionRange(c,h)};k.selectInputText=h.selectInputText=function(a,c,h){a=e.byId(a);isNaN(c)&&(c=0);isNaN(h)&&(h=a.value?a.value.length:0);try{a.focus(),k._setSelectionRange(a,c,h)}catch(b){}};return k})},"dijit/form/ComboBoxMixin":function(){define("dojo/_base/declare dojo/Deferred dojo/_base/kernel dojo/_base/lang dojo/store/util/QueryResults ./_AutoCompleterMixin ./_ComboBoxMenu ../_HasDropDown dojo/text!./templates/DropDownBox.html".split(" "),
function(g,f,e,d,b,a,c,h,k){return g("dijit.form.ComboBoxMixin",[h,a],{dropDownClass:c,hasDownArrow:!0,templateString:k,baseClass:"dijitTextBox dijitComboBox",cssStateNodes:{_buttonNode:"dijitDownArrowButton"},_setHasDownArrowAttr:function(a){this._set("hasDownArrow",a);this._buttonNode.style.display=a?"":"none"},_showResultList:function(){this.displayMessage("");this.inherited(arguments)},_setStoreAttr:function(a){a.get||d.mixin(a,{_oldAPI:!0,get:function(a){var c=new f;this.fetchItemByIdentity({identity:a,
onItem:function(a){c.resolve(a)},onError:function(a){c.reject(a)}});return c.promise},query:function(a,c){var h=new f(function(){k.abort&&k.abort()});h.total=new f;var k=this.fetch(d.mixin({query:a,onBegin:function(a){h.total.resolve(a)},onComplete:function(a){h.resolve(a)},onError:function(a){h.reject(a)}},c));return b(h)}});this._set("store",a)},postMixInProperties:function(){var a=this.params.store||this.store;a&&this._setStoreAttr(a);this.inherited(arguments);if(!this.params.store&&this.store&&
!this.store._oldAPI){var c=this.declaredClass;d.mixin(this.store,{getValue:function(a,h){e.deprecated(c+".store.getValue(item, attr) is deprecated for builtin store.  Use item.attr directly","","2.0");return a[h]},getLabel:function(a){e.deprecated(c+".store.getLabel(item) is deprecated for builtin store.  Use item.label directly","","2.0");return a.name},fetch:function(a){e.deprecated(c+".store.fetch() is deprecated for builtin store.","Use store.query()","2.0");require(["dojo/data/ObjectStore"],
d.hitch(this,function(c){(new c({objectStore:this})).fetch(a)}))}})}},buildRendering:function(){this.inherited(arguments);this.focusNode.setAttribute("aria-autocomplete",this.autoComplete?"both":"list")}})})},"dijit/form/_AutoCompleterMixin":function(){define("dojo/aspect dojo/_base/declare dojo/dom-attr dojo/keys dojo/_base/lang dojo/query dojo/regexp dojo/sniff ./DataList ./_TextBoxMixin ./_SearchMixin".split(" "),function(g,f,e,d,b,a,c,h,k,l,m){f=f("dijit.form._AutoCompleterMixin",m,{item:null,
autoComplete:!0,highlightMatch:"first",labelAttr:"",labelType:"text",maxHeight:-1,_stopClickEvents:!1,_getCaretPos:function(a){var c=0;if("number"==typeof a.selectionStart)c=a.selectionStart;else if(h("ie")){var b=a.ownerDocument.selection.createRange().duplicate();a=a.createTextRange();b.move("character",0);a.move("character",0);try{a.setEndPoint("EndToEnd",b),c=String(a.text).replace(/\r/g,"").length}catch(k){}}return c},_setCaretPos:function(a,c){c=parseInt(c);l.selectInputText(a,c,c)},_setDisabledAttr:function(a){this.inherited(arguments);
this.domNode.setAttribute("aria-disabled",a?"true":"false")},_onKey:function(a){if(!(32<=a.charCode)){var c=a.charCode||a.keyCode;if(!(c==d.ALT||c==d.CTRL||c==d.META||c==d.SHIFT)){var h=this.dropDown,b=null;this._abortQuery();this.inherited(arguments);if(!a.altKey&&!a.ctrlKey&&!a.metaKey)switch(this._opened&&(b=h.getHighlightedOption()),c){case d.PAGE_DOWN:case d.DOWN_ARROW:case d.PAGE_UP:case d.UP_ARROW:this._opened&&this._announceOption(b);a.stopPropagation();a.preventDefault();break;case d.ENTER:if(b){if(b==
h.nextButton){this._nextSearch(1);a.stopPropagation();a.preventDefault();break}else if(b==h.previousButton){this._nextSearch(-1);a.stopPropagation();a.preventDefault();break}a.stopPropagation();a.preventDefault()}else this._setBlurValue(),this._setCaretPos(this.focusNode,this.focusNode.value.length);case d.TAB:c=this.get("displayedValue");if(h&&(c==h._messages.previousMessage||c==h._messages.nextMessage))break;b&&this._selectOption(b);case d.ESCAPE:this._opened&&(this._lastQuery=null,this.closeDropDown())}}}},
_autoCompleteText:function(a){var c=this.focusNode;l.selectInputText(c,c.value.length);var h=this.ignoreCase?"toLowerCase":"substr";0==a[h](0).indexOf(this.focusNode.value[h](0))?(h=this.autoComplete?this._getCaretPos(c):c.value.length,h+1>c.value.length&&(c.value=a,l.selectInputText(c,h))):(c.value=a,l.selectInputText(c))},_openResultList:function(a,c,h){var k=this.dropDown.getHighlightedOption();this.dropDown.clearResultList();!a.length&&0==h.start?this.closeDropDown():(this._nextSearch=this.dropDown.onPage=
b.hitch(this,function(c){a.nextPage(-1!==c);this.focus()}),this.dropDown.createOptions(a,h,b.hitch(this,"_getMenuLabelFromItem")),this._showResultList(),"direction"in h?(h.direction?this.dropDown.highlightFirstOption():h.direction||this.dropDown.highlightLastOption(),k&&this._announceOption(this.dropDown.getHighlightedOption())):this.autoComplete&&(!this._prev_key_backspace&&!/^[*]+$/.test(c[this.searchAttr].toString()))&&this._announceOption(this.dropDown.containerNode.firstChild.nextSibling))},
_showResultList:function(){this.closeDropDown(!0);this.openDropDown();this.domNode.setAttribute("aria-expanded","true")},loadDropDown:function(){this._startSearchAll()},isLoaded:function(){return!1},closeDropDown:function(){this._abortQuery();this._opened&&(this.inherited(arguments),this.domNode.setAttribute("aria-expanded","false"))},_setBlurValue:function(){var a=this.get("displayedValue"),c=this.dropDown;c&&(a==c._messages.previousMessage||a==c._messages.nextMessage)?this._setValueAttr(this._lastValueReported,
!0):"undefined"==typeof this.item?(this.item=null,this.set("displayedValue",a)):(this.value!=this._lastValueReported&&this._handleOnChange(this.value,!0),this._refreshState());this.focusNode.removeAttribute("aria-activedescendant")},_setItemAttr:function(a,c,h){var b="";a&&(h||(h=this.store._oldAPI?this.store.getValue(a,this.searchAttr):a[this.searchAttr]),b=this._getValueField()!=this.searchAttr?this.store.getIdentity(a):h);this.set("value",b,c,h,a)},_announceOption:function(a){if(a){var c;if(a==
this.dropDown.nextButton||a==this.dropDown.previousButton)c=a.innerHTML,this.item=void 0,this.value="";else{var h=this.dropDown.items[a.getAttribute("item")];c=(this.store._oldAPI?this.store.getValue(h,this.searchAttr):h[this.searchAttr]).toString();this.set("item",h,!1,c)}this.focusNode.value=this.focusNode.value.substring(0,this._lastInput.length);this.focusNode.setAttribute("aria-activedescendant",e.get(a,"id"));this._autoCompleteText(c)}},_selectOption:function(a){this.closeDropDown();a&&this._announceOption(a);
this._setCaretPos(this.focusNode,this.focusNode.value.length);this._handleOnChange(this.value,!0);this.focusNode.removeAttribute("aria-activedescendant")},_startSearchAll:function(){this._startSearch("")},_startSearchFromInput:function(){this.item=void 0;this.inherited(arguments)},_startSearch:function(a){if(!this.dropDown){var c=this.id+"_popup";this.dropDown=new (b.isString(this.dropDownClass)?b.getObject(this.dropDownClass,!1):this.dropDownClass)({onChange:b.hitch(this,this._selectOption),id:c,
dir:this.dir,textDir:this.textDir})}this._lastInput=a;this.inherited(arguments)},_getValueField:function(){return this.searchAttr},postMixInProperties:function(){this.inherited(arguments);if(!this.store&&this.srcNodeRef&&(this.store=new k({},this.srcNodeRef),!("value"in this.params))){var a=this.item=this.store.fetchSelectedItem();if(a){var c=this._getValueField();this.value=this.store._oldAPI?this.store.getValue(a,c):a[c]}}},postCreate:function(){var c=a('label[for\x3d"'+this.id+'"]');c.length&&
(c[0].id||(c[0].id=this.id+"_label"),this.domNode.setAttribute("aria-labelledby",c[0].id));this.inherited(arguments);g.after(this,"onSearch",b.hitch(this,"_openResultList"),!0)},_getMenuLabelFromItem:function(a){a=this.labelFunc(a,this.store);var c=this.labelType;"none"!=this.highlightMatch&&("text"==this.labelType&&this._lastInput)&&(a=this.doHighlight(a,this._lastInput),c="html");return{html:"html"==c,label:a}},doHighlight:function(a,h){var b=(this.ignoreCase?"i":"")+("all"==this.highlightMatch?
"g":""),k=this.queryExpr.indexOf("${0}");h=c.escapeString(h);return this._escapeHtml(a.replace(RegExp((0==k?"^":"")+"("+h+")"+(k==this.queryExpr.length-4?"$":""),b),"\uffff$1\uffff")).replace(/\uFFFF([^\uFFFF]+)\uFFFF/g,'\x3cspan class\x3d"dijitComboBoxHighlightMatch"\x3e$1\x3c/span\x3e')},_escapeHtml:function(a){return a=String(a).replace(/&/gm,"\x26amp;").replace(/</gm,"\x26lt;").replace(/>/gm,"\x26gt;").replace(/"/gm,"\x26quot;")},reset:function(){this.item=null;this.inherited(arguments)},labelFunc:function(a,
c){return(c._oldAPI?c.getValue(a,this.labelAttr||this.searchAttr):a[this.labelAttr||this.searchAttr]).toString()},_setValueAttr:function(a,c,h,b){this._set("item",b||null);null==a&&(a="");this.inherited(arguments)}});h("dojo-bidi")&&f.extend({_setTextDirAttr:function(a){this.inherited(arguments);this.dropDown&&this.dropDown._set("textDir",a)}});return f})},"dijit/form/DataList":function(){define("dojo/_base/declare dojo/dom dojo/_base/lang dojo/query dojo/store/Memory ../registry".split(" "),function(g,
f,e,d,b,a){function c(a){return{id:a.value,value:a.value,name:e.trim(a.innerText||a.textContent||"")}}return g("dijit.form.DataList",b,{constructor:function(h,b){this.domNode=f.byId(b);e.mixin(this,h);this.id&&a.add(this);this.domNode.style.display="none";this.inherited(arguments,[{data:d("option",this.domNode).map(c)}])},destroy:function(){a.remove(this.id)},fetchSelectedItem:function(){var a=d("\x3e option[selected]",this.domNode)[0]||d("\x3e option",this.domNode)[0];return a&&c(a)}})})},"dijit/form/_SearchMixin":function(){define("dojo/_base/declare dojo/keys dojo/_base/lang dojo/query dojo/string dojo/when ../registry".split(" "),
function(g,f,e,d,b,a,c){return g("dijit.form._SearchMixin",null,{pageSize:Infinity,store:null,fetchProperties:{},query:{},list:"",_setListAttr:function(a){this._set("list",a)},searchDelay:200,searchAttr:"name",queryExpr:"${0}*",ignoreCase:!0,_patternToRegExp:function(a){return RegExp("^"+a.replace(/(\\.)|(\*)|(\?)|\W/g,function(a,c,h,b){return h?".*":b?".":c?c:"\\"+a})+"$",this.ignoreCase?"mi":"m")},_abortQuery:function(){this.searchTimer&&(this.searchTimer=this.searchTimer.remove());this._queryDeferHandle&&
(this._queryDeferHandle=this._queryDeferHandle.remove());this._fetchHandle&&(this._fetchHandle.abort&&(this._cancelingQuery=!0,this._fetchHandle.abort(),this._cancelingQuery=!1),this._fetchHandle.cancel&&(this._cancelingQuery=!0,this._fetchHandle.cancel(),this._cancelingQuery=!1),this._fetchHandle=null)},_processInput:function(a){if(!this.disabled&&!this.readOnly){a=a.charOrCode;var c=!1;this._prev_key_backspace=!1;switch(a){case f.DELETE:case f.BACKSPACE:c=this._maskValidSubsetError=this._prev_key_backspace=
!0;break;default:c="string"==typeof a||229==a}if(c)if(this.store)this.searchTimer=this.defer("_startSearchFromInput",1);else this.onSearch()}},onSearch:function(){},_startSearchFromInput:function(){this._startSearch(this.focusNode.value)},_startSearch:function(c){this._abortQuery();var k=this,d=e.clone(this.query),f={start:0,count:this.pageSize,queryOptions:{ignoreCase:this.ignoreCase,deep:!0}},p=b.substitute(this.queryExpr,[c.replace(/([\\\*\?])/g,"\\$1")]),n,g=function(){var c=k._fetchHandle=k.store.query(d,
f);!k.disabled&&!(k.readOnly||n!==k._lastQuery)&&a(c,function(h){k._fetchHandle=null;!k.disabled&&(!k.readOnly&&n===k._lastQuery)&&a(c.total,function(a){h.total=a;var c=k.pageSize;if(isNaN(c)||c>h.total)c=h.total;h.nextPage=function(a){f.direction=a=!1!==a;f.count=c;a?(f.start+=h.length,f.start>=h.total&&(f.count=0)):(f.start-=c,0>f.start&&(f.count=Math.max(c+f.start,0),f.start=0));0>=f.count?(h.length=0,k.onSearch(h,d,f)):g()};k.onSearch(h,d,f)})},function(a){k._fetchHandle=null})};e.mixin(f,this.fetchProperties);
this.store._oldAPI?n=p:(n=this._patternToRegExp(p),n.toString=function(){return p});this._lastQuery=d[this.searchAttr]=n;this._queryDeferHandle=this.defer(g,this.searchDelay)},constructor:function(){this.query={};this.fetchProperties={}},postMixInProperties:function(){if(!this.store){var a=this.list;a&&(this.store=c.byId(a))}this.inherited(arguments)}})})},"dijit/form/_ComboBoxMenu":function(){define("dojo/_base/declare dojo/dom-class dojo/dom-style dojo/keys ../_WidgetBase ../_TemplatedMixin ./_ComboBoxMenuMixin ./_ListMouseMixin".split(" "),
function(g,f,e,d,b,a,c,h){return g("dijit.form._ComboBoxMenu",[b,a,h,c],{templateString:"\x3cdiv class\x3d'dijitReset dijitMenu' data-dojo-attach-point\x3d'containerNode' style\x3d'overflow: auto; overflow-x: hidden;' role\x3d'listbox'\x3e\x3cdiv class\x3d'dijitMenuItem dijitMenuPreviousButton' data-dojo-attach-point\x3d'previousButton' role\x3d'option'\x3e\x3c/div\x3e\x3cdiv class\x3d'dijitMenuItem dijitMenuNextButton' data-dojo-attach-point\x3d'nextButton' role\x3d'option'\x3e\x3c/div\x3e\x3c/div\x3e",
baseClass:"dijitComboBoxMenu",postCreate:function(){this.inherited(arguments);this.isLeftToRight()||(f.add(this.previousButton,"dijitMenuItemRtl"),f.add(this.nextButton,"dijitMenuItemRtl"));this.containerNode.setAttribute("role","listbox")},_createMenuItem:function(){var a=this.ownerDocument.createElement("div");a.className="dijitReset dijitMenuItem"+(this.isLeftToRight()?"":" dijitMenuItemRtl");a.setAttribute("role","option");return a},onHover:function(a){f.add(a,"dijitMenuItemHover")},onUnhover:function(a){f.remove(a,
"dijitMenuItemHover")},onSelect:function(a){f.add(a,"dijitMenuItemSelected")},onDeselect:function(a){f.remove(a,"dijitMenuItemSelected")},_page:function(a){var c=0,h=this.domNode.scrollTop,b=e.get(this.domNode,"height");for(this.getHighlightedOption()||this.selectNextNode();c<b;){var d=this.getHighlightedOption();if(a){if(!d.previousSibling||"none"==d.previousSibling.style.display)break;this.selectPreviousNode()}else{if(!d.nextSibling||"none"==d.nextSibling.style.display)break;this.selectNextNode()}d=
this.domNode.scrollTop;c+=(d-h)*(a?-1:1);h=d}},handleKey:function(a){switch(a.keyCode){case d.DOWN_ARROW:return this.selectNextNode(),!1;case d.PAGE_DOWN:return this._page(!1),!1;case d.UP_ARROW:return this.selectPreviousNode(),!1;case d.PAGE_UP:return this._page(!0),!1;default:return!0}}})})},"dijit/form/_ComboBoxMenuMixin":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-attr dojo/has dojo/i18n dojo/i18n!./nls/ComboBox".split(" "),function(g,f,e,d,b){var a=f("dijit.form._ComboBoxMenuMixin"+
(d("dojo-bidi")?"_NoBidi":""),null,{_messages:null,postMixInProperties:function(){this.inherited(arguments);this._messages=b.getLocalization("dijit.form","ComboBox",this.lang)},buildRendering:function(){this.inherited(arguments);this.previousButton.innerHTML=this._messages.previousMessage;this.nextButton.innerHTML=this._messages.nextMessage},_setValueAttr:function(a){this._set("value",a);this.onChange(a)},onClick:function(a){if(a==this.previousButton)this._setSelectedAttr(null),this.onPage(-1);else if(a==
this.nextButton)this._setSelectedAttr(null),this.onPage(1);else this.onChange(a)},onChange:function(){},onPage:function(){},onClose:function(){this._setSelectedAttr(null)},_createOption:function(a,h){var b=this._createMenuItem(),d=h(a);d.html?b.innerHTML=d.label:b.appendChild(b.ownerDocument.createTextNode(d.label));""==b.innerHTML&&(b.innerHTML="\x26#160;");return b},createOptions:function(a,h,b){this.items=a;this.previousButton.style.display=0==h.start?"none":"";e.set(this.previousButton,"id",this.id+
"_prev");g.forEach(a,function(a,c){var h=this._createOption(a,b);h.setAttribute("item",c);e.set(h,"id",this.id+c);this.nextButton.parentNode.insertBefore(h,this.nextButton)},this);var d=!1;a.total&&!a.total.then&&-1!=a.total?h.start+h.count<a.total?d=!0:h.start+h.count>a.total&&h.count==a.length&&(d=!0):h.count==a.length&&(d=!0);this.nextButton.style.display=d?"":"none";e.set(this.nextButton,"id",this.id+"_next")},clearResultList:function(){for(var a=this.containerNode;2<a.childNodes.length;)a.removeChild(a.childNodes[a.childNodes.length-
2]);this._setSelectedAttr(null)},highlightFirstOption:function(){this.selectFirstNode()},highlightLastOption:function(){this.selectLastNode()},selectFirstNode:function(){this.inherited(arguments);this.getHighlightedOption()==this.previousButton&&this.selectNextNode()},selectLastNode:function(){this.inherited(arguments);this.getHighlightedOption()==this.nextButton&&this.selectPreviousNode()},getHighlightedOption:function(){return this.selected}});d("dojo-bidi")&&(a=f("dijit.form._ComboBoxMenuMixin",
a,{_createOption:function(){var a=this.inherited(arguments);this.applyTextDir(a);return a}}));return a})},"dijit/form/_ListMouseMixin":function(){define(["dojo/_base/declare","dojo/on","dojo/touch","./_ListBase"],function(g,f,e,d){return g("dijit.form._ListMouseMixin",d,{postCreate:function(){this.inherited(arguments);this.domNode.dojoClick=!0;this._listConnect("click","_onClick");this._listConnect("mousedown","_onMouseDown");this._listConnect("mouseup","_onMouseUp");this._listConnect("mouseover",
"_onMouseOver");this._listConnect("mouseout","_onMouseOut")},_onClick:function(b,a){this._setSelectedAttr(a,!1);this._deferredClick&&this._deferredClick.remove();this._deferredClick=this.defer(function(){this._deferredClick=null;this.onClick(a)})},_onMouseDown:function(b,a){this._hoveredNode&&(this.onUnhover(this._hoveredNode),this._hoveredNode=null);this._isDragging=!0;this._setSelectedAttr(a,!1)},_onMouseUp:function(b,a){this._isDragging=!1;var c=this.selected,h=this._hoveredNode;c&&a==c?this.defer(function(){this._onClick(b,
c)}):h&&this.defer(function(){this._onClick(b,h)})},_onMouseOut:function(b,a){this._hoveredNode&&(this.onUnhover(this._hoveredNode),this._hoveredNode=null);this._isDragging&&(this._cancelDrag=(new Date).getTime()+1E3)},_onMouseOver:function(b,a){this._cancelDrag&&((new Date).getTime()>this._cancelDrag&&(this._isDragging=!1),this._cancelDrag=null);this._hoveredNode=a;this.onHover(a);this._isDragging&&this._setSelectedAttr(a,!1)}})})},"dijit/form/_ListBase":function(){define(["dojo/_base/declare","dojo/on",
"dojo/window"],function(g,f,e){return g("dijit.form._ListBase",null,{selected:null,_listConnect:function(d,b){var a=this;return a.own(f(a.containerNode,f.selector(function(a,h,b){return a.parentNode==b},d),function(c){a[b](c,this)}))},selectFirstNode:function(){for(var d=this.containerNode.firstChild;d&&"none"==d.style.display;)d=d.nextSibling;this._setSelectedAttr(d,!0)},selectLastNode:function(){for(var d=this.containerNode.lastChild;d&&"none"==d.style.display;)d=d.previousSibling;this._setSelectedAttr(d,
!0)},selectNextNode:function(){var d=this.selected;if(d){for(d=d.nextSibling;d&&"none"==d.style.display;)d=d.nextSibling;d?this._setSelectedAttr(d,!0):this.selectFirstNode()}else this.selectFirstNode()},selectPreviousNode:function(){var d=this.selected;if(d){for(d=d.previousSibling;d&&"none"==d.style.display;)d=d.previousSibling;d?this._setSelectedAttr(d,!0):this.selectLastNode()}else this.selectLastNode()},_setSelectedAttr:function(d,b){if(this.selected!=d){var a=this.selected;if(a)this.onDeselect(a);
d&&(b&&e.scrollIntoView(d),this.onSelect(d));this._set("selected",d)}else if(d)this.onSelect(d)}})})},"dijit/form/FilteringSelect":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/when","./MappedTextBox","./ComboBoxMixin"],function(g,f,e,d,b){return g("dijit.form.FilteringSelect",[d,b],{required:!0,_lastDisplayedValue:"",_isValidSubset:function(){return this._opened},isValid:function(){return!!this.item||!this.required&&""==this.get("displayedValue")},_refreshState:function(){this.searchTimer||
this.inherited(arguments)},_callbackSetLabel:function(a,c,h,b){c&&c[this.searchAttr]!==this._lastQuery||!c&&a.length&&this.store.getIdentity(a[0])!=this._lastQuery||(a.length?this.set("item",a[0],b):this.set("value","",b||void 0===b&&!this.focused,this.textbox.value,null))},_openResultList:function(a,c,h){c[this.searchAttr]===this._lastQuery&&(this.inherited(arguments),void 0===this.item&&this.validate(!0))},_getValueAttr:function(){return this.valueNode.value},_getValueField:function(){return"value"},
_setValueAttr:function(a,c,h,b){this._onChangeActive||(c=null);if(void 0===b){if(null===a||""===a)if(a="",!f.isString(h)){this._setDisplayedValueAttr(h||"",c);return}var d=this;this._lastQuery=a;e(this.store.get(a),function(a){d._callbackSetLabel(a?[a]:[],void 0,void 0,c)})}else this.valueNode.value=a,this.inherited(arguments,[a,c,h,b])},_setItemAttr:function(a,c,h){this.inherited(arguments);this._lastDisplayedValue=this.textbox.value},_getDisplayQueryString:function(a){return a.replace(/([\\\*\?])/g,
"\\$1")},_setDisplayedValueAttr:function(a,c){null==a&&(a="");if(!this._created){if(!("displayedValue"in this.params))return;c=!1}if(this.store){this.closeDropDown();var h=f.clone(this.query),b=this._getDisplayQueryString(a),d;this.store._oldAPI?d=b:(d=this._patternToRegExp(b),d.toString=function(){return b});this._lastQuery=h[this.searchAttr]=d;this._lastDisplayedValue=this.textbox.value=a;this._set("displayedValue",a);var m=this,p={queryOptions:{ignoreCase:this.ignoreCase,deep:!0}};f.mixin(p,this.fetchProperties);
this._fetchHandle=this.store.query(h,p);e(this._fetchHandle,function(a){m._fetchHandle=null;m._callbackSetLabel(a||[],h,p,c)},function(a){m._fetchHandle=null})}},undo:function(){this.set("displayedValue",this._lastDisplayedValue)}})})},"dijit/form/MappedTextBox":function(){define(["dojo/_base/declare","dojo/sniff","dojo/dom-construct","./ValidationTextBox"],function(g,f,e,d){return g("dijit.form.MappedTextBox",d,{postMixInProperties:function(){this.inherited(arguments);this.nameAttrSetting=""},_setNameAttr:"valueNode",
serialize:function(b){return b.toString?b.toString():""},toString:function(){var b=this.filter(this.get("value"));return null!=b?"string"==typeof b?b:this.serialize(b,this.constraints):""},validate:function(){this.valueNode.value=this.toString();return this.inherited(arguments)},buildRendering:function(){this.inherited(arguments);this.valueNode=e.place("\x3cinput type\x3d'hidden'"+(this.name&&!f("msapp")?' name\x3d"'+this.name.replace(/"/g,"\x26quot;")+'"':"")+"/\x3e",this.textbox,"after")},reset:function(){this.valueNode.value=
"";this.inherited(arguments)}})})},"variableeditor/views/editors/FontNameHelper":function(){define(["dojo/_base/declare","dojo/Deferred","mw-remote/Remote"],function(g,f,e){return g(null,{_CLASSIFIER:"FEvalFontNameHelperGetFonts",constructor:function(){e.registerResponseHandler("FEvalResponse:"+this._CLASSIFIER,this._handleEvalResponse,this);e.registerFaultHandler("FEval:"+this._CLASSIFIER,this._handleEvalError,this)},getFonts:function(){var d=new f;e.sendMessage({FEval:{"function":"listfonts",arguments:[],
nargout:1,priority:1,dequeMode:"ppe"}},d,this._CLASSIFIER);return d.promise},_handleEvalError:function(d,b){this._implementsDeferred(b)&&b.reject(d)},_handleEvalResponse:function(d,b){1===d[0].results.length?d[0].isError?b.reject(d[0].messageFaults[0].message):b.resolve(d[0].results):b.reject("Error: Expected 1 result message back from getFonts, received: "+d.length)}})})},"variableeditor/views/editors/BinaryToggleButtonEditor":function(){define(["dojo/_base/declare","variableeditor/views/editors/_EditorBase",
"mw-form/ToggleButton","variableeditor/views/renderers/_TemplateMixin","dojo/text!variableeditor/views/editors/templates/binaryToggleButtonEditor.html"],function(g,f,e,d,b){return g([f,d],{templateString:b,_enumeratedValues:null,_icon:null,_button:null,setState:function(a){this.inherited(arguments);if(!a.enumeratedValues)throw"Expected enumeratedValues for Editor State";if(!a.icon)throw"Expected icons for Editor State";if(2!==a.enumeratedValues.length)throw"Expected enumeratedValues to be exactly two";
this._editable=this._commitOnBlur=!1;this._enumeratedValues=this._state.enumeratedValues;this._icon=this._state.icon;this._createButton()},postCreate:function(){this.inherited(arguments);this._createButton()},setValue:function(a,c,h){this._value=a;this._setUIValue(a,c,h)},_setUIValue:function(a){this._button&&this._button.set("checked",this._enumeratedValues[1]===a)},_getUIValue:function(){return this._value},_createButton:function(){this._icon&&(!this._button&&this.domNode)&&(this._button=new e({icon:this._icon.IconURL,
checked:this._value===this._enumeratedValues[1],description:"'"+this._enumeratedValues[1]+"'"}),this._button.domNode.setAttribute("data-tag",this.createDataTag("BinaryToggleButton")),this.own(this._button,this._button.on("change",function(a){this.dispatchEvent("editingStarted",this,{editor:this,currentValue:this._value,currentState:this._state});a.mwEventData.newValue!==this._value&&(a=this._button.get("checked")?this._enumeratedValues[1]:this._enumeratedValues[0],this.dispatchEvent("valueChanged",
this,{renderer:this,oldValue:this._value,newValue:a}))}.bind(this))),this._button.placeAt(this.domNode),this._button.startup())}})})},"variableeditor/views/renderers/_TemplateMixin":function(){define("variableeditor/views/renderers/_TemplateMixin",["dojo/_base/declare","dijit/_TemplatedMixin"],function(g,f){return g("variableeditor.views.renderers._TemplateMixin",[f],{_getAttachNode:function(e){e=this._getAttachNodes(e);return null===e?null:e[0]},_getAttachNodes:function(e){return!this.domNode?null:
(e=this.domNode.querySelectorAll('[data-datatools-renderer-attach-point\x3d"'+e+'"]'))&&e.length&&0<e.length?e:null}})})},"variableeditor/views/editors/ToggleButtonGroupEditor":function(){define(["dojo/_base/declare","variableeditor/views/editors/_EditorBase","mw-form/ToggleButton","variableeditor/views/renderers/_TemplateMixin","dojo/text!variableeditor/views/editors/templates/toggleButtonGroupEditor.html"],function(g,f,e,d,b){var a=0;return g([f,d],{templateString:b,_enumeratedValues:null,_icons:null,
_buttonsMap:null,setState:function(a){this.inherited(arguments);if(!a.enumeratedValues)throw"Expected enumeratedValues for Editor State";if(!a.icons)throw"Expected icons for Editor State";if(2>a.icons.length||a.icons.length!==a.enumeratedValues.length)throw"Expected icons and enumeratedValues to be equal length arrays with 2 or more elements";this._editable=this._commitOnBlur=!1;this._enumeratedValues=this._state.enumeratedValues;this._icons=this._state.icons;this._createAllButtons()},postCreate:function(){this.inherited(arguments);
this._createAllButtons()},setValue:function(a,h,b){this._value=a;this._setUIValue(a,h,b)},_setUIValue:function(a){this._buttonsMap&&this._buttonsMap[a].set("checked",!0)},_getUIValue:function(){return this._value},_createAllButtons:function(){if(this._icons&&!this._buttonsMap&&this.domNode){this._buttonsMap={};var c="variable_editor_toggle_button_group_"+a;a+=1;for(var h=0;h<this._icons.length;h++){var b=this._enumeratedValues[h];this._buttonsMap[b]=this._createSingleButton(b,this._icons[h].IconURL,
c);this._buttonsMap[b].placeAt(this.domNode);this._buttonsMap[b].startup()}}},_createSingleButton:function(a,h,b){h=new e({icon:h,buttonGroup:b,checked:this._value===a,description:"'"+a+"'"});h.domNode.setAttribute("data-tag",this.createDataTag("ToggleButtonGroupEditor.Button",a));this.own(h,h.on("change",function(h){this.dispatchEvent("editingStarted",this,{editor:this,currentValue:this._value,currentState:this._state});h.mwEventData.newValue&&a!==this._value&&this.dispatchEvent("valueChanged",this,
{renderer:this,oldValue:this._value,newValue:a})}.bind(this)));return h}})})},"variableeditor/views/editors/ScaleColorsTextBoxEditor":function(){define(["dojo/_base/declare","variableeditor/views/editors/TextBoxEditor"],function(g,f){return g([f],{postCreate:function(){this.inherited(arguments);this.domNode.setAttribute("data-tag","datatools.variableeditor.views.editors.ScaleColorsTextBoxEditor")},setValue:function(e){var d=function(b){return b.map(function(a){return Math.round(100*a)/100}).join()};
e instanceof Array&&(e=e[0]instanceof Array?e.map(d).join(";"):d(e));this.inherited(arguments)},setEditValue:function(e){e=this._value;this.inherited(arguments)},setState:function(e){e&&(e.isMetaData=!1);this.inherited(arguments)}})})},"variableeditor/views/editors/PopupVariableEditor":function(){define("variableeditor/views/editors/PopupVariableEditor","dojo/_base/declare dojo/_base/lang dojo/on variableeditor/views/editors/_EditorBase dijit/Dialog variableeditor/ClientPeerManagerFactory mw-messageservice/MessageService".split(" "),
function(g,f,e,d,b,a,c){return g("variableeditor.views.editors.PopupVariableEditor",[d],{_dialog:void 0,_contentPane:void 0,_manager:void 0,constructor:function(a){this._manager=this._dialog=void 0;a&&this.init(a)},init:function(){this.inherited(arguments);this._dialog=new b({title:"",style:"width: 600px; height: 300px;","class":"variableEditorPopupEditor"});this._dialogClosedListener=e(this._dialog,"hide",f.hitch(this,"stopEditing"))},setValue:function(a){a&&a.hasOwnProperty("value");this.inherited(arguments)},
stopEditing:function(){this._editing&&(this._manager&&a.deleteManager(this._manager),this.dispatchEvent("editingStopped",this,{editor:this,value:this._value,state:this._state}),this._editing=!1)},_setReadOnly:function(){},edit:function(){if(!this._editing){this._editing=!0;this.dispatchEvent("editingStarted",this,{editor:this,currentValue:this._value,currentState:this._state});this._dialog.set("title",this.propertyName);var h="caller";this._allArgs&&(this._allArgs.valueObject&&this._allArgs.valueObject.workspace)&&
(h=this._allArgs.valueObject.workspace);var b=this._value;this._allArgs&&(this._allArgs.valueObject&&this._allArgs.valueObject.editorValue)&&(b=this._allArgs.valueObject.editorValue);this._manager=a.createManager({messageService:c.messageService,ignoreUpdates:!1,editable:!0,resizeBehaviour:"fixed",size:{width:575,height:250}});var d=this;this._manager&&(this._manager.addEventListener("managerReady",function(a){a=a.data.peerManager.openVariable(b,null,null,h);d._dialog.set("content",a)}),this._dialog.show())}}})})},
"variableeditor/views/editors/ColorEditor":function(){define("dojo/_base/Color dojo/_base/declare dojo/dom-class dojo/on mw-colorpicker/ColorPicker dojo/text!variableeditor/views/editors/templates/ColorEditor.html dijit/_WidgetBase dijit/_TemplatedMixin".split(" "),function(g,f,e,d,b,a,c,h){function k(a){"none"!==a&&("auto"!==a&&"flat"!==a&&"interp"!==a&&"texturemap"!==a)&&(a=(new g(a)).toHex());return a}return f([c,h],{value:null,templateString:a,colorStyleOptions:[],COLOR_AUTO:"auto",COLOR_NONE:"none",
COLOR_FLAT:"flat",COLOR_INTERP:"interp",COLOR_TEXTUREMAP:"texturemap",constructor:function(){this.colorPicker=null;this.value=arguments[0].value;this.colorStyleOptions=arguments[0].colorStyleOptions;this.showAuto=-1===this.colorStyleOptions.indexOf(this.COLOR_AUTO)?!1:!0;this.showNone=-1===this.colorStyleOptions.indexOf(this.COLOR_NONE)?!1:!0;this.showFlat=-1===this.colorStyleOptions.indexOf(this.COLOR_FLAT)?!1:!0;this.showInterp=-1===this.colorStyleOptions.indexOf(this.COLOR_INTERP)?!1:!0;this.showTexturemap=
-1===this.colorStyleOptions.indexOf(this.COLOR_TEXTUREMAP)?!1:!0;this.inherited(arguments)},_setValueAttr:function(a){a=k(a);a!==this.get("value")&&this._setValue(a)},_setValue:function(a){this._set("value",a);this.colorPicker.set("value",a)},forceSetValue:function(a){a=k(a);this._setValue(a)},_getValueAttr:function(){return this.colorPicker.get("value")},buildRendering:function(){this.inherited(arguments);this.colorPicker=new b({showAuto:this.showAuto,showNone:this.showNone,showFlat:this.showFlat,
showInterp:this.showInterp,showTexturemap:this.showTexturemap});this.colorPicker.set("value",this.value);this.colorPicker.placeAt(this.domNode)},postCreate:function(){this.inherited(arguments);setTimeout(function(){this.colorPicker&&this.colorPicker.own(d(this.colorPicker,"change",this._handleChange.bind(this)))}.bind(this),0)},startup:function(){this.inherited(arguments);this.colorPicker.startup()},destroy:function(){this.colorPicker&&this.colorPicker.destroy();this.colorPicker=null;this.inherited(arguments)},
_handleChange:function(a){a.mwEventData&&(a=a.mwEventData.newValue,this._set("value",a,!1),this.emit("update-color",{newColorValue:a}))},_setReadOnly:function(){}})})},"variableeditor/views/editors/ColorTextBoxEditor":function(){define("variableeditor/views/editors/ColorTextBoxEditor","dojo/_base/declare dojo/_base/lang dojo/_base/Color dojo/dom-style datatoolsservices/DataToolsUtils variableeditor/views/editors/_EditorBase variableeditor/views/editors/_ColorUtils dojo/parser dojo/dom-construct dojo/sniff dijit/_base/focus dojo/keys dojo/on variableeditor/views/editors/TextBoxEditor variableeditor/views/renderers/_TemplateMixin dojo/text!variableeditor/views/editors/templates/ColorTextBoxEditor.html".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s){g=g("variableeditor.views.editors.ColorTextBoxEditor",[a,c,r],{_hasStyle:!1,_hasAlpha:!1,_inputBox:null,_alpha:1,_valueIsAdjusting:!1,_rangeZeroToOne:!0,_doubleClickDuration:0,_inputValueChangeListener:void 0,constructor:function(a){this.templateString=s;this._rangeZeroToOne=a?this._getPossibleBooleanFunctionValue(a.rangeZeroToOne,!0):!0;a&&(this._allArgs=a,this.init(a));h.parse()},_setUIColor:function(a,c){var h=this._getColorValues(a),h=h.color;(c||void 0===
c)&&this._setForegroundValues(h,a)},_getUIColor:function(){return this._value===c.COLOR_AUTO||this._value===c.COLOR_FLAT||this._value===c.COLOR_NONE||this._value===c.COLOR_INTERP||this._value===c.COLOR_TEXTUREMAP||"string"===typeof this._value&&"3 double"===this._value.slice(-8)?this._value:new e(this._value)},_setForegroundValues:function(a,h){this._value=h;if(h===c.COLOR_AUTO||h===c.COLOR_FLAT||h===c.COLOR_NONE||h===c.COLOR_INTERP||h===c.COLOR_TEXTUREMAP||"string"===typeof h&&"3 double"===h.slice(-8))this._inputBox.setValue(h),
this._inputBox.setEditValue(h),this._inputBox._setUIValue(h);else{var b=this._rangeZeroToOne?255:1,k,d,e;this._rangeZeroToOne?(k=(Math.round(100*(a.r/b))/100).toFixed(2),d=(Math.round(100*(a.g/b))/100).toFixed(2),b=(Math.round(100*(a.b/b))/100).toFixed(2),e=(Math.round(100*a.a)/100).toFixed(2)):(k=a.r.toString(),d=a.g.toString(),b=a.b.toString(),e=a.a.toString());this._inputValueChangeListener.pause();this._inputBox.setValue(k+","+d+","+b+(this._hasAlpha?","+e:""));this._inputBox.setEditValue(k+","+
d+","+b+(this._hasAlpha?","+e:""));this._inputBox._setUIValue(k+","+d+","+b+(this._hasAlpha?","+e:""));this._inputValueChangeListener.resume()}},_setupDomClasses:function(a,c){a&&this.addCSSClasses("veDiagonalStrikeout");this._applyCssClass(c?c.dataType?c.dataType:c["class"]:"color",c?c.isTemporaryValue:!1,!1);this.isEditable()?this.removeCSSClasses("variableEditorNotEditable"):this.addCSSClasses("variableEditorNotEditable")},setValue:function(a){if(this.domNode){var h=!1,b=a;a&&a.hasOwnProperty("value")&&
(b=a.value);b||(b=c.WHITE.toCss(!0),h=!0);this.removeCSSClasses("veDiagonalStrikeout");this._setupDomClasses(h,a);this.domNode.setAttribute("data-tag",this.createDataTag("ColorRenderer","cell"));this._setUIColor(b);this.inherited(arguments)}else this._value=a},postCreate:function(){this._setupInputBoxNode();this._hasStyle=this._state?b.getLogicalValue(this._state.showStyle,!1):!1;this._hasAlpha=this._state?b.getLogicalValue(this._state.showAlpha,!1):!1;this.inherited(arguments);this.addCSSClasses("veColorRenderer");
l("mac")&&this.addCSSClasses("macScrollBarWidth")},_setupInputBoxNode:function(){var a=this._getAttachNode("colorValue");if(a){this._inputBox=new q({value:this._value,state:this._state,editable:this._editable,editOnSingleClick:!0});k.place(this._inputBox.domNode,a,"last");this._inputValueChangeListener=n.pausable(this._inputBox,"valueChanged",f.hitch(this,"_inputBoxValueChanged"));this._inputBox.addEventListener("click",f.hitch(this,"_inputMouseClick"));this._inputBox.addEventListener("editingStarted",
f.hitch(this,"_reDispatchEvent"));this._inputBox.addEventListener("editingStopped",f.hitch(this,"_reDispatchEvent"));var c=this,h=this._inputBox._handleKeyDown;this._inputBox._handleKeyDown=function(a){c._ignoreInvalidKeys(a);h.apply(c._inputBox,[a]);c._inputBoxKeyDown(a)};this._inputBox._handleBlurEvent=function(a){a===this&&c._handleBlurEvent(a)};var b=this._inputBox.edit,d=this;this._inputBox.edit=function(){d._originalValue=d._value;d.isEditable()&&(d._setUIColor(d._value),d.focusTextBox(!0));
b.apply(c._inputBox)}}a=f.hitch(this,"_handleKeyboardEvent");n(this.domNode,"keypress",a);this.focusNode=this._inputBox.focusNode},_reDispatchEvent:function(a){this.dispatchEvent(a.type,this,a.data)},_changeListenerState:function(a){a&&"string"===typeof a&&(this.inherited(arguments),this._inputBox._changeListenerState(a))},_swatchMouseClick:function(a){this._handleMouseEvent(a)},_inputMouseClick:function(a){this._inputBox.edit();this._handleMouseEvent(a.data)},_ignoreInvalidKeys:function(a){var c=
this._getKeyCode(a);c!==p.ESCAPE&&c!==p.ENTER&&(c===p.LEFT_ARROW||c===p.LEFT||c===p.RIGHT_ARROW||c===p.RIGHT||c===p.TAB||c===p.UP_ARROW||c===p.DOWN_ARROW||48<=c&&57>=c||188==c||190==c||62===c||c==p.DELETE||c==p.BACKSPACE||219==c||221==c||8==c||46==c||65<=c&&90>=c||c!=p.SPACE&&a.preventDefault())},_inputBoxKeyDown:function(a){a=this._getKeyCode(a);a===p.ESCAPE?this.cancelEditing():a===p.ENTER&&this._colorChanged(this._getNumericColorArrayValues(this._inputBox._getUIValue()),"keyDown")},_colorChanged:function(a,
c){this._isInvalidColor(a)?this.cancelEditing():this._colorsEqual(a,this._value)?(this._setUIColor(a),this.stopEditing()):this._commitNewValue(a,c)},_isInvalidColor:function(a){return a.constructor===Array?(a=a.filter(function(a){return!isNaN(a)&&0<=a&&255>=a}),3>a.length):!1},_commitNewValue:function(a,h){var k=this._value;this._value=this._getColorCommitValue(a);this._setUIColor(this._value,!1);b.removeFromClassList(this.domNode,"veDiagonalStrikeout");this.stopEditing();var d=this._getColorValues(this._value),
d=d&&d.color||c.WHITE;this._setUIColor(this._value);this._colorsEqual(k,this._value)||this.dispatchEvent("valueChanged",this,{editor:this,oldValue:this._originalValue,newValue:this._value,newColor:d,eventTriggerInfo:h})},_getNumericColorArrayValues:function(a){if(a===c.COLOR_AUTO||a===c.COLOR_FLAT||a===c.COLOR_NONE||a===c.COLOR_INTERP||a===c.COLOR_TEXTUREMAP||"string"===typeof a&&"3 double"===a.slice(-8))return a;var h=[];if(a){var b=this._rangeZeroToOne?255:1;a=a.split(/^\[|,| |\]$/g).filter(function(a){return 0!==
a.length});h=a.map(function(a){a=parseFloat(a)*b;return Math.round(Math.max(0,Math.min(255,a)))});3<h.length&&(h[3]=parseFloat(a[3]))}return h},_inputBoxValueChanged:function(a){var h=a.data.newValue,b=this._value;h&&(h=this._getNumericColorArrayValues(h))&&h.length&&(b=new e(h));this._valueIsAdjusting?(b=b||c.WHITE,this.dispatchEvent("valueAdjusting",this,{editor:this,oldValue:a.data.oldValue,newValue:b.toCss(!0),newColor:b})):this._colorChanged(b)},_handleBlurEvent:function(a){a=document.activeElement;
if(this._getPossibleBooleanFunctionValue(this._commitOnBlur,!0)&&(!this.domNode.contains(a)||-1===m._activeStack.indexOf(this.domNode.id))&&this._renderer&&this._renderer.domNode&&a!==this._renderer.domNode)this._editing=!0,this._colorChanged(this._getNumericColorArrayValues(this._inputBox._getUIValue()),"widgetBlur")},_handleColorBlur:function(a){this._getPossibleBooleanFunctionValue(this._commitOnBlur,!0)&&(this._editing&&a&&a.target&&!this.domNode.contains(a.target)&&this._renderer&&this._renderer.domNode&&
a.target!==this._renderer.domNode)&&this._colorChanged(this._getNumericColorArrayValues(this._inputBox._getUIValue()),"widgetBlur")},focusTextBox:function(a){a&&this._inputBox._focus()},stopEditing:function(){this.isEditing()&&this._inputBox&&(this._inputBox.stopEditing(),this._inputBox.setCursorPosition(0,0));this.inherited(arguments)},cancelEditing:function(){var a=this.isEditing();a&&this._inputBox&&this._inputBox.cancelEditing();this._setUIColor(this._originalValue);this._editing=a;this.inherited(arguments)},
_getUIValue:function(){var a=this._getUIColor();return a===c.COLOR_AUTO||a===c.COLOR_FLAT||a===c.COLOR_NONE||a===c.COLOR_INTERP||a===c.COLOR_TEXTUREMAP||"string"===typeof a&&"3 double"===a.slice(-8)?a:a.toCss(!0)},_setReadOnly:function(a){this._inputBox&&this._inputBox._setReadOnly&&this._inputBox._setReadOnly(a)},destroy:function(){this._inputBox.destroy();this.inherited(arguments)}});g.COLOR_VALUE_0_TO_1_INCREMENT=0.01;g.COLOR_VALUE_0_TO_255_INCREMENT=1;return g})},"variableeditor/views/editors/_ColorUtils":function(){define("variableeditor/views/editors/_ColorUtils",
["dojo/_base/declare","dojo/_base/Color"],function(g,f){var e=new f([255,255,255,1]),d=g("variableeditor.views.editors._ColorUtils",[],{_getColorStringFromValue:function(b){return"auto"===b||"flat"===b||"none"===b||"interp"===b||"texturemap"===b?e.toCss(!0):b&&b.toCss?b.toCss(!0):(new f(b)).toCss(!0)},_getColorValues:function(b){var a=b;b&&b.value&&(a=b.value);a||(a=e);var c={value:e.toCss(!0),alpha:1,color:e},h=e;"auto"===b||"flat"===b||"none"===b||"interp"===b||"texturemap"===b?c.value=b:(Array.isArray(a)?
(Array.isArray(a[0])&&(a[0]=255,a[1]=255,a[2]=255,a[3]=1),h=new f(a)):h=a.toRgba&&a.toCss?a:new f(a),c.value=h.toCss(!0),c.alpha=h.a);c.color=h;return c},_colorsEqual:function(b,a){var c=new f,h=new f;if(!b&&a||b&&!a)return!1;if("auto"===b||"flat"===b||"none"===b||"interp"===b||"texturemap"===b||"auto"===a||"flat"===a||"none"===a||"interp"===a||"texturemap"===a)return b===a;c=b&&b.toRgba&&b.toCss?b:new f(b);h=a&&a.toRgba&&a.toCss?a:new f(a);return c.toCss(!0)===h.toCss(!0)},_getJSColorValuesFromMATLABStringArray:function(b,
a){var c=b;void 0===a&&(a=!0);var h=a?255:1;if("string"===typeof b||b instanceof String)"["!==b.substr(0,1)&&(b="["+b+"]"),c=JSON.parse(b.replace(/, /g,",").replace(/ /g,",").replace(/\[/g,"[[").replace(/\]/g,"]]").replace(/;/g,"],["));if(Array.isArray(c)){if(0<c.length&&!Array.isArray(c[0])){var k=[];k[0]=c;c=k}c=c.map(function(a){var c=a.map(function(a){return Math.round(a*h)});4<=c.length&&(c[3]=a[3]);return c})}return c},_getColorCommitValue:function(b){"auto"===b||("flat"===b||"none"===b||"interp"===
b||"texturemap"===b)||(b=new f(b),b.a=this._alpha,b=b.toCss(!0));return b},_createColorGradientCss:function(b){var a="",c=this;b&&b.length&&(b=this._getJSColorValuesFromMATLABStringArray(b).map(function(a){return c._getColorStringFromValue(a)}).join(","),a="background: -webkit-linear-gradient(left,"+b+"); /* For Safari 5.1 to 6.0 */\nbackground: -o-linear-gradient(right,"+b+"); /* For Opera 11.1 to 12.0 */\nbackground: -moz-linear-gradient(right,"+b+"); /* For Firefox 3.6 to 15 */\nbackground: linear-gradient(to right,"+
b+"); /* Standard syntax */\n");return a},_isNone:function(b){return"string"===typeof b&&"none"===b.toLowerCase()}});d.WHITE=e;d.COLOR_AUTO="auto";d.COLOR_FLAT="flat";d.COLOR_NONE="none";d.COLOR_INTERP="interp";d.COLOR_TEXTUREMAP="texturemap";return d})},"variableeditor/views/editors/ColormapEditor":function(){define("variableeditor/views/editors/ColormapEditor","dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/dom-geometry dojo/on dojo/aspect datatoolsservices/DataToolsUtils variableeditor/views/editors/_EditorBase variableeditor/views/renderers/_TemplateMixin mw-form/ComboBox variableeditor/views/renderers/ColorOrderRenderer dijit/_base/focus dojo/text!./templates/ColormapEditor.html dojo/i18n!variableeditor/app/l10n/nls/app".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q){var r={value:"custom",label:q.colormapEditorCustom},s=["parula","jet",{value:"hsv",label:"HSV"},"hot","cool","spring","summer","autumn","winter","gray","bone","copper","pink","lines","colorcube","prism","flag","white"];return g("variableeditor.views.editors.ColormapEditor",[h,k],{templateString:n,_select:void 0,_selectChangeListeners:void 0,_customValue:!1,_customRenderers:void 0,_resizeTimeouts:void 0,_buttonColormapNodes:void 0,_colormapList:s,_doubleClickDuration:0,
postCreate:function(){this.inherited(arguments);this._setupSelect()},_setupSelect:function(){this._select?this._setSelectItems():(this._select=new l(c.mergeObjects(this._allArgs,{editable:!1,disabled:!this.isEditable(),value:void 0,width:"100%",height:"100%",_validateSizeInput:function(a){"string"===typeof a&&"%"===a.charAt(a.length-1)||this.inherited(arguments)},_getAdjustedSize:function(a,c,h){if(("width"===a||"height"===a)&&"string"===typeof c){if("%"===c.charAt(c.length-1))return c}else return this.inherited(arguments)}})),
this.own(this._select),this._select.domNode.setAttribute("data-tag",this.createDataTag("colormapeditor")),a.before(this._select,"_getSelectedItemFromLabel",function(a){return[this._fixLabel(a)]}.bind(this)),this._customRenderers={button:this._getNewCustomColormapRenderer(),menuItem:this._getNewCustomColormapRenderer()},this._addColormapToButton(),this._setSelectItems(),this._selectChangeListeners={_onChangeListener:b.pausable(this._select,"change",f.hitch(this,"_commitValue"))},this._resizeTimeouts=
{},this.own(b(window,"resize",f.hitch(this,"_resizeSelect"))),a.before(this._select,"_openComboBoxMenu",function(){this._resizeMenu()}.bind(this)),this._select.startup(),e.empty(this.domNode),this.domNode.appendChild(this._select.domNode),this._resizeSelect())},destroy:function(){this.inherited(arguments);this._resizeTimeouts&&(this._resizeTimeouts.menu&&clearTimeout(this._resizeTimeouts.menu),this._resizeTimeouts.button&&clearTimeout(this._resizeTimeouts.button))},_commitValue:function(){!0!==this._beingDestroyed&&
this.setValue(this._getUIValue())},_resizeSelect:function(){this.domNode&&(d.position(this.domNode).h?(this._resizeTimeouts.button||(this._resizeTimeouts.button=setTimeout(f.hitch(this,"_resizeButton"),10)),this._resizeTimeouts.menu&&clearTimeout(this._resizeTimeouts.menu),this._resizeTimeouts.menu=setTimeout(f.hitch(this,"_resizeMenu"),100)):setTimeout(f.hitch(this,"_resizeSelect"),2E3))},_resizeButton:function(){this._resizeTimeouts.button=null;this._updateColorOrderRendererValue(this._customRenderers.button)},
_resizeMenu:function(){this._resizeTimeouts.menu=null;if(this._select.domNode&&this._select.get("menu")&&this._select.get("menu").domNode){var a=d.getContentBox(this._select.domNode).w;d.setContentSize(this._select.get("menu").domNode,{w:a})}this._updateColorOrderRendererValue(this._customRenderers.menuItem)},_getNewCustomColormapRenderer:function(){var a=c.mergeObjects(this._allArgs,{value:void 0,inPlaceEditor:null,editor:null}),a=new m(a);this.addCSSClasses(this._getIconClasses("custom"),a.domNode);
this._customValue&&a.setValue(this._customValue);a.startup();return a},_addColormapToButton:function(){var a=this._select.inputNode;this.addCSSClasses(["colormapItem","colormapButton"],a.parentNode);this.addCSSClasses(["colormapLabel","colormapButton"],a);this._buttonColormapNodes={icon:e.create("div",null,a,"before"),custom:e.place(this._customRenderers.button.domNode,a,"before")};this.addCSSClasses(["colormapIcon","colormapButton"],this._buttonColormapNodes.icon);this._setButtonNodeVisible(this._buttonColormapNodes.icon,
!1);this.addCSSClasses(["colormapIcon","colormapButton"],this._buttonColormapNodes.custom);this._setButtonNodeVisible(this._buttonColormapNodes.custom,!1)},_setSelectItems:function(){this._selectChangeListeners&&this._selectChangeListeners._onChangeListener&&this._selectChangeListeners._onChangeListener.pause();var a=this._getItems();this._select.set("items",a);var c=this._select.get("menu").domNode.childNodes[0];this.addCSSClasses("colormapMenu",c);for(var c=c.childNodes,h=0;h<c.length;h++)this._setupItemNode(c[h],
a[h].value);this._setUIValue(this._value);this._selectChangeListeners&&this._selectChangeListeners._onChangeListener&&this._selectChangeListeners._onChangeListener.resume()},_setupItemNode:function(a,c){this.addCSSClasses("colormapItem",a);var h=a.childNodes[0];this.addCSSClasses("colormapLabel",h);"custom"===c?e.place(this._customRenderers.menuItem.domNode,h,"before"):(h=e.create("div",null,h,"before"),this.addCSSClasses(this._getIconClasses(c),h))},setValue:function(a){var c=a;a&&a.hasOwnProperty("value")&&
(c=a.value);this.inherited(arguments);this._setCustomValue(c);this._select&&this._setUIValue(c)},_setCustomValue:function(a){if(this._isValidCustomValue(a)&&!c.compareValues(a,this._customValue)){var h=this.getState(),h=h?f.clone(h):{};h.customValue=a;this.setState(h);a&&this._customRenderers&&(this._updateColorOrderRendererValue(this._customRenderers.button,a),this._updateColorOrderRendererValue(this._customRenderers.menuItem,a))}},_updateColorOrderRendererValue:function(a,c){var h=void 0!==c;c=
c||this._customValue;if(a&&c&&this._isValidCustomValue(c)){var b=this._getColormapWidth(),b=Math.min(14>b?14:b,c.length);if(h||!a._value||a._value.length!==b)if(c.length>b){for(var h=[],b=(c.length-1)/(b-1),k=0;k<c.length;k+=b)h.push(c[Math.round(k)]);a.setValue(h)}else a.setValue(c)}},_getColormapWidth:function(){try{var a=d.getContentBox(this._select.domNode).w,c=d.position(this._select.arrowNode).w,h=d.position(this._select.inputNode).w,b=d.getPadBorderExtents(this._customRenderers.button.domNode).w+
d.getMarginExtents(this._customRenderers.button.domNode).w;return a-c-h-b}catch(k){return 0}},setState:function(a){if(this.domNode){if(a){if(JSON.stringify(this._oldState)===JSON.stringify(a))return;this._oldState=JSON.parse(JSON.stringify(a));void 0!==a.customValue&&(this._customValue=a.customValue);this._colormapList=this._fixColormapList(a.colormapList||this._colormapList);this._setupSelect()}this.inherited(arguments)}},_getDefaultState:function(){return{customValue:!1,colormapList:s}},_getUIValue:function(){var a=
this._select.get("value");return void 0===a||"custom"===a?this._customValue:a},_setUIValue:function(a){this._isUIOption(a)?("string"!==typeof a&&(a="custom"),this._select.set("value",a),this._setButtonColormap(a)):(a=this._getItems(),this.setValue(0<a.length?a[0].value:void 0))},_isUIOption:function(a){return this._isValidValue(a)&&(this._customValue||"string"===typeof a)},_setButtonColormap:function(a){if(this._buttonColormapNodes){var c="custom"===a,h=this._buttonColormapNodes.icon;h&&(this.replaceCSSClasses(this._getIconClasses(),
this._getIconClasses(a),h),this._setButtonNodeVisible(h,!c));(a=this._buttonColormapNodes.custom)&&this._setButtonNodeVisible(a,c)}},_setButtonNodeVisible:function(a,c){c?this.removeCSSClasses("hiddenColormapIcon",a):this.addCSSClasses("hiddenColormapIcon",a)},_setReadOnly:function(a){this._select&&this._select.set("disabled",a)},_focus:function(){this._select&&this._select.focusNode&&this._select.focusNode.focus&&p.curNode!==this._select.focusNode&&p.focus(this._select.focusNode)},hasValueChanged:function(a){return!c.compareValues(this._originalValue,
a)},_getItems:function(a){a=a||this._colormapList;return a.map(function(a){var c=a.value||a;return{value:c,label:this._fixLabel(a.label||c.charAt(0).toUpperCase()+c.slice(1))}}.bind(this))},_isValidValue:function(a){return!a?!1:"string"===typeof a?this._getItems().some(function(c){return c.value===a}):this._isValidCustomValue(a)},_isValidCustomValue:function(a){if(!1===a)return!0;if(!(a instanceof Array&&0<a.length))return!1;for(var c=0;c<a.length;c++){if(3!==a[c].length)return!1;for(var h=0;3>h;h++)if("number"!==
typeof a[c][h]||0>a[c][h]||1<a[c][h])return!1}return!0},_fixColormapList:function(a){a=a||this._colormapList;-1!==a.indexOf("all")&&(a=a.concat(s));var c=this._getItems(this._customValue?[r].concat(s):s);a=a.filter(function(a){return c.some(function(c){return!c.seen&&(c.value===a||c.value===a.value)?c.seen=!0:!1})});var h=a.some(function(a){return"custom"===a||"custom"===a.value});return this._customValue&&!h?[r].concat(a):a},_getIconClasses:function(a){a=a||this._getItems(["custom"].concat(s));"string"===
typeof a?a=[{value:a}]:void 0!==a.value&&(a=[a]);for(var c=["colormapIcon"],h=0;h<a.length;h++)c.push("cmap-"+a[h].value);return c},_fixLabel:function(a){return a.replace(/^[ \n\.]+/g,"")}})})},"variableeditor/views/renderers/ColorOrderRenderer":function(){define("variableeditor/views/renderers/ColorOrderRenderer","dojo/_base/declare dojo/dom-construct dojo/dom-class variableeditor/views/renderers/_RendererBase variableeditor/views/editors/_ColorUtils variableeditor/views/renderers/_TemplateMixin dojo/text!variableeditor/views/renderers/templates/ColorOrderRenderer.html".split(" "),
function(g,f,e,d,b,a,c){g=g("variableeditor.views.renderers.ColorOrderRenderer",[d,b,a],{_rangeZeroToOne:!0,constructor:function(a){this.templateString=c;this._rangeZeroToOne=a?this._getPossibleBooleanFunctionValue(a.rangeZeroToOne,!0):!0;a&&(this._allArgs=a,this.init(a))},postCreate:function(){this.inherited(arguments);this._updateDomColors()},_createColorDivs:function(a,c){if(a&&c)for(var b=this._getJSColorValuesFromMATLABStringArray(a,this._rangeZeroToOne),d=100/b.length,p=0;p<b.length;p+=1){var n=
this._getColorStringFromValue(b[p]),n="width: "+d.toPrecision(4).toString()+"%;background: "+n+";",n=f.create("div",{style:n,innerHTML:"."});e.add(n,"colorDiv");f.place(n,c,"last")}},_updateDomColors:function(){if(this.domNode&&this._value){var a=this.domNode,c=this._getAttachNode("colorSwatch");a.removeChild(c);f.empty(c);this._createColorDivs(this._value,c);f.place(c,a,"last")}},setValue:function(a){this.inherited(arguments);this.domNode&&this._updateDomColors()},_setReadOnly:function(){}});g.COLOR_SWATCH_ATTACH_POINT=
"colorSwatch";return g})},"variableeditor/views/editors/RGBColorEditor":function(){define("dojo/_base/declare mw-colorpicker/MColor dojo/_base/Color variableeditor/views/editors/_EditorBase variableeditor/views/editors/_ColorUtils variableeditor/views/editors/ColorTextBoxEditor variableeditor/views/editors/ColorDropDownEditor variableeditor/views/renderers/_TemplateMixin datatoolsservices/DataToolsUtils dojo/text!./templates/RGBColorEditor.html".split(" "),function(g,f,e,d,b,a,c,h,k,l){g=g([d,b,h],
{templateString:l,_colorStyleOptions:[],COLOR_AUTO:"auto",COLOR_NONE:"none",COLOR_FLAT:"flat",COLOR_INTERP:"interp",COLOR_TEXTUREMAP:"texturemap",_hasStyle:!1,_hasAlpha:!1,_inputBox:null,_alpha:1,_valueIsAdjusting:!1,_rangeZeroToOne:!0,_doubleClickDuration:0,_inputValueChangeListener:void 0,constructor:function(){this._colorTextBox=this._colorDropDown=null;this._configValue();this._createColorDropDown();this._createColorTextBox()},postCreate:function(){this.inherited(arguments);this._colorDropDown.startup();
this._colorTextBox.startup();this._colorTextBox.placeAt(this.domNode);this._colorDropDown.placeAt(this.domNode);this._addListnersToComponents()},_configValue:function(){this._allArgs&&(this._allArgs.state&&this._allArgs.state.showStyle&&!0===this._allArgs.state.showStyle)&&(this._allArgs.state.styleOptions&&Array.isArray(this._allArgs.state.styleOptions)&&0<this._allArgs.state.styleOptions.length)&&(this._colorStyleOptions=this._allArgs.state.styleOptions.slice())},_createColorDropDown:function(){this._colorDropDown=
new c({color:this._allArgs.value,colorStyleOptions:this._colorStyleOptions});this.own(this._colorDropDown)},_createColorTextBox:function(){var c=this._allArgs;c.inPlaceEditor=void 0;this._colorTextBox=new a(c);this._colorTextBox.setEditable(!0);var h=this._colorTextBox._isInvalidColor;this._colorTextBox._isInvalidColor=function(a){return this._isStyle(a)?this._isValidStyle(a)?!1:!0:"string"===typeof a&&"3 double"===a.slice(-8)?!0:h.apply(this._colorTextBox,arguments)}.bind(this);this.own(this._colorTextBox)},
_isValidStyle:function(a){var c=!1;-1<this._colorStyleOptions.indexOf(this.COLOR_AUTO)&&(c=c||this._isAuto(a));-1<this._colorStyleOptions.indexOf(this.COLOR_NONE)&&(c=c||this._isNone(a));-1<this._colorStyleOptions.indexOf(this.COLOR_FLAT)&&(c=c||this._isFlat(a));-1<this._colorStyleOptions.indexOf(this.COLOR_INTERP)&&(c=c||this._isInterp(a));-1<this._colorStyleOptions.indexOf(this.COLOR_TEXTUREMAP)&&(c=c||this._isTextureMap(a));return c},_isStyle:function(a){return this._isNone(a)||this._isAuto(a)||
this._isFlat(a)||this._isInterp(a)||this._isTextureMap(a)},_addListnersToComponents:function(){this._colorDropDown.on("color-changed",this._handleColorDropDownValueChange.bind(this));this._colorDropDown.on("dropdownclick",this._handleDropDownClick.bind(this));this._colorTextBox.addEventListener("editingStarted",this._reDispatchEvent.bind(this));this._colorTextBox.addEventListener("editingStopped",this._reDispatchEvent.bind(this));this._colorTextBox.addEventListener("valueChanged",this._handleTextBoxValueChange.bind(this));
this._colorTextBox.addEventListener("valueAdjusting",this._handleTextBoxValueChange.bind(this))},_handleDropDownClick:function(a){this.dispatchEvent("editingStarted",this,{})},_handleColorDropDownValueChange:function(a){var c=null,c=this._isNone(a.newColorValue)?this.COLOR_NONE:this._isAuto(a.newColorValue)?this.COLOR_AUTO:this._isFlat(a.newColorValue)?this.COLOR_FLAT:this._isInterp(a.newColorValue)?this.COLOR_INTERP:this._isTextureMap(a.newColorValue)?this.COLOR_TEXTUREMAP:(new f(a.newColorValue)).toCss();
this._colorsEqual(this._value,c)||(this._colorChanged(c),this._colorTextBox.setValue(this._value))},_reDispatchEvent:function(a){this.dispatchEvent(a.type,this,a.data)},_handleTextBoxValueChange:function(a){var c=null,c=this._isNone(a.data.newValue)?this.COLOR_NONE:this._isAuto(a.data.newValue)?this.COLOR_AUTO:this._isFlat(a.data.newValue)?this.COLOR_FLAT:this._isInterp(a.data.newValue)?this.COLOR_INTERP:this._isTextureMap(a.data.newValue)?this.COLOR_TEXTUREMAP:(new f(a.data.newValue)).toCss();this._colorsEqual(this._value,
c)||(this._editing=!1,this._colorChanged(c),this._colorDropDown.set("color",c),this._colorDropDown._colorEditor&&(this._colorDropDown._colorEditor.colorPicker&&!this._isStyle(c))&&(a=this._colorDropDown._colorEditor.colorPicker.get("recentlyUsedColors"),c=(new e(c)).toHex(),a.splice(a.indexOf(c),1),a.unshift(c),this._colorDropDown._colorEditor.colorPicker.set("recentlyUsedColors",a)))},setValue:function(a,c,h){this._setUIValue(a,c,h)},getValue:function(){return this._getUIValue()},_setUIValue:function(a){var c=
null;"string"===typeof a&&"3 double"===a.slice(-8)?(this._editValue=this._value=a,this._colorDropDown&&this._colorDropDown.set("color","rgb(245, 245, 245)"),this._colorTextBox&&this._colorTextBox.setValue(a)):(this._isNone(a)?this._editValue=this._value=this.COLOR_NONE:this._isAuto(a)?this._editValue=this._value=this.COLOR_AUTO:this._isFlat(a)?this._editValue=this._value=this.COLOR_FLAT:this._isInterp(a)?this._editValue=this._value=this.COLOR_INTERP:this._isTextureMap(a)?this._editValue=this._value=
this.COLOR_TEXTUREMAP:(c=new f(a),this._value=c.toCss(),this._editValue=c.toCss()),this._colorDropDown&&this._colorDropDown.set("color",this._value),this._colorTextBox&&this._colorTextBox.setValue(this._value))},_getUIValue:function(){return this._value},_isNone:function(a){return"string"===typeof a&&a.toLowerCase()===this.COLOR_NONE},_isAuto:function(a){return"string"===typeof a&&a.toLowerCase()===this.COLOR_AUTO},_isFlat:function(a){return"string"===typeof a&&a.toLowerCase()===this.COLOR_FLAT},
_isInterp:function(a){return"string"===typeof a&&a.toLowerCase()===this.COLOR_INTERP},_isTextureMap:function(a){return"string"===typeof a&&a.toLowerCase()===this.COLOR_TEXTUREMAP},_colorChanged:function(a){var c=this._value;this._editValue=this._value=a;this._commitNewValue(a,c)},setState:function(a){this.inherited(arguments);void 0!==a.isMetaData&&(this._colorTextBox&&this._colorTextBox._inputBox&&this._colorTextBox._inputBox._state)&&(this._colorTextBox._inputBox._state.isMetaData=k.getLogicalValue(a.isMetaData,
!1))},_commitNewValue:function(a,c){this.stopEditing();this.dispatchEvent("valueChanged",this,{editor:this,oldValue:c,newValue:a})},_setReadOnly:function(){}});g.CSS_SELECTOR="colorEditorWithTextBox";return g})},"variableeditor/views/editors/ColorDropDownEditor":function(){define("dojo/_base/declare dojo/query dojo/dom-style dojo/dom-class dojo/_base/Color dojo/on ./ColorEditor mw-form/DropDownButton dijit/TooltipDialog dojo/text!variableeditor/views/editors/templates/ColorDropDownEditor.html dijit/_WidgetBase dijit/_TemplatedMixin MW/toolstrip/widgets/_WidgetMixin dijit/_WidgetsInTemplateMixin".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q){return g([m,p,q,n],{color:"#FF0000",templateString:l,colorStyleOptions:[],COLOR_AUTO:"auto",COLOR_NONE:"none",COLOR_FLAT:"flat",COLOR_INTERP:"interp",COLOR_TEXTUREMAP:"texturemap",constructor:function(){this._colorEditor=this._dropDownButtonNode=null;this.color=arguments[0].color;this.colorStyleOptions=arguments[0].colorStyleOptions;this.inherited(arguments)},destroy:function(){this.inherited(arguments)},_setColorAttr:function(a){a!==this.COLOR_AUTO&&(a!==this.COLOR_NONE&&
a!==this.COLOR_FLAT&&a!==this.COLOR_INTERP&&a!==this.COLOR_TEXTUREMAP)&&(a=(new b(a)).toHex());a!==this.get("color")&&(this._set("color",a),this._updateDropDownColor(this.get("color")),this._colorEditor&&this._colorEditor.set("value",a,!1))},buildRendering:function(){this.inherited(arguments);this._dropDownButtonNode=new h({hasDynamicMenu:!0});this.own(this._dropDownButtonNode);this._colorSwatchInButton=this._dropDownButtonNode.iconNode;d.add(this._dropDownButtonNode.domNode,"colorDropDownEditor-dropDownButton");
this._updateDropDownColor(this.get("color"));this._dropDownButtonNode.placeAt(this.domNode);this._updateDropDownColor(this.color)},postCreate:function(){this.inherited(arguments);this._dropDownButtonNode.on("dropdownclick",this._handleDropDownClick.bind(this))},startup:function(){this.inherited(arguments);this._dropDownButtonNode.startup()},_handleDropDownClick:function(a){this._colorEditor||(this._colorEditor=new c({value:this.color,colorStyleOptions:this.colorStyleOptions}),this.own(this._colorEditor),
this._tooltipDialogWithColorPicker=this._createTooltipDialogWithColorPicker(this._colorEditor),this._dropDownButtonNode.set("menu",this._tooltipDialogWithColorPicker),this._dropDownButtonNode.set("_menuOrientation","below below-alt above above-alt after before above-centered below-centered before-centered after-centered".split(" ")),this.own(this._tooltipDialogWithColorPicker),this._tooltipDialogWithColorPicker.startup(),this._colorEditor.startup(),this._colorEditor.on("update-color",this._handleUpdateColor.bind(this)));
this._colorEditor.forceSetValue(this.color);this._dropDownButtonNode.showMenu();this.defer(function(){this._tooltipDialogWithColorPicker.domNode.focus()}.bind(this));f(".colorEditor").forEach(function(a){d.remove(a,"colorDropDownEditor-dropDownButton-opened")});d.add(this._colorEditor.domNode,"colorDropDownEditor-dropDownButton-opened");this.emit("dropdownclick")},_handleUpdateColor:function(a){this._updateDropDownColor(a.newColorValue);this._set("color",a.newColorValue);this.emit("color-changed",
a)},_updateDropDownColor:function(a){a&&(d.remove(this._colorSwatchInButton,"mwColorPickerNoneColorSwatch"),d.remove(this._colorSwatchInButton,"mwColorPickerAutoColorSwatch"),d.remove(this._colorSwatchInButton,"mwColorPickerFlatColorSwatch"),d.remove(this._colorSwatchInButton,"mwColorPickerInterpColorSwatch"),d.remove(this._colorSwatchInButton,"mwColorPickerTextureMapColorSwatch"),a===this.COLOR_NONE?(e.set(this._colorSwatchInButton,"backgroundColor","#ffffff"),d.add(this._colorSwatchInButton,"mwColorPickerNoneColorSwatch")):
a===this.COLOR_AUTO?d.add(this._colorSwatchInButton,"mwColorPickerAutoColorSwatch"):a===this.COLOR_FLAT?d.add(this._colorSwatchInButton,"mwColorPickerFlatColorSwatch"):a===this.COLOR_INTERP?d.add(this._colorSwatchInButton,"mwColorPickerInterpColorSwatch"):a===this.COLOR_TEXTUREMAP?d.add(this._colorSwatchInButton,"mwColorPickerTextureMapColorSwatch"):e.set(this._colorSwatchInButton,"backgroundColor",a))},_createTooltipDialogWithColorPicker:function(a){return new k({content:a,"class":"ColorEditorTooltipDialog",
onClose:function(){var c=a.colorPicker.get("value");if(c!==this.COLOR_NONE&&c!==this.COLOR_AUTO&&c!==this.COLOR_FLAT&&c!==this.COLOR_INTERP&&c!==this.COLOR_TEXTUREMAP){var h=a.colorPicker.get("recentlyUsedColors");h.splice(h.indexOf(c),1);h.unshift(c);a.colorPicker.set("recentlyUsedColors",h)}}.bind(this)})}})})},"variableeditor/views/editors/ObjectEditor/GraphicsObjectEditor":function(){define("variableeditor/views/editors/ObjectEditor/GraphicsObjectEditor",["dojo/_base/declare","variableeditor/views/editors/ObjectEditor/_BaseObjectEditor"],
function(g,f){return g([f],{_objectSelected:function(){this.dispatchEvent("actionEvent",this,{actionType:"objectSelectionChanged",objectToSelect:this.propertyName,selectionCriteria:"propertyName"})}})})},"variableeditor/views/editors/ObjectEditor/_BaseObjectEditor":function(){define("variableeditor/views/editors/ObjectEditor/_BaseObjectEditor","dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/on dojo/dom-class dojo/dom-style variableeditor/views/editors/_EditorBase dojo/i18n!variableeditor/app/l10n/nls/app".split(" "),
function(g,f,e,d,b,a,c,h){return g([c],{_oldValue:null,postCreate:function(){this.inherited(arguments);this._setupInputNode()},_setupInputNode:function(){if(this._value){var c=this._value;0===this._value.indexOf("0\u00d70")?c=h.emptyGraphicsObject:0===this._value.indexOf("1\u00d71")&&(c=this._value.replace("1\u00d71",""));c=c.trim();this._inputBox=e.create("div");this._inputBox.innerHTML=c;if("Root"!==c&&c!==h.emptyGraphicsObject){b.add(this._inputBox,"hyperlinkEditor");var c=e.create("canvas"),l=
c.getContext("2d").measureText(this._inputBox.innerHTML).width;e.destroy(c);a.set(this._inputBox,"width",1.2*l+"px");this.own(d(this._inputBox,"mousedown",f.hitch(this,"_objectSelected")))}this.domNode.appendChild(this._inputBox)}},setState:function(){this.domNode&&(this._inputBox&&this._value!==this._oldValue)&&(this._oldValue=this._value,e.empty(this.domNode),this._setupInputNode())},_inPlaceEdit:function(){},_handleMouseEvent:function(){},_setReadOnly:function(){},_objectSelected:function(){}})})},
"variableeditor/views/editors/ColorOrderEditor":function(){define("variableeditor/views/editors/ColorOrderEditor","dojo/_base/declare dojo/_base/lang dijit/registry dojo/_base/Color dojo/dom-construct dojo/dom-class dojo/keys dojo/on dojo/dnd/Manager dijit/focus dojo/topic dojo/window dojo/sniff mw-dialog-utils/DialogUtils datatoolsservices/DataToolsUtils variableeditor/views/editors/_EditorBase variableeditor/views/editors/_ColorUtils variableeditor/views/editors/RGBColorEditor variableeditor/views/renderers/ColorOrderRenderer variableeditor/views/renderers/_TemplateMixin dojo/text!variableeditor/views/editors/templates/ColorOrderEditor.html dojo/i18n!variableeditor/app/l10n/nls/app".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x,y){g=g("variableeditor.views.editors.ColorOrderEditor",[s,t,w],{AddNewLabel:y.colorOrderEditorAddNew,_colorOrderRenderer:void 0,_valueChanged:!1,_colorChangeListeners:{},_dndSource:void 0,_avatarMap:{},_inputValueType:"string",_rangeZeroToOne:!0,constructor:function(a){this.templateString=x;this.AddNewLabel=y.colorOrderEditorAddNew;this._colorOrderRenderer=void 0;this._colorChangeListeners={};this._dndSource=void 0;this._avatarMap={};this._rangeZeroToOne=
a?this._getPossibleBooleanFunctionValue(a.rangeZeroToOne,!0):!0;a&&(this._allArgs=a,this.init(a));this._colorChangeListeners={};this._colorChangeListeners.documentClickListener=h.pausable(document,"mouseup",f.hitch(this,"_handleColorBlur"));this.colorEditorsCreated=!1},postCreate:function(){this._createColorOrderRenderer();this._createAddNewColorButton();this._value&&this._setUIValue(this._value,!0);n("mac")&&this.addCSSClasses("macScrollBarWidth");this.inherited(arguments)},setValue:function(a){this._inputValueType=
"string"===typeof a||a instanceof String?"string":"array";this._setUIValue(a);this.inherited(arguments)},edit:function(){this.inherited(arguments);this._updateColorList(this._value);var a=this._getAttachNode("colorAddButton");a&&l.focus(a)},stopEditing:function(){var a=this._getColorWidgets();a&&a.forEach&&a.forEach(function(a){a.stopEditing&&a.stopEditing()});this._changeObjectListenersState(this._colorChangeListeners,"pause");this.inherited(arguments)},cancelEditing:function(){this._setUIValue(this._originalValue,
!0);this._valueChanged=!1;this.inherited(arguments)},_handleBlurEvent:function(){},_handleColorBlur:function(a){if(!a.target.classList.contains("mwColorPaletteSwatch")&&!a.target.classList.contains("dijitTooltipConnector")&&!a.target.classList.contains("propertySetOuterContainer")){var c=dijit.registry.getEnclosingWidget(a.target);if(!(c&&0<=c.class.indexOf("mwColor"))){try{for(var h=this._getColorWidgets(),c=0;c<h.length;c+=1){var b=h[c];if(b._colorDropDown&&b._colorDropDown._tooltipDialogWithColorPicker&&
b._colorDropDown._tooltipDialogWithColorPicker.domNode&&b._colorDropDown._tooltipDialogWithColorPicker.domNode.contains(a.target))return}}catch(d){}this._getPossibleBooleanFunctionValue(this._commitOnBlur,!0)&&(this._editing&&a&&a.target&&this.domNode&&!this.domNode.contains(a.target)&&a.target!==this._renderer.domNode)&&(this._valueChanged?this.stopEditing():this.cancelEditing())}}},_changeListenerState:function(a){if(a&&"string"===typeof a){this.inherited(arguments);this._changeObjectListenersState(this._colorChangeListeners,
a);var c=this._getColorWidgets();c&&c.forEach&&c.forEach(function(c){c._changeListenerState(a)})}},_createAddNewColorButton:function(){var a=this._getAttachNode("colorAddButton");a&&(h(a,"click",f.hitch(this,"_addNewColor",t.WHITE.toRgba())),h(a,"keydown",f.hitch(this,"_handleKeyboardEvent")),this.focusNode=a)},_createColorOrderRenderer:function(){if(!this._colorOrderRenderer){this._colorOrderRenderer=new v(this._allArgs);this._colorOrderRenderer.setValue(this._value);this._colorOrderRenderer.startup();
var a=this;this._colorOrderRenderer.addEventListener("click",function(){a.stopEditing()});this._colorOrderRenderer.addEventListener("keydown",function(c){a._handleKeyDown(c.data)});var c=this._getAttachNode("colorOrderRendererDiv");b.place(this._colorOrderRenderer.domNode,c,"last")}},_updateColorOrderRenderer:function(){var a=this._getCommitValue();this._colorOrderRenderer&&this._colorOrderRenderer.setValue(a);this._renderer&&this._renderer.setValue(a)},_addNewColor:function(a){a||(a=t.WHITE.toRgba());
a=this._createColorListItem(a);this._dndSource.insertNodes(!1,[a]);this._valueChanged=!0;p.scrollIntoView(a);this._updateColorOrderRenderer()},_getColorWidgets:function(){var a=[];if(this.domNode){var c=this._getAttachNode("colorList");if(c&&(c=c.getElementsByClassName(u.CSS_SELECTOR))&&c.length)for(var h=0;h<c.length;h+=1){var b=e.getEnclosingWidget(c[h]);b&&a.push(b)}}return a},_getCommitValue:function(){var a="",c=this,a=this._getColorWidgets();"string"===this._inputValueType?(a=a.map(function(a){a=
a._getUIValue();a=new d(a);var h=c._rangeZeroToOne?255:1;return[a.r/h,a.g/h,a.b/h].join(" ")}).join(";"),a="["+a+"]"):a=a.map(function(a){a=a._getUIValue();a=new d(a);var h=c._rangeZeroToOne?255:1;return[a.r/h,a.g/h,a.b/h]});return a},_createColorList:function(a){if(this.domNode&&a&&this.isEditing()){var c=this._getAttachNode("colorListDiv"),h=this._getAttachNode("colorList");c.removeChild(h);this._destroyColorWidgets();b.empty(h);a=this._getJSColorValuesFromMATLABStringArray(a,this._rangeZeroToOne);
for(var d=[],k=0;k<a.length;k+=1){var e=this._createColorListItem(a[k]);d.push(e)}this._createDragAndDropSource(h,d);b.place(h,c,"last")}},_updateColorList:function(a){if(this.domNode&&a&&this.isEditing())if(!1===this.colorEditorsCreated)this._createColorList(this._value),this.colorEditorsCreated=!0;else{a=this._getJSColorValuesFromMATLABStringArray(a,this._rangeZeroToOne);for(var c=this._getColorWidgets(),h=0;h<c;h++)c[h].setValue(a[h])}},_createColorEditor:function(a){a=new u({value:a,editable:!0,
state:this.getState(),rangeZeroToOne:this._rangeZeroToOne});a.startup();var c=this;a.addEventListener("editingCanceled",function(){c._updateColorOrderRenderer()});a.addEventListener("valueChanged",function(){c._valueChanged=!0;c._updateColorOrderRenderer()});return a},_createColorListItem:function(c){c=this._createColorEditor(c);var d=b.create("li",{dndtype:"colorListItem",type:["colorListItem"]});a.add(d,"dojoDndItem");a.add(d,"colorListItem");var k=this.getState();!0===r.getLogicalValue(k.DnDSupported,
!0)&&(k=b.create("div",{innerHTML:"."}),a.add(k,"dojoDndHandle"),a.add(k,"colorDragHandle"),b.place(k,d,"first"));b.place(c.domNode,d,"last");k=b.create("div",{innerHTML:"."});a.add(k,"colorDeleteDiv");h(k,"click",f.hitch(this,"_deleteColorListItem",d,c));b.place(k,d,"last");d.colorEditorWidget=c;return d},_createDragAndDropSource:function(a,c){var h=this,b=r.createSelectableDnDTarget(a,{accept:["colorListItem"],checkAcceptanceCallback:function(c){h._valueChanged=!0;return c.node===a}});b.autoSync=
!0;b.allowNested=!0;b.isSource=!0;b.copyOnly=!1;b.withHandles=!0;b.creator=f.hitch(this,"_createDnDAvatar");this._dndSource=b;var d=b.onMouseMove;b.onMouseMove=function(a){h._adjustAvatarMap(b);d.call(b,a)};m.subscribe("/dnd/start",f.hitch(h,"_handleDnDTopic","pause"));m.subscribe("/dnd/drop",f.hitch(h,"_handleDnDTopic","resume"));m.subscribe("/dnd/cancel",f.hitch(h,"_handleDnDTopic","resume"));var k=b.onDrop;b.onDrop=function(a,c,d){h._valueChanged=!0;k&&(a===b||a.node===b.node)&&k.call(b,b,c,d)};
b.insertNodes(!1,c);b.startup()},_handleDnDTopic:function(a){this._changeListenerState(a);this._updateColorOrderRenderer();l.focus(this.focusNode)},_deleteColorListItem:function(a,c,h){var d=this._getAttachNode("colorAddButton");d&&l.focus(d);1<this._getColorWidgets().length?(this._dndSource.delItem(a.id),c.destroy(),b.destroy(a),this._valueChanged=!0):q.displayModalDialog(y.colorOrderEditorAtLeastOne,y.errorTitle,[{name:"ok",buttonHandler:{handler:"dismiss"}}]);h.preventDefault();h.stopPropagation();
this._updateColorOrderRenderer()},_adjustAvatarMap:function(a){if(a.map)for(var c in a.map)if(a.map.hasOwnProperty(c)){var h=a.map[c];if(h&&h.data&&"string"===typeof h.data&&(h=a.node.querySelector("#"+c))&&h.data)a.map[c].data=h.data}},_resetDojoDnDAvatarOffset:function(){var a=k.manager();a.OFFSET_X=16;a.OFFSET_Y=16},_createDnDAvatar:function(c,h){var d=b.create("span");d.id=dojo.dnd.getUniqueId();d.itemIndex=parseInt(c.data);a.add(d,"dojoDndItem");a.add(d,"colorOrderEditor");a.add(d,"colorListItemAvatar");
if("avatar"===h&&c){if(c){var k=new u;k.setValue(c.getValue());k.startup();b.place(k.domNode,d,"last")}}else return d=this._dndSource.defaultCreator(c,h),this._avatarMap[d.data]=c.colorEditorWidget,d.node.data=c.colorEditorWidget,d.data=c.colorEditorWidget,d;this._resetDojoDnDAvatarOffset();return{node:d,data:c,type:["colorListItem"]}},_handleKeyboardEvent:function(a){if(this.isEditing()){"keydown"===a.type&&this._handleKeyDown(a);var c=a;c.editor=this;this.dispatchEvent(a.type,this.domNode,c);a.stopPropagation()}else this.inherited(arguments)},
_handleKeyDown:function(a){if(a){var h=this._getKeyCode(a);if(null!==h&&h===c.ESCAPE){if(a.target)for(var h=this._getColorWidgets(),b=0;b<h.length;b+=1)if(h[b].domNode.contains(a.target)){h[b].cancelEditing();l.focus(this.focusNode);return}this.cancelEditing();a.stopPropagation();a.preventDefault()}}},_getUIValue:function(){return!this._valueChanged?this._originalValue:this._getCommitValue()},_setUIValue:function(a,c){if(JSON.stringify(a)!==JSON.stringify(this._value)||c)this._updateColorList(a),
this._colorOrderRenderer&&this._colorOrderRenderer.setValue(a),this._renderer&&this._renderer.setValue(a)},_setReadOnly:function(a){var c=this._getColorWidgets();c&&c.forEach&&c.forEach(function(c){c._setReadOnly&&c._setReadOnly(a)})},destroy:function(){this._destroyColorWidgets();this.inherited(arguments)},_destroyColorWidgets:function(){var a=this._getColorWidgets();if(a)for(var c=0;c<a.length;c+=1)a[c].destroy()}});g.COLOR_LIST_DIV_ATTACH_POINT="colorListDiv";g.COLOR_LIST_ATTACH_POINT="colorList";
g.COLOR_LIST_ADD_NEW_ATTACH_POINT="colorAddButton";g.COLOR_ORDER_RENDERER_DIV="colorOrderRendererDiv";return g})},"variableeditor/views/editors/DisplayFormatTextBoxEditor":function(){define(["dojo/_base/declare","variableeditor/views/editors/TextBoxEditor"],function(g,f){return g([f],{postCreate:function(){this.inherited(arguments);this.domNode.setAttribute("data-tag","datatools.variableeditor.views.editors.DisplayFormatTextBoxEditor")},_setupInputNode:function(){this.inherited(arguments);this._inputBox.set("spellcheck",
!1)},setState:function(e){e&&(e.isMetaData=!1);this.inherited(arguments)}})})},"variableeditor/views/editors/FilePickerEditor":function(){define("dojo/_base/declare dojo/_base/lang dojo/on dojo/aspect dijit/focus datatoolsservices/DataToolsUtils variableeditor/views/editors/_EditorBase variableeditor/views/renderers/_TemplateMixin variableeditor/views/editors/TextBoxEditor mw-form/ToggleButton mw-overlay-utils/BusyOverlay dojo/text!./templates/FilePickerEditor.html dojo/i18n!variableeditor/app/l10n/nls/app".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){return g([c,h],{templateString:p,_textBox:void 0,_browseButton:void 0,_busyIndicator:void 0,_filterSpec:"*",_isBrowsing:!1,_doubleClickDuration:0,postCreate:function(){this.inherited(arguments);this._createTextBox();this._createBrowseButton();this._createBusyIndicator();this._addListenersToComponents()},_createTextBox:function(){this._textBox=new k(a.mergeObjects(this._allArgs,{inPlaceEditor:void 0,state:{isMetaData:!1},spellcheck:!1}));this._textBox.placeAt(this.domNode).startup();
d.after(this._textBox,"stopEditing",function(){b.curNode===this._textBox.focusNode&&b.curNode.blur()}.bind(this));this._setUIValue(this._value)},_createBrowseButton:function(){this._browseButton=new l({text:n.filePickerEditorBrowse,icon:"fileIcon",disabled:!this.isEditable()});this._browseButton.placeAt(this.domNode).startup()},_createBusyIndicator:function(){this.ownerDocumentBody?(this._busyIndicator=new m(m.SIZE.SMALL),this._busyIndicator.set("target",this.ownerDocumentBody)):setTimeout(f.hitch(this,
"_createBusyIndicator"),100)},_addListenersToComponents:function(){this._textBox.addEventListener("valueChanged",f.hitch(this,"_handleTextBoxValueChanged"));this._browseButton.on("mousedown, click",f.hitch(this,"_handleBrowseButtonClick"))},_handleTextBoxValueChanged:function(){setTimeout(function(){var a=this._getUIValue();!this._isBrowsing&&this._value!==a&&!this._isBrowse(a)?this.setValue(a):this._setUIValue(this._value)}.bind(this))},_handleBrowseButtonClick:function(a){a.preventDefault();this._isBrowsing||
(this._setUIValue(this._value),this._setBrowsing(!0),this.setValue(this._getBrowse()))},setValue:function(a){var c=this._isBrowsing&&/ $/.test(a),h=this._isBrowse(a);(c||!h)&&this._setBrowsing(!1);a=(a||"").trim();this.inherited(arguments);this._setUIValue(a)},setState:function(a){this.domNode&&(a&&(this._filterSpec=a.filterSpec||"*"),this.inherited(arguments))},setEditable:function(a){this.inherited(arguments);var c=this.isEditable();this._textBox&&this._textBox.setEditable(c);this._browseButton&&
this._browseButton.set("disabled",!c)},_getUIValue:function(){return(this._textBox?this._textBox._getUIValue():this._value).trim()},_setUIValue:function(a){a=(a||"").trim();!this._isBrowse(a)&&this._textBox&&(this._textBox.stopEditing(),this._textBox.setValue(a),this._textBox.setEditValue(a))},_setBrowsing:function(a){this._browseButton&&(this._browseButton.set("checked",a),this[a?"addCSSClasses":"removeCSSClasses"]("open",this._browseButton.domNode),b.curNode&&a&&b.focus(this._browseButton.domNode));
this._isBrowsing=a},_getBrowse:function(){return"?"+this._filterSpec},_isBrowse:function(a){return a&&"?"===a[0]}})})},"variableeditor/views/editors/UITableColumnTextBoxEditor":function(){define(["dojo/_base/declare","variableeditor/views/editors/TextBoxEditor","datatoolsservices/DataToolsUtils"],function(g,f,e){return g([f],{postCreate:function(){this.inherited(arguments);this.domNode.setAttribute("data-tag","datatools.variableeditor.views.editors.UITableColumnTextBoxEditor")},setValue:function(d){d=
"string"===typeof d||d instanceof String?d.split(","):d;d=Array.isArray(d)?d:[d];"ColumnWidth"===this.propertyName?(d=d.map(this._parsevValue),d=this._convertStringValueToInt(d)):"ColumnName"===this.propertyName?d=d.map(function(b){return b.trim()}):"ColumnEditable"===this.propertyName&&(d=d.map(this._parsevValue),d=d.map(function(b){return"string"===typeof b?b.trim():b}));this.inherited(arguments)},_parsevValue:function(d){if(d&&("string"===typeof d||d instanceof String))d=d.replace(/['"]+/g,"");
return d},_convertStringValueToInt:function(d){for(var b=[],a=0;a<d.length;a++)"string"===typeof d[a]&&(d[a]=d[a].trim()),"auto"!==d[a]&&!isNaN(e.filterFloat(d[a]))?b.push(e.filterFloat(d[a])):b.push(d[a]);return b},setEditValue:function(d){d=this._value;this.inherited(arguments)},setState:function(d){d&&(d.isMetaData=!1);this.inherited(arguments)},_setUIValue:function(d){d!==this._getUIValue("value")&&(this._inputBox.set("value",d+" "),this._inputBox.set("value",d))},updateBeforeSendToServer:function(d,
b){if("client"===b&&"ColumnEditable"===this.propertyName){var a=[];return a=d.map(function(a){return"true"===a?!0:"false"===a?!1:a})}return"client"===b&&"ColumnName"===this.propertyName?Array.isArray(d)&&1===d.length&&"numbered"===d[0]?d[0]:d:d}})})},"variableeditor/views/VariableEditorViews":function(){require("variableeditor/views/UnknownView variableeditor/views/NumericArrayView variableeditor/views/CharArrayView variableeditor/views/StringArrayView variableeditor/views/StructureArrayView variableeditor/views/CategoricalView variableeditor/views/TableArrayView variableeditor/views/CellArrayView variableeditor/views/VectorStructureArrayView variableeditor/views/DatetimeArrayView variableeditor/views/DurationArrayView variableeditor/views/CalendarDurationArrayView variableeditor/views/UITableArrayView variableeditor/views/UITableTableView variableeditor/views/editors/TextBoxEditor variableeditor/views/editors/LogicalEditor variableeditor/views/editors/NumericEditor variableeditor/views/editors/NumericTextEditor variableeditor/views/editors/ComboBoxEditor variableeditor/views/editors/StringEditor variableeditor/views/editors/CharEditor variableeditor/views/editors/CheckBoxEditor variableeditor/views/editors/TextAreaEditor variableeditor/views/editors/DatetimeEditor variableeditor/views/editors/IconTextBoxEditor variableeditor/views/editors/OpenvarEditor variableeditor/views/renderers/GroupedColumnRenderer".split(" "),
function(){})},"variableeditor/views/UnknownView":function(){define("variableeditor/views/UnknownView",["dojo/_base/declare","dojo/dom-class","mw-form/TextArea","variableeditor/views/ClientPeerView"],function(g,f,e,d){return g("variableeditor.views.UnknownView",[d],{textArea:null,init:function(b){this.inherited(arguments);if(b&&b.container){var a=new e({name:"UnsupportedTextArea_"+this.varName,value:"",width:"auto",height:"auto",readOnly:!0,editable:!1});f.add(a.domNode,"UnknownViewerTextArea");a.startup();
this.textArea=a;this.peerNode.addPeerEventListener("setData",function(c){c.data.data&&c.data.data!==a.value&&a.set("value",c.data.data)});f.add(b.container.domNode,"unsupportedView");this.peerNode.dispatchEvent("peerEvent",this.peerNode,{type:"getData"});b.container.addChild(this.textArea)}}})})},"variableeditor/views/ClientPeerView":function(){define("variableeditor/views/ClientPeerView",["dojo/_base/declare","dojo/Deferred","variableeditor/VariableEditorUtils","mw-peermodel/Observable","mw-log/Log"],
function(g,f,e,d,b){return g("variableeditor.views.ClientPeerView",[d.Impl],{allArgs:{},peerNode:null,varName:null,editable:!0,cssSpecifier:"",userContext:{},viewListeners:[],constructor:function(a){this.init(a)},init:function(a){this.allArgs={};this.peerNode=null;this.userContext={};this.viewListeners=[];a&&(this.peerNode=a.peerNode,this.varName=a.varName,this.editable=a.editable,this.cssSpecifier=a.cssSpecifier,this.userContext=a.userContext||{},this.allArgs=a)},destroy:function(){e.logDebug("VE: ClientPeerView : destroy");
this.peerNode=null},addViewListener:function(a){this.viewListeners.push(a)},removeViewListener:function(a){a=this.viewListeners.indexof(a);0<=a&&this.viewListeners.splice(a,1)},_fireViewReady:function(a){this.viewListeners.forEach(function(c){if(c.viewReady)try{c.viewReady(a)}catch(h){b.error(h),b.error(h.stack)}})},getProperty:function(a,c){var h=new f(function(){});h.reject("Getting property "+a+"  not supported.");return h},setProperty:function(a,c,h){c=new f(function(){});c.reject("Setting property "+
a+" is not supported.");return c}})})},"variableeditor/views/NumericArrayView":function(){define("variableeditor/views/NumericArrayView",["dojo/_base/declare","variableeditor/views/ClientArrayView","variableeditor/views/table/ArrayTable"],function(g,f,e){return g("variableeditor.views.NumericArrayView",[f],{constructor:function(d){this.table={}},createTable:function(d){return new e(d)}})})},"variableeditor/views/ClientArrayView":function(){define("variableeditor/views/ClientArrayView","dojo/_base/declare dojo/Deferred dojo/dom-geometry dojo/dom-class dijit/registry mw-log/Log variableeditor/VariableEditorUtils datatoolsservices/DataToolsUtils variableeditor/views/ClientPeerView".split(" "),
function(g,f,e,d,b,a,c,h,k){return g("variableeditor.views.ClientArrayView",[k],{table:null,constructor:function(a){this.table={}},init:function(a){this.inherited(arguments);var c=this;if(a&&a.container){c.allArgs=a;c.peerNode.addEventListener("childAdded",function(h){c._addGrid(a,h.data.child);c._initializeExistingModelProperties()});if(c.peerNode.getChildren&&0<c.peerNode.getChildren().length){var h=c.peerNode.getChildren()[0];c._addGrid(a,h)}this._initializeModelProperties()}},initArgs:function(a){},
_refreshTable:function(){this.table&&this.table.updateModelProperties&&this.table.updateModelProperties(!0)},_updateModelProperties:function(a,h,b){void 0===b&&(b=!0);this[a]=JSON.parse(h);c.logDebug("Setting "+a+":");c.logDebug(this[a]);if(this.table&&(this.table[a]=this[a],b)){var d=this;this._propertyTimer&&clearTimeout(this._propertyTimer);this._propertyTimer=setTimeout(function(){d._refreshTable()},50)}this.dispatchEvent("modelPropertiesSet",this,{type:a})},_initializeExistingModelProperties:function(){this.peerNode&&
this.peerNode.hasProperty&&(this.peerNode.hasProperty("CellModelProperties")&&this._updateModelProperties("CellModelProperties",this.peerNode.getProperty("CellModelProperties"),!1),this.peerNode.hasProperty("TableModelProperties")&&this._updateModelProperties("TableModelProperties",this.peerNode.getProperty("TableModelProperties"),!1),this.peerNode.hasProperty("RowModelProperties")&&this._updateModelProperties("RowModelProperties",this.peerNode.getProperty("RowModelProperties"),!1),this.peerNode.hasProperty("ColumnModelProperties")&&
this._updateModelProperties("ColumnModelProperties",this.peerNode.getProperty("ColumnModelProperties"),!1));this._refreshTable()},_initializeModelProperties:function(){this._initializeExistingModelProperties();var c=this;c.peerNode.addEventListener("propertySet",function(h){try{h&&h.data&&"CellModelProperties"===h.data.key?c._updateModelProperties("CellModelProperties",h.data.newValue,!0):h&&h.data&&"TableModelProperties"===h.data.key?c._updateModelProperties("TableModelProperties",h.data.newValue,
!0):h&&h.data&&"RowModelProperties"===h.data.key?c._updateModelProperties("RowModelProperties",h.data.newValue,!0):h&&(h.data&&"ColumnModelProperties"===h.data.key)&&c._updateModelProperties("ColumnModelProperties",h.data.newValue,!0)}catch(b){a.error(b)}})},getTable:function(){return this.table},_mapClientSideProperties:function(a,c){var h={backgroundcolor:"backgroundColor",color:"color",fontfamily:"fontFamily",fontsize:"fontSize",fontstyle:"fontStyle",fontweight:"fontWeight",style:"style",renderer:"renderer",
editor:"editor",inplaceeditor:"inPlaceEditor"};return"HeaderName"===a&&c&&c.row&&-1!==c.row?"RowName":"HeaderNumber"===a&&c&&c.row&&-1!==c.row?"RowNumber":h.hasOwnProperty(a.toLowerCase())?h[a.toLowerCase()]:a},_getPropertiesFunction:function(a,c,h,b){var d=c?void 0!==c.row?c.row:-1:-1,k=c?void 0!==c.column?c.column:-1:-1;c=!0;var e;-1!==d&&-1!==k?(c="CellModelProperties",e="set"===a?"setCellModelProperty":"getCellPropertyValue",h=[d,k,h]):-1!==k?(c="ColumnModelProperties",e="set"===a?"setColumnModelProperty":
"getColumnModelProperty",h=[k,h]):-1!==d?(c="RowModelProperties",e="set"===a?"setRowModelProperty":"getRowModelProperty",h=[d,h]):(c="TableModelProperties",e="set"===a?"setTableModelProperty":"getTableModelProperty",h=[h]);"set"===a&&h.push(b);return{propertiesSet:c,valueFunction:e,valueFunctionArgs:h}},getProperty:function(a,c){var h=new f(function(){});a=this._mapClientSideProperties(a,c);var b=this._getPropertiesFunction("get",c,a),d=b.propertiesSet,k=b.valueFunction,e=b.valueFunctionArgs;if(this.table&&
this.table[d])b=this.table[k].apply(this.table,e),h.resolve(b);else{var g=this,u=function(a){try{if(a&&a.data&&a.data.type===d){g.removeEventListener("modelPropertiesSet",u,this);var c=g.table[k].apply(g.table,e);h.resolve(c)}}catch(b){h.reject(b.message)}};g.addEventListener("modelPropertiesSet",u)}return h},setProperty:function(a,c,h){var b=new f(function(){});a=this._mapClientSideProperties(a,h);a=this._getPropertiesFunction("set",h,a,c);var d=a.propertiesSet,k=a.valueFunction,e=a.valueFunctionArgs;
if(this.table&&this.table[d])this[k].apply(this,e),this.table.updateModelProperties&&this.table.updateModelProperties(!0),b.resolve(c);else{var g=this,u=function(a){try{a&&(a.data&&a.data.type===d)&&(g.removeEventListener("modelPropertiesSet",u,this),g[k].apply(g,e),g.table.updateModelProperties(!0),b.resolve(c))}catch(h){b.reject(h.message)}};g.addEventListener("modelPropertiesSet",u)}return b},_addGrid:function(c,k){try{var f=c.position;if(c&&(c.container&&c.container.domNode)&&!c.position)var n=
e.position(c.container.domNode),f={height:n.h,width:n.w};k&&k.setProperty&&k.setProperty("editable",c.editable);try{this.peerNode.getProperty("CellModelProperties")&&this.table&&(this.CellModelProperties=JSON.parse(this.peerNode.getProperty("CellModelProperties"))),this.peerNode.getProperty("TableModelProperties")&&this.table&&(this.TableModelProperties=JSON.parse(this.peerNode.getProperty("TableModelProperties"))),this.peerNode.getProperty("RowModelProperties")&&this.table&&(this.RowModelProperties=
JSON.parse(this.peerNode.getProperty("RowModelProperties"))),this.peerNode.getProperty("ColumnModelProperties")&&this.table&&(this.ColumnModelProperties=JSON.parse(this.peerNode.getProperty("ColumnModelProperties")))}catch(g){a.error(g)}this.allArgs=h.mergeObjects(this.allArgs,{peerViewModel:this,peerNode:k,position:f,CellModelProperties:this.CellModelProperties,TableModelProperties:this.TableModelProperties,RowModelProperties:this.RowModelProperties,ColumnModelProperties:this.ColumnModelProperties});
if(k&&k.getId){var r=b.byId("mgg_"+k.getId());r&&(a.warning("Found existing widget for table, trying to delete."),r.destroyRecursive?(a.warning("Calling destroyRecursive"),r.destroyRecursive()):a.error("Can't find destroyRecursive method of widget."))}this.table=this.createTable(this.allArgs);this.table.startup();this.table&&(this.table.cssSpecifier&&this.table.domNode)&&d.add(this.table.domNode,this.table.cssSpecifier);c.container&&this.table&&c.container.addChild(this.table);var s=this;k&&k.addEventListener&&
k.addEventListener("propertySet",function(a){a&&(a.data&&"dataModel"===a.data.key)&&s.dispatchEvent("viewReady",s.table.domNode,{peerView:s})},k);k&&k.hasProperty&&k.hasProperty("dataModel")&&k.getProperty("dataModel")&&!(0===k.getProperty("dataModel")._partialData.length&&0!==k.getProperty("dataModel")._rowCount)&&s.dispatchEvent("viewReady",s.table.domNode,{peerView:s});k&&(k.getProperty&&k.getProperty("rowHeaderWidth"))&&(this.table.rowHeaderWidth=k.getProperty("rowHeaderWidth"));c.container&&
c.container.resize&&c.container.resize()}catch(t){a.error(t),a.error(t.stack)}},_dispatchPropertySetEvent:function(a,c){this.dispatchEvent("propertySet",this,c)},setCellModelProperty:function(a,c,h,b){var d=this.table.CellModelProperties;if(!d||0===d.length){var d=[],k,e;for(k=this.table.dataModel.getCurrentStartRow();k<this.table.dataModel.getCurrentEndRow();k+=1){d[k]=[];for(e=this.table.dataModel.getCurrentStartCol();e<this.table.dataModel.getCurrentEndCol();e+=1)d[k][e]={}}}d[a][c][h]=b;this.table.CellModelProperties=
d;this.peerNode.setProperty("CellModelProperty",{row:a,column:c,property:h,value:b});this._dispatchPropertySetEvent(h,{row:a,column:c,propertyName:h,value:b})},setTableModelProperty:function(a,c){var h=Array({});this.table.TableModelProperties&&(h=this.table.TableModelProperties);h[a]=c;this.table.TableModelProperties=h;this.peerNode.setProperty("TableModelProperty",{property:a,value:c});this._dispatchPropertySetEvent(a,{propertyName:a,value:c})},setColumnModelProperty:function(a,c,h){var b=this.table.ColumnModelProperties;
if(!b||0===b.length){var b=[],d;for(d=this.table.dataModel.getCurrentStartCol();d<this.table.dataModel.getCurrentEndCol();d+=1)b[d]={}}b.hasOwnProperty(a)&&(b[a][c]=h,this.table.ColumnModelProperties=b,this.peerNode.setProperty("ColumnModelProperty",{column:a,property:c,value:h}),this._dispatchPropertySetEvent(c,{column:a,propertyName:c,value:h}))},setRowModelProperty:function(a,c,h){var b=this.table.RowModelProperties;if(!b||0===b.length){var b=[],d;for(d=this.table.dataModel.getCurrentStartRow();d<
this.table.dataModel.getCurrentEndRow();d+=1)b[d]={}}b.hasOwnProperty(a)&&(b[a][c]=h,this.table.RowModelProperties=b,this.peerNode.setProperty("RowModelProperty",{row:a,property:c,value:h}),this._dispatchPropertySetEvent(c,{row:a,propertyName:c,value:h}))},destroy:function(){c.logDebug("VE: ClientArrayView destroy");this.table&&this.table.destroyRecursive&&(c.logDebug("VE: ClientArrayView destroyRecursive"),this.table.destroyRecursive());this.inherited(arguments)}})})},"variableeditor/views/table/ArrayTable":function(){define("variableeditor/views/table/ArrayTable",
"dojo/_base/declare variableeditor/views/table/VariableEditorTable dojo/_base/lang dojo/on dojo/dom dojo/dom-geometry variableeditor/views/renderers/VERendererFactory variableeditor/VariableEditorUtils datatoolsservices/DataToolsUtils variableeditor/ContextPublishingUtils mw-log/Log dojo/dom-class dojo/query dijit/registry variableeditor/views/table/BlockSelection dojo/i18n!variableeditor/app/l10n/nls/app dojo/has dojo/sniff dijit/focus mw-messageservice/MessageService".split(" "),function(g,f,e,
d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w){var x=g("variableeditor.views.table.ArrayTable",[f],{mouseMotionHandler:null,mouseUpHandler:null,mouseDownColumnHandler:null,mouseDownRowHandler:null,mouseDownHandler:null,anchorRow:-1,anchorColumn:-1,mouseColumnHeaderMotionHandler:null,mouseRowHeaderMotionHandler:null,isCellEnterListenerPaused:!0,lastSelectedHeaderCol:-1,lastSelectedHeaderRow:-1,mouseUpColumnHeaderHandler:null,mouseUpRowHeaderHandler:null,editable:!0,tableRowOffset:2,tableColumnOffset:2,sendSelectionRanges:!0,
paddingPagedRows:40,tolerancePagedRows:20,paddingPagedColumns:15,tolerancePagedCols:7,blockSelection:new r,columnHeaderMouseDown:!1,rowHeaderMouseDown:!1,maxHeight:-1,selectable:!0,TableModelProperties:{},RowModelProperties:{},ColumnModelProperties:{},showSelectionBorder:!0,selectionUpdated:!1,cellsDragged:!1,resizeBehaviour:"default",peerViewModel:{},_selectingColumn:void 0,_selectingRow:void 0,lineSpacing:1.5,minRowHeight:18,rightClickKeyCode:3,TABLE_DEFAULT_FONT:"12px Helvetica, Helvetica, sans-serif",
COLUMN_HEADER_ATTACH_POINT:"variableEditorColumnHeaders",_shiftDirection:"",constructor:function(a){this.pagedDataUpdateDelay=0;a.position&&(this.position=a.position);this.editable=void 0===a.editable||null===a.editable?!0:a.editable;!1===a.selectable&&(this.selectable=!1);a.peerViewModel&&(this.peerViewModel=a.peerViewModel);void 0!==a.sendSelectionRanges&&(this.sendSelectionRanges=a.sendSelectionRanges);this.blockSelection.setIndexedRows(!this.sendSelectionRanges);this.RendererName="variableeditorrenderer_"+
x._RenderCounter;x._RenderCounter+=1;this.VariableEditorRenderer=new c(this);this.cellTypes[this.RendererName]=this.VariableEditorRenderer;a.resizeBehaviour&&(this.resizeBehaviour=a.resizeBehaviour);a.contextId&&(this.contextId=a.contextId)},postCreate:function(){this.inherited(arguments);var a=this;d(this.dataScrollerNode,"mouseup",e.hitch(this,"_onMouseDragUp"));this.mouseDownHandler=d.pausable(this.dataScrollerNode,"mousedown",e.hitch(this,"_onMouseDown"));this.mouseDownColumnHandler=d.pausable(this.columnHeaderNode,
"mousedown",e.hitch(this,"_onHeaderColumnMouseDown"));d(this.columnHeaderScrollerNode,"scroll",function(c){a.columnHeaderScrollerNode.scrollLeft=a.dataScrollerNode.scrollLeft});d(this.rowHeaderScrollerNode,"scroll",function(c){a.rowHeaderScrollerNode.scrollTop=a.dataScrollerNode.scrollTop});this.mouseDownRowHandler=d.pausable(this.rowHeaderNode,"mousedown",e.hitch(this,"_onHeaderRowMouseDown"));this.own(this.mouseDownColumnHandler);this.mouseMotionHandler=d.pausable(window,"mousemove",e.hitch(this,
"_onMouseMove"));this.own(this.mouseMotionHandler);this.mouseMotionHandler.pause();d(this.cornerSpacerNode,"mousedown",e.hitch(this,"_onCornerMouseDown"));this.own(d(window,"mouseup",e.hitch(this,"_onWindowMouseUp")));this.peerNode.addEventListener("peerEvent",function(c){a.handlePeerEvent(c)},this.peerNode);this.peerNode.addEventListener("propertySet",function(c){a.handlePropertySet(c)},this.peerNode);p.add(this.domNode,"mgg");"/VariableEditor"===this.channel&&p.add(this.domNode,"mw_type_VariableEditorTable");
0>this.maxHeight?p.add(this.domNode,"arrayTable"):null!==this.dataModel&&(this.dataModel.getRowCount()*this.rowHeight>this.maxHeight?p.add(this.domNode,"arrayTableMaxHeight"):p.add(this.domNode,"arrayTableMaxHeightScaled"));this.domNode.setAttribute("data-tag",h.createDataTag("views","table"));this._attachListenersForContextUpdate();w.subscribe("/VElogmessage",e.hitch(this,function(a){a.data.eventType&&(h.logDebug("VE: "+a.data.eventType),"log"===a.data.eventType&&a.data.message&&h.logDebug("VE: Server Log ("+
a.data.message+")"))}))},_attachListenersForContextUpdate:function(){var a=["Header","Row"],c=["Header","Column"];this.rowHeaderScrollerNode&&this._handleContextUpdate(this.rowHeaderScrollerNode,a);this.columnHeaderScrollerNode&&this._handleContextUpdate(this.columnHeaderScrollerNode,c)},_handleContextUpdate:function(a,c){var h=this;d(a,"click",function(a){l.addToContext(h.contextUpdateChannel,c,!0)})},_getCellType:function(){return this.VariableEditorRenderer},_onColumnsSet:function(){this._updateColumnHeaderNames();
this.inherited(arguments)},_renderCell:function(a,c){var h=this._getCellType(a);if(h&&h.type&&0===h.type.indexOf("variableeditorrenderer")){var b=document.createElement("div");b.setAttribute("class","cell");b.setAttribute("data-tag",k.concatenateDataTagStrings("datatools","variableeditor","views","table","cell"));var d=this;this.cellTypes[h.type]&&this.cellTypes[h.type].create&&this.cellTypes[h.type].create(h,c,function(k){b.appendChild(k);d.cellTypes[h.type]&&d.cellTypes[h.type].startup&&d.cellTypes[h.type].startup(k,
a,c,b)});return b}this.inherited(arguments)},_updateCell:function(a,c,h,b){var d=q.getEnclosingWidget(a.firstChild);if(void 0!==h&&null!==h){var k=null;try{k=JSON.parse(h)}catch(e){k=h}if(d&&d.isEditing&&d.isEditing()){if(d.setEditable){var f=d.getCellIndices(k);d.setEditable(this.getCellPropertyValue(f.row,f.column,"Editable",k))}return}}var l=this._getCellType(c);if(l&&l.type&&0===l.type.indexOf("variableeditorrenderer")){var m=this;if(this.cellTypes[l.type]&&this.cellTypes[l.type].update){var n=
a.firstChild;this.cellTypes[l.type].update(n,l,h,function(d){d&&n&&d!==n?(a.replaceChild(d,n),q.getEnclosingWidget(n).destroy()):d&&!n&&a.appendChild(d);m.cellTypes[l.type]&&m.cellTypes[l.type].startup&&m.cellTypes[l.type].startup(d,c,h,b)})}}else this.inherited(arguments)},_setEmptyBlockSelection:function(){this.blockSelection.isEmpty()||(this.blockSelection=new r({source:"client",indexedRows:!this.sendSelectionRanges}),this._renderSelection(),this.setServerSelection(!0))},_onColumnMouseUp:function(a){this.inherited(arguments);
this.setServerSelection(!0);void 0!==this._resizingColumn&&this.columns&&(this._setColumnWidthOnTable(this._resizingColumn,this.columns[this._resizingColumn].width),this.setColumnModelProperty(this._resizingColumn,"ColumnWidth",this.columns[this._resizingColumn].width),this._updateDataStyles(),this.setColumnModelProperty(this._resizingColumn,"ColumnResized",!0));this._resizingColumn=void 0},_setColumnWidthOnTable:function(){},onValueChanged:function(a){if(!a||!(a.data&&"server"===a.data.source)){var c=
null;a.data.editor?c=a.data.editor:a.data.renderer&&(c=a.data.renderer);var h=-1,b=-1;c.domNode&&c.domNode.dataset&&(b=this._getRowColumnFromNode(c.domNode),h=b.row,b=b.col);var d=a.data.newValue;c.convert&&(d=c.convert(a.data.newValue));this.dataModel&&this.dataModel.changeData&&this.dataModel.changeData(h,b,[[d]])}},onEditingStarted:function(){this.mouseMotionHandler.pause()},onMouseDown:function(a){this._shiftDirection="";t("mac")&&Object.defineProperty(a.data,"ctrlKey",{value:!1});this.contextMenu&&
this.contextMenu.close();if(this.selectable){this.cellsDragged=this.isCellEnterListenerPaused=!1;this.mouseMotionHandler.resume();var c=-1,h=-1;a&&(a.data&&a.data.renderer&&a.data.renderer.domNode)&&(h=this._getRowColumnFromNode(a.data.renderer.domNode),c=h.row,h=h.col);this.isCellDraggable(c,h)&&this.isCellSelected(c,h)&&!a.data.ctrlKey&&!a.data.metaKey&&!a.data.shiftKey?this.selectionUpdated=!1:(this._updateAndRenderSelection(c,h,a.data),this.selectionUpdated=!0)}},_updateAndRenderSelection:function(a,
c,h){this._setLeadCellPosition(a,c);this.anchorRow=a;this.anchorColumn=c;this.blockSelection.isEmpty()&&this._resetShiftKeyPivot();var b;b="extended"===this.selectionMode&&(h.ctrlKey||h.metaKey)&&!h.shiftKey?this.blockSelection.clone():new r({indexedRows:!this.sendSelectionRanges});b=this._updateBlockSelection(a,c,b,h);this.blockSelection.matchingSelection(b)||(this.blockSelection=b,this._renderSelection())},_updateBlockSelection:function(a,c,h,b){"none"!==this.selectionType&&"none"!==this.selectionMode&&
(b&&b.shiftKey?(b=null,b=this.getShiftKeyPivot(),0>b[0]&&0>b[1]?h.add(0,a,0,c):h.add(b[0],a,b[1],c)):b.ctrlKey||b.metaKey?(this._setShiftKeyPivot(a,c),!h.containsRow(a)||!h.containsColumn(c)?h.addCell(a,c):h.removeRows(a,a)):(this._setShiftKeyPivot(a,c),h.addCell(a,c)));return h},onMouseEnter:function(a){if(this.selectable&&!this.isCellEnterListenerPaused){var c=-1,h=-1;a&&(a.data&&a.data.renderer&&a.data.renderer.domNode)&&(h=this._getRowColumnFromNode(a.data.renderer.domNode),c=h.row,h=h.col);this._updateSelection(c,
h,a)}},onMouseUp:function(){this.selectable&&this.setServerSelection(!0);this.isCellEnterListenerPaused=!0;this.mouseMotionHandler.pause()},onEditingStopped:function(){this.mouseDownColumnHandler&&this.mouseDownColumnHandler.resume()},_getRowColumnFromNode:function(a){a&&a.dataset?(row=parseInt(a.dataset.row),column=parseInt(a.dataset.col)):(row=parseInt(a.getAttribute("data-row")),column=parseInt(a.getAttribute("data-col")));return{row:row,col:column}},_convertPxToRows:function(a,c,h){return Math.floor((a-
c.y+h)/this.rowHeight)},_onMouseDown:function(c){if(!p.contains(c.target,"dataScrollerNode")){var h=a.position(this.dataScrollerNode),b=this._convertPxToRows(c.pageY,h,this.dataScrollerNode.scrollTop);c=this._convertPxToCols(0,c.pageX-h.x+this.dataScrollerNode.scrollLeft);b>this.getRowCount()-1||c>this.getColumnCount()-1?(l.addToContext(this.contextUpdateChannel,[this.contextId,"EmptySpace"],!0),this.blockSelection.isEmpty()||this._clearBlockSelection()):l.addToContext(this.contextUpdateChannel,[this.contextId,
"DataVariable"],!0)}},_clearBlockSelection:function(){this.blockSelection=new r({source:"client",indexedRows:!this.sendSelectionRanges});this._setLeadCellPosition(-1,-1);this._renderSelection();this.mouseMotionHandler.resume()},_onMouseMove:function(c){c.preventDefault();if(!this.blockSelection.isEmpty()){var h=a.position(this.dataScrollerNode),b=this._convertPxToRows(c.pageY,h,this.dataScrollerNode.scrollTop),h=this._convertPxToCols(0,c.pageX-h.x+this.dataScrollerNode.scrollLeft),b=Math.max(0,Math.min(b,
this.getRowCount()-1)),h=Math.max(0,Math.min(h,this.getColumnCount()-1));this.scrollToCell(b,h);this._updateSelection(b,h,c)}},_updateSelection:function(a,c,h){var b,d;this._setLeadCellPosition(a,c);h=h.ctrlKey||h.metaKey?this.blockSelection.clone():new r({indexedRows:!this.sendSelectionRanges});b=Math.min(this.anchorRow,a);a=Math.max(this.anchorRow,a);d=Math.min(this.anchorColumn,c);c=Math.max(this.anchorColumn,c);h.add(b,a,d,c);this.blockSelection=h;this._renderSelection()},getRowCount:function(){return this.dataModel?
this.dataModel.getRowCount():0},getColumnCount:function(){return this.dataModel?this.dataModel.getColumnCount():0},_onDataChange:function(){},resize:function(){if(!this._noAutoSizing){var c=a.position(this.domNode);this.position={width:c.w,height:c.h};this.debounceRedraw()}},handlePropertySet:function(a){"Selection"===a.data.key?(a=a.data.newValue,a.source&&"client"===a.source||a.selectionSource&&"client"===a.selectionSource||(a=new r(a),a.setIndexedRows(!this.sendSelectionRanges),this.blockSelection=
a,this._renderSelection())):"editable"===a.data.key?this.domNode&&("false"===a.data.newValue?(this.domNode.className=this.domNode.className?this.domNode.className+" readonly":"readonly",p.toggle(this.domNode,"hideVerticalScroll",!0),p.toggle(this.domNode,"hideHorizontalScroll",!0)):(this._updateScrollerStyles(),this.domNode.className=this.domNode.className?this.domNode.className.replace(/\breadonly\b/,""):"")):"dataModel"===a.data.key&&(this.pagedDataUpdateDelay=100)},_onCornerMouseDown:function(a){a.preventDefault();
a=new r({indexedRows:!this.sendSelectionRanges});var c=this.getRowCount(),h=this.getColumnCount();a.add(0,c-1,0,h-1);null===this.getLeadNode()&&this._setLeadCellPosition(0,0);this.blockSelection=a;this._renderSelection()},_onMouseDragUp:function(a){t("mac")&&(a.ctrlKey&&Object.defineProperty(a,"which",{value:3}),Object.defineProperty(a,"ctrlKey",{value:!1}));this.anchorColumn=this.anchorRow=-1;this.mouseMotionHandler&&this.mouseMotionHandler.pause();if(a&&a.renderer&&a.renderer.domNode){l.removeFromContext(this.contextUpdateChannel,
!0);var c=this._getRowColumnFromNode(a.renderer.domNode);!this.selectionUpdated&&(!this.cellsDragged&&a.which!==this.rightClickKeyCode)&&(this._updateAndRenderSelection(c.row,c.col,a),this.selectionUpdated=!0)}this.cellsDragged=!1},_onHeaderRowMouseDown:function(a,c){if(this.selectable){var h=null,b;try{b=this.getEnclosingHeaderWidget(a.target)}catch(k){b={index:-1}}0<=b.index&&(h=b.index);this._selectingRow=h;this.mouseRowHeaderMotionHandler?this.mouseRowHeaderMotionHandler.resume():(this.mouseRowHeaderMotionHandler=
d.pausable(window,"mousemove",e.hitch(this,"_onRowHeaderSelection")),this.own(this.mouseRowHeaderMotionHandler));if(c||void 0===c)h=this.getLeadNode().getElementsByTagName("input")[0],v.focus(h);a.preventDefault()}},_onTableHeaderKeyDown:function(a){var c=this.getLeadNode();v.focus(c.getElementsByTagName("input")[0]);q.getEnclosingWidget(c)._handleKeyboardEvent(a)},_onHeaderRowMouseUp:function(){this.selectable&&(this.lastSelectedHeaderRow=-1,this.mouseUpRowHeaderHandler&&this.mouseUpRowHeaderHandler.pause(),
this.mouseRowHeaderMotionHandler&&this.mouseRowHeaderMotionHandler.pause(),0<this.getRowCount()&&0<this.getColumnCount()&&this.setServerSelection(!0),this._selectingRow=void 0)},_onRowHeaderSelection:function(c){if(this.selectable){c.preventDefault();var h=a.position(this.dataScrollerNode),b=null;if(c.pageX<h.x+h.w&&c.pageX>h.x&&c.pageY<h.y+h.h&&c.pageY>h.y){var d;try{d=this._getCellFromNode(c.target)}catch(k){d={row:-1}}0<=d.row&&(b=d.row)}b||(b=Math.floor((c.pageY-h.y+this.dataScrollerNode.scrollTop)/
this.rowHeight),b=Math.min(Math.max(0,b),this.getRowCount()-1),this.scrollToRow(b));0>this.lastSelectedHeaderRow&&(this.lastSelectedHeaderRow=b);c=this.blockSelection.getColumnCount()===this.getColumnCount();if(this.blockSelection.containsRow(b)&&c){if(this.lastSelectedHeaderRow!==b)if(b<this.lastSelectedHeaderRow)for(c=this.lastSelectedHeaderRow;c>b;c-=1)this.blockSelection.containsRow(c)&&this.blockSelection.removeRows(c,c);else for(c=this.lastSelectedHeaderRow;c<b;c+=1)this.blockSelection.containsRow(c)&&
this.blockSelection.removeRows(c,c)}else if(b>=this.lastSelectedHeaderRow)for(c=this.lastSelectedHeaderRow;c<=b;c+=1)this.blockSelection.containsRow(c)||this.blockSelection.add(c,c,0,this.getColumnCount()-1);else for(c=b;c<=this.lastSelectedHeaderRow;c+=1)this.blockSelection.containsRow(c)||this.blockSelection.add(c,c,0,this.getColumnCount()-1);this.lastSelectedHeaderRow=b;this._setLeadCellPosition(this.lastSelectedHeaderRow,0);0<this.getColumnCount()?this._renderSelection():this._updateHeaderStyle()}},
_onHeaderColumnMouseDown:function(a,c){if(this.selectable&&(!a||!a.target||!(a.target.className&&-1!==a.target.className.toLowerCase().indexOf("drag")))){var h=null,b;try{b=this.getEnclosingHeaderWidget(a.target)}catch(k){b={index:-1}}0<=b.index&&(h=b.index);this._selectingColumn=h;this.mouseUpColumnHeaderHandler?this.mouseUpColumnHeaderHandler.resume():this.mouseUpColumnHeaderHandler=d.pausable(this.columnHeaderNode,"mouseup",e.hitch(this,"_onHeaderColumnMouseUp"));this.mouseColumnHeaderMotionHandler?
this.mouseColumnHeaderMotionHandler.resume():(this.mouseColumnHeaderMotionHandler=d.pausable(window,"mousemove",e.hitch(this,"_onColumnHeaderSelection")),this.own(this.mouseColumnHeaderMotionHandler));if(c||void 0===c)h=this.getLeadNode().getElementsByTagName("input")[0],v.focus(h);a.preventDefault()}},_onRowMouseDown:function(a){if(this.selectable&&"single"!==this.selectionMode){var c;try{c=this.getEnclosingHeaderWidget(a.target)}catch(h){c={index:-1}}if(!(0>c.index)){c=c.index;this.blockSelection.isEmpty()&&
this._resetShiftKeyPivot();var b=new r({indexedRows:!this.sendSelectionRanges});if("extended"===this.selectionMode&&(a.ctrlKey||a.metaKey)&&!a.shiftKey)b=this.blockSelection.clone();b=this._updateRowSelection(c,b,a);this.blockSelection.matchingSelection(b)||(0>this.lastSelectedHeaderRow&&(this.lastSelectedHeaderRow=c),this.blockSelection=b,this._setLeadCellPosition(this.lastSelectedHeaderRow,0),0<this.getColumnCount()?this._renderSelection():this._updateHeaderStyle())}}},_updateRowSelection:function(a,
c,h){var b=this.getColumnCount()-1;if("none"!==this.selectionType&&"none"!==this.selectionMode)if(h.shiftKey){var d=null;h=this.getShiftKeyPivot();0>h[0]?d=0:d=h[0];c.add(d,a,0,b)}else h.ctrlKey||h.metaKey?(this._setShiftKeyPivot(a,b),c.containsRow(a)?c.removeRows(a,a):c.add(a,a,0,b)):h.selectAll?c.add(0,a,0,b):(this._setShiftKeyPivot(a,b),c.add(a,a,0,b));return c},_onColumnMouseDown:function(a){if(this.selectable&&"single"!==this.selectionMode){var c;try{c=this.getEnclosingHeaderWidget(a.target)}catch(h){c=
{index:-1}}if(!(0>c.index)){c=c.index;var b=new r({indexedRows:!this.sendSelectionRanges});if("extended"===this.selectionMode&&(a.ctrlKey||a.metaKey||a.shiftKey))b=this.blockSelection.clone();"none"!==this.selectionType&&"none"!==this.selectionMode&&(a.shiftKey&&!b.isEmpty()?(a=b.getLeadCell(),b.add(0,this.getRowCount()-1,a[1],c)):a.ctrlKey||a.metaKey?b.containsColumn(c)?b.removeColumns(c,c):b.add(0,this.getRowCount()-1,c,c):b.add(0,this.getRowCount()-1,c,c));this.blockSelection.matchingSelection(b)||
(0>this.lastSelectedHeaderCol&&(this.lastSelectedHeaderCol=c),this.blockSelection=b,this._setLeadCellPosition(0,this.lastSelectedHeaderCol),this._renderSelection())}}},_onHeaderColumnMouseUp:function(){this.selectable&&(this.lastSelectedHeaderCol=-1,this.mouseColumnHeaderMotionHandler&&this.mouseColumnHeaderMotionHandler.pause(),this.mouseUpColumnHeaderHandler&&this.mouseUpColumnHeaderHandler.pause(),0<this.getRowCount()&&0<this.getColumnCount()&&this.setServerSelection(!0),this._selectingColumn=
void 0)},_onColumnHeaderSelection:function(c,h){if(this.selectable){!1!==h&&c.preventDefault();var b;b=a.position(this.dataScrollerNode);var d=null;if(c.pageX<b.x+b.w&&c.pageX>b.x&&c.pageY<b.y+b.h&&c.pageY>b.y){var k;try{k=this._getCellFromNode(c.target)}catch(e){k={column:-1}}0<=k.column&&(d=k.column)}d||(d=this._convertPxToCols(0,c.pageX-b.x+this.dataScrollerNode.scrollLeft),d=Math.min(Math.max(0,d),this.getColumnCount()-1),this.scrollToColumn(d));if(d!==this.lastSelectedHeaderCol){0>this.lastSelectedHeaderCol&&
(this.lastSelectedHeaderCol=d);b=this.blockSelection.containsColumn(d);k=this.blockSelection.getRowCount()===this.getRowCount();if(b&&k){if(this.lastSelectedHeaderCol!==d)if(d<this.lastSelectedHeaderCol)for(b=this.lastSelectedHeaderCol;b>d;b-=1)this.blockSelection.containsColumn(b)&&this.blockSelection.removeColumns(b,b);else for(b=this.lastSelectedHeaderCol;b<d;b+=1)this.blockSelection.containsColumn(b)&&this.blockSelection.removeColumns(b,b)}else if(d>=this.lastSelectedHeaderCol)for(b=this.lastSelectedHeaderCol;b<=
d;b+=1)this.blockSelection.containsColumn(b)||this.blockSelection.add(0,this.getRowCount()-1,b,b);else for(b=d;b<=this.lastSelectedHeaderCol;b+=1)this.blockSelection.containsColumn(b)||this.blockSelection.add(0,this.getRowCount()-1,b,b);this.lastSelectedHeaderCol=d;this._setLeadCellPosition(0,this.lastSelectedHeaderCol);this._renderSelection()}}},_onWindowMouseUp:function(a,c){this._onHeaderColumnMouseUp();this._onHeaderRowMouseUp();this._onTableMouseUp(a,c);this.mouseMotionHandler&&this.mouseMotionHandler.pause();
this.mouseColumnHeaderMotionHandler&&this.mouseColumnHeaderMotionHandler.pause();this.mouseRowHeaderMotionHandler&&this.mouseRowHeaderMotionHandler.pause();this._selectingRow=this._selectingColumn=void 0;this.anchorColumn=this.anchorRow=-1;this.isCellEnterListenerPaused=!0},_onTableMouseUp:function(a,c){if(b.isDescendant(a.target,this.domNode)&&this.leadCell&&!this.columnHeaderNode.contains(a.target)&&!this.rowHeaderNode.contains(a.target)){var h=".row_"+this.leadCell.row+".col_"+this.leadCell.column;
-1<this.leadCell.index&&(h=h+".idx_"+this.leadCell.index);h=n(h,this.domNode)[0];if((h=q.getEnclosingWidget(h))&&h._handleMouseUp)h._handleMouseUp(),a&&(a.target&&!h.domNode.contains(a.target)&&h.domNode.contains(v.curNode))&&v.focus(this.domNode)}return!0},_cancelCurrentEditor:function(a,c){var h=n(".row_"+a+".col_"+c,this.domNode)[0];(h=q.getEnclosingWidget(h))&&h.cancelEditing&&h.cancelEditing()},_revertCurrentEditorChanges:function(a,c){var h=n(".cellRenderer.row_"+a+".col_"+c,this.domNode)[0];
(h=q.getEnclosingWidget(h))&&h._revert&&h._revert()},_cancelCurrentRowHeaderEditor:function(a){a=n(".EditableHeader",this.rowHeaderNode)[a+(this.rowView.end-this.rowView.start)-this.rowView.end];a=q.getEnclosingWidget(a);this._handleDuplicateRowHeaderValues(a)},_cancelCurrentColumnHeaderEditor:function(a,c){var h=n(".EditableHeader",this.columnHeaderNode)[a+(this.colView.end-this.colView.start)-this.colView.end],h=q.getEnclosingWidget(h);this._handleColumnHeaderError(h,c)},_forceRowUpdate:function(a,
c){if(0<=a&&0<=c){var h=this.getCellSelector(a,c);if(h=n(h)[0]){var b=this.dataModel.getPartialData()[a-this.rowView.start];this._updateRow(h.parentNode,b,b,this.colView.start,this.colView.end,this.oldColView.start,this.oldColView.end)}}},_clearRendererCache:function(a,c){if(0<=a&&0<=c){var h=this.getCellSelector(a,c);if(h=n(h)[0]){var b=this.dataModel.getPartialData()[a-this.dataModel._currentStartRow],d=this._getCellType(c);this.cellTypes[d.type].clearCache&&this.cellTypes[d.type].clearCache(h.firstElementChild,
c,b[c])}}},getEnclosingHeaderWidget:function(a){for(;!p.contains(a,"EditableHeader")&&!p.contains(a,"NonEditableHeader");)a=a.parentElement;return q.getEnclosingWidget(a)},_handleDataChangeStatus:function(a){h.logDebug("VE: Server data change status: "+a.data.status);if(a.data.status&&"success"===a.data.status){var c=n(".cellRenderer.row_"+row+".col_"+column,this.domNode)[0];(c=q.getEnclosingWidget(c))&&(c.setValue&&a.data&&a.data.dispValue)&&c.setValue(a.data.dispValue,a.data.source,a.data.dispValue)}else this._clearRendererCache(a.data.row,
a.data.column),this._revertCurrentEditorChanges(a.data.row,a.data.column),a.data.status&&"noChange"===a.data.status||(a.data.message?k.displayErrorMessage(a.data.message):m.warn("VE: Server error with no message."))},handlePeerEvent:function(a){h.logDebug("VE: Peer Event: "+a.data.type);a.data.type&&"ErrorDuplicateColumnHeader"===a.data.type?this._cancelCurrentColumnHeaderEditor(a.data.index):a.data.type&&"ColumnHeaderError"===a.data.type?this._cancelCurrentColumnHeaderEditor(a.data.index,a.data.message):
a.data.type&&"ErrorDuplicateRowHeader"===a.data.type?this._cancelCurrentRowHeaderEditor(a.data.index):a.data.type&&"errormsg"===a.data.type?(h.logDebug("VE: Server error: "+a.data.message),this._cancelCurrentEditor(a.data.row,a.data.column),a.data.message?k.displayErrorMessage(a.data.message):m.warn("VE: Server error with no message.")):a.data.type&&"dataChangeStatus"===a.data.type&&this._handleDataChangeStatus(a)}});x._RenderCounter=0;x._forTestingOnly={contextPublishingUtils:l};return x})},"variableeditor/views/table/VariableEditorTable":function(){define("variableeditor/views/table/VariableEditorTable",
"dojo/_base/declare dojo/_base/lang dojo/query dojo/dom-class dojo/dom-construct dijit/_TemplatedMixin variableeditor/views/table/tableBase/_TableBase variableeditor/views/table/_VETableHeaders variableeditor/views/table/tableBase/_TableHeaderSelection variableeditor/views/table/_VETableSelection variableeditor/views/table/_VEModelProperties variableeditor/views/table/tableBase/_TableColumnWidth variableeditor/views/table/tableBase/_PropTypeHandler datatoolsservices/DataToolsUtils dojo/text!variableeditor/views/table/VariableEditorTemplate.html".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r){return g("variableeditor.views.table.VariableEditorTable",[c,n,h,p,k,l,m,a],{templateString:r,container:null,curRowCount:0,curColCount:0,dndSource:null,constructor:function(a){a=a||{};this.componentData=a.widgetData;this.container=a.container;this.useDojoDnD=a.useDojoDnd||!1},startup:function(a){this.inherited(arguments);if(this.useDojoDnD&&null===this.dndSource&&this.getDndItemSelector&&this.getDndHandleSelector&&this.getSelectedFields){var c=this;a=a||{};
f.mixin(a,{dropCallback:function(){},checkAcceptanceCallback:function(a,h){return a.node!==c.dataScrollerNode}});this._attachDndHandles();a.creator=function(a,h){var k=dojo.doc.createElement("span");k.id=dojo.dnd.getUniqueId();d.add(k,"dojoDndItem");if("avatar"===h&&a){var e=c._createDummyNodeToEnableAvatars(a);b.place(e,k,"last")}else return c._dndSource?c._dndSource.defaultCreator(a,h):{node:null,data:null,type:null};return{node:k,data:a,type:["text"]}};this.dndSource=q.createSelectableDnDTarget(this.dataScrollerNode,
a);this.dndSource.getSelectedNodes=function(){var a=e.NodeList(),h=c.getSelectedFields();if(h)for(var h=h.split(","),b=0;b<h.length;b+=1){var d=h[b],k=e('[dnddata\x3d"'+d+'"]')[0];k?(a.push(k),this.getItem(k.id)||this.setItem(k.id,{data:d,type:["text"]})):(k=c._createDummyNodeToEnableAvatars(d),this.setItem(k.id,{data:d,type:["text"]}),a.push(k))}return a};this.dndSource.allowNested=!0;this.dndSource.isSource=!0;this.dndSource.copyOnly=!0;this.dndSource.withHandles=!0}},_createDummyNodeToEnableAvatars:function(a){var c=
document.createElement("input");c.setAttribute("class","structNameColumn dojoDndItem dojoDndHandle DojoDndItemSelected variableEditorRenderers iconVariableEditorMatrix dojoDndItemOver dojoDndItemAnchor");c.setAttribute("dnddata",a);c.setAttribute("dndtype","text");c.setAttribute("id",a);c.value=a;return c},_attachDndHandles:function(){if(this.useDojoDnD){var a=this.getDndItemSelector(),c=this.getDndHandleSelector();e(a,this.domNode).forEach(function(a,h,b){for(i=0;i<c.length;i++)(h=e(c[i],a)[0])&&
d.add(h,"dojoDndHandle")})}},_onDataModelSet:function(a){this.inherited(arguments);if(a._rowCount!=this.curRowCount||a._columnCount!=this.curColCount)this.curRowCount=a._rowCount,this.curColCount=a._columnCount,this.container&&this.container.resize&&this.container.resize();this.dndSource&&this.dndSource.clearItems&&this.dndSource.clearItems()},_onColumnsSet:function(){this.inherited(arguments);this.container&&this.container.resize&&this.container.resize()}})})},"variableeditor/views/table/tableBase/_TableBase":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-class dojo/dom-geometry dojo/on dojo/keys dijit/_WidgetBase mw-browser-utils/BrowserUtils ./_ListBase dojo/topic variableeditor/VariableEditorUtils".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m){return g([k,c],{scrollbarWidth:0,headerPadding:2,defaultColumnWidth:75,totalColumnWidth:0,paddingViewColumns:4,toleranceViewCols:2,paddingPagedColumns:30,tolerancePagedCols:15,colView:{start:0,end:0},oldColView:{start:0,end:0},pageDataCols:{},constructor:function(a){this.scrollbarWidth=h.getScrollbarWidth();this.defaultProperties=f.delegate(this.defaultProperties,{columns:[],showCellBorders:!0})},postCreate:function(){this.inherited(arguments);this.own(b(this.dataScrollerNode,
"change",f.hitch(this,"_onDataChange")));this.own(b(this.dataScrollerNode,"keydown",f.hitch(this,"_onCommit")))},setColumnWidth:function(a,c){if(0<=a&&a<this.columns.length&&10<c){var h=f.clone(this.columns);h[a].width=c;this.peerNode.setProperty("columns",h)}},scrollToColumn:function(a){a=Math.max(0,Math.min(a,this.dataModel.getColumnCount()));var c=0,h=(this.columns[a]?this.columns[a].width:this.defaultColumnWidth)/2,b;for(b=0;b<a;b+=1)h+=this.columns[b]?this.columns[b].width:this.defaultColumnWidth;
b=d.position(this.dataScrollerNode).w;var k=(b-this.scrollbarWidth)/1.3;a=k+this.dataScrollerNode.scrollLeft;b=b-k+this.dataScrollerNode.scrollLeft;h>a?c=h-a:h<b&&(c=h-b);this.dataScrollerNode.scrollLeft=c+this.dataScrollerNode.scrollLeft},scrollToCell:function(a,c){this.scrollToRow(a);this.scrollToColumn(c)},getColumnSelector:function(a){return"#"+this.id+" .dataBody .cell:nth-child("+(a-this.colView.start+2)+")"},getCellSelector:function(a,c){return this.getRowSelector(a)+".cell:nth-child("+(c-
this.colView.start+2)+")"},_onColumnsSet:function(){this._updateTotalColumnWidth(this.columns.length);this._renderViewData(!0)},_updateTotalColumnWidth:function(a){this.totalColumnWidth=0;var c;for(c=0;c<a;c+=1)if(this.columns[c])if(0<=this.columns[c].width)this.totalColumnWidth+=this.columns[c].width;else{var h=this.getColumnModelProperty(c,"ColumnWidth"),b=parseInt(h,10);null!==h&&void 0!==h&&0<=b?(this.totalColumnWidth+=b,this.columns[c].width=b):(this.totalColumnWidth+=this.defaultColumnWidth,
this.columns[c].width=this.defaultColumnWidth)}},_onShowCellBordersSet:function(){e.toggle(this.domNode,"showCellBorders",this.showCellBorders)},_onDataScroll:function(){this.inherited(arguments)},_onDataChange:function(a){var c=this._getCellFromNode(a.target);if(!(0>c.row||0>c.column)){var h=c.node,b=c.row,c=c.column,d=this.oldViewData[b-this.rowView.start][c-this.colView.start],k=this._getCellType(this.columns[c]);this.cellTypes[k.type].getCellValue&&(a=this.cellTypes[k.type].getCellValue(h.firstChild,
a.target,k,d),void 0!==a&&this.dataModel.changeData(b,c,[[a]]))}},_onCommit:function(c){c.keyCode===a.ENTER&&this._onDataChange(c)},_throttledRender:function(a,c){var h=this;this._renderTimer&&clearTimeout(this._renderTimer);this._renderTimer=setTimeout(function(){h._renderViewDataImpl(a);c&&c();h._renderSelection()},10)},_renderViewData:function(a,c){this._throttledRender(a,c)},_renderViewDataImpl:function(a){if(this.domNode){var c=window.performance.now();if(this.dataModel&&this.position){this._updatePagedData();
if(!a&&this.dataModel===this.oldDataModel&&!this.rowView.changed&&!this.colView.changed)return;this._onViewRangeUpdated();var h=this.rowView.start-this.dataModel.getCurrentStartRow();a=this.rowView.end-this.dataModel.getCurrentStartRow();for(var b=this.colView.start-this.dataModel.getCurrentStartCol(),d=this.colView.end-this.dataModel.getCurrentStartCol(),k=this.dataModel.getPartialData(),e=[];h<a;h+=1)e.push(k[h].slice(b,d));var f=this;this._incrementalUpdateNode({node:this.dataNode,data:e,oldData:this.oldViewData,
start:this.rowView.start,end:this.rowView.end,oldStart:this.oldRowView.start,oldEnd:this.oldRowView.end,update:function(a,c,h){f._updateRow(a,c,h,f.colView.start,f.colView.end,f.oldColView.start,f.oldColView.end)},create:function(a){return f._renderRow(a,f.colView.start,f.colView.end)}});this.oldRowView=this.rowView;this.oldColView=this.colView;this.oldViewData=e;this.oldDataModel=this.dataModel}this._updateDataStyles();this.nodesUpdated();a=window.performance.now();this.emit("view-updated");m.isPerformance()&&
l.publish("variableeditor/renderTimeChannel",{time:a-c,numRows:this.rowView.end-this.rowView.start,numCols:this.colView.end-this.colView.start})}},nodesUpdated:function(){},_renderRow:function(a,c,h){var b=document.createElement("div");b.setAttribute("class","row");var d=document.createElement("div");d.setAttribute("class","cell spacer leftSpacer");b.appendChild(d);d=h-c;for(h=0;h<d;h+=1)b.appendChild(this._renderCell(this.columns[h+c],a[h]));a=document.createElement("div");a.setAttribute("class",
"cell spacer rightSpacer");b.appendChild(a);return b},_updateRow:function(a,c,h,b,d,k,e){var f=this;this._incrementalUpdateNode({node:a,data:c,oldData:h,start:b,end:d,oldStart:k,oldEnd:e,update:function(a,c,h,b){f._updateCell(a,f.columns[b],c,h)},create:function(a,c){return f._renderCell(f.columns[c],a)}})},_getCellFromNode:function(a){for(var c=null,h=-1,b=-1;a.getAttribute&&"datatools.variableeditor.views.table.cell"!==a.getAttribute("data-tag")&&a!==this.dataScrollerNode;)a=a.parentNode;if(a.getAttribute&&
"datatools.variableeditor.views.table.cell"===a.getAttribute("data-tag")){c=a;for(b=this.colView.start-1;a.previousElementSibling;)b+=1,a=a.previousElementSibling;a=a.parentNode;for(h=this.rowView.start-1;a.previousElementSibling;)h+=1,a=a.previousElementSibling}return{node:c,row:h,column:b}},_onViewRangeUpdated:function(a,c,h,b){var d;for(d=this.leftSpaceWidth=0;d<this.colView.start;d+=1)this.leftSpaceWidth+=this.columns[d]&&null!==this.columns[d].width&&0<=this.columns[d].width?this.columns[d].width:
this.defaultColumnWidth;this.inherited(arguments)},_updatePagedData:function(){if(this.domNode){var a=this._convertPxToCols(0,this._getScrollLeft()),c=this._convertPxToCols(a,this.position.width)+1,h=a+c;this.colView=this._updateArrayBounds(a,a+c,this.dataModel.getCurrentStartCol(),this.dataModel.getCurrentEndCol(),this.paddingViewColumns,this.toleranceViewCols,this.oldColView,h);this.pagedDataCols=this._updateArrayBounds(a,a+c,0,this.dataModel.getColumnCount(),this.paddingPagedColumns,this.tolerancePagedCols,
this.oldPagedDataCols,h);this.inherited(arguments)}},_getScrollLeft:function(){return this.dataScrollerNode.scrollLeft},_updateDataStyles:function(){this.inherited(arguments);this.dataModel&&(this.rowHeight&&this.position)&&(this._updateScrollerStyles(),this.styleManager.updateStyleRules("spacerLeft",{".row .spacer.leftSpacer":"width: "+this.leftSpaceWidth+"px;"}),this.styleManager.updateStyleRules("dataWidth",{".spacer.dataWidth":"width: "+this.totalColumnWidth+"px;"}))},_updateCurrentPosition:function(){var a=
d.position(this.domNode);this.position={width:a.w,height:a.h}},_updateColumnStyles:function(){var a=this.columns.slice(this.colView.start,this.colView.end),c,h={},b;for(c=0;c<a.length;c+=1)b=this._getCellType(a[c]),b=this._getColumnStyles(b),b+="width: "+(a[c]&&null!==a[c].width&&0<=a[c].width?a[c].width:this.defaultColumnWidth)+"px;",h[".dataColumn .cell:nth-child("+(c+2)+")"]=b;this.styleManager.updateStyleRules("columns",h)},_updateScrollerStyles:function(){var a=this.dataModel.getRowCount()*this.rowHeight>=
this.position.height,c=this.totalColumnWidth>=this.position.width;e.toggle(this.domNode,"hideVerticalScroll",!a);e.toggle(this.domNode,"hideHorizontalScroll",!c)},_convertPxToCols:function(a,c){var h,b=0;for(h=a;h<this.dataModel.getColumnCount();h+=1)if(b+=this.columns[h]&&this.columns[h].width||this.defaultColumnWidth,c<=b)return h-a;return h}})})},"variableeditor/views/table/tableBase/_ListBase":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-style dojo/dom-class dojo/dom-geometry dojo/on dojo/sniff dijit/_WidgetBase mw-browser-utils/BrowserUtils mw-style-utils/StyleUtils datatoolsservices/DataToolsUtils ./tableCellRenderers".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p){return g([h],{peerNode:null,defaultProperties:{renderer:{type:"default"},rowHeight:18,dataModel:null,visibility:!0},position:{width:0,height:0},paddingViewRows:10,toleranceViewRows:5,paddingPagedRows:80,tolerancePagedRows:40,pagedDataUpdateDelay:100,leftSpaceWidth:0,viewData:[],oldViewData:[],rowView:{start:0,end:0},oldRowView:{start:0,end:0},pagedDataRows:{start:0,end:0,changed:!1},pagedDataCols:{start:0,end:1,changed:!1},cellTypes:p,constructor:function(a){a=a||
{};this.peerNode=a.peerNode;a.id="mgg_"+a.peerNode.getId();this.styleManager=new l.StyleManager("#"+a.id);this.own(this.styleManager);c("mac")?this.debounceRedraw=m.createDebounceFn(this,[this._renderViewData,this._updateScrollerStyles],1E3):this.debounceRedraw=m.createDebounceFn(this,[this._renderViewData,this._updateScrollerStyles],500)},postCreate:function(){this.inherited(arguments);this.domNode.id=this.id;k.setClassName(this.domNode,{type:this.peerNode.getType(),name:this.peerNode.getProperty("name")});
f.mixin(this,this.defaultProperties);var c=f.delegate(this.defaultProperties,this.peerNode.getProperties()),h;for(h in c)"function"!==typeof c[h]&&this._onPropertySet({target:this.peerNode,data:{key:h,oldValue:null,newValue:c[h]}});this.peerNode.addEventListener("propertySet",this._onPropertySet,this);this.own(a(this.dataScrollerNode,"scroll",f.hitch(this,"_onDataScroll")))},startup:function(){this.inherited(arguments);this.position||(this.position=b.position(this.domNode),this._renderViewData(!0))},
resize:function(){this._noAutoSizing||(this.position=b.position(this.domNode),this.debounceRedraw())},destroyRecursive:function(){this.peerNode.hasEventListener("propertySet")&&this.peerNode.removeEventListener("propertySet",this._onPropertySet,this);this.inherited(arguments)},scrollToRow:function(a){var c=this.rowHeight;a=Math.max(0,Math.min(a,this.dataModel.getRowCount()));var h=0,d=b.position(this.dataScrollerNode).h,k=(d-c)/1.1,e=k+this.dataScrollerNode.scrollTop,d=d-k+this.dataScrollerNode.scrollTop;
a*=c;a>e?h=a-e:a<d&&(h=a-d);this.dataScrollerNode.scrollTop=h+this.dataScrollerNode.scrollTop},getRowSelector:function(a){return"#"+this.id+" .dataBody .row:nth-child("+(a-this.rowView.start+2)+")"},_onPropertySet:function(a){var c=a.data.key;this[c]=a.data.newValue;c="_on"+(c.charAt(0).toUpperCase()+c.substring(1,c.length))+"Set";if(this[c]&&void 0!==a.data.newValue&&null!==a.data.newValue)this[c](a.data.newValue,a.data.oldValue)},_onPositionSet:function(a){e.set(this.domNode,{position:"absolute",
left:a.x+"px",top:a.y+"px",width:a.width+"px",height:a.height+"px"});this._noAutoSizing=!0;this._updateDataStyles()},_onBackgroundSet:function(){e.set(this.domNode,{backgroundColor:"rgb("+this.background.join(", ")+")"})},_onBorderTypeSet:function(){this._updateBorderStyles()},_onBorderWidthSet:function(){this._updateBorderStyles()},_onBorderColorSet:function(){this._updateBorderStyles()},_updateBorderStyles:function(){if("LineBorder"===this.borderType){var a={};if(this.borderColor){var c=this.borderColor.map(function(a){return Math.floor(255*
a)});a.borderColor="rgb("+c.join(",")+")"}this.borderWidth&&(a.borderWidth=this.borderWidth+"px",a.borderStyle="solid");e.set(this.domNode,a)}},_onVisibilitySet:function(){e.set(this.domNode,{display:this.visibility?"":"none"})},_onRowHeightSet:function(){this._updateDataStyles()},_preDataModelSet:function(a,c){return!(0===a._partialData.length&&(0!==a._rowCount||0!==a._columnCount))},_onDataModelSet:function(){!this.oldPagedDataRows&&this.dataModel&&(this.oldPagedDataRows={start:this.dataModel.getCurrentStartRow(),
end:this.dataModel.getCurrentEndRow()});!this.oldPagedDataCols&&this.dataModel&&(this.oldPagedDataCols={start:this.dataModel.getCurrentStartCol(),end:this.dataModel.getCurrentEndCol()});0===this.dataModel._rowCount&&(this._updatePagedData(),this.colView.changed&&this._updateColumnHeaderNames(),this._setEmptyBlockSelection());this._renderViewData(!0)},_onDataScroll:function(){this.pauseScrollEvents||this.debounceRedraw()},_renderViewData:function(a){if(this.dataModel&&this.position){this._updatePagedData();
if(!a&&this.dataModel===this.oldDataModel&&!this.rowView.changed)return;this._onViewRangeUpdated();a=this.dataModel.getPartialData().slice(this.rowView.start-this.dataModel.getCurrentStartRow(),this.rowView.end-this.dataModel.getCurrentStartRow());var c=this;this._incrementalUpdateNode({node:this.dataNode,data:a,oldData:this.oldViewData,start:this.rowView.start,end:this.rowView.end,oldStart:this.oldRowView.start,oldEnd:this.oldRowView.end,update:function(a,h,b){c._updateCell(a,c,h,b)},create:function(a){a=
c._renderCell(c,a);a.setAttribute("class","row cell");return a}});this.oldRowView=this.rowView;this.oldViewData=a;this.oldDataModel=this.dataModel}this._updateDataStyles()},_renderCell:function(a,c){var h=document.createElement("div");h.setAttribute("class","cell");var b=this._getCellType(a),d=this.cellTypes[b.type].create(b,c);h.appendChild(d);this.cellTypes[b.type].startup&&this.cellTypes[b.type].startup(d,a,c,h);return h},_updateCell:function(a,c,h,b){var d=this._getCellType(c),k;if(this.cellTypes[d.type].update){var e=
a.firstChild;(k=this.cellTypes[d.type].update(e,d,h))&&k!==e&&a.replaceChild(k,e)}else k=this.cellTypes[d.type].create(d,h),k!==a.firstChild&&a.replaceChild(k,a.firstChild);this.cellTypes[d.type].startup&&this.cellTypes[d.type].startup(k,c,h,b)},_getCellType:function(a){var c;a&&a.renderer&&"label"===a.renderer.type&&(!a.editor||"text"!==a.editor.type)?c=a.renderer:a&&a.renderer&&a.editor&&a.renderer.type===a.editor.type?c=a.renderer:a&&a.renderer&&"cell"===a.renderer.type?c=a.renderer:a&&a.editor&&
a.editor.type&&"default"!==a.editor.type&&this.cellTypes[a.editor.type]?c=a.editor:a&&a.renderer&&a.renderer.type&&this.cellTypes[a.renderer.type]?(c=f.clone(a.renderer),c.enabled=a.editable&&c.enabled):c={type:"default"};return c},_getCellFromNode:function(a){for(var c,h=-1;(!a.getAttribute("class")||0>a.getAttribute("class").indexOf("cell"))&&a!==this.dataScrollerNode;)a=a.parentNode;if(a.getAttribute("class")&&0<=a.getAttribute("class").indexOf("cell")){c=a;for(h=this.rowView.start-1;a.previousElementSibling;)h+=
1,a=a.previousElementSibling}return{node:c,row:h}},_onViewRangeUpdated:function(){},_updatePagedData:function(){var a=Math.floor(this._getScrollTop()/this.rowHeight),c=Math.floor(this.position.height/this.rowHeight),h=a+Math.floor(this.position.height/this.rowHeight);this.rowView=this._updateArrayBounds(a,a+c,this.dataModel.getCurrentStartRow(),this.dataModel.getCurrentEndRow(),this.paddingViewRows,this.toleranceViewRows,this.oldRowView,h);this.pagedDataRows=this._updateArrayBounds(a,a+c,0,this.dataModel.getRowCount(),
this.paddingPagedRows,this.tolerancePagedRows,{start:this.dataModel.getCurrentStartRow(),end:this.dataModel.getCurrentEndRow()},h);this._updateLoadingIndicator();this._doPagedDataUpdate()},_getScrollTop:function(){return this.dataScrollerNode.scrollTop},_updateLoadingIndicator:function(){var a=(this.pagedDataRows.changed||this.pagedDataCols.changed)&&(this.pagedDataRows.start!==this.dataModel.getCurrentStartRow()||this.pagedDataRows.end!==this.dataModel.getCurrentEndRow()||this.pagedDataCols.start!==
this.dataModel.getCurrentStartCol()||this.pagedDataCols.end!==this.dataModel.getCurrentEndCol());d.toggle(this.domNode,"dataLoading",a);a?this.domNode.addEventListener("contextmenu",m.preventDefaultMouseClick,!1):this.domNode.removeEventListener("contextmenu",m.preventDefaultMouseClick,!1)},_doPagedDataUpdate:function(){if((this.pagedDataRows.changed||this.pagedDataCols.changed)&&!this._requestUpdateTimeout){var a=this,c=function(){a.oldPagedDataRows=a.pagedDataRows;a.oldPagedDataCols=a.pagedDataCols;
a._requestUpdateTimeout=null;a.dataModel.updatePartialData(a.pagedDataRows.start,a.pagedDataRows.end,a.pagedDataCols.start,a.pagedDataCols.end)};0===this.pagedDataUpdateDelay?c():this._requestUpdateTimeout=setTimeout(c,this.pagedDataUpdateDelay)}},_updateArrayBounds:function(a,c,h,b,d,k,e,f){a=Math.max(a-d,h);c=Math.max(a,Math.min(c+d,b));d=!1;d=f?a===h&&a!==e.start||c===b&&c!==e.end||f>e.end||a<e.start||f>c||0===this.dataModel._partialData.length&&(0!==this.dataModel._rowCount||0!==this.dataModel._columnCount):
a===h&&a!==e.start||c===b&&c!==e.end||Math.abs(a-e.start)>k||Math.abs(c-e.end)>k;return{start:d?a:e.start,end:d?c:e.end,changed:d}},_updateDataStyles:function(){this.dataModel&&this.rowHeight&&(this.styleManager.updateStyleRules("spacerTop",{".body .spacer.topSpacer":"height: "+this.rowView.start*this.rowHeight+"px;"}),this.styleManager.updateStyleRules("dataHeight",{".spacer.dataHeight":"height: "+this.dataModel.getRowCount()*this.rowHeight+"px;",".row":"height: "+this.rowHeight+"px;",".row.verticalScrollSpacer":"height: 100%"}),
this._updateColumnStyles())},_updateColumnStyles:function(){var a=this._getCellType(this);this.styleManager.updateStyleRules("columns",{".dataColumn .cell":this._getColumnStyles(a)})},_getColumnStyles:function(a){return this.cellTypes[a.type].getColumnStyles?this.cellTypes[a.type].getColumnStyles(a):""},_incrementalUpdateNode:function(a){for(var c,h=a.node.firstElementChild,b=a.start,d=a.oldStart;null!==h.nextElementSibling&&(b<a.end||d<a.oldEnd);)h=h.nextElementSibling,d===b&&d<a.oldEnd&&b<a.end?
(a.update(h,a.data[b-a.start],a.oldData[d-a.oldStart],b),d+=1,b+=1):(b<d||b>=a.oldEnd)&&b<a.end?(c=a.create(a.data[b-a.start],b),a.node.insertBefore(c,h),h=c,b+=1):d<a.oldEnd&&(c=h.previousElementSibling,a.destroy&&a.destroy(h,d),a.node.removeChild(h),h=c,d+=1)}})})},"mw-style-utils/StyleUtils":function(){define(["dojo/_base/declare"],function(g){var f;g=g([],{constructor:function(b){this.styleGroups={};this.baseSelector=b},remove:function(){Object.keys(this.styleGroups).forEach(function(b){this["_"+
b+"Rules"]&&(this["_"+b+"Rules"].forEach(function(a){a.remove()}),delete this["_"+b+"Rules"])},this);this.styleGroups={}},updateStyleRules:function(b,a){var c=this.styleGroups[b],h=Object.keys(a),d,e=!1;if(c){var m=Object.keys(this.styleGroups[b]);if(m.length===h.length){m.sort();h.sort();for(d=0;d<m.length;d+=1)if(m[d]!==h[d]||c[h[d]]!==a[h[d]]){e=!0;break}}else e=!0}else e=!0;e&&(this.styleGroups[b]=a,c=h.map(function(c){return f.addRule(this.baseSelector+" "+c,a[c])},this),this["_"+b+"Rules"]&&
this["_"+b+"Rules"].forEach(function(a){a.remove()}),this["_"+b+"Rules"]=c)}});var e=document.createElement("style");document.getElementsByTagName("head")[0].appendChild(e);var e=e.sheet,d=[];return f={addRule:function(b,a){var c=d.length;d[c]=e.cssRules.length;e.insertRule(b+"{"+a+"}",d[c]);var h=this;return{remove:function(){h.removeRule(c)}}},removeRule:function(b){var a=d[b];if(void 0!==a){e.deleteRule(a);for(d[b]=void 0;b<d.length;b+=1)d[b]>a&&(d[b]-=1)}},StyleManager:g}})},"variableeditor/views/table/tableBase/tableCellRenderers":function(){define(["dojo/_base/declare",
"dojo/_base/lang","./TextUtils"],function(g,f,e){function d(){var a=document.createElement("div");a.setAttribute("class","verticalSpacer");return a}function b(a){for(;a.firstChild;)a.removeChild(a.firstChild)}function a(a){var c=e.getTextStyleDashes(a||{});c.display=a&&!1===a.visible?"none":void 0;var b;a="";for(b in c)c.hasOwnProperty(b)&&c[b]&&(a+=b+":"+c[b]+";");return a}var c;return c={"default":{getColumnStyles:a,create:function(a,c){var b=document.createElement("div");b.setAttribute("class",
"plainText");var e=document.createElement("span");e.appendChild(document.createTextNode(c||""));b.appendChild(e);b.appendChild(d());return b},update:function(a,c,b){if("div"!==a.nodeName.toLowerCase()||!a.getAttribute("class")||"plainText"!==a.getAttribute("class"))return this.create(c,b);a.firstElementChild.firstChild.nodeValue=b}},checkbox:{getColumnStyles:a,create:function(a,c){var b=document.createElement("input");this.update(b,a,c);return b},update:function(a,c,b){if("input"!==a.nodeName.toLowerCase())return this.create(c,
b);a.type="checkbox";!0===b||"true"===b?(a.setAttribute("checked",""),a.checked=!0):(a.removeAttribute("checked"),a.checked=!1);a.disabled=void 0===c.enabled?!1:!c.enabled},getCellValue:function(a){if("input"===a.nodeName.toLowerCase()&&"checkbox"===a.type)return a.checked?a.setAttribute("checked",""):a.removeAttribute("checked"),!!a.checked}},text:{getColumnStyles:a,create:function(a,c){var b=document.createElement("input");this.update(b,a,c);return b},update:function(a,c,b){if("input"!==a.nodeName.toLowerCase())return this.create(c,
b);a.type="text";a.value=b;!1===c.enabled?a.set("readOnly",!0):a.set("readOnly",!1)},getCellValue:function(a){if("input"===a.nodeName.toLowerCase()&&"text"===a.type)return a.value}},numeric:{getColumnStyles:a,create:function(a,c){var b=document.createElement("input");this.update(b,a,c);return b},update:function(a,c,b){if("input"!==a.nodeName.toLowerCase())return this.create(c,b);a.type="text";a.value=b;!1===c.enabled?a.set("readOnly",!0):a.set("readOnly",!1)},getCellValue:function(a){if("input"===
a.nodeName.toLowerCase()&&"text"===a.type)return a.value}},color:{getColumnStyles:a,create:function(a,c){var b=document.createElement("input");this.update(b,a,c);return b},update:function(a,c,b){if("input"!==a.nodeName.toLowerCase())return this.create(c,b);a.type="text";a.value="["+b[0].toFixed(3)+", "+b[1].toFixed(3)+", "+b[2].toFixed(3)+"]";!1===c.enabled?a.set("readOnly",!0):a.set("readOnly",!1)},getCellValue:function(a){if("input"===a.nodeName.toLowerCase()&&"text"===a.type)return a=a.value.replace(/[\s\[\]]*/g,
"").split(","),[parseFloat(a[0]),parseFloat(a[1]),parseFloat(a[2])]}},list:{getColumnStyles:a,create:function(a,c){var b=document.createElement("select");this.update(b,a,c);return b},update:function(a,c,b){if("select"!==a.nodeName.toLowerCase())return this.create(c,b);this._addOptions(a,c,b);a.disabled=void 0===c.enabled?!1:!c.enabled},getCellValue:function(a,c,b){if("select"===a.nodeName.toLowerCase())return c=b.listValues[a.selectedIndex],this._addOptions(a,b,c),c},_addOptions:function(a,c,d){var e,
f,n;f=!1;if(c.listValues.length===a.children.length){for(e=0;e<c.listValues.length;e+=1)if(n=a.children[e],n.value!==c.listValues[e]||n.hasAttribute("selected")!==(n.value===d)){f=!0;break}if(!f)return}b(a);for(e=0;e<c.listValues.length;e+=1)f=c.listValues[e],n=document.createElement("option"),n.value=f,n.text=f,d===f&&n.setAttribute("selected",""),a.add(n)}},label:{getColumnStyles:a,create:function(a,c){var b=document.createElement("div");b.setAttribute("class","label");this.update(b,a,c);return b},
update:function(a,c,e){if("div"!==a.nodeName.toLowerCase()||"label"!==a.getAttribute("class"))return this.create(c,e);e.background&&a.setAttribute("style","background: rgb("+e.background.join(",")+")");b(a);e.icon&&a.appendChild(e.icon.cloneNode());c=document.createElement("label");"string"===typeof e.value?this._setLabel(c,e.value):"string"===typeof e&&this._setLabel(c,e);a.appendChild(c);a.appendChild(d())},_setLabel:function(a,c){var b=c.trim();0===b.indexOf("\x3chtml\x3e")?a.innerHTML=b.substring(6,
b.length-7):a.appendChild(document.createTextNode(c))}},expand:{create:function(a,c){var b=document.createElement("div");b.setAttribute("class","expand");var d=document.createElement("div"),e=document.createElement("div");b.appendChild(d);b.appendChild(e);this.update(b,a,c);return b},update:function(a,c,d){if("div"!==a.nodeName.toLowerCase()||"expand"!==a.getAttribute("class"))return this.create(c,d);c=a.firstChild;a=c.nextElementSibling;b(c);b(a);if(d.expandable){var e=document.createElement("button");
d.expanded&&e.setAttribute("class","expanded");c.appendChild(e)}e="";for(c=0;c<d.depth;c+=1)e+="  ";a.appendChild(document.createTextNode(e+d.text))}},prop:{create:function(a,c){var b=document.createElement("div");b.setAttribute("class","prop");var d=document.createElement("div"),e=document.createElement("div"),f=document.createElement("div");b.appendChild(d);b.appendChild(e);b.appendChild(f);this.update(b,a,c);return b},update:function(a,c,d){if("div"!==a.nodeName.toLowerCase()||"prop"!==a.getAttribute("class"))return this.create(c,
d);a=a.firstChild;c=a.nextElementSibling;var e=c.nextElementSibling;b(a);b(c);b(e);this["_"+d.leftType](a,"left",d);this["_"+d.middleType](c,"middle",d);this["_"+d.rightType](e,"right",d)},getCellValue:function(a,c,b,d){if(d&&"text"===d.middleType)return a=f.clone(d),a.middleText=c.value,a},_label:function(a,c,b){if(b[c+"Text"]){var d=document.createTextNode(b[c+"Text"]);a.appendChild(d)}this._appendIcon(a,b[c+"Icon"])},_text:function(a,c,b){var d=document.createElement("input");d.type="text";d.value=
b[c+"Text"];a.appendChild(d)},_button:function(a,c,b){var d=document.createElement("button");b[c+"Text"]&&d.appendChild(document.createTextNode(b[c+"Text"]));this._appendIcon(d,b[c+"Icon"]);a.appendChild(d)},_dropdown:function(a,c,b){var d=document.createElement("button");b[c+"Text"]&&d.appendChild(document.createTextNode(b[c+"Text"]));this._appendIcon(d,b[c+"Icon"]);a.appendChild(d)},_space:function(){},_appendIcon:function(a,c){"string"===typeof c?a.setAttribute("class",c+"Icon"):c instanceof Image&&
a.appendChild(c.cloneNode())}},cell:{create:function(a,b){var d=b&&b.renderer&&b.renderer.type,d=d&&c[d]?c[d].create(b.renderer,b.value):c["default"].create(b.renderer,b.value);this._updateNode(d,b.renderer);return d},update:function(a,b,d){if((b=d&&d.renderer&&d.renderer.type)&&c[b])if(c[b].update){if(b=c[b].update(a,d.renderer,d.value),!b){this._updateNode(a,d.renderer);return}}else b=c[b].create(d.renderer,d.value);else b=c["default"].create(d.renderer,d.value);this._updateNode(b,d.renderer);return b},
getCellValue:function(a,b,d,e){if((d=e.renderer.type)&&c[d]&&c[d].getCellValue){var p=f.clone(e);p.value=c[d].getCellValue(a,b,e.renderer,e.value);return p}},_updateNode:function(a,b){var d=b&&b.type;d&&c[d].getColumnStyles?a.setAttribute("style",c[d].getColumnStyles(b)):c["default"].getColumnStyles&&a.setAttribute("style",c["default"].getColumnStyles(b))}}}})},"variableeditor/views/table/tableBase/TextUtils":function(){define([],function(){var g={size:"fontSize",family:"fontFamily",style:"fontStyle",
weight:"fontWeight",align:"textAlign",valign:"verticalAlign",color:"color"},f={size:"font-size",family:"font-family",style:"font-style",weight:"font-weight",align:"text-align",valign:"vertical-align",color:"color"};return{getTextStyle:function(e){return this._getTextStyle(e,g)},getTextStyleDashes:function(e){return this._getTextStyle(e,f)},_getTextStyle:function(e,d){var b=null,a={Dialog:"Helvetica",DialogInput:"Monaco",Monospaced:"monospace",Serif:"serif",SansSerif:"sans-serif",Helvetica:"Helvetica"},
b=!1===e.enabled?[128,128,128]:e.fontColor,c={};c[d.size]=e.fontSize?e.fontSize+"px":void 0;c[d.family]=e.fontName?a[e.fontName]:void 0;c[d.style]=e.fontItalic?"italic":void 0;c[d.weight]=e.fontBold?"bolder":void 0;c[d.align]=e.horizontalAlignment||e.textAlign;c[d.valign]=e.verticalAlignment;c[d.color]=b?"rgb("+b.join(",")+")":"";return c}}})},"variableeditor/views/table/_VETableHeaders":function(){define("variableeditor/views/table/_VETableHeaders",["dojo/_base/declare","variableeditor/views/table/tableBase/_TableHeaders",
"datatoolsservices/constants/ClassTypeMaps","datatoolsservices/DataToolsUtils"],function(g,f,e,d){return g([f],{pseudoStyleForFirstColumnHeaderCell:"content: ''; position: absolute; width: 3px; left: 32px; background-color: rgb(192, 192, 192); height: 36px;",_updateHeaderStyles:function(){var b=d.getLogicalValue(this.getTableModelProperty("ShowColumnHeaderNumbers"),!0),a=d.getLogicalValue(this.getTableModelProperty("ShowColumnHeaderLabels"),!0),c=this.getTableModelProperty("ShowHeaderIcons");this.inherited(arguments);
if(this.dataModel){var h="22px;";b&&a?h="36px;":void 0!==c&&(h="30px;");this.pseudoStyleForFirstColumnHeaderCell="content: ''; position: absolute; width: 3px; left: 32px; background-color: rgb(192, 192, 192); height: "+h;this.styleManager.updateStyleRules("columnHeader",{".row.dataWidth.spacer":"height: "+h});this.styleManager.updateStyleRules("cornerSpaceHeader",{".inline.row.cornerSpacer.rowHeaderColumn.rowHeadersWrapper.topRowHeaderWrapper":"height: "+h});b=this._isHorizontalScrollBarShown()?this.scrollbarWidth:
0;a=d.getLogicalValue(this.getTableModelProperty("ShowColumnHeaders"),!0)?h:"0px";this.styleManager.updateStyleRules("rows",{".body":"padding-top: "+a+"margin-top: "+("-"+h),".body .rowHeadersWrapper":"padding-bottom: "+b+"px;"})}},_updateCornerSpacerLabel:function(b){var a=this.getTableModelProperty("CornerSpacerTitle");if(void 0!==a){var c=document.createElement("div");d.addToClassList(c,"cornerSpacer rowHeaderColumn topRowHeaderWrapper label");var h=document.createElement("span");h.appendChild(document.createTextNode(a));
c.appendChild(h);b.insertBefore(c,b.firstChild)}else if(void 0!==b.firstChild.className&&(b=document.getElementsByClassName("cornerSpacer rowHeaderColumn topRowHeaderWrapper label"),0!==b.length))for(a=0;a<b.length;a++)b[a].parentNode.removeChild(b[a].parentNode.firstChild)},_addHeaderIconCSS:function(b,a){d.addToClassList(a,"icon");var c=e.IconTypeMap.hasOwnProperty(b)?e.IconTypeMap[b]:e.IconTypeMap.object;a.className.match(/iconVariableEditor([a-zA-Z]+)/)?a.className=a.className.replace(/iconVariableEditor([a-zA-Z]+)/,
c):d.addToClassList(a,"variableEditorRenderers "+c)}})})},"variableeditor/views/table/tableBase/_TableHeaders":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-class dojo/dom-style ./tableCellRenderers variableeditor/views/table/_HeadersBase variableeditor/views/renderers/_TemplateMixin dojo/text!variableeditor/views/table/VariableEditorColumnHeader.html dojo/text!variableeditor/views/table/VariableEditorRowHeader.html dijit/registry datatoolsservices/DataToolsUtils".split(" "),function(g,
f,e,d,b,a,c,h,k,l,m){return g([c],{oldColumnData:[],oldRowData:[],constructor:function(){this.defaultProperties=f.delegate(this.defaultProperties,{tableHeader:!1,showRowHeaders:!1,rowHeaderWidth:30,rows:[]})},_onDataScroll:function(){this.inherited(arguments);this.scrollbarWidth=m.getBrowserScrollBarWidth(this);this.columnHeaderScrollerNode.scrollLeft=this.dataScrollerNode.scrollLeft;this.rowHeaderScrollerNode.scrollTop=this.dataScrollerNode.scrollTop},_onViewRangeUpdated:function(){this.inherited(arguments);
this._renderRowHeader();this._renderColumnHeader();this._updateHeaderStyles()},_renderColumnHeader:function(){var a=this.columns.slice(this.colView.start,this.colView.end);this._updateCornerSpacerLabel(this.cornerSpacerNode);if(a.length===this.colView.end-this.colView.start){var c=this;this._incrementalUpdateNode({node:this.columnHeaderNode,data:a,oldData:this.oldColumnData,start:this.colView.start,end:this.colView.end,oldStart:0,oldEnd:this.oldColumnData.length,update:function(a,h){c._updateColumnNode(a,
h)},create:function(a){return c._createColumnNode(a)}});this.oldColumnData=a}},_updateColumnNode:function(a,c){var h=l.getEnclosingWidget(a);e.replace(a,"header_"+c.labelIndex,"header_"+h.indexValue);c.labelIndex?(h.setIndexValue(c.labelIndex),h.setIndexProperty(parseInt(c.labelIndex)-1),h.setNodeDisplay("headerIndex",!0)):h.setNodeDisplay("headerIndex",!1)},_createColumnNode:function(c){c=new a({templateString:h,indexValue:c.labelIndex?c.labelIndex:""});c.startup();c.setNodeDisplay("headerIndex",
!0);return c.domNode},_renderRowHeader:function(){var a=this.rows.slice(this.rowView.start,this.rowView.end);if(a.length===this.rowView.end-this.rowView.start){var c=this;this._incrementalUpdateNode({node:this.rowHeaderNode,data:a,oldData:this.oldRowData,start:this.rowView.start,end:this.rowView.end,oldStart:0,oldEnd:this.oldRowData.length,update:function(a,h,b,d){c._updateRowNode(a,h,b,d)},create:function(a,h){return c._createRowNode(a,h)}});this.oldRowData=a}},_updateRowNode:function(a,c,h,b){h=
l.getEnclosingWidget(a);e.replace(a,"header_"+c.labelIndex,"header_"+h.indexValue);c.labelIndex?(h.setIndexProperty(parseInt(c.labelIndex)-1),h.setIndexValue(c.labelIndex),h.setNodeDisplay("headerIndex",!0)):h.setNodeDisplay("headerIndex",!1)},_createRowNode:function(c,h){var b=this.domNode.getElementsByClassName("variableEditorRowHeaders header_"+(void 0===c?h:c.labelIndex));b.parentNode&&b.parentNode.removeChild(b);b=new a({templateString:k,indexValue:void 0===c?h:c.labelIndex});b.startup();b.setNodeDisplay("headerIndex",
!0);return b.domNode},_updateHeaderStyles:function(){if(this.dataModel){this.tableHeader=m.getLogicalValue(this.getTableModelProperty("ShowColumnHeaders"),!0);var a=(this.showRowHeaders=m.getLogicalValue(this.getTableModelProperty("ShowRowHeaders"),!0))?this.rowHeaderWidth:0,c=this._isVerticalScrollBarShown()?this.scrollbarWidth:0,h=this._isHorizontalScrollBarShown()?this.scrollbarWidth:0,b=this.showRowHeaders?this.headerPadding:0;this.styleManager.updateStyleRules("rowHeader",{".rowHeaderColumn .row":"width: "+
a+"px;",".headerWrapper":"padding-right: "+(a+b+c)+"px; margin-right: "+-(a+b+c)+"px;",".dataBodyWrapper":"padding-right: "+(a+b)+"px; margin-right: "+-(a+b)+"px;"});a=this.tableHeader?this.rowHeight+this.headerPadding:0;this.styleManager.updateStyleRules("rows",{".body":"padding-top: "+a+"px;margin-top: "+-a+"px;",".body .rowHeadersWrapper":"padding-bottom: "+h+"px;"})}},_isVerticalScrollBarShown:function(){var a=this.tableHeader?this.rowHeight:0;return this.dataModel.getRowCount()*this.rowHeight>=
this.position.height-a},_isHorizontalScrollBarShown:function(){return this.totalColumnWidth>=this.position.width-(this.showRowHeaders?this.rowHeaderWidth:0)},_updateScrollerStyles:function(){e.toggle(this.domNode,"hideVerticalScroll",!this._isVerticalScrollBarShown());e.toggle(this.domNode,"hideHorizontalScroll",!this._isHorizontalScrollBarShown())}})})},"variableeditor/views/table/_HeadersBase":function(){define("variableeditor/views/table/_HeadersBase","dojo/_base/declare dojo/string dojo/_base/lang datatoolsservices/DataToolsUtils variableeditor/views/editors/_EditorBase dojo/dom-construct dijit/layout/ContentPane variableeditor/views/editors/TextBoxEditor variableeditor/views/renderers/_TemplateMixin variableeditor/views/renderers/_VERendererMixin dojo/i18n!variableeditor/app/l10n/nls/app dojo/text!variableeditor/views/table/DefaultHeaderTemplate.html dojo/dom-class".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){return g("variableeditor.views.table._HeadersBase",[c,b,k],{_inputBoxIndex:null,_inputBoxLabel:null,labelValue:null,indexValue:null,CHANNEL_DuplicateRowHeader:"ErrorDuplicateRowHeader",CHANNEL_DuplicateColumnHeader:"ErrorDuplicateColumnHeader",HEADER_INDEX_ATTACH_POINT:"headerIndex",HEADER_LABEL_ATTACH_POINT:"headerLabel",HEADER_BREAK_ATTACH_POINT:"lineBreak",constructor:function(a){this.templateString=p;this.editable=!1;a&&(this._allArgs=a,this.init(a))},init:function(a){this._allArgs=
e.mixin({},a);this.templateString=a.templateString?a.templateString:p;this.editable=a.editable||!1;this.showLabels=a.showLabels||!1;this.showIndices=a.showIndices?a.showIndices:!0;this.editOnKeyPress=a.editOnKeyPress||!1;this.editOnSingleClick=a.editOnSingleClick||!1;this.labelValue=a.labelValue?a.labelValue:"";this.indexValue=a.indexValue?a.indexValue:""},setLabelValue:function(a){this._inputBoxLabel.setValue(a);this._inputBoxLabel.setEditValue(a);this.labelValue=this._inputBoxLabel.value=a;this._inputBoxLabel.domNode.querySelector("input").setAttribute("value",
this._inputBoxLabel.domNode.querySelector("input").value)},setIndexValue:function(a){this._inputBoxIndex.setValue(a);this.indexValue=this._inputBoxIndex.value=a},setIndexProperty:function(a){this._inputBoxIndex.index=a;this._inputBoxLabel.index=a},setNodeDisplay:function(a,c){var h=this._getAttachNode(a);h&&(h.style.display=c?"":"none");a===this.HEADER_INDEX_ATTACH_POINT?this.showIndices=c:a===this.HEADER_LABEL_ATTACH_POINT&&(this.showLabels=c)},_isValidHeaderName:function(a){return 0<a.length},_handleError:function(a){var c=
this._inputBoxLabel,h=c._value;c._revert();a?d.displayErrorMessage(a):d.displayErrorMessage(f.substitute(m.duplicateVariableNames,{varName:"'"+h+"'"}))},postCreate:function(){this._setupInputBoxIndex();this._setupInputBoxLabel()},_setupInputBoxIndex:function(){var c=this._getAttachNode(this.HEADER_INDEX_ATTACH_POINT);c&&(this._inputBoxIndex=new h({value:this.indexValue,index:parseInt(this.indexValue)-1}),g.safeMixin(this._inputBoxIndex,new l),this._inputBoxIndex.addCSSClasses("NonEditableHeader"),
a.place(this._inputBoxIndex.domNode,c,"last"),n.add(this.domNode,"header_"+this.indexValue))},_setupInputBoxLabel:function(){var c=this._getAttachNode(this.HEADER_LABEL_ATTACH_POINT);c&&(this._inputBoxLabel=new h({value:this.labelValue,editable:this.editable,editOnKeyPress:this.editOnKeyPress,editOnSingleClick:this.editOnSingleClick,index:parseInt(this.indexValue)-1}),g.safeMixin(this._inputBoxLabel,new l),this._setEditable(this._inputBoxLabel,this.editable),a.place(this._inputBoxLabel.domNode,c,
"last"))},_setEditable:function(a,c){a.setEditable(c);(a._commitOnBlur=c)?(a.setInPlaceEditor(a),a.removeCSSClasses("NonEditableHeader"),a.addCSSClasses("EditableHeader")):(a.setInPlaceEditor(""),a.removeCSSClasses("EditableHeader"),a.addCSSClasses("NonEditableHeader"))},_setReadOnly:function(a){}})})},"variableeditor/views/renderers/_VERendererMixin":function(){define("variableeditor/views/renderers/_VERendererMixin",["dojo/_base/declare","datatoolsservices/DataToolsUtils","variableeditor/views/renderers/_TooltipMixin",
"variableeditor/views/renderers/_VERendererStyleMixin"],function(g,f,e,d){return g("variableeditor.views.renderers._VERendererMixin",[e,d],{_setRendererProperties:function(b,a,c){if(!b.isInvalidCache){var h=this.getCellIndices(b),d=h.row,h=h.column;this.setRow&&this.setRow(d);this.setColumn&&this.setColumn(h);this.setToolTipText&&this.setToolTipText(a.getCellPropertyValue(d,h,"tooltip",b),c);this.updateCellStyles&&this.updateCellStyles(d,h,b,a);this.setEditable&&this.setEditable(f.getLogicalValue(a.getCellPropertyValue(d,
h,"Editable",b)));this.setRemoveQuotes&&this.setRemoveQuotes(a.getCellPropertyValue(d,h,"RemoveQuotedStrings",b));this.setEditorConverter&&this.setEditorConverter(a.getCellPropertyValue(d,h,"EditorConverter",b));this.setValue&&this.setValue(a.getCellPropertyValue(d,h,"value",b),c);this.setEditValue&&this.setEditValue(a.getCellPropertyValue(d,h,"editValue",b),c);this.getState&&(c=this.populateRendererState(d,h,b,a),this.setState(c));this.setInPlaceEditor&&this.setInPlaceEditor(a.getCellPropertyValue(d,
h,"inplaceeditor",b));this.setEditor&&this.setEditor(a.getCellPropertyValue(d,h,"editor",b))}},populateRendererState:function(b,a,c,h){var d=this.getState();if(void 0!==d)for(var e in d)d[e]=h.getCellPropertyValue(b,a,e,c);else d={};d.dataType=h.getCellPropertyValue(b,a,"class",c);return d},getCellIndices:function(b){var a=-1,c=-1;b&&void 0!==b.row&&(a=parseInt(b.row));b&&void 0!==b.col&&(c=parseInt(b.col));return{row:a,column:c}},_setupDOMRowCol:function(b){var a=b.row;b=b.column;this.domNode&&(0<=
a&&0<=b)&&(this.domNode.setAttribute("data-row",a),this.domNode.setAttribute("data-col",b),f.addToClassList(this.domNode,"row_"+a),f.addToClassList(this.domNode,"col_"+b))}})})},"variableeditor/views/renderers/_TooltipMixin":function(){define("variableeditor/views/renderers/_TooltipMixin",["dojo/_base/declare","dojo/on","dijit/Tooltip"],function(g,f,e){return g("variableeditor.views.renderers._TooltipMixin",[],{_tooltipWidget:null,setToolTipText:function(d){void 0!==d&&(null!==d&&""!==d)&&(this._tooltip=
d,this._updateTooltip())},_getNewTooltip:function(d,b){return new e({connectId:[d],label:b,hideDelay:100,showDelay:1500,position:["below","after","above","before"]})},_updateTooltip:function(){var d="function"===typeof this._tooltip?this._tooltip():this._tooltip;if(this._tooltipWidget)this._tooltipWidget.label=d;else{this._tooltipWidget=this._getNewTooltip(this.domNode,d);var b=this;f(this.domNode,"focusin",function(){b._tooltipWidget.set("state","DORMANT")})}}})})},"variableeditor/views/renderers/_VERendererStyleMixin":function(){define("variableeditor/views/renderers/_VERendererStyleMixin",
["dojo/_base/declare","dojo/dom-class"],function(g,f){return g("variableeditor.views.renderers._VERendererStyleMixin",[],{_classListKey:"classList",updateCellStyles:function(e,d,b,a){var c=this._getCellModelStyle(e,d,b,a);if(c)for(var h in c)if(c.hasOwnProperty(h)){var k=this.getStyleNode(h);k&&k.style[h]!==c[h]&&(k.style[h]=c[h])}this._updateNodeClasses(e,d,b,k,a)},_updateTableClasses:function(e,d){if(e&&d&&d.getTableModelProperty){var b=d.getTableModelProperty(this._classListKey);this._modifyCellClassList(e,
b,e._previousTableClassList);e._previousTableClassList=b}},_updateRowClasses:function(e,d,b){e&&(b&&b.getRowModelProperty&&0<=d)&&(d=b.getRowModelProperty(d,this._classListKey),this._modifyCellClassList(e,d,e._previousRowClassList),e._previousRowClassList=d)},_updateColumnClasses:function(e,d,b){e&&(b&&b.getColumnModelProperty&&0<=d)&&(d=b.getColumnModelProperty(d,this._classListKey),this._modifyCellClassList(e,d,e._previousColumnClassList),e._previousColumnClassList=d)},_updateCellClasses:function(e,
d,b,a,c){e&&(0<=d&&0<=b&&a&&c&&c.getCellPropertyValue)&&(d=c.getCellPropertyValue(d,b,this._classListKey,a),this._modifyCellClassList(e,d,e._previousCellClassList),e._previousCellClassList=d)},_updateNodeClasses:function(e,d,b,a,c){this._updateTableClasses(a,c);this._updateRowClasses(a,e,c);this._updateColumnClasses(a,d,c);this._updateCellClasses(a,e,d,b,c)},_modifyCellClassList:function(e,d,b){b||(b=[]);d&&Array.isArray(d)&&f.add(e,d);(classesToRemove=this._getDifferenceBetweenClassLists(b,d))&&
Array.isArray(classesToRemove)&&f.remove(e,classesToRemove)},_getDifferenceBetweenClassLists:function(e,d){classesToRemove=[];return e&&d?e.filter(function(b){return 0>d.indexOf(b)}):classesToRemove},_getCellModelStyle:function(e,d,b,a){var c={};if(a&&a.getCellPropertyValue&&0<=e&&0<=d){var h=a.getCellPropertyValue(e,d,"fontFamily",b),k=a.getCellPropertyValue(e,d,"fontSize",b),f=a.getCellPropertyValue(e,d,"fontStyle",b),m=a.getCellPropertyValue(e,d,"fontWeight",b),p=a.getCellPropertyValue(e,d,"color",
b),n=a.getCellPropertyValue(e,d,"backgroundColor",b);e=a.getCellPropertyValue(e,d,"style",b);a.rowHeight=Math.max(k?parseInt(k)*a.lineSpacing:a.rowHeight,a.minRowHeight);c={fontFamily:h||"",fontSize:k||"",fontStyle:f||"",fontWeight:m||"",color:p||"",backgroundColor:n||""};e&&e.split(";").forEach(function(a){(a=a.split(":"))&&(a[0]&&a[1])&&(c[a[0]]=a[1])})}return c}})})},"variableeditor/views/table/tableBase/_TableHeaderSelection":function(){define(["dojo/_base/declare","dojo/_base/event","dojo/_base/lang",
"dojo/on"],function(g,f,e,d){var b=this;return g([],{postCreate:function(){this.inherited(arguments);this.own(d(this.columnHeaderNode,"mousedown",e.hitch(this,"_onColumnMouseDown")));this.own(d(this.columnHeaderNode,"click",e.hitch(this,"_onHeaderClick")));this.own(d(this.columnHeaderNode,"dblclick",e.hitch(this,"_onColumnDoubleClick")));this.own(d(this.columnHeaderNode,"contextmenu",e.hitch(this,"_onColumnRightClick")));this.own(d(this.rowHeaderNode,"mousedown",e.hitch(this,"_onRowMouseDown")));
this.own(d(this.rowHeaderNode,"click",e.hitch(this,"_onHeaderClick")));this.own(d(this.rowHeaderNode,"dblclick",e.hitch(this,"_onRowDoubleClick")));this.own(d(this.rowHeaderNode,"contextmenu",e.hitch(this,"_onRowRightClick")))},_onRowRightClick:function(a){b.contextMenuPosition={x:a.pageX,y:a.pageY};var c=this._getCellFromNode(a.target);0<=c.row&&0<=c.column&&(f.stop(a),this.peerNode.dispatchPeerEvent("rowContextMenu",this.peerNode,{row:c.row}))},_onColumnRightClick:function(a){b.contextMenuPosition=
{x:a.pageX,y:a.pageY};var c=this._getCellFromNode(a.target);0<=c.row&&0<=c.column&&(f.stop(a),this.peerNode.dispatchPeerEvent("columnContextMenu",this.peerNode,{column:c.column}))},_onRowDoubleClick:function(a){var c=this._getCellFromNode(a.target);0<=c.row&&0<=c.column&&(f.stop(a),this.peerNode.dispatchPeerEvent("rowDoubleClick",this.peerNode,{row:c.row}))},_onColumnDoubleClick:function(a){var c=this._getCellFromNode(a.target);0<=c.row&&0<=c.column&&(f.stop(a),this.peerNode.dispatchPeerEvent("columnDoubleClick",
this.peerNode,{column:c.column}))},_onHeaderClick:function(a){a=a.target;if(0<document.getSelection().rangeCount){for(a=document.getSelection().getRangeAt(0).commonAncestorContainer;a.parentNode&&(!a.getAttribute||"cell"!==a.getAttribute("class")&&"header cell"!==a.getAttribute("class"));)a=a.parentNode;(!a||!a.getAttribute||"cell"!==a.getAttribute("class")&&"header cell"!==a.getAttribute("class"))&&document.getSelection().removeAllRanges()}},_onRowMouseDown:function(a){var c,h;if(!("column"===this.selectionType||
"single"===this.selectionMode)){var b=this._getCellFromNode(a.target);if(!(0>b.row)){var d=b.row,b=[];if("extended"===this.selectionMode&&(a.ctrlKey||a.metaKey||a.shiftKey))b=e.clone(this.peerNode.getProperty("selectedIndices")),0<b.length&&("row"===this.selectionType&&"number"!==typeof b[0]?b=[]:"cell"===this.selectionType&&!e.isArray(b[0])&&(b=[]));if("none"!==this.selectionType&&"none"!==this.selectionMode)if("cell"===this.selectionType)if(a.shiftKey&&0<b.length){a=b[b.length-1];b=[];for(c=d;c<=
a[0];c+=1)for(h=0;h<=this.dataModel.getColumnCount();h+=1)b.push([c,h]);for(c=d;c>=a[0];c-=1)for(h=0;h<=this.dataModel.getColumnCount();h+=1)b.push([c,h])}else if(a.ctrlKey||a.metaKey)if(a=b.filter(function(a){return a[0]!==d}),a.length===b.length)for(c=0;c<this.dataModel.getColumnCount();c+=1)b.push([d,c]);else b=a;else for(c=0;c<this.dataModel.getColumnCount();c+=1)b.push([d,c]);else if(a.shiftKey&&0<b.length){a=b[b.length-1];b=[];for(c=d;c<=a;c+=1)b.push(c);for(c=d;c>=a;c-=1)b.push(c)}else a.ctrlKey||
a.metaKey?(c=b.indexOf(d),0<=c?b.splice(c,1):b.push(d)):b.push(d);this.peerNode.setProperty("selectedIndices",b)}}},_onColumnMouseDown:function(a){var c,h;if(!("row"===this.selectionType||"single"===this.selectionMode)){var b=this._getCellFromNode(a.target);if(!(0>b.column)){var d=b.column,b=[];if("extended"===this.selectionMode&&(a.ctrlKey||a.metaKey||a.shiftKey))b=e.clone(this.peerNode.getProperty("selectedIndices")),0<b.length&&("column"===this.selectionType&&"number"!==typeof b[0]?b=[]:"cell"===
this.selectionType&&!e.isArray(b[0])&&(b=[]));if("none"!==this.selectionType&&"none"!==this.selectionMode)if("cell"===this.selectionType)if(a.shiftKey&&0<b.length){a=b[b.length-1];b=[];for(c=d;c<=a[1];c+=1)for(h=0;h<=this.dataModel.getRowCount();h+=1)b.push([h,c]);for(c=d;c>=a[1];c-=1)for(h=0;h<=this.dataModel.getRowCount();h+=1)b.push([h,c])}else if(a.ctrlKey||a.metaKey)if(a=b.filter(function(a){return a[1]!==d}),a.length===b.length)for(c=0;c<this.dataModel.getRowCount();c+=1)b.push([c,d]);else b=
a;else for(c=0;c<this.dataModel.getRowCount();c+=1)b.push([c,d]);else if(a.shiftKey&&0<b.length){a=b[b.length-1];b=[];for(c=d;c<=a;c+=1)b.push(c);for(c=d;c>=a;c-=1)b.push(c)}else a.ctrlKey||a.metaKey?(c=b.indexOf(d),0<=c?b.splice(c,1):b.push(d)):b.push(d);this.peerNode.setProperty("selectedIndices",b)}}}})})},"variableeditor/views/table/_VETableSelection":function(){define("variableeditor/views/table/_VETableSelection","dojo/_base/declare dojo/query dojo/NodeList dojo/dom dojo/topic variableeditor/views/table/tableBase/_TableSelection variableeditor/views/table/BlockSelection variableeditor/VariableEditorUtils datatoolsservices/DataToolsUtils dojo/dom-class".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return g("variableeditor.views.table._VETableSelection",[a],{leadCell:{row:-1,column:-1},shiftKeyPivot:{row:-1,column:-1},leadCellStyle:"background-color: rgb(255, 255, 255);",selectedCellStyle:"background-color: rgb(217, 240, 255);",selectedBorderColor:"rgb(0, 153, 255)",selectedBorderStyle:"1px solid",blockSelection:new c,_serverSelectionTimeout:null,constructor:function(){this._updateFromExistingSelection();this.leadCell={row:-1,column:-1};this._getSelectionStyles();
this._serverSelectionTimeout=null},_getSelectionStyles:function(){var a=k.getStylesFromClasses(["variableEditorSelectionBackgroundColor","variableEditorSelectionBorder"],["background-color","border-left-color","border-left-width","border-left-style"]);this.selectedCellStyle="background-color: "+a["background-color"]+";";this.selectedBorderColor=a["border-left-color"];this.selectedBorderStyle=a["border-left-width"]+" "+a["border-left-style"];a=k.getStylesFromClasses(["variableEditorLeadCellBackgroundColor"],
["background-color"]);this.leadCellStyle="background-color: "+a["background-color"]+";"},_updateFromExistingSelection:function(){var a;this.peerNode&&this.peerNode.getProperty&&(a=this.peerNode.getProperty("Selection"));this.blockSelection=new c(a)},_setLeadCellPosition:function(a,c){this.leadCell={row:Math.min(a,this.getRowCount()-1),column:Math.min(c,this.getColumnCount()-1)}},_setShiftKeyPivot:function(a,c){this.shiftKeyPivot={row:a,column:c}},_resetShiftKeyPivot:function(){this.shiftKeyPivot=
{row:-1,column:-1}},getRowSelector:function(a){return"#"+this.id+" .dataBody .row:nth-of-type("+(a-this.rowView.start+2)+")"},getCellSelector:function(a,c){return this.getRowSelector(a)+" .cell:nth-of-type("+(c-this.colView.start+2)+")"},getLeadNode:function(){if(0>this.leadCell.row||0>this.leadCell.column||this.leadCell.row>=this.getRowCount()||this.leadCell.column>=this.getColumnCount())return null;var a=this.getCellSelector(this.leadCell.row,this.leadCell.column);return f(a)[0]},getShiftKeyPivot:function(){return[this.shiftKeyPivot.row,
this.shiftKeyPivot.column]},_isLeadNodeInDom:function(){var a=this.getLeadNode();return this.domNode&&a&&d.isDescendant(a,this.domNode)},selectCell:function(a,c){this.selectable&&(this.blockSelection.addCell(a,c),this._renderSelection(),this.setServerSelection(!0))},deselectCell:function(a,c){this.selectable&&(this.blockSelection.removeCell(a,c),this._renderSelection(),this.setServerSelection(!0))},selectRow:function(a){this.selectable&&(this.blockSelection.add(a,a,0,this.getColumnCount()-1),this._renderSelection(),
this.setServerSelection(!0))},deselectRow:function(a){this.selectable&&(this.blockSelection.removeRows(a,a),this._renderSelection(),this.setServerSelection(!0))},selectColumn:function(a){this.selectable&&this.selectable&&(this.blockSelection.add(0,this.getRowCount()-1,a,a),this._renderSelection(),this.setServerSelection(!0))},deselectColumn:function(a){this.selectable&&(this.blockSelection.removeColumns(a,a),this._renderSelection(),this.setServerSelection(!0))},isCellSelected:function(a,c){return this.blockSelection.containsCell(a,
c)},isColumnSelected:function(a){return this.blockSelection.containsColumn(a)},isRowSelected:function(a){return this.blockSelection.containsRow(a)},_renderSelection:function(){null!==this.dataModel&&(this._updateSelectionAndSelectionBorderStyle(),this._updateLeadCellStyle(),this._updateHeaderStyle())},_updateSelectionAndSelectionBorderStyle:function(){var a,c,h,b;a=this._getCurrentViewportSelection();b=a.selectedRows;h=a.selectedColumns;if(this.blockSelection.isEmpty())f(".highlightSelected",this.domNode).removeClass("highlightSelected borderLeft borderRight borderTop borderBottom GroupedBorder".split(" "));
else{f(".highlightSelected",this.domNode).removeClass("highlightSelected borderLeft borderRight borderTop borderBottom GroupedBorder".split(" "));var d=[],k=[],l=[],g=[],v=[],w=[];for(a=0;a<b.length;a+=1){Math.max(1,b[a].start+this.tableRowOffset-this.rowView.start);Math.max(1,b[a].end+this.tableRowOffset-this.rowView.start);for(c=0;c<h.length;c+=1){Math.max(1,h[c].start+this.tableColumnOffset-this.colView.start);Math.max(1,h[c].end+this.tableColumnOffset-this.colView.start,1);for(var x=b[a].start;x<=
b[a].end;x++)for(var y=h[c].start;y<=h[c].end;y++){var B=this.domNode.getElementsByClassName("cellRenderer row_"+x+" col_"+y)[0];B&&(B=this._getCellFromNode(B).node,this.showSelectionBorder?(d.push(B),this._isGroupedCol(y)&&w.push(B),y===h[c].start&&k.push(B),y===h[c].end&&l.push(B),x===b[a].start&&g.push(B),x===b[a].end&&v.push(B)):B&&d.push(B))}}}0<d.length&&(e(d).addClass("highlightSelected"),this.showSelectionBorder&&(e(k).addClass("borderLeft"),e(l).addClass("borderRight"),e(g).addClass("borderTop"),
e(v).addClass("borderBottom"),e(w).addClass("GroupedBorder")))}},_isGroupedCol:function(a){a=this.getColumnModelProperty(a,"GroupColumnSize");return 1<parseInt(a,10)},_updateHeaderStyle:function(){var a=[],c=[],h=this._getCurrentViewportSelection();this.blockSelection.isEmpty()||h.selectedRows.forEach(dojo.hitch(this,function(b){h.selectedColumns.forEach(dojo.hitch(this,function(h){for(var d=b.start+1;d<=b.end+1;d++){var k=this.domNode.getElementsByClassName("variableEditorRowHeaders header_"+d)[0];
k&&a.push(k)}for(d=h.start+1;d<=h.end+1;d++)(k=this.domNode.getElementsByClassName("variableEditorColumnHeaders header_"+d)[0])&&c.push(k);if(0<a.length||0<c.length)e(a).addClass("highlightSelected"),e(c).addClass("highlightSelected")}))}))},_getCurrentViewportSelection:function(){minStartRow=this.dataModel.getCurrentStartRow();maxEndRow=this.dataModel.getCurrentEndRow();minStartCol=this.dataModel.getCurrentStartCol();maxEndCol=this.dataModel.getCurrentEndCol();var a=JSON.parse(JSON.stringify(this.blockSelection));
a.selectedRows.forEach(function(a){a.end-a.start>maxEndRow-minStartRow&&(a.start=minStartRow,a.end=maxEndRow)});a.selectedColumns.forEach(function(a){a.end-a.start>maxEndCol-minStartCol&&(a.start=minStartCol,a.end=maxEndCol)});return a},_updateLeadCellStyle:function(){var a=f(".leadCell",this.domNode);0!=a.length&&a.removeClass("leadCell");this._isLeadNodeInDom()&&(a=this.getLeadNode(),a=this._getCellFromNode(a),this.blockSelection.isEmpty()||(a=this.domNode.getElementsByClassName("cellRenderer row_"+
a.row+" col_"+a.column)[0])&&l.add(a,"leadCell"))},setServerSelection:function(a){h.logDebugStackTraceMessage();h.logDebugStackTraceArray();var d;d=0>=arguments.length?!1:a;var k=this.peerNode.getProperty("Selection");k||(k={selectedRows:[],selectedColumns:[]});if(!d||!this.blockSelection.matchingSelection(new c(k))){d&&b.publish("/datatools/selectionChanged","");this._serverSelectionTimeout&&clearTimeout(this._serverSelectionTimeout);var e=this;this._serverSelectionTimeout=setTimeout(function(){e.peerNode.setProperty("Selection",
e.blockSelection.createSourcedCopy("client"));e._serverSelectionTimeout=null},250)}}})})},"dojo/NodeList":function(){define(["./query"],function(g){return g.NodeList})},"variableeditor/views/table/tableBase/_TableSelection":function(){define(["dojo/_base/declare","dojo/_base/event","dojo/_base/lang","dojo/on"],function(g,f,e,d){return g([],{constructor:function(){this.defaultProperties=e.delegate(this.defaultProperties,{selectionType:"row",selectionMode:"none",selectedIndices:[]})},postCreate:function(){this.inherited(arguments);
this.own(d(this.dataScrollerNode,"dblclick",e.hitch(this,"_onDataDoubleClick")));this.own(d(this.dataScrollerNode,"contextmenu",e.hitch(this,"_onRightClick")))},selectCell:function(b,a){var c=e.clone(this.selectedIndices);switch(this.selectionType){case "cell":c.push([b,a]);break;case "row":c.push(b);break;case "column":c.push(a)}this.peerNode.setProperty("selectedIndices",c)},deselectCell:function(b,a){var c=e.clone(this.selectedIndices);switch(this.selectionType){case "cell":c=c.filter(function(c){return c[0]!==
b||c[1]!==a});break;case "row":c=c.filter(function(a){return a!==b});break;case "column":c=c.filter(function(c){return c!==a})}this.peerNode.setProperty("selectedIndices",c)},selectRow:function(b){var a,c=e.clone(this.selectedIndices);switch(this.selectionType){case "cell":for(a=0;a<this.dataModel.getColumnCount();a+=1)c.push([b,a]);break;case "row":c.push(b)}this.peerNode.setProperty("selectedIndices",c)},deselectRow:function(b){var a=e.clone(this.selectedIndices);switch(this.selectionType){case "cell":a=
a.filter(function(a){return a[0]!==b});break;case "row":a=a.filter(function(a){return a!==b})}this.peerNode.setProperty("selectedIndices",a)},selectColumn:function(b){var a,c=e.clone(this.selectedIndices);switch(this.selectionType){case "cell":for(a=0;a<this.dataModel.getRowCount();a+=1)c.push([a,b]);break;case "column":c.push(b)}this.peerNode.setProperty("selectedIndices",c)},deselectColumn:function(b){var a=e.clone(this.selectedIndices);switch(this.selectionType){case "cell":a=a.filter(function(a){return a[1]!==
b});break;case "column":a=a.filter(function(a){return a!==b})}this.peerNode.setProperty("selectedIndices",a)},isCellSelected:function(b,a){switch(this.selectionType){case "cell":return this.selectedIndices.some(function(c){return c[0]===b&&c[1]===a});case "row":return this.selectedIndices.some(function(a){return a===b});case "column":return this.selectedIndices.some(function(c){return c===a});default:return!1}},isRowSelected:function(b){function a(a){return function(c){return c[0]===b&&c[1]===a}}
switch(this.selectionType){case "cell":var c,h=b<this.dataModel.getRowCount();for(c=0;c<this.dataModel.getColumnCount();c+=1)h=h&&this.selectedIndices.some(a(c));return h;case "row":return this.selectedIndices.some(function(a){return a===b});default:return!1}},isColumnSelected:function(b){function a(a){return function(c){return c[0]===a&&c[1]===b}}switch(this.selectionType){case "cell":var c,h=b<this.dataModel.getColumnCount();for(c=0;c<this.dataModel.getRowCount();c+=1)h=h&&this.selectedIndices.some(a(c));
return h;case "row":return this.selectedIndices.some(function(a){return a===c});default:return!1}},_onRightClick:function(b){b.preventDefault()},_onDataDoubleClick:function(b){var a=this._getCellFromNode(b.target);0<=a.row&&(f.stop(b),this.peerNode.dispatchPeerEvent("doubleClick",this.peerNode,{row:a.row,column:a.column}))},_onSelectionTypeSet:function(){this._renderSelection()},_onSelectionModeSet:function(){this._renderSelection()},_onSelectedIndicesSet:function(){this._renderSelection()},_onDataClick:function(b){b=
b.target;if(0<document.getSelection().rangeCount){for(b=document.getSelection().getRangeAt(0).commonAncestorContainer;b.parentNode&&(!b.getAttribute||"cell"!==b.getAttribute("class"));)b=b.parentNode;(!b||!b.getAttribute||"cell"!==b.getAttribute("class"))&&document.getSelection().removeAllRanges()}},_onDataMouseDown:function(b){var a,c,h=this._getCellFromNode(b.target);if(!(0>h.row||0>h.column)){var d=h.row,f=h.column,h=[];if("extended"===this.selectionMode&&(b.ctrlKey||b.metaKey||b.shiftKey))h=e.clone(this.selectedIndices),
0<h.length&&(("row"===this.selectionType||"column"===this.selectionType)&&"number"!==typeof h[0]?h=[]:"cell"===this.selectionType&&!e.isArray(h[0])&&(h=[]));if("none"!==this.selectionType&&"none"!==this.selectionMode)if("cell"===this.selectionType)if(b.shiftKey&&0<h.length){b=h[h.length-1];h=[];for(a=d;a<=b[0];a+=1){for(c=f;c<=b[1];c+=1)h.push([a,c]);for(c=f;c>=b[1];c-=1)h.push([a,c])}for(a=d;a>=b[0];a-=1){for(c=f;c<=b[1];c+=1)h.push([a,c]);for(c=f;c>=b[1];c-=1)h.push([a,c])}}else b.ctrlKey||b.metaKey?
(b=h.filter(function(a){return a[0]!==d||a[1]!==f}),b.length===h.length?h.push([d,f]):h=b):h.push([d,f]);else if(c="row"===this.selectionType?d:f,b.shiftKey&&0<h.length){b=h[h.length-1];h=[];for(a=c;a<=b;a+=1)h.push(a);for(a=c;a>=b;a-=1)h.push(a)}else b.ctrlKey||b.metaKey?(a=h.indexOf(c),0<=a?h.splice(a,1):h.push(c)):h.push(c);this.peerNode.setProperty("selectedIndices",h)}},_renderSelection:function(){var b={};"none"!==this.selectionMode&&("row"===this.selectionType?this.selectedIndices.forEach(function(a){a>=
this.rowView.start&&a<this.rowView.end&&(b[".dataBody .row:nth-child("+(a-this.rowView.start+2)+")"]="background-color: rgb(173, 206, 255);")},this):"column"===this.selectionType?this.selectedIndices.forEach(function(a){a>=this.colView.start&&a<this.colView.end&&(b[".dataBody .row .cell:nth-child("+(a-this.colView.start+2)+")"]="background-color: rgb(173, 206, 255);")},this):"cell"===this.selectionType&&this.selectedIndices.forEach(function(a){a[0]>=this.rowView.start&&(a[0]<this.rowView.end&&a[1]>=
this.colView.start&&a[1]<this.colView.end)&&(b[".dataBody .row:nth-child("+(a[0]-this.rowView.start+2)+") .cell:nth-child("+(a[1]-this.colView.start+2)+")"]="background-color: rgb(173, 206, 255);")},this));this.styleManager.updateStyleRules("selection",b)}})})},"variableeditor/views/table/BlockSelection":function(){define("variableeditor/views/table/BlockSelection",["dojo/_base/declare"],function(g){return g("variableeditor.views.table.BlockSelection",null,{source:"server",selectedRows:[],selectedColumns:[],
indexedRows:!1,indexedColumns:!1,constructor:function(f){this.selectedRows=[];this.selectedColumns=[];f?(f.selectedRows&&(this.selectedRows=Array.isArray(f.selectedRows)?f.selectedRows:JSON.parse(f.selectedRows)),f.selectedColumns&&(this.selectedColumns=Array.isArray(f.selectedColumns)?f.selectedColumns:JSON.parse(f.selectedColumns)),f.source&&(this.source=f.source),void 0!==f.indexedRows&&(this.indexedRows=f.indexedRows),void 0!==f.indexedColumns&&(this.indexedColumns=f.indexedColumns)):(this.selectedRows=
[],this.selectedColumns=[])},setIndexedRows:function(f){this.indexedRows=f},containsColumn:function(f){return this.selectedColumns.some(function(e){return e.start<=f&&e.end>=f})},containsRow:function(f){return this.selectedRows.some(function(e){return e.start<=f&&e.end>=f})},getRowCount:function(){var f=0;this.selectedRows.forEach(function(e){f=f+e.end-e.start+1});return f},flipRowCount:function(f){this.selectedRows.forEach(function(e){var d=e.end;e.end=f-1-e.start;e.start=f-1-d})},getColumnCount:function(){var f=
0;this.selectedColumns.forEach(function(e){f=f+e.end-e.start+1});return f},isEmpty:function(){return 0===this.getColumnCount()||0===this.getRowCount()},containsCell:function(f,e){return this.containsColumn(e)&&this.containsRow(f)},getOverlappingCells:function(f,e,d,b){for(var a,c=[];f<=e;f+=1)for(a=d;a<=b;a+=1)this.containsCell(f,a)&&c.push([f,a]);return c},clone:function(){var f=dojo.clone(this);f.selectedRows=[];f.selectedColumns=[];this.selectedRows.forEach(dojo.hitch(this,function(e){f.selectedRows.push({start:e.start,
end:e.end})}));this.selectedColumns.forEach(dojo.hitch(this,function(e){f.selectedColumns.push({start:e.start,end:e.end})}));f.source=this.source;return f},createSourcedCopy:function(f){var e=this.clone();e.source=f;return e},add:function(f,e,d,b){var a;f>e&&(a=f,f=e,e=a);d>b&&(a=d,d=b,b=a);if(this.indexedRows)for(;f<=e;f+=1)this.selectedRows.push({start:f,end:f});else this.selectedRows.push({start:f,end:e});this.selectedColumns.push({start:d,end:b});this.reconcile()},addCell:function(f,e){this.selectedRows.push({start:f,
end:f});this.selectedColumns.push({start:e,end:e});this.reconcile()},removeCell:function(f,e){var d=this.containsColumn(e)&&1===this.getColumnCount(),b=this.containsRow(f)&&1===this.getRowCount();d&&!b?this.removeRows(f,f):!d&&b?this.removeColumns(e,e):this.remove(f,f,e,e);this.reconcile()},getLeadCell:function(){return this.isEmpty()?null:[this.selectedRows[this.selectedRows.length-1].end,this.selectedColumns[this.selectedColumns.length-1].end]},getFirstCellFromLastRow:function(){return this.isEmpty()?
null:[this.selectedRows[this.selectedRows.length-1].end,this.selectedColumns[this.selectedColumns.length-1].start]},matchingSelection:function(f){if(f.selectedRows.length!==this.selectedRows.length||f.selectedColumns.length!==this.selectedColumns.length)return!1;var e;for(e=0;e<this.selectedRows.length;e+=1)if(this.selectedRows[e].start!==f.selectedRows[e].start||this.selectedRows[e].end!==f.selectedRows[e].end)return!1;for(e=0;e<this.selectedColumns.length;e+=1)if(this.selectedColumns[e].start!==
f.selectedColumns[e].start||this.selectedColumns[e].end!==f.selectedColumns[e].end)return!1;return!0},removeRows:function(f,e){var d=[],b=[];this.selectedRows.forEach(function(a){f<=a.start&&e>=a.end?d.push(a):f>a.start&&e<a.end?(d.push(a),b.push({start:a.start,end:f-1}),b.push({start:e+1,end:a.end})):f<=a.start&&e>=a.start?a.start=e+1:f<=a.end&&e>=a.end&&(a.end=f-1)});d.forEach(dojo.hitch(this,function(a){a=this.selectedRows.indexOf(a);0<=a&&this.selectedRows.splice(a,1)}));b.forEach(dojo.hitch(this,
function(a){this.selectedRows.push(a)}));this.reconcile()},removeColumns:function(f,e){var d=[],b=[];this.selectedColumns.forEach(function(a){f<=a.start&&e>=a.end?d.push(a):f>a.start&&e<a.end?(d.push(a),b.push({start:a.start,end:f-1}),b.push({start:e+1,end:a.end})):f<=a.start&&e>=a.start?a.start=e+1:f<=a.end&&e>=a.end&&(a.end=f-1)});d.forEach(dojo.hitch(this,function(a){a=this.selectedColumns.indexOf(a);0<=a&&this.selectedColumns.splice(a,1)}));b.forEach(dojo.hitch(this,function(a){this.selectedColumns.push(a)}));
this.reconcile()},remove:function(f,e,d,b){this.removeRows(f,e);this.removeColumns(d,b)},_isInterectingRows:function(f){var e=this.selectedRows.slice();e.sort(function(b,a){return b.start-a.start});var d=1;f&&(d=0);for(f=1;f<e.length;f+=1)if(e[f].start<=e[f-1].end+d)return!0;return!1},_isInterectingColumns:function(f){var e=this.selectedColumns.slice();e.sort(function(b,a){return b.start-a.start});var d=1;f&&(d=0);for(f=1;f<e.length;f+=1)if(e[f].start<=e[f-1].end+d)return!0;return!1},reconcile:function(){var f,
e=this._isInterectingColumns(this.indexedColumns);f=this._isInterectingRows(this.indexedRows);if(e||f){if(f){this.selectedRows.sort(dojo.hitch(this,function(b,a){return b.start-a.start}));var d=[this.selectedRows[0]];for(f=1;f<this.selectedRows.length;f+=1)!this.indexedRows&&this.selectedRows[f].start<=d[d.length-1].end+1?d[d.length-1].end=Math.max(this.selectedRows[f].end,d[d.length-1].end):this.indexedRows&&this.selectedRows[f].start===d[d.length-1].start&&this.selectedRows[f].end===d[d.length-
1].end?d[d.length-1].end=Math.max(this.selectedRows[f].end,d[d.length-1].end):d.push(this.selectedRows[f]);this.selectedRows=d}if(e){this.selectedColumns.sort(dojo.hitch(this,function(b,a){return b.start-a.start}));e=[this.selectedColumns[0]];for(f=1;f<this.selectedColumns.length;f+=1)this.selectedColumns[f].start<=e[e.length-1].end+1?e[e.length-1].end=this.selectedColumns[f].end>=e[e.length-1].end?this.selectedColumns[f].end:e[e.length-1].end:e.push(this.selectedColumns[f]);this.selectedColumns=
e}}}})})},"variableeditor/views/table/_VEModelProperties":function(){define("variableeditor/views/table/_VEModelProperties","dojo/_base/declare dojo/_base/lang dojo/query dojo/dom-class dojo/topic mw-log/Log dijit/registry variableeditor/VariableEditorUtils datatoolsservices/DataToolsUtils".split(" "),function(g,f,e,d,b,a,c,h,k){return g("variableeditor.views.table._VEModelProperties",[],{defaultRowHeaderWidth:30,maxLabelWidth:25,notEditableCSSClass:"venoteditable",notSelectableCSSClass:"venotselectable",
maxIndexWidth:null,constructor:function(a){var c={};this.TableModelProperties={};this.RowModelProperties=[];this.ColumnModelProperties=[];this.CellModelProperties=[];a&&(this.TableModelProperties=c.TableModelProperties=a.TableModelProperties||{},this.RowModelProperties=c.RowModelProperties=a.RowModelProperties||[],this.ColumnModelProperties=c.ColumnModelProperties=a.ColumnModelProperties||[],this.CellModelProperties=c.CellModelProperties=a.CellModelProperties||[],f.mixin(a,c),this.editable=void 0===
a.editable||null===a.editable?void 0!==this.TableModelProperties.Editable?k.getLogicalValue(this.TableModelProperties.Editable):!0:a.editable);void 0!==this.TableModelProperties.Editable&&this.editable!==k.getLogicalValue(this.TableModelProperties.Editable)?this.editable=k.getLogicalValue(this.TableModelProperties.Editable):void 0===this.TableModelProperties.Editable&&(this.updateEditableFlag=!0)},updateModelProperties:function(a){var c=window.performance.now();h.logDebug("_VEModelProperties: updateModelProperties");
this._updateTableModelProperties();this._updateTableHeaders();this._updateModelStyles();a&&this._renderViewData(!0);a=window.performance.now()-c;h.isPerformance()&&b.publish("variableeditor/updateModelPropsChannel",{time:a})},_updateTableModelProperties:function(){h.logDebug("_VEModelProperties: _updateTableModelProperties");this.TableModelProperties&&(this._updateTableEditable(),this._updateTableSelectable(),this._updateTableRowHeight())},_updateTableRowHeight:function(){var a=this.getTableModelProperty("fontSize"),
a=Math.max(a?parseInt(a)*this.lineSpacing:this.rowHeight,this.minRowHeight);a!==this.rowHeight&&(this.rowHeight=a)},_updateTableEditable:function(){h.logDebug("_VEModelProperties: _updateTableEditable");this.updateEditableFlag&&(void 0!==this.TableModelProperties.Editable&&this.setTableModelProperty)&&(this.setTableModelProperty("Editable",this.editable?"true":"false"),this.updateEditableFlag=!1);var a=this.getTableModelProperty("Editable");void 0===a?(a=this.editable,this.setTableModelProperty("Editable",
a)):this.editable=k.getLogicalValue(a,!0)},_updateTableSelectable:function(){h.logDebug("_VEModelProperties: _updateTableSelectable");var a=this.getTableModelProperty("Selectable");void 0===a?(a=this.selectable,this.setTableModelProperty("Selectable",a)):(this.selectable=k.getLogicalValue(a,!0),this.selectable||(this.blockSelection.selectedRows=[],this.blockSelection.selectedColumns=[],this._renderSelection(),this._setLeadCellPosition(-1,-1)));this.domNode&&(this.selectable?d.remove(this.domNode,
this.notSelectableCSSClass):d.add(this.domNode,this.notSelectableCSSClass))},_updateModelStyles:function(){h.logDebug("_VEModelProperties: _updateModelStyles");if(this.dataModel&&this.dataModel.getCurrentStartCol&&this.dataModel.getCurrentEndCol&&this.dataModel.getCurrentStartRow&&this.dataModel.getCurrentEndRow){var a=e("input.cell.variableEditorRenderers",this.domNode);this._updateNodeStyles(a)}},_updateNodeStyles:function(a){if(a&&0<a.length)for(var h,b=0;b<a.length;b+=1){h=a[b].getAttribute("data-tag")?
a[b]:a[b].querySelector("input");var d=a[b].getAttribute("data-row"),k=a[b].getAttribute("data-col");h&&(void 0!==d&&void 0!==k)&&((h=c.getEnclosingWidget(h))&&h.updateCellStyles&&h.updateCellStyles(d,k),h&&h.updateCellDraggability&&h.updateCellDraggability(d,k))}},isCellDraggable:function(){return this.TableModelProperties&&this.TableModelProperties.Draggable?this.TableModelProperties.Draggable:!1},getTextDataTransferValue:function(){var a=[];if(this.blockSelection&&this.blockSelection.selectedRows&&
this.blockSelection.selectedColumns)for(var h=0;h<this.blockSelection.selectedRows.length;h+=1)for(var b=0;b<this.blockSelection.selectedColumns.length;b+=1)for(var d=this.blockSelection.selectedRows[h],k=this.blockSelection.selectedColumns[b],f=d.start;f<=d.end;f+=1)for(var g=k.start;g<=k.end;g+=1)if(this.isCellDraggable(f,g)){var t=this.getCellSelector(f,g),u=e(t)[0],t=this.getCellPropertyValue(f,g,"DragValue");if(void 0===t&&u&&(u&&u.querySelectorAll)&&(u=u.querySelectorAll('[data-tag*\x3d".cell.'+
f.toString()+"."+g.toString()+'"]')))for(var v=0;v<u.length;v+=1){var w=c.getEnclosingWidget(u[v]);w&&w.veEditor&&(t=w.veEditor.editorValue)}void 0!==t&&a.push(t)}return a.toString()},getDragValue:function(a){a||(a="text");return"text"===a?this.getTextDataTransferValue():""},isCellEditable:function(a,h,b){var d=k.getLogicalValue(this.getCellModelProperty(a,h,"Editable"),!0),f=k.getLogicalValue(this.getColumnModelProperty(h,"Editable"),!0),g=k.getLogicalValue(this.getRowModelProperty(a,"Editable"),
!0);void 0===b&&(a=this.getCellSelector(a,h),b=e(a)[0]);a=c.getEnclosingWidget(b);return this.editable&&d&&f&&g&&a&&a.veInplaceEditor&&a.veInplaceEditor.edit},isCellEditableFromObj:function(a,c,h){c=k.getLogicalValue(this.getColumnModelProperty(c,"Editable"),!0);a=k.getLogicalValue(this.getRowModelProperty(a,"Editable"),!0);return this.editable&&c&&a&&h&&h.inplaceeditor},isNodeEditable:function(a){try{var c=this._getCellFromNode(a);if(0<=c.row&&0<=c.column)return this.isCellEditable(c.row,c.column,
a)}catch(b){h.logDebug(b)}return!1},getColumnModelProperties:function(a){a-=this.dataModel&&this.dataModel.getCurrentStartCol?this.dataModel.getCurrentStartCol():0;return!this.ColumnModelProperties||!this.ColumnModelProperties.hasOwnProperty(a)?{}:this.ColumnModelProperties[a]},getColumnModelProperty:function(a,c){var h=this.getColumnModelProperties(a);return!h.hasOwnProperty(c)?void 0:h[c]},setColumnModelProperty:function(a,c,h){var b=a-(this.dataModel&&this.dataModel.getCurrentStartCol?this.dataModel.getCurrentStartCol():
0);if(!this.ColumnModelProperties||0===this.ColumnModelProperties.length){this.ColumnModelProperties=[];var d;if(this.dataModel&&this.dataModel.getCurrentStartCol&&this.dataModel.getCurrentEndCol)for(d=0;d<this.dataModel.getCurrentEndCol()-this.dataModel.getCurrentStartCol();d+=1)this.ColumnModelProperties[d]={}}this.ColumnModelProperties.hasOwnProperty(b)&&(this.ColumnModelProperties[b][c]=h);this.peerViewModel&&this.peerViewModel.setColumnModelProperty&&this.peerViewModel.setColumnModelProperty(a,
c,h);this._updateColumnHeaderNames();this._updateColumnWidths();this._updateModelStyles()},getRowModelProperties:function(a){a-=this.dataModel&&this.dataModel.getCurrentStartRow?this.dataModel.getCurrentStartRow():0;return!this.RowModelProperties||!this.RowModelProperties.hasOwnProperty(a)?{}:this.RowModelProperties[a]},getRowModelProperty:function(a,c){var h=this.getRowModelProperties(a);return!h.hasOwnProperty(c)?void 0:h[c]},setRowModelProperty:function(a,c,h){var b=a-(this.dataModel&&this.dataModel.getCurrentStartRow?
this.dataModel.getCurrentStartRow():0);if(!this.RowModelProperties||0===this.RowModelProperties.length){this.RowModelProperties=[];var d;if(this.dataModel&&this.dataModel.getCurrentStartRow&&this.dataModel.getCurrentEndRow)for(d=0;d<this.dataModel.getCurrentEndRow()-this.dataModel.getCurrentStartRow();d+=1)this.RowModelProperties[d]={}}this.RowModelProperties.hasOwnProperty(b)&&(this.RowModelProperties[b][c]=h);this.peerViewModel&&this.peerViewModel.setRowModelProperty&&this.peerViewModel.setRowModelProperty(a,
c,h);this._updateRowHeaderNames();this._updateModelStyles()},getTableModelProperty:function(a){return!this.TableModelProperties||!this.TableModelProperties.hasOwnProperty(a)?void 0:this.TableModelProperties[a]},setTableModelProperty:function(a,c){this.TableModelProperties||(this.TableModelProperties={});this.TableModelProperties[a]=c;this.peerViewModel&&this.peerViewModel.setTableModelProperty&&this.peerViewModel.setTableModelProperty(a,c);this._updateTableSelectable();this._updateModelStyles()},
setCellModelProperty:function(a,c,h,b){var d=a-(this.dataModel&&this.dataModel.getCurrentStartRow?this.dataModel.getCurrentStartRow():0),k=c-(this.dataModel&&this.dataModel.getCurrentStartCol?this.dataModel.getCurrentStartCol():0);if(!this.CellModelProperties||0===this.CellModelProperties.length){this.CellModelProperties=[];var e;if(this.dataModel&&this.dataModel.getCurrentStartCol&&this.dataModel.getCurrentEndCol&&this.dataModel.getCurrentStartRow&&this.dataModel.getCurrentEndRow)for(e=0;e<this.dataModel.getCurrentEndRow()-
this.dataModel.getCurrentStartRow();e+=1){this.CellModelProperties[e]=[];var f;for(f=0;f<this.dataModel.getCurrentEndCol()-this.dataModel.getCurrentStartCol();f+=1)this.CellModelProperties[e][f]={}}}this.CellModelProperties.hasOwnProperty(d)&&this.CellModelProperties[d].hasOwnProperty(k)&&(this.CellModelProperties[d][k][h]=b);this.peerViewModel&&this.peerViewModel.setCellModelProperty&&this.peerViewModel.setCellModelProperty(a,c,h,b);this._updateModelStyles()},getCellModelProperty:function(a,c,h){var b;
0<=a&&(0<=c&&this.CellModelProperties&&this.dataModel&&this.dataModel.getCurrentStartCol&&this.dataModel.getCurrentStartRow&&this.CellModelProperties[a-this.dataModel.getCurrentStartRow()]&&this.CellModelProperties[a-this.dataModel.getCurrentStartRow()][c-this.dataModel.getCurrentStartCol()]&&this.CellModelProperties[a-this.dataModel.getCurrentStartRow()][c-this.dataModel.getCurrentStartCol()][h])&&(b=this.CellModelProperties[a-this.dataModel.getCurrentStartRow()][c-this.dataModel.getCurrentStartCol()][h]);
return b},getCellPropertyValue:function(a,c,h,b){var d;if(b&&b.hasOwnProperty(h))d=b[h];else if(0<=a&&0<=c&&this.CellModelProperties&&this.dataModel&&this.dataModel.getCurrentStartRow&&this.dataModel.getCurrentStartCol&&this.CellModelProperties[a-this.dataModel.getCurrentStartRow()]&&this.CellModelProperties[a-this.dataModel.getCurrentStartRow()][c-this.dataModel.getCurrentStartCol()]&&(this.CellModelProperties[a-this.dataModel.getCurrentStartRow()][c-this.dataModel.getCurrentStartCol()][h]||this.CellModelProperties[a-
this.dataModel.getCurrentStartRow()][c-this.dataModel.getCurrentStartCol()][h]===Boolean(0)))d=this.CellModelProperties[a-this.dataModel.getCurrentStartRow()][c-this.dataModel.getCurrentStartCol()][h];else if(0<=c&&this.ColumnModelProperties&&this.dataModel&&this.dataModel.getCurrentStartCol&&this.ColumnModelProperties[c-this.dataModel.getCurrentStartCol()]&&(this.ColumnModelProperties[c-this.dataModel.getCurrentStartCol()][h]||this.ColumnModelProperties[c-this.dataModel.getCurrentStartCol()][h]===
Boolean(0)))d=this.ColumnModelProperties[c-this.dataModel.getCurrentStartCol()][h];else if(0<=a&&this.RowModelProperties&&this.dataModel&&this.dataModel.getCurrentStartRow&&this.RowModelProperties[a-this.dataModel.getCurrentStartRow()]&&(this.RowModelProperties[a-this.dataModel.getCurrentStartRow()][h]||this.RowModelProperties[a-this.dataModel.getCurrentStartRow()][h]===Boolean(0)))d=this.RowModelProperties[a-this.dataModel.getCurrentStartRow()][h];else if(this.TableModelProperties&&(this.TableModelProperties[h]||
this.TableModelProperties[h]===Boolean(0)))d=this.TableModelProperties[h];return d},_updateTableHeaders:function(){h.logDebug("_VEModelProperties: _updateTableHeaders");this.ColumnModelProperties&&(this._updateColumnHeaderNames(),this._updateColumnWidths(),this._updateColumnHeaderDisplay());this.RowModelProperties&&(this._updateRowHeaderNames(),this._updateRowHeaderDisplay())},_updateRowHeaderDisplay:function(){this.domNode&&(k.getLogicalValue(this.getTableModelProperty("ShowRowHeaders"),!0)?d.remove(this.domNode,
"hideRowHeaders"):d.add(this.domNode,"hideRowHeaders"))},_updateColumnHeaderDisplay:function(){this.domNode&&(k.getLogicalValue(this.getTableModelProperty("ShowColumnHeaders"),!0)?d.remove(this.domNode,"hideColumnHeaders"):d.add(this.domNode,"hideColumnHeaders"))},_updateRowHeaderNames:function(){h.logDebug("_VEModelProperties: _updateRowHeaderNames");if(this.RowModelProperties){var a,c=this.defaultRowHeaderWidth,b=0,d=this.getTableModelProperty("CornerSpacerTitle");d&&(c=Math.max(7*d.length)+20,
this.peerNode.setProperty("rowHeaderWidth",c));if(this.dataModel&&this.dataModel.getCurrentStartRow&&this.dataModel.getCurrentEndRow){var d=k.getLogicalValue(this.getTableModelProperty("ShowRowHeaderNumbers"),!0),e=k.getLogicalValue(this.getTableModelProperty("ShowCustomRowHeaderNumbers"),!1),f=k.getLogicalValue(this.getTableModelProperty("ShowRowHeaderLabels"),!0);a=this.dataModel.getCurrentStartRow();var g;g=this.dataModel.getCurrentEndRow();for(g=0==g&&this.dataModel.getCurrentStartRow()===g&&
0!==this.getRowCount()?this.RowModelProperties.length:g;a<g;a+=1){this.rows[a]||(this.rows[a]={label:"",labelIndex:null});var t=f?this.getRowModelProperty(a,"RowName"):"",u=e?this.getRowModelProperty(a,"RowNumber"):"";t?(this.rows[a].labelIndex=e?parseInt(u):a+1,this.rows[a].label=t):(this.rows[a].labelIndex=d?a+1:"",this.rows[a].label="");b=Math.max(b,7*(this.rows[a].labelIndex.toString().length+2));c=Math.max(c,7*(Math.min(this.maxLabelWidth,this.rows[a].label.length)+this.rows[a].labelIndex.toString().length+
2))}null!=b&&(this.maxIndexWidth=b);this.peerNode.setProperty("rowHeaderWidth",c)}}},_updateColumnHeaderNames:function(){h.logDebug("_VEModelProperties: _updateColumnHeaderNames");if(this.ColumnModelProperties){var a;if(this.dataModel&&this.dataModel.getCurrentStartCol&&this.dataModel.getCurrentEndCol){var c=k.getLogicalValue(this.getTableModelProperty("ShowColumnHeaderNumbers"),!0),b=k.getLogicalValue(this.getTableModelProperty("ShowCustomColumnHeaderNumbers"),!1),d=k.getLogicalValue(this.getTableModelProperty("ShowColumnHeaderLabels"),
!0),e=this.getTableModelProperty("ShowHeaderIcons");this.getTableModelProperty("CornerSpacerTitle");for(a=this.dataModel.getCurrentStartCol();a<this.dataModel.getCurrentEndCol();a+=1){this.columns[a]||(this.columns[a]={label:"",labelIndex:null});var f=d?this.getColumnModelProperty(a,"HeaderName"):"",g=b?this.getColumnModelProperty(a,"HeaderNumber"):(a+1).toString(),t=e?this.getColumnModelProperty(a,"icon"):"";t&&(this.columns[a].icon=t);f?(this.columns[a].labelIndex=b?parseInt(g):a+1,this.columns[a].label=
f):(this.columns[a].labelIndex=c?a+1:"",this.columns[a].label="")}}}},_updateColumnWidths:function(){h.logDebug("_VEModelProperties: _updateColumnWidths");if(this.ColumnModelProperties){var c=f.clone(this.columns),b,d=!1;if(this.dataModel&&this.dataModel.getCurrentStartCol&&this.dataModel.getCurrentEndCol&&0<this.columns.length)for(b=this.dataModel.getCurrentStartCol();b<this.dataModel.getCurrentEndCol();b+=1)if(this.columns[b]||(this.columns[b]={width:0}),this.columns[b]&&this.columns[b]!==this._resizingColumn)try{var k=
this._getColumnWidthOnTable?this._getColumnWidthOnTable(b):null,e=k?k:this.getColumnModelProperty(b,"ColumnWidth"),g=parseInt(e,10);null!==e&&(void 0!==e&&0<=g)&&(this._currentColumns&&this._currentColumns[b]&&this._currentColumns[b].width===g?c[b].width=this._currentColumns[b].width:(d=!0,c[b].width=g))}catch(s){a.error(s),a.error(s.stack)}(d||this.dataModel&&this.columns&&this.dataModel.getColumnCount&&this.columns.length!==this.dataModel.getColumnCount())&&0!==c.length&&this.peerNode.setProperty("columns",
c);if(c&&(d||!this._currentColumns))this._currentColumns=c}}})})},"variableeditor/views/table/tableBase/_TableColumnWidth":function(){define("dojo/_base/declare dojo/_base/event dojo/_base/lang dojo/on dojo/dom-geometry dojo/dom-style dojo/dom-class".split(" "),function(g,f,e,d,b,a,c){return g([],{postCreate:function(){this.inherited(arguments);this.own(d(this.columnHeaderNode,"mousedown",e.hitch(this,"_onColumnResizeMouseDown")))},_onColumnResizeMouseDown:function(a){if(a.target.getAttribute&&a.target.getAttribute("class")&&
(-1!==a.target.getAttribute("class").indexOf("drag")||-1!==a.target.getAttribute("class").indexOf("firstHalfOfDrag")||-1!==a.target.getAttribute("class").indexOf("secondHalfOfDrag")||-1!==a.target.getAttribute("class").indexOf("dragBorder"))){c.add(this.domNode,"resizing");var k=this._getHeaderFromNode(a.target).column,l=this.columns[k];if(l&&(void 0===l.resizable||l.resizable))this._tablePos=b.position(this.columnResizerNode.parentNode),this._resizingColumn=k,this._originalResizeWidth=l.width||0,
this._minResizeWidth=l.minWidth||this.getColumnModelProperty(k,"ColumnMinWidth")?l.minWidth||this.getColumnModelProperty(k,"ColumnMinWidth"):10,this._maxResizeWidth=l.maxWidth?l.maxWidth:1E3,this._splitterNode=a.target,"drag"===a.target.getAttribute("class")&&(this._splitterNode=a.target.firstChild.nextElementSibling),"firstHalfOfDrag"===a.target.getAttribute("class")&&(this._splitterNode=a.target.nextElementSibling),"secondHalfOfDrag"===a.target.getAttribute("class")&&(this._splitterNode=a.target.previousElementSibling),
this._originalSplitterPos=b.position(this._splitterNode),this._updateColumnResizerNode(this._originalSplitterPos.x),this._mouseMoveListener=d(document,"mousemove",e.hitch(this,"_onColumnMouseMove")),this._mouseUpListener=d(document,"mouseup",e.hitch(this,"_onColumnMouseUp")),document.addEventListener("selectstart",f.stop,!0)}},_getHeaderFromNode:function(a){for(var c=null,b=-1,d=-1;a.getAttribute&&"datatools.variableeditor.views.table.variableEditorColumnHeaders"!==a.getAttribute("data-tag")&&a!==
this.dataScrollerNode;)a=a.parentNode;if(a.getAttribute&&"datatools.variableeditor.views.table.variableEditorColumnHeaders"===a.getAttribute("data-tag")){c=a;for(d=this.colView.start-1;a.previousElementSibling;)d+=1,a=a.previousElementSibling;a=a.parentNode;for(b=this.rowView.start-1;a.previousElementSibling;)b+=1,a=a.previousElementSibling}return{node:c,row:b,column:d}},_onColumnMouseMove:function(a){this._updateColumnResizerNode(a.pageX);f.stop(a)},_onColumnMouseUp:function(h){f.stop(h);c.remove(this.domNode,
"resizing");h=h.pageX-this._originalSplitterPos.x+this._originalResizeWidth;h=Math.min(Math.max(this._minResizeWidth,h),this._maxResizeWidth);var b=e.clone(this.columns);b[this._resizingColumn].width=h;this.peerNode.setProperty("columns",b);a.set(this.columnResizerNode,{display:"none"});this._mouseMoveListener.remove();this._mouseUpListener.remove();document.removeEventListener("selectstart",f.stop,!0)},_updateColumnResizerNode:function(c){c=c-this._originalSplitterPos.x+this._originalResizeWidth;
c=Math.min(Math.max(this._minResizeWidth,c),this._maxResizeWidth);a.set(this.columnResizerNode,{display:"inherit",left:this._originalSplitterPos.x-this._tablePos.x+c-this._originalResizeWidth+"px"})}})})},"variableeditor/views/table/tableBase/_PropTypeHandler":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/on"],function(g,f,e){return g([],{postCreate:function(){this.inherited(arguments);this.own(e(this.dataScrollerNode,e.selector("button","click"),f.hitch(this,"_onCellButtonClick")))},
_onCellButtonClick:function(d){var b=this._getCellFromNode(d.target);0<=b.row&&0<=b.column&&this.peerNode.dispatchPeerEvent("cellEvent",this.peerNode,{cellEventType:"buttonClick",row:b.row,column:b.column,buttonClass:d.target.getAttribute("class")})}})})},"variableeditor/views/renderers/VERendererFactory":function(){define("variableeditor/views/renderers/VERendererFactory","dojo/_base/declare dojo/_base/lang dojo/on dojo/touch dijit/registry variableeditor/views/renderers/_VERendererMixin variableeditor/views/editors/_VEEditorConverterMixin mw-log/Log require datatoolsservices/DataToolsUtils".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return g("variableeditor.views.renderers.VERendererFactory",[],{table:{},type:"cellrennderer",constructor:function(a){this.table=a;this.type=a.RendererName;this.dragImageUrl=k.toUrl("../../images/ico_drag_workspace.png");this._imageNode=this.preloadDragImage()},create:function(h,b,d){var k;k=document.createElement("input");if(b&&1<=b.length&&"{"===b.charAt(0)){var e=JSON.parse(b),f=this.getCellIndices(e),l=f.row,u=f.column,v=this;this.createRendererObject(e,"renderer",
{node:k,column:h,renderedObject:e,table:v.table},v.table,function(h){var f=h.declaredClass;h._setupEventListeners(v.table);h.isInstanceOf(a)||g.safeMixin(h,new a);h.isInstanceOf(c)||g.safeMixin(h,new c);h.declaredClass=f;k=h.domNode;h._setRendererProperties(e,v.table,"server");h.domNode.setAttribute("data-tag",h.createDataTag("CellRenderer","cell"));h._setupDOMRowCol(h.getCellIndices(e));d&&"function"===typeof d&&d(k);v.updateCellDraggability(l,u,k,b,h)})}else k.value=b;return k},startup:function(a){a&&
(a.nodeName&&"input"===a.nodeName.toLowerCase())&&(a.value=a.value);b.getEnclosingWidget(a).startup()},getCellIndices:function(a){var c=-1,h=-1;a&&void 0!==a.row&&(c=parseInt(a.row));a&&void 0!==a.col&&(h=parseInt(a.col));return{row:c,column:h}},createRendererObject:function(a,c,b,d,e){var f=null,l=this.getCellIndices(a);d=l.row;l=l.column;try{var g=this.table.getCellPropertyValue(d,l,c,a);if(g)k([g],function(a){f=new a(b);e&&"function"===typeof e&&e(f)});else return null}catch(v){h.error(v)}return f},
update:function(a,c,h,d){var k=null;if(h&&1<=h.length&&"{"===h.charAt(0)){k=JSON.parse(h);if(k.isInvalidCache)return;var e=this.getCellIndices(k),f=e.row,e=e.column;a=b.getEnclosingWidget(a);var l="";a&&(l=a.declaredClass);f=this.table.getCellPropertyValue(f,e,"renderer",k);this.comparePathToDeclaredClass(f,l)?(a._setRendererProperties(k,this.table,"server"),a._setupDOMRowCol(a.getCellIndices(k)),k=a.domNode,d&&"function"===typeof d&&d(k)):(k=this.create(c,h,d),a&&a.destroy())}else a&&(a.value=h,
k=a);return k},updateCellDraggability:function(a,c,h,b,d){h||(h=this.domNode);b||(b=this.renderedObject);this.table&&this.table.useDojoDnD?this.updateDojoDraggability(a,c,h,b):this.updateDefaultCellDraggability(a,c,h,b,d)},updateDojoDraggability:function(a,c,h,b){if(this.table&&this.table.isCellDraggable){var k=this;this.table.isCellDraggable(a,c,b)&&(e(h,d.press,function(a){k.redispatchMouseEvent(a,"mousedown")}),e(h,d.release,function(a){k.redispatchMouseEvent(a,"mouseup");k.table&&k.table.dataScrollerNode&&
k.table._onMouseDragUp(a)}),l.addToClassList(h,"dojoDndItem"),b&&(1<=b.length&&"{"===b.charAt(0))&&(b=JSON.parse(b)),b.value&&(h.setAttribute("dndData",b.value),h.setAttribute("dndType","text")))}},redispatchMouseEvent:function(a,c){var h=dijit.registry.byNode(a.currentTarget);a.renderer=h;h.dispatchEvent(c,h,a)},updateDefaultCellDraggability:function(a,c,h,b,d){if(this.table&&this.table.isCellDraggable&&(a=this.table.isCellDraggable(a,c,b),h.draggable=a))d.dragStartListener||(d.dragStartListener=
e(h,"dragstart",f.hitch(this,"onDragStart")),d.dragOverListener=e(h,"dragover",f.hitch(this,"onDragOver")),d.dropListener=e(h,"drop",f.hitch(this,"onDrop"))),this.dragImage=this._imageNode},preloadDragImage:function(){var a=document.createElement("img");a.src=this.dragImageUrl;return a},onDragOver:function(a){a.preventDefault&&a.preventDefault();a.dataTransfer.dropEffect="copy";return!1},onDragStart:function(a){if(this.table&&this.table.getSelectedFields){var c=this.table.getSelectedFields();a.dataTransfer.setData("text/plain",
c);a.dataTransfer.setData("text/workspacebrowser",c);if(a.dataTransfer.setDragImage){var h=this.dragImage;h.setAttribute("alt",c);a.dataTransfer.setDragImage(h,0,0)}a.target.style.cursor="move";a.dataTransfer.effectAllowed="copyMove"}return!1},onDrop:function(a){a.preventDefault&&a.preventDefault();return!1},clearCache:function(a,c,h){if(h&&1<=h.length&&"{"===h.charAt(0)){var d=JSON.parse(h),k=b.getEnclosingWidget(a),e={};k&&(e={veInplaceEditor:k.veInplaceEditor,veEditor:k.veEditor});(d=this.createRendererObject(d,
"renderer",{node:a,column:c,renderedObject:d,table:this.table},this.table,function(b){b&&b.clearCache&&b.clearCache(a,c,h);f.mixin(b,e)}))&&d.clearCache&&d.clearCache(a,c,h)}},getCellValue:function(a){a=b.getEnclosingWidget(a);return a.getValue?a.getValue():null},comparePathToDeclaredClass:function(a,c){var h=a.split("/"),b=c.split("."),d=!0;if(h.length===b.length)for(var k=0;k<h.length&&d;k+=1)d=h[k]===b[k];else d=!1;return d}})})},"variableeditor/views/editors/_VEEditorConverterMixin":function(){define("variableeditor/views/editors/_VEEditorConverterMixin",
["dojo/_base/declare","dojo/_base/lang"],function(g,f){return g("variableeditor.views.editors._VEEditorConverterMixin",[],{_converter:null,setEditorConverter:function(e){null!==e&&void 0!==e&&(this._converter=f.hitch(this,e))},convert:function(e){var d=e;null!==this._converter&&(d=this._converter(e));return d},addSingleQuotesConverter:function(e){return"'"+e+"'"},datetimeConverter:function(e){var d=e;if(void 0===e||null===e||""===e)d="NaT";return this.addSingleQuotesConverter(d)}})})},"variableeditor/views/CharArrayView":function(){define("variableeditor/views/CharArrayView",
["dojo/_base/declare","variableeditor/views/ClientArrayView","variableeditor/views/table/ArrayTable"],function(g,f,e){return g("variableeditor.views.CharArrayView",[f],{constructor:function(d){this.table={}},createTable:function(d){return new e(d)}})})},"variableeditor/views/StringArrayView":function(){define("variableeditor/views/StringArrayView",["dojo/_base/declare","variableeditor/views/ClientArrayView","variableeditor/views/table/ArrayTable"],function(g,f,e){return g("variableeditor.views.StringArrayView",
[f],{constructor:function(){this.table={}},createTable:function(d){return new e(d)}})})},"variableeditor/views/StructureArrayView":function(){define("variableeditor/views/StructureArrayView",["dojo/_base/declare","dojo/_base/lang","variableeditor/views/ClientArrayView","variableeditor/views/table/StructureTable"],function(g,f,e,d){return g("variableeditor.views.StructureArrayView",[e],{createTable:function(b){b.sortAscending=this.peerNode.getProperty("SortAscending");b.sortableColumn=this.peerNode.getProperty("SortableColumn");
b.clientSortHandler=f.hitch(this,function(a){this.peerNode.setProperty("SortAscending",{SortAscending:a,source:"client"})});var a=new d(b);this.peerNode.addEventListener("propertySet",function(c){"SortAscending"===c.data.key&&"server"===c.data.newValue.source&&a._swapSortIcon(null,c.data.newValue.SortAscending)},this.peerNode);return a},initArgs:function(b){f.mixin(this.allArgs,b);this.table.initArgs(b)},getSelectedFields:function(){if(this.table&&this.table.getSelectedFields)return this.table.getSelectedFields()}})})},
"variableeditor/views/table/StructureTable":function(){define("variableeditor/views/table/StructureTable","dojo/_base/declare dojo/_base/lang dojo/on dojo/dom-class dojo/dom-construct dojo/query dojo/dom-geometry dijit/focus dijit/registry dojo/domReady! datatoolsservices/TestingHooksUtils datatoolsservices/TestingPropConstants variableeditor/views/table/ArrayTable variableeditor/views/table/HeaderContextMenu variableeditor/VariableEditorUtils datatoolsservices/DataToolsUtils variableeditor/views/renderers/_TemplateMixin variableeditor/views/table/_VEColumnHeaders variableeditor/views/accessibility/KeyboardAccessibilityMixin dojo/i18n!variableeditor/app/l10n/nls/app".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w){return g("variableeditor.views.table.StructureTable",[n,t,u,v],{_ascending:!0,_clientSortHandler:null,_sortableColumnLabel:null,_fixedColumnWidths:!0,_lastSortTime:new Date,_contextMenu:null,cellColor:"rgb(166, 220, 255);",defaultProperties:{renderer:{type:"default"},rowHeight:22,dataModel:null,visibility:!0},rowHeight:22,initColumnWidthSet:!1,NAME_COLUMN:"Name",FIELD_COLUMN:"Field",PROPERTY_COLUMN:"Property",VALUE_COLUMN:"Value",SIZE_COLUMN:"Size",
CLASS_COLUMN:"Class",Width_Adjustment:20,_SORT_HEADER_CLASS:"sortableColumn",_SORT_ICON_CLASSES:["sortable","sortIcon","sortUp"],constructor:function(a){this.defaultProperties.showCellBorders=!1;this._setDefaultLeadCellStyle();a.sortAscending&&a.sortAscending.hasOwnProperty("SortAscending")?this._ascending=a.sortAscending.SortAscending:this._ascending=!0;this._sortableColumnLabel=a.sortableColumn;this._clientSortHandler=a.clientSortHandler;this._fixedColumnWidths=void 0===a.fixedColumnWidths?!0:a.fixedColumnWidths;
this.showSelectionBorder=this.sendSelectionRanges=!1;this.rowHeight=22;this.selectedCellStyle="background-color: "+this.cellColor+"z-index:5;";this.debounceResize=s.createDebounceFn(this,[this._updateWidthOnResize],500)},postCreate:function(){this.blockSelection&&this.blockSelection.setIndexedRows(!0);this.inherited(arguments);this._updateTableHeaders();d.add(this.domNode,"StructureTable")},initArgs:function(){this.inherited(arguments)},_updateHeaderStyle:function(){},_getLabelProperties:function(){var a=
{},c=this.getTableModelProperty("ColumnHeaderList"),h=this.getTableModelProperty("ColumnHeaderListPropertyName");if(!c||!h||c.length!==h.length)return a;a.labels=[];for(var b=0;b<c.length;b++){var d=c[b],k=h[b],e,f;k===this.NAME_COLUMN||k===this.FIELD_COLUMN||k===this.PROPERTY_COLUMN?f=e=!0:(e=s.getLogicalValue(this.getTableModelProperty(h[b]),!0),f=!1);a.labels.push({label:d,checked:e,disabled:f,propertyName:k})}m.getInstance().setPropertyVal(p.HEADER_CONTEXTMENU_LABELS_SET,!0);return a},_attachListeners:function(a){a.addEventListener("headerSelectionChanged",
f.hitch(this,"_headerMenuSelectionChanged"));a.addEventListener("headerMenuShown",f.hitch(this,"_updateHeaderMenuState"))},nodesUpdated:function(){if(this.cachedFocusedNode){this.updateFocus(this.cachedFocusedNode);var a=this.getNodeToBeFocused(this.cachedFocusedNode);a[0]&&a[0].getElementsByTagName("input")[0].focus();this.clearFocusCache()}},_createContextMenu:function(a){var c="#"+this.domNode.getAttribute("id")+" .columnHeaderScrollerNode";a=new q({targetNodes:[c],labelProperties:a});a.domNode.setAttribute("data-tag",
s.concatenateDataTagStrings("datatools","variableeditor","contextMenu"));return a},_setupColumnSelectionContextMenu:function(){var a=this._getLabelProperties();try{this.contextMenu=this._createContextMenu(a.labels),this.contextMenu.startup(),this._attachListeners(this.contextMenu),m.getInstance().setPropertyVal(p.HEADER_CONTEXTMENU_INITIALIZED,!0)}catch(c){r.logDebug(c)}},_updateHeaderMenuState:function(a){var c=this._getLabelProperties(),c=c.labels;this.contextMenu.hasSubMenuItems()||this.contextMenu.createSubMenuItems(c);
for(var h=0;h<c.length;h++){var b=c[h];a.target.setLabelState(b.label,b.checked)}},_headerMenuSelectionChanged:function(a){this._toggleHeaderColumn(a.data.text);var c=this.blockSelection;!c.isEmpty()&&(a.data.checked&&c.selectedColumns&&c.selectedColumns[0]&&c.selectedColumns[0].end<=this.getColumnCount()-1)&&(c.selectedColumns[0].end+=1,this.blockSelection=c,this._renderSelection())},_getColumnHeaderPropertyName:function(a){for(var c=this._getLabelProperties(),h=0;h<c.labels.length;h++)if(c.labels[h].label===
a)return c.labels[h].propertyName},_toggleHeaderColumn:function(a){a=this._getColumnHeaderPropertyName(a);"undefined"!=typeof a&&(s.getLogicalValue(this.getTableModelProperty(a),!0)?this.peerViewModel.setTableModelProperty(a,!1):this.peerViewModel.setTableModelProperty(a,!0))},_onDataModelSet:function(){this.inherited(arguments);this.updateModelProperties(!0);this._addDataValueTags()},startup:function(){this.inherited(arguments);this._setupColumnSelectionContextMenu();this._attachDndListeners()},
_attachDndListeners:function(){this.dragEnterListener=e(this.domNode,"dragenter",f.hitch(this,this._onDragEnter));this.dragOverListener=e(this.domNode,"dragover",f.hitch(this,this._onDragOver));this.dragLeaveListener=e(this.domNode,"dragleave",f.hitch(this,this._onDragLeave));this.dropListener=e(this.domNode,"drop",f.hitch(this,this._onDrop))},_onDragEnter:function(a){return!1},_onDragOver:function(a){return!1},_onDragLeave:function(a){return!1},_onDrop:function(a){return!1},_onKeyDown:function(a){65===
a.keyCode&&a.ctrlKey&&a.preventDefault()},_setInitialColumnSize:function(){var h=f.clone(this.columns),b=a("\x3ediv.cell:not(.spacer)",this.columnHeaderNode),d=c.position(this.container.domNode),k=d.w/h.length,d=d.w/this.Width_Adjustment,e;for(e=0;e<b.length;e+=1){var l=c.position(b[e]);h[e].width=this._fixedColumnWidths?l.w:k;if(!this._fixedColumnWidths){if(0===e||1===e)h[e].width+=d;if(2===e||3===e)h[e].width-=d}this.setColumnModelProperty(e,"ColumnWidth",h[e].width);this._setColumnWidthOnTable(e,
h[e].width);this.initColumnWidthSet=!0}},resize:function(){if(!this._noAutoSizing){var a=c.position(this.domNode);this.position={width:a.w,height:a.h};this.debounceResize()}this.inherited(arguments)},_updateWidthOnResize:function(){if(this._isColumnWidthInitial()){this.totalColumnWidth=this.position.width;for(var a=this.totalColumnWidth/this.columns.length,c=this.totalColumnWidth/this.Width_Adjustment,h=a+c,a=a-c,c=0;c<this.columns.length;c++){if(0===c||1===c)this.columns[c].width=h,this._setColumnWidthOnTable(c,
h);if(2===c||3===c)this.columns[c].width=a,this._setColumnWidthOnTable(c,a)}}},_onColumnsSet:function(){this._updateColumnHeaderNames();this.totalColumnWidth=0;var a,c=this.ColumnModelProperties.length;for(a=0;a<c;a+=1)if(this.columns[a]){var h=this._getColumnWidthOnTable?this._getColumnWidthOnTable(a):null,h=h?h:this.getColumnModelProperty(a,"ColumnWidth"),b=parseInt(h,10);null!==h&&void 0!==h&&0<=b?(this.totalColumnWidth+=b,this.columns[a].width||(this.columns[a].width=b)):(this.totalColumnWidth+=
this.defaultColumnWidth,this.columns[a].width=this.defaultColumnWidth)}this._renderViewData(!0)},_setColumnWidthOnTable:function(a,c){var h=this._getHeaderNameWithIndex(a);null!=h&&this.setTableModelProperty(h+"ColumnWidth",c)},_getColumnWidthOnTable:function(a){a=this._getHeaderNameWithIndex(a)+"ColumnWidth";return this.getTableModelProperty(a)},getSelectedFields:function(){return this.getTableModelProperty("SelectedFields")},getDndItemSelector:function(){return".dataBody div.row:not(.spacer)"},
getDndHandleSelector:function(){return[".structNameColumn",".structSizeColumn",".structClassColumn"]},_renderViewData:function(a){var h=this;this._throttledRender(a,function(){!h.initColumnWidthSet&&(h.container&&0<c.position(h.container.domNode).w)&&(h._setInitialColumnSize(),m.getInstance().setPropertyVal(p.STRUCT_RENDERED,!0));h._attachDndHandles();h._addDataValueTags()})},_getStructNameColumnWidget:function(a){return k.getEnclosingWidget(a)},_addDataValueTags:function(){if(this.domNode){var a=
this.domNode.querySelectorAll('[class\x3d"row"]'),c=this.getDndHandleSelector();if((c=this.domNode.querySelectorAll(c[0]))&&a)for(var h=0;h<c.length;h+=1){var b=this._getStructNameColumnWidget(c[h]);if(b&&b.getValue&&(b=b.getValue())&&a[h])a[h].dataset.structVarName=b}}},_getColumnTag:function(a){switch(a){case w.structNameColumn:a="Name";break;case w.structFieldColumn:a="Field";break;case w.structValueColumn:a="Value";break;case w.structSizeColumn:a="Size";break;case w.structClassColumn:a="Class"}return a},
_getColumnDataTag:function(a){a=a.label;return a=this._getColumnTag(a)},_renderSelection:function(){var a=this.blockSelection.selectedRows,c="",h=this.getDndHandleSelector()[0];if(!this.blockSelection.isEmpty()&&null!==this.dataModel){for(var b=0;b<a.length;b+=1){Math.max(1,a[b].start+this.tableRowOffset-this.rowView.start);Math.max(1,a[b].end+this.tableRowOffset-this.rowView.start);this.getDndHandleSelector();for(var d=a[b].start;d<=a[b].end;d++){var e=this.domNode.getElementsByClassName(h.substring(1,
h.length)+" row_"+d);e&&e[0]&&(e=k.getEnclosingWidget(e[0]))&&(c=c+e._value+",")}}c=c.slice(0,-1);c.split(",").length===this.blockSelection.getRowCount()&&this.setTableModelProperty("SelectedFields",c);this._setDefaultLeadCellStyle();a=this.blockSelection.getFirstCellFromLastRow();this._setLeadCellPosition(a[0],a[1])}this.inherited(arguments)},_flipSelection:function(a){"dataModel"===a.data.key?(this.peerNode.removeEventListener("propertySet",this._flipSelection,this),this.blockSelection.flipRowCount(this.getRowCount()),
this._renderSelection()):"Selection"===a.data.key&&this.peerNode.removeEventListener("propertySet",this._flipSelection,this)},_sort:function(a,c){this._ascending!==c&&(this._swapSortIcon(a,c),2<=this.getRowCount()&&this.peerNode.addEventListener("propertySet",this._flipSelection,this),this._clientSortHandler(this._ascending))},_updateSortIcon:function(a){this._ascending?(d.remove(a,"sortDown"),d.add(a,"sortUp")):(d.remove(a,"sortUp"),d.add(a,"sortDown"))},_swapSortIcon:function(a,c){this._ascending!==
c&&(this._ascending=c,a||(a=this._getSortIconNode()),d.contains(a,"sortableColumn")&&(a=a.getElementsByClassName("sortIcon")[0]),this._updateSortIcon(a))},_getSortIconNode:function(){return this._getSortColumnTextDOMNode(this.domNode)},_toggleSort:function(a){1===a.data.which&&(a.target&&a.target.domNode)&&(a=a.target.domNode,this._isDragNode(a)||this._sort(a,!this._ascending))},_isDragNode:function(a){return d.contains(a,"drag")||d.contains(a,"firstHalfOfDrag")||d.contains(a,"dragBorder")||d.contains(a,
"secondHalfOfDrag")},_updateSortableNode:function(a){a=k.getEnclosingWidget(a);d.add(this.columnHeaderScrollerNode,"contextMenuContainer");if(a._inputBoxLabel._value===this.sortableColumn){a=a._getAttachNode(a.HEADER_LABEL_ATTACH_POINT).querySelectorAll(".NonEditableHeader")[0];var c=a.getElementsByClassName("sortIcon"),h=this.getEnclosingHeaderWidget(a);if(0<c.length)c=c[0];else{var c=b.create("div",null,a,"last"),e=h._inputBox.value.toUpperCase(),e=s.getComputedColumnHeaderWidth(e,"9px Helvetica, Helvetica, sans-serif")+
8+"px";d.add(a,this._SORT_HEADER_CLASS);d.add(c,this._SORT_ICON_CLASSES);h.domNode.setAttribute("data-tag",r.createDataTag("sortableColumn"));h._inputBox.domNode.style.maxWidth=e}!this.hasOwnProperty("sortListener")&&!h._listeners.mousedown&&h.addEventListener("mousedown",f.hitch(this,"_toggleSort"));this._updateSortIcon(c)}},_createColumnNode:function(a){var c=this.inherited(arguments);this._updateSortableNode(c);return c},_updateColumnNode:function(a,c){this.inherited(arguments);this._updateSortableNode(a)},
_getSortColumnTextDOMNode:function(a){a=k.getEnclosingWidget(a);a=a._getAttachNode(a.HEADER_LABEL_ATTACH_POINT).querySelectorAll(".sortable.sortIcon");var c;for(c=0;c<a.length;c+=1){var h=k.getEnclosingWidget(a[c]);if(this._sortableColumnLabel===h._value)return a[c]}},onEditingStarted:function(){this.leadCellStyle="background-color: rgb(255, 255, 255);opacity: 1.0;";this._updateSelectionAndSelectionBorderStyle();this._updateLeadCellStyle()},onEditingStopped:function(){this.showSelectionBorder=!1;
this._setDefaultLeadCellStyle();this._updateLeadCellStyle();this._updateSelectionAndSelectionBorderStyle()},_updateBlockSelection:function(a,c,h,b){return h=this._updateRowSelection(a,h,b)},onMouseEnter:function(a){},_onColumnMouseDown:function(a){a.preventDefault()},selectColumn:function(){},deselectColumn:function(){},_onHeaderColumnMouseDown:function(a){a.preventDefault()},_onMouseMove:function(){this.focused||this.domNode.focus();this.cellsDragged=!0},handlePropertySet:function(a){this.inherited(arguments);
"dataModel"===a.data.key&&(this.leadCellStyle={},this._updateLeadCellStyle())},_setDefaultLeadCellStyle:function(){this.leadCellStyle="background-color: "+this.cellColor+"opacity: 1.0;"},_updateDataStyles:function(){this._fixedColumnWidths?this.inherited(arguments):this.dataModel&&(this.rowHeight&&this.position)&&(this._updateScrollerStyles(),this.styleManager.updateStyleRules("spacerLeft",{".row .spacer.leftSpacer":"width: "+this.leftSpaceWidth+"px;"}),this.styleManager.updateStyleRules("dataWidth",
{".spacer.dataWidth":"width: 100%;"}),this._updateColumnStyles())},_updateColumnStyles:function(){if(this._fixedColumnWidths)this.inherited(arguments);else{this.styleManager.updateStyleRules("spacerTop",{".body .spacer.topSpacer":"height: "+this.rowView.start*this.rowHeight+"px;"});this.styleManager.updateStyleRules("dataHeight",{".spacer.dataHeight":"height: "+this.dataModel.getRowCount()*this.rowHeight+"px;",".row":"height: "+this.rowHeight+"px;"});var a=this.totalColumnWidth;this.container&&(this.container.containerNode&&
this.container.containerNode.getBoundingClientRect())&&(a=this.container.containerNode.getBoundingClientRect().width);var c=this.columns.slice(this.colView.start,this.colView.end),h=this._isColumnWidthInitial(),b,d={},k,e=a;for(b=0;b<c.length;b+=1){k=this._getCellType(c[b]);k=this._getColumnStyles(k);if(c[b]&&c[b].width&&!h)b<c.length-1?(k+="width: "+c[b].width+"px;",e-=c[b].width):k+="width: "+e+"px;";else{if(0===b||1===b)k+="width: "+Math.floor(100/c.length+100/this.Width_Adjustment)+"%;";if(2===
b||3===b)k+="width: "+Math.floor(100/c.length-100/this.Width_Adjustment)+"%;"}d[".dataColumn .cell:nth-child("+(b+2)+")"]=k}h||this.styleManager.updateStyleRules("dataWidth",{".spacer.dataWidth":"width: "+a+"px;"});this.styleManager.updateStyleRules("columns",d)}},_isColumnWidthInitial:function(){var a=!0;if(this._fixedColumnWidths)a=!1;else for(var c=0;c<this.columns.length;c+=1)if(this.getColumnModelProperty(c,"ColumnResized")){a=!1;break}return a},_createCustomColumnHeader:function(a,c,h){node=
this.inherited(arguments);columnModelProperties=this.ColumnModelProperties;for(var b=0;b<columnModelProperties.length;b++)columnModelProperties[b].HeaderName&&columnModelProperties[b].classList&&h==columnModelProperties[b].HeaderName&&d.add(node,columnModelProperties[b].classList);return node},_getHeaderNameWithIndex:function(a){return 0===a?this.NAME_COLUMN:a===this._getValueColumnIndex()?this.VALUE_COLUMN:a===this._getSizeColumnIndex()?this.SIZE_COLUMN:a===this._getClassColumnIndex()?this.CLASS_COLUMN:
null},_getValueColumnIndex:function(){return!this.getTableModelProperty("ShowValueColumn")?-1:1},_getSizeColumnIndex:function(){return!this.getTableModelProperty("ShowSizeColumn")?-1:this.getTableModelProperty("ShowValueColumn")?2:1},_getClassColumnIndex:function(){if(!this.getTableModelProperty("ShowClassColumn"))return-1;var a=this.getTableModelProperty("ShowValueColumn"),c=this.getTableModelProperty("ShowSizeColumn");return a&&c?3:a||c?2:1}})})},"datatoolsservices/TestingHooksUtils":function(){define("datatoolsservices/TestingHooksUtils",
["dojo/_base/declare","mw-peermodel/PeerModelManager","mw-peermodel/_PeerModelListenerMixin","datatoolsservices/TestingPropConstants"],function(g,f,e,d){var b=[],a=g("datatoolsservices.TestingHooksUtils",[e],{constructor:function(a){this.namespace=a&&a.namespace?a.namespace:"/TestingHooks";this.manager=null;this.manager=f.getClientInstance(this.namespace);this.addManagerListeners(this.manager);this._initTestingHooks=!1;this.start(this._peerModelManager);this._propRequests=[];this._init()},_init:function(){var a=
this;this.manager.addEventListener("rootSet",function(h){if((h=h.target)&&h.hasProperty(d.TESTING_INITIALIZED))a._initTestingHooks=h.getProperty(d.TESTING_INITIALIZED),0<a._propRequests.length&&a._dequeuePropSetRequests()})},createRoot:function(a,h){this.hasRoot()||this.manager.setRoot(a,h)},getRoot:function(){return this.manager.getRoot()},hasRoot:function(){return this.manager.hasRoot()},setPropertyVal:function(a,h){this.manager&&this.hasRoot()&&this._initTestingHooks&&h?this.getRoot().setProperty(a,
h):this._queuePropSetRequests({prop:a,val:h})},_queuePropSetRequests:function(a){this._propRequests&&this._propRequests.push(a)},_dequeuePropSetRequests:function(){this._propRequests.forEach(function(a){this.setPropertyVal(a.prop,a.val)},this);this._propRequests=[]},getPropertyVal:function(a){if(this.manager.hasRoot()){var h=this.getRoot();if(h.hasProperty(a))return h.getProperty(a)}return null},resetProperties:function(){if(this.hasRoot()){var a=this.getRoot(),h=a.getProperties(),b;for(b in h)a.unsetProperty(b)}},
cleanup:function(){f.cleanup(this.namespace)}});a.getInstance=function(c){var h=c&&c.namespace?c.namespace:"/TestingHooks";b[h]||(b[h]=new a(c));return b[h]};return{getInstance:a.getInstance}})},"datatoolsservices/TestingPropConstants":function(){define([],function(){return{TESTING_INITIALIZED:"InitTestingHooks",HEADER_CONTEXTMENU_LABELS_SET:"HeaderContextMenuLabelsSet",STRUCT_RENDERED:"StructRendererd",HEADER_CONTEXTMENU_INITIALIZED:"HeaderContextMenusInitialized"}})},"variableeditor/views/table/HeaderContextMenu":function(){define("variableeditor/views/table/HeaderContextMenu",
"dojo/_base/declare dojo/_base/lang dojo/dom-class dojo/on mw-menu/ContextMenu mw-menu/CheckBoxMenuItem mw-peermodel/Observable dojo/domReady! datatoolsservices/DataToolsUtils".split(" "),function(g,f,e,d,b,a,c,h,k){return g("variableeditor.views.table.HeaderContextMenu",[b,c.Impl],{_labelProperties:void 0,_menuHash:{},VALUE_COLUMNTAG:"Value",SIZE_COLUMNTAG:"Size",CLASS_COLUMNTAG:"Class",VALUECOLUMN_PROPERTYNAME:"ShowValueColumn",SIZECOLUMN_PROPERTYNAME:"ShowSizeColumn",CLASSCOLUMN_PROPERTYNAME:"ShowClassColumn",
constructor:function(a){this._labelProperties=a&&a.labelProperties?a.labelProperties:[];this.targetNodes=a.targetNodes;this.willOpenCallback=a.willOpenCallback?a.willOpenCallback:f.hitch(this,"_openCallback")},_openCallback:function(){this.dispatchEvent("headerMenuShown",this)},postCreate:function(){this.inherited(arguments);this.createSubMenuItems(this._labelProperties)},createSubMenuItems:function(a){a&&0<a.length&&this._addSubMenuItems(a)},hasSubMenuItems:function(){return 0<Object.keys(this._menuHash).length},
_addCheckedMenuItem:function(c,h,b){h=new a({text:c,checked:h,closeMenuOnClick:!0});h.on("change",f.hitch(this,"_dispatchHeaderColumnSet"));h.domNode.setAttribute("data-tag",k.concatenateDataTagStrings("datatools","variableeditor","regularContextMenuItem",b));this.addChild(h);this._menuHash[c]=h},_addDisabledCheckedMenuItem:function(c,h){var b=new a({text:c,checked:!0,disabled:!0,closeMenuOnClick:!0});b.domNode.setAttribute("data-tag",k.concatenateDataTagStrings("datatools","variableeditor","defaultContextMenuItem",
h));this.addChild(b);e.add(b.domNode,"disabledContextMenu")},_addSubMenuItems:function(a){for(var c=0;c<a.length;c++){var h=a[c],b=h.label,d=h.checked,e=h.disabled,h=h.propertyName;k.compareValues(h,this.VALUECOLUMN_PROPERTYNAME)?h=this.VALUE_COLUMNTAG:k.compareValues(h,this.SIZECOLUMN_PROPERTYNAME)?h=this.SIZE_COLUMNTAG:k.compareValues(h,this.CLASSCOLUMN_PROPERTYNAME)&&(h=this.CLASS_COLUMNTAG);e?this._addDisabledCheckedMenuItem(b,h):this._addCheckedMenuItem(b,d,h)}},setLabelState:function(a,c){this._menuHash.hasOwnProperty(a)&&
this._menuHash[a].set("checked",c)},_dispatchHeaderColumnSet:function(a){var c=dijit.getEnclosingWidget(a.target);this.dispatchEvent("headerSelectionChanged",this,{target:a.target,text:c.text,checked:c.checked})}})})},"variableeditor/views/table/_VEColumnHeaders":function(){define("variableeditor/views/table/_VEColumnHeaders","dojo/_base/declare dojo/_base/lang dojo/string dojo/dom-class dojo/on dijit/registry variableeditor/views/table/_VETableHeaders datatoolsservices/DataToolsUtils dojo/i18n!variableeditor/app/l10n/nls/app mw-messageservice/MessageService dojo/text!variableeditor/views/table/VariableEditorColumnHeader.html variableeditor/views/table/_HeadersBase".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p){return g([c],{ms:l.messageService,CHANNEL_DuplicateColumnHeader:"ErrorDuplicateColumnHeader",subscriptionCallback:null,subscription:null,pauseValueChangedListener:!1,COLUMN_HEADER_CHANNEL:"/VEColumnHeaderName",_createColumnNode:function(a){var c=new p({templateString:m,editable:h.getLogicalValue(this.getTableModelProperty("EditableColumnHeaderLabels"),!1),showLabels:h.getLogicalValue(this.getTableModelProperty("ShowColumnHeaderLabels"),!0),showIndices:h.getLogicalValue(this.getTableModelProperty("ShowColumnHeaderNumbers"),
!0)||h.getLogicalValue(this.getTableModelProperty("ShowCustomColumnHeaderNumbers"),!1),labelValue:void 0!==a.label?a.label:void 0===this.getColumnModelProperty(parseInt(a.labelIndex)-1,"HeaderName")?"":this.getColumnModelProperty(parseInt(a.labelIndex)-1,"HeaderName"),indexValue:a.labelIndex});a.icon&&this.getTableModelProperty("ShowHeaderIcons")&&this._addHeaderIconCSS(a.icon,c._inputBoxLabel.domNode);c.setNodeDisplay(c.HEADER_INDEX_ATTACH_POINT,c.showIndices);c.setNodeDisplay(c.HEADER_LABEL_ATTACH_POINT,
c.showLabels);c._inputBoxLabel.isEditable()&&this._attachColumnHeaderListeners(c);c.startup();return c.domNode},_attachColumnHeaderListeners:function(a){var c=this;a._inputBoxLabel.addEventListener("valueChanged",f.hitch(c,"_columnValueChanged",a));a._inputBoxLabel.addEventListener("mousedown",f.hitch(c,"_columnMouseDown"));a._inputBoxLabel.addEventListener("mouseup",f.hitch(c,"_columnMouseUp"));a._inputBoxLabel.addEventListener("click",f.hitch(c,"_columnMouseClick"));a._inputBoxLabel.addEventListener("mousemove",
f.hitch(c,"_columnMouseMove",a._inputBoxLabel));a._inputBoxLabel.addEventListener("editingStarted",f.hitch(c,"_columnEditingStarted"));a._inputBoxLabel.addEventListener("editingStopped",f.hitch(c,"_columnEditingStopped"));this.own(b(a._inputBoxLabel._renderer.domNode,"keydown",f.hitch(c,function(h){!a._inputBoxLabel.isEditing()&&13!==h.keyCode&&c._onTableHeaderKeyDown(h)})))},_removeColumnHeaderListeners:function(a){},_updateColumnNode:function(c,h){var b=a.getEnclosingWidget(c);d.replace(c,"header_"+
h.labelIndex,"header_"+b.indexValue);this._updateColumnNumber(b,h);this._updateColumnLabel(b,h);h.icon&&this.getTableModelProperty("ShowHeaderIcons")&&this._addHeaderIconCSS(h.icon,b._inputBoxLabel.domNode);b=this._getColumnDataTag(h);c.dataset.columnHeaderName=b},_updateColumnNumber:function(a,c){c.labelIndex&&(h.getLogicalValue(this.getTableModelProperty("ShowColumnHeaderNumbers"),!0)||h.getLogicalValue(this.getTableModelProperty("ShowCustomColumnHeaderNumbers"),!1))?(a.setIndexProperty(parseInt(c.labelIndex)-
1),this.pauseValueChangedListener=!0,a.setIndexValue(c.labelIndex),a.setNodeDisplay(a.HEADER_INDEX_ATTACH_POINT,!0),this.pauseValueChangedListener=!1,c.label&&h.getLogicalValue(this.getTableModelProperty("ShowColumnHeaderLabels"),!0)?a.setNodeDisplay(a.HEADER_BREAK_ATTACH_POINT,!0):a.setNodeDisplay(a.HEADER_BREAK_ATTACH_POINT,!1)):(a.setNodeDisplay(a.HEADER_INDEX_ATTACH_POINT,!1),a.setNodeDisplay(a.HEADER_BREAK_ATTACH_POINT,!1))},_updateColumnLabel:function(a,c){c.label&&h.getLogicalValue(this.getTableModelProperty("ShowColumnHeaderLabels"),
!0)?(this._updateHeaderEditablity(a),this.pauseValueChangedListener=!0,a.setLabelValue(c.label),a.setNodeDisplay(a.HEADER_LABEL_ATTACH_POINT,!0),this.pauseValueChangedListener=!1):(a.setNodeDisplay(a.HEADER_LABEL_ATTACH_POINT,!1),a.setNodeDisplay(a.HEADER_BREAK_ATTACH_POINT,!1))},_updateHeaderEditablity:function(a){a._inputBoxLabel.isEditable()!==h.getLogicalValue(this.getTableModelProperty("EditableColumnHeaderLabels"),!1)&&(a._setEditable(a._inputBoxLabel,h.getLogicalValue(this.getTableModelProperty("EditableColumnHeaderLabels"),
!1)),a._inputBoxLabel.isEditable()?this._attachColumnHeaderListeners(a):this._removeColumnHeaderListeners(a))},_getColumnDataTag:function(a){return a.label},_columnValueChanged:function(a,c){!0!==this.pauseValueChangedListener&&this._isValidColumnHeaderName(a,c.data.newValue)&&this.setColumnModelProperty(a._inputBoxLabel.index,"HeaderName",c.data.newValue)},_handleColumnHeaderError:function(c,h){var b=a.getEnclosingWidget(c.domNode.parentElement);this.setColumnModelProperty(c.index,"HeaderName",c._originalValue);
b&&b._handleError(h)},_isValidHeaderSyntax:function(a){return/^[a-zA-Z][a-zA-Z0-9_]*$/.test(a)},_isValidColumnHeaderName:function(a,c){var b=a._inputBoxLabel;if(a._isValidHeaderName(c)&&64>=c.length&&this._isValidHeaderSyntax(c))return!0;b.cancelEditing(b);h.displayErrorMessage(e.substitute(k.invalidHeaderName,{varName:"'"+c+"'"}));return!1},_columnMouseDown:function(a){this._onColumnMouseDown(a.data);this._onHeaderColumnMouseDown(a.data,!1)},_columnMouseUp:function(a){this._onHeaderColumnMouseUp(a.data);
this._onWindowMouseUp(a.data,!1);void 0!==this._resizingColumn&&this._onColumnMouseUp(a.data);a.data.stopPropagation()},_columnMouseClick:function(a){this._onHeaderClick(a.data);a.data.stopPropagation()},_columnMouseMove:function(a,c){void 0!==this._resizingColumn&&this._onColumnMouseMove(c.data);void 0!==this._selectingColumn&&(a.isEditing()?this._onColumnHeaderSelection(c.data,!1):this._onColumnHeaderSelection(c.data))},_columnEditingStarted:function(a){this.mouseDownColumnHandler.pause()},_columnEditingStopped:function(a){this.mouseDownColumnHandler.resume()}})})},
"variableeditor/views/accessibility/KeyboardAccessibilityMixin":function(){define("variableeditor/views/accessibility/KeyboardAccessibilityMixin","dijit/focus dojo/_base/declare variableeditor/views/accessibility/VEKeyBindingsMap variableeditor/views/accessibility/KeyboardActionMappings mw-actiondataservice/ActionDataService mw-keybindings/KeyBindings mw-log/Log".split(" "),function(g,f,e,d,b,a,c){var h=0;return f([d],{_root_Selector:"",_mode:"StandAlone",namespace:"actions/ve/keybindings",_OPENVAR_ACTION:"OpenVariableAction",
_DELETE_ACTION:"DeleteVariableAction",_shiftDirection:"",_SHIFT_DIRECTION_UPWARD:"upward",_SHIFT_DIRECTION_DOWNWARD:"downward",constructor:function(a){!this._actionDataService&&a.keyboardAccessibility&&this._initAccessibility(a)},_initAccessibility:function(c){this._VEActionDataService=c.actionDataService;h+=1;this._actionDataService=new b({nameSpace:this.namespace+h,mode:this._mode});this._root_Selector=c.keyBindingSelector;this._keyBindings=new a(this._actionDataService);this._initKeyBindingActions()},
initArgs:function(a){this._VEActionDataService=a.actionDataService},_initKeyBindingActions:function(){this.getKeyboardActions().forEach(function(a){this._setKeyBindingAction(a)},this)},_setKeyBindingAction:function(a){this._actionDataService.addAction(a);this._keyBindings.getBinding(a.shortcut).setAction(this._root_Selector,a.id)},_executeAction:function(a){this._VEActionDataService?this._VEActionDataService.getAction(a).execute():c.warn("VE Action Data Service does not exist")},updateFocus:function(a){var c=
this.getNodeToBeFocused(a);c[0]?g.focus(c[0]):this.cacheFocusUpdateNode(a)},getNodeToBeFocused:function(a){var c=this.getDndHandleSelector()[0];a=c.substring(1,c.length)+" row_"+a;return this.domNode.getElementsByClassName(a)},cacheFocusUpdateNode:function(a){this.cachedFocusedNode=a.toString()},clearFocusCache:function(){this.cachedFocusedNode=""},_moveUp:function(){var a=this.blockSelection.selectedRows;a&&0<a.length&&(a=Math.max(a[0].start-1,0),this._updateKeyboardSelection(a,0,{}),this._shiftDirection=
"")},_moveDown:function(){var a=this.blockSelection.selectedRows;a&&0<a.length&&(a=a.slice(-1).pop(),a=Math.min(a.end+1,this.getRowCount()-1),this._updateKeyboardSelection(a,0,{}),this._shiftDirection="")},_moveUpContinuous:function(){var a=this.blockSelection.selectedRows;if(a&&0<a.length){var a=this._getLastSelectedRowUpDirection(),c=this.getShiftKeyPivot();a<=c[0]&&(this._shiftDirection=this._SHIFT_DIRECTION_UPWARD);a=Math.max(a,0);this._updateKeyboardSelection(a,0,{shiftKey:!0})}},_moveDownContinuous:function(){var a=
this.blockSelection.selectedRows;a&&0<a.length&&(a=this._getLastSelectedRowDownDirection(),this.getShiftKeyPivot()[0]<=a&&(this._shiftDirection=this._SHIFT_DIRECTION_DOWNWARD),a=Math.min(a,this.getRowCount()-1),this._updateKeyboardSelection(a,0,{shiftKey:!0}))},_getLastSelectedRowUpDirection:function(){var a=this.blockSelection.selectedRows,c=a.length,h=a[c-1],b=null;return b=1===c&&h.start===h.end||this._shiftDirection===this._SHIFT_DIRECTION_UPWARD?a[0].start-1:h.end-1},_getLastSelectedRowDownDirection:function(){var a=
this.blockSelection.selectedRows,c=a.length,h=a[0],b=null;return b=1===c&&h.start===h.end||this._shiftDirection===this._SHIFT_DIRECTION_DOWNWARD?a[c-1].end+1:h.start+1},_moveUpAll:function(){this._updateKeyboardSelection(0,0,{shiftKey:!0,ctrlKey:!0});this._shiftDirection=""},_moveDownAll:function(){var a=this.getRowCount()-1;this._updateKeyboardSelection(a,0,{shiftKey:!0,ctrlKey:!0});this._shiftDirection=""},_selectAll:function(){var a=this.getRowCount()-1;this._updateAndRenderSelection(a,0,{selectAll:!0});
this.setServerSelection(!0);this._shiftDirection=""},_updateKeyboardSelection:function(a,c,h){this.scrollToRow(a);this._updateAndRenderSelection(a,c,h);this.setServerSelection(!0);this.updateFocus(a)},_tabNavigate:function(){},_shiftTabNavigate:function(){}})})},"variableeditor/views/accessibility/VEKeyBindingsMap":function(){define(["mw-keybindings/KeyBindings"],function(g){return{"open-selection":[g.Keys.ENTER],"delete-selection":[g.Keys.DELETE],"move-up":[g.Keys.UP_ARROW],"move-down":[g.Keys.DOWN_ARROW],
"move-up-continuous":[g.Keys.SHIFT,g.Keys.UP_ARROW],"move-down-continuous":[g.Keys.SHIFT,g.Keys.DOWN_ARROW],"move-up-all":[g.Keys.SYSCTRL,g.Keys.SHIFT,g.Keys.UP_ARROW],"move-down-all":[g.Keys.SYSCTRL,g.Keys.SHIFT,g.Keys.DOWN_ARROW],"tab-navigate":[g.Keys.TAB],"shift-tab-navigate":[g.Keys.SHIFT,g.Keys.TAB],"select-all":[g.Keys.SYSCTRL,g.Keys.A]}})},"variableeditor/views/accessibility/KeyboardActionMappings":function(){define(["dojo/_base/lang","dojo/_base/declare","variableeditor/views/accessibility/VEKeyBindingsMap"],
function(g,f,e){return f(null,{getKeyboardActions:function(){return[{id:"openAction",enabled:!0,shortcut:e["open-selection"],callback:g.hitch(this,"_executeAction",this._OPENVAR_ACTION)},{id:"deleteAction",enabled:!0,shortcut:e["delete-selection"],callback:g.hitch(this,"_executeAction",this._DELETE_ACTION)},{id:"moveUpAction",enabled:!0,shortcut:e["move-up"],callback:g.hitch(this,"_moveUp")},{id:"moveDownAction",enabled:!0,shortcut:e["move-down"],callback:g.hitch(this,"_moveDown")},{id:"moveUpContinuousAction",
enabled:!0,shortcut:e["move-up-continuous"],callback:g.hitch(this,"_moveUpContinuous")},{id:"moveDownContinuousAction",enabled:!0,shortcut:e["move-down-continuous"],callback:g.hitch(this,"_moveDownContinuous")},{id:"moveUpAllAction",enabled:!0,shortcut:e["move-up-all"],callback:g.hitch(this,"_moveUpAll")},{id:"moveDownAllAction",enabled:!0,shortcut:e["move-down-all"],callback:g.hitch(this,"_moveDownAll")},{id:"tabAction",enabled:!0,shortcut:e["tab-navigate"],callback:g.hitch(this,"_tabNavigate")},
{id:"shiftTabNavigate",enabled:!0,shortcut:e["shift-tab-navigate"],callback:g.hitch(this,"_shiftTabNavigate")},{id:"selectAll",enabled:!0,shortcut:e["select-all"],callback:g.hitch(this,"_selectAll")}]}})})},"variableeditor/views/CategoricalView":function(){define("variableeditor/views/CategoricalView",["dojo/_base/declare","variableeditor/views/ClientArrayView","variableeditor/views/table/ArrayTable"],function(g,f,e){return g("variableeditor.views.CategoricalView",[f],{createTable:function(d){return new e(d)}})})},
"variableeditor/views/TableArrayView":function(){define("variableeditor/views/TableArrayView",["dojo/_base/declare","variableeditor/views/ClientArrayView","variableeditor/views/table/MatlabTable"],function(g,f,e){return g("variableeditor.views.TableArrayView",[f],{createTable:function(d){return new e(d)}})})},"variableeditor/views/table/MatlabTable":function(){define("dojo/_base/declare dojo/_base/lang dojo/query variableeditor/views/table/_VEColumnHeaders variableeditor/views/table/_VERowHeaders variableeditor/views/table/ArrayTable".split(" "),
function(g,f,e,d,b,a){return g("variableeditor.views.table.MatlabTable",[a,d,b],{lastClickNode:null,constructor:function(a){this.inherited(arguments)},updateModelProperties:function(){this.inherited(arguments);var a=!1;this.dataModel||(this.dataModel=this.peerNode.getProperty("dataModel"),a=!0);this.dataModel&&this.ColumnModelProperties&&this._updateColumnWidths();a&&(this.dataModel=null)},onMouseDown:function(a){this.inherited(arguments);var h=-1,b=-1,d=-1;a&&(a.data&&a.data.renderer&&a.data.renderer.domNode&&
a.data.renderer.domNode.dataset)&&(h=parseInt(a.data.renderer.domNode.dataset.row),b=parseInt(a.data.renderer.domNode.dataset.col),d=parseInt(a.data.renderer.domNode.dataset.idx));this._setLeadCellPosition(h,b,d)},onMouseEnter:function(a){this.inherited(arguments);if(this.selectable&&!this.isCellEnterListenerPaused){var h=-1,b=-1,d=-1;a&&(a.data&&a.data.renderer&&a.data.renderer.domNode&&a.data.renderer.domNode.dataset)&&(h=parseInt(a.data.renderer.domNode.dataset.row),b=parseInt(a.data.renderer.domNode.dataset.col),
d=parseInt(a.data.renderer.domNode.dataset.idx));this._setLeadCellPosition(h,b,d)}},onValueChanged:function(a){if(!a||!(a.data&&"server"===a.data.source)){var h=null;a.data.editor?h=a.data.editor:a.data.renderer&&(h=a.data.renderer);h.oldValue=a.data.oldValue;var b=-1,d=-1,e=-1;h.domNode&&h.domNode.dataset&&(b=parseInt(h.domNode.dataset.row),d=parseInt(h.domNode.dataset.col),e=parseInt(h.domNode.dataset.idx));var f=a.data.newValue;!isNaN(b)&&(!isNaN(d)&&!isNaN(e))&&(h.convert&&(f=h.convert(a.data.newValue)),
this.peerNode.getParent().dispatchEvent("peerEvent",this.peerNode.getParent(),{type:"groupedColumnSetData",row:b,column:d,columnIndex:e,data:f}))}},getCellSelector:function(a,h,b){return this.getRowSelector(a)+" .cell:nth-of-type("+(h-this.colView.start+2)+") .idx_"+b},_setLeadCellPosition:function(a,h,b){this.ColumnModelProperties[h]&&(b=this.ColumnModelProperties[h].GroupColumnSize?this.ColumnModelProperties[h].GroupColumnSize-1:b);this.leadCell={row:Math.min(a,this.getRowCount()-1),column:Math.min(h,
this.getColumnCount()-1),index:isNaN(b)?0:b};this._updateLeadCellStyle()},getLeadNode:function(){if(0>this.leadCell.row||0>this.leadCell.column||0>this.leadCell.index||this.leadCell.row>=this.getRowCount()||this.leadCell.column>=this.getColumnCount())return null;var a=this.getCellSelector(this.leadCell.row,this.leadCell.column,this.leadCell.index);return e(a)[0]},_updateLeadCellStyle:function(){var a={};if(this._isLeadNodeInDom()){var h=this.getLeadNode();if((h=this._getCellFromNode(h))&&!this.isCellSelected(h.row,
h.column)){this.styleManager.updateStyleRules("selectionLeadCell",[]);return}this.blockSelection.isEmpty()||(a[".body .dataBodyWrapper .dataRow .dataBody .row:nth-of-type("+(h.row-this.rowView.start+2)+") .cell:nth-of-type("+(h.column-this.colView.start+2)+") .idx_"+this.leadCell.index]=this.leadCellStyle)}this.styleManager.updateStyleRules("selectionLeadCell",a)},_createColumnNode:function(a){var h=this.inherited(arguments);this._updateColumnNode(h,a);return h},_createRowNode:function(a){var h=this.inherited(arguments);
this._updateRowNode(h,a);return h},_updateColumnWidths:function(){if(this.ColumnModelProperties){this.inherited(arguments);var a,h=!1;if(this.dataModel&&this.columns)for(a=this.dataModel.getCurrentStartCol();a<this.dataModel.getCurrentEndCol();a+=1)if(this.columns[a])try{var b=this.getColumnModelProperty(a,"GroupColumnSize");if(b){var d=parseInt(b,10),e=this.getColumnModelProperty(a,"ColumnWidth"),p=parseInt(e,10);if(null!==e&&void 0!==e&&0<=p&&this._currentColumns&&this._currentColumns[a]&&(this._currentColumns[a].groupColumnSize!==
d||this.columns[a].width!==p*d)){this.columns[a].groupColumnSize=d;var n=this.defaultColumnWidth*d;p>n&&(n=p);this.columns[a].width=n;h=!0}}}catch(g){}h&&(a=f.clone(this.columns),this.peerNode.setProperty("columns",a));this._currentColumns=this.columns}}})})},"variableeditor/views/table/_VERowHeaders":function(){define("variableeditor/views/table/_VERowHeaders","dojo/_base/declare dojo/_base/lang dojo/string dojo/dom-class dojo/keys dijit/registry variableeditor/views/table/_VETableHeaders datatoolsservices/DataToolsUtils dojo/i18n!variableeditor/app/l10n/nls/app mw-messageservice/MessageService variableeditor/views/table/_HeadersBase dojo/text!variableeditor/views/table/VariableEditorRowHeader.html".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p){return g([c],{ms:l.messageService,CHANNEL_DuplicateRowHeader:"ErrorDuplicateRowHeader",subscriptionCallback:null,subscription:null,pauseValueChangedListener:!1,ROW_HEADER_CHANNEL:"/VERowHeaderName",_createRowNode:function(a,c){var b=new m({templateString:p,editable:h.getLogicalValue(this.getTableModelProperty("EditableRowHeaderLabels"),!0),showLabels:h.getLogicalValue(this.getTableModelProperty("ShowRowHeaderLabels"),!0),showIndices:h.getLogicalValue(this.getTableModelProperty("ShowRowHeaderNumbers"),
!0)||h.getLogicalValue(this.getTableModelProperty("ShowCustomRowHeaderNumbers"),!1),labelValue:void 0!==a.label?a.label:void 0===this.getRowModelProperty(parseInt(a.labelIndex)-1,"RowName")?"":this.getRowModelProperty(parseInt(a.labelIndex)-1,"RowName"),indexValue:a.labelIndex});b.setNodeDisplay(b.HEADER_INDEX_ATTACH_POINT,b.showIndices);b.setNodeDisplay(b.HEADER_LABEL_ATTACH_POINT,b.showLabels);b._inputBoxLabel.isEditable()&&this._attachRowHeaderListeners(b);null!=this.maxIndexWidth&&b.domNode.getElementsByClassName("rowIndex")[0].setAttribute("style",
"width:"+this.maxIndexWidth+"px;");b.startup();return b.domNode},_attachRowHeaderListeners:function(a){var c=this;a._inputBoxLabel.addEventListener("valueChanged",f.hitch(c,"_rowValueChanged",a));a._inputBoxLabel.addEventListener("mousedown",f.hitch(c,"_rowMouseDown"));a._inputBoxLabel.addEventListener("mouseup",f.hitch(c,"_rowMouseUp"));a._inputBoxLabel.addEventListener("click",f.hitch(c,"_rowMouseClick"));a._inputBoxLabel.addEventListener("mousemove",f.hitch(c,"_rowMouseMove",a._inputBoxLabel));
a._inputBoxLabel.addEventListener("editingStarted",f.hitch(c,"_rowEditingStarted"));a._inputBoxLabel.addEventListener("editingStopped",f.hitch(c,"_rowEditingStopped"));a._inputBoxLabel._handleKeyDown=function(h){var d=this._getKeyCode(h);null!==d&&d===b.ENTER&&c._isValidRowHeaderName(a,h.target.value)}},_updateRowNode:function(c,h,b,k){b=a.getEnclosingWidget(c);d.replace(c,"header_"+h.labelIndex,"header_"+b.indexValue);this._updateRowNumber(b,h);this._updateRowLabel(b,h)},_updateRowNumber:function(a,
c){c.labelIndex&&(h.getLogicalValue(this.getTableModelProperty("ShowRowHeaderNumbers"),!0)||h.getLogicalValue(this.getTableModelProperty("ShowCustomRowHeaderNumbers"),!1))?(a.setIndexProperty(parseInt(c.labelIndex)-1),this.pauseValueChangedListener=!0,a.setIndexValue(c.labelIndex),a.setNodeDisplay(a.HEADER_INDEX_ATTACH_POINT,!0),this.pauseValueChangedListener=!1):a.setNodeDisplay(a.HEADER_INDEX_ATTACH_POINT,!1)},_updateRowLabel:function(a,c){c.label&&h.getLogicalValue(this.getTableModelProperty("ShowRowHeaderLabels"),
!0)?(this.pauseValueChangedListener=!0,a._inputBoxLabel.index=parseInt(c.labelIndex)-1,a.setLabelValue(c.label),a.setNodeDisplay(a.HEADER_LABEL_ATTACH_POINT,!0),this.pauseValueChangedListener=!1):a.setNodeDisplay(a.HEADER_LABEL_ATTACH_POINT,!1)},_rowValueChanged:function(a,c){!0!==this.pauseValueChangedListener&&(0<c.data.newValue.length&&this._isValidRowHeaderName(a,c.data.newValue)?this.setRowModelProperty(a._inputBoxLabel.index,"RowName",c.data.newValue):a._inputBoxLabel._setUIValue(c.data.oldValue))},
_handleDuplicateRowHeaderValues:function(c){var h=a.getEnclosingWidget(c.domNode.parentElement);this.setRowModelProperty(c.index,"RowName",c._originalValue);h&&h._handleDuplicateValues()},_isValidRowHeaderName:function(a,c){var b=a._inputBoxLabel;if(a._isValidHeaderName(c))return!0;b.cancelEditing(b);h.displayErrorMessage(e.substitute(k.invalidHeaderName,{varName:"'"+c+"'"}));return!1},_rowMouseDown:function(a){this._onRowMouseDown(a.data);this._onHeaderRowMouseDown(a.data,!1)},_rowMouseUp:function(a){this._onHeaderRowMouseUp(a.data);
this._onWindowMouseUp(a.data)},_rowMouseClick:function(a){this._onHeaderClick(a.data)},_rowMouseMove:function(a,c){void 0!==this._selectingRow&&(a.isEditing()?this._onRowHeaderSelection(c.data,!1):this._onRowHeaderSelection(c.data))},_rowEditingStarted:function(a){this.mouseDownRowHandler.pause()},_rowEditingStopped:function(a){this.mouseDownRowHandler.resume()}})})},"variableeditor/views/CellArrayView":function(){define("variableeditor/views/CellArrayView",["dojo/_base/declare","variableeditor/views/ClientArrayView",
"variableeditor/views/table/ArrayTable"],function(g,f,e){return g("variableeditor.views.CellArrayView",[f],{constructor:function(d){this.table={}},createTable:function(d){return new e(d)}})})},"variableeditor/views/VectorStructureArrayView":function(){define("variableeditor/views/VectorStructureArrayView",["dojo/_base/declare","variableeditor/views/ClientArrayView","variableeditor/views/table/StructureArrayTable"],function(g,f,e){return g("variableeditor.views.VectorStructureArrayView",[f],{constructor:function(d){this.table=
{}},createTable:function(d){return new e(d)}})})},"variableeditor/views/table/StructureArrayTable":function(){define(["dojo/_base/declare","variableeditor/views/table/_VEColumnHeaders","variableeditor/views/table/ArrayTable"],function(g,f,e){return g("variableeditor.views.table.StructureArrayTable",[e,f],{constructor:function(d){this.inherited(arguments)}})})},"variableeditor/views/DatetimeArrayView":function(){define("variableeditor/views/DatetimeArrayView",["dojo/_base/declare","variableeditor/views/ClientArrayView",
"variableeditor/views/table/ArrayTable"],function(g,f,e){return g("variableeditor.views.DatetimeArrayView",[f],{constructor:function(d){this.table={}},createTable:function(d){return new e(d)}})})},"variableeditor/views/DurationArrayView":function(){define("variableeditor/views/DurationArrayView",["dojo/_base/declare","variableeditor/views/ClientArrayView","variableeditor/views/table/ArrayTable"],function(g,f,e){return g("variableeditor.views.DurationArrayView",[f],{constructor:function(d){this.table=
{}},createTable:function(d){return new e(d)}})})},"variableeditor/views/CalendarDurationArrayView":function(){define("variableeditor/views/CalendarDurationArrayView",["dojo/_base/declare","variableeditor/views/ClientArrayView","variableeditor/views/table/ArrayTable"],function(g,f,e){return g("variableeditor.views.CalendarDurationArrayView",[f],{constructor:function(d){this.table={}},createTable:function(d){return new e(d)}})})},"variableeditor/views/UITableArrayView":function(){define("variableeditor/views/UITableArrayView",
["dojo/_base/declare","variableeditor/views/ClientArrayView","variableeditor/views/table/UITable"],function(g,f,e){return g("variableeditor.views.UITableArrayView",[f],{createTable:function(d){return new e(d)}})})},"variableeditor/views/table/UITable":function(){define("dojo/_base/declare variableeditor/views/table/_VEColumnHeaders variableeditor/views/table/_VERowHeaders variableeditor/views/table/ArrayTable variableeditor/VariableEditorUtils datatoolsservices/DataToolsUtils dojo/_base/lang variableeditor/views/table/BlockSelection".split(" "),
function(g,f,e,d,b,a,c,h){return g("variableeditor.views.table.UITable",[d,f,e],{minimumColumnHeaderWidth:75,ColumnNameWidthPadding:8,paddingViewRows:5,paddingPagedRows:5,paddingViewColumns:1,paddingPagedColumns:1,constructor:function(a){this.computedColumnNameWidth=[];this.computedAutoColumnWidths=[]},postCreate:function(){this.inherited(arguments);this.mouseDownRowHandler=this.mouseDownColumnHandler=null},getColumnHeaderPositions:function(){var c=this._getAttachNodes(this.COLUMN_HEADER_ATTACH_POINT);
return a.getColumnHeaderPositions(c)},_onDataModelSet:function(){this.inherited(arguments);this._updateTableHeaders();this._updatePageSize()},_updatePageSize:function(){if(this.domNode||this.dataModel){var a=this.dataModel.getRowCount(),c=this.dataModel.getColumnCount(),h=[[50,10],[100,5]];a<=h[0][0]&&c<=h[0][1]?(this.paddingViewRows=h[0][0],this.paddingPagedRows=h[0][0],this.paddingViewColumns=h[0][1],this.paddingPagedColumns=h[0][1]):a<=h[1][0]&&c<=h[1][1]?(this.paddingViewRows=h[1][0],this.paddingPagedRows=
h[1][0],this.paddingViewColumns=h[1][1],this.paddingPagedColumns=h[1][1]):(this.paddingPagedRows=this.paddingViewRows=5,this.paddingPagedColumns=this.paddingViewColumns=1)}},_updateColumnHeaderNames:function(){if(this.dataModel&&(this.dataModel.getCurrentStartCol&&this.ColumnModelProperties&&0!==this.ColumnModelProperties.length)&&this.dataModel.getCurrentStartCol()+1===this.ColumnModelProperties[0].ColumnNumber)if(this._computeColumnNameWidthsFromView(),this._hasMoreColumnHeaderThanColumnData()){if(b.logDebug("_VEModelProperties: _updateColumnHeaderNames"),
this.ColumnModelProperties){var c;if(this.dataModel&&this.dataModel.getCurrentStartCol&&this.dataModel.getCurrentEndCol){var h=a.getLogicalValue(this.getTableModelProperty("ShowColumnHeaderNumbers"),!0),d=a.getLogicalValue(this.getTableModelProperty("ShowCustomColumnHeaderNumbers"),!1),e=a.getLogicalValue(this.getTableModelProperty("ShowColumnHeaderLabels"),!0),f=this.getTableModelProperty("ShowHeaderIcons");this.getTableModelProperty("CornerSpacerTitle");var g=this._getColumnHeaderLength();for(c=
this.dataModel.getCurrentStartCol();c<g;c+=1){this.columns[c]||(this.columns[c]={label:"",labelIndex:null});var r=e?this.getColumnModelProperty(c,"HeaderName"):"",s=d?this.getColumnModelProperty(c,"HeaderNumber"):(c+1).toString(),t=f?this.getColumnModelProperty(c,"icon"):"";t&&(this.columns[c].icon=t);r?(this.columns[c].labelIndex=d?parseInt(s):c+1,this.columns[c].label=r):(this.columns[c].labelIndex=h?c+1:"",this.columns[c].label="")}}}}else this.inherited(arguments)},_updateColumnWidths:function(){if(this.dataModel&&
(this.dataModel.getCurrentStartCol&&this.ColumnModelProperties&&0!==this.ColumnModelProperties.length)&&this.dataModel.getCurrentStartCol()+1===this.ColumnModelProperties[0].ColumnNumber){var a=this._applyAutoColumnWidth(),h=!1;if(a.length===this.columns.length)for(var d=0;d<a.length;d++){if(a[d]!==this.columns[d].width){h=!0;break}}else h=!0;if(h&&(0!=a.length&&(this.computedAutoColumnWidths=a),b.logDebug("_VEModelProperties: _updateColumnWidths"),this.ColumnModelProperties)){a=c.clone(this.columns);
d=!1;if(this.dataModel&&this.dataModel.getCurrentStartCol&&this.dataModel.getCurrentEndCol&&this.columns){for(var e=this._hasMoreColumnHeaderThanColumnData()?this._getColumnHeaderLength():this.dataModel.getCurrentEndCol(),h=this.dataModel.getCurrentStartCol();h<e;h+=1)if(a[h]||(a[h]={width:0}),a[h]&&a[h]!==this._resizingColumn)try{this._getColumnWidthOnTable&&this._getColumnWidthOnTable(h);var f=this.computedAutoColumnWidths[h],g=parseInt(f,10);null!==f&&(void 0!==f&&0<=g)&&(this._currentColumns&&
this._currentColumns[h]&&this._currentColumns[h].width===g?a[h].width=this._currentColumns[h].width:(d=!0,a[h].width=g))}catch(r){Log.error(r),Log.error(r.stack)}a=a.slice(0,this._getColumnHeaderLength())}this._currentColumns&&a.length!==this._currentColumns.length&&(d=!0);d&&0!==a.length&&this.peerNode.setProperty("columns",a);if(a&&(d||!this._currentColumns))this._currentColumns=a}}},getColumnModelProperties:function(a){if(!this._hasMoreColumnHeaderThanColumnData())return this.inherited(arguments);
var c=a;return!this.ColumnModelProperties||!this.ColumnModelProperties.hasOwnProperty(c)?{}:this.ColumnModelProperties[c]},_renderColumnHeader:function(){if(this._hasMoreColumnHeaderThanColumnData()){var a=this.columns.slice(0);this._updateCornerSpacerLabel(this.cornerSpacerNode);var c=this;this._incrementalUpdateNode({node:this.columnHeaderNode,data:a,oldData:this.oldColumnData,start:this.colView.start,end:this.columns.length,oldStart:this.oldColView.start,oldEnd:this.oldColumnData.length,update:function(h,
b,d,e){c._updateColumnNode(h,a[e])},create:function(h,b){return c._createColumnNode(a[b])}});this.oldColumnData=a;this._updateDataStyles()}else this.inherited(arguments)},_updateTableEditable:function(){},_updateColumnStyles:function(){if(this._isPagedData()||this.dataModel.getCurrentEndCol()===this.dataModel.getColumnCount())if(!this._hasMoreColumnHeaderThanColumnData()&&this._isPagedData())this.inherited(arguments);else{var a=this.columns.slice(this.colView.start,this._getColumnHeaderLength()),
c,h={},b;for(c=0;c<a.length;c+=1)b=this._getCellType(a[c]),b=this._getColumnStyles(b),b+="width: "+(a[c]&&null!==a[c].width&&0<=a[c].width?a[c].width:this.defaultColumnWidth)+"px;",h[".dataColumn .cell:nth-child("+(c+2)+")"]=b;this.styleManager.updateStyleRules("columns",h)}},_getColumnHeaderLength:function(){var c=this.dataModel?this.dataModel.getColumnCount():0,h=c;if(a.getLogicalValue(this.getTableModelProperty("ShowColumnHeaders"),!0)&&!this._isNumberedColumnName())for(;c<this.ColumnModelProperties.length;c++){var b=
this.ColumnModelProperties[c].HeaderName;"undefined"!=typeof b&&""!=b&&(h=c+1)}return h},_hasMoreColumnHeaderThanColumnData:function(){return!this.dataModel?!1:this._getColumnHeaderLength()<=this.dataModel.getColumnCount()?!1:!0},_computeColumnNameWidthsFromView:function(){if(this.dataModel){var c=a.getLogicalValue(this.getTableModelProperty("ShowColumnHeaders"),!0),h=a.getLogicalValue(this.getTableModelProperty("ShowColumnHeaderLabels"),!0),b=this.dataModel.getCurrentStartCol(),d=this._isPagedData()?
this.dataModel.getCurrentEndCol():this._getColumnHeaderLength();if(c)for(c=0;c<d;c++)this.computedColumnNameWidth[b+c]=a.getComputedColumnHeaderWidth(this.ColumnModelProperties[c]&&h?this.ColumnModelProperties[c].HeaderName:"","12px Helvetica, Helvetica, sans-serif");else this.computedColumnNameWidth=[]}},_applyAutoColumnWidth:function(){var a=[],c=0,h=0,b=[],d=this._getColumnHeaderLength();if(0===d)return[];for(var e=0;e<d;e++){var f=this.getColumnModelProperty(e,"ColumnWidth");f&&0<=f?(a[e]=f,c+=
a[e]):(a[e]=isNaN(this.computedColumnNameWidth[e])?this.minimumColumnHeaderWidth:Math.max(this.computedColumnNameWidth[e]+this.ColumnNameWidthPadding,this.minimumColumnHeaderWidth),b.push({index:e,width:a[e]}),h+=a[e])}var d=this.position.width,e=this._getRowHeaderWidth(),f=this._getVerticalScrollbarWidth(),g=this._getViewportPadding(),d=d-g-e-f;h<d-c&&0!==b.length&&(b.sort(function(a,c){return a.width===c.width?c.index-a.index:a.width-c.width}),this._equallyExpand(b,b.length-1,d-c));for(e=0;e<b.length;e++)a[b[e].index]=
b[e].width;return a},_isPagedData:function(){var a=this._convertPxToCols(0,this.position.width)+1;return this.dataModel.getColumnCount()>a},_isNumberedColumnName:function(){return a.getLogicalValue(this.getTableModelProperty("ShowColumnHeaderNumbers"),!0)},_getRowHeaderWidth:function(){return this.showRowHeaders?this.rowHeaderWidth:0},_getVerticalScrollbarWidth:function(){return this._isVerticalScrollBarShown()?this.scrollbarWidth-2:0},_getViewportPadding:function(){return this.showRowHeaders?4:2},
_equallyExpand:function(a,c,h){if(h<a[c].width*(c+1))for(var b=c;a[b-1];b--){if(a[b].width!==a[b-1].width){this._equallyExpand(a,b-1,h-a[b].width*(c-b+1));break}}else{var d=parseInt(h/(c+1));h=parseInt(h%(c+1));for(b=0;b<h;b++)a[b].width=d+1;for(b=h;b<=c;b++)a[b].width=d}},resize:function(){this.inherited(arguments);this._updateColumnWidths()},_updateTotalColumnWidth:function(a){this.totalColumnWidth=0;var c;for(c=0;c<a;c+=1)if(this.columns[c])if(0<=this.columns[c].width)this.totalColumnWidth+=this.columns[c].width;
else{var h=this.computedAutoColumnWidths[c]?this.computedAutoColumnWidths[c]:this.getColumnModelProperty(c,"ColumnWidth"),b=parseInt(h,10);null!==h&&void 0!==h&&0<=b?(this.totalColumnWidth+=b,this.columns[c].width=b):(this.totalColumnWidth+=this.defaultColumnWidth,this.columns[c].width=this.defaultColumnWidth)}},_updateTableHeaders:function(){b.logDebug("_VEModelProperties: _updateTableHeaders");this.RowModelProperties&&(this._updateRowHeaderNames(),this._updateRowHeaderDisplay());this.ColumnModelProperties&&
(this._updateColumnHeaderNames(),this._updateColumnWidths(),this._updateTotalColumnWidth(this.columns.length),this._updateColumnHeaderDisplay())},_onRowMouseDown:function(){},_onColumnMouseDown:function(){},_onHeaderColumnMouseDown:function(a){a.preventDefault()},_onHeaderRowMouseDown:function(a){a.preventDefault()},_onCornerMouseDown:function(){},_onTableMouseUp:function(a,c){this.domNode.contains(document.activeElement)&&this.inherited(arguments)},onMouseDown:function(a){this.contextMenu&&this.contextMenu.close();
if(this.selectable){this.cellsDragged=this.isCellEnterListenerPaused=!1;this.mouseMotionHandler.resume();var c=-1,h=-1;a&&(a.data&&a.data.renderer&&a.data.renderer.domNode)&&(h=this._getRowColumnFromNode(a.data.renderer.domNode),c=h.row,h=h.col);this.isCellDraggable(c,h)&&this.isCellSelected(c,h)&&!a.data.shiftKey?this.selectionUpdated=!1:(this._updateAndRenderSelection(c,h,a.data),this.selectionUpdated=!0)}},_updateAndRenderSelection:function(a,c,b){this._setLeadCellPosition(a,c);this.anchorRow=
a;this.anchorColumn=c;this.blockSelection.isEmpty()&&this._resetShiftKeyPivot();var d=new h({indexedRows:!this.sendSelectionRanges}),d=this._updateBlockSelection(a,c,d,b);this.blockSelection.matchingSelection(d)||(this.blockSelection=d,this._renderSelection(),this.setServerSelection(!1))},_updateBlockSelection:function(a,c,h,b){"none"!==this.selectionType&&"none"!==this.selectionMode&&(b&&b.shiftKey?(b=null,b=this.getShiftKeyPivot(),0>b[0]&&0>b[1]?h.add(0,a,0,c):h.add(b[0],a,b[1],c)):(this._setShiftKeyPivot(a,
c),h.addCell(a,c)));return h},_updateSelection:function(a,c,b){var d,e;this._setLeadCellPosition(a,c);b=new h({indexedRows:!this.sendSelectionRanges});d=Math.min(this.anchorRow,a);a=Math.max(this.anchorRow,a);e=Math.min(this.anchorColumn,c);c=Math.max(this.anchorColumn,c);b.add(d,a,e,c);this.blockSelection=b;this._renderSelection()}})})},"variableeditor/views/UITableTableView":function(){define("variableeditor/views/UITableTableView",["dojo/_base/declare","variableeditor/views/ClientArrayView","variableeditor/views/table/UITableTable"],
function(g,f,e){return g("variableeditor.views.UITableTableView",[f],{createTable:function(d){return new e(d)}})})},"variableeditor/views/table/UITableTable":function(){define(["dojo/_base/declare","variableeditor/views/table/_VEColumnHeaders","variableeditor/views/table/_VERowHeaders","variableeditor/views/table/UITable"],function(g,f,e,d){return g("variableeditor.views.table.UITableTable",d,{updateModelProperties:function(){this.inherited(arguments);var b=!1;this.dataModel||(this.dataModel=this.peerNode.getProperty("dataModel"),
b=!0);this.dataModel&&this.ColumnModelProperties&&(this._updateColumnWidths(),this._updateColumnHeaderNames());b&&(this.dataModel=null)},_createColumnNode:function(b){var a=this.inherited(arguments);this._updateColumnNode(a,b);return a},_createRowNode:function(b){var a=this.inherited(arguments);this._updateRowNode(a,b);return a},onValueChanged:function(b){if(!b||!(b.data&&"server"===b.data.source)){var a=null;b.data.editor?a=b.data.editor:b.data.renderer&&(a=b.data.renderer);a.oldValue=b.data.oldValue;
var c=-1,h=-1,d=-1;a.domNode&&a.domNode.dataset&&(c=parseInt(a.domNode.dataset.row),h=parseInt(a.domNode.dataset.col),d=parseInt(a.domNode.dataset.idx));var e=b.data.newValue;!isNaN(c)&&(!isNaN(h)&&!isNaN(d))&&(a.convert&&(e=a.convert(b.data.newValue)),this.peerNode.getParent().dispatchEvent("peerEvent",this.peerNode.getParent(),{type:"groupedColumnSetData",row:c,column:h,columnIndex:d,data:e}))}}})})},"variableeditor/views/editors/LogicalEditor":function(){define("variableeditor/views/editors/LogicalEditor",
["dojo/_base/declare","dojo/keys","variableeditor/views/editors/TextBoxEditor"],function(g,f,e){return g("variableeditor.views.editors.LogicalEditor",[e],{_handleKeyPress:function(d){this.inherited(arguments);var b=this._getKeyCode(d);null!==b&&b!==f.ENTER||this.makeLogical()},makeLogical:function(){var d=this._getUIValue(),b=d;this._inputBox&&void 0!==d&&(b=this.isNumeric(d)?0===parseInt(d)?"0":"1":"true"===d.toLowerCase()||"yes"===d.toLowerCase()||"on"===d.toLowerCase()?"1":"false"===d.toLowerCase()||
"no"===d.toLowerCase()||"off"===d.toLowerCase()?"0":d);this._setUIValue(b)},setValue:function(d,b,a){"0"!==d&&"1"!==d&&(d="logical("+d+")");this.inherited(arguments)},_setUIValue:function(d){0<=d.indexOf("logical(")&&0<=d.indexOf(")")&&(d=d.substring(8,d.length-1));this.inherited(arguments)},isNumeric:function(d){return!isNaN(parseFloat(d))&&isFinite(d)},stopEditing:function(){this.makeLogical();this.inherited(arguments)}})})},"variableeditor/views/editors/NumericEditor":function(){define("variableeditor/views/editors/NumericEditor",
["dojo/_base/declare","variableeditor/views/editors/TextBoxEditor"],function(g,f){return g("variableeditor.views.editors.NumericEditor",[f],{_setUIValue:function(e){var d=e;try{if(null!==e&&void 0!==e&&""!==e){var b=parseInt(e);parseFloat(e)===b&&(d=b);if(this.isHex(e)||this.isRational(e))d=e;this.isComplex(e)&&(d=e)}else d="0"}catch(a){}this._inputBox.set("value",d)},isComplex:function(e){return String(e).replace(/\s+/g,"").match(/^([-+]?(?:\d+|\d*\.\d+))?[-+]?(\d+|\d*\.\d+)?[ij]$/i)},isHex:function(e){return/[0-9A-Fa-f]{16}/g.test(e)},
isRational:function(e){return/[0-9]\/[0-9]/.test(e)}})})},"variableeditor/views/editors/NumericTextEditor":function(){define("variableeditor/views/editors/NumericTextEditor",["dojo/_base/declare","variableeditor/views/editors/TextBoxEditor"],function(g,f){return g("variableeditor.views.editors.NumericTextEditor",[f],{hasValueChanged:function(e){var d=this.inherited(arguments);try{"string"===typeof e&&"number"===typeof this._originalValue&&"number"===typeof this._editValue&&this._originalValue.toString()===
e&&this._editValue.toString()===e&&(d=!1)}catch(b){}return d}})})},"variableeditor/views/editors/StringEditor":function(){define("variableeditor/views/editors/StringEditor",["dojo/_base/declare","dojo/keys","datatoolsservices/DataToolsUtils","variableeditor/views/editors/TextBoxEditor"],function(g,f,e,d){return g("variableeditor.views.editors.StringEditor",[d],{setValue:function(b,a){var c=e.formatString(b,a);this.inherited(arguments,[b,a,c])},setEditValue:function(b,a){var c=e.formatString(b,a);
this.inherited(arguments,[b,a,c])},_handleKeyDown:function(b){b&&(this._getKeyCode(b)===f.TAB?(this._handleStringFormatting("tab"),b.preventDefault()):this.inherited(arguments))},_handleFormatting:function(b,a,c){return e.handleFormatting(b,a,c)}})})},"variableeditor/views/editors/CharEditor":function(){define("variableeditor/views/editors/CharEditor",["dojo/_base/declare","variableeditor/views/editors/TextBoxEditor"],function(g,f){return g("variableeditor.views.editors.CharEditor",[f],{_applyFormatting:function(e,
d){if(e&&(-1<e.indexOf("\n")||-1<e.indexOf("\t"))&&"server"===d)e=e.replace(/\n/g,"\u21b5"),e=e.replace(/\t/g,"\t");return e}})})},"variableeditor/views/editors/CheckBoxEditor":function(){define("variableeditor/views/editors/CheckBoxEditor","dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/on datatoolsservices/DataToolsUtils variableeditor/views/editors/_EditorBase mw-form/CheckBox datatoolsservices/constants/ClassTypeMaps dijit/focus".split(" "),function(g,f,e,d,b,a,c,h,k){return g("variableeditor.views.editors.CheckBoxEditor",
[a],{_checkBox:void 0,setValue:function(a){var c=a;if(a&&a.hasOwnProperty("value")&&(c=a.value,this._value===c))return;a=c=b.getLogicalValue(c,!1);this._checkBox&&this._setCheckboxValue(c);this.inherited(arguments)},_handleMouseUp:function(){this._focus()},_focus:function(){this._checkBox&&(this._checkBox.focusNode&&this._checkBox.focusNode.focus)&&(k.curNode!==this._checkBox.focusNode&&k.focus(this._checkBox.focusNode),this._checkBox.focusNode.focus())},edit:function(){},_inPlaceEdit:function(){},
setState:function(a){this.domNode&&(this._checkBox||this._setupCheckBox(),this._setupDomClasses(a),this.inherited(arguments))},_setCheckboxValue:function(a){this._checkBox.set("checked",a);this._checkBox.set("value",a);this._checkBox.focusNode&&this._checkBox.focusNode.setAttribute("value",a)},_setupDomClasses:function(a){var c=a?a.dataType?a.dataType:a["class"]:"logical";this._applyCssClass(c,a?a.isTemporaryValue:!1,!1,this._checkBox.domNode);this.addCSSClasses(h.ClassTypeMap[c],this.domNode);this.addCSSClasses("cellRenderer",
this.domNode);this.isEditable()?this.removeCSSClasses("variableEditorNotEditable",this.domNode):this.addCSSClasses("variableEditorNotEditable",this.domNode)},_setupCheckBox:function(){this._checkBox=new c({checked:b.getLogicalValue(this._value,!1),disabled:void 0!==this._editable?!this._editable:!1,tag:this.createDataTag("CheckBoxRenderer","cell"),width:16,height:16});this.isEditable();this._checkBox.on("click",f.hitch(this,"_commitValue"));e.empty(this.domNode);this.domNode.appendChild(this._checkBox.domNode);
this._checkBox.startup();this.own(this._checkBox)},postCreate:function(){this._checkBox||this._setupCheckBox();this.inherited(arguments)},_commitValue:function(a){!0!==this._beingDestroyed&&this.setValue(this._checkBox.get("checked"))},editOverride:function(a){this._editing||(a=b.getLogicalValue(a,!1),this._setCheckboxValue(a),this.edit())},cancelEditing:function(){if(this._editing){var a=b.getLogicalValue(this._originalValue,!1);this._setCheckboxValue(a);this.inherited(arguments)}},_getUIValue:function(){return this._checkBox.get("checked")},
_setUIValue:function(a){this._setCheckboxValue(a)},_setReadOnly:function(a){this._checkBox&&(!0===a?this._checkBox.set("disabled",!0):this._checkBox.set("disabled",!1))}})})},"variableeditor/views/editors/TextAreaEditor":function(){define("variableeditor/views/editors/TextAreaEditor","dojo/_base/declare dojo/_base/lang dojo/keys dijit/focus variableeditor/views/editors/_EditorBase variableeditor/views/editors/TextArea datatoolsservices/DataToolsUtils".split(" "),function(g,f,e,d,b,a,c){g=g("variableeditor.views.editors.TextAreaEditor",
[b],{_textArea:void 0,_inputType:"",_outputType:void 0,_delimiters:[",",";"],setValue:function(a){var c=a;a&&a.hasOwnProperty("value")&&(c=a.value);this._textArea&&this._textArea.set("value",c);this.inherited(arguments);this._value=String(this._value)},setState:function(a){this.domNode&&(this._textArea||this._setupInputNode(),a&&a.outputType&&(this._outputType=a.outputType),a&&a.delimiters&&(this._delimiters=a.delimiters),this._setupDomClasses(a),this.inherited(arguments))},_setupDomClasses:function(a){this._applyCssClass(a?
a.dataType?a.dataType:a["class"]:"char",a?a.isTemporaryValue:!1,!1,this._textArea.domNode);this.renderer&&this.renderer.isEditable()?(this.removeCSSClasses("variableEditorNotEditable",this._textArea.domNode),this.removeCSSClasses("variableEditorNotEditable",this._textArea.inputNode)):(this.addCSSClasses("variableEditorNotEditable",this._textArea.domNode),this.addCSSClasses("variableEditorNotEditable",this._textArea.inputNode));this.addCSSClasses("veTextAreaEditor")},_handleKeyboardEvent:function(a){if(this._editing){"keydown"===
a.type&&this._handleKeyDown(a);var c=f.mixin({editor:this},a);this.dispatchEvent(a.type,this.domNode,c)}else this.inherited(arguments)},_handleKeyDown:function(a){var c=this._getKeyCode(a);a&&(null!==c&&c===e.ESCAPE)&&this.cancelEditing()},_commitValue:function(a){var c=this._getContent(a);c!==this._originalValue?c!==this._getContent(this._editValue)?(this.dispatchEvent("valueChanged",this,{editor:this,oldValue:this._originalValue,newValue:a}),this._value=this._getContent(a),this._editValue=a,this._originalValue=
this._getContent(a),this._textArea.set("value",this._getContent(a)),this._renderer._originalValue=a,this.renderer._editValue=this._editValue):this._revertChanges():this._textArea.set("value",this._originalValue);this.stopEditing()},_getContent:function(a){return"string"===typeof a?0===a.indexOf("[")||0===a.indexOf("{")?a.substring(1,a.length-1):a:JSON.stringify(a)},_getNumericArrayCommitValues:function(a){var c=[];a=a.replace(/\[|\]/g,"");0<a.length&&a.split(",").forEach(function(a){a=a.replace(/inf(\s*)/ig,
"Infinity");c.push(parseFloat(a))});return c},_focus:function(){this._textArea&&this._textArea.focusNode&&this._textArea.focusNode.focus&&d.curNode!==this._textArea.focusNode&&d.focus(this._textArea.focusNode)},_getCommitValue:function(){var a;if(this._textArea){var c=this._textArea.get("value"),b=this._outputType||this._inputType;if(this._delimiters&&this._delimiters.length)for(var d=0;d<this._delimiters.length;d+=1)c=c.replace(RegExp(this._delimiters[d],"g"),"\n");if("cell"===b||"char"===b&&-1!==
c.indexOf("\n"))a=this._getCellArrayValue(c);else if("char"===b)a=this._getCharArrayValue(c);else if("numericArrayStr"===b)a=this._getNumericArrayValue(c);else if("numericArray"===b)a=this._getNumericArrayValue(c),a=this._getNumericArrayCommitValues(a);else if("array"===b){if(""===c)return[];a=c.split(/\r\n|\r|\n/g)}}return a},_handleBlurEvent:function(a){if(a===this&&this._getPossibleBooleanFunctionValue(this._commitOnBlur,!0)&&(!this.domNode.contains(document.activeElement)||-1===d.activeStack.indexOf(this.domNode.id))){var c=
this._getCommitValue();c&&this._commitValue(c);this.inherited(arguments)}},_setupInputNode:function(){this._textArea=new a({value:this._value,readOnly:!0,tag:this.createDataTag("TextBoxRenderer","cell"),style:{resize:"none"}});this._textArea.domNode.setAttribute("data-tag",this.createDataTag("textareaeditor"));this.domNode.appendChild(this._textArea.domNode)},postCreate:function(){this._textArea||this._setupInputNode();this.inherited(arguments)},_revertChanges:function(){this._value=this._originalValue},
stopEditing:function(){this._editing&&(this._setReadOnly(!0),this._textArea.set("value",this._originalValue),this.inherited(arguments))},edit:function(){if(!this._editing&&(this._setReadOnly(!1),this.inherited(arguments),this._textArea&&this._textArea.inputNode&&this._textArea.inputNode.focus(),void 0!==this._editValue)){var a=this._getMultiLineEditValue(this._editValue);this._textArea.set("value",a);this._textArea.startup();this._textArea.inputNode.scrollTop=0;c.selectRange(this._textArea.inputNode,
0,0);a=f.hitch(this,"_getFocus");setTimeout(a,0)}},_setReadOnly:function(a){this._textArea&&(!0===a?this._textArea.set("readOnly",!0):this._textArea.set("readOnly",!1))},_getFocus:function(){d.focus(this._textArea.inputNode)},_getMultiLineEditValue:function(a){if("string"===typeof a){if("{}"===a)return this._inputType="cell","";if("[]"===a)return this._inputType="numericArrayStr","";if(0===a.indexOf("{")){this._inputType="cell";if(-1===a.indexOf("'"))return a.substring(1,a.length-1);var c="["+(this._delimiters?
this._delimiters.join(""):",;")+"]";return a.replace(RegExp("(['\"][ ]*"+c+"[ ]*['\"])|([ ]*"+c+"[ ]*['\"])|(['\"][ ]*"+c+"[ ]*)","g"),"\n").replace(/(\{[ ]*['"])|(['"][ ]*\})/g,"")}if(-1!==a.indexOf("'"))return this._inputType="char",a.replace(/'/g,"");0<=a.indexOf("[")&&0<=a.indexOf("]")?this._inputType="numericArrayStr":this._inputType="array";return a.replace("[","").replace("]","").replace(/,/g,"\n").replace(/;/g,"\n")}if(Array.isArray(a)&&0>=a.length)return this._inputType="array","";var b=
JSON.stringify(a);-1!==b.indexOf('"')?this._inputType="array":this._inputType="numericArray";for(var c="",d=0;d<a.length;d+=1)c+=a[d],d<a.length-1&&(c+="\n");if("numericArray"===this._inputType&&(c=c.replace(/Infinity/gi,"inf"),""===c&&"number"===typeof a))return b;if(0<c.lastIndexOf("\n")&&c.lastIndexOf("\n")+1===c.length){for(a=c.trim();0<c.lastIndexOf("\n")&&c.lastIndexOf("\n")+1===c.length;)a+="\n",c=c.substring(0,c.length-1);return a}return c.trim()},_getCellArrayValue:function(a){var c=a;0===
a.trim().length?c="{}":(c=a.replace(/\'/g,"''").replace(/\n/g,"';'"),-1===a.indexOf("{")&&(c="{'"+c),-1===a.indexOf("'}")&&(c+="'}"));return c},_getCharArrayValue:function(a){var c=a;0===a.trim().length?c="''":(c=a.replace(/\n/g,"';'"),0!==a.indexOf("'")&&(c="'"+c),a.lastIndexOf("'")!==a.length-1&&(c+="'"));return c},_getNumericArrayValue:function(a){var c;if(0===a.trim().length)c="[]";else{for(c=a.trim().replace(/\n/g,",");-1!==c.indexOf(",,");)c=c.replace(/,,/g,",");-1===a.indexOf("[")&&(c="["+
c);-1===a.indexOf("]")&&(c+="]")}return c},editOverride:function(a){this._editing||(this._textArea.set("value",a),this.edit())},cancelEditing:function(){this._editing&&(this._textArea.set("value",this._originalValue),this.inherited(arguments))},_getUIValue:function(){return this._textArea.get("value")},_setUIValue:function(a){var c=this._outputType||this._inputType;!a&&"numericArray"===c?a="[ ]":!a&&"cell"===c&&(a="{ }");this._textArea.set("value",a)},setOutputType:function(a){this._outputType=a},
getOutputType:function(){return this._outputType}});g.INPUT_TYPE_CELL_ARRAY="cell";g.INPUT_TYPE_CHAR_ARRAY="char";g.INPUT_TYPE_NUMERIC_ARRAY_STRING="numericArrayStr";g.INPUT_TYPE_NUMERIC_ARRAY="numericArray";g.INPUT_TYPE_JS_ARRAY="array";return g})},"variableeditor/views/editors/TextArea":function(){define(["dojo/_base/declare","mw-form/TextArea","mw-mixins/mixinDependencyValidator"],function(g,f,e){return g(e.validate([f]),{width:"100%",height:60,_validateSizeInput:function(d){"string"===typeof d&&
"%"===d.charAt(d.length-1)||this.inherited(arguments)},_getAdjustedSize:function(d,b,a){if(("width"===d||"height"===d)&&"string"===typeof b){if("%"===b.charAt(b.length-1))return b}else return this.inherited(arguments)}})})},"variableeditor/views/editors/DatetimeEditor":function(){define("variableeditor/views/editors/DatetimeEditor",["dojo/_base/declare","dojo/keys","variableeditor/views/editors/TextBoxEditor"],function(g,f,e){return g("variableeditor.views.editors.DatetimeEditor",[e],{_handleKeyDown:function(d){var b=
this._getKeyCode(d);d&&(null!==b&&b===f.TAB)&&(this._handleTabKey(d.shiftKey),d.preventDefault());this.inherited(arguments)},_handleTabKey:function(d){d?this.goToPreviousField():this.goToNextField()},goToNextField:function(){var d=this._getUIValue();if(d&&"NaT"!==d){var b=this._getNextFieldIndices(d,this._inputBox.inputNode.selectionEnd);this._inputBox.inputNode.selectionStart=b[0];this._inputBox.inputNode.selectionEnd=b[1]}return b},_getNextFieldIndices:function(d,b){var a=d.substring(b,d.length),
a=a.match(/[^a-z0-9]+/i),c=-1,h=1;null!==a&&(c=b+a.index,h=a[0].length);var a=d.substring(c+h,d.length),a=a.match(/[^a-z0-9]+/i),k=d.length;null!==a&&(k=c+h+a.index);return[c+h,k]},goToPreviousField:function(){var d=this._getUIValue();if(d&&"NaT"!==d){var b=this._getPreviousFieldIndices(d,this._inputBox.inputNode.selectionStart);this._inputBox.inputNode.selectionStart=selectionStart;this._inputBox.inputNode.selectionEnd=selectionEnd}return b},_getPreviousFieldIndices:function(d,b){var a=this._reverse(d.substr(0,
b)),a=a.match(/[^a-z0-9]+/i),c=d.length,h=1;null!==a&&(c=b-1-a.index,h=a[0].length);var a=this._reverse(d.substring(0,c-h+1)),a=a.match(/[^a-z0-9]+/i),k=-1;null!==a&&(k=c-h-a.index);selectionStart=k+1;selectionEnd=c-h+1;return[selectionStart,selectionEnd]},_reverse:function(d){for(var b="",a=d.length-1;0<=a;a-=1)b+=d[a];return b},_getUIValue:function(){var d=this._inputBox.inputNode.value;if(void 0===d||null===d||""===d)d="NaT";return d},_setUIValue:function(d){if(void 0===d||null===d||""===d)d="NaT";
this._inputBox.set("value",d)}})})},"variableeditor/views/editors/IconTextBoxEditor":function(){define("variableeditor/views/editors/IconTextBoxEditor",["dojo/_base/declare","variableeditor/views/editors/TextBoxEditor"],function(g,f){return g("variableeditor.views.editors.IconTextBoxEditor",[f],{_setupDomClasses:function(e){this._applyCssClass(e?e.dataType?e.dataType:e["class"]:"char",e?e.isTemporaryValue:!1,!0,this.domNode);this.addCSSClasses("cellRenderer",this.domNode)}})})},"variableeditor/views/editors/OpenvarEditor":function(){define("variableeditor/views/editors/OpenvarEditor",
["dojo/_base/declare","variableeditor/views/editors/_EditorBase","variableeditor/VariableEditorMain"],function(g,f,e){return g("variableeditor.views.editors.OpenvarEditor",[f],{edit:function(){var d=this.getState().editorValue,b=this.getState().workspace;this._openVariable(d,b)},_openVariable:function(d,b){e.getInstance().openVariable(d,b,void 0)},_setReadOnly:function(){}})})},"variableeditor/views/renderers/GroupedColumnRenderer":function(){define("variableeditor/views/renderers/GroupedColumnRenderer",
"dojo/_base/declare dojo/_base/lang dojo/dom-style dojo/dom-construct dijit/registry datatoolsservices/DataToolsUtils variableeditor/views/renderers/_RendererBase variableeditor/views/renderers/_VERendererMixin variableeditor/views/editors/_VEEditorConverterMixin mw-log/Log".split(" "),function(g,f,e,d,b,a,c,h,k,l){return g("variableeditor.views.renderers.GroupedColumnRenderer",[c,h],{_renderers:void 0,_rendererCompleteCallback:void 0,_savedArgs:void 0,constructor:function(a){this.addEventListener("renderersConstructed",
f.hitch(this,this._onRenderersConstructed));this._renderers=[];if(a&&a.table&&a.table.ColumnModelProperties&&a.renderedObject&&a.renderedObject.col&&a.renderedObject.value){for(var c=a.renderedObject,b=parseInt(c.row),d=parseInt(c.col),e=a.table,l=JSON.parse(c.value),t=this,c=function(a){var c=a.declaredClass;a.isInstanceOf(h)||g.safeMixin(a,new h);a.isInstanceOf(k)||g.safeMixin(a,new k);a.declaredClass=c;a._setRendererProperties(l[u],e);a._setupEventListeners(t);t._styleRendererDomNodes(a,b,d,u,
l.length);t._renderers.push(a);parseInt(a.domNode.dataset.idx)===l.length-1&&t.dispatchEvent("renderersConstructed",t,{})},u=0;u<l.length;u+=1)f.mixin(l[u],{row:b,col:d,columnIndex:u}),this._createRendererObjectForGroup(l[u],"groupedcolumnrenderer",a,e,c);this._savedArgs=a}},_createRendererObjectForGroup:function(a,c,h,b,d){var k=null,e=this.getCellIndices(a),f=e.row,e=e.column;try{var g=b.getCellPropertyValue(f,e,c,a);if(g)require([g],function(a){k=new a(h);d&&"function"===typeof d&&d(k)});else return null}catch(w){l.error(w)}return k},
setState:function(a){this.domNode&&(this._setupDomClasses(a),this.inherited(arguments))},_onRenderersConstructed:function(){0<this._renderers.length&&(this._renderersConstructed=!0);this._addRenderersToDomNode()},_addRenderersToDomNode:function(){if(0<this._renderers.length)for(var a=0;a<this._renderers.length;a+=1)this.domNode&&this._renderers[a].domNode&&(this.domNode.appendChild(this._renderers[a].domNode),this._renderers[a].startup())},_setupDomClasses:function(){this.addCSSClasses(["groupedColumnRenderer"],
this.domNode)},_setRendererProperties:function(a,c,e){if(!a.isInvalidCache){var l=this.getCellIndices(a),r=l.row,s=l.column,l=l.columnIndex,t=JSON.parse(a.value);this.setColumnIndex&&this.setColumnIndex(l);this.setRow&&this.setRow(r);this.setColumn&&this.setColumn(s);this.getState&&(l=this.populateRendererState(r,s,a,c),this.setState(l));if(0<this._renderers.length){for(var u,v=0;v<t.length;v+=1){var w=this._renderers[v],l=void 0;u="";if(w&&(l=b.getEnclosingWidget(w.domNode)))u=l.declaredClass;var x=
c.getCellPropertyValue(r,s,"groupedcolumnrenderer",a),y=f.mixin({row:r,col:s,colIndex:v},t[v]);if(this.comparePathToDeclaredClass(x,u))this._renderers[v]._setRendererProperties(y,c,e);else{var B;w&&(B=w.domNode);var D=this;this._createRendererObjectForGroup(y,"groupedcolumnrenderer",this._savedArgs,c,function(a){var b=a.declaredClass;a.isInstanceOf(h)||g.safeMixin(a,new h);a.isInstanceOf(k)||g.safeMixin(a,new k);a.declaredClass=b;a._setRendererProperties(t[v],c,e);D._renderers[v]=a;B?d.place(a.domNode,
B,"replace"):D.domNode.appendChild(a.domNode);a.startup();D._styleRendererDomNodes(a,r,s,v,t.length)});l&&l.destroy()}}if(t.length<this._renderers.length){for(a=this._renderers.length-1;a>=t.length;a-=1)this.domNode.removeChild(this._renderers[a].domNode),this._renderers.splice(a);for(a=0;a<this._renderers.length;a+=1)this._styleRendererDomNodes(this._renderers[a],r,s,a,t.length)}}}},_styleRendererDomNodes:function(c,h,b,d,k){for(var f=100/k+"%",l=0;l<this._renderers.length;l+=1)e.set(this._renderers[l].domNode,
"width",f);d===k-1&&(f=100-(k-1)*(100/k)+"%");e.set(c.domNode,"width",f);e.set(c.domNode,"height","100%");c.domNode.setAttribute("data-row",h);c.domNode.setAttribute("data-col",b);c.domNode.setAttribute("data-idx",d);a.addToClassList(c.domNode,"row_"+h);a.addToClassList(c.domNode,"col_"+b);a.addToClassList(c.domNode,"idx_"+d);a.addToClassList(c.domNode,"variableEditorTableCell");0===d&&a.addToClassList(c.domNode,"firstCell");d===k-1?(a.addToClassList(c.domNode,"lastCell"),0<d&&a.removeFromClassList(this._renderers[d-
1].domNode,"lastCell")):0<d&&a.addToClassList(c.domNode,"middleCell");a.removeFromClassList(c.domNode,"cell")},getCellIndices:function(a){var c=-1,h=-1,b=-1;a&&void 0!==a.row&&(c=parseInt(a.row));a&&void 0!==a.col&&(h=parseInt(a.col));a&&void 0!==a.columnIndex&&(b=parseInt(a.columnIndex));return{row:c,column:h,columnIndex:b}},postCreate:function(){this._renderersConstructed&&this._addRenderersToDomNode();this.inherited(arguments);this._removeListeners()},startup:function(){if(0<this._renderers.length)for(var a=
0;a<this._renderers.length;a+=1)this._renderers[a].startup&&this._renderers[a].startup()},onValueChanged:function(a){var c=null;a.data.editor?c=a.data.editor:a.data.renderer&&(c=a.data.renderer);null!==c&&f.mixin(a.data,{index:this._renderers.indexOf(c)});this.dispatchEvent(a.type,this,a.data)},onEditingStarted:function(a){this.dispatchEvent(a.type,this,a.data)},onEditingStopped:function(a){this.dispatchEvent(a.type,this,a.data)},onMouseDown:function(a){f.mixin(a.data,{index:this._renderers.indexOf(a.data.renderer)});
this.dispatchEvent(a.type,this,a.data)},onMouseEnter:function(a){f.mixin(a.data,{index:this._renderers.indexOf(a.data.renderer)});this.dispatchEvent(a.type,this,a.data)},onMouseUp:function(a){this.dispatchEvent(a.type,this,a.data)},_setReadOnly:function(){},comparePathToDeclaredClass:function(a,c){var h=a.split("/"),b=c.split("."),d=!0;if(h.length===b.length)for(var k=0;k<h.length&&d;k+=1)d=h[k]===b[k];else d=!1;return d}})})},"variableeditor/views/UITableViews":function(){require("variableeditor/views/UITableArrayView variableeditor/views/UITableTableView variableeditor/views/editors/UITableEditor variableeditor/views/editors/UITableStringEditor variableeditor/views/editors/UITableLogicalEditor variableeditor/views/editors/UITableMWComboBox variableeditor/views/editors/UITableNonEditableComboboxEditor variableeditor/views/editors/UITableColumnTextBoxEditor".split(" "),
function(){})},"variableeditor/views/editors/UITableEditor":function(){define("variableeditor/views/editors/UITableEditor",["dojo/_base/declare","variableeditor/views/editors/TextBoxEditor"],function(g,f){return g("variableeditor.views.editors.UITableEditor",[f],{_setUIValue:function(e){var d=e;try{if(null===e||void 0===e)d=""}catch(b){}this._inputBox.set("value",d)}})})},"variableeditor/views/editors/UITableStringEditor":function(){define("variableeditor/views/editors/UITableStringEditor",["dojo/_base/declare",
"datatoolsservices/DataToolsUtils","variableeditor/views/editors/StringEditor"],function(g,f,e){return g("variableeditor.views.editors.UITableStringEditor",[e],{setValue:function(d,b){var a=f.stripOuterDoubleQuotes(d);this.inherited(arguments,[a,b])},_setUIValue:function(d){var b=f.stripOuterDoubleQuotes(d);this.inherited(arguments,[b])},setEditValue:function(d,b){var a=f.stripOuterDoubleQuotes(d);this.inherited(arguments,[a,b])},_handleFormatting:function(d,b,a){var c=f.stripOuterDoubleQuotes(b);
return this.inherited(arguments,[d,c,a])}})})},"variableeditor/views/editors/UITableLogicalEditor":function(){define("variableeditor/views/editors/UITableLogicalEditor",["dojo/_base/declare","variableeditor/views/editors/UITableEditor"],function(g,f){return g("variableeditor.views.editors.UITableLogialEditor",[f],{_setUIValue:function(e){var d=e;try{"1"===e?d="true":"0"===e&&(d="false")}catch(b){}this._inputBox.set("value",d)}})})},"variableeditor/views/editors/UITableMWComboBox":function(){define(["dojo/_base/declare",
"mw-form/ComboBox","mw-mixins/mixinDependencyValidator"],function(g,f,e){return g(e.validate([f]),{_isMenuOpenable:!1,_handleArrowNodeMouseDown:function(d){this._isMenuOpenable&&this.inherited(arguments)}})})},"variableeditor/views/editors/UITableNonEditableComboboxEditor":function(){define("variableeditor/views/editors/UITableNonEditableComboboxEditor","dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/on variableeditor/views/editors/_EditorBase variableeditor/views/editors/UITableMWComboBox".split(" "),
function(g,f,e,d,b,a){return g("variableeditor.views.editors.UITableNonEditableComboboxEditor",[b],{_comboBox:void 0,_categories:[],_onChangeListener:void 0,_onMouseDownListener:void 0,setValue:function(a,h){a&&a.hasOwnProperty("value");this.inherited(arguments)},setState:function(a){if(this.domNode){if(a&&a.categories){this._categories=[];for(var h=0;h<a.categories.length;h+=1)this._categories.push({label:a.categories[h],value:a.categories[h]});this._createComboBox()}this.inherited(arguments)}},
_setupDomClasses:function(){this.addCSSClasses(["variableEditorRenderers","cell","cellRenderer"],this.domNode);this.addCSSClasses("UITableNonEditable",this.domNode)},_createComboBox:function(){this._comboBox&&this._comboBox.isInstanceOf&&this._comboBox.isInstanceOf(a)?(this._setUIItems(this._categories),this._setUIValue(this._value)):(this._comboBox=new a({items:this._categories,editable:!1}),this._setupDomClasses(),this._setReadOnly(!0),this._setUIValue(this._value),this._onChangeListener=d.pausable(this._comboBox,
"change",f.hitch(this,"_onChangeHandler")),e.empty(this.domNode),this.domNode.appendChild(this._comboBox.domNode),this._comboBox.startup())},postCreate:function(){this._comboBox||this._createComboBox();this.inherited(arguments)},stopEditing:function(){},edit:function(){},_getDefaultState:function(){return{categories:[],isProtected:!0}},_onChangeHandler:function(a){this._onChangeListener.pause();this.setValue(a.mwEventData.newValue,"client");this._onChangeListener.resume()},_getUIValue:function(){return this._comboBox.value},
_setUIValue:function(a){this._comboBox&&this._onChangeListener&&(this._onChangeListener.pause(),"\x3cundefined\x3e"===a?this._comboBox.set("placeholder",a):a!==this._getUIValue()&&this._comboBox.set("value",a),this._onChangeListener.resume())},_setUIItems:function(a){this._onChangeListener.pause();this._comboBox.set("items",this._categories);this._onChangeListener.resume()},getStyleNode:function(a){if("backgroundColor"===a)return this.domNode},_setReadOnly:function(a){this._comboBox&&(this._comboBox._isMenuOpenable=
!a,a?this.addCSSClasses(this._notEditableCSSClass,this._comboBox.domNode):this.removeCSSClasses(this._notEditableCSSClass,this._comboBox.domNode))}})})},"MOTW/modules/messageService/index":function(){define(["dojo/Deferred","mw-messageservice/MessageService"],function(g,f){return{initialize:function(e){e=new g;f.internalMotwDisableStart();e.resolve({exports:{messageService:f}});return e.promise}}})},"MOTW/modules/figure/index":function(){define(["dojo/Deferred"],function(g){return{initialize:function(f){f=
new g;f.resolve({exports:{figure:{}}});return f.promise}}})},"MOTW/modules/matlabbreakpoint/index":function(){define(["dojo/Deferred"],function(g){return{initialize:function(f){f=new g;f.resolve({exports:{matlabbreakpoint:{}}});return f.promise}}})},"MOTW/modules/sound/index":function(){define(["dojo/Deferred","MOTW/audio/AudioManager"],function(g,f){return{initialize:function(e){e=new g;var d=new f({});d.start();e.resolve({exports:{audioManager:d}});return e.promise},reset:function(e){e.audioManager.stop()}}})},
"MOTW/audio/AudioManager":function(){define("dojo/_base/declare dojo/_base/lang dojo/has dojo/i18n!MOTW/l10n/nls/motw mw-messageservice/MessageService mw-log/Log MOTW/dialog/dialogStateManager MOTW/iframecontainer/IframeContainerConnectionUtil".split(" "),function(g,f,e,d,b,a,c,h){return g([],{constructor:function(a){this.channel=a.channel||"/audio";this.messageService=a.messageService||b.messageService},start:function(){this._started||(this.messageService.subscribe(this.channel+"/*",this._handleMessage,
this),this._started=this.ready=!0)},stop:function(){this._started&&(this.messageService.unsubscribe(this.channel+"/*",this._handleMessage,this),this._started=!1)},isStarted:function(){return this._started},_soundHandler:function(b){var f=document.createElement("audio");f.addEventListener("loadeddata",function(){f.play()},!1);f.addEventListener("error",function(){a.error("Could not play audio");e("trident")?c.openNotificationAlertDialog(d.audioNoticeTitle,d.audioUnsupportedBrowserText,{}):c.openNotificationAlertDialog(d.audioNoticeTitle,
d.audioUnplayableText,{})},!1);f.setAttribute("src",h.getRemoteConnectionProperties(b).host)},_handleMessage:function(a){0<a.channel.indexOf("sound")&&this._soundHandler(a.data)}})})},"MOTW/dialog/dialogStateManager":function(){define(["dojo/_base/declare","mw-notifications/Notifications","MOTW/dialog/MotwDialogUtils"],function(g,f,e){var d=null;return d=new (g([],{openStatus:!1,constructor:function(b){},handleOpenStatus:function(b,a,c,h,d){var l;if(!this.openStatus){c=c||{};var m=this,p;"displayFault"===
h?(p=c.closeCallBack?c.closeCallBack:function(){},c.closeCallBack=function(a){m.openStatus=!1;p(a)}):(p=c.closeCallback?c.closeCallback:function(){},c.closeCallback=function(a){m.openStatus=!1;p(a)});"displayFault"===h?l=e.displayFault(a,b,d,c):"displayAlertDialog"===h?l=f.displayAlertDialog(b,a,c):"displayConfirmDialog"===h&&(l=f.displayConfirmDialog(b,a,c));this.openStatus=!0}return l},openNotificationAlertDialog:function(b,a,c){return this.handleOpenStatus(b,a,c,"displayAlertDialog")},openNotificationConfirmDialog:function(b,
a,c){return this.handleOpenStatus(b,a,c,"displayConfirmDialog")},openMotwFaultDialog:function(b,a,c,h){return this.handleOpenStatus(b,a,h,"displayFault",c)}}))})},"MOTW/dialog/MotwDialogUtils":function(){define("dojo/_base/declare dojo/_base/lang mw-dialog-utils/DialogUtils MW/uiframework/uicontainer/DockingManager MOTW/layout/Layout mw-log/Log".split(" "),function(g,f,e,d,b,a){f=null;return f=new (g([],{constructor:function(c){this.defaultHandlers={logout:function(c,b){this.wraService&&this.wraService.logout?
this.wraService.logout():a.warn("No WRA service found, not logging out.");if(b)b.onClose()},logoutWithoutSessionSave:function(c,b){this.wraService&&this.wraService.logoutWithoutSessionSave?this.wraService.logoutWithoutSessionSave():a.warn("No WRA service found, not logging out.");if(b)b.onClose()}};d.isUndockedWindow()||e.setLayout(b)},setUp:function(a){this.wraService=a},_getDefaultButtonHandler:function(a){return this.defaultHandlers[a]?this.defaultHandlers[a]:a},_convertButtonsThatHaveMOTWDefaultHandlers:function(a){var h=
[];if(a){a=!(a instanceof Array)?[a]:a;var b=this;a.forEach(function(a){var c={},d=Object.keys(a),e;if(1===d.length&&b.defaultHandlers[a[d[0]]])for(e in a)a.hasOwnProperty(e)&&(c.name=e,c.buttonHandler={},c.buttonHandler.handler=b._getDefaultButtonHandler(a[e]),c.buttonHandler.scope=b);else a.buttonHandler&&(a.buttonHandler=b._getDefaultButtonHandler(a.buttonHandler)),c=a;h.push(c)});return h}},displayMessage:function(a,h,b,d){d=d||{};d.DialogType="message";d.layoutId="messageDialog";b=this._convertButtonsThatHaveMOTWDefaultHandlers(b);
return e.displayModalDialog(a,h,b,d)},displayFault:function(a,h,b,d){d=d||{};d.DialogType="fault";d.layoutId="faultDialog";b=this._convertButtonsThatHaveMOTWDefaultHandlers(b);return e.displayModalDialog(a,h,b,d)},closeOpenDialogs:function(){b.removeWidgetsWithParentId("dialog")}}))})},"MOTW/layout/Layout":function(){define(["./LayoutDataService"],function(g){var f=null;null===f&&(f=new g);return f})},"MOTW/layout/LayoutDataService":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/_base/array",
"MOTW/layout/LayoutStrategy","mw-store-utils/InMemoryStore"],function(g,f,e,d,b){return g(null,{constructor:function(a){this.layoutStore=new b;this.layoutStrategy=new d},addWidget:function(a,c,h,b){a&&(c&&h)&&this._callWithModules(a,function(d){!d||0===d.length?(d=this.layoutStrategy.getModuleMetaDataFromId(c),d.parentId&&this.ensureParentExistsInStore(d.parentId),d.id=a,d.widget=h,f.mixin(d,b),this.layoutStore.newItem(d)):h.destroyRecursive()})},removeWidget:function(a){var c=this;this._callWithModule(a,
function(a){var b="root"===a.parentId?null:this.layoutStrategy.getModuleMetaDataFromId(a.parentId);this.layoutStore.deleteItem(a);this.layoutStore.fetch({query:{parentId:a.parentId},onComplete:function(d){!d||0===d.length?c.removeWidget(a.parentId):c.layoutStrategy.getNextFocusableModule(a.id)?c.focusWidget(c.layoutStrategy.getNextFocusableModule(a.id)):(!b||!b.hasOwnFocusPolicy)&&c.focusWidget(d[d.length-1].id)}})})},removeWidgetsWithParentId:function(a){var c=this;this.layoutStore.fetch({query:{parentId:a},
onComplete:function(a){a.forEach(function(a){c.removeWidget(a.id)})}})},removeWidgetsWithLayoutId:function(a){var c=this;this.layoutStore.fetch({query:{layoutId:a},onComplete:function(a){a.forEach(function(a){c.removeWidget(a.id)})}})},closeAppWindows:function(){var a=this;this.layoutStore.fetch({query:{layoutId:"appWindow"},onComplete:function(c){e.forEach(c,function(c){a.removeWidget(c.id)})}})},showWidget:function(a){this._callWithModule(a,function(a){var h=this.layoutStore;this.layoutStore.fetch({query:{parentId:a.parentId,
active:!0},onItem:function(a){h.setValue(a,"active",!1)}});this.layoutStore.setValue(a,"active",!0)})},focusWidget:function(a){this.showWidget(a);this._callWithModule(a,function(c){var h=this.layoutStore;this.layoutStore.fetch({query:{focused:!0},onItem:function(c){c.id!==a&&h.setValue(c,"focused",!1)}});this.layoutStore.setValue(c,"focused",!0)})},disableWidget:function(a){this.updateWidget(a,"enabled",!1)},enableWidget:function(a){this.updateWidget(a,"enabled",!0)},updateWidget:function(a,c,h){this._callWithModule(a,
function(a){this.layoutStore.setValue(a,c,h)})},updateWidgetsWithLayoutId:function(a,c,h){var b=this;this.layoutStore.fetch({query:{layoutId:a},onComplete:function(a){a.forEach(function(a){b.updateWidget(a.id,c,h)})}})},ensureParentExistsInStore:function(a){this._callWithModules(a,function(c){if(!c||0===c.length)c=this.layoutStrategy.getModuleMetaDataFromId(a),c.id=a,c.parentId&&"root"!==c.parentId&&this.ensureParentExistsInStore(c.parentId),this.layoutStore.newItem(c)})},_callWithModule:function(a,
c){this._callWithModules(a,function(a){e.forEach(a,function(a){c.call(this,a)},this)})},_callWithModules:function(a,c){var h=this;this.layoutStore.fetch({query:{id:a},onComplete:function(a){c.call(h,a)}})}})})},"MOTW/layout/LayoutStrategy":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/sniff dojo/has!touch?MOTW/layout/LayoutConfigTouch MOTW/layout/LayoutConfig".split(" "),function(g,f,e,d,b,a){return g(null,{constructor:function(){this.layoutConfig=b?new b:new a},
getNextFocusableModule:function(a){return this.layoutConfig.getNextFocusableModule(a)},getModuleMetaDataFromId:function(a){var h,b;h=this.layoutConfig.getDefaultLayoutConfig();var d=this.layoutConfig.getDefaultModuleConfig();a=this._fallBackToMggForIE(a);if(b=this._findParentConfig(h,a))return h=e.filter(b.modules,function(h){return h.layoutId===a})[0],h.parentId=b.layoutId,delete h.modules,f.mixin(d,h),d;throw Error("No module for the supplied key: "+a);},_findParentConfig:function(a,h){var b,d,
e;if(a.modules){d=a.modules.length;for(b=0;b<d;b+=1)if(e=a.modules[b].layoutId===h?a:this._findParentConfig(a.modules[b],h))return e}},_fallBackToMggForIE:function(a){d("ie")&&"mggPopup"===a&&(a="mggDocked");return a}})})},"MOTW/iframecontainer/IframeContainerConnectionUtil":function(){define(["mw-remote/Remote"],function(g){var f=/http(?:s)?:\/\/localhost:[3,6]1[5-9][1-9][1-9]\//g;return{getRemoteConnectionProperties:function(e){var d=g.getComputeSessionId()||"test",b=g.getWorkerRoutingKey()||"test",
a=g.getWorkerRoutingHost()||"test";e=f.test(e)?e.replace(f,a):a+e;e+=(0<=e.indexOf("\x3d")?"\x26":"?")+"routingkey\x3d"+b+"\x26computeToken\x3d"+d;return{routingKey:b,sessionId:d,host:e,href:a}}}})},"MOTW/modules/authorizationDetailsService/index":function(){define(["dojo/Deferred","MOTW/authorizationdetails/AuthorizationDetailsDataService"],function(g,f){return{initialize:function(e){e=new g;var d=new f;e.resolve({exports:{authorizationDetailsService:d}});return e.promise},reset:function(e){}}})},
"MOTW/authorizationdetails/AuthorizationDetailsDataService":function(){define(["dojo/_base/declare","mw-remote/Remote","mw-log/Log"],function(g,f,e){return g(null,{constructor:function(){f.registerResponseHandler("AuthorizationDetailsResponse",this._handleAuthorizationDetailsResponse,this);f.registerFaultHandler("AuthorizationDetails",this._handleAuthorizationDetailsError,this)},getAuthorizedProductIds:function(d){f.sendMessage({AuthorizationDetails:[{authorizationProperties:{authorizationAttribute:"authorizedProductIds"}}]},
{callback:d})},_handleAuthorizationDetailsResponse:function(d,b){d.forEach(function(a){b.callback(a.authorizationProperties.authorizedProductIds)},this)},_handleAuthorizationDetailsError:function(d){e.assert(!1,"Received the following error: "+d)}})})},"MOTW/modules/uiConfig/index":function(){define(["dojo/Deferred"],function(g,f){return{modulesLoded:!1,initialize:function(e){e=new g;e.resolve({exports:{uiConfigService:{layoutMap:{}}}});return e.promise}}})},"MOTW/modules/iframeMessageService/index":function(){define(["dojo/Deferred",
"dojo/_base/lang","dojo/on","MOTW/openwith/module/message/IframeMessageService","MOTW/openwith/module/manifest/ManifestService"],function(g,f,e,d,b){return{initialize:function(a){var c=new g,h=new d;a=new b({iframeMessageService:h,wraService:a.wraService});c.resolve({exports:{iframeMessageService:h,manifestService:a}});return c.promise}}})},"MOTW/openwith/module/message/IframeMessageService":function(){define(["dojo/_base/lang","dojo/_base/declare","dojo/Deferred","dojo/Evented","mw-log/Log"],function(g,
f,e,d,b){return f([d],{ALLOWED_INCOMING_MESSAGES:["openWithMessage","loadEmptyExampleMessage","errorLoadingContentMessage"],ALLOWED_INCOMING_DOMAINS:["https://drive-motw-integ.matlab.com","https://login.mathworks.com","https://www.mathworks.com"],ALLOWED_OUTGOING_MESSAGES:["ready","close","status","disconnect","reload"],constructor:function(){var a=window.addEventListener?"addEventListener":"attachEvent",c=window.addEventListener?"removeEventListener":"detachEvent",h="attachEvent"===a?"onmessage":
"message",b=g.hitch(this,this._receiveFcn);this._listener={add:function(){window[a](h,b,!1)},remove:function(){window[c](h,b)}};this._listener.add();this._queue=new e;this.ALLOWED_INCOMING_DOMAINS.push(window.location.protocol+"//"+window.location.host)},start:function(){this.hasStarted()||(this._queue.resolve(),this._queue=null)},stop:function(){this._queue=new e},destroy:function(){this._listener.remove();this._listener=null},_receiveFcn:function(a){var c,h=a.message?a.message:a.data;-1<this.ALLOWED_INCOMING_DOMAINS.indexOf(a.origin)&&
this.ALLOWED_INCOMING_MESSAGES.forEach(function(a){var b=a+":";0===h.indexOf(b)&&(c=h.substring(b.length),this._queue?this._queue.then(g.hitch(this,function(){this.emit(a,JSON.parse(c))})):this.emit(a,JSON.parse(c)))},this)},postMessage:function(a,c){this.ALLOWED_OUTGOING_MESSAGES.forEach(function(h){h===a&&(window.opener?window.opener.postMessage(JSON.stringify({message:a,data:c}),"*"):window.parent.postMessage(JSON.stringify({message:a,data:c}),"*"))})},hasStarted:function(){return!this._queue}})})},
"MOTW/openwith/module/manifest/ManifestService":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/request/xhr dojo/dom-class dojo/on dojo/i18n!MOTW/l10n/nls/motw dojo/Deferred mw-notifications/Notifications".split(" "),function(g,f,e,d,b,a,c,h,k){return g([],{constructor:function(c){this.iframeMessageService=c.iframeMessageService;this.wraService=c.wraService;this._manifestHandler=null;this._obtainedManifestHandler=new h;a(this.iframeMessageService,"openWithMessage",f.hitch(this,
this._onManifestMessage));a(this.iframeMessageService,"loadEmptyExampleMessage",f.hitch(this,this._onEmptyExampleRequest));a(this.iframeMessageService,"errorLoadingContentMessage",f.hitch(this,this._handleGetExampleError))},_onManifestMessage:function(a){this._handleManifestLogin(a).then(function(){this._obtainedManifestHandler.then(function(){this._manifestHandler.loadManifest(a)}.bind(this))}.bind(this))},_onEmptyExampleRequest:function(a){this._handleManifestLogin(a).then(function(){this._obtainedManifestHandler.then(function(){this._manifestHandler.populateEmptyExample(a)}.bind(this))}.bind(this))},
_handleManifestLogin:function(a){a.workerConfiguration&&a.workerConfiguration.mwaToken?this.wraService.login("","",a.workerConfiguration.mwaToken):this.wraService.login("anonymous","anonymous");a=new h;a.resolve();return a.promise},_handleGetExampleError:function(a){this._handleManifestLogin(a).then(function(){this._obtainedManifestHandler.then(function(){this._manifestHandler._handleGetExampleError(a.targetInformation.errMsg)}.bind(this))}.bind(this))},setManifestHandler:function(a){this._manifestHandler=
a;this._obtainedManifestHandler.resolve()}})})},"MOTW/modules/core/index":function(){define("dojo/Deferred dojo/_base/connect dojo/_base/lang dojo/on MOTW/motw/CoreActions addressbar-ui/AddressBarService currentfolderbrowser-ui/service/FileDataService currentfolderbrowser-ui/service/FileDataServiceFaultHandler MOTW/ExecutionDataService MOTW/browser/BrowserDataService MOTW/motw/feature/FeatureDataService MOTW/motw/ShadowDataService mw-actiondataservice/ActionDataService mw-filename-utils/FileNameUtil pathdataservice-js/js/PathDataService pathdataservice-js/js/PathDataServiceFaultHandler searchservice-js/js/SearchService MOTW/motw/MotwApp".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u){return{initialize:function(v){var w=new g,x=function(a){L.executionEval(a)},y=new r({});u.pathService=y;var B=new t({}),D=new n({nameSpace:"/actions/main"});u.actionService=D;var E=new a({}),F=new c({pathService:y});u.fileDataService=F;F.setWraDataService(v.wraService);new h({fileDataService:F});var I=new s({pathDataService:y}),L=new k({actionService:D,pathDataService:y,fileDataService:F});u.executionService=L;var C=new m({executionService:L,pollableFeatures:["nullsession",
"geckobutton"]}),M=new p({executionService:L}),G=new l({actionService:D}),x=function(a){L.executionEval(a)};d(y,"CWDChanged",function(a){a&&F.currentDirectory(q.pathFromFileInfo(a))});f.connect(F,"onCurrentFolderChange",function(a){a&&y.setMATLABCWD(q.pathFromFileInfo(a))});b.setup();v.workerReady.then(e.hitch(this,"_start",{pathService:y,searchService:B,addressBarService:E,fileDataService:F}));w.resolve({exports:{pathService:y,searchService:B,actionService:D,addressBarService:E,fileDataService:F,
executionService:L,featureService:C,browserService:G,shadowService:M,helpUrlHandler:x,pathMessageFaultHandler:I}});return w.promise},_start:function(a){a.pathService.start();a.searchService.start();a.addressBarService.start();a.fileDataService.start()}}})},"MOTW/motw/CoreActions":function(){define("dojo/_base/lang dojo/_base/window dojo/aspect dojo/dom-construct dojo/on dijit/registry dojo/dom dojo/query mw-overlay-utils/BusyOverlay mw-form/CheckBox mw-log/Log mw-dialog-utils/DialogDisplayUtilities mw-remote/messages/ClientType MOTW/dialog/NewFileFolderUtil MOTW/dialog/SaveAsDialog MOTW/dialog/SpecifyNewFilenameDialog MOTW/dialog/SupportedFileNameUtil currentfolderbrowser-ui/actions/gds/OpenAction currentfolderbrowser-ui/actions/gds/DownloadAction MW/uiframework/FeatureDetectionService MOTW/motw/MotwApp MOTW/motw/MotwDefaultLayout MOTW/motw/ThreeColumnLayout MOTW/motw/About MOTW/motw/ActionIdConstants mw-filename-utils/FileNameUtil MW/uiframework/UIContainer mw-notifications/Notifications matlab_preferences/preferencesUI/PreferencesDialog matlab_preferences/preferencesUI/PreferenceUIFactory dojo/i18n!MOTW/l10n/nls/motw dojo/i18n!MOTW/l10n/nls/fileTemplates dojo/i18n!mw-dialog-utils/l10n/nls/dialog MOTW/feedback/FeedbackDialogCreator MOTW/editor/plugins/save/MatlabOnlineSaveHandlerFactory".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x,y,B,D,E,F,I,L,C,M,G,N,P,R,S){var K={},Q={setService:function(a){for(var c in a)K[c]=a[c]},saveCallback:function(){S.getInstance().save(T)},setup:function(){if(!K.fileDataService||!K.executionService||!K.wraService)K.fileDataService=x.fileDataService,K.executionService=x.executionService,K.layoutService=x.layoutService,K.editorService=x.editorService,K.wraService=x.wraService,K.uiContainer=x.uiContainer,K.PreferenceSettingsService=x.PreferenceSettingsService,
K.commandWindow=x.commandWindow,K.findFilesService=x.findFilesService;Q.newFileCallback=function(a){var c="",h="",d=function(){if(c&&""!==c&&a.currentWorkingFolder){var b=F.pathFromFileInfo(a.currentWorkingFolder),d=null,k=null,e=""!==h?h.getFileName():c.getFileName(),d=F.createEmptyFileObject(b,e),k=F.getFileNameNoExtension(e);d.content=a.fileContents||"";I.windowContainsASingleUndockedDocument()&&K.editorService.setUndockUponOpen(d.fileInfo);a.ignoreTemplates||(b={fileName:k,fileNameCaps:k.toUpperCase()},
d.content=Q.updateFileContent(d.content,b));"mlx"!==F.getFileNameExtension(e)?K.fileDataService.createFile(d,!1):(K.fileDataService.openedFilesDataStore.put(dojo.mixin(d,{modifiedDate:null,savePending:!1,id:F.pathFromFileInfo(d.fileInfo)})),K.fileDataService.onFileOpen(d))}V("newfile")},k=function(){V("newfile");b.emit(document.body,"restorefocus",{bubbles:!0})},e=G["new"+a.fileLabel+"DialogNameLabel"],f=G["new"+a.fileLabel+"DialogTitle"],l="";a.currentWorkingFolder&&(l=F.pathFromFileInfo(a.currentWorkingFolder));
c=q.createForm({title:f,inputLabel:e,okAction:function(){if(!c.okButton.disabled){var a=c.getFileName();!t.SUPPORTED_FILENAME_PATTERN.test(a)||a.length>F.MATLAB_NAME_LENGTH?h=new s({fileDataService:K.fileDataService,filename:a,okAction:d,cancelAction:k,fileLocation:l}):d()}},cancelAction:k,dialogType:q.FILE_DIALOG,fileDataService:K.fileDataService,startValue:a.fileExtension,fileLocation:l});c.onClose=function(){V("newfile");b.emit(document.body,"restorefocus",{bubbles:!0})};$(c,{id:"newfile",layoutId:"newDialog",
title:f})};Q.setupComplete=!0},updateFileContent:function(a,c){return g.replace(a,c)}},U=function(a){!0===w.getFeatureStatus(w.FeatureNames.MATLAB_LOCAL)?K.executionService.executionEval("web('"+a+"', '-browser')"):f.global.open(a)};Q.confirmDialogOpen=!1;Q.importStarted=!1;var T=function(c){return{icon:"warning",buttonText:[P.ok,P.cancel],defaultAcceptButton:1,defaultCancelButton:2,closeCallback:function(d){if(1===d.response){"function"===typeof c?c():K.executionService.executionEval(c,K.executionService.streamingEval);
d=!1;var k=h(".mwConfirmDialog .confirmationDialogCheckBox")[0];(k=a.getEnclosingWidget(k))&&(d=k.get("checked"));!0===d&&("clc"===c?K.PreferenceSettingsService.setSetting(["matlab","confirmationdialogs"],"CommandWindowClearConfirmation",!1):("clear"===c||"clear all"===c)&&K.PreferenceSettingsService.setSetting(["matlab","confirmationdialogs"],"WorkspaceBrowserClearConfirmation",!1))}Q.confirmDialogOpen&&(Q.confirmDialogOpen=!1);b.emit(document.body,"restorefocus",{bubbles:!0})}}},X,$=function(a,
c){if(K.layoutService)K.layoutService.addWidget(c.id,c.layoutId,a,c);else{var h={widget:a,refocus:!1};g.mixin(h,c);X=(new p).createModalDialogWrapper(h);X.show();a.startup()}},V=function(a){K.layoutService?K.layoutService.removeWidget(a):X&&(X.destroyRecursive(),X=null)};Q.actions=[{id:E.NEW_FIGURE,enabled:!0,text:G.newFigureLabel,icon:"icon_new_figure_24",quickAccessIcon:"icon_new_figure_16",callback:function(){K.executionService.executionEval("figure",K.executionService.streamingEval)}},{id:E.CLEAR_COMMAND_WINDOW,
enabled:!0,text:G.clearCommandWindowLabel,description:G.clearCommandWindowDescription,icon:"icon_clear_command_window_24",quickAccessIcon:"icon_clear_command_window_16",popupTag:"motwToolstrip.matlabTab.code.clearCommands.list",callback:function(){var a=G.clearCommandsDialogTitle,c=d.create("div"),h=d.create("div");h.textContent=G.clearCommandWindowDialogMessage;var b=new l({text:"Do not show this prompt again","class":"confirmationDialogCheckBox"});c.appendChild(h);c.appendChild(document.createElement("br"));
c.appendChild(b.domNode);var k=T("clc");b.startup();K.PreferenceSettingsService.getSetting(["matlab","confirmationdialogs"],"CommandWindowClearConfirmation").then(g.hitch(this,function(h){!0===h.value?Q.confirmDialogOpen||(L.displayConfirmDialog(a,c,k),Q.confirmDialogOpen=!0):K.executionService.executionEval("clc",K.executionService.streamingEval)}))}},{id:E.NEW_FILE,enabled:!0,text:G.newFileLabel,description:G.newFileDescription,icon:"icon_new_script_plus_24",quickAccessIcon:"new_16",popupTag:"motwToolstrip.editorTab.file.new.newList",
callback:function(a){Q.newFileCallback({fileExtension:".m",currentWorkingFolder:K.fileDataService.currentWorkingFolder,fileContents:a.fileContents,fileLabel:"File",ignoreTemplates:a.ignoreTemplates?a.ignoreTemplates:!1})}},{id:E.NEW_FILE_LIVE_EDITOR,enabled:!0,text:G.newFileLabel,description:G.newFileDescription,icon:"icon_new_script_plus_24",quickAccessIcon:"new_16",popupTag:"motwToolstrip.liveEditorTab.file.new.newList",callback:function(a){Q.newFileCallback({fileExtension:".m",currentWorkingFolder:K.fileDataService.currentWorkingFolder,
fileContents:a.fileContents,fileLabel:"File",ignoreTemplates:a.ignoreTemplates?a.ignoreTemplates:!1})}},{id:E.FIND_FILES,enabled:!0,text:"Find Files",description:"Find Files",callback:function(a){K.findFilesService.openFindFilesPopUp()}},{id:E.NEW_LIVE_SCRIPT,enabled:!0,icon:"icon_new_live_script_24",quickAccessIcon:"icon_new_live_script_16",text:G.newLiveScriptLabel,description:G.newLiveScriptDescription,callback:function(a){Q.newFileCallback({fileExtension:".mlx",currentWorkingFolder:K.fileDataService.currentWorkingFolder,
fileContents:"",fileLabel:"LiveScript",ignoreTemplates:!0})}},{id:E.PREFERENCES,text:G.preferencesLabel,description:G.preferencesDescription,icon:"settings_24",quickAccessIcon:"settings_16",callback:function(){x.preferenceUI=x.preferencePanelSelection?M.getInstance(x.preferencePanelSelection):M.getInstance();x.preferenceUI.on("selectionchange",g.hitch(this,function(a){x.preferencePanelSelection=a.id}));x.preferenceDialog=C.createDialog(x.preferenceUI)}},{id:E.NEW_FUNCTION,enabled:!0,text:G.newFunctionLabel,
icon:"icon_new_function_24",quickAccessIcon:"icon_new_function_16",callback:function(){Q.newFileCallback({fileExtension:".m",currentWorkingFolder:K.fileDataService.currentWorkingFolder,fileContents:N.functionContent,fileLabel:"Function"})}},{id:E.NEW_LIVE_FUNCTION,enabled:!0,icon:"icon_new_live_function_24",text:"Live Function",description:"New Live Function",callback:function(a){Q.newFileCallback({fileExtension:".mlx",currentWorkingFolder:K.fileDataService.currentWorkingFolder,fileContents:"liveFunction",
fileLabel:"LiveFunction",testValue:!0,ignoreTemplates:!0})}},{id:E.NEW_EXAMPLE,enabled:!0,text:G.newExampleLabel,icon:"icon_new_example_24",quickAccessIcon:"icon_new_example_16",callback:function(){Q.newFileCallback({fileExtension:".m",currentWorkingFolder:K.fileDataService.currentWorkingFolder,fileContents:N.exampleContent,fileLabel:"Example"})}},{id:E.NEW_CLASS,enabled:!0,text:G.newClassLabel,icon:"icon_new_class_24",quickAccessIcon:"icon_new_class_16",callback:function(a){Q.newFileCallback({fileExtension:".m",
currentWorkingFolder:K.fileDataService.currentWorkingFolder,fileContents:N.classContent,fileLabel:"Class"})}},{id:E.NEW_FOLDER,enabled:!0,icon:"open_24",quickAccessIcon:"open_16",text:G.newFolderLabel,callback:function(){var a="",c=K.fileDataService.currentWorkingFolder,h=G.newFolderDialogNameLabel,d=G.newFolderDialogTitle,k="";c&&(k=F.pathFromFileInfo(c));a=q.createForm({title:d,inputLabel:h,okAction:function(){if(a&&""!==a&&c){var h=F.pathFromFileInfo(c),h=F.createFilePath(h,a.getFileName()),h=
{content:"",fileInfo:F.folderInfoFromPath(h)};K.fileDataService.createFile(h,!1)}K.layoutService.removeWidget("newfolder")},cancelAction:function(){K.layoutService.removeWidget("newfolder");b.emit(document.body,"restorefocus",{bubbles:!0})},dialogType:q.FOLDER_DIALOG,fileDataService:K.fileDataService,fileLocation:k});a.onClose=function(){K.layoutService.removeWidget("newfolder")};K.layoutService.addWidget("newfolder","newDialog",a,{title:d})}},{id:E.UPLOAD,enabled:!0,text:G.uploadLabel,description:G.uploadDescription,
icon:"icon_upload_16",quickAccessIcon:"icon_upload_16",callback:function(){h(".hiddenFileInputForUpload")[0].click()}},{id:E.DOWNLOAD,enabled:!1,text:G.downloadLabel,description:G.downloadDescription,icon:"icon_download_16",quickAccessIcon:"icon_download_16",callback:function(){v.callback(this,this.selectedFileInfo)}},{id:E.OPEN,enabled:!0,text:G.openLabel,description:G.openDescription,icon:"open_24",quickAccessIcon:"open_16",callback:function(){K.executionService.executionEval("uiopen",K.executionService.streamingEval)}},
{id:E.SIMULINK,enabled:!0,text:G.simulinkLabel,description:G.simulinkDescription,icon:"icon_simulink_library_24",quickAccessIcon:"icon_simulink_library_16",callback:function(){K.executionService.executionEval("simulink")}},{id:E.IMPORT_DATA,enabled:!0,text:G.importDataLabel,description:G.importDataDescription,icon:"icon_import_24",quickAccessIcon:"icon_import_16",callback:function(){if(!1===Q.importStarted){Q.importStarted=!0;var a="uiimport";try{!0===w.getFeatureStatus(w.FeatureNames.NATIVE_IMPORT_DATA)&&
(a+="('-file')"),K.executionService.executionEval(a,K.executionService.streamingEval)}catch(c){}setTimeout(function(){Q.importStarted=!1},2E3)}}},{id:E.CLEAR,enabled:!0,text:G.clearLabel,description:G.clearDescription,icon:"icon_clear_workspace_24",quickAccessIcon:"icon_clear_workspace_16",callback:function(){var a=G.clearWorkspaceDialogTitle,c=d.create("div"),h=d.create("div");h.textContent=G.clearVariablesDialogMessage;var b=new l({text:"Do not show this prompt again","class":"confirmationDialogCheckBox"});
c.appendChild(h);c.appendChild(document.createElement("br"));c.appendChild(b.domNode);var k=T("clear");K.PreferenceSettingsService.getSetting(["matlab","confirmationdialogs"],"WorkspaceBrowserClearConfirmation").then(g.hitch(this,function(h){!0===h.value?Q.confirmDialogOpen||(L.displayConfirmDialog(a,c,k),Q.confirmDialogOpen=!0):K.executionService.executionEval("clear",K.executionService.streamingEval)}))}},{id:E.CLEAR_ALL,enabled:!0,text:G.clearAllLabel,description:G.clearAllDescription,icon:"icon_clear_24",
quickAccessIcon:"icon_clear_16",callback:function(){var a=G.clearWorkspaceDialogTitle,c=d.create("div"),h=d.create("div");h.textContent=G.clearAllVariablesFunctionsBreakpointsDialogMessage;var b=new l({text:"Do not show this prompt again","class":"confirmationDialogCheckBox"});c.appendChild(h);c.appendChild(document.createElement("br"));c.appendChild(b.domNode);var k=T("clear all");x.PreferenceSettingsService.getSetting(["matlab","confirmationdialogs"],"WorkspaceBrowserClearConfirmation").then(g.hitch(this,
function(h){!0===h.value?Q.confirmDialogOpen||(L.displayConfirmDialog(a,c,k),Q.confirmDialogOpen=!0):K.executionService.executionEval("clear all",K.executionService.streamingEval)}))}},{id:E.SET_PATH,enabled:!0,text:G.setPathLabel,description:G.setPathDescription,icon:"icon_set_path_24",quickAccessIcon:"icon_set_path_16",callback:function(){K.executionService.executionEval("pathtool")}},{id:E.OPEN_FILE,enabled:!0,callback:function(a){(new u({fileService:K.fileDataService,executionService:K.executionService})).callback([a.fileInfo])}},
{id:E.SAVE,key:"ctrl_s",shortcut:G.saveShortcut,platformKey:{mac:"meta_s"},icon:"save_24",quickAccessIcon:"save_16",text:G.saveLabel,description:G.saveDescription,popupTag:"motwToolstrip.editorTab.file.save.newList",enabled:!1,callback:function(){Q.saveCallback()}},{id:E.UNDO_CMD,enabled:!1,shortcut:G.undoCmdShortcut,platformShortcut:{mac:"meta+z"},text:G.undoCmdLabel,description:G.undoCmdDescription,quickAccessIcon:"undo_16",callback:function(){K.commandWindow.undo()}},{id:E.REDO_CMD,enabled:!1,
shortcut:G.redoCmdShortcut,platformShortcut:{mac:"shift+meta+z"},text:G.redoCmdLabel,description:G.redoCmdDescription,quickAccessIcon:"redo_16",callback:function(){K.commandWindow.redo()}},{id:E.STOP,enabled:!1,text:G.stopLabel,description:G.stopDescription,callback:function(){K.executionService.interrupt()}},{id:E.SHOW_HISTORY,enabled:!1,text:G.fileHistoryShowLabel,description:G.fileHistoryShowDescription,callback:function(){m.warn("Action "+E.SHOW_HISTORY+" doesn't do anything yet.")}},{id:E.SET_DEFAULT_LAYOUT,
enabled:!0,text:G.setDefaultLayoutLabel,description:G.setDefaultLayoutDescription,icon:"icon_two_column_16",popupTag:"motwToolstrip.matlabTab.environment.layout.list.default",callback:function(a){K.uiContainer.set(I.LAYOUT,y)}},{id:E.SET_THREE_COLUMN_LAYOUT,enabled:!0,text:G.setThreeColumnLabel,description:G.setThreeColumnDescription,icon:"icon_three_column_16",popupTag:"motwToolstrip.matlabTab.environment.layout.list.threeColumn",callback:function(a){K.uiContainer.set(I.LAYOUT,B)}},{id:E.HELP,enabled:!0,
text:G.helpLabel,description:G.helpDescription,icon:"help_24",quickAccessIcon:"help_16",popupTag:"motwToolstrip.matlabTab.help.help.newList",callback:function(a){K.executionService.executionEval(a.searchTerm?"docsearch "+a.searchTerm:"doc")}},{id:E.EXAMPLES,enabled:!0,text:G.examplesLabel,description:G.examplesDescription,icon:"icon_example_gallery_24",quickAccessIcon:"icon_example_gallery_16",callback:function(){U("https://www.mathworks.com/help/examples.html")}},{id:E.SUPPORT_WEBSITE,enabled:!0,
text:G.supportWebsiteLabel,description:G.supportWebsiteDescription,icon:"icon_support_website_24",quickAccessIcon:"icon_support_website_16",callback:function(){U("https://www.mathworks.com/pl_support")}},{id:E.PATENTS,enabled:!0,text:G.patentsLabel,callback:function(){U("https://www.mathworks.com/company/aboutus/policies_statements/patents.html")}},{id:E.MANAGE_LICENSES,enabled:!0,text:G.manageLicensesLabel,callback:function(){U("https://www.mathworks.com/licensecenter/licenses")}},{id:E.KEYBOARD_SHORTCUTS,
enabled:!0,text:G.keyboardShortcutsLabel,callback:function(){K.executionService.executionEval("helpview('matlab','matlab_navigation_shortcuts','CSHelpWindow')")}},{id:E.COMMUNITY,enabled:!0,icon:"icon_community_16",quickAccessIcon:"icon_community_16",text:G.communityLabel,description:G.communityDescription,callback:function(){U("https://www.mathworks.com/matlabcentral")}},{id:E.FEEDBACK,enabled:!0,icon:"icon_feedback_16",quickAccessIcon:"icon_feedback_16",text:G.feedbackLabel,description:G.feedbackDescription,
callback:function(){var a=new R,c=K.wraService.getCurrentUserInfo().emailAddress;a.createFeedbackDialog(c)}},{id:E.LEARN_MATLAB,enabled:!0,text:G.learnMatlabLabel,description:G.learnMatlabDescription,icon:"icon_online_learning_16",quickAccessIcon:"icon_online_learning_16",callback:function(){U("https://www.mathworks.com/pl_learn")}},{id:E.ABOUT,enabled:!0,text:G.aboutLabel,callback:function(){D.displayInfo("webguiBuildInfo.json")}},{id:E.GECKO,enabled:!0,text:G.geckoLabel,description:G.geckoDescription,
icon:"gecko_16",quickAccessIcon:"gecko_16",callback:function(){U("http://komodo.mathworks.com/main/gecko/new?Site\x3dSoftware\x26Keywords\x3dMO_GECK_BUTTON+MATLABOnlineCWB18b\x26FoundIn\x3dR2018b\x26NotifyList\x3dsbhatt+odalay+jrivitus+apatro+sburke+jgonthie+sranchan+joshuaw+akarandi+\x26Component\x3dMATLAB+Online")}}];return Q})},"MOTW/dialog/NewFileFolderUtil":function(){define(["dojo/_base/lang","./NewFileFolderForm"],function(g,f){var e;return e={FOLDER_DIALOG:f.FOLDER_DIALOG,FILE_DIALOG:f.FILE_DIALOG,
DEFAULT_INPUT_LABEL:["Folder Name","File Name"],DEFAULT_START_VALUE:["",".m"],createForm:function(d){d=d||{};if(null===d.dialogType||!d.fileLocation||!d.okAction||!d.cancelAction)throw Error("One or more required Parameters (dialogType, fileLocation, okAction, cancelAction) for creating form not supplied");var b=d.inputLabel?d.inputLabel:e.DEFAULT_INPUT_LABEL[d.dialogType],a=void 0!==d.startValue?d.startValue:e.DEFAULT_START_VALUE[d.dialogType],c=0;null!==d.numSelectedChars&&"number"===typeof d.numSelectedChars&&
(c=d.numSelectedChars);return new f({dialogType:d.dialogType,inputLabel:b,okAction:d.okAction,cancelAction:d.cancelAction,fileDataService:d.fileDataService?d.fileDataService:null,startValue:a,selected:c,location:d.fileLocation})}}})},"MOTW/dialog/NewFileFolderForm":function(){define("dojo/_base/declare dojo/_base/lang dijit/_Widget dijit/_WidgetsInTemplateMixin dijit/_TemplatedMixin mw-form/PushButton mw-form/TextField mw-filename-utils/FileNameUtil MOTW/dialog/SupportedFileNameUtil dojo/text!./NewFileFolderTemplate.html dojo/i18n!MOTW/l10n/nls/motw dojo/i18n!MOTW/l10n/nls/dialog".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p){var n;n=g([e,b,d],{templateString:l,inputLabel:"",constructor:function(a){a&&(this.dialogType=a.dialogType,this.inputLabel=a.inputLabel,this.okAction=a.okAction,this.cancelAction=a.cancelAction,this.fileDataService=a.fileDataService,this.startValue=a.startValue,this.selected=a.selected,this.location=a.location,this._localization=p)},postCreate:function(){this.nameInputLabel.textContent=this.inputLabel},_doOkAction:function(){this.okAction&&!this.okButton.get("disabled")&&
this.okAction()},_doCancelAction:function(){this.cancelAction&&this.cancelAction()},onTyping:function(a){a=f.trim(a.mwEventData.currentContent);""===a||a===this.startValue||!this.inputBox.isInputValid(a)?this.okButton.set("disabled",!0):(this.okButton.set("disabled",!1),this.inputBox.set("validationState","normal"),this.inputBox.set("errorText",""))},onTextKeyup:function(a){a.keyCode===dojo.keys.ENTER?this._doOkAction():a.keyCode===dojo.keys.ESCAPE&&this._doCancelAction()},onClose:function(){},_setCursorPositionAndSelection:function(a,
c){var h=this.inputBox.inputNode;h.createTextRange?(h=h.createTextRange(),h.collapse(),h.moveStart("character",a),h.moveEnd("character",c),h.select()):(h.focus(),h.setSelectionRange(a,c))},onShow:function(){this.inputBox.fileDataService=this.fileDataService;this.dialogType===n.FILE_DIALOG&&(this.inputBox.set("placeholder",m.FileDialogPlaceholder),this.okButton.set("disabled",!0),this.inputBox.isInputValid=f.hitch(this,this._fileNameValidator));this.dialogType===n.FOLDER_DIALOG&&(this.inputBox.set("placeholder",
m.FolderDialogPlaceholder),this.okButton.set("disabled",!0),this.inputBox.isInputValid=f.hitch(this,this._folderNameValidator));this.inputBox.set("value",this.startValue);this.inputBox.startValue=this.startValue;"number"===typeof this.selected&&0<=this.selected&&this._setCursorPositionAndSelection(0,this.selected)},getFileName:function(){return f.trim(this.inputBox.get("value"))},_folderNameValidator:function(a){a=f.trim(a);return""===a||a===this.startValue?!0:255<a.length?(this.inputBox.set("validationState",
"error"),this.inputBox.set("errorText",m.folderNameLengthError),!1):!h.isValidFileName(a)?(this.inputBox.set("validationState","error"),this.inputBox.set("errorText",m.invalidFileNameError),!1):this.fileDataService&&this.fileDataService.doesFileExistAtLocation(a,this.location)?(this.inputBox.set("validationState","error"),this.inputBox.set("errorText",m.fileOrFolderExistsError),!1):!0},_fileNameValidator:function(a){a=f.trim(a);return""===a||a===this.startValue?!0:!h.MATLAB_EXTENSION_PATTERN.test(a)&&
!k.SUPPORTED_EXTENSION_PATTERN.test(a)?(this.inputBox.set("validationState","error"),this.inputBox.set("errorText",m.invalidMFileExtensionError),!1):!k.SUPPORTED_FILENAME_PATTERN.test(a)?(this.inputBox.set("validationState","error"),this.inputBox.set("errorText",m.invalidMFileNameError),!1):this.fileDataService&&this.fileDataService.doesFileExistAtLocation(a,this.location)?(this.inputBox.set("validationState","error"),this.inputBox.set("errorText",m.fileOrFolderExistsError),!1):!0}});n.FOLDER_DIALOG=
0;n.FILE_DIALOG=1;return n})},"MOTW/dialog/SupportedFileNameUtil":function(){define([],function(){return{SUPPORTED_EXTENSION_PATTERN:/\.(pdf|html|htm|tex)$/i,SUPPORTED_FILENAME_PATTERN:/^[a-z][a-z0-9_]*\.(m|mln|mlx|pdf|html|htm|tex)$/i}})},"MOTW/dialog/SaveAsDialog":function(){define("dojo/_base/declare dojo/_base/lang dojo/keys dojo/dom-attr dijit/_Widget dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin mw-form/TextField mw-form/PushButton mw-filename-utils/FileNameUtil MOTW/motw/ActionIdConstants MOTW/dialog/SupportedFileNameUtil ./NewFileFolderForm dojo/text!./SaveAsTemplate.html dojo/i18n!MOTW/l10n/nls/motw dojo/i18n!MOTW/l10n/nls/dialog".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s){return g([b,a,c],{templateString:q,idAttr:"motw-dialog-saveAs",constructor:function(a){a=a||{};this.fileDataService=a.fileDataService;this._fileUtil=l;this._placeHolder=a.placeHolder;this._startValue=a.startValue;this._location=a.fileLocation;this._saveAsNameLabel=a.saveAsNameLabel;this._numSelectedChars=a.numSelectedChars;this.okAction=a.okAction;this.cancelAction=a.cancelAction;this._localization=s},postCreate:function(){this.inherited(arguments);this.nameInputLabel.textContent=
this._saveAsNameLabel},onShow:function(){this._placeHolder&&this.inputBox.set("placeholder",this._placeHolder);this.okButton.set("disabled",!0);(this.inputBox.startValue=this._startValue)&&this.inputBox.set("value",this._startValue);"number"===typeof this._numSelectedChars&&0<=this._numSelectedChars&&this._setCursorPositionAndSelection(0,this._numSelectedChars)},updateButtons:function(a){a=a?a.mwEventData.currentContent:this.getFileName();""===a||!this._fileNameValidator(a)?this.okButton.set("disabled",
!0):(this.okButton.set("disabled",!1),this.inputBox.set("validationState","normal"),this.inputBox.set("errorText",""))},onTextKeyup:function(a){a.keyCode===dojo.keys.ENTER?this.okAction&&!this.okButton.get("disabled")&&this.okAction():a.keyCode===dojo.keys.ESCAPE&&this.cancelAction&&this.cancelAction()},getFileName:function(){return f.trim(this.inputBox.get("value"))},_setFileName:function(a){this.inputBox.set("value",a)},_setCursorPositionAndSelection:function(a,c){var h=this.inputBox.inputNode;
h.createTextRange?(h=h.createTextRange(),h.collapse(),h.moveStart("character",a),h.moveEnd("character",c),h.select()):(h.focus(),h.setSelectionRange(a,c))},onClose:function(){},_fileNameValidator:function(a){a=f.trim(a);return""===a?!0:!l.MATLAB_EXTENSION_PATTERN.test(a)&&!p.SUPPORTED_EXTENSION_PATTERN.test(a)?(this.inputBox.set("validationState","error"),this.inputBox.set("errorText",r.invalidMFileExtensionError),!1):!p.SUPPORTED_FILENAME_PATTERN.test(a)?(this.inputBox.set("validationState","error"),
this.inputBox.set("errorText",r.invalidMFileNameError),!1):this.fileDataService&&this.fileDataService.doesFileExistAtLocation(a,this._location)?(this.inputBox.set("validationState","error"),this.inputBox.set("errorText",r.fileOrFolderExistsError),!1):!0}})})},"MOTW/motw/ActionIdConstants":function(){define([],function(){return{STOP:"motw.stop",SAVE:"motw.save",SHOW_HISTORY:"motw.fileHistory",OPEN:"motw.open",SIMULINK:"motw.simulink",IMPORT_DATA:"motw.importData",CLEAR:"motw.clear",CLEAR_ALL:"motw.clearAll",
SET_PATH:"motw.setPath",OPEN_FILE:"motw.openFile",SET_DEFAULT_LAYOUT:"motw.setDefaultLayout",SET_THREE_COLUMN_LAYOUT:"mote.setThreeColumnLayout",HELP:"motw.help",EXAMPLES:"motw.examples",SUPPORT_WEBSITE:"motw.supportWebSite",LEARN_MATLAB:"motw.learnMatlab",COMMUNITY:"motw.community",PATENTS:"motw.patents",CLEAR_COMMAND_WINDOW:"motw.clearCommandWindow",FEEDBACK:"motw.feedback",ABOUT:"motw.about",MANAGE_LICENSES:"motw.manageLicenses",KEYBOARD_SHORTCUTS:"motw.keyboardShortcuts",NEW_FILE:"motw.newFile",
NEW_FILE_LIVE_EDITOR:"motw.newFileLiveEditor",NEW_LIVE_SCRIPT:"motw.newLiveScript",NEW_NOTEBOOK:"motw.newNotebook",NEW_FUNCTION:"motw.newFunction",NEW_LIVE_FUNCTION:"motw.newLiveFunction",NEW_EXAMPLE:"motw.newExample",NEW_CLASS:"motw.newClass",OPEN_AS_NOTEBOOK:"motw.openAsNotebook",NEW_FOLDER:"motw.newFolder",UPLOAD:"motw.upload",DOWNLOAD:"motw.download",FORMAT_CODE:"motw.formatCode",NEW_FIGURE:"motw.newFigure",UNDO_CMD:"motw.undoCMD",REDO_CMD:"motw.redoCMD",PREFERENCES:"motw.preferences",FIND_FILES:"motw.findFiles",
GECKO:"motw.gecko"}})},"MOTW/dialog/SpecifyNewFilenameDialog":function(){define("dojo/dom-construct dojo/_base/declare dojo/_base/lang dojo/dom-attr dijit/_Widget dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin mw-filename-utils/FileNameUtil mw-form/TextField mw-notifications/Notifications mw-dialogs/ButtonEnum dojo/text!./SpecifyNewFilenameTemplate.html dojo/i18n!MOTW/l10n/nls/motw dojo/i18n!MOTW/l10n/nls/dialog dojo/query dojo/NodeList-traverse dojo/NodeList-manipulate".split(" "),function(g,
f,e,d,b,a,c,h,k,l,m,p,n,q,r){return f([b,a,c],{templateString:p,idAttr:"motw-dialog-specifyNewFilename",ACCEPT_ACTION_ID:1,CANCEL_ACTION_ID:2,DIALOG_WIDTH:250,constructor:function(a){a=a||{};this._filename=a.filename;this._location=a.fileLocation;this.fileDataService=a.fileDataService;this.okAction=a.okAction;this.cancelAction=a.cancelAction;this._errorText="";this._dialog=null;this._actions=this.setActions;this._content=p;this._localization=q;this._startValue=h.getFileNameNoExtension(this._filename);
this._extension="."+h.getFileNameExtension(this._filename);this._content=this._content.replace("${_localization.cancel}",q.cancel)},getFileName:function(){return this._filename},getDialog:function(){return this._dialog},setActions:function(a){a.response===this.ACCEPT_ACTION_ID?this.okAction():a.response===this.CANCEL_ACTION_ID&&this.cancelAction()},postCreate:function(){var a=dijit.byId("newfileDialog");a&&a.destroyRecursive();(a=dijit.byId("saveAsDialog"))&&a.destroyRecursive();var a={buttonText:[q.save,
q.cancel],defaultAcceptButton:this.ACCEPT_ACTION_ID,defaultCancelButton:this.CANCEL_ACTION_ID,"data-testid":"specifyNewFilenameDialog",icon:"info",closeCallback:e.hitch(this,this._actions)},c=k({value:h.getFileNameNoExtension(this._filename),width:this.DIALOG_WIDTH,"data-testid":"specifyNewFilenameInput"});c.on("typing",e.hitch(this,this.handleTextChange));var b=this._isInputValid(this._filename);b||r(".specifyNewFilenameDialog .filenameErr").text(this._errorText);var d=g.toDom(this._content);d.querySelector(".specifyNewFilenameDialog .filenameTitle").textContent=
q.warningTitle.replace("_file_",this._filename);d.querySelector(".specifyNewFilenameDialog .filenameDesc").textContent=q.warningDesc;d.querySelector(".specifyNewFilenameDialog .fileInputRow .fileExtension").textContent=this._extension;b||(d.querySelector(".filenameErr").textContent=this._errorText);c.placeAt(d.querySelector(".filenameTextField"));c.startup();this._dialog=l.displayConfirmDialog("MATLAB Editor",d,a);this._setButtonState(b)},_setButtonState:function(a){a?this._dialog.enableButton(m.TYPE.DO_IT):
this._dialog.disableButton(m.TYPE.DO_IT)},_isInvalidMatlabName:function(a){if(h.MATLAB_EXTENSION_PATTERN.test(a)){if(a.length>h.MATLAB_NAME_LENGTH)return n.mFileNameLengthError;if(!h.MATLAB_FILENAME_PATTERN.test(a))return n.invalidMFileNameError}return null},_isInvalidFileName:function(a){return a.length>h.FILE_NAME_LENGTH?n.fileNameLengthError:!h.isValidFileName(a)?n.invalidFileNameError:null},_checkFileExists:function(a){return this.fileDataService&&this.fileDataService.doesFileExistAtLocation(a,
this._location)?n.fileOrFolderExistsError:null},_isNameBlankOrUnchanged:function(a){return""===a||a===this._startValue?n.noFileNameSpecified:null},_isInputValid:function(a){a=e.trim(a);this._errorText=this._isNameBlankOrUnchanged(a)||this._isInvalidMatlabName(a)||this._isInvalidFileName(a)||this._checkFileExists(a)||"";return""===this._errorText?!0:!1},handleTextChange:function(a){this._filename=a.mwEventData.currentContent+this._extension;a=this._isInputValid(this._filename);this._setButtonState(a)}})})},
"dojo/NodeList-manipulate":function(){define("./query ./_base/lang ./_base/array ./dom-construct ./dom-attr ./NodeList-dom".split(" "),function(g,f,e,d,b){function a(a){for(;a.childNodes[0]&&1==a.childNodes[0].nodeType;)a=a.childNodes[0];return a}function c(a,c){"string"==typeof a?(a=d.toDom(a,c&&c.ownerDocument),11==a.nodeType&&(a=a.childNodes[0])):1==a.nodeType&&a.parentNode&&(a=a.cloneNode(!1));return a}var h=g.NodeList;f.extend(h,{_placeMultiple:function(a,c){for(var h="string"==typeof a||a.nodeType?
g(a):a,b=[],e=0;e<h.length;e++)for(var f=h[e],r=this.length,s=r-1,t;t=this[s];s--)0<e&&(t=this._cloneNode(t),b.unshift(t)),s==r-1?d.place(t,f,c):f.parentNode.insertBefore(t,f),f=t;b.length&&(b.unshift(0),b.unshift(this.length-1),Array.prototype.splice.apply(this,b));return this},innerHTML:function(a){return arguments.length?this.addContent(a,"only"):this[0].innerHTML},text:function(a){if(arguments.length){for(var c=0,h;h=this[c];c++)1==h.nodeType&&b.set(h,"textContent",a);return this}for(var d="",
c=0;h=this[c];c++)d+=b.get(h,"textContent");return d},val:function(a){if(arguments.length){for(var c=f.isArray(a),h=0,b;b=this[h];h++){var d=b.nodeName.toUpperCase(),g=b.type,r=c?a[h]:a;if("SELECT"==d){d=b.options;for(g=0;g<d.length;g++){var s=d[g];s.selected=b.multiple?-1!=e.indexOf(a,s.value):s.value==r}}else"checkbox"==g||"radio"==g?b.checked=b.value==r:b.value=r}return this}if((b=this[0])&&1==b.nodeType){a=b.value||"";if("SELECT"==b.nodeName.toUpperCase()&&b.multiple){a=[];d=b.options;for(g=0;g<
d.length;g++)s=d[g],s.selected&&a.push(s.value);a.length||(a=null)}return a}},append:function(a){return this.addContent(a,"last")},appendTo:function(a){return this._placeMultiple(a,"last")},prepend:function(a){return this.addContent(a,"first")},prependTo:function(a){return this._placeMultiple(a,"first")},after:function(a){return this.addContent(a,"after")},insertAfter:function(a){return this._placeMultiple(a,"after")},before:function(a){return this.addContent(a,"before")},insertBefore:function(a){return this._placeMultiple(a,
"before")},remove:h.prototype.orphan,wrap:function(h){if(this[0]){h=c(h,this[0]);for(var b=0,d;d=this[b];b++){var e=this._cloneNode(h);d.parentNode&&d.parentNode.replaceChild(e,d);a(e).appendChild(d)}}return this},wrapAll:function(h){if(this[0]){h=c(h,this[0]);this[0].parentNode.replaceChild(h,this[0]);h=a(h);for(var b=0,d;d=this[b];b++)h.appendChild(d)}return this},wrapInner:function(a){if(this[0]){a=c(a,this[0]);for(var h=0;h<this.length;h++){var b=this._cloneNode(a);this._wrap(f._toArray(this[h].childNodes),
null,this._NodeListCtor).wrapAll(b)}}return this},replaceWith:function(a){a=this._normalize(a,this[0]);for(var c=0,h;h=this[c];c++)this._place(a,h,"before",0<c),h.parentNode.removeChild(h);return this},replaceAll:function(a){a=g(a);for(var c=this._normalize(this,this[0]),h=0,b;b=a[h];h++)this._place(c,b,"before",0<h),b.parentNode.removeChild(b);return this},clone:function(){for(var a=[],c=0;c<this.length;c++)a.push(this._cloneNode(this[c]));return this._wrap(a,this,this._NodeListCtor)}});h.prototype.html||
(h.prototype.html=h.prototype.innerHTML);return h})},"currentfolderbrowser-ui/actions/gds/OpenAction":function(){define(["dojo/_base/declare","dojo/_base/window","mw-filename-utils/FileNameUtil"],function(g,f,e){var d;return g(null,{constructor:function(b){b=b||{};d=b.executionService;this.callback=function(a){this.executeOpenAction(a)};this.executeOpenAction=function(a,c){var h=a[0];h.isDirectory||(e.isBrowserType(h,c)?f.global.open(e.constructUrlFromFileInfo(h,c)):e.isLoadType(h)?d.executionEval("load("+
e.constructMatlabFilePath(h)+")"):e.isMatlabOpenType(h)?d.executionEval("open("+e.constructMatlabFilePath(h)+")"):d.executionEval("uiopen("+e.constructMatlabFilePath(h)+",1)"))}}})})},"currentfolderbrowser-ui/actions/gds/DownloadAction":function(){define("dojo/_base/window dojo/_base/lang dojo/aspect dojo/dom-construct dojo/dom-style mw-filename-utils/FileNameUtil mw-log/Log mw-notifications/Notifications mw-remote/Remote dojo/i18n!../../l10n/resources/currentfolderbrowser/nls/actions".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return{id:"DOWNLOAD",supportsKeyBinding:!1,isApplicableTo:function(){return!0},callback:function(h,b){if(a.isFileInfo(b)){var e=b.path,e=k.getEndPoint()+e.substring(1,e.length),e=encodeURI(e+"?forceDownload\x3d1"),f=d.create("iframe");f.src=e;this.setDomStyleForDownloadIFrame(f);this.attachOnloadEvent(f,h);d.place(f,g.body())}else c.warn("Unidentified Selected file info object, Cannot Download")},handleDownloadError:function(a){if(a&&a.contentDocument&&a.contentDocument.title===
l.serverError){var c=f.getObject("downloadFailedDialogTitle",!1,this.localization),b=f.getObject("downloadFailed",!1,this.localization);h.displayAlertDialog(c,b);d.destroy(a)}},setDomStyleForDownloadIFrame:function(a){b.set(a,{display:"none",width:"0px",height:"0px",top:"-9000px",left:"-9000px",position:"absolute"})},attachOnloadEvent:function(a,c){a.attachEvent?a.attachEvent("onload",f.hitch(c,f.partial(this.handleDownloadError,a))):e.after(a,"onload",f.hitch(c,f.partial(this.handleDownloadError,
a)),!0)}}})},"MOTW/motw/MotwDefaultLayout":function(){define([],function(){return{majorVersion:1,minorVersion:1,main:{isCenterExpanded:!1,bottom:{isCollapsed:!1,proportion:0.33,panels:[{panelId:"commandWindow",showing:!0}]},left:{isCollapsed:!1,proportion:0.22,panels:[{panelId:"cfb",collapsed:!1},{panelId:"workspace",collapsed:!1}],showingSetId:"global"}}}})},"MOTW/motw/ThreeColumnLayout":function(){define([],function(){return{majorVersion:1,minorVersion:1,main:{isCenterExpanded:!1,bottom:{isCollapsed:!1,
proportion:0.33,panels:[{panelId:"commandWindow",showing:!0}]},left:{isCollapsed:!1,proportion:0.22,panels:[{panelId:"cfb",collapsed:!1}],showingSetId:"global"},right:{isCollapsed:!1,proportion:0.22,panels:[{panelId:"workspace",collapsed:!1}]}}}})},"MOTW/motw/About":function(){define("dojo/dom-construct dojo/request dojo/i18n!MOTW/l10n/nls/about dojo/i18n!MOTW/l10n/nls/motw mw-dialogs/Dialogs dojo/text!./about.html".split(" "),function(g,f,e,d,b,a){return{dialog:null,displayInfo:function(c){var h=
e.title,k=a,l=this,k=k.replace("$matlabVersion$",e.matlabVersion),k=k.replace("$versionText$",e.versionText),k=k.replace("$versionNumber$",d.versionNumber),k=k.replace("$legalInfo$",e.legalInfo);f(c,{handleAs:"json"}).then(function(a){k=k.replace("$buildInfo$",a.label)},function(a){k=k.replace("$buildInfo$",e.buildInfoError)}).always(function(){var a=g.create("div");a.innerHTML=k;l.dialog=b.createDialog({title:h,dialogType:b.MODAL,className:"motw-aboutDialog",closeOnEscape:!0,closable:!0,draggable:!0,
resizable:!1,"data-test-id":"MOTW_AboutDialog",content:a})})},close:function(){this.dialog&&this.dialog.domNode&&(this.dialog.close(),this.dialog=null)}}})},"matlab_preferences/preferencesUI/PreferencesDialog":function(){define(["dojo/_base/lang","dojo/on","mw-dialogs/Dialogs","mw-dialogs/ButtonEnum","mw-overlay-utils/BusyOverlay"],function(g,f,e,d,b){function a(a){var k,f;k=e.createDialog({title:"Preferences",className:"mwPreferencesDialogContainer",dialogType:e.MODELESS,closeOnEscape:!0,closable:!0,
draggable:!0,resizable:!0,"data-test-id":"preferencesDialog",content:a,buttons:[d.OK,d.CANCEL,d.APPLY,d.HELP],defaultActionButton:d.OK});f=new b(b.SIZE.MEDIUM);f.set("target",a.domNode);f.show();k._contentArea.style.paddingRight="1px";k.addButtonEventListener(d.TYPE.DO_IT,g.hitch(a,a.handleOkButtonClick));k.addButtonEventListener(d.TYPE.CANCEL,function(){},!0);k.addButtonEventListener(d.TYPE.APPLY,g.hitch(a,a.handleApplyButtonClick));k.addButtonEventListener(d.TYPE.HELP,g.hitch(a,a.handleHelpButtonClick));
a.on("preferencedataavailable",g.hitch(this,function(){f.destroy()}));a.on("disableHelpButton",function(){k.disableButton(d.TYPE.HELP)});a.on("enableHelpButton",function(){k.enableButton(d.TYPE.HELP)});a.on("closedialog",function(){k.close()});k.on("close",function(){c=null});return k}var c;return{createDialog:function(h){c||(c=a(h));return c}}})},"matlab_preferences/preferencesUI/PreferenceUIFactory":function(){define(["matlab_preferences/preferencesUI/widgets/PreferenceUI","mw-messageservice/MessageService",
"dojo/topic"],function(g,f,e){var d=null;f.subscribe("/JavaScript/Preferences/CommandLineChannel",function(b){e.publish("preferences/commandline",b.data[0])});return{getInstance:function(b){d||(d=new g(b));!0===d._beingDestroyed&&(d=new g(b));return d},destroy:function(){d&&(d=null)}}})},"matlab_preferences/preferencesUI/widgets/PreferenceUI":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/dom dojo/dom-class dojo/dom-style dojo/on dijit/focus dijit/_WidgetBase dijit/_TemplatedMixin dojo/text!./templates/PreferenceUI.html matlab_preferences/preferencesUI/PreferenceFetcher matlab_preferences/preferencesUI/widgets/PreferenceTree mw-remote/Remote".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q){var r=[];return g([k,l],{templateString:m,baseClass:"preferenceUI",constructor:function(a){this.selection=a||this._getParameterByName("selection");this.preferenceFetcher=new p;this.preferenceFetcher.fetchPrefData();this._createdPanels={};this.preferenceFetcher.on("preferencedataavailable",f.hitch(this,function(a){function c(a,b){a.forEach(f.hitch(this,function(a){var c=b.toUpperCase();if(b.toLowerCase()===a.label.toLowerCase()||c===a.label)h=a.parent;h&&"matlab"===
h.toLowerCase()&&(h="MATLAB")}));return h}this._preferenceData=a.preferenceData;var h="",b="";r=this._preferenceData;Object.keys(a.searchData).forEach(function(d){b=h="";var k=a.searchData[d];for(c(r,d);h;)b+=" "+h+" ",c(r,h);var e=b.split(" ").reverse().join(" "),e=e.split(" ").filter(function(a,c){return e.split(" ").indexOf(a)==c}).toString().split(",").join(" ")+" preferences";a.searchData[d]=(k+e).toLowerCase()},this);this._preferenceData.forEach(function(c){c.searchData=a.searchData[c.id]});
this._createSidePanelContainer(this._preferenceData);this.emit("preferencedataavailable")}));this.own(this.preferenceFetcher)},_getParameterByName:function(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");a=RegExp("[\\?\x26]"+a+"\x3d([^\x26#]*)").exec(location.search);return null===a?"":decodeURIComponent(a[1].replace(/\+/g," "))},_handleOkApplyButtons:function(){var a=this.grid._grid.getSelection()[0].id;return this._createdPanels[a].validatePrefsPanel()?(this._commitAllPrefPanelChanges(),!0):
!1},handleOkButtonClick:function(){this._handleOkApplyButtons();this.emit("closedialog")},handleApplyButtonClick:function(){this._handleOkApplyButtons()},handleHelpButtonClick:function(){for(var a=0,c=this._preferenceData,h=this.grid._grid.getSelection()[0],a=0;a<c.length;++a)if(c[a].id===h.id){a=c[a].help.split(",");q.sendMessage({Eval:{mcode:"helpview('"+a[0]+"','"+a[2]+"','CSHelpWindow')"}},{},"PreferencesHelpButton");break}},_commitAllPrefPanelChanges:function(){Object.keys(this._createdPanels).forEach(f.hitch(this,
function(a){this._createdPanels[a].commitPrefsChanges&&this._createdPanels[a].commitPrefsChanges(!0)}))},_moveCursor:function(a,c){var h=a.domNode,b=a.inputNode;h.createTextRange?(h=h.createTextRange(),h.moveStart("character",c),h.collapse(),h.select()):b.setSelectionRange(c,c)},_enforceHighlight:function(c){var b=this.domNode.querySelectorAll("*[style]");Object.keys(b).forEach(function(c){b[c].style&&"rgb(255, 241, 92)"===b[c].style.backgroundColor&&a.set(b[c],"background","")});if(""!==c&&c&&window.find&&
window.getSelection){this._searchInputCaretPosition=this.grid.searchBox.inputNode.selectionEnd;document.designMode="on";var d=window.getSelection();d.collapse(document.body,0);for(var k={};window.find(c);){d=window.getSelection();if(d.focusNode&&d.focusNode.textContent&&d.focusOffset){if(k[d.focusNode.textContent]&&k[d.focusNode.textContent].parent&&k[d.focusNode.textContent].parent===d.focusNode.parentElement&&k[d.focusNode.textContent].offset===d.focusOffset)break;k[d.focusNode.textContent]={parent:d.focusNode.parentElement,
offset:d.focusOffset}}this._shouldAcceptSearch(document.getSelection().focusNode)&&this._isChildOfPreferenceDialog(document.getSelection().focusNode)&&document.execCommand("HiliteColor",!1,"rgb(255,241,92)");if(null===d.anchorNode&&null===d.focusNode&&null===d.baseNode)break}document.designMode="off";h.focus(this.grid.searchBox.inputNode);this._moveCursor(this.grid.searchBox,this._searchInputCaretPosition)}},_shouldAcceptSearch:function(a){for(;a;){if(b.contains(a,"mwDialogButtonBar")||b.contains(a,
"emptyGrid"))return!1;a=a.parentNode}return!0},_isChildOfPreferenceDialog:function(a){for(;a;){if(b.contains(a,"preferenceUI"))return!0;a=a.parentNode}return!1},_createSidePanelContainer:function(a){this.grid&&this.grid.domNode&&e.empty(this.grid.domNode);this.grid=new n({gridData:a,selection:this.selection});this.leftPanel&&e.place(this.grid.domNode,this.leftPanel);this.grid.startup();this.grid.on("searchboxvaluechanged",f.hitch(this,function(a){this.searchBoxValue=a.searchBoxValue;this._enforceHighlight(this.searchBoxValue)}));
this.grid.on("selectionchange",f.hitch(this,function(a){this.event=a;this._previousPreferencePanel&&this._previousPanelHeader&&(this.centerPanel.removeChild(this._previousPreferencePanel.domNode),this.centerPanel.removeChild(this._previousPanelHeader.domNode));require(["matlab_preferences/preferencesUI/widgets/PanelHeader",this.event.source],f.hitch(this,function(a,h){function b(a,c){a.forEach(f.hitch(this,function(a){var h=c.toUpperCase();if(c.toLowerCase()===a.label.toLowerCase()||h===a.label)d=
a.parent;d&&"matlab"===d.toLowerCase()&&(d="MATLAB")}))}var d="",k="";r=this._preferenceData;for(b(r,this.event.label);d;)k+=" "+d+" ",b(r,d);k=k.split(" ").reverse().join(" ")+this.event.label+" Preferences";k=k.trim();k=new a({title:k});this.centerPanel.appendChild(k.domNode);this._previousPanelHeader=k;this._createdPanels[this.event.id]||(this._createdPanels[this.event.id]=new h);k=this._createdPanels[this.event.id];this.centerPanel.appendChild(k.domNode);k.startup();this._previousPreferencePanel=
k;this.grid._grid._createdPanels=this._createdPanels;this.searchBoxValue&&this._enforceHighlight(this.searchBoxValue);for(k=0;k<r.length;++k)if(this.event.label===r[k].label){void 0===r[k].help?c.emit(this.domNode,"disableHelpButton",{bubbles:!1,cancelable:!0}):c.emit(this.domNode,"enableHelpButton",{bubbles:!1,cancelable:!0});break}this.emit("preferencepanelplaced",{label:this.event.label})}))}))}})})},"matlab_preferences/preferencesUI/PreferenceFetcher":function(){define("require dojo/aspect dojo/_base/lang dojo/_base/declare dojo/Deferred dojo/promise/all dojo/Evented mw-messageservice/MessageService".split(" "),
function(g,f,e,d,b,a,c,h){var k=function(c){a(l(c.data)).then(e.hitch(this,function(a){var c=[],h={};a.forEach(function(a){c.push(a.preferenceData);h[a.preferenceData.id]=a.searchData});c.forEach(function(a){""===a.parent&&(a.parent=null)});Object.keys(h).forEach(function(a){h[a]=h[a].replace(/{[\w|,|' ']*}/g,"")});this.emit("preferencedataavailable",{preferenceData:c,searchData:h})}))},l=function(a){var c=[];a.forEach(e.hitch(this,function(a){if(a&&a.keywords&&0<=a.keywords.indexOf("l10n")){var h=
a.keywords,d=new b;c.push(d.promise);g(["dojo/i18n!"+h],e.hitch(this,function(c){var h="",b;for(b in c)void 0!==c[b]&&(h=h+c[b]+" ");a.label=a.id in c?c[a.id]:a.id;d.resolve({preferenceData:a,searchData:h})}))}}));return c};return d([c],{constructor:function(){h.subscribe("/jsdesktop/PrefsChannel",k,this)},fetchPrefData:function(){h.publish("/jsdesktop/PrefsChannel","publishPreferenceList")},destroy:function(){h.unsubscribe("/jsdesktop/PrefsChannel",k,this)}})})},"matlab_preferences/preferencesUI/widgets/PreferenceTree":function(){define("dojo/_base/declare dojo/dom dojo/topic dojo/dom-attr dojo/dom-style dojo/keys dojo/on dojo/dom-construct dojo/_base/lang dojo/query dojo/text!matlab_preferences/preferencesUI/widgets/templates/preferenceTree.html dijit/_WidgetBase dijit/_TemplatedMixin dojo/i18n!matlab_preferences/l10n/nls/preferencePanel MW/toolstrip/form/SearchTextField mw-tree-data-model/DataStore mw-tree/Tree matlab_preferences/preferencesUI/widgets/CustomRenderer".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u){return g([p,n],{templateString:m,constructor:function(){e.subscribe("preferences/navigation",k.hitch(this,function(a){this.set("selection",a);this._handlePreferenceWithArgument()}))},_setGridDataAttr:function(a){this._set("gridData",a)},_setSelectionAttr:function(a){""===a&&(a="matlab");this._set("selection",a)},postCreate:function(){this.inherited(arguments);this._createSearchBoxAndGrid();this._handlePreferenceWithArgument();this._grid.on("selectionChanged",
k.hitch(this,this._getSelectedRow));d.set(this._grid.domNode,"data-tag","preferencesGrid");this.emptyGrid.textContent=q.searchText},_handlePreferenceWithArgument:function(){this._grid.expand([{id:this.selection}]);this._preferencesStore.expandTo({id:this.selection});this._grid.setSelection([{id:this.selection}]);this._getSelectedRow().then(k.hitch(this,function(){this.emit("preferencetreeloaded")}))},_createSearchBoxAndGrid:function(){this._preferencesStore=new s(this.gridData);this._grid=new t(this._preferencesStore,
{dataTestId:"preferencesGrid",plugins:[t.PLUGINS.Filter,t.PLUGINS.SingleNodeSelection],renderer:u});this._grid.startup();this.searchBox=new r({value:"",placeholder:"Search",tag:"preferencesSearchTextField"});this.searchBox.set("width",250);this.searchBox.set("height",22);this.searchBox.startup();this._tempSearchValue="";this.searchBox.on("typing",k.hitch(this,function(a){""===a.mwEventData.currentContent?this._enforceClear():this._tempSearchValue!==a.mwEventData.currentContent&&(this._enforceSearch(),
this._tempSearchValue=a.mwEventData.currentContent)}));this.searchBox.on("change",k.hitch(this,function(a){this._enforceSearch()}));this.own(c(this.searchBox.inputNode,"keydown",k.hitch(this,function(c){c.keyCode===a.ESCAPE&&""!==this.searchBox.inputNode.value&&(this.searchBox.set("value",""),this._enforceClear(),c.stopPropagation())})));this._preferencesStore.on("dataSizeChanged",k.hitch(this,function(a){0===a.dataSize.rows.count?(this.emptyGrid.style.display="block",this.gridContainer.style.display=
"none"):(this.emptyGrid.style.display="none",this.gridContainer.style.display="block")}));this.own(c(this.searchBox.inputNode,"keydown",k.hitch(this,this._stopPropagationOfEnter)));this.own(c(this.searchBox.inputNode,"keyup",k.hitch(this,this._stopPropagationOfEnter)));this.own(this.searchBox);this.own(this._grid);h.place(this.searchBox.domNode,this.searchContainer,"first");h.place(this._grid.domNode,this.gridContainer)},_stopPropagationOfEnter:function(c){c.keyCode===a.ENTER&&(c.stopPropagation(),
c.stopImmediatePropagation())},_enforceSearch:function(){var a=this.searchBox.inputNode.value;this._grid.filter({field:"searchData",value:a});this.emit("searchboxvaluechanged",{searchBoxValue:a})},_enforceClear:function(){var a=this.searchBox.inputNode.value;this._grid.clearFilter();this.emit("searchboxvaluechanged",{searchBoxValue:a})},_getSelectedRow:function(){var a=this._grid.getSelection()[0],a=this._preferencesStore.getNode(a);a.then(k.hitch(this,function(a){a=a.node.data;this.emit("selectionchange",
{id:a.id,label:a.label,source:a.source})}));return a}})})},"mw-tree-data-model/DataStore":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define("dojo/Deferred ./On ./rangeUtil ./impl/_expandCollapseToggle ./impl/_parentNodeStore ./impl/_proxyNode ./utils/_arrayUtils".split(" "),function(f,
e,d,b,a,c,h){var k=function(a){var c=new f;setTimeout(function(){return a(c.resolve,c.reject)},0);this.then=c.promise.then};return function(){function f(a){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!(this instanceof f))throw new TypeError("Cannot call a class as a function");this._on=new e;this._dataSize=d.range();this._expandCollapseToggle=new b({allExpanded:c.allExpanded});this._replaceAll(a,c);this._expandCollapseState={filtering:!1}}g(f,[{key:"_replaceAll",value:function(c){var h=
1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};this._internalDataStore=new a(c,{getParentId:h.getParentId,setParentId:h.setParentId,getId:h.getId,isExpanded:this._isExpanded.bind(this),createTreeNode:this._createTreeNode.bind(this),sorted:h.sorted});this._getParentId=this._internalDataStore.getParentId.bind(this._internalDataStore);this._flattenedTree=[];this._flatten=this._internalDataStore.flatten.bind(this._internalDataStore);this._flattenedTree=this._flatten();this._updateDataSize();
this._dataChanged([d.range().setRows(0,Infinity).setColumns(0,0)])}},{key:"managePaging",value:function(a){}},{key:"_calculateDataSize",value:function(){return d.range().setRows(0,this._flattenedTree.length-1).setColumns(0,0)}},{key:"_updateDataSize",value:function(){var a=this,c=this._calculateDataSize();d.isRangeEqual(c,this.dataSize)||(this._dataSize=c,setTimeout(function(){if(!a._lastEmitDataSize||!d.isRangeEqual(a._lastEmitDataSize,a.dataSize))a._on.emit("dataSizeChanged",{dataSize:a.dataSize}),
a._lastEmitDataSize=a.dataSize},0))}},{key:"getLocalCellData",value:function(a){return this._flattenedTree[a]}},{key:"getData",value:function(a){var c=this,h=a.slice();return new k(function(a,b){var k=[];h.forEach(function(a,h){if(d.isRangeInside(c.dataSize,a)){var e=c._getCellBlock(a.rows.start,a.rows.end,a.columns.start,a.columns.end);e.range=a;k[h]=e}else b(Error("Range exceeds data size"))});a(k)})}},{key:"_getCellBlock",value:function(a,c,h,b){for(var d=[];a<=c;a+=1){for(var k=[],e=h;e<=b;e+=
1)k[e]=this.getLocalCellData(a,e);d[a]=k}return d}},{key:"_createTreeNode",value:function(a,c,h,b,d){return{id:a,level:h,isExpandable:d,isExpanded:b,data:c}}},{key:"_isExpanded",value:function(a){return this._expandCollapseToggle.isExpanded(a)}},{key:"expandAll",value:function(){var a=this._expandCollapseToggle.expandAll();this._updateTreeData(a);return new k(function(a){setTimeout(a,0)})}},{key:"collapseAll",value:function(){var a=this._expandCollapseToggle.collapseAll();this._updateTreeData(a);
return new k(function(a){setTimeout(a,0)})}},{key:"expand",value:function(a){if(!Array.isArray(a))throw Error("'expand' expected an array in proxyNodeList.");a=this._expandCollapseToggle.expand(a);this._updateTreeData(a);return new k(function(a){setTimeout(a,0)})}},{key:"collapse",value:function(a){if(!Array.isArray(a))throw Error("'collapse' expected an array in proxyNodeList.");a=this._expandCollapseToggle.collapse(a);this._updateTreeData(a);return new k(function(a){setTimeout(a,0)})}},{key:"expandTo",
value:function(a){var h=this;a=c.normalize(a);var b=this._internalDataStore.getAncestorIds(a.id).map(function(a){return{id:a}});return this.expand(b).then(function(){return h.getNode(a)})}},{key:"add",value:function(a,h){var b=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{place:"last"};a=c.normalize(a);b.node&&(b.node=c.normalize(b.node));b=this._internalDataStore.add(a.id,h,b);this._updateTreeData(b)}},{key:"remove",value:function(a,h){var b=2<arguments.length&&void 0!==arguments[2]?arguments[2]:
{keepChildren:!1};a=c.normalize(a);h=c.normalize(h);var d=this._isExpanded(a.id),b=this._internalDataStore.remove(a.id,h.id,b);d&&(b.changedIds?b.changedIds.push(a.id):b.changedIds=[a.id]);this._updateTreeData(b)}},{key:"move",value:function(a,h,b){var d=this,e=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{place:"last"};a=c.normalize(a);b=c.normalize(b);h=c.normalize(h);e.node&&(e.node=c.normalize(e.node));var f=this._isExpanded(a.id),l=this._isExpanded(b.id),g=void 0;return new k(function(c,
k){try{g=d._internalDataStore.move(a.id,h.id,b.id,e)}catch(x){k(x);return}g.changeOccurred&&(f&&(g.changedIds?g.changedIds.push(a.id):g.changedIds=[a.id]),l&&(g.changedIds?g.changedIds.push(b.id):g.changedIds=[b.id]),d._updateTreeData(g));c({})})}},{key:"update",value:function(a,h,b){a=c.normalize(a);h=c.normalize(h);a=this._internalDataStore.update(a.id,h.id,b);this._updateTreeData(a)}},{key:"getNode",value:function(a){var b=this;a=c.normalize(a);return new k(function(c){var d=h.findIndex(b._flattenedTree,
function(c){return a.id===c.id}),k=null;0<=d&&(k={index:d,node:b._flattenedTree[d]});c(k)})}},{key:"getParentNode",value:function(a){var h=this;a=c.normalize(a);return this.getNode(a).then(function(a){if(a){var c=void 0;a=h._internalDataStore.getAncestorIds(a.node.id);0<a.length&&(c=a[0]);return h.getNode({id:c})}return new k(function(a){return a(null)})})}},{key:"filter",value:function(a){this._expandCollapseState.filtering||(this._expandCollapseState=this._expandCollapseToggle.getState(),this._expandCollapseState.filtering=
!0);if(!a||!a.field)a={field:"",value:""};a.value=a.value.toLowerCase();a=this._internalDataStore.filterTreeNodes(a);this._updateTreeData(a);return new k(function(a){setTimeout(a,0)})}},{key:"clearFilter",value:function(){var a=this._internalDataStore.clearFilter();this._expandCollapseToggle.setState(this._expandCollapseState);this._expandCollapseState.filtering=!1;this._updateTreeData(a);return new k(function(a){setTimeout(a,0)})}},{key:"search",value:function(a){if(!a||!a.field)a={field:"",value:""};
a.value=a.value.toLowerCase();a=this._internalDataStore.searchTreeNodes(a);this._updateTreeData(a);return new k(function(a){setTimeout(a,0)})}},{key:"clearSearch",value:function(){var a=this._internalDataStore.clearSearch();this._updateTreeData(a);return new k(function(a){setTimeout(a,0)})}},{key:"_updateTreeData",value:function(a){if(a.changeOccurred){var c=this._flattenedTree;this._flattenedTree=this._flatten();this._updateDataSize();var b=-1;if(a.updateAll)b=0;else var k=b=void 0,b=h.findIndex(c,
function(c){return 0<=a.changedIds.indexOf(c.id)}),k=h.findIndex(this._flattenedTree,function(c){return 0<=a.changedIds.indexOf(c.id)}),b=0<=b&&0<=k?Math.min(b,k):Math.max(b,k);0<=b&&this._dataChanged([d.range().setRows(b,Infinity).setColumns(0,this.dataSize.columns.end)])}}},{key:"_dataChanged",value:function(a){this._on.emit("dataChanged",{rangeList:a})}},{key:"on",value:function(a,c){return this._on.on(a,c)}},{key:"dataSize",get:function(){return this._dataSize}}]);return f}()})},"mw-tree-data-model/On":function(){var g=
function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define([],function(){return function(){function f(){if(!(this instanceof f))throw new TypeError("Cannot call a class as a function");this._events={}}g(f,[{key:"on",value:function(e,d){var b=this;this._events[e]||(this._events[e]=[]);this._events[e].push(d);var a=
{remove:function(){var c=b._events[e].indexOf(d);b._events[e].splice(c,1);a.remove=function(){return null}}};return a}},{key:"emit",value:function(e,d){var b=this._events[e],a=Object.getOwnPropertyNames(d),c={};c.eventName=e;a.forEach(function(a){c[a]=d[a]});(function(a){a&&a.forEach(function(a){a(c)})})(b)}}]);return f}()})},"mw-tree-data-model/rangeUtil":function(){function g(e,d){if(!(e instanceof d))throw new TypeError("Cannot call a class as a function");}var f=function(){function e(d,b){for(var a=
0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define([],function(){var e=function(b,a){if(!(0===b||0<b))throw Error("Invalid start value set");if(!(0===a||0<a))if(0!==b||-1!==a)throw Error("Invalid end value set");var c={};Object.defineProperty(c,"start",{value:b,enumerable:!0});Object.defineProperty(c,"end",{value:a,enumerable:!0});Object.defineProperty(c,
"count",{value:a-b+1,enumerable:!0});return c},d=function(){function b(a,c,h,d){g(this,b);Object.defineProperty(this,"rows",{value:e(a,c),enumerable:!0});Object.defineProperty(this,"columns",{value:e(h,d),enumerable:!0})}f(b,[{key:"setEntireColumns",value:function(a,c){void 0===c&&(c=a);return new b(0,Infinity,a,c)}},{key:"setEntireRows",value:function(a,c){void 0===c&&(c=a);return new b(a,c,0,Infinity)}},{key:"setColumns",value:function(a,c){return new b(this.rows.start,this.rows.end,a,c)}},{key:"setRows",
value:function(a,c){return new b(a,c,this.columns.start,this.columns.end)}},{key:"column",get:function(){return this.columns.start===this.columns.end&&0===this.rows.start&&Infinity===this.rows.end?this.columns.start:null}},{key:"row",get:function(){return this.rows.start===this.rows.end&&0===this.columns.start&&Infinity===this.columns.end?this.rows.start:null}}]);return b}();Object.defineProperty(d.prototype,"row",{enumerable:!0});Object.defineProperty(d.prototype,"column",{enumerable:!0});return function(){function b(){g(this,
b)}f(b,null,[{key:"range",value:function(){return new d(0,-1,0,-1)}},{key:"doesRangeListIntersect",value:function(a,c){for(var h=0;h<a.length;h+=1)for(var d=0;d<c.length;d+=1)if(b.doesRangeIntersect(a[h],c[d]))return!0;return!1}},{key:"doesRangeIntersect",value:function(a,c){return a.columns.start<=c.columns.end&&a.columns.end>=c.columns.start&&a.rows.start<=c.rows.end&&a.rows.end>=c.rows.start?!0:!1}},{key:"isRangeEqual",value:function(a,c){return a===c||a.columns.start===c.columns.start&&a.columns.end===
c.columns.end&&a.rows.start===c.rows.start&&a.rows.end===c.rows.end}},{key:"isRangeInside",value:function(a,c){return a===c||a.columns.start<=c.columns.start&&a.columns.end>=c.columns.end&&a.rows.start<=c.rows.start&&a.rows.end>=c.rows.end}},{key:"groupRangeListByRow",value:function(a){return b._groupRangeList(a,"rows")}},{key:"groupRangeListByColumn",value:function(a){return b._groupRangeList(a,"columns")}},{key:"isRowRange",value:function(a){return 0===a.columns.start&&Infinity===a.columns.end}},
{key:"isColumnRange",value:function(a){return 0===a.rows.start&&Infinity===a.rows.end}},{key:"_groupRangeList",value:function(a,c){var h=[],d={};a.forEach(function(a){var e=b._hashRankFromRange(a,c),f=d[e];0<=f?h[f].push(a):(f=h.length,d[e]=f,h[f]=[a])});return h}},{key:"_hashRankFromRange",value:function(a,c){var h=a[c].start,b=a[c].end;return 0===a[c].count?-1:b*b+b+h}}]);return b}()})},"mw-tree-data-model/impl/_expandCollapseToggle":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=
d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["../impl/_proxyNode","../utils/_arrayUtils"],function(f,e){return function(){function d(b){if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");this._toggledIds=[];this._allExpanded=!1;b.allExpanded&&(this._allExpanded=!0)}g(d,[{key:"isExpanded",value:function(b){var a=e.find(this._toggledIds,
function(a){return a===b})?!0:!1;return this._allExpanded?!a:a}},{key:"expandAll",value:function(){var b=0<this._toggledIds.length||!this._allExpanded;this._allExpanded=!0;this._toggledIds=[];return{changeOccurred:b,allExpanded:this._allExpanded,updateAll:!0}}},{key:"collapseAll",value:function(){var b=0<this._toggledIds.length||this._allExpanded;this._allExpanded=!1;this._toggledIds=[];return{changeOccurred:b,updateAll:!0}}},{key:"expand",value:function(b){if(!Array.isArray(b))throw Error("'expand' expected an array in proxyNodeList.");
for(var a=!1,c=this._toggledIds.slice(0),h=0;h<b.length;h+=1){var d=f.normalize(b[h]).id,e=c.indexOf(d);this._allExpanded?0<=e&&(c.splice(e,1),a=!0):0>e&&(c.push(d),a=!0)}this._toggledIds=c;b=b.map(function(a){return a.id});return{changeOccurred:a,changedIds:a?b:[],updateAll:!1}}},{key:"collapse",value:function(b){if(!Array.isArray(b))throw Error("'expand' expected an array in proxyNodeList.");for(var a=!1,c=this._toggledIds.slice(0),h=0;h<b.length;h+=1){var d=f.normalize(b[h]).id,e=c.indexOf(d);
this._allExpanded?0>e&&(c.push(d),a=!0):0<=e&&(c.splice(e,1),a=!0)}this._toggledIds=c;b=b.map(function(a){return a.id});return{changeOccurred:a,changedIds:a?b:[],updateAll:!1}}},{key:"getState",value:function(){return{toggledIds:this._toggledIds,allExpanded:this._allExpanded}}},{key:"setState",value:function(b){this._toggledIds=b.toggledIds;this._allExpanded=b.allExpanded}}]);return d}()})},"mw-tree-data-model/impl/_proxyNode":function(){define([],function(){return{validate:function(g){if(g){if(!g.hasOwnProperty("id"))throw Error("id is required for proxyNode. Path property not implimented yet.");
}else throw Error("proxyNode is required");},normalize:function(g){this.validate(g);return g}}})},"mw-tree-data-model/utils/_arrayUtils":function(){define([],function(){return{findIndex:function(g,f){for(var e=g.length,d=0;d<e;d+=1)if(f(g[d]))return d;return-1},find:function(g,f){for(var e=g.length,d=0;d<e;d+=1){var b=g[d];if(f(b))return b}}}})},"mw-tree-data-model/impl/_parentNodeStore":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||
!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["../utils/Cache","../utils/_arrayUtils","./_filter","./_search","./_sort"],function(f,e,d,b,a){return function(){function c(h){var b=this,d=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");this._data=h||[];this._sort=new a(d.sorted);this._sort.sorted&&this._sort.sort(this._data);
this._isExpanded=d.isExpanded;this.getParentId=function(a){return a.parent};d.getParentId&&(this.getParentId=d.getParentId);this.setParentId=function(a,c){return a.parent=c};d.setParentId&&(this.setParentId=d.setParentId);this.getId=function(a){return a.id};d.getId&&(this.getId=d.getId);this._isSearching=this._isFiltering=!1;this._treeNodeIdCache=new f;this._treeRootId=null;this._createTreeNode=function(a,c){var h=b.getId(a),e=b._isExpandable(h);return d.createTreeNode(h,a,c,e&&b._isExpanded(h),b._isExpandable(h))};
this._createParentCache()}g(c,[{key:"_hasChild",value:function(a){var c=this;return 0<=e.findIndex(this._data,function(b){return c.getParentId(b)===a})}},{key:"_isExpandable",value:function(a){return(a=this._parentCache.get(a))&&0<a.length?!0:!1}},{key:"_updateParentCacheNode",value:function(a,c){var b=this._parentCache.get(a);if(b)if(b[b.length-1].index<c.index)b.push(c);else if(b[0]>c.index)b.unshift(c);else{var d=e.findIndex(b,function(a){return a.index>c.index});b.splice(d,0,c)}else this._parentCache.set(a,
[c])}},{key:"_createChildIndexValue",value:function(a,c){return{index:a,node:c}}},{key:"_createParentCache",value:function(){this._parentCache=new f;this._rootNodes=[];for(var a=this._data.length,c=0;c<a;c+=1){var b=this._data[c],d=this.getParentId(b);this._updateParentCacheNode(d,this._createChildIndexValue(c,b))}}},{key:"filterTreeNodes",value:function(a){this._filter=new d(a,{getId:this.getId,getParentId:this.getParentId,treeRootId:this._treeRootId});for(a=0;a<this._data.length;a+=1){var c=this._data[a];
this._treeNodeIdCache.set(this.getId(c),c);this._filter.isFilterMatch(c)&&this._filter.addAncestorsToFilter(this.getParentId(c))}this._includeFilteredAncestors();this._filter.clearAncestorIds();this._isFiltering=!0;return{changeOccurred:!0,updateAll:!0}}},{key:"clearFilter",value:function(){var a={};this._isFiltering?(this._isFiltering=!1,a=this._filter.clearFilter()):a.changeOccurred=!1;return a}},{key:"_includeFilteredAncestors",value:function(){for(var a=this._filter.getAncestorIds(),c=0;c<a.length;c+=
1)this._recursivelyAddFilterAncestors(a[c])}},{key:"_recursivelyAddFilterAncestors",value:function(a){for(;a!==this._treeRootId&&!this._filter.isFiltered(a);){this._filter.addtoFilterCache(a);var c=this.getParentId(this._treeNodeIdCache.get(a));this._recursivelyAddFilterAncestors(c)}}},{key:"searchTreeNodes",value:function(a){this._search=new b(a,{getId:this.getId});this._isSearching=!0;for(a=0;a<this._data.length;a+=1)this._search.searchNodeForMatches(this._data[a]);return{changeOccurred:!0,updateAll:!0}}},
{key:"clearSearch",value:function(){var a={};this._isSearching?(this._isSearching=!1,a.changeOccurred=!0,a.updateAll=!0):a.changeOccurred=!1;return a}},{key:"_updateResults",value:function(){var a=!1;this._isFiltering&&(a=this._filter.getFilterCriteria(),this.filterTreeNodes(a),a=!0);this._isSearching&&(a=this._search.getSearchCriteria(),this.searchTreeNodes(a),a=!0);return a}},{key:"flatten",value:function(){var a=this,c=this._createTreeNode,b=[],d=function q(d,e){for(var f=0;f<d.length;f+=1){var m=
c(d[f].node,e),p=m.id,g=m.isExpanded,x=!0;a._isFiltering?(x=!1,a._filter.isFiltered(p)&&(b.push(m),x=!0)):b.push(m);a._isSearching&&a._search.isNodeAMatch(m)&&(m.highlight=a._search.getMatchesFromCache(m));x&&(g&&a._parentCache.has(p))&&q(a._parentCache.get(p),e+1)}},e=this._parentCache.get(this._treeRootId);e&&d(e,0);return b}},{key:"_getIndexById",value:function(a){var c=this;return e.findIndex(this._data,function(b){return a===c.getId(b)})}},{key:"_cacheParents",value:function(){for(var a=new f,
c=0;c<this._data.length;c+=1){var b=this.getId(this._data[c]),d=this.getParentId(this._data[c]);a.set(b,d)}return a}},{key:"getAncestorIds",value:function(a){var c=this._cacheParents(),b=function(a){var h=void 0;c.has(a)&&(h=c.get(a));return h},d=[];for(a=b(a);a&&a!==this._treeRootId;)d.push(a),a=b(a);return d}},{key:"_getChildIndiciesByParent",value:function(a){return(a=this._parentCache.get(a))?a:[]}},{key:"_calcPlacementIndex",value:function(a,c,b){var d=this;if(this._sort.sorted)return this._sort.getInsertIndex(this._data,
c);c=b.place;var f=this._data.length;if("first"===c)f=0;else if("last"===c)f=this._data.length;else if(b.node){var n=b.node.id;b=!1;if(a=this._parentCache.get(a))if(a=e.find(a,function(a){return n===d.getId(a.node)}))f=a.index,b=!0;b||(a=this._getIndexById(n),0<=a&&(f=a,b=!0));b&&"after"===c&&(f+=1)}return f}},{key:"add",value:function(a,c,b){var d=this;this.setParentId(c,a);var e=this._calcPlacementIndex(a,c,b);b=this._isExpandable(a);this._parentCache.keys().forEach(function(a){a=d._parentCache.get(a);
for(var c=a.length-1;0<=c;c-=1){var h=a[c];if(h.index>=e)h.index+=1;else break}});this._updateParentCacheNode(a,this._createChildIndexValue(e,c));this._data.splice(e,0,c);c=[this.getId(c)];b!==this._isExpandable(a)&&c.push(a);a=this._updateResults();return{changeOccurred:!0,changedIds:c,updateAll:a}}},{key:"remove",value:function(a,c,b){var d=this,e=this._getIndexById(c),f=this._isExpandable(a);if(0>e)return{changeOccurred:!1};var g=void 0;if(b.keepChildren)this._getChildIndiciesByParent(c).forEach(function(c){d.setParentId(c.node,
a)}),g=[e];else{var r=[];(function t(a){if(0!==a.length){var c=[];a.forEach(function(a){a=d.getId(a.node);c=c.concat(d._getChildIndiciesByParent(a))});r=r.concat(c);t(c)}})([this._createChildIndexValue(e,this._data[e])]);g=r.map(function(a){return a.index});g.push(e);g.sort(function(a,c){return c-a})}c=[];for(b=0;b<g.length;b+=1)e=g[b],c.push(this.getId(this._data[e])),this._data.splice(e,1);this._createParentCache();f!==this._isExpandable(a)&&c.push(a);f=this._updateResults();return{changeOccurred:!0,
changedIds:c,updateAll:f}}},{key:"move",value:function(a,c,b,d){if(0<=this.getAncestorIds(b).indexOf(c)||c===b)throw b=Error("Move caused a circular reference"),b.reason="ERROR_CIRCULAR_REF",b;var e=this._getIndexById(c),f=this._calcPlacementIndex(b,this._data[e],d);d=this._isExpandable(b);a=this._isExpandable(a);var g=this._data[e];0<=e&&(0<=f&&e!==f)&&(this._data.splice(f,0,g),e>f&&(e+=1),this._data.splice(e,1));this.setParentId(g,b);this._createParentCache();c=[c];a!==this._isExpandable(a)&&c.push(a);
d!==this._isExpandable(b)&&c.push(b);b=this._updateResults();return{changeOccurred:!0,changedIds:c,updateAll:b}}},{key:"update",value:function(a,c,b){var d=this._getIndexById(c);if(0>d)return{changeOccurred:!1,changedIds:[],updateAll:!1};a=this._data[d];for(var e in b)a[e]=b[e];this._sort.sorted&&(b=this.getParentId(a),this._data.splice(d,1),b=this._calcPlacementIndex(b,a,{}),this._data.splice(b,0,a),this._createParentCache());a=this._updateResults();return{changeOccurred:!0,changedIds:[c],updateAll:a}}}]);
return c}()})},"mw-tree-data-model/utils/Cache":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["./cacheImpl/StringCache","./cacheImpl/MapCache"],function(f,e){return function(){function d(){if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");this._caches=
[];this._caches.push(new f);"undefined"!==typeof Map&&Map.prototype.keys&&this._caches.push(new e);var b=function(){var a=[];return{set:function(c,h){for(var b=0;b<a.length;b+=1){var d=a[b];if(d.key===c){d.value=h;break}}a.push({key:c,value:h})},get:function(c){for(var h=0;h<a.length;h+=1){var b=a[h];if(b.key===c)return b.value}},has:function(c){for(var h=0;h<a.length;h+=1)if(a[h].key===c)return!0;return!1},remove:function(c){for(var h=0;h<a.length;h+=1)if(a[h].key===c){a.splice(h,1);break}},keys:function(){return a.map(function(a){return a.key})},
canIndex:function(){return!0}}}();this._caches.push(b)}g(d,[{key:"getCache",value:function(b){for(var a=0;a<this._caches.length;a+=1)if(this._caches[a].canIndex(b))return this._caches[a]}},{key:"set",value:function(b,a){this.getCache(b).set(b,a)}},{key:"get",value:function(b){return this.getCache(b).get(b)}},{key:"has",value:function(b){return this.getCache(b).has(b)}},{key:"remove",value:function(b){return this.getCache(b).remove(b)}},{key:"canIndex",value:function(b){return this.getCache(b).canIndex(b)}},
{key:"keys",value:function(){for(var b=[],a=0;a<this._caches.length;a+=1)Array.prototype.push.apply(b,this._caches[a].keys());return b}}]);return d}()})},"mw-tree-data-model/utils/cacheImpl/StringCache":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define([],function(){return function(){function f(){if(!(this instanceof
f))throw new TypeError("Cannot call a class as a function");this._cache=Object.create(null)}g(f,[{key:"set",value:function(e,d){this.canIndex(e)&&(this._cache[e]=d)}},{key:"get",value:function(e){if(this.has(e))return this._cache[e]}},{key:"has",value:function(e){return e in this._cache?!0:!1}},{key:"remove",value:function(e){delete this._cache[e]}},{key:"keys",value:function(){var e=[],d;for(d in this._cache)e.push(d);return e}},{key:"canIndex",value:function(e){return"string"===typeof e}}]);return f}()})},
"mw-tree-data-model/utils/cacheImpl/MapCache":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define([],function(){return function(){function f(){if(!(this instanceof f))throw new TypeError("Cannot call a class as a function");this._cache=new Map}g(f,[{key:"set",value:function(e,d){this._cache.set(e,
d)}},{key:"get",value:function(e){return this._cache.get(e)}},{key:"has",value:function(e){return this._cache.has(e)}},{key:"remove",value:function(e){this._cache["delete"](e)}},{key:"keys",value:function(){return Array.from(this._cache.keys())}},{key:"canIndex",value:function(e){return!0}}]);return f}()})},"mw-tree-data-model/impl/_filter":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);
Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["../utils/Cache"],function(f){return function(){function e(d,b){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this._filteredNodesCache=new f;this._filterCriteria=d;this._ancestorIds=[];this._getId=b.getId;this._getParentId=b.getParentId;this._treeRootId=b.treeRootId}g(e,[{key:"isFilterMatch",value:function(d){var b=this._filterCriteria.field,a=this._filterCriteria.value;
return null===d[b]||"string"!==typeof d[b]||!d.hasOwnProperty(b)?!1:""===a?""===d[b]?(this.addtoFilterCache(this._getId(d)),!0):!1:-1!==d[b].toLowerCase().indexOf(a)?(this.addtoFilterCache(this._getId(d)),!0):!1}},{key:"isFiltered",value:function(d){return this._filteredNodesCache.has(d)}},{key:"clearFilteredNodes",value:function(){this._filteredNodesCache=new f}},{key:"addAncestorsToFilter",value:function(d){d!==this._treeRootId&&(this.isFiltered(d)||this._ancestorIds.push(d))}},{key:"clearFilter",
value:function(){this.clearFilteredNodes();return{changeOccurred:!0,updateAll:!0}}},{key:"addtoFilterCache",value:function(d){this._filteredNodesCache.set(d,!0)}},{key:"removeNodeFromFilter",value:function(d){this._filteredNodesCache.remove(d)}},{key:"getAncestorIds",value:function(){return this._ancestorIds}},{key:"clearAncestorIds",value:function(){this._ancestorIds=[]}},{key:"getFilterCriteria",value:function(){return this._filterCriteria}}]);return e}()})},"mw-tree-data-model/impl/_search":function(){var g=
function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["../utils/Cache"],function(f){return function(){function e(d,b){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this._searchCriteria=d;this._searchCache=new f;this._getId=b.getId}g(e,[{key:"searchNodeForMatches",value:function(d){var b=
this._searchCriteria.field,a=this._searchCriteria.value,c=!1;if(!(null===d[b]||"string"!==typeof d[b]||!Object.prototype.hasOwnProperty.call(d,b)))if(""===a)""===d[b]&&this._setMatchesInCache(d,this._createSearchMetadata([{start:0,count:0}]));else{for(var h=d[b].toLowerCase().indexOf(a),k=[];-1!==h;)c={},c.start=h,c.count=a.length,k.push(c),c=!0,h=d[b].toLowerCase().indexOf(a,h+a.length);c&&this._setMatchesInCache(d,this._createSearchMetadata(k))}}},{key:"_setMatchesInCache",value:function(d,b){this._searchCache.set(this._getId(d),
b)}},{key:"isNodeAMatch",value:function(d){return this._searchCache.has(this._getId(d))}},{key:"getMatchesFromCache",value:function(d){return this._searchCache.get(this._getId(d))}},{key:"_createSearchMetadata",value:function(d){return[{field:this._searchCriteria.field,matches:d}]}},{key:"getSearchCriteria",value:function(){return this._searchCriteria}}]);return e}()})},"mw-tree-data-model/impl/_sort":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=
a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define([],function(){var f,e;e=f=void 0;f={ASC:"ASC",DESC:"DESC"};e={ALPHABETICAL_US:"ALPHABETICAL_US"};var d=void 0,b={caseFirst:"lower",ignorePunctuation:!1,numeric:!1,sensitivity:"variant",usage:"sort"};if("undefined"!==typeof Intl&&Intl.Collator)var a=new Intl.Collator("en-US",b),d=function(c,b){return a.compare(c,b)};else d=function(a,
c){return String.prototype.localeCompare.call(a,c,"en-US",b)};var c={ALPHABETICAL_US:d};return function(){function a(c){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");c?(this._sorted=!0,this._sortOptions=[{field:"label",order:f.ASC,compare:e.ALPHABETICAL_US}]):(this._sorted=!1,this._sortOptions=[])}g(a,[{key:"sort",value:function(a,c){if(c)throw Error("Sort is not implimented with arbitrary options");if(!this._sorted)throw Error("Sort is only available when sort is maintained on Tree using the 'sorted' option");
c=this._sortOptions;var h=this._generateCompareFunctionFromList(c);a.sort(h)}},{key:"getInsertIndex",value:function(a,c){if(!this._sorted)throw Error("getInsertIndex is only available when sort is maintained on Tree using the 'sorted' option");for(var h=this._generateCompareFunctionFromList(this._sortOptions),b=0,d=a.length,e=void 0,f=void 0,f=void 0;b<d;){e=Math.floor((d+b)/2);f=a[e];f=h(c,f);if(0===f)return e;0>f?d=e:b=e+1}return b}},{key:"_generateCompareFunctionFromList",value:function(a){for(var c=
[],h=0;h<a.length;h+=1){var b=a[h];this._validateSortOption(b);c.push(this._generateCompareFunctionFromItem(b))}return function(a,h){for(var b=0;b<c.length;b+=1){var d=c[b](a,h);if(0!==d)return d}return 0}}},{key:"_generateCompareFunctionFromItem",value:function(a){var h=1;a.order===f.DESC&&(h=-1);var b=c[a.compare];return function(c,d){return b(c[a.field],d[a.field])*h}}},{key:"_validateSortOption",value:function(a){if(!a.field)throw Error("field must be specified");if(!f[a.order])throw Error("A valid sort order must be specified");
if(!e[a.compare])throw Error("A valid compare type must be specified");}},{key:"sorted",get:function(){return this._sorted}},{key:"sortOptions",get:function(){return this._sortOptions}}]);return a}()})},"mw-tree/Tree":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define("dojo/on mw-tree/utils/EventEmitter mw-tree/view/TreeView mw-tree/view/EditableTreeView mw-tree/controller/edit/EditController mw-tree/controller/TreeNodeController mw-tree/controller/scrolling/ScrollController mw-tree-data-model/DataStore mw-tree-data-model/DataModel mw-tree/viewModel/ViewModel mw-tree-data-model/rangeUtil mw-tree/editors/EditorEnum mw-tree/plugins/PluginEnum mw-tree/viewModel/DataEnum mw-tree/view/DefaultsEnum".split(" "),
function(f,e,d,b,a,c,h,k,l,m,p,n,q,r,s){return function(){function e(a){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this._eventListeners=[];this._controllers=[];this._plugins=[];this._eventsMap={};this._createModels(a);this._setViewModel(this._myViewModel,c);this._domNode=document.createElement("div");this._domNode.className="mw-tree treeContainer";this._domNode.setAttribute("data-test-id",c.dataTestId);
this._configureFeatureSpecificViewAndController(c);var h=this._getConfiguredPlugins(c.plugins,c);this._createAndConfigureControllers();this._createAndConfigurePlugins(h,c)}g(e,[{key:"_configureFeatureSpecificViewAndController",value:function(c){c.editor&&c.editor.type?(this._treeView=new b(this._myViewModel,this._domNode,c),c=new a(this._treeView,this._myViewModel,this._dataStore),this._proxyControllerEvents(c,c.emits),this._controllers.push(c)):this._treeView=new d(this._myViewModel,this._domNode,
c)}},{key:"_discardIncompatiblePlugins",value:function(a){var c=[];q.INCOMPATIBLE.forEach(function(h){var b=0;h.forEach(function(h){h=a.indexOf(h);-1<h&&(0<b&&c.push(h),b++)})});c.forEach(function(c){return a.splice(c,1)});return a}},{key:"_getConfiguredPlugins",value:function(){var a=[];(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[q.AVAILABLE.SingleNodeSelection]).forEach(function(c){Array.isArray(c)?Array.prototype.push.apply(a,c):a.push(c)});var c=[],c=a.reduce(function(a,c){-1===a.indexOf(c)&&
a.push(c);return a},[]);return this._discardIncompatiblePlugins(c)}},{key:"_setViewModel",value:function(a,c){a.setState("lookAheadNodeBuffer",c.lookAheadNodeBuffer||s.lookAheadNodeBuffer);a.setState("nodeHeightInPx",c.nodeHeightInPx||s.nodeHeight)}},{key:"_createModels",value:function(a){Array.isArray(a)?this._dataStore=new k(a):this._dataStore=a;a=new l(this._dataStore);this._myViewModel=new m(a)}},{key:"_createAndConfigureControllers",value:function(){var a=new c(this._treeView,this._myViewModel,
this._dataStore),b=new h(this._treeView,this._myViewModel,this._dataStore);this._proxyControllerEvents(a,a.emits);this._controllers.push(a);this._controllers.push(b)}},{key:"_proxyControllerEvents",value:function(a,c){var h=this;c.forEach(function(c){h._eventsMap[c]=a})}},{key:"_createAndConfigurePlugins",value:function(){var a=this,c=arguments[1],h={};(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[q.AVAILABLE.SingleNodeSelection]).forEach(function(b){var d=b.adaptor;h[d]||(h[d]=new d(a._myViewModel,
a._treeView,a._dataStore,c));b=new b(h[d]);a._plugins.push(b)});this._facadeListeners();this._mixinFacade()}},{key:"_mixinFacade",value:function(){var a=this;this._plugins.forEach(function(c){var h=c.exposedAPI();Object.keys(h).forEach(function(c){a[c]=h[c]})})}},{key:"_facadeListeners",value:function(){var a=this;this._plugins.forEach(function(c){c.emits.forEach(function(h){return a._eventsMap[h]=c})})}},{key:"_constructTreeView",value:function(){this._treeView.initialize()}},{key:"resize",value:function(a,
c){this._treeView&&this._treeView.resize(a,c)}},{key:"startup",value:function(){this._constructTreeView()}},{key:"on",value:function(a,c){if(this._eventsMap[a]){var h=f(this._eventsMap[a],a,c);this._eventListeners.push(h);return h}throw Error("Tree Configuration does not seem to support the event that you want to configure. Please check configuration.");}},{key:"expand",value:function(a,c){if(Array.isArray(a)&&a.length)this._dataStore.expand(a);else throw Error("Expected: non empty treeNodearray. Usage: tree.expand([{id: 'node1'}])");
}},{key:"expandAll",value:function(){this._dataStore.expandAll()}},{key:"collapse",value:function(a,c){if(Array.isArray(a)&&a.length)this._dataStore.collapse(a);else throw Error("Expected: non empty treeNodearray. Usage: tree.collapse([{id: 'node1'}])");}},{key:"collapseAll",value:function(){this._dataStore.collapseAll()}},{key:"scrollTo",value:function(a){if(a===r.FIRST_NODE)this._treeView.scrollToIndex(this._myViewModel.dataSize.rows.start);else if(a===r.LAST_NODE)this._treeView.scrollToIndex(this._myViewModel.dataSize.rows.end);
else if(a&&a.id)this._treeView.scrollTo(a);else throw Error("Expected: Tree.FIRST_NODE, Tree.LAST_NODE or treeNode object with id property. Usage: scrollTo({id: 'node1'})");}},{key:"destroy",value:function(){this._eventListeners.forEach(function(a){return a.remove()});this._controllers.forEach(function(a){a.destroy&&a.destroy()});this._plugins.forEach(function(a){return a.destroy()});var a=this._domNode.parentNode;this._treeView.destroy();a&&a.removeChild(this._domNode)}},{key:"domNode",get:function(){return this._domNode}}],
[{key:"PLUGINS",get:function(){return q.AVAILABLE}},{key:"EDITORS",get:function(){return n}},{key:"FIRST_NODE",get:function(){return r.FIRST_NODE}},{key:"LAST_NODE",get:function(){return r.LAST_NODE}}]);return e}()})},"mw-tree/utils/EventEmitter":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();
define([],function(){return function(){function f(e){if(!(this instanceof f))throw new TypeError("Cannot call a class as a function");this._events=[]}g(f,[{key:"on",value:function(e,d){var b=this;this._events[e]||(this._events[e]=[]);this._events[e].push(d);var a={remove:function(){var c=b._events[e].indexOf(d);b._events[e].splice(c,1);a.remove=function(){return null}}};return a}},{key:"emit",value:function(e){for(var d=arguments.length,b=Array(1<d?d-1:0),a=1;a<d;a++)b[a-1]=arguments[a];d=this._events.all;
a=function(a){a&&a.forEach(function(a){a.apply(void 0,b)})};a(this._events[e]);a(d)}}]);return f}()})},"mw-tree/view/TreeView":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define("react/react.min react/react-dom.min mw-tree/utils/ViewEventHandlers mw-tree/utils/KeyCodeEnum mw-tree/utils/MouseCodeEnum mw-tree-data-model/rangeUtil mw-tree/utils/TreeUtils ./EventsConfig ./DesignTimeEventsConfig ./TreeBuilder".split(" "),
function(f,e,d,b,a,c,h,k,l,m){return function(){function f(a,c){var h=this,b=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};if(!(this instanceof f))throw new TypeError("Cannot call a class as a function");this._viewModel=a;this._viewEventHandler=new d;this._rootDom=c;this._listeners=[];this._EVENTS_CONFIG=b.designTimeEventsConfig?l:k;var e={disclosureNode:{},treeNode:{},tree:{}};e.disclosureNode._disclosureMouseDownHandler=function(a){return h._handleDisclosureNodeLeftMouseDownEvent(a,
function(a){return h._handleDisclosureMouseDown(a)})};e.treeNode._nodeMouseDownHandler=function(a){return h._handleMouseDownEvents(a,function(a,c){return h._handleNodeMouseDown(a,c)})};e.treeNode._nodeDblClickHandler=function(a){return h._handleNodeDoubleClick(a)};e.tree._keyDownHandler=function(a){return h._handleKeyDown(a)};e.tree._scrollHandler=function(a){return h._handleScroll(a)};e.tree._focusHandler=function(a){return h._handleFocus(a)};e.tree._containerMountHandler=function(a){return h._handleContainerMount(a)};
e.tree._containerUpdateHandler=function(){return h._handleContainerUpdate()};e.tree._blurHandler=function(a){return h._handleBlur(a)};e.tree._contextMenuHandler=function(a){return h._handleRightClick(a)};e.tree._setTreeNodeHeightHandler=function(a){return h.setTreeNodeHeightAndHandleViewPortUpdate(a)};e.tree._setTreeWidthProperty=function(a){return h.setTreeWidthProperty(a)};this.handlers=e;this.treeBuilder=this.createTreeBuilder(b)}g(f,[{key:"createTreeBuilder",value:function(a){return new m(this._viewModel,
this.handlers,a)}},{key:"_handleFocus",value:function(a){this._viewModel.setState("ContainerFocused",!0);this.render()}},{key:"_handleContainerMount",value:function(a){this._viewModel.setState("treeContainerNode",a.treeContainerNode);this._viewEventHandler.handleEvent("containerMount",{treeContainerNode:a.treeContainerNode,mwTreeNode:a.mwTreeNode},function(){})}},{key:"_handleContainerUpdate",value:function(a){if(a=(a=this._viewModel.getStateByKey("treeContainerNode"))?a.value:null)this._viewModel.viewPort.size.width=
a.clientWidth;this._viewEventHandler.handleEvent("containerUpdate",null,function(){})}},{key:"_handleBlur",value:function(a){this._viewModel.deleteState("ContainerFocused");this.render()}},{key:"_handleScroll",value:function(a){var c=this;a={height:a.target.clientHeight,top:a.target.scrollTop,left:a.target.scrollLeft,width:a.target.clientWidth,scrollWidth:a.target.scrollWidth};this._viewModel.viewPort.size.left=a.left;this.setTreeWidthProperty(a.scrollWidth);(this._viewModel.viewPort.size.height!==
a.height||this._viewModel.viewPort.size.top!==a.top)&&this._viewEventHandler.handleEvent("treeScroll",a,function(){h.updateDataBuffer(c._viewModel)})}},{key:"_handleRightClick",value:function(a){for(var c=this,h=a.target,b=h.tagName,d=h;!h.classList.contains("treeNode");)if(h=h.parentNode,b=h.tagName,"BODY"===b){d=null;break}var b={},k=void 0;d?(k=this._data(parseInt(h.attributes["data-row-index"].nodeValue))(0).value,b={type:"TREENODE",nodeId:k.id}):b={type:"TREE"};a={top:a.pageY,left:a.pageX,node:k,
emitTarget:b};(h=this._EVENTS_CONFIG.contextMenuClick)&&this._viewEventHandler.handleEvent(h,a,function(){c.render()})}},{key:"registerEventCallback",value:function(a,c){this._viewEventHandler.registerEventListeners(a,c)}},{key:"setTreeNodeHeightAndHandleViewPortUpdate",value:function(a){this._viewModel.setState("nodeHeightInPx",a);h.calculateAndUpdateViewPort(this._viewModel,this._viewModel.viewPort.size)}},{key:"setTreeWidthProperty",value:function(a){var c=this._viewModel.getStateByKey("treeWidth"),
c=c?c.value:null;c<a&&this._viewModel.setState("treeWidth",a)}},{key:"_handleKeyDown",value:function(a){var c=this,h={keyCode:a.keyCode,metaKey:a.metaKey,ctrlKey:a.ctrlKey,shiftKey:a.shiftKey,altKey:a.altKey};switch(h.keyCode){case b.ARROW_UP:case b.ARROW_DOWN:case b.PAGE_UP:case b.PAGE_DOWN:case b.ARROW_RIGHT:case b.ARROW_LEFT:case b.SPACE:case b.HOME:case b.END:a.preventDefault();a=a.ctrlKey||a.metaKey?this._EVENTS_CONFIG.keyDownMetaNavigation:a.shiftKey?this._EVENTS_CONFIG.keyDownRangeNavigation:
this._EVENTS_CONFIG.keyDownNavigation;if(!a)break;this.viewModelUpdateInProgress=!0;this._viewEventHandler.handleEvent(a,h,function(){c.viewModelUpdateInProgress=!1;var a=c._viewModel.getStateByKey("nodeHeightInPx").value,h=c._viewModel.getStateByKey("shouldScroll");h&&h.value&&(c._viewModel.viewPort.size.top=c._viewModel.viewPort.rangeList[0].rows.start*a,c._viewModel.deleteState("shouldScroll"));c._viewModel.setState("forceContainerFocus",!0);c.render()})}}},{key:"_handleNodeDoubleClick",value:function(a){var c=
this,h=this._EVENTS_CONFIG.dblClick;!a.target.attributes["data-disclosure-id"]&&h&&(a={node:this._data(parseInt(a.currentTarget.parentNode.attributes["data-row-index"].nodeValue))(0).value},this._viewEventHandler.handleEvent(h,a,function(){c.render()}))}},{key:"_handleDisclosureNodeLeftMouseDownEvent",value:function(c,h){c.button===a.MOUSE_LEFT_BUTTON&&h(c)}},{key:"_handleMouseDownEvents",value:function(c,h){var b=this._EVENTS_CONFIG.nodeMouseDown,d=this._EVENTS_CONFIG.rightClick;c.button===a.MOUSE_LEFT_BUTTON?
h(c,b):d&&c.button===a.MOUSE_RIGHT_BUTTON&&h(c,d)}},{key:"_handleDisclosureMouseDown",value:function(a){a.stopPropagation();a=a.target.attributes["data-row-index"].nodeValue;a={node:this._data(parseInt(a))(0).value,nodeIndex:parseInt(a)};this._viewEventHandler.handleEvent("treeDisclosureMouseDown",a,function(){})}},{key:"_handleNodeMouseDown",value:function(a,c){var h=this,b=a.currentTarget.attributes["data-row-index"].nodeValue,b={node:this._data(parseInt(b))(0).value,altKey:a.altKey,metaKey:a.metaKey,
ctrlKey:a.ctrlKey,shiftKey:a.shiftKey,nodeIndex:parseInt(b)};this._viewEventHandler.handleEvent(c,b,function(){h.render()})}},{key:"initialize",value:function(){var a=this,b=this._viewModel.getStateByKey("nodeHeightInPx").value;this._viewModel.getStateByKey("lookAheadNodeBuffer");b=Math.floor(this._rootDom.clientHeight/b);this._viewModel.viewPort={size:{left:0,top:0,width:this._rootDom.clientWidth,height:this._rootDom.clientHeight},rangeList:[c.range().setRows(0,b-1).setColumns(0,0)]};var b=this._viewModel.on("updateView",
function(){a.render()}),d=this._viewModel.on("viewDataChanged",function(c){c=c.viewData;a._viewModel.setState("currentViewPortData",c[0]);a.render(c[0])}),k=this._viewModel.on("dataSizeChanged",function(c){a._viewModel.deleteState("treeWidth");a.render()});this._listeners.push(b);this._listeners.push(d);this._listeners.push(k);h.updateDataBuffer(this._viewModel,!0)}},{key:"resize",value:function(a,c){var b=void 0,d=void 0,b=a?a:this._rootDom.clientHeight,d=c?c:this._rootDom.clientWidth;this._viewModel.viewPort.size.width=
d;this._viewModel.viewPort.size.height=b;h.calculateAndUpdateViewPort(this._viewModel,this._viewModel.viewPort.size);h.updateDataBuffer(this._viewModel)}},{key:"scrollTo",value:function(a){this._emitProgrammaticScrollEvt({node:a})}},{key:"_emitProgrammaticScrollEvt",value:function(a){var c=this;this.viewModelUpdateInProgress=!0;this._viewEventHandler.handleEvent("treeProgrammaticScroll",a,function(){c.viewModelUpdateInProgress=!1;h.isViewPortRangeInDataBuffer(c._viewModel)?c.render():h.updateDataBuffer(c._viewModel)})}},
{key:"scrollToIndex",value:function(a){this._emitProgrammaticScrollEvt({nodeIndex:a})}},{key:"render",value:function(a){a&&(this._data=a);this.viewModelUpdateInProgress||(a=this.treeBuilder.buildTree(this._data),e.render(a,this._rootDom))}},{key:"destroy",value:function(){this._listeners.forEach(function(a){a.remove()});e.unmountComponentAtNode(this._rootDom)}}]);return f}()})},"react/react.min":function(){!function(g){"object"==typeof exports&&"undefined"!=typeof module?module.exports=g():"function"==
typeof define&&define.amd?define([],g):("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).React=g()}(function(){return function f(e,d,b){function a(h,l){if(!d[h]){if(!e[h]){var m="function"==typeof require&&require;if(!l&&m)return m(h,!0);if(c)return c(h,!0);m=Error("Cannot find module '"+h+"'");throw m.code="MODULE_NOT_FOUND",m;}m=d[h]={exports:{}};e[h][0].call(m.exports,function(c){var b=e[h][1][c];return a(b?b:c)},m,m.exports,f,e,d,b)}return d[h].exports}
for(var c="function"==typeof require&&require,h=0;h<b.length;h++)a(b[h]);return a}({1:[function(f,e,d){d=f(35);var b=f(45),a=f(61),c=f(23);f=f(104);var h={};c(h,a);c(h,{findDOMNode:f("findDOMNode","ReactDOM","react-dom",d,d.findDOMNode),render:f("render","ReactDOM","react-dom",d,d.render),unmountComponentAtNode:f("unmountComponentAtNode","ReactDOM","react-dom",d,d.unmountComponentAtNode),renderToString:f("renderToString","ReactDOMServer","react-dom/server",b,b.renderToString),renderToStaticMarkup:f("renderToStaticMarkup",
"ReactDOMServer","react-dom/server",b,b.renderToStaticMarkup)});h.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=d;h.__SECRET_DOM_SERVER_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=b;e.exports=h},{104:104,23:23,35:35,45:45,61:61}],2:[function(f,e,d){var b=f(63),a=f(106),c=f(136);e.exports={Mixin:{componentDidMount:function(){this.props.autoFocus&&c(a(this))}},focusDOMComponent:function(){c(b.getNode(this._rootNodeID))}}},{106:106,136:136,63:63}],3:[function(f,e,d){function b(){var a=window.opera;return"object"==
typeof a&&"function"==typeof a.version&&12>=parseInt(a.version(),10)}function a(a,c){switch(a){case B.topKeyUp:return-1!==r.indexOf(c.keyCode);case B.topKeyDown:return c.keyCode!==s;case B.topKeyPress:case B.topMouseDown:case B.topBlur:return!0;default:return!1}}function c(a){a=a.detail;return"object"==typeof a&&"data"in a?a.data:null}function h(a,h){switch(a){case B.topCompositionEnd:return c(h);case B.topKeyPress:return h.which!==x?null:(E=!0,y);case B.topTextInput:var b=h.data;return b===y&&E?
null:b;default:return null}}function k(c,h){if(F){if(c===B.topCompositionEnd||a(c,h)){var b=F.getData();return p.release(F),F=null,b}return null}switch(c){case B.topPaste:return null;case B.topKeyPress:return h.which&&(!h.ctrlKey&&!h.altKey&&!h.metaKey||h.ctrlKey&&h.altKey)?String.fromCharCode(h.which):null;case B.topCompositionEnd:return w?null:h.data;default:return null}}d=f(15);var l=f(19),m=f(128),p=f(20),n=f(88),q=f(92);f=f(146);var r=[9,13,27,32],s=229,t=m.canUseDOM&&"CompositionEvent"in window,
u=null;m.canUseDOM&&"documentMode"in document&&(u=document.documentMode);var v=m.canUseDOM&&"TextEvent"in window&&!u&&!b(),w=m.canUseDOM&&(!t||u&&8<u&&11>=u),x=32,y=String.fromCharCode(x),B=d.topLevelTypes,D={beforeInput:{phasedRegistrationNames:{bubbled:f({onBeforeInput:null}),captured:f({onBeforeInputCapture:null})},dependencies:[B.topCompositionEnd,B.topKeyPress,B.topTextInput,B.topPaste]},compositionEnd:{phasedRegistrationNames:{bubbled:f({onCompositionEnd:null}),captured:f({onCompositionEndCapture:null})},
dependencies:[B.topBlur,B.topCompositionEnd,B.topKeyDown,B.topKeyPress,B.topKeyUp,B.topMouseDown]},compositionStart:{phasedRegistrationNames:{bubbled:f({onCompositionStart:null}),captured:f({onCompositionStartCapture:null})},dependencies:[B.topBlur,B.topCompositionStart,B.topKeyDown,B.topKeyPress,B.topKeyUp,B.topMouseDown]},compositionUpdate:{phasedRegistrationNames:{bubbled:f({onCompositionUpdate:null}),captured:f({onCompositionUpdateCapture:null})},dependencies:[B.topBlur,B.topCompositionUpdate,
B.topKeyDown,B.topKeyPress,B.topKeyUp,B.topMouseDown]}},E=!1,F=null;e.exports={eventTypes:D,extractEvents:function(b,d,e,f,m){var r;var u;if(t)b:{switch(b){case B.topCompositionStart:u=D.compositionStart;break b;case B.topCompositionEnd:u=D.compositionEnd;break b;case B.topCompositionUpdate:u=D.compositionUpdate;break b}u=void 0}else F?a(b,f)&&(u=D.compositionEnd):b===B.topKeyDown&&f.keyCode===s&&(u=D.compositionStart);u?(w&&(F||u!==D.compositionStart?u===D.compositionEnd&&F&&(r=F.getData()):F=p.getPooled(d)),
d=n.getPooled(u,e,f,m),r?d.data=r:(r=c(f),null!==r&&(d.data=r)),r=(l.accumulateTwoPhaseDispatches(d),d)):r=null;var y;(y=v?h(b,f):k(b,f),!y)?y=null:(b=q.getPooled(D.beforeInput,e,f,m),y=(b.data=y,l.accumulateTwoPhaseDispatches(b),b));return[r,y]}}},{128:128,146:146,15:15,19:19,20:20,88:88,92:92}],4:[function(f,e,d){var b={animationIterationCount:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,fontWeight:!0,
lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,stopOpacity:!0,strokeDashoffset:!0,strokeOpacity:!0,strokeWidth:!0},a=["Webkit","ms","Moz","O"];Object.keys(b).forEach(function(c){a.forEach(function(a){b[a+c.charAt(0).toUpperCase()+c.substring(1)]=b[c]})});e.exports={isUnitlessNumber:b,shorthandPropertyExpansions:{background:{backgroundAttachment:!0,backgroundColor:!0,backgroundImage:!0,backgroundPositionX:!0,backgroundPositionY:!0,backgroundRepeat:!0},
backgroundPosition:{backgroundPositionX:!0,backgroundPositionY:!0},border:{borderWidth:!0,borderStyle:!0,borderColor:!0},borderBottom:{borderBottomWidth:!0,borderBottomStyle:!0,borderBottomColor:!0},borderLeft:{borderLeftWidth:!0,borderLeftStyle:!0,borderLeftColor:!0},borderRight:{borderRightWidth:!0,borderRightStyle:!0,borderRightColor:!0},borderTop:{borderTopWidth:!0,borderTopStyle:!0,borderTopColor:!0},font:{fontStyle:!0,fontVariant:!0,fontWeight:!0,fontSize:!0,lineHeight:!0,fontFamily:!0},outline:{outlineWidth:!0,
outlineStyle:!0,outlineColor:!0}}}},{}],5:[function(f,e,d){var b=f(4),a=f(128);d=f(69);var c=(f(130),f(103)),h=f(141),k=f(148),l=(f(151),k(function(a){return h(a)})),m=!1,p="cssFloat";if(a.canUseDOM){f=document.createElement("div").style;try{f.font=""}catch(n){m=!0}void 0===document.documentElement.style.cssFloat&&(p="styleFloat")}f={createMarkupForStyles:function(a){var h="",b;for(b in a)if(a.hasOwnProperty(b)){var d=a[b];null!=d&&(h+=l(b)+":",h+=c(b,d)+";")}return h||null},setValueForStyles:function(a,
h){var d=a.style,k;for(k in h)if(h.hasOwnProperty(k)){var e=c(k,h[k]);if("float"===k&&(k=p),e)d[k]=e;else if(e=m&&b.shorthandPropertyExpansions[k])for(var f in e)d[f]="";else d[k]=""}}};d.measureMethods(f,"CSSPropertyOperations",{setValueForStyles:"setValueForStyles"});e.exports=f},{103:103,128:128,130:130,141:141,148:148,151:151,4:4,69:69}],6:[function(f,e,d){function b(){this._contexts=this._callbacks=null}d=f(24);var a=f(23),c=f(142);a(b.prototype,{enqueue:function(a,c){this._callbacks=this._callbacks||
[];this._contexts=this._contexts||[];this._callbacks.push(a);this._contexts.push(c)},notifyAll:function(){var a=this._callbacks,b=this._contexts;if(a){a.length!==b.length?c(!1):void 0;this._contexts=this._callbacks=null;for(var d=0;d<a.length;d++)a[d].call(b[d]);a.length=0;b.length=0}},reset:function(){this._contexts=this._callbacks=null},destructor:function(){this.reset()}});d.addPoolingTo(b);e.exports=b},{142:142,23:23,24:24}],7:[function(f,e,d){function b(c){c=w.getPooled(E.change,I,c,x(c));t.accumulateTwoPhaseDispatches(c);
v.batchedUpdates(a,c)}function a(a){s.enqueueEvents(a);s.processEventQueue(!1)}function c(){F&&(F.detachEvent("onchange",b),F=null,I=null)}function h(a,c,h){return a===D.topChange?h:void 0}function k(a,h,d){a===D.topFocus?(c(),F=h,I=d,F.attachEvent("onchange",b)):a===D.topBlur&&c()}function l(){F&&(delete F.value,F.detachEvent("onpropertychange",m),F=null,I=null,L=null,C=null)}function m(a){if("value"===a.propertyName){var c=a.srcElement.value;c!==L&&(L=c,b(a))}}function p(a,c,h){return a===D.topInput?
h:void 0}function n(a,c,h){a===D.topFocus?(l(),F=c,I=h,L=c.value,C=Object.getOwnPropertyDescriptor(c.constructor.prototype,"value"),Object.defineProperty(F,"value",N),F.attachEvent("onpropertychange",m)):a===D.topBlur&&l()}function q(a,c,h){return a!==D.topSelectionChange&&a!==D.topKeyUp&&a!==D.topKeyDown||!F||F.value===L?void 0:(L=F.value,I)}function r(a,c,h){return a===D.topClick?h:void 0}d=f(15);var s=f(16),t=f(19),u=f(128),v=f(81),w=f(90),x=f(112),y=f(117),B=f(118);f=f(146);var D=d.topLevelTypes,
E={change:{phasedRegistrationNames:{bubbled:f({onChange:null}),captured:f({onChangeCapture:null})},dependencies:[D.topBlur,D.topChange,D.topClick,D.topFocus,D.topInput,D.topKeyDown,D.topKeyUp,D.topSelectionChange]}},F=null,I=null,L=null,C=null,M=!1;u.canUseDOM&&(M=y("change")&&(!("documentMode"in document)||8<document.documentMode));var G=!1;u.canUseDOM&&(G=y("input")&&(!("documentMode"in document)||9<document.documentMode));var N={get:function(){return C.get.call(this)},set:function(a){L=""+a;C.set.call(this,
a)}};e.exports={eventTypes:E,extractEvents:function(a,c,b,d,e){var f,l,m=c.nodeName&&c.nodeName.toLowerCase();if("select"===m||"input"===m&&"file"===c.type?M?f=h:l=k:B(c)?G?f=p:(f=q,l=n):c.nodeName&&("input"===c.nodeName.toLowerCase()&&("checkbox"===c.type||"radio"===c.type))&&(f=r),f)if(f=f(a,c,b))return a=w.getPooled(E.change,f,d,e),a.type="change",t.accumulateTwoPhaseDispatches(a),a;l&&l(a,c,b)}}},{112:112,117:117,118:118,128:128,146:146,15:15,16:16,19:19,81:81,90:90}],8:[function(f,e,d){var b=
0;e.exports={createReactRootIndex:function(){return b++}}},{}],9:[function(f,e,d){var b=f(12),a=f(65);d=f(69);var c=f(122),h=f(123),k=f(142);f={dangerouslyReplaceNodeWithMarkup:b.dangerouslyReplaceNodeWithMarkup,updateTextContent:h,processUpdates:function(d,e){for(var f,n=null,q=null,r=0;r<d.length;r++)if(f=d[r],f.type===a.MOVE_EXISTING||f.type===a.REMOVE_NODE){var s=f.fromIndex,t=f.parentNode.childNodes[s],u=f.parentID;t?void 0:k(!1);n=n||{};n[u]=n[u]||[];n[u][s]=t;q=q||[];q.push(t)}if(r=e.length&&
"string"==typeof e[0]?b.dangerouslyRenderMarkup(e):e,q)for(s=0;s<q.length;s++)q[s].parentNode.removeChild(q[s]);for(q=0;q<d.length;q++)switch(f=d[q],f.type){case a.INSERT_MARKUP:s=f.parentNode;t=r[f.markupIndex];u=f.toIndex;u=u>=s.childNodes.length?null:s.childNodes.item(u);s.insertBefore(t,u);break;case a.MOVE_EXISTING:s=f.parentNode;t=n[f.parentID][f.fromIndex];u=f.toIndex;u=u>=s.childNodes.length?null:s.childNodes.item(u);s.insertBefore(t,u);break;case a.SET_MARKUP:c(f.parentNode,f.content);break;
case a.TEXT_CONTENT:h(f.parentNode,f.content)}}};d.measureMethods(f,"DOMChildrenOperations",{updateTextContent:"updateTextContent"});e.exports=f},{12:12,122:122,123:123,142:142,65:65,69:69}],10:[function(f,e,d){var b=f(142),a={MUST_USE_ATTRIBUTE:1,MUST_USE_PROPERTY:2,HAS_SIDE_EFFECTS:4,HAS_BOOLEAN_VALUE:8,HAS_NUMERIC_VALUE:16,HAS_POSITIVE_NUMERIC_VALUE:48,HAS_OVERLOADED_BOOLEAN_VALUE:64,injectDOMPropertyConfig:function(c){var d=a,e=c.Properties||{},f=c.DOMAttributeNamespaces||{},n=c.DOMAttributeNames||
{},q=c.DOMPropertyNames||{},r=c.DOMMutationMethods||{};c.isCustomAttribute&&h._isCustomAttributeFunctions.push(c.isCustomAttribute);for(var s in e){h.properties.hasOwnProperty(s)?b(!1):void 0;c=s.toLowerCase();var t=e[s];c={attributeName:c,attributeNamespace:null,propertyName:s,mutationMethod:null,mustUseAttribute:(t&d.MUST_USE_ATTRIBUTE)===d.MUST_USE_ATTRIBUTE,mustUseProperty:(t&d.MUST_USE_PROPERTY)===d.MUST_USE_PROPERTY,hasSideEffects:(t&d.HAS_SIDE_EFFECTS)===d.HAS_SIDE_EFFECTS,hasBooleanValue:(t&
d.HAS_BOOLEAN_VALUE)===d.HAS_BOOLEAN_VALUE,hasNumericValue:(t&d.HAS_NUMERIC_VALUE)===d.HAS_NUMERIC_VALUE,hasPositiveNumericValue:(t&d.HAS_POSITIVE_NUMERIC_VALUE)===d.HAS_POSITIVE_NUMERIC_VALUE,hasOverloadedBooleanValue:(t&d.HAS_OVERLOADED_BOOLEAN_VALUE)===d.HAS_OVERLOADED_BOOLEAN_VALUE};if(c.mustUseAttribute&&c.mustUseProperty?b(!1):void 0,!c.mustUseProperty&&c.hasSideEffects?b(!1):void 0,1>=c.hasBooleanValue+c.hasNumericValue+c.hasOverloadedBooleanValue?void 0:b(!1),n.hasOwnProperty(s))c.attributeName=
n[s];f.hasOwnProperty(s)&&(c.attributeNamespace=f[s]);q.hasOwnProperty(s)&&(c.propertyName=q[s]);r.hasOwnProperty(s)&&(c.mutationMethod=r[s]);h.properties[s]=c}}},c={},h={ID_ATTRIBUTE_NAME:"data-reactid",properties:{},getPossibleStandardName:null,_isCustomAttributeFunctions:[],isCustomAttribute:function(a){for(var c=0;c<h._isCustomAttributeFunctions.length;c++)if((0,h._isCustomAttributeFunctions[c])(a))return!0;return!1},getDefaultValueForProperty:function(a,h){var b,d=c[a];return d||(c[a]=d={}),
h in d||(b=document.createElement(a),d[h]=b[h]),d[h]},injection:a};e.exports=h},{142:142}],11:[function(f,e,d){function b(a){return m.hasOwnProperty(a)?!0:l.hasOwnProperty(a)?!1:k.test(a)?(m[a]=!0,!0):(l[a]=!0,!1)}function a(a,c){return null==c||a.hasBooleanValue&&!c||a.hasNumericValue&&isNaN(c)||a.hasPositiveNumericValue&&1>c||a.hasOverloadedBooleanValue&&!1===c}var c=f(10);d=f(69);var h=f(120),k=(f(151),/^[a-zA-Z_][\w\.\-]*$/),l={},m={},p={createMarkupForID:function(a){return c.ID_ATTRIBUTE_NAME+
"\x3d"+h(a)},setAttributeForID:function(a,h){a.setAttribute(c.ID_ATTRIBUTE_NAME,h)},createMarkupForProperty:function(b,d){var k=c.properties.hasOwnProperty(b)?c.properties[b]:null;if(k){if(a(k,d))return"";var e=k.attributeName;return k.hasBooleanValue||k.hasOverloadedBooleanValue&&!0===d?e+'\x3d""':e+"\x3d"+h(d)}return c.isCustomAttribute(b)?null==d?"":b+"\x3d"+h(d):null},createMarkupForCustomAttribute:function(a,c){return b(a)&&null!=c?a+"\x3d"+h(c):""},setValueForProperty:function(h,b,d){var k=
c.properties.hasOwnProperty(b)?c.properties[b]:null;if(k){var e=k.mutationMethod;e?e(h,d):a(k,d)?this.deleteValueForProperty(h,b):k.mustUseAttribute?(b=k.attributeName,(e=k.attributeNamespace)?h.setAttributeNS(e,b,""+d):k.hasBooleanValue||k.hasOverloadedBooleanValue&&!0===d?h.setAttribute(b,""):h.setAttribute(b,""+d)):(b=k.propertyName,k.hasSideEffects&&""+h[b]==""+d||(h[b]=d))}else c.isCustomAttribute(b)&&p.setValueForAttribute(h,b,d)},setValueForAttribute:function(a,c,h){b(c)&&(null==h?a.removeAttribute(c):
a.setAttribute(c,""+h))},deleteValueForProperty:function(a,h){var b=c.properties.hasOwnProperty(h)?c.properties[h]:null;if(b){var d=b.mutationMethod;if(d)d(a,void 0);else if(b.mustUseAttribute)a.removeAttribute(b.attributeName);else{var d=b.propertyName,k=c.getDefaultValueForProperty(a.nodeName,d);b.hasSideEffects&&""+a[d]===k||(a[d]=k)}}else c.isCustomAttribute(h)&&a.removeAttribute(h)}};d.measureMethods(p,"DOMPropertyOperations",{setValueForProperty:"setValueForProperty",setValueForAttribute:"setValueForAttribute",
deleteValueForProperty:"deleteValueForProperty"});e.exports=p},{10:10,120:120,151:151,69:69}],12:[function(f,e,d){var b=f(128),a=f(133),c=f(134),h=f(138),k=f(142),l=/^(<[^ \/>]+)/;e.exports={dangerouslyRenderMarkup:function(d){b.canUseDOM?void 0:k(!1);for(var e,f={},q=0;q<d.length;q++)d[q]?void 0:k(!1),e=d[q].substring(1,d[q].indexOf(" ")),e=h(e)?e:"*",f[e]=f[e]||[],f[e][q]=d[q];var q=[],r=0;for(e in f)if(f.hasOwnProperty(e)){var s,t=f[e];for(s in t)t.hasOwnProperty(s)&&(t[s]=t[s].replace(l,'$1 data-danger-index\x3d"'+
s+'" '));for(var t=a(t.join(""),c),u=0;u<t.length;++u){var v=t[u];v.hasAttribute&&v.hasAttribute("data-danger-index")&&(s=+v.getAttribute("data-danger-index"),v.removeAttribute("data-danger-index"),q.hasOwnProperty(s)?k(!1):void 0,q[s]=v,r+=1)}}return r!==q.length?k(!1):void 0,q.length!==d.length?k(!1):void 0,q},dangerouslyReplaceNodeWithMarkup:function(h,d){b.canUseDOM?void 0:k(!1);d?void 0:k(!1);"html"===h.tagName.toLowerCase()?k(!1):void 0;var e;e="string"==typeof d?a(d,c)[0]:d;h.parentNode.replaceChild(e,
h)}}},{128:128,133:133,134:134,138:138,142:142}],13:[function(f,e,d){f=f(146);f=[f({ResponderEventPlugin:null}),f({SimpleEventPlugin:null}),f({TapEventPlugin:null}),f({EnterLeaveEventPlugin:null}),f({ChangeEventPlugin:null}),f({SelectEventPlugin:null}),f({BeforeInputEventPlugin:null})];e.exports=f},{146:146}],14:[function(f,e,d){d=f(15);var b=f(19),a=f(94),c=f(63);f=f(146);var h=d.topLevelTypes,k=c.getFirstReactDOM,l={mouseEnter:{registrationName:f({onMouseEnter:null}),dependencies:[h.topMouseOut,
h.topMouseOver]},mouseLeave:{registrationName:f({onMouseLeave:null}),dependencies:[h.topMouseOut,h.topMouseOver]}},m=[null,null];e.exports={eventTypes:l,extractEvents:function(d,e,f,r,s){if(d===h.topMouseOver&&(r.relatedTarget||r.fromElement)||d!==h.topMouseOut&&d!==h.topMouseOver)return null;var t;if(e.window===e)t=e;else{var u=e.ownerDocument;t=u?u.defaultView||u.parentWindow:window}var v,w,x=u="";if(d===h.topMouseOut?(v=e,u=f,w=k(r.relatedTarget||r.toElement),w?x=c.getID(w):w=t,w=w||t):(v=t,w=
e,x=f),v===w)return null;d=a.getPooled(l.mouseLeave,u,r,s);d.type="mouseleave";d.target=v;d.relatedTarget=w;r=a.getPooled(l.mouseEnter,x,r,s);return r.type="mouseenter",r.target=w,r.relatedTarget=v,b.accumulateEnterLeaveDispatches(d,r,u,x),m[0]=d,m[1]=r,m}}},{146:146,15:15,19:19,63:63,94:94}],15:[function(f,e,d){f=f(145);d=f({bubbled:null,captured:null});f={topLevelTypes:f({topAbort:null,topBlur:null,topCanPlay:null,topCanPlayThrough:null,topChange:null,topClick:null,topCompositionEnd:null,topCompositionStart:null,
topCompositionUpdate:null,topContextMenu:null,topCopy:null,topCut:null,topDoubleClick:null,topDrag:null,topDragEnd:null,topDragEnter:null,topDragExit:null,topDragLeave:null,topDragOver:null,topDragStart:null,topDrop:null,topDurationChange:null,topEmptied:null,topEncrypted:null,topEnded:null,topError:null,topFocus:null,topInput:null,topKeyDown:null,topKeyPress:null,topKeyUp:null,topLoad:null,topLoadedData:null,topLoadedMetadata:null,topLoadStart:null,topMouseDown:null,topMouseMove:null,topMouseOut:null,
topMouseOver:null,topMouseUp:null,topPaste:null,topPause:null,topPlay:null,topPlaying:null,topProgress:null,topRateChange:null,topReset:null,topScroll:null,topSeeked:null,topSeeking:null,topSelectionChange:null,topStalled:null,topSubmit:null,topSuspend:null,topTextInput:null,topTimeUpdate:null,topTouchCancel:null,topTouchEnd:null,topTouchMove:null,topTouchStart:null,topVolumeChange:null,topWaiting:null,topWheel:null}),PropagationPhases:d};e.exports=f},{145:145}],16:[function(f,e,d){var b=f(17),a=
f(18),c=f(54),h=f(100),k=f(108),l=f(142),m=(f(151),{}),p=null,n=function(c,h){c&&(a.executeDispatchesInOrder(c,h),c.isPersistent()||c.constructor.release(c))},q=function(a){return n(a,!0)},r=function(a){return n(a,!1)},s=null;e.exports={injection:{injectMount:a.injection.injectMount,injectInstanceHandle:function(a){s=a},getInstanceHandle:function(){return s},injectEventPluginOrder:b.injectEventPluginOrder,injectEventPluginsByName:b.injectEventPluginsByName},eventNameDispatchConfigs:b.eventNameDispatchConfigs,
registrationNameModules:b.registrationNameModules,putListener:function(a,c,h){"function"!=typeof h?l(!1):void 0;(m[c]||(m[c]={}))[a]=h;var d=b.registrationNameModules[c];d&&d.didPutListener&&d.didPutListener(a,c,h)},getListener:function(a,c){var h=m[c];return h&&h[a]},deleteListener:function(a,c){var h=b.registrationNameModules[c];h&&h.willDeleteListener&&h.willDeleteListener(a,c);(h=m[c])&&delete h[a]},deleteAllListeners:function(a){for(var c in m)if(m[c][a]){var h=b.registrationNameModules[c];h&&
h.willDeleteListener&&h.willDeleteListener(a,c);delete m[c][a]}},extractEvents:function(a,c,d,k,e){for(var f,l=b.plugins,m=0;m<l.length;m++){var n=l[m];n&&(n=n.extractEvents(a,c,d,k,e))&&(f=h(f,n))}return f},enqueueEvents:function(a){a&&(p=h(p,a))},processEventQueue:function(a){var h=p;p=null;a?k(h,q):k(h,r);p?l(!1):void 0;c.rethrowCaughtError()},__purge:function(){m={}},__getListenerBank:function(){return m}}},{100:100,108:108,142:142,151:151,17:17,18:18,54:54}],17:[function(f,e,d){function b(){if(h)for(var b in k){var d=
k[b],e=h.indexOf(b);if(-1<e?void 0:c(!1),!l.plugins[e]){d.extractEvents?void 0:c(!1);l.plugins[e]=d;var e=d.eventTypes,f;for(f in e){var r;var s=e[f];r=d;var t=f;l.eventNameDispatchConfigs.hasOwnProperty(t)?c(!1):void 0;l.eventNameDispatchConfigs[t]=s;var u=s.phasedRegistrationNames;if(u){s=void 0;for(s in u)u.hasOwnProperty(s)&&a(u[s],r,t);r=!0}else r=s.registrationName?(a(s.registrationName,r,t),!0):!1;r?void 0:c(!1)}}}}function a(a,h,b){l.registrationNameModules[a]?c(!1):void 0;l.registrationNameModules[a]=
h;l.registrationNameDependencies[a]=h.eventTypes[b].dependencies}var c=f(142),h=null,k={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},injectEventPluginOrder:function(a){h?c(!1):void 0;h=Array.prototype.slice.call(a);b()},injectEventPluginsByName:function(a){var h=!1,d;for(d in a)if(a.hasOwnProperty(d)){var e=a[d];k.hasOwnProperty(d)&&k[d]===e||(k[d]?c(!1):void 0,k[d]=e,h=!0)}h&&b()},getPluginModuleForEvent:function(a){a=a.dispatchConfig;if(a.registrationName)return l.registrationNameModules[a.registrationName]||
null;for(var c in a.phasedRegistrationNames)if(a.phasedRegistrationNames.hasOwnProperty(c)){var h=l.registrationNameModules[a.phasedRegistrationNames[c]];if(h)return h}return null},_resetEventPlugins:function(){h=null;for(var a in k)k.hasOwnProperty(a)&&delete k[a];l.plugins.length=0;a=l.eventNameDispatchConfigs;for(var c in a)a.hasOwnProperty(c)&&delete a[c];c=l.registrationNameModules;for(var b in c)c.hasOwnProperty(b)&&delete c[b]}};e.exports=l},{142:142}],18:[function(f,e,d){function b(c,b,d,
e){var k=c.type||"unknown-event";c.currentTarget=h.Mount.getNode(e);b?a.invokeGuardedCallbackWithCatch(k,d,c,e):a.invokeGuardedCallback(k,d,c,e);c.currentTarget=null}d=f(15);var a=f(54),c=f(142),h=(f(151),{Mount:null,injectMount:function(a){h.Mount=a}}),k=d.topLevelTypes;e.exports={isEndish:function(a){return a===k.topMouseUp||a===k.topTouchEnd||a===k.topTouchCancel},isMoveish:function(a){return a===k.topMouseMove||a===k.topTouchMove},isStartish:function(a){return a===k.topMouseDown||a===k.topTouchStart},
executeDirectDispatch:function(a){var h=a._dispatchListeners,b=a._dispatchIDs;Array.isArray(h)?c(!1):void 0;h=h?h(a,b):null;return a._dispatchListeners=null,a._dispatchIDs=null,h},executeDispatchesInOrder:function(a,c){var h=a._dispatchListeners,d=a._dispatchIDs;if(Array.isArray(h))for(var e=0;e<h.length&&!a.isPropagationStopped();e++)b(a,c,h[e],d[e]);else h&&b(a,c,h,d);a._dispatchListeners=null;a._dispatchIDs=null},executeDispatchesInOrderStopAtTrue:function(a){var c;a:{c=a._dispatchListeners;var h=
a._dispatchIDs;if(Array.isArray(c))for(var b=0;b<c.length&&!a.isPropagationStopped();b++){if(c[b](a,h[b])){c=h[b];break a}}else if(c&&c(a,h)){c=h;break a}c=null}return a._dispatchIDs=null,a._dispatchListeners=null,c},hasDispatches:function(a){return!!a._dispatchListeners},getNode:function(a){return h.Mount.getNode(a)},getID:function(a){return h.Mount.getID(a)},injection:h}},{142:142,15:15,151:151,54:54}],19:[function(f,e,d){function b(a,c,h){(c=q(a,h.dispatchConfig.phasedRegistrationNames[c?n.bubbled:
n.captured]))&&(h._dispatchListeners=m(h._dispatchListeners,c),h._dispatchIDs=m(h._dispatchIDs,a))}function a(a){a&&a.dispatchConfig.phasedRegistrationNames&&l.injection.getInstanceHandle().traverseTwoPhase(a.dispatchMarker,b,a)}function c(a){a&&a.dispatchConfig.phasedRegistrationNames&&l.injection.getInstanceHandle().traverseTwoPhaseSkipTarget(a.dispatchMarker,b,a)}function h(a,c,h){h&&h.dispatchConfig.registrationName&&(c=q(a,h.dispatchConfig.registrationName))&&(h._dispatchListeners=m(h._dispatchListeners,
c),h._dispatchIDs=m(h._dispatchIDs,a))}function k(a){a&&a.dispatchConfig.registrationName&&h(a.dispatchMarker,null,a)}d=f(15);var l=f(16),m=(f(151),f(100)),p=f(108),n=d.PropagationPhases,q=l.getListener;e.exports={accumulateTwoPhaseDispatches:function(c){p(c,a)},accumulateTwoPhaseDispatchesSkipTarget:function(a){p(a,c)},accumulateDirectDispatches:function(a){p(a,k)},accumulateEnterLeaveDispatches:function(a,c,b,d){l.injection.getInstanceHandle().traverseEnterLeave(b,d,h,a,c)}}},{100:100,108:108,15:15,
151:151,16:16}],20:[function(f,e,d){function b(a){this._root=a;this._startText=this.getText();this._fallbackText=null}d=f(24);var a=f(23),c=f(115);a(b.prototype,{destructor:function(){this._fallbackText=this._startText=this._root=null},getText:function(){return"value"in this._root?this._root.value:this._root[c()]},getData:function(){if(this._fallbackText)return this._fallbackText;var a,c,b=this._startText,d=b.length,e=this.getText(),f=e.length;for(a=0;d>a&&b[a]===e[a];a++);var q=d-a;for(c=1;q>=c&&
b[d-c]===e[f-c];c++);return this._fallbackText=e.slice(a,1<c?1-c:void 0),this._fallbackText}});d.addPoolingTo(b);e.exports=b},{115:115,23:23,24:24}],21:[function(f,e,d){var b,a=f(10),c=f(128);f=a.injection.MUST_USE_ATTRIBUTE;d=a.injection.MUST_USE_PROPERTY;var h=a.injection.HAS_BOOLEAN_VALUE,k=a.injection.HAS_SIDE_EFFECTS,l=a.injection.HAS_NUMERIC_VALUE,m=a.injection.HAS_POSITIVE_NUMERIC_VALUE,a=a.injection.HAS_OVERLOADED_BOOLEAN_VALUE;c.canUseDOM&&(b=(b=document.implementation)&&b.hasFeature&&b.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure",
"1.1"));b={isCustomAttribute:RegExp.prototype.test.bind(/^(data|aria)-[a-z_][a-z\d_.\-]*$/),Properties:{accept:null,acceptCharset:null,accessKey:null,action:null,allowFullScreen:f|h,allowTransparency:f,alt:null,async:h,autoComplete:null,autoPlay:h,capture:f|h,cellPadding:null,cellSpacing:null,charSet:f,challenge:f,checked:d|h,classID:f,className:b?f:d,cols:f|m,colSpan:null,content:null,contentEditable:null,contextMenu:f,controls:d|h,coords:null,crossOrigin:null,data:null,dateTime:f,"default":h,defer:h,
dir:null,disabled:f|h,download:a,draggable:null,encType:null,form:f,formAction:f,formEncType:f,formMethod:f,formNoValidate:h,formTarget:f,frameBorder:f,headers:null,height:f,hidden:f|h,high:null,href:null,hrefLang:null,htmlFor:null,httpEquiv:null,icon:null,id:d,inputMode:f,integrity:null,is:f,keyParams:f,keyType:f,kind:null,label:null,lang:null,list:f,loop:d|h,low:null,manifest:f,marginHeight:null,marginWidth:null,max:null,maxLength:f,media:f,mediaGroup:null,method:null,min:null,minLength:f,multiple:d|
h,muted:d|h,name:null,nonce:f,noValidate:h,open:h,optimum:null,pattern:null,placeholder:null,poster:null,preload:null,radioGroup:null,readOnly:d|h,rel:null,required:h,reversed:h,role:f,rows:f|m,rowSpan:null,sandbox:null,scope:null,scoped:h,scrolling:null,seamless:f|h,selected:d|h,shape:null,size:f|m,sizes:f,span:m,spellCheck:null,src:null,srcDoc:d,srcLang:null,srcSet:f,start:l,step:null,style:null,summary:null,tabIndex:null,target:null,title:null,type:null,useMap:null,value:d|k,width:f,wmode:f,wrap:null,
about:f,datatype:f,inlist:f,prefix:f,property:f,resource:f,"typeof":f,vocab:f,autoCapitalize:f,autoCorrect:f,autoSave:null,color:null,itemProp:f,itemScope:f|h,itemType:f,itemID:f,itemRef:f,results:null,security:f,unselectable:f},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMPropertyNames:{autoComplete:"autocomplete",autoFocus:"autofocus",autoPlay:"autoplay",autoSave:"autosave",encType:"encoding",hrefLang:"hreflang",radioGroup:"radiogroup",
spellCheck:"spellcheck",srcDoc:"srcdoc",srcSet:"srcset"}};e.exports=b},{10:10,128:128}],22:[function(f,e,d){function b(a){null!=a.checkedLink&&null!=a.valueLink?k(!1):void 0}function a(a){b(a);null!=a.value||null!=a.onChange?k(!1):void 0}function c(a){b(a);null!=a.checked||null!=a.onChange?k(!1):void 0}d=f(72);var h=f(71),k=f(142),l=(f(151),{button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0}),m={value:function(a,c,h){return!a[c]||l[a.type]||a.onChange||a.readOnly||a.disabled?null:
Error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.")},checked:function(a,c,h){return!a[c]||a.onChange||a.readOnly||a.disabled?null:Error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")},
onChange:d.func},p={};e.exports={checkPropTypes:function(a,c,b){for(var d in m){if(m.hasOwnProperty(d))var e=m[d](c,d,a,h.prop);e instanceof Error&&!(e.message in p)&&(p[e.message]=!0,b&&b.getName())}},getValue:function(c){return c.valueLink?(a(c),c.valueLink.value):c.value},getChecked:function(a){return a.checkedLink?(c(a),a.checkedLink.value):a.checked},executeOnChange:function(h,b){return h.valueLink?(a(h),h.valueLink.requestChange(b.target.value)):h.checkedLink?(c(h),h.checkedLink.requestChange(b.target.checked)):
h.onChange?h.onChange.call(void 0,b):void 0}}},{142:142,151:151,71:71,72:72}],23:[function(f,e,d){e.exports=function(b,a){if(null==b)throw new TypeError("Object.assign target cannot be null or undefined");for(var c=Object(b),h=Object.prototype.hasOwnProperty,d=1;d<arguments.length;d++){var e=arguments[d];if(null!=e){var e=Object(e),f;for(f in e)h.call(e,f)&&(c[f]=e[f])}}return c}},{}],24:[function(f,e,d){var b=f(142),a=function(a){if(this.instancePool.length){var c=this.instancePool.pop();return this.call(c,
a),c}return new this(a)},c=function(a){a instanceof this?void 0:b(!1);a.destructor();this.instancePool.length<this.poolSize&&this.instancePool.push(a)};e.exports={addPoolingTo:function(h,b){return h.instancePool=[],h.getPooled=b||a,h.poolSize||(h.poolSize=10),h.release=c,h},oneArgumentPooler:a,twoArgumentPooler:function(a,c){if(this.instancePool.length){var b=this.instancePool.pop();return this.call(b,a,c),b}return new this(a,c)},threeArgumentPooler:function(a,c,b){if(this.instancePool.length){var d=
this.instancePool.pop();return this.call(d,a,c,b),d}return new this(a,c,b)},fourArgumentPooler:function(a,c,b,d){if(this.instancePool.length){var e=this.instancePool.pop();return this.call(e,a,c,b,d),e}return new this(a,c,b,d)},fiveArgumentPooler:function(a,c,b,d,e){if(this.instancePool.length){var f=this.instancePool.pop();return this.call(f,a,c,b,d,e),f}return new this(a,c,b,d,e)}}},{142:142}],25:[function(f,e,d){var b=(f(60),f(106)),a=(f(151),"_getDOMNodeDidWarn");e.exports={getDOMNode:function(){return this.constructor[a]=
!0,b(this)}}},{106:106,151:151,60:60}],26:[function(f,e,d){var b=f(15);d=f(16);var a=f(17),c=f(55),h=f(69),k=f(99),l=f(23),m=f(117),p={},n=!1,q=0,r={topAbort:"abort",topBlur:"blur",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topChange:"change",topClick:"click",topCompositionEnd:"compositionend",topCompositionStart:"compositionstart",topCompositionUpdate:"compositionupdate",topContextMenu:"contextmenu",topCopy:"copy",topCut:"cut",topDoubleClick:"dblclick",topDrag:"drag",topDragEnd:"dragend",
topDragEnter:"dragenter",topDragExit:"dragexit",topDragLeave:"dragleave",topDragOver:"dragover",topDragStart:"dragstart",topDrop:"drop",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topFocus:"focus",topInput:"input",topKeyDown:"keydown",topKeyPress:"keypress",topKeyUp:"keyup",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topMouseDown:"mousedown",topMouseMove:"mousemove",topMouseOut:"mouseout",
topMouseOver:"mouseover",topMouseUp:"mouseup",topPaste:"paste",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topScroll:"scroll",topSeeked:"seeked",topSeeking:"seeking",topSelectionChange:"selectionchange",topStalled:"stalled",topSuspend:"suspend",topTextInput:"textInput",topTimeUpdate:"timeupdate",topTouchCancel:"touchcancel",topTouchEnd:"touchend",topTouchMove:"touchmove",topTouchStart:"touchstart",topVolumeChange:"volumechange",topWaiting:"waiting",
topWheel:"wheel"},s="_reactListenersID"+String(Math.random()).slice(2),t=l({},c,{ReactEventListener:null,injection:{injectReactEventListener:function(a){a.setHandleTopLevel(t.handleTopLevel);t.ReactEventListener=a}},setEnabled:function(a){t.ReactEventListener&&t.ReactEventListener.setEnabled(a)},isEnabled:function(){return!(!t.ReactEventListener||!t.ReactEventListener.isEnabled())},listenTo:function(c,h){for(var d=(Object.prototype.hasOwnProperty.call(h,s)||(h[s]=q++,p[h[s]]={}),p[h[s]]),e=a.registrationNameDependencies[c],
k=b.topLevelTypes,f=0;f<e.length;f++){var l=e[f];d.hasOwnProperty(l)&&d[l]||(l===k.topWheel?m("wheel")?t.ReactEventListener.trapBubbledEvent(k.topWheel,"wheel",h):m("mousewheel")?t.ReactEventListener.trapBubbledEvent(k.topWheel,"mousewheel",h):t.ReactEventListener.trapBubbledEvent(k.topWheel,"DOMMouseScroll",h):l===k.topScroll?m("scroll",!0)?t.ReactEventListener.trapCapturedEvent(k.topScroll,"scroll",h):t.ReactEventListener.trapBubbledEvent(k.topScroll,"scroll",t.ReactEventListener.WINDOW_HANDLE):
l===k.topFocus||l===k.topBlur?(m("focus",!0)?(t.ReactEventListener.trapCapturedEvent(k.topFocus,"focus",h),t.ReactEventListener.trapCapturedEvent(k.topBlur,"blur",h)):m("focusin")&&(t.ReactEventListener.trapBubbledEvent(k.topFocus,"focusin",h),t.ReactEventListener.trapBubbledEvent(k.topBlur,"focusout",h)),d[k.topBlur]=!0,d[k.topFocus]=!0):r.hasOwnProperty(l)&&t.ReactEventListener.trapBubbledEvent(l,r[l],h),d[l]=!0)}},trapBubbledEvent:function(a,c,h){return t.ReactEventListener.trapBubbledEvent(a,
c,h)},trapCapturedEvent:function(a,c,h){return t.ReactEventListener.trapCapturedEvent(a,c,h)},ensureScrollValueMonitoring:function(){n||(t.ReactEventListener.monitorScrollValue(k.refreshScrollValues),n=!0)},eventNameDispatchConfigs:d.eventNameDispatchConfigs,registrationNameModules:d.registrationNameModules,putListener:d.putListener,getListener:d.getListener,deleteListener:d.deleteListener,deleteAllListeners:d.deleteAllListeners});h.measureMethods(t,"ReactBrowserEventEmitter",{putListener:"putListener",
deleteListener:"deleteListener"});e.exports=t},{117:117,15:15,16:16,17:17,23:23,55:55,69:69,99:99}],27:[function(f,e,d){function b(a,h,b){var d=void 0===a[b];null!=h&&d&&(a[b]=c(h,null))}var a=f(74),c=f(116),h=f(124),k=f(125);f=(f(151),{instantiateChildren:function(a,c,h){if(null==a)return null;c={};return k(a,b,c),c},updateChildren:function(b,d,e,k){if(!d&&!b)return null;for(var f in d)if(d.hasOwnProperty(f)){var r=b&&b[f],s=r&&r._currentElement,t=d[f];null!=r&&h(s,t)?a.receiveComponent(r,t,e,k):
(r&&a.unmountComponent(r,f),r=c(t,null));d[f]=r}for(f in b)!b.hasOwnProperty(f)||d&&d.hasOwnProperty(f)||a.unmountComponent(b[f]);return d},unmountChildren:function(c){for(var h in c)c.hasOwnProperty(h)&&a.unmountComponent(c[h])}});e.exports=f},{116:116,124:124,125:125,151:151,74:74}],28:[function(f,e,d){function b(a,c){this.func=a;this.context=c;this.count=0}function a(a,c,h){a.func.call(a.context,c,a.count++)}function c(a,c,h,b){this.result=a;this.keyPrefix=c;this.func=h;this.context=b;this.count=
0}function h(a,c,h){var b=a.result,d=a.keyPrefix;a=a.func.call(a.context,c,a.count++);Array.isArray(a)?k(a,b,h,p.thatReturnsArgument):null!=a&&(m.isValidElement(a)&&(a=m.cloneAndReplaceKey(a,d+(a!==c?(""+(a.key||"")).replace(r,"//")+"/":"")+h)),b.push(a))}function k(a,b,d,e,k){var f="";null!=d&&(f=(""+d).replace(r,"//")+"/");b=c.getPooled(b,f,e,k);n(a,h,b);c.release(b)}function l(a,c,h){return null}d=f(24);var m=f(50),p=f(134),n=f(125);f=d.twoArgumentPooler;var q=d.fourArgumentPooler,r=/\/(?!\/)/g;
b.prototype.destructor=function(){this.context=this.func=null;this.count=0};d.addPoolingTo(b,f);c.prototype.destructor=function(){this.context=this.func=this.keyPrefix=this.result=null;this.count=0};d.addPoolingTo(c,q);e.exports={forEach:function(c,h,d){if(null==c)return c;h=b.getPooled(h,d);n(c,a,h);b.release(h)},map:function(a,c,h){if(null==a)return a;var b=[];return k(a,b,null,c,h),b},mapIntoWithKeyPrefixInternal:k,count:function(a,c){return n(a,l,null)},toArray:function(a){var c=[];return k(a,
c,null,p.thatReturnsArgument),c}}},{125:125,134:134,24:24,50:50}],29:[function(f,e,d){function b(a,b){if(b){"function"==typeof b?n(!1):void 0;k.isValidElement(b)?n(!1):void 0;var d=a.prototype;b.hasOwnProperty(s)&&w.mixins(a,b.mixins);for(var e in b)if(b.hasOwnProperty(e)&&e!==s){var f=b[e],l=d,m=e,p=v.hasOwnProperty(m)?v[m]:null;x.hasOwnProperty(m)&&(p!==t.OVERRIDE_BASE?n(!1):void 0);l.hasOwnProperty(m)&&(p!==t.DEFINE_MANY&&p!==t.DEFINE_MANY_MERGED?n(!1):void 0);if(w.hasOwnProperty(e))w[e](a,f);
else l=v.hasOwnProperty(e),m=d.hasOwnProperty(e),"function"==typeof f&&!l&&!m&&!1!==b.autobind?(d.__reactAutoBindMap||(d.__reactAutoBindMap={}),d.__reactAutoBindMap[e]=f,d[e]=f):m?(m=v[e],!l||m!==t.DEFINE_MANY_MERGED&&m!==t.DEFINE_MANY?n(!1):void 0,m===t.DEFINE_MANY_MERGED?d[e]=c(d[e],f):m===t.DEFINE_MANY&&(d[e]=h(d[e],f))):d[e]=f}}}function a(a,c){a&&c&&"object"==typeof a&&"object"==typeof c?void 0:n(!1);for(var h in c)c.hasOwnProperty(h)&&(void 0!==a[h]?n(!1):void 0,a[h]=c[h]);return a}function c(c,
h){return function(){var b=c.apply(this,arguments),d=h.apply(this,arguments);if(null==b)return d;if(null==d)return b;var e={};return a(e,b),a(e,d),e}}function h(a,c){return function(){a.apply(this,arguments);c.apply(this,arguments)}}d=f(30);var k=f(50),l=(f(71),f(70),f(67)),m=f(23),p=f(135),n=f(142),q=f(145),r=f(146),s=(f(151),r({mixins:null})),t=q({DEFINE_ONCE:null,DEFINE_MANY:null,OVERRIDE_BASE:null,DEFINE_MANY_MERGED:null}),u=[],v={mixins:t.DEFINE_MANY,statics:t.DEFINE_MANY,propTypes:t.DEFINE_MANY,
contextTypes:t.DEFINE_MANY,childContextTypes:t.DEFINE_MANY,getDefaultProps:t.DEFINE_MANY_MERGED,getInitialState:t.DEFINE_MANY_MERGED,getChildContext:t.DEFINE_MANY_MERGED,render:t.DEFINE_ONCE,componentWillMount:t.DEFINE_MANY,componentDidMount:t.DEFINE_MANY,componentWillReceiveProps:t.DEFINE_MANY,shouldComponentUpdate:t.DEFINE_ONCE,componentWillUpdate:t.DEFINE_MANY,componentDidUpdate:t.DEFINE_MANY,componentWillUnmount:t.DEFINE_MANY,updateComponent:t.OVERRIDE_BASE},w={displayName:function(a,c){a.displayName=
c},mixins:function(a,c){if(c)for(var h=0;h<c.length;h++)b(a,c[h])},childContextTypes:function(a,c){a.childContextTypes=m({},a.childContextTypes,c)},contextTypes:function(a,c){a.contextTypes=m({},a.contextTypes,c)},getDefaultProps:function(a,h){a.getDefaultProps?a.getDefaultProps=c(a.getDefaultProps,h):a.getDefaultProps=h},propTypes:function(a,c){a.propTypes=m({},a.propTypes,c)},statics:function(a,c){if(c)for(var h in c){var b=c[h];c.hasOwnProperty(h)&&(h in w?n(!1):void 0,h in a?n(!1):void 0,a[h]=
b)}},autobind:function(){}},x={replaceState:function(a,c){this.updater.enqueueReplaceState(this,a);c&&this.updater.enqueueCallback(this,c)},isMounted:function(){return this.updater.isMounted(this)},setProps:function(a,c){this.updater.enqueueSetProps(this,a);c&&this.updater.enqueueCallback(this,c)},replaceProps:function(a,c){this.updater.enqueueReplaceProps(this,a);c&&this.updater.enqueueCallback(this,c)}},y=function(){};m(y.prototype,d.prototype,x);e.exports={createClass:function(a){var c=function(a,
c,h){if(this.__reactAutoBindMap)for(var b in this.__reactAutoBindMap)this.__reactAutoBindMap.hasOwnProperty(b)&&(this[b]=this.__reactAutoBindMap[b].bind(this));this.props=a;this.context=c;this.refs=p;this.updater=h||l;this.state=null;a=this.getInitialState?this.getInitialState():null;"object"!=typeof a||Array.isArray(a)?n(!1):void 0;this.state=a};c.prototype=new y;c.prototype.constructor=c;u.forEach(b.bind(null,c));b(c,a);c.getDefaultProps&&(c.defaultProps=c.getDefaultProps());c.prototype.render?
void 0:n(!1);for(var h in v)c.prototype[h]||(c.prototype[h]=null);return c},injection:{injectMixin:function(a){u.push(a)}}}},{135:135,142:142,145:145,146:146,151:151,23:23,30:30,50:50,67:67,70:70,71:71}],30:[function(f,e,d){function b(h,b,d){this.props=h;this.context=b;this.refs=c;this.updater=d||a}var a=f(67),c=(f(102),f(135)),h=f(142);f(151);b.prototype.isReactComponent={};b.prototype.setState=function(a,c){"object"!=typeof a&&"function"!=typeof a&&null!=a?h(!1):void 0;this.updater.enqueueSetState(this,
a);c&&this.updater.enqueueCallback(this,c)};b.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this);a&&this.updater.enqueueCallback(this,a)};e.exports=b},{102:102,135:135,142:142,151:151,67:67}],31:[function(f,e,d){d=f(40);var b=f(63);e.exports={processChildrenUpdates:d.dangerouslyProcessChildrenUpdates,replaceNodeWithMarkupByID:d.dangerouslyReplaceNodeWithMarkupByID,unmountIDFromEnvironment:function(a){b.purgeID(a)}}},{40:40,63:63}],32:[function(f,e,d){var b=f(142),a=!1,c={unmountIDFromEnvironment:null,
replaceNodeWithMarkupByID:null,processChildrenUpdates:null,injection:{injectEnvironment:function(h){a?b(!1):void 0;c.unmountIDFromEnvironment=h.unmountIDFromEnvironment;c.replaceNodeWithMarkupByID=h.replaceNodeWithMarkupByID;c.processChildrenUpdates=h.processChildrenUpdates;a=!0}}};e.exports=c},{142:142}],33:[function(f,e,d){function b(a){}var a=f(32),c=f(34),h=f(50),k=f(60);d=f(69);var l=f(71),m=(f(70),f(74)),p=f(80),n=f(23),q=f(135),r=f(142),s=f(124);f(151);b.prototype.render=function(){var a=k.get(this)._currentElement.type;
return a(this.props,this.context,this.updater)};var t=1;f={construct:function(a){this._currentElement=a;this._pendingStateQueue=this._pendingElement=this._instance=this._rootNodeID=null;this._pendingForceUpdate=this._pendingReplaceState=!1;this._context=this._renderedComponent=null;this._mountOrder=0;this._pendingCallbacks=this._topLevelWrapper=null},mountComponent:function(a,c,d){this._context=d;this._mountOrder=t++;this._rootNodeID=a;var e,f,l=this._processProps(this._currentElement.props),n=this._processContext(d),
s=this._currentElement.type,F="prototype"in s;F&&(e=new s(l,n,p));(!F||null===e||!1===e||h.isValidElement(e))&&(f=e,e=new b(s));e.props=l;e.context=n;e.refs=q;e.updater=p;this._instance=e;k.set(e,this);l=e.state;void 0===l&&(e.state=l=null);"object"!=typeof l||Array.isArray(l)?r(!1):void 0;this._pendingStateQueue=null;this._pendingForceUpdate=this._pendingReplaceState=!1;e.componentWillMount&&(e.componentWillMount(),this._pendingStateQueue&&(e.state=this._processPendingState(e.props,e.context)));
void 0===f&&(f=this._renderValidatedComponent());this._renderedComponent=this._instantiateReactComponent(f);a=m.mountComponent(this._renderedComponent,a,c,this._processChildContext(d));return e.componentDidMount&&c.getReactMountReady().enqueue(e.componentDidMount,e),a},unmountComponent:function(){var a=this._instance;a.componentWillUnmount&&a.componentWillUnmount();m.unmountComponent(this._renderedComponent);this._pendingStateQueue=this._instance=this._renderedComponent=null;this._pendingForceUpdate=
this._pendingReplaceState=!1;this._topLevelWrapper=this._rootNodeID=this._context=this._pendingElement=this._pendingCallbacks=null;k.remove(a)},_maskContext:function(a){var c=null,h=this._currentElement.type.contextTypes;if(!h)return q;var c={},b;for(b in h)c[b]=a[b];return c},_processContext:function(a){return this._maskContext(a)},_processChildContext:function(a){var c=this._currentElement.type,h=this._instance;if(h=h.getChildContext&&h.getChildContext()){"object"!=typeof c.childContextTypes?r(!1):
void 0;for(var b in h)b in c.childContextTypes?void 0:r(!1);return n({},a,h)}return a},_processProps:function(a){return a},_checkPropTypes:function(a,c,h){var b=this.getName(),d;for(d in a)if(a.hasOwnProperty(d)){var e;try{"function"!=typeof a[d]?r(!1):void 0,e=a[d](c,d,b,h)}catch(k){e=k}if(e instanceof Error){var f=this._currentElement._owner||null;f&&f.getName();h===l.prop}}},receiveComponent:function(a,c,h){var b=this._currentElement,d=this._context;this._pendingElement=null;this.updateComponent(c,
b,a,d,h)},performUpdateIfNecessary:function(a){null!=this._pendingElement&&m.receiveComponent(this,this._pendingElement||this._currentElement,a,this._context);(null!==this._pendingStateQueue||this._pendingForceUpdate)&&this.updateComponent(a,this._currentElement,this._currentElement,this._context,this._context)},updateComponent:function(a,c,h,b,d){var e;b=this._instance;var k=this._context===d?b.context:this._processContext(d);c===h?e=h.props:(e=this._processProps(h.props),b.componentWillReceiveProps&&
b.componentWillReceiveProps(e,k));c=this._processPendingState(e,k);this._pendingForceUpdate||!b.shouldComponentUpdate||b.shouldComponentUpdate(e,c,k)?(this._pendingForceUpdate=!1,this._performComponentUpdate(h,e,c,k,a,d)):(this._currentElement=h,this._context=d,b.props=e,b.state=c,b.context=k)},_processPendingState:function(a,c){var h=this._instance,b=this._pendingStateQueue,d=this._pendingReplaceState;if(this._pendingReplaceState=!1,this._pendingStateQueue=null,!b)return h.state;if(d&&1===b.length)return b[0];
for(var e=n({},d?b[0]:h.state),d=d?1:0;d<b.length;d++){var k=b[d];n(e,"function"==typeof k?k.call(h,e,a,c):k)}return e},_performComponentUpdate:function(a,c,h,b,d,e){var k,f,l,m=this._instance,n=Boolean(m.componentDidUpdate);n&&(k=m.props,f=m.state,l=m.context);m.componentWillUpdate&&m.componentWillUpdate(c,h,b);this._currentElement=a;this._context=e;m.props=c;m.state=h;m.context=b;this._updateRenderedComponent(d,e);n&&d.getReactMountReady().enqueue(m.componentDidUpdate.bind(m,k,f,l),m)},_updateRenderedComponent:function(a,
c){var h=this._renderedComponent,b=h._currentElement,d=this._renderValidatedComponent();if(s(b,d))m.receiveComponent(h,d,a,this._processChildContext(c));else{var e=this._rootNodeID,b=h._rootNodeID;m.unmountComponent(h);this._renderedComponent=this._instantiateReactComponent(d);h=m.mountComponent(this._renderedComponent,e,a,this._processChildContext(c));this._replaceNodeWithMarkupByID(b,h)}},_replaceNodeWithMarkupByID:function(c,h){a.replaceNodeWithMarkupByID(c,h)},_renderValidatedComponentWithoutOwnerOrContext:function(){return this._instance.render()},
_renderValidatedComponent:function(){var a;c.current=this;try{a=this._renderValidatedComponentWithoutOwnerOrContext()}finally{c.current=null}return null===a||!1===a||h.isValidElement(a)?void 0:r(!1),a},attachRef:function(a,c){var h=this.getPublicInstance();null==h?r(!1):void 0;var b=c.getPublicInstance();(h.refs===q?h.refs={}:h.refs)[a]=b},detachRef:function(a){delete this.getPublicInstance().refs[a]},getName:function(){var a=this._currentElement.type,c=this._instance&&this._instance.constructor;
return a.displayName||c&&c.displayName||a.name||c&&c.name||null},getPublicInstance:function(){var a=this._instance;return a instanceof b?null:a},_instantiateReactComponent:null};d.measureMethods(f,"ReactCompositeComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent",_renderValidatedComponent:"_renderValidatedComponent"});e.exports={Mixin:f}},{124:124,135:135,142:142,151:151,23:23,32:32,34:34,50:50,60:60,69:69,70:70,71:71,74:74,80:80}],34:[function(f,e,d){e.exports={current:null}},
{}],35:[function(f,e,d){d=f(34);var b=f(46),a=f(49),c=f(59),h=f(63),k=f(69),l=f(74),m=f(81),p=f(82),n=f(106),q=f(121);f(151);a.inject();f=k.measure("React","render",h.render);f={findDOMNode:n,render:f,unmountComponentAtNode:h.unmountComponentAtNode,version:p,unstable_batchedUpdates:m.batchedUpdates,unstable_renderSubtreeIntoContainer:q};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({CurrentOwner:d,
InstanceHandles:c,Mount:h,Reconciler:l,TextComponent:b});e.exports=f},{106:106,121:121,151:151,34:34,46:46,49:49,59:59,63:63,69:69,74:74,81:81,82:82}],36:[function(f,e,d){var b={onClick:!0,onDoubleClick:!0,onMouseDown:!0,onMouseMove:!0,onMouseUp:!0,onClickCapture:!0,onDoubleClickCapture:!0,onMouseDownCapture:!0,onMouseMoveCapture:!0,onMouseUpCapture:!0};e.exports={getNativeProps:function(a,c,h){if(!c.disabled)return c;a={};for(var d in c)c.hasOwnProperty(d)&&!b[d]&&(a[d]=c[d]);return a}}},{}],37:[function(f,
e,d){function b(){return this}function a(){return!!this._reactInternalComponent}function c(){}function h(a,c){var h=this._reactInternalComponent;h&&(G.enqueueSetPropsInternal(h,a),c&&G.enqueueCallbackInternal(h,c))}function k(a,c){var h=this._reactInternalComponent;h&&(G.enqueueReplacePropsInternal(h,a),c&&G.enqueueCallbackInternal(h,c))}function l(a,c){c&&(null!=c.dangerouslySetInnerHTML&&(null!=c.children?S(!1):void 0,"object"==typeof c.dangerouslySetInnerHTML&&da in c.dangerouslySetInnerHTML?void 0:
S(!1)),null!=c.style&&"object"!=typeof c.style?S(!1):void 0)}function m(a,c,h,b){var d=C.findReactContainerForID(a);d&&X(c,d.nodeType===ma?d.ownerDocument:d);b.getReactMountReady().enqueue(p,{id:a,registrationName:c,listener:h})}function p(){y.putListener(this.id,this.registrationName,this.listener)}function n(){this._rootNodeID?void 0:S(!1);var a=C.getNode(this._rootNodeID);switch(a?void 0:S(!1),this._tag){case "iframe":this._wrapperState.listeners=[y.trapBubbledEvent(x.topLevelTypes.topLoad,"load",
a)];break;case "video":case "audio":this._wrapperState.listeners=[];for(var c in ga)ga.hasOwnProperty(c)&&this._wrapperState.listeners.push(y.trapBubbledEvent(x.topLevelTypes[c],ga[c],a));break;case "img":this._wrapperState.listeners=[y.trapBubbledEvent(x.topLevelTypes.topError,"error",a),y.trapBubbledEvent(x.topLevelTypes.topLoad,"load",a)];break;case "form":this._wrapperState.listeners=[y.trapBubbledEvent(x.topLevelTypes.topReset,"reset",a),y.trapBubbledEvent(x.topLevelTypes.topSubmit,"submit",
a)]}}function q(){E.mountReadyWrapper(this)}function r(){I.postUpdateWrapper(this)}function s(a){aa.call(J,a)||(W.test(a)?void 0:S(!1),J[a]=!0);this._tag=a.toLowerCase();this._nodeWithLegacyProperties=this._topLevelWrapper=this._wrapperState=this._rootNodeID=this._previousStyleCopy=this._previousStyle=this._renderedChildren=null}var t=f(2),u=f(5),v=f(10),w=f(11),x=f(15),y=f(26),B=f(31),D=f(36),E=f(41),F=f(42),I=f(43),L=f(47),C=f(63);d=f(64);var M=f(69),G=f(80),N=f(23),P=f(102),R=f(105),S=f(142),K=
(f(117),f(146)),Q=f(122),U=f(123),T=(f(149),f(126),f(151),y.deleteListener),X=y.listenTo,$=y.registrationNameModules,V={string:!0,number:!0},ka=K({children:null}),la=K({style:null}),da=K({__html:null}),ma=1,ga={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",
topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},na={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},A={listing:!0,pre:!0,textarea:!0},W=(N({menuitem:!0},na),/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/),J={},aa={}.hasOwnProperty;s.displayName=
"ReactDOMComponent";s.Mixin={construct:function(a){this._currentElement=a},mountComponent:function(a,c,h){this._rootNodeID=a;a=this._currentElement.props;switch(this._tag){case "iframe":case "img":case "form":case "video":case "audio":this._wrapperState={listeners:null};c.getReactMountReady().enqueue(n,this);break;case "button":a=D.getNativeProps(this,a,h);break;case "input":E.mountWrapper(this,a,h);a=E.getNativeProps(this,a,h);break;case "option":F.mountWrapper(this,a,h);a=F.getNativeProps(this,
a,h);break;case "select":I.mountWrapper(this,a,h);a=I.getNativeProps(this,a,h);h=I.processChildContext(this,a,h);break;case "textarea":L.mountWrapper(this,a,h),a=L.getNativeProps(this,a,h)}l(this,a);if(c.useCreateElement){var b=h[C.ownerDocumentContextKey].createElement(this._currentElement.type);w.setAttributeForID(b,this._rootNodeID);C.getID(b);this._updateDOMProperties({},a,c,b);this._createInitialChildren(c,a,h,b);h=b}else b=this._createOpenTagMarkupAndPutListeners(c,a),h=this._createContentMarkup(c,
a,h),h=!h&&na[this._tag]?b+"/\x3e":b+"\x3e"+h+"\x3c/"+this._currentElement.type+"\x3e";switch(this._tag){case "input":c.getReactMountReady().enqueue(q,this);case "button":case "select":case "textarea":a.autoFocus&&c.getReactMountReady().enqueue(t.focusDOMComponent,this)}return h},_createOpenTagMarkupAndPutListeners:function(a,c){var h="\x3c"+this._currentElement.type,b;for(b in c)if(c.hasOwnProperty(b)){var d=c[b];if(null!=d)if($.hasOwnProperty(b))d&&m(this._rootNodeID,b,d,a);else{b===la&&(d&&(d=
this._previousStyleCopy=N({},c.style)),d=u.createMarkupForStyles(d));var e=null;null!=this._tag&&(0<=this._tag.indexOf("-")||null!=c.is)?b!==ka&&(e=w.createMarkupForCustomAttribute(b,d)):e=w.createMarkupForProperty(b,d);e&&(h+=" "+e)}}if(a.renderToStaticMarkup)return h;b=w.createMarkupForID(this._rootNodeID);return h+" "+b},_createContentMarkup:function(a,c,h){var b="",d=c.dangerouslySetInnerHTML;null!=d?null!=d.__html&&(b=d.__html):(d=V[typeof c.children]?c.children:null,c=null!=d?null:c.children,
null!=d?b=R(d):null!=c&&(b=this.mountChildren(c,a,h).join("")));return A[this._tag]&&"\n"===b.charAt(0)?"\n"+b:b},_createInitialChildren:function(a,c,h,b){var d=c.dangerouslySetInnerHTML;if(null!=d)null!=d.__html&&Q(b,d.__html);else if(d=V[typeof c.children]?c.children:null,c=null!=d?null:c.children,null!=d)U(b,d);else if(null!=c){a=this.mountChildren(c,a,h);for(h=0;h<a.length;h++)b.appendChild(a[h])}},receiveComponent:function(a,c,h){var b=this._currentElement;this._currentElement=a;this.updateComponent(c,
b,a,h)},updateComponent:function(a,c,h,b){c=c.props;h=this._currentElement.props;switch(this._tag){case "button":c=D.getNativeProps(this,c);h=D.getNativeProps(this,h);break;case "input":E.updateWrapper(this);c=E.getNativeProps(this,c);h=E.getNativeProps(this,h);break;case "option":c=F.getNativeProps(this,c);h=F.getNativeProps(this,h);break;case "select":c=I.getNativeProps(this,c);h=I.getNativeProps(this,h);break;case "textarea":L.updateWrapper(this),c=L.getNativeProps(this,c),h=L.getNativeProps(this,
h)}l(this,h);this._updateDOMProperties(c,h,a,null);this._updateDOMChildren(c,h,a,b);!P&&this._nodeWithLegacyProperties&&(this._nodeWithLegacyProperties.props=h);"select"===this._tag&&a.getReactMountReady().enqueue(r,this)},_updateDOMProperties:function(a,c,h,b){var d,e,k;for(d in a)if(!c.hasOwnProperty(d)&&a.hasOwnProperty(d))if(d===la){var f=this._previousStyleCopy;for(e in f)f.hasOwnProperty(e)&&(k=k||{},k[e]="");this._previousStyleCopy=null}else $.hasOwnProperty(d)?a[d]&&T(this._rootNodeID,d):
(v.properties[d]||v.isCustomAttribute(d))&&(b||(b=C.getNode(this._rootNodeID)),w.deleteValueForProperty(b,d));for(d in c){var f=c[d],l=d===la?this._previousStyleCopy:a[d];if(c.hasOwnProperty(d)&&f!==l)if(d===la)if(f?f=this._previousStyleCopy=N({},f):this._previousStyleCopy=null,l){for(e in l)!l.hasOwnProperty(e)||f&&f.hasOwnProperty(e)||(k=k||{},k[e]="");for(e in f)f.hasOwnProperty(e)&&l[e]!==f[e]&&(k=k||{},k[e]=f[e])}else k=f;else $.hasOwnProperty(d)?f?m(this._rootNodeID,d,f,h):l&&T(this._rootNodeID,
d):0<=this._tag.indexOf("-")||null!=c.is?(b||(b=C.getNode(this._rootNodeID)),d===ka&&(f=null),w.setValueForAttribute(b,d,f)):(v.properties[d]||v.isCustomAttribute(d))&&(b||(b=C.getNode(this._rootNodeID)),null!=f?w.setValueForProperty(b,d,f):w.deleteValueForProperty(b,d))}k&&(b||(b=C.getNode(this._rootNodeID)),u.setValueForStyles(b,k))},_updateDOMChildren:function(a,c,h,b){var d=V[typeof a.children]?a.children:null,e=V[typeof c.children]?c.children:null,k=a.dangerouslySetInnerHTML&&a.dangerouslySetInnerHTML.__html,
f=c.dangerouslySetInnerHTML&&c.dangerouslySetInnerHTML.__html;c=null!=e?null:c.children;var l=null!=d||null!=k,m=null!=e||null!=f;null!=(null!=d?null:a.children)&&null==c?this.updateChildren(null,h,b):l&&!m&&this.updateTextContent("");null!=e?d!==e&&this.updateTextContent(""+e):null!=f?k!==f&&this.updateMarkup(""+f):null!=c&&this.updateChildren(c,h,b)},unmountComponent:function(){switch(this._tag){case "iframe":case "img":case "form":case "video":case "audio":var a=this._wrapperState.listeners;if(a)for(var c=
0;c<a.length;c++)a[c].remove();break;case "input":E.unmountWrapper(this);break;case "html":case "head":case "body":S(!1)}if(this.unmountChildren(),y.deleteAllListeners(this._rootNodeID),B.unmountIDFromEnvironment(this._rootNodeID),this._rootNodeID=null,this._wrapperState=null,this._nodeWithLegacyProperties)this._nodeWithLegacyProperties=this._nodeWithLegacyProperties._reactInternalComponent=null},getPublicInstance:function(){if(!this._nodeWithLegacyProperties){var d=C.getNode(this._rootNodeID);d._reactInternalComponent=
this;d.getDOMNode=b;d.isMounted=a;d.setState=c;d.replaceState=c;d.forceUpdate=c;d.setProps=h;d.replaceProps=k;d.props=this._currentElement.props;this._nodeWithLegacyProperties=d}return this._nodeWithLegacyProperties}};M.measureMethods(s,"ReactDOMComponent",{mountComponent:"mountComponent",updateComponent:"updateComponent"});N(s.prototype,s.Mixin,d.Mixin);e.exports=s},{10:10,102:102,105:105,11:11,117:117,122:122,123:123,126:126,142:142,146:146,149:149,15:15,151:151,2:2,23:23,26:26,31:31,36:36,41:41,
42:42,43:43,47:47,5:5,63:63,64:64,69:69,80:80}],38:[function(f,e,d){var b=f(50);f=(f(51),f(147))({a:"a",abbr:"abbr",address:"address",area:"area",article:"article",aside:"aside",audio:"audio",b:"b",base:"base",bdi:"bdi",bdo:"bdo",big:"big",blockquote:"blockquote",body:"body",br:"br",button:"button",canvas:"canvas",caption:"caption",cite:"cite",code:"code",col:"col",colgroup:"colgroup",data:"data",datalist:"datalist",dd:"dd",del:"del",details:"details",dfn:"dfn",dialog:"dialog",div:"div",dl:"dl",dt:"dt",
em:"em",embed:"embed",fieldset:"fieldset",figcaption:"figcaption",figure:"figure",footer:"footer",form:"form",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",head:"head",header:"header",hgroup:"hgroup",hr:"hr",html:"html",i:"i",iframe:"iframe",img:"img",input:"input",ins:"ins",kbd:"kbd",keygen:"keygen",label:"label",legend:"legend",li:"li",link:"link",main:"main",map:"map",mark:"mark",menu:"menu",menuitem:"menuitem",meta:"meta",meter:"meter",nav:"nav",noscript:"noscript",object:"object",ol:"ol",optgroup:"optgroup",
option:"option",output:"output",p:"p",param:"param",picture:"picture",pre:"pre",progress:"progress",q:"q",rp:"rp",rt:"rt",ruby:"ruby",s:"s",samp:"samp",script:"script",section:"section",select:"select",small:"small",source:"source",span:"span",strong:"strong",style:"style",sub:"sub",summary:"summary",sup:"sup",table:"table",tbody:"tbody",td:"td",textarea:"textarea",tfoot:"tfoot",th:"th",thead:"thead",time:"time",title:"title",tr:"tr",track:"track",u:"u",ul:"ul","var":"var",video:"video",wbr:"wbr",
circle:"circle",clipPath:"clipPath",defs:"defs",ellipse:"ellipse",g:"g",image:"image",line:"line",linearGradient:"linearGradient",mask:"mask",path:"path",pattern:"pattern",polygon:"polygon",polyline:"polyline",radialGradient:"radialGradient",rect:"rect",stop:"stop",svg:"svg",text:"text",tspan:"tspan"},function(a){return b.createFactory(a)});e.exports=f},{147:147,50:50,51:51}],39:[function(f,e,d){e.exports={useCreateElement:!1}},{}],40:[function(f,e,d){var b=f(9),a=f(11),c=f(63);d=f(69);var h=f(142),
k={dangerouslySetInnerHTML:"`dangerouslySetInnerHTML` must be set using `updateInnerHTMLByID()`.",style:"`style` must be set using `updateStylesByID()`."};f={updatePropertyByID:function(b,d,e){b=c.getNode(b);k.hasOwnProperty(d)?h(!1):void 0;null!=e?a.setValueForProperty(b,d,e):a.deleteValueForProperty(b,d)},dangerouslyReplaceNodeWithMarkupByID:function(a,h){var d=c.getNode(a);b.dangerouslyReplaceNodeWithMarkup(d,h)},dangerouslyProcessChildrenUpdates:function(a,h){for(var d=0;d<a.length;d++)a[d].parentNode=
c.getNode(a[d].parentID);b.processUpdates(a,h)}};d.measureMethods(f,"ReactDOMIDOperations",{dangerouslyReplaceNodeWithMarkupByID:"dangerouslyReplaceNodeWithMarkupByID",dangerouslyProcessChildrenUpdates:"dangerouslyProcessChildrenUpdates"});e.exports=f},{11:11,142:142,63:63,69:69,9:9}],41:[function(f,e,d){function b(){this._rootNodeID&&q.updateWrapper(this)}function a(a){var c=this._currentElement.props;a=h.executeOnChange(c,a);l.asap(b,this);var d=c.name;if("radio"===c.type&&null!=d){for(var e=c=
k.getNode(this._rootNodeID);e.parentNode;)e=e.parentNode;d=e.querySelectorAll("input[name\x3d"+JSON.stringify(""+d)+'][type\x3d"radio"]');for(e=0;e<d.length;e++){var f=d[e];f!==c&&f.form===c.form&&((f=k.getID(f))?void 0:p(!1),(f=n[f])?void 0:p(!1),l.asap(b,f))}}return a}var c=f(40),h=f(22),k=f(63),l=f(81),m=f(23),p=f(142),n={},q={getNativeProps:function(a,c,b){b=h.getValue(c);var d=h.getChecked(c);return m({},c,{defaultChecked:void 0,defaultValue:void 0,value:null!=b?b:a._wrapperState.initialValue,
checked:null!=d?d:a._wrapperState.initialChecked,onChange:a._wrapperState.onChange})},mountWrapper:function(c,h){var b=h.defaultValue;c._wrapperState={initialChecked:h.defaultChecked||!1,initialValue:null!=b?b:null,onChange:a.bind(c)}},mountReadyWrapper:function(a){n[a._rootNodeID]=a},unmountWrapper:function(a){delete n[a._rootNodeID]},updateWrapper:function(a){var b=a._currentElement.props,d=b.checked;null!=d&&c.updatePropertyByID(a._rootNodeID,"checked",d||!1);b=h.getValue(b);null!=b&&c.updatePropertyByID(a._rootNodeID,
"value",""+b)}};e.exports=q},{142:142,22:22,23:23,40:40,63:63,81:81}],42:[function(f,e,d){var b=f(28);d=f(43);var a=f(23),c=(f(151),d.valueContextKey);e.exports={mountWrapper:function(a,b,d){d=d[c];var e=null;if(null!=d)if(e=!1,Array.isArray(d))for(var f=0;f<d.length;f++){if(""+d[f]==""+b.value){e=!0;break}}else e=""+d==""+b.value;a._wrapperState={selected:e}},getNativeProps:function(c,d,e){e=a({selected:void 0,children:void 0},d);null!=c._wrapperState.selected&&(e.selected=c._wrapperState.selected);
var f="";return b.forEach(d.children,function(a){null!=a&&("string"==typeof a||"number"==typeof a)&&(f+=a)}),f&&(e.children=f),e}}},{151:151,23:23,28:28,43:43}],43:[function(f,e,d){function b(){if(this._rootNodeID&&this._wrapperState.pendingUpdate){this._wrapperState.pendingUpdate=!1;var c=this._currentElement.props,b=h.getValue(c);null!=b&&a(this,Boolean(c.multiple),b)}}function a(a,c,h){var b;a=k.getNode(a._rootNodeID).options;if(c){c={};for(b=0;b<h.length;b++)c[""+h[b]]=!0;for(b=0;b<a.length;b++)h=
c.hasOwnProperty(a[b].value),a[b].selected!==h&&(a[b].selected=h)}else{c=""+h;for(b=0;b<a.length;b++)if(a[b].value===c)return void(a[b].selected=!0);a.length&&(a[0].selected=!0)}}function c(a){a=h.executeOnChange(this._currentElement.props,a);return this._wrapperState.pendingUpdate=!0,l.asap(b,this),a}var h=f(22),k=f(63),l=f(81),m=f(23),p=(f(151),"__ReactDOMSelect_value$"+Math.random().toString(36).slice(2));e.exports={valueContextKey:p,getNativeProps:function(a,c,h){return m({},c,{onChange:a._wrapperState.onChange,
value:void 0})},mountWrapper:function(a,b){var d=h.getValue(b);a._wrapperState={pendingUpdate:!1,initialValue:null!=d?d:b.defaultValue,onChange:c.bind(a),wasMultiple:Boolean(b.multiple)}},processChildContext:function(a,c,h){c=m({},h);return c[p]=a._wrapperState.initialValue,c},postUpdateWrapper:function(c){var b=c._currentElement.props;c._wrapperState.initialValue=void 0;var d=c._wrapperState.wasMultiple;c._wrapperState.wasMultiple=Boolean(b.multiple);var e=h.getValue(b);null!=e?(c._wrapperState.pendingUpdate=
!1,a(c,Boolean(b.multiple),e)):d!==Boolean(b.multiple)&&(null!=b.defaultValue?a(c,Boolean(b.multiple),b.defaultValue):a(c,Boolean(b.multiple),b.multiple?[]:""))}}},{151:151,22:22,23:23,63:63,81:81}],44:[function(f,e,d){function b(a){var c=document.selection.createRange(),h=c.text.length,b=c.duplicate();b.moveToElementText(a);b.setEndPoint("EndToStart",c);a=b.text.length;return{start:a,end:a+h}}function a(a){var c=window.getSelection&&window.getSelection();if(!c||0===c.rangeCount)return null;var h=
c.anchorNode,b=c.anchorOffset,d=c.focusNode,e=c.focusOffset,k=c.getRangeAt(0);try{k.startContainer.nodeType,k.endContainer.nodeType}catch(f){return null}var c=c.anchorNode===c.focusNode&&c.anchorOffset===c.focusOffset?0:k.toString().length,l=k.cloneRange();l.selectNodeContents(a);l.setEnd(k.startContainer,k.startOffset);a=l.startContainer===l.endContainer&&l.startOffset===l.endOffset?0:l.toString().length;k=a+c;c=document.createRange();c.setStart(h,b);c.setEnd(d,e);h=c.collapsed;return{start:h?k:
a,end:h?a:k}}function c(a,c){var h,b,d=document.selection.createRange().duplicate();"undefined"==typeof c.end?(h=c.start,b=h):c.start>c.end?(h=c.end,b=c.start):(h=c.start,b=c.end);d.moveToElementText(a);d.moveStart("character",h);d.setEndPoint("EndToStart",d);d.moveEnd("character",b-h);d.select()}function h(a,c){if(window.getSelection){var h=window.getSelection(),b=a[l()].length,d=Math.min(c.start,b),b="undefined"==typeof c.end?d:Math.min(c.end,b);if(!h.extend&&d>b)var e=b,b=d,d=e;var e=k(a,d),f=
k(a,b);if(e&&f){var u=document.createRange();u.setStart(e.node,e.offset);h.removeAllRanges();d>b?(h.addRange(u),h.extend(f.node,f.offset)):(u.setEnd(f.node,f.offset),h.addRange(u))}}}d=f(128);var k=f(114),l=f(115);f=d.canUseDOM&&"selection"in document&&!("getSelection"in window);e.exports={getOffsets:f?b:a,setOffsets:f?c:h}},{114:114,115:115,128:128}],45:[function(f,e,d){d=f(49);var b=f(78);f=f(82);d.inject();e.exports={renderToString:b.renderToString,renderToStaticMarkup:b.renderToStaticMarkup,version:f}},
{49:49,78:78,82:82}],46:[function(f,e,d){var b=f(9),a=f(11),c=f(31),h=f(63);d=f(23);var k=f(105),l=f(123);f=(f(126),function(a){});d(f.prototype,{construct:function(a){this._currentElement=a;this._stringText=""+a;this._rootNodeID=null;this._mountIndex=0},mountComponent:function(c,b,d){if(this._rootNodeID=c,b.useCreateElement)return b=d[h.ownerDocumentContextKey].createElement("span"),a.setAttributeForID(b,c),h.getID(b),l(b,this._stringText),b;d=k(this._stringText);return b.renderToStaticMarkup?d:
"\x3cspan "+a.createMarkupForID(c)+"\x3e"+d+"\x3c/span\x3e"},receiveComponent:function(a,c){if(a!==this._currentElement){this._currentElement=a;var d=""+a;if(d!==this._stringText){this._stringText=d;var e=h.getNode(this._rootNodeID);b.updateTextContent(e,d)}}},unmountComponent:function(){c.unmountIDFromEnvironment(this._rootNodeID)}});e.exports=f},{105:105,11:11,123:123,126:126,23:23,31:31,63:63,9:9}],47:[function(f,e,d){function b(){this._rootNodeID&&p.updateWrapper(this)}function a(a){a=c.executeOnChange(this._currentElement.props,
a);return k.asap(b,this),a}var c=f(22),h=f(40),k=f(81),l=f(23),m=f(142),p=(f(151),{getNativeProps:function(a,c,h){null!=c.dangerouslySetInnerHTML?m(!1):void 0;return l({},c,{defaultValue:void 0,value:void 0,children:a._wrapperState.initialValue,onChange:a._wrapperState.onChange})},mountWrapper:function(h,b){var d=b.defaultValue,e=b.children;null!=e&&(null!=d?m(!1):void 0,Array.isArray(e)&&(1>=e.length?void 0:m(!1),e=e[0]),d=""+e);null==d&&(d="");e=c.getValue(b);h._wrapperState={initialValue:""+(null!=
e?e:d),onChange:a.bind(h)}},updateWrapper:function(a){var b=c.getValue(a._currentElement.props);null!=b&&h.updatePropertyByID(a._rootNodeID,"value",""+b)}});e.exports=p},{142:142,151:151,22:22,23:23,40:40,81:81}],48:[function(f,e,d){function b(){this.reinitializeTransaction()}d=f(81);var a=f(98),c=f(23);f=f(134);var h={initialize:f,close:function(){m.isBatchingUpdates=!1}},k=[{initialize:f,close:d.flushBatchedUpdates.bind(d)},h];c(b.prototype,a.Mixin,{getTransactionWrappers:function(){return k}});
var l=new b,m={isBatchingUpdates:!1,batchedUpdates:function(a,c,h,b,d,e){var k=m.isBatchingUpdates;m.isBatchingUpdates=!0;k?a(c,h,b,d,e):l.perform(a,null,c,h,b,d,e)}};e.exports=m},{134:134,23:23,81:81,98:98}],49:[function(f,e,d){var b=f(3),a=f(7),c=f(8),h=f(13),k=f(14),l=f(128),m=f(21),p=f(25),n=f(31),q=f(48),r=f(37),s=f(46),t=f(56),u=f(57),v=f(59),w=f(63),x=f(73),y=f(84),B=f(85),D=f(86),E=f(83),F=!1;e.exports={inject:function(){F||(F=!0,u.EventEmitter.injectReactEventListener(t),u.EventPluginHub.injectEventPluginOrder(h),
u.EventPluginHub.injectInstanceHandle(v),u.EventPluginHub.injectMount(w),u.EventPluginHub.injectEventPluginsByName({SimpleEventPlugin:D,EnterLeaveEventPlugin:k,ChangeEventPlugin:a,SelectEventPlugin:y,BeforeInputEventPlugin:b}),u.NativeComponent.injectGenericComponentClass(r),u.NativeComponent.injectTextComponentClass(s),u.Class.injectMixin(p),u.DOMProperty.injectDOMPropertyConfig(m),u.DOMProperty.injectDOMPropertyConfig(E),u.EmptyComponent.injectEmptyComponent("noscript"),u.Updates.injectReconcileTransaction(x),
u.Updates.injectBatchingStrategy(q),u.RootIndex.injectCreateReactRootIndex(l.canUseDOM?c.createReactRootIndex:B.createReactRootIndex),u.Component.injectEnvironment(n))}}},{128:128,13:13,14:14,21:21,25:25,3:3,31:31,37:37,46:46,48:48,56:56,57:57,59:59,63:63,7:7,73:73,8:8,83:83,84:84,85:85,86:86}],50:[function(f,e,d){var b=f(34),a=f(23),c=(f(102),"function"==typeof Symbol&&Symbol["for"]&&Symbol["for"]("react.element")||60103),h={key:!0,ref:!0,__self:!0,__source:!0},k=function(a,h,b,d,e,k,f){return{$$typeof:c,
type:a,key:h,ref:b,props:f,_owner:k}};k.createElement=function(a,c,d){var e,f={},r=null,s=null,t=null,u=null;if(null!=c)for(e in s=void 0===c.ref?null:c.ref,r=void 0===c.key?null:""+c.key,t=void 0===c.__self?null:c.__self,u=void 0===c.__source?null:c.__source,c)c.hasOwnProperty(e)&&!h.hasOwnProperty(e)&&(f[e]=c[e]);var v=arguments.length-2;if(1===v)f.children=d;else if(1<v){for(var w=Array(v),x=0;v>x;x++)w[x]=arguments[x+2];f.children=w}if(a&&a.defaultProps)for(e in v=a.defaultProps,v)"undefined"==
typeof f[e]&&(f[e]=v[e]);return k(a,r,s,t,u,b.current,f)};k.createFactory=function(a){var c=k.createElement.bind(null,a);return c.type=a,c};k.cloneAndReplaceKey=function(a,c){return k(a.type,c,a.ref,a._self,a._source,a._owner,a.props)};k.cloneAndReplaceProps=function(a,c){return k(a.type,a.key,a.ref,a._self,a._source,a._owner,c)};k.cloneElement=function(c,d,e){var f,q=a({},c.props),r=c.key,s=c.ref,t=c._self,u=c._source,v=c._owner;if(null!=d)for(f in void 0!==d.ref&&(s=d.ref,v=b.current),void 0!==
d.key&&(r=""+d.key),d)d.hasOwnProperty(f)&&!h.hasOwnProperty(f)&&(q[f]=d[f]);f=arguments.length-2;if(1===f)q.children=e;else if(1<f){for(var w=Array(f),x=0;f>x;x++)w[x]=arguments[x+2];q.children=w}return k(c.type,r,s,t,u,v,q)};k.isValidElement=function(a){return"object"==typeof a&&null!==a&&a.$$typeof===c};e.exports=k},{102:102,23:23,34:34}],51:[function(f,e,d){function b(){if(m.current){var a=m.current.getName();if(a)return" Check the render method of `"+a+"`."}return""}function a(a,c){if(a._store&&
!a._store.validated&&null==a.key){a._store.validated=!0;var h=b();if(!h){var d="string"==typeof c?c:c.displayName||c.name;d&&(h=" Check the top-level render call using \x3c"+d+"\x3e.")}d=q.uniqueKey||(q.uniqueKey={});d[h]||(d[h]=!0,a&&a._owner&&a._owner!==m.current&&a._owner.getName())}}function c(c,h){if("object"==typeof c)if(Array.isArray(c))for(var b=0;b<c.length;b++){var d=c[b];k.isValidElement(d)&&a(d,h)}else if(k.isValidElement(c))c._store&&(c._store.validated=!0);else if(c&&(b=p(c))&&b!==c.entries)for(d=
b.call(c);!(b=d.next()).done;)k.isValidElement(b.value)&&a(b.value,h)}function h(a){var c=a.type;if("function"==typeof c){var h=c.displayName||c.name;if(c.propTypes){var d=c.propTypes;a=a.props;var e=l.prop,k;for(k in d)if(d.hasOwnProperty(k)){var f;try{"function"!=typeof d[k]?n(!1):void 0,f=d[k](a,k,h,e)}catch(m){f=m}f instanceof Error&&!(f.message in r)&&(r[f.message]=!0,b())}}"function"==typeof c.getDefaultProps}}var k=f(50),l=f(71),m=(f(70),f(34)),p=(f(102),f(113)),n=f(142),q=(f(151),{}),r={},
s={createElement:function(a,b,d){var e="string"==typeof a||"function"==typeof a,f=k.createElement.apply(this,arguments);if(null==f)return f;if(e)for(e=2;e<arguments.length;e++)c(arguments[e],a);return h(f),f},createFactory:function(a){var c=s.createElement.bind(null,a);return c.type=a,c},cloneElement:function(a,b,d){for(var e=k.cloneElement.apply(this,arguments),f=2;f<arguments.length;f++)c(arguments[f],e.type);return h(e),e}};e.exports=s},{102:102,113:113,142:142,151:151,34:34,50:50,70:70,71:71}],
52:[function(f,e,d){var b,a=f(50),c=f(53),h=f(74);d=function(a){this._rootNodeID=this._currentElement=null;this._renderedComponent=a(b)};f(23)(d.prototype,{construct:function(a){},mountComponent:function(a,b,d){return c.registerNullComponentID(a),this._rootNodeID=a,h.mountComponent(this._renderedComponent,a,b,d)},receiveComponent:function(){},unmountComponent:function(a,b,d){h.unmountComponent(this._renderedComponent);c.deregisterNullComponentID(this._rootNodeID);this._renderedComponent=this._rootNodeID=
null}});d.injection={injectEmptyComponent:function(c){b=a.createElement(c)}};e.exports=d},{23:23,50:50,53:53,74:74}],53:[function(f,e,d){var b={};e.exports={isNullComponentID:function(a){return!!b[a]},registerNullComponentID:function(a){b[a]=!0},deregisterNullComponentID:function(a){delete b[a]}}},{}],54:[function(f,e,d){function b(c,h,b,d){try{return h(b,d)}catch(e){return void(null===a&&(a=e))}}var a=null;e.exports={invokeGuardedCallback:b,invokeGuardedCallbackWithCatch:b,rethrowCaughtError:function(){if(a){var c=
a;throw a=null,c;}}}},{}],55:[function(f,e,d){var b=f(16);e.exports={handleTopLevel:function(a,c,h,d,e){a=b.extractEvents(a,c,h,d,e);b.enqueueEvents(a);b.processEventQueue(!1)}}},{16:16}],56:[function(f,e,d){function b(a,c){this.topLevelType=a;this.nativeEvent=c;this.ancestors=[]}function a(a){for(var c=m.getFirstReactDOM(q(a.nativeEvent))||window;c;)a.ancestors.push(c),c=m.getID(c),c=l.getReactRootIDFromNodeID(c),c=m.findReactContainerForID(c),c=m.getFirstReactDOM(c);for(var h=0;h<a.ancestors.length;h++){var c=
a.ancestors[h],b=m.getID(c)||"";s._handleTopLevel(a.topLevelType,c,b,a.nativeEvent,q(a.nativeEvent))}}function c(a){var c=r(window);a(c)}var h=f(127);d=f(128);var k=f(24),l=f(59),m=f(63),p=f(81),n=f(23),q=f(112),r=f(139);n(b.prototype,{destructor:function(){this.nativeEvent=this.topLevelType=null;this.ancestors.length=0}});k.addPoolingTo(b,k.twoArgumentPooler);var s={_enabled:!0,_handleTopLevel:null,WINDOW_HANDLE:d.canUseDOM?window:null,setHandleTopLevel:function(a){s._handleTopLevel=a},setEnabled:function(a){s._enabled=
!!a},isEnabled:function(){return s._enabled},trapBubbledEvent:function(a,c,b){return b?h.listen(b,c,s.dispatchEvent.bind(null,a)):null},trapCapturedEvent:function(a,c,b){return b?h.capture(b,c,s.dispatchEvent.bind(null,a)):null},monitorScrollValue:function(a){a=c.bind(null,a);h.listen(window,"scroll",a)},dispatchEvent:function(c,h){if(s._enabled){var d=b.getPooled(c,h);try{p.batchedUpdates(a,d)}finally{b.release(d)}}}};e.exports=s},{112:112,127:127,128:128,139:139,23:23,24:24,59:59,63:63,81:81}],
57:[function(f,e,d){d=f(10);var b=f(16),a=f(32),c=f(29),h=f(52),k=f(26),l=f(66),m=f(69),p=f(76);f=f(81);e.exports={Component:a.injection,Class:c.injection,DOMProperty:d.injection,EmptyComponent:h.injection,EventPluginHub:b.injection,EventEmitter:k.injection,NativeComponent:l.injection,Perf:m.injection,RootIndex:p.injection,Updates:f.injection}},{10:10,16:16,26:26,29:29,32:32,52:52,66:66,69:69,76:76,81:81}],58:[function(f,e,d){var b=f(44),a=f(131),c=f(136),h=f(137),k={hasSelectionCapabilities:function(a){var c=
a&&a.nodeName&&a.nodeName.toLowerCase();return c&&("input"===c&&"text"===a.type||"textarea"===c||"true"===a.contentEditable)},getSelectionInformation:function(){var a=h();return{focusedElem:a,selectionRange:k.hasSelectionCapabilities(a)?k.getSelection(a):null}},restoreSelection:function(b){var d=h(),e=b.focusedElem;b=b.selectionRange;d!==e&&a(document.documentElement,e)&&(k.hasSelectionCapabilities(e)&&k.setSelection(e,b),c(e))},getSelection:function(a){var c;if("selectionStart"in a)c={start:a.selectionStart,
end:a.selectionEnd};else if(document.selection&&a.nodeName&&"input"===a.nodeName.toLowerCase()){var h=document.selection.createRange();h.parentElement()===a&&(c={start:-h.moveStart("character",-a.value.length),end:-h.moveEnd("character",-a.value.length)})}else c=b.getOffsets(a);return c||{start:0,end:0}},setSelection:function(a,c){var h=c.start,d=c.end;if("undefined"==typeof d&&(d=h),"selectionStart"in a)a.selectionStart=h,a.selectionEnd=Math.min(d,a.value.length);else if(document.selection&&a.nodeName&&
"input"===a.nodeName.toLowerCase()){var e=a.createTextRange();e.collapse(!0);e.moveStart("character",h);e.moveEnd("character",d-h);e.select()}else b.setOffsets(a,c)}};e.exports=k},{131:131,136:136,137:137,44:44}],59:[function(f,e,d){function b(a,c){return a.charAt(c)===q||c===a.length}function a(a){return""===a||a.charAt(0)===q&&a.charAt(a.length-1)!==q}function c(a,c){return 0===c.indexOf(a)&&b(c,a.length)}function h(a){return a?a.substr(0,a.lastIndexOf(q)):""}function k(h,d){if(a(h)&&a(d)?void 0:
n(!1),c(h,d)?void 0:n(!1),h===d)return h;var e;for(e=h.length+r;e<d.length&&!b(d,e);e++);return d.substr(0,e)}function l(c,h){var d=Math.min(c.length,h.length);if(0===d)return"";for(var e=0,k=0;d>=k;k++)if(b(c,k)&&b(h,k))e=k;else if(c.charAt(k)!==h.charAt(k))break;d=c.substr(0,e);return a(d)?void 0:n(!1),d}function m(a,b,d,e,f,l){a=a||"";b=b||"";a===b?n(!1):void 0;var m=c(b,a);m||c(a,b)?void 0:n(!1);for(var p=0,q=m?h:k,r=a;;r=q(r,b)){var I;if(f&&r===a||l&&r===b||(I=d(r,m,e)),!1===I||r===b)break;p++<
s?void 0:n(!1)}}var p=f(76),n=f(142),q=".",r=q.length,s=1E4;e.exports={createReactRootID:function(){var a=p.createReactRootIndex();return q+a.toString(36)},createReactID:function(a,c){return a+c},getReactRootIDFromNodeID:function(a){if(a&&a.charAt(0)===q&&1<a.length){var c=a.indexOf(q,1);return-1<c?a.substr(0,c):a}return null},traverseEnterLeave:function(a,c,h,b,d){var e=l(a,c);e!==a&&m(a,e,h,b,!1,!0);e!==c&&m(e,c,h,d,!0,!1)},traverseTwoPhase:function(a,c,h){a&&(m("",a,c,h,!0,!1),m(a,"",c,h,!1,!0))},
traverseTwoPhaseSkipTarget:function(a,c,h){a&&(m("",a,c,h,!0,!0),m(a,"",c,h,!0,!0))},traverseAncestors:function(a,c,h){m("",a,c,h,!0,!1)},getFirstCommonAncestorID:l,_getNextDescendantID:k,isAncestorIDOf:c,SEPARATOR:q}},{142:142,76:76}],60:[function(f,e,d){e.exports={remove:function(b){b._reactInternalInstance=void 0},get:function(b){return b._reactInternalInstance},has:function(b){return void 0!==b._reactInternalInstance},set:function(b,a){b._reactInternalInstance=a}}},{}],61:[function(f,e,d){d=f(28);
var b=f(30),a=f(29),c=f(38),h=f(50),k=(f(51),f(72)),l=f(82),m=f(23);f=f(119);e.exports={Children:{map:d.map,forEach:d.forEach,count:d.count,toArray:d.toArray,only:f},Component:b,createElement:h.createElement,cloneElement:h.cloneElement,isValidElement:h.isValidElement,PropTypes:k,createClass:a.createClass,createFactory:h.createFactory,createMixin:function(a){return a},DOM:c,version:l,__spread:m}},{119:119,23:23,28:28,29:29,30:30,38:38,50:50,51:51,72:72,82:82}],62:[function(f,e,d){var b=f(101),a=/\/?>/,
c={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(h){var d=b(h);return h.replace(a," "+c.CHECKSUM_ATTR_NAME+'\x3d"'+d+'"$\x26')},canReuseMarkup:function(a,d){var e=d.getAttribute(c.CHECKSUM_ATTR_NAME),e=e&&parseInt(e,10);return b(a)===e}};e.exports=c},{101:101}],63:[function(f,e,d){function b(a){return a?a.nodeType===S?a.documentElement:a.firstChild:null}function a(a){return(a=b(a))&&V.getID(a)}function c(a){return a&&a.getAttribute&&a.getAttribute(P)||""}function h(a,h){if(a){c(a)!==
h?M(!1):void 0;var b=V.findReactContainerForID(h);if(b&&L(b,a))return!0}return!1}function k(a){var c=R[a];return c&&h(c,a)?void(X=c):!1}function l(a,c,h,b,d,e){s.useCreateElement&&(e=F({},e),h.nodeType===S?e[K]=h:e[K]=h.ownerDocument);c=B.mountComponent(a,c,b,e);a._renderedComponent._topLevelWrapper=a;V._mountImageIntoNode(c,h,d,b)}function m(a,c,h,b,d){var e=E.ReactReconcileTransaction.getPooled(b);e.perform(l,null,a,c,h,e,b,d);E.ReactReconcileTransaction.release(e)}function p(a,c){B.unmountComponent(a);
for(c.nodeType===S&&(c=c.documentElement);c.lastChild;)c.removeChild(c.lastChild)}function n(c){return(c=a(c))?c!==v.getReactRootIDFromNodeID(c):!1}function q(a){for(;a&&a.parentNode!==a;a=a.parentNode)if(1===a.nodeType){var h=c(a);if(h){var b=v.getReactRootIDFromNodeID(h),d=a;do if(h=c(d),d=d.parentNode,null==d)return null;while(h!==b);if(d===U[b])return a}}return null}d=f(10);var r=f(26),s=(f(34),f(39)),t=f(50),u=f(53),v=f(59),w=f(60),x=f(62),y=f(69),B=f(74),D=f(80),E=f(81),F=f(23),I=f(135),L=f(131),
C=f(116),M=f(142),G=f(122),N=f(124),P=(f(126),f(151),d.ID_ATTRIBUTE_NAME),R={},S=9,K="__ReactMount_ownerDocument$"+Math.random().toString(36).slice(2),Q={},U={},T=[],X=null,$=function(){};$.prototype.isReactComponent={};$.prototype.render=function(){return this.props};var V={TopLevelWrapper:$,_instancesByReactRootID:Q,scrollMonitor:function(a,c){c()},_updateRootComponent:function(a,c,h,b){return V.scrollMonitor(h,function(){D.enqueueElementInternal(a,c);b&&D.enqueueCallbackInternal(a,b)}),a},_registerComponent:function(a,
c){!c||1!==c.nodeType&&c.nodeType!==S&&11!==c.nodeType?M(!1):void 0;r.ensureScrollValueMonitoring();var h=V.registerContainer(c);return Q[h]=a,h},_renderNewRootComponent:function(a,c,h,b){a=C(a,null);var d=V._registerComponent(a,c);return E.batchedUpdates(m,a,d,c,h,b),a},renderSubtreeIntoContainer:function(a,c,h,b){return null==a||null==a._reactInternalInstance?M(!1):void 0,V._renderSubtreeIntoContainer(a,c,h,b)},_renderSubtreeIntoContainer:function(h,d,e,k){t.isValidElement(d)?void 0:M(!1);var f=
new t($,null,null,null,null,null,d),l=Q[a(e)];if(l){if(N(l._currentElement.props,d)){var m=l._renderedComponent.getPublicInstance();return V._updateRootComponent(l,f,e,k&&function(){k.call(m)}),m}V.unmountComponentAtNode(e)}d=(d=b(e))&&!!c(d);var p=n(e);h=V._renderNewRootComponent(f,e,d&&!l&&!p,null!=h?h._reactInternalInstance._processChildContext(h._reactInternalInstance._context):I)._renderedComponent.getPublicInstance();return k&&k.call(h),h},render:function(a,c,h){return V._renderSubtreeIntoContainer(null,
a,c,h)},registerContainer:function(c){var h=a(c);return h&&(h=v.getReactRootIDFromNodeID(h)),h||(h=v.createReactRootID()),U[h]=c,h},unmountComponentAtNode:function(h){!h||1!==h.nodeType&&h.nodeType!==S&&11!==h.nodeType?M(!1):void 0;var b=a(h),d=Q[b];return!d?(h=(n(h),c(h)),h&&h===v.getReactRootIDFromNodeID(h),!1):(E.batchedUpdates(p,d,h),delete Q[b],delete U[b],!0)},findReactContainerForID:function(a){a=v.getReactRootIDFromNodeID(a);return U[a]},findReactNodeByID:function(a){var c=V.findReactContainerForID(a);
return V.findComponentRoot(c,a)},getFirstReactDOM:function(a){return q(a)},findComponentRoot:function(a,c){var h=0;X=null;v.traverseAncestors(c,k);var b=X,b=(X=null,b)||a;T[0]=b.firstChild;for(T.length=1;h<T.length;){for(var d,b=T[h++];b;){var e=V.getID(b);e?c===e?d=b:v.isAncestorIDOf(e,c)&&(T.length=h=0,T.push(b.firstChild)):T.push(b.firstChild);b=b.nextSibling}if(d)return T.length=0,d}T.length=0;M(!1)},_mountImageIntoNode:function(a,c,h,d){if(!c||1!==c.nodeType&&c.nodeType!==S&&11!==c.nodeType?
M(!1):void 0,h){var e=b(c);if(x.canReuseMarkup(a,e))return;var k=e.getAttribute(x.CHECKSUM_ATTR_NAME);e.removeAttribute(x.CHECKSUM_ATTR_NAME);h=e.outerHTML;e.setAttribute(x.CHECKSUM_ATTR_NAME,k);a:{e=Math.min(a.length,h.length);for(k=0;e>k;k++)if(a.charAt(k)!==h.charAt(k)){e=k;break a}e=a.length===h.length?-1:e}" (client) "+a.substring(e-20,e+20)+"\n (server) "+h.substring(e-20,e+20);c.nodeType===S?M(!1):void 0}if(c.nodeType===S?M(!1):void 0,d.useCreateElement){for(;c.lastChild;)c.removeChild(c.lastChild);
c.appendChild(a)}else G(c,a)},ownerDocumentContextKey:K,getReactRootID:a,getID:function(a){var b=c(a);if(b)if(R.hasOwnProperty(b)){var d=R[b];d!==a&&(h(d,b)?M(!1):void 0,R[b]=a)}else R[b]=a;return b},setID:function(a,h){var b=c(a);b!==h&&delete R[b];a.setAttribute(P,h);R[h]=a},getNode:function(a){return R.hasOwnProperty(a)&&h(R[a],a)||(R[a]=V.findReactNodeByID(a)),R[a]},getNodeFromInstance:function(a){a=w.get(a)._rootNodeID;return u.isNullComponentID(a)?null:(R.hasOwnProperty(a)&&h(R[a],a)||(R[a]=
V.findReactNodeByID(a)),R[a])},isValid:h,purgeID:function(a){delete R[a]}};y.measureMethods(V,"ReactMount",{_renderNewRootComponent:"_renderNewRootComponent",_mountImageIntoNode:"_mountImageIntoNode"});e.exports=V},{10:10,116:116,122:122,124:124,126:126,131:131,135:135,142:142,151:151,23:23,26:26,34:34,39:39,50:50,53:53,59:59,60:60,62:62,69:69,74:74,80:80,81:81}],64:[function(f,e,d){function b(){n.length&&(c.processChildrenUpdates(n,q),a())}function a(){n.length=0;q.length=0}var c=f(32),h=f(65),k=
(f(34),f(74)),l=f(27),m=f(107),p=0,n=[],q=[];e.exports={Mixin:{_reconcilerInstantiateChildren:function(a,c,h){return l.instantiateChildren(a,c,h)},_reconcilerUpdateChildren:function(a,c,h,b){var d;return d=m(c),l.updateChildren(a,d,h,b)},mountChildren:function(a,c,h){this._renderedChildren=a=this._reconcilerInstantiateChildren(a,c,h);var b=[],d=0,e;for(e in a)if(a.hasOwnProperty(e)){var f=a[e],l=k.mountComponent(f,this._rootNodeID+e,c,h);f._mountIndex=d++;b.push(l)}return b},updateTextContent:function(c){p++;
var h=!0;try{var d=this._renderedChildren;l.unmountChildren(d);for(var e in d)d.hasOwnProperty(e)&&this._unmountChild(d[e]);this.setTextContent(c);h=!1}finally{p--,p||(h?a():b())}},updateMarkup:function(c){p++;var h=!0;try{var d=this._renderedChildren;l.unmountChildren(d);for(var e in d)d.hasOwnProperty(e)&&this._unmountChildByName(d[e],e);this.setMarkup(c);h=!1}finally{p--,p||(h?a():b())}},updateChildren:function(c,h,d){p++;var e=!0;try{this._updateChildren(c,h,d),e=!1}finally{p--,p||(e?a():b())}},
_updateChildren:function(a,c,h){var b=this._renderedChildren;a=this._reconcilerUpdateChildren(b,a,c,h);if(this._renderedChildren=a,a||b){var d,e=0,k=0;for(d in a)if(a.hasOwnProperty(d)){var f=b&&b[d],l=a[d];f===l?(this.moveChild(f,k,e),e=Math.max(f._mountIndex,e),f._mountIndex=k):(f&&(e=Math.max(f._mountIndex,e),this._unmountChild(f)),this._mountChildByNameAtIndex(l,d,k,c,h));k++}for(d in b)!b.hasOwnProperty(d)||a&&a.hasOwnProperty(d)||this._unmountChild(b[d])}},unmountChildren:function(){l.unmountChildren(this._renderedChildren);
this._renderedChildren=null},moveChild:function(a,c,b){a._mountIndex<b&&n.push({parentID:this._rootNodeID,parentNode:null,type:h.MOVE_EXISTING,markupIndex:null,content:null,fromIndex:a._mountIndex,toIndex:c})},createChild:function(a,c){var b=a._mountIndex;n.push({parentID:this._rootNodeID,parentNode:null,type:h.INSERT_MARKUP,markupIndex:q.push(c)-1,content:null,fromIndex:null,toIndex:b})},removeChild:function(a){n.push({parentID:this._rootNodeID,parentNode:null,type:h.REMOVE_NODE,markupIndex:null,
content:null,fromIndex:a._mountIndex,toIndex:null})},setTextContent:function(a){n.push({parentID:this._rootNodeID,parentNode:null,type:h.TEXT_CONTENT,markupIndex:null,content:a,fromIndex:null,toIndex:null})},setMarkup:function(a){n.push({parentID:this._rootNodeID,parentNode:null,type:h.SET_MARKUP,markupIndex:null,content:a,fromIndex:null,toIndex:null})},_mountChildByNameAtIndex:function(a,c,h,b,d){c=k.mountComponent(a,this._rootNodeID+c,b,d);a._mountIndex=h;this.createChild(a,c)},_unmountChild:function(a){this.removeChild(a);
a._mountIndex=null}}}},{107:107,27:27,32:32,34:34,65:65,74:74}],65:[function(f,e,d){f=f(145)({INSERT_MARKUP:null,MOVE_EXISTING:null,REMOVE_NODE:null,SET_MARKUP:null,TEXT_CONTENT:null});e.exports=f},{145:145}],66:[function(f,e,d){var b=f(23),a=f(142),c=null,h={},k=null;e.exports={getComponentClassForElement:function(a){if("function"==typeof a.type)return a.type;a=a.type;var c=h[a];return null==c&&(h[a]=c=null(a)),c},createInternalComponent:function(h){return c?void 0:a(!1),new c(h.type,h.props)},createInstanceForText:function(a){return new k(a)},
isTextComponent:function(a){return a instanceof k},injection:{injectGenericComponentClass:function(a){c=a},injectTextComponentClass:function(a){k=a},injectComponentClasses:function(a){b(h,a)}}}},{142:142,23:23}],67:[function(f,e,d){f=(f(151),{isMounted:function(b){return!1},enqueueCallback:function(b,a){},enqueueForceUpdate:function(b){},enqueueReplaceState:function(b,a){},enqueueSetState:function(b,a){},enqueueSetProps:function(b,a){},enqueueReplaceProps:function(b,a){}});e.exports=f},{151:151}],
68:[function(f,e,d){var b=f(142),a={isValidOwner:function(a){return!(!a||"function"!=typeof a.attachRef||"function"!=typeof a.detachRef)},addComponentAsRefTo:function(c,h,d){a.isValidOwner(d)?void 0:b(!1);d.attachRef(h,c)},removeComponentAsRefFrom:function(c,h,d){a.isValidOwner(d)?void 0:b(!1);d.getPublicInstance().refs[h]===c.getPublicInstance()&&d.detachRef(h)}};e.exports=a},{142:142}],69:[function(f,e,d){var b={enableMeasure:!1,storedMeasure:function(a,c,h){return h},measureMethods:function(a,
c,h){},measure:function(a,c,h){return h},injection:{injectMeasure:function(a){b.storedMeasure=a}}};e.exports=b},{}],70:[function(f,e,d){e.exports={}},{}],71:[function(f,e,d){f=f(145)({prop:null,context:null,childContext:null});e.exports=f},{145:145}],72:[function(f,e,d){function b(a){function c(h,b,d,e,k,f){return(e=e||p,f=f||d,null==b[d])?(b=l[k],h?Error("Required "+b+" `"+f+"` was not specified in "+("`"+e+"`.")):null):a(b,d,e,k,f)}var h=c.bind(null,!1);return h.isRequired=c.bind(null,!0),h}function a(a){return b(function(c,
b,d,e,k){c=c[b];if(h(c)!==a){e=l[e];a:{b=h(c);if("object"===b){if(c instanceof Date){c="date";break a}if(c instanceof RegExp){c="regexp";break a}}c=b}return Error("Invalid "+e+" `"+k+"` of type "+("`"+c+"` supplied to `"+d+"`, expected ")+("`"+a+"`."))}return null})}function c(a){switch(typeof a){case "number":case "string":case "undefined":return!0;case "boolean":return!a;case "object":if(Array.isArray(a))return a.every(c);if(null===a||k.isValidElement(a))return!0;var h=m(a);if(!h)return!1;var b=
h.call(a);if(h!==a.entries)for(;!(a=b.next()).done;){if(!c(a.value))return!1}else for(;!(a=b.next()).done;)if((a=a.value)&&!c(a[1]))return!1;return!0;default:return!1}}function h(a){var c=typeof a;return Array.isArray(a)?"array":a instanceof RegExp?"object":c}var k=f(50),l=f(70);d=f(134);var m=f(113),p="\x3c\x3canonymous\x3e\x3e";f={array:a("array"),bool:a("boolean"),func:a("function"),number:a("number"),object:a("object"),string:a("string"),any:b(d.thatReturns(null)),arrayOf:function(a){return b(function(c,
b,d,e,k){c=c[b];if(!Array.isArray(c))return e=l[e],c=h(c),Error("Invalid "+e+" `"+k+"` of type "+("`"+c+"` supplied to `"+d+"`, expected an array."));for(b=0;b<c.length;b++){var f=a(c,b,d,e,k+"["+b+"]");if(f instanceof Error)return f}return null})},element:function(){return b(function(a,c,h,b,d){return!k.isValidElement(a[c])?Error("Invalid "+l[b]+" `"+d+"` supplied to "+("`"+h+"`, expected a single ReactElement.")):null})}(),instanceOf:function(a){return b(function(c,h,b,d,e){return!(c[h]instanceof
a)?Error("Invalid "+l[d]+" `"+e+"` of type "+("`"+(c[h].constructor&&c[h].constructor.name?c[h].constructor.name:"\x3c\x3canonymous\x3e\x3e")+"` supplied to `"+b+"`, expected ")+("instance of `"+(a.name||p)+"`.")):null})},node:function(){return b(function(a,h,b,d,e){return!c(a[h])?Error("Invalid "+l[d]+" `"+e+"` supplied to "+("`"+b+"`, expected a ReactNode.")):null})}(),objectOf:function(a){return b(function(c,b,d,e,k){c=c[b];b=h(c);if("object"!==b)return Error("Invalid "+l[e]+" `"+k+"` of type "+
("`"+b+"` supplied to `"+d+"`, expected an object."));for(var f in c)if(c.hasOwnProperty(f)&&(b=a(c,f,d,e,k+"."+f),b instanceof Error))return b;return null})},oneOf:function(a){function c(h,b,d,e,k){h=h[b];for(b=0;b<a.length;b++)if(h===a[b])return null;e=l[e];b=JSON.stringify(a);return Error("Invalid "+e+" `"+k+"` of value `"+h+"` "+("supplied to `"+d+"`, expected one of "+b+"."))}return b(Array.isArray(a)?c:function(){return Error("Invalid argument supplied to oneOf, expected an instance of array.")})},
oneOfType:function(a){function c(h,b,d,e,k){for(var f=0;f<a.length;f++)if(null==(0,a[f])(h,b,d,e,k))return null;return Error("Invalid "+l[e]+" `"+k+"` supplied to "+("`"+d+"`."))}return b(Array.isArray(a)?c:function(){return Error("Invalid argument supplied to oneOfType, expected an instance of array.")})},shape:function(a){return b(function(c,b,d,e,k){c=c[b];b=h(c);if("object"!==b)return Error("Invalid "+l[e]+" `"+k+"` of type `"+b+"` "+("supplied to `"+d+"`, expected `object`."));for(var f in a)if(b=
a[f])if(b=b(c,f,d,e,k+"."+f))return b;return null})}};e.exports=f},{113:113,134:134,50:50,70:70}],73:[function(f,e,d){function b(c){this.reinitializeTransaction();this.renderToStaticMarkup=!1;this.reactMountReady=a.getPooled(null);this.useCreateElement=!c&&h.useCreateElement}var a=f(6);d=f(24);var c=f(26),h=f(39),k=f(58),l=f(98);f=f(23);var m=[{initialize:k.getSelectionInformation,close:k.restoreSelection},{initialize:function(){var a=c.isEnabled();return c.setEnabled(!1),a},close:function(a){c.setEnabled(a)}},
{initialize:function(){this.reactMountReady.reset()},close:function(){this.reactMountReady.notifyAll()}}];f(b.prototype,l.Mixin,{getTransactionWrappers:function(){return m},getReactMountReady:function(){return this.reactMountReady},destructor:function(){a.release(this.reactMountReady);this.reactMountReady=null}});d.addPoolingTo(b);e.exports=b},{23:23,24:24,26:26,39:39,58:58,6:6,98:98}],74:[function(f,e,d){function b(){a.attachRefs(this,this._currentElement)}var a=f(75);e.exports={mountComponent:function(a,
h,d,e){h=a.mountComponent(h,d,e);return a._currentElement&&null!=a._currentElement.ref&&d.getReactMountReady().enqueue(b,a),h},unmountComponent:function(c){a.detachRefs(c,c._currentElement);c.unmountComponent()},receiveComponent:function(c,h,d,e){var f=c._currentElement;if(h!==f||e!==c._context){var p=a.shouldUpdateRefs(f,h);p&&a.detachRefs(c,f);c.receiveComponent(h,d,e);p&&c._currentElement&&null!=c._currentElement.ref&&d.getReactMountReady().enqueue(b,c)}},performUpdateIfNecessary:function(a,h){a.performUpdateIfNecessary(h)}}},
{75:75}],75:[function(f,e,d){var b=f(68);e.exports={attachRefs:function(a,c){if(null!==c&&!1!==c){var h=c.ref;if(null!=h){var d=c._owner;"function"==typeof h?h(a.getPublicInstance()):b.addComponentAsRefTo(a,h,d)}}},shouldUpdateRefs:function(a,c){return null===a||!1===a||null===c||!1===c||c._owner!==a._owner||c.ref!==a.ref},detachRefs:function(a,c){if(null!==c&&!1!==c){var h=c.ref;if(null!=h){var d=c._owner;"function"==typeof h?h(null):b.removeComponentAsRefFrom(a,h,d)}}}}},{68:68}],76:[function(f,
e,d){var b={createReactRootIndex:null,injection:{injectCreateReactRootIndex:function(a){b.createReactRootIndex=a}}};e.exports=b},{}],77:[function(f,e,d){e.exports={isBatchingUpdates:!1,batchedUpdates:function(b){}}},{}],78:[function(f,e,d){var b=f(48),a=f(50),c=f(59),h=f(62),k=f(77),l=f(79),m=f(81),p=f(135),n=f(116),q=f(142);e.exports={renderToString:function(d){a.isValidElement(d)?void 0:q(!1);var e;try{m.injection.injectBatchingStrategy(k);var f=c.createReactRootID();return e=l.getPooled(!1),e.perform(function(){var a=
n(d,null).mountComponent(f,e,p);return h.addChecksumToMarkup(a)},null)}finally{l.release(e),m.injection.injectBatchingStrategy(b)}},renderToStaticMarkup:function(h){a.isValidElement(h)?void 0:q(!1);var d;try{m.injection.injectBatchingStrategy(k);var e=c.createReactRootID();return d=l.getPooled(!0),d.perform(function(){return n(h,null).mountComponent(e,d,p)},null)}finally{l.release(d),m.injection.injectBatchingStrategy(b)}}}},{116:116,135:135,142:142,48:48,50:50,59:59,62:62,77:77,79:79,81:81}],79:[function(f,
e,d){function b(c){this.reinitializeTransaction();this.renderToStaticMarkup=c;this.reactMountReady=a.getPooled(null);this.useCreateElement=!1}d=f(24);var a=f(6),c=f(98),h=f(23),k=[{initialize:function(){this.reactMountReady.reset()},close:f(134)}];h(b.prototype,c.Mixin,{getTransactionWrappers:function(){return k},getReactMountReady:function(){return this.reactMountReady},destructor:function(){a.release(this.reactMountReady);this.reactMountReady=null}});d.addPoolingTo(b);e.exports=b},{134:134,23:23,
24:24,6:6,98:98}],80:[function(f,e,d){function b(a,h){var b=c.get(a);return b?b:null}var a=(f(34),f(50)),c=f(60),h=f(81),k=f(23),l=f(142),m=(f(151),{isMounted:function(a){return(a=c.get(a))?!!a._renderedComponent:!1},enqueueCallback:function(a,c){"function"!=typeof c?l(!1):void 0;var d=b(a);d?(d._pendingCallbacks?d._pendingCallbacks.push(c):d._pendingCallbacks=[c],h.enqueueUpdate(d),d=void 0):d=null;return d},enqueueCallbackInternal:function(a,c){"function"!=typeof c?l(!1):void 0;a._pendingCallbacks?
a._pendingCallbacks.push(c):a._pendingCallbacks=[c];h.enqueueUpdate(a)},enqueueForceUpdate:function(a){if(a=b(a,"forceUpdate"))a._pendingForceUpdate=!0,h.enqueueUpdate(a)},enqueueReplaceState:function(a,c){var d=b(a,"replaceState");d&&(d._pendingStateQueue=[c],d._pendingReplaceState=!0,h.enqueueUpdate(d))},enqueueSetState:function(a,c){var d=b(a,"setState");d&&((d._pendingStateQueue||(d._pendingStateQueue=[])).push(c),h.enqueueUpdate(d))},enqueueSetProps:function(a,c){var h=b(a,"setProps");h&&m.enqueueSetPropsInternal(h,
c)},enqueueSetPropsInternal:function(c,b){var d=c._topLevelWrapper;d?void 0:l(!1);var e=d._pendingElement||d._currentElement,f=e.props,m=k({},f.props,b);d._pendingElement=a.cloneAndReplaceProps(e,a.cloneAndReplaceProps(f,m));h.enqueueUpdate(d)},enqueueReplaceProps:function(a,c){var h=b(a,"replaceProps");h&&m.enqueueReplacePropsInternal(h,c)},enqueueReplacePropsInternal:function(c,b){var d=c._topLevelWrapper;d?void 0:l(!1);var e=d._pendingElement||d._currentElement;d._pendingElement=a.cloneAndReplaceProps(e,
a.cloneAndReplaceProps(e.props,b));h.enqueueUpdate(d)},enqueueElementInternal:function(a,c){a._pendingElement=c;h.enqueueUpdate(a)}});e.exports=m},{142:142,151:151,23:23,34:34,50:50,60:60,81:81}],81:[function(f,e,d){function b(){y.ReactReconcileTransaction&&v?void 0:r(!1)}function a(){this.reinitializeTransaction();this.dirtyComponentsLength=null;this.callbackQueue=l.getPooled();this.reconcileTransaction=y.ReactReconcileTransaction.getPooled(!1)}function c(a,c){return a._mountOrder-c._mountOrder}
function h(a){var h=a.dirtyComponentsLength;h!==s.length?r(!1):void 0;s.sort(c);for(var b=0;h>b;b++){var d=s[b],e=d._pendingCallbacks;if(d._pendingCallbacks=null,p.performUpdateIfNecessary(d,a.reconcileTransaction),e)for(var k=0;k<e.length;k++)a.callbackQueue.enqueue(e[k],d.getPublicInstance())}}function k(a){return b(),v.isBatchingUpdates?void s.push(a):void v.batchedUpdates(k,a)}var l=f(6);d=f(24);var m=f(69),p=f(74),n=f(98),q=f(23),r=f(142),s=[],t=l.getPooled(),u=!1,v=null,w=[{initialize:function(){this.dirtyComponentsLength=
s.length},close:function(){this.dirtyComponentsLength!==s.length?(s.splice(0,this.dirtyComponentsLength),x()):s.length=0}},{initialize:function(){this.callbackQueue.reset()},close:function(){this.callbackQueue.notifyAll()}}];q(a.prototype,n.Mixin,{getTransactionWrappers:function(){return w},destructor:function(){this.dirtyComponentsLength=null;l.release(this.callbackQueue);this.callbackQueue=null;y.ReactReconcileTransaction.release(this.reconcileTransaction);this.reconcileTransaction=null},perform:function(a,
c,h){return n.Mixin.perform.call(this,this.reconcileTransaction.perform,this.reconcileTransaction,a,c,h)}});d.addPoolingTo(a);var x=function(){for(;s.length||u;){if(s.length){var c=a.getPooled();c.perform(h,null,c);a.release(c)}u&&(u=!1,c=t,t=l.getPooled(),c.notifyAll(),l.release(c))}},x=m.measure("ReactUpdates","flushBatchedUpdates",x),y={ReactReconcileTransaction:null,batchedUpdates:function(a,c,h,d,e,k){b();v.batchedUpdates(a,c,h,d,e,k)},enqueueUpdate:k,flushBatchedUpdates:x,injection:{injectReconcileTransaction:function(a){a?
void 0:r(!1);y.ReactReconcileTransaction=a},injectBatchingStrategy:function(a){a?void 0:r(!1);"function"!=typeof a.batchedUpdates?r(!1):void 0;"boolean"!=typeof a.isBatchingUpdates?r(!1):void 0;v=a}},asap:function(a,c){v.isBatchingUpdates?void 0:r(!1);t.enqueue(a,c);u=!0}};e.exports=y},{142:142,23:23,24:24,6:6,69:69,74:74,98:98}],82:[function(f,e,d){e.exports="0.14.7"},{}],83:[function(f,e,d){f=f(10).injection.MUST_USE_ATTRIBUTE;e.exports={Properties:{clipPath:f,cx:f,cy:f,d:f,dx:f,dy:f,fill:f,fillOpacity:f,
fontFamily:f,fontSize:f,fx:f,fy:f,gradientTransform:f,gradientUnits:f,markerEnd:f,markerMid:f,markerStart:f,offset:f,opacity:f,patternContentUnits:f,patternUnits:f,points:f,preserveAspectRatio:f,r:f,rx:f,ry:f,spreadMethod:f,stopColor:f,stopOpacity:f,stroke:f,strokeDasharray:f,strokeLinecap:f,strokeOpacity:f,strokeWidth:f,textAnchor:f,transform:f,version:f,viewBox:f,x1:f,x2:f,x:f,xlinkActuate:f,xlinkArcrole:f,xlinkHref:f,xlinkRole:f,xlinkShow:f,xlinkTitle:f,xlinkType:f,xmlBase:f,xmlLang:f,xmlSpace:f,
y1:f,y2:f,y:f},DOMAttributeNamespaces:{xlinkActuate:"http://www.w3.org/1999/xlink",xlinkArcrole:"http://www.w3.org/1999/xlink",xlinkHref:"http://www.w3.org/1999/xlink",xlinkRole:"http://www.w3.org/1999/xlink",xlinkShow:"http://www.w3.org/1999/xlink",xlinkTitle:"http://www.w3.org/1999/xlink",xlinkType:"http://www.w3.org/1999/xlink",xmlBase:"http://www.w3.org/XML/1998/namespace",xmlLang:"http://www.w3.org/XML/1998/namespace",xmlSpace:"http://www.w3.org/XML/1998/namespace"},DOMAttributeNames:{clipPath:"clip-path",
fillOpacity:"fill-opacity",fontFamily:"font-family",fontSize:"font-size",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",patternContentUnits:"patternContentUnits",patternUnits:"patternUnits",preserveAspectRatio:"preserveAspectRatio",spreadMethod:"spreadMethod",stopColor:"stop-color",stopOpacity:"stop-opacity",strokeDasharray:"stroke-dasharray",strokeLinecap:"stroke-linecap",strokeOpacity:"stroke-opacity",
strokeWidth:"stroke-width",textAnchor:"text-anchor",viewBox:"viewBox",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlLang:"xml:lang",xmlSpace:"xml:space"}}},{10:10}],84:[function(f,e,d){function b(c,b){if(w||null==t||t!==l())return null;var d;d=t;"selectionStart"in d&&h.hasSelectionCapabilities(d)?d={start:d.selectionStart,end:d.selectionEnd}:window.getSelection?
(d=window.getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}):document.selection?(d=document.selection.createRange(),d={parentElement:d.parentElement(),text:d.text,top:d.boundingTop,left:d.boundingLeft}):d=void 0;return!v||!n(v,d)?(v=d,d=k.getPooled(s.select,u,c,b),d.type="select",d.target=t,a.accumulateTwoPhaseDispatches(d),d):null}d=f(15);var a=f(19),c=f(128),h=f(58),k=f(90),l=f(137),m=f(118),p=f(146),n=f(149),q=d.topLevelTypes,
r=c.canUseDOM&&"documentMode"in document&&11>=document.documentMode,s={select:{phasedRegistrationNames:{bubbled:p({onSelect:null}),captured:p({onSelectCapture:null})},dependencies:[q.topBlur,q.topContextMenu,q.topFocus,q.topKeyDown,q.topMouseDown,q.topMouseUp,q.topSelectionChange]}},t=null,u=null,v=null,w=!1,x=!1,y=p({onSelect:null});e.exports={eventTypes:s,extractEvents:function(a,c,h,d,e){if(!x)return null;switch(a){case q.topFocus:(m(c)||"true"===c.contentEditable)&&(t=c,u=h,v=null);break;case q.topBlur:v=
u=t=null;break;case q.topMouseDown:w=!0;break;case q.topContextMenu:case q.topMouseUp:return w=!1,b(d,e);case q.topSelectionChange:if(r)break;case q.topKeyDown:case q.topKeyUp:return b(d,e)}return null},didPutListener:function(a,c,h){c===y&&(x=!0)}}},{118:118,128:128,137:137,146:146,149:149,15:15,19:19,58:58,90:90}],85:[function(f,e,d){var b=Math.pow(2,53);e.exports={createReactRootIndex:function(){return Math.ceil(Math.random()*b)}}},{}],86:[function(f,e,d){d=f(15);var b=f(127),a=f(19),c=f(63),h=
f(87),k=f(90),l=f(91),m=f(93),p=f(94),n=f(89),q=f(95),r=f(96),s=f(97),t=f(134),u=f(109),v=f(142);f=f(146);var w=d.topLevelTypes;d={abort:{phasedRegistrationNames:{bubbled:f({onAbort:!0}),captured:f({onAbortCapture:!0})}},blur:{phasedRegistrationNames:{bubbled:f({onBlur:!0}),captured:f({onBlurCapture:!0})}},canPlay:{phasedRegistrationNames:{bubbled:f({onCanPlay:!0}),captured:f({onCanPlayCapture:!0})}},canPlayThrough:{phasedRegistrationNames:{bubbled:f({onCanPlayThrough:!0}),captured:f({onCanPlayThroughCapture:!0})}},
click:{phasedRegistrationNames:{bubbled:f({onClick:!0}),captured:f({onClickCapture:!0})}},contextMenu:{phasedRegistrationNames:{bubbled:f({onContextMenu:!0}),captured:f({onContextMenuCapture:!0})}},copy:{phasedRegistrationNames:{bubbled:f({onCopy:!0}),captured:f({onCopyCapture:!0})}},cut:{phasedRegistrationNames:{bubbled:f({onCut:!0}),captured:f({onCutCapture:!0})}},doubleClick:{phasedRegistrationNames:{bubbled:f({onDoubleClick:!0}),captured:f({onDoubleClickCapture:!0})}},drag:{phasedRegistrationNames:{bubbled:f({onDrag:!0}),
captured:f({onDragCapture:!0})}},dragEnd:{phasedRegistrationNames:{bubbled:f({onDragEnd:!0}),captured:f({onDragEndCapture:!0})}},dragEnter:{phasedRegistrationNames:{bubbled:f({onDragEnter:!0}),captured:f({onDragEnterCapture:!0})}},dragExit:{phasedRegistrationNames:{bubbled:f({onDragExit:!0}),captured:f({onDragExitCapture:!0})}},dragLeave:{phasedRegistrationNames:{bubbled:f({onDragLeave:!0}),captured:f({onDragLeaveCapture:!0})}},dragOver:{phasedRegistrationNames:{bubbled:f({onDragOver:!0}),captured:f({onDragOverCapture:!0})}},
dragStart:{phasedRegistrationNames:{bubbled:f({onDragStart:!0}),captured:f({onDragStartCapture:!0})}},drop:{phasedRegistrationNames:{bubbled:f({onDrop:!0}),captured:f({onDropCapture:!0})}},durationChange:{phasedRegistrationNames:{bubbled:f({onDurationChange:!0}),captured:f({onDurationChangeCapture:!0})}},emptied:{phasedRegistrationNames:{bubbled:f({onEmptied:!0}),captured:f({onEmptiedCapture:!0})}},encrypted:{phasedRegistrationNames:{bubbled:f({onEncrypted:!0}),captured:f({onEncryptedCapture:!0})}},
ended:{phasedRegistrationNames:{bubbled:f({onEnded:!0}),captured:f({onEndedCapture:!0})}},error:{phasedRegistrationNames:{bubbled:f({onError:!0}),captured:f({onErrorCapture:!0})}},focus:{phasedRegistrationNames:{bubbled:f({onFocus:!0}),captured:f({onFocusCapture:!0})}},input:{phasedRegistrationNames:{bubbled:f({onInput:!0}),captured:f({onInputCapture:!0})}},keyDown:{phasedRegistrationNames:{bubbled:f({onKeyDown:!0}),captured:f({onKeyDownCapture:!0})}},keyPress:{phasedRegistrationNames:{bubbled:f({onKeyPress:!0}),
captured:f({onKeyPressCapture:!0})}},keyUp:{phasedRegistrationNames:{bubbled:f({onKeyUp:!0}),captured:f({onKeyUpCapture:!0})}},load:{phasedRegistrationNames:{bubbled:f({onLoad:!0}),captured:f({onLoadCapture:!0})}},loadedData:{phasedRegistrationNames:{bubbled:f({onLoadedData:!0}),captured:f({onLoadedDataCapture:!0})}},loadedMetadata:{phasedRegistrationNames:{bubbled:f({onLoadedMetadata:!0}),captured:f({onLoadedMetadataCapture:!0})}},loadStart:{phasedRegistrationNames:{bubbled:f({onLoadStart:!0}),captured:f({onLoadStartCapture:!0})}},
mouseDown:{phasedRegistrationNames:{bubbled:f({onMouseDown:!0}),captured:f({onMouseDownCapture:!0})}},mouseMove:{phasedRegistrationNames:{bubbled:f({onMouseMove:!0}),captured:f({onMouseMoveCapture:!0})}},mouseOut:{phasedRegistrationNames:{bubbled:f({onMouseOut:!0}),captured:f({onMouseOutCapture:!0})}},mouseOver:{phasedRegistrationNames:{bubbled:f({onMouseOver:!0}),captured:f({onMouseOverCapture:!0})}},mouseUp:{phasedRegistrationNames:{bubbled:f({onMouseUp:!0}),captured:f({onMouseUpCapture:!0})}},
paste:{phasedRegistrationNames:{bubbled:f({onPaste:!0}),captured:f({onPasteCapture:!0})}},pause:{phasedRegistrationNames:{bubbled:f({onPause:!0}),captured:f({onPauseCapture:!0})}},play:{phasedRegistrationNames:{bubbled:f({onPlay:!0}),captured:f({onPlayCapture:!0})}},playing:{phasedRegistrationNames:{bubbled:f({onPlaying:!0}),captured:f({onPlayingCapture:!0})}},progress:{phasedRegistrationNames:{bubbled:f({onProgress:!0}),captured:f({onProgressCapture:!0})}},rateChange:{phasedRegistrationNames:{bubbled:f({onRateChange:!0}),
captured:f({onRateChangeCapture:!0})}},reset:{phasedRegistrationNames:{bubbled:f({onReset:!0}),captured:f({onResetCapture:!0})}},scroll:{phasedRegistrationNames:{bubbled:f({onScroll:!0}),captured:f({onScrollCapture:!0})}},seeked:{phasedRegistrationNames:{bubbled:f({onSeeked:!0}),captured:f({onSeekedCapture:!0})}},seeking:{phasedRegistrationNames:{bubbled:f({onSeeking:!0}),captured:f({onSeekingCapture:!0})}},stalled:{phasedRegistrationNames:{bubbled:f({onStalled:!0}),captured:f({onStalledCapture:!0})}},
submit:{phasedRegistrationNames:{bubbled:f({onSubmit:!0}),captured:f({onSubmitCapture:!0})}},suspend:{phasedRegistrationNames:{bubbled:f({onSuspend:!0}),captured:f({onSuspendCapture:!0})}},timeUpdate:{phasedRegistrationNames:{bubbled:f({onTimeUpdate:!0}),captured:f({onTimeUpdateCapture:!0})}},touchCancel:{phasedRegistrationNames:{bubbled:f({onTouchCancel:!0}),captured:f({onTouchCancelCapture:!0})}},touchEnd:{phasedRegistrationNames:{bubbled:f({onTouchEnd:!0}),captured:f({onTouchEndCapture:!0})}},
touchMove:{phasedRegistrationNames:{bubbled:f({onTouchMove:!0}),captured:f({onTouchMoveCapture:!0})}},touchStart:{phasedRegistrationNames:{bubbled:f({onTouchStart:!0}),captured:f({onTouchStartCapture:!0})}},volumeChange:{phasedRegistrationNames:{bubbled:f({onVolumeChange:!0}),captured:f({onVolumeChangeCapture:!0})}},waiting:{phasedRegistrationNames:{bubbled:f({onWaiting:!0}),captured:f({onWaitingCapture:!0})}},wheel:{phasedRegistrationNames:{bubbled:f({onWheel:!0}),captured:f({onWheelCapture:!0})}}};
var x={topAbort:d.abort,topBlur:d.blur,topCanPlay:d.canPlay,topCanPlayThrough:d.canPlayThrough,topClick:d.click,topContextMenu:d.contextMenu,topCopy:d.copy,topCut:d.cut,topDoubleClick:d.doubleClick,topDrag:d.drag,topDragEnd:d.dragEnd,topDragEnter:d.dragEnter,topDragExit:d.dragExit,topDragLeave:d.dragLeave,topDragOver:d.dragOver,topDragStart:d.dragStart,topDrop:d.drop,topDurationChange:d.durationChange,topEmptied:d.emptied,topEncrypted:d.encrypted,topEnded:d.ended,topError:d.error,topFocus:d.focus,
topInput:d.input,topKeyDown:d.keyDown,topKeyPress:d.keyPress,topKeyUp:d.keyUp,topLoad:d.load,topLoadedData:d.loadedData,topLoadedMetadata:d.loadedMetadata,topLoadStart:d.loadStart,topMouseDown:d.mouseDown,topMouseMove:d.mouseMove,topMouseOut:d.mouseOut,topMouseOver:d.mouseOver,topMouseUp:d.mouseUp,topPaste:d.paste,topPause:d.pause,topPlay:d.play,topPlaying:d.playing,topProgress:d.progress,topRateChange:d.rateChange,topReset:d.reset,topScroll:d.scroll,topSeeked:d.seeked,topSeeking:d.seeking,topStalled:d.stalled,
topSubmit:d.submit,topSuspend:d.suspend,topTimeUpdate:d.timeUpdate,topTouchCancel:d.touchCancel,topTouchEnd:d.touchEnd,topTouchMove:d.touchMove,topTouchStart:d.touchStart,topVolumeChange:d.volumeChange,topWaiting:d.waiting,topWheel:d.wheel},y;for(y in x)x[y].dependencies=[y];var B=f({onClick:null}),D={};e.exports={eventTypes:d,extractEvents:function(c,b,d,e,f){b=x[c];if(!b)return null;var t;switch(c){case w.topAbort:case w.topCanPlay:case w.topCanPlayThrough:case w.topDurationChange:case w.topEmptied:case w.topEncrypted:case w.topEnded:case w.topError:case w.topInput:case w.topLoad:case w.topLoadedData:case w.topLoadedMetadata:case w.topLoadStart:case w.topPause:case w.topPlay:case w.topPlaying:case w.topProgress:case w.topRateChange:case w.topReset:case w.topSeeked:case w.topSeeking:case w.topStalled:case w.topSubmit:case w.topSuspend:case w.topTimeUpdate:case w.topVolumeChange:case w.topWaiting:t=
k;break;case w.topKeyPress:if(0===u(e))return null;case w.topKeyDown:case w.topKeyUp:t=m;break;case w.topBlur:case w.topFocus:t=l;break;case w.topClick:if(2===e.button)return null;case w.topContextMenu:case w.topDoubleClick:case w.topMouseDown:case w.topMouseMove:case w.topMouseOut:case w.topMouseOver:case w.topMouseUp:t=p;break;case w.topDrag:case w.topDragEnd:case w.topDragEnter:case w.topDragExit:case w.topDragLeave:case w.topDragOver:case w.topDragStart:case w.topDrop:t=n;break;case w.topTouchCancel:case w.topTouchEnd:case w.topTouchMove:case w.topTouchStart:t=
q;break;case w.topScroll:t=r;break;case w.topWheel:t=s;break;case w.topCopy:case w.topCut:case w.topPaste:t=h}t?void 0:v(!1);c=t.getPooled(b,d,e,f);return a.accumulateTwoPhaseDispatches(c),c},didPutListener:function(a,h,d){h===B&&(h=c.getNode(a),D[a]||(D[a]=b.listen(h,"click",t)))},willDeleteListener:function(a,c){c===B&&(D[a].remove(),delete D[a])}}},{109:109,127:127,134:134,142:142,146:146,15:15,19:19,63:63,87:87,89:89,90:90,91:91,93:93,94:94,95:95,96:96,97:97}],87:[function(f,e,d){function b(c,
h,b,d){a.call(this,c,h,b,d)}var a=f(90);a.augmentClass(b,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}});e.exports=b},{90:90}],88:[function(f,e,d){function b(c,h,b,d){a.call(this,c,h,b,d)}var a=f(90);a.augmentClass(b,{data:null});e.exports=b},{90:90}],89:[function(f,e,d){function b(c,h,b,d){a.call(this,c,h,b,d)}var a=f(94);a.augmentClass(b,{dataTransfer:null});e.exports=b},{94:94}],90:[function(f,e,d){function b(a,c,b,d){this.dispatchConfig=a;this.dispatchMarker=
c;this.nativeEvent=b;a=this.constructor.Interface;for(var e in a)a.hasOwnProperty(e)&&((c=a[e])?this[e]=c(b):"target"===e?this.target=d:this[e]=b[e]);(null!=b.defaultPrevented?b.defaultPrevented:!1===b.returnValue)?this.isDefaultPrevented=h.thatReturnsTrue:this.isDefaultPrevented=h.thatReturnsFalse;this.isPropagationStopped=h.thatReturnsFalse}var a=f(24),c=f(23),h=f(134);f=(f(151),{type:null,target:null,currentTarget:h.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||
Date.now()},defaultPrevented:null,isTrusted:null});c(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():a.returnValue=!1,this.isDefaultPrevented=h.thatReturnsTrue)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():a.cancelBubble=!0,this.isPropagationStopped=h.thatReturnsTrue)},persist:function(){this.isPersistent=h.thatReturnsTrue},isPersistent:h.thatReturnsFalse,destructor:function(){var a=
this.constructor.Interface,c;for(c in a)this[c]=null;this.nativeEvent=this.dispatchMarker=this.dispatchConfig=null}});b.Interface=f;b.augmentClass=function(h,b){var d=Object.create(this.prototype);c(d,h.prototype);h.prototype=d;h.prototype.constructor=h;h.Interface=c({},this.Interface,b);h.augmentClass=this.augmentClass;a.addPoolingTo(h,a.fourArgumentPooler)};a.addPoolingTo(b,a.fourArgumentPooler);e.exports=b},{134:134,151:151,23:23,24:24}],91:[function(f,e,d){function b(c,h,b,d){a.call(this,c,h,
b,d)}var a=f(96);a.augmentClass(b,{relatedTarget:null});e.exports=b},{96:96}],92:[function(f,e,d){function b(c,h,b,d){a.call(this,c,h,b,d)}var a=f(90);a.augmentClass(b,{data:null});e.exports=b},{90:90}],93:[function(f,e,d){function b(c,b,d,e){a.call(this,c,b,d,e)}var a=f(96),c=f(109);d=f(110);f=f(111);a.augmentClass(b,{key:d,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:f,charCode:function(a){return"keypress"===a.type?c(a):0},keyCode:function(a){return"keydown"===
a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===a.type?c(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}});e.exports=b},{109:109,110:110,111:111,96:96}],94:[function(f,e,d){function b(c,b,d,e){a.call(this,c,b,d,e)}var a=f(96),c=f(99);f={screenX:null,screenY:null,clientX:null,clientY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:f(111),button:function(a){var c=a.button;return"which"in a?c:2===c?2:4===c?1:0},buttons:null,relatedTarget:function(a){return a.relatedTarget||
(a.fromElement===a.srcElement?a.toElement:a.fromElement)},pageX:function(a){return"pageX"in a?a.pageX:a.clientX+c.currentScrollLeft},pageY:function(a){return"pageY"in a?a.pageY:a.clientY+c.currentScrollTop}};a.augmentClass(b,f);e.exports=b},{111:111,96:96,99:99}],95:[function(f,e,d){function b(c,h,b,d){a.call(this,c,h,b,d)}var a=f(96);f={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:f(111)};a.augmentClass(b,f);e.exports=b},
{111:111,96:96}],96:[function(f,e,d){function b(c,b,d,e){a.call(this,c,b,d,e)}var a=f(90),c=f(112);a.augmentClass(b,{view:function(a){if(a.view)return a.view;a=c(a);return null!=a&&a.window===a?a:(a=a.ownerDocument)?a.defaultView||a.parentWindow:window},detail:function(a){return a.detail||0}});e.exports=b},{112:112,90:90}],97:[function(f,e,d){function b(c,h,b,d){a.call(this,c,h,b,d)}var a=f(94);a.augmentClass(b,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in
a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:null,deltaMode:null});e.exports=b},{94:94}],98:[function(f,e,d){var b=f(142),a={Mixin:{reinitializeTransaction:function(){this.transactionWrappers=this.getTransactionWrappers();this.wrapperInitData?this.wrapperInitData.length=0:this.wrapperInitData=[];this._isInTransaction=!1},_isInTransaction:!1,getTransactionWrappers:null,isInTransaction:function(){return!!this._isInTransaction},perform:function(a,h,d,e,f,p,n,q){this.isInTransaction()?
b(!1):void 0;var r,s;try{r=this._isInTransaction=!0,this.initializeAll(0),s=a.call(h,d,e,f,p,n,q),r=!1}finally{try{if(r)try{this.closeAll(0)}catch(t){}else this.closeAll(0)}finally{this._isInTransaction=!1}}return s},initializeAll:function(c){for(var h=this.transactionWrappers;c<h.length;c++){var b=h[c];try{this.wrapperInitData[c]=a.OBSERVED_ERROR,this.wrapperInitData[c]=b.initialize?b.initialize.call(this):null}finally{if(this.wrapperInitData[c]===a.OBSERVED_ERROR)try{this.initializeAll(c+1)}catch(d){}}}},
closeAll:function(c){this.isInTransaction()?void 0:b(!1);for(var h=this.transactionWrappers;c<h.length;c++){var d,e=h[c],f=this.wrapperInitData[c];try{d=!0,f!==a.OBSERVED_ERROR&&e.close&&e.close.call(this,f),d=!1}finally{if(d)try{this.closeAll(c+1)}catch(p){}}}this.wrapperInitData.length=0}},OBSERVED_ERROR:{}};e.exports=a},{142:142}],99:[function(f,e,d){var b={currentScrollLeft:0,currentScrollTop:0,refreshScrollValues:function(a){b.currentScrollLeft=a.x;b.currentScrollTop=a.y}};e.exports=b},{}],100:[function(f,
e,d){var b=f(142);e.exports=function(a,c){if(null==c?b(!1):void 0,null==a)return c;var h=Array.isArray(a),d=Array.isArray(c);return h&&d?(a.push.apply(a,c),a):h?(a.push(c),a):d?[a].concat(c):[a,c]}},{142:142}],101:[function(f,e,d){e.exports=function(b){for(var a=1,c=0,h=0,d=b.length,e=-4&d;e>h;){for(;h<Math.min(h+4096,e);h+=4)c+=(a+=b.charCodeAt(h))+(a+=b.charCodeAt(h+1))+(a+=b.charCodeAt(h+2))+(a+=b.charCodeAt(h+3));a%=65521;c%=65521}for(;d>h;h++)c+=a+=b.charCodeAt(h);return a%=65521,c%=65521,a|
c<<16}},{}],102:[function(f,e,d){e.exports=!1},{}],103:[function(f,e,d){var b=f(4).isUnitlessNumber;e.exports=function(a,c){return null==c||"boolean"==typeof c||""===c?"":isNaN(c)||0===c||b.hasOwnProperty(a)&&b[a]?""+c:("string"==typeof c&&(c=c.trim()),c+"px")}},{4:4}],104:[function(f,e,d){f(23);f(151);e.exports=function(b,a,c,h,d){return d}},{151:151,23:23}],105:[function(f,e,d){function b(c){return a[c]}var a={"\x26":"\x26amp;","\x3e":"\x26gt;","\x3c":"\x26lt;",'"':"\x26quot;","'":"\x26#x27;"},
c=/[&><"']/g;e.exports=function(a){return(""+a).replace(c,b)}},{}],106:[function(f,e,d){var b=(f(34),f(60)),a=f(63),c=f(142);f(151);e.exports=function(h){return null==h?null:1===h.nodeType?h:b.has(h)?a.getNodeFromInstance(h):(null!=h.render&&"function"==typeof h.render?c(!1):void 0,void c(!1))}},{142:142,151:151,34:34,60:60,63:63}],107:[function(f,e,d){function b(a,h,b){void 0===a[b]&&null!=h&&(a[b]=h)}var a=f(125);f(151);e.exports=function(c){if(null==c)return c;var h={};return a(c,b,h),h}},{125:125,
151:151}],108:[function(f,e,d){e.exports=function(b,a,c){Array.isArray(b)?b.forEach(a,c):b&&a.call(c,b)}},{}],109:[function(f,e,d){e.exports=function(b){var a,c=b.keyCode;return"charCode"in b?(a=b.charCode,0===a&&13===c&&(a=13)):a=c,32<=a||13===a?a:0}},{}],110:[function(f,e,d){var b=f(109),a={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},c={8:"Backspace",
9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};e.exports=function(h){if(h.key){var d=a[h.key]||h.key;if("Unidentified"!==d)return d}return"keypress"===h.type?(h=
b(h),13===h?"Enter":String.fromCharCode(h)):"keydown"===h.type||"keyup"===h.type?c[h.keyCode]||"Unidentified":""}},{109:109}],111:[function(f,e,d){function b(c){var h=this.nativeEvent;return h.getModifierState?h.getModifierState(c):(c=a[c])?!!h[c]:!1}var a={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};e.exports=function(a){return b}},{}],112:[function(f,e,d){e.exports=function(b){b=b.target||b.srcElement||window;return 3===b.nodeType?b.parentNode:b}},{}],113:[function(f,e,d){var b=
"function"==typeof Symbol&&Symbol.iterator;e.exports=function(a){a=a&&(b&&a[b]||a["@@iterator"]);return"function"==typeof a?a:void 0}},{}],114:[function(f,e,d){function b(a){for(;a&&a.firstChild;)a=a.firstChild;return a}e.exports=function(a,c){for(var h=b(a),d=0,e=0;h;){if(3===h.nodeType){if(e=d+h.textContent.length,c>=d&&e>=c)return{node:h,offset:c-d};d=e}a:{for(;h;){if(h.nextSibling){h=h.nextSibling;break a}h=h.parentNode}h=void 0}h=b(h)}}},{}],115:[function(f,e,d){var b=f(128),a=null;e.exports=
function(){return!a&&b.canUseDOM&&(a="textContent"in document.documentElement?"textContent":"innerText"),a}},{128:128}],116:[function(f,e,d){function b(h){var d;null===h||!1===h?d=new a(b):"object"==typeof h?(!h||"function"!=typeof h.type&&"string"!=typeof h.type?k(!1):void 0,d="string"==typeof h.type?c.createInternalComponent(h):"function"==typeof h.type&&"undefined"!=typeof h.type.prototype&&"function"==typeof h.type.prototype.mountComponent&&"function"==typeof h.type.prototype.receiveComponent?
new h.type(h):new l):"string"==typeof h||"number"==typeof h?d=c.createInstanceForText(h):k(!1);return d.construct(h),d._mountIndex=0,d._mountImage=null,d}d=f(33);var a=f(52),c=f(66),h=f(23),k=f(142),l=(f(151),function(){});h(l.prototype,d.Mixin,{_instantiateReactComponent:b});e.exports=b},{142:142,151:151,23:23,33:33,52:52,66:66}],117:[function(f,e,d){var b,a=f(128);a.canUseDOM&&(b=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""));e.exports=
function(c,h){if(!a.canUseDOM||h&&!("addEventListener"in document))return!1;var d="on"+c,e=d in document;e||(e=document.createElement("div"),e.setAttribute(d,"return;"),e="function"==typeof e[d]);return!e&&b&&"wheel"===c&&(e=document.implementation.hasFeature("Events.wheel","3.0")),e}},{128:128}],118:[function(f,e,d){var b={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};e.exports=function(a){var c=
a&&a.nodeName&&a.nodeName.toLowerCase();return c&&("input"===c&&b[a.type]||"textarea"===c)}},{}],119:[function(f,e,d){var b=f(50),a=f(142);e.exports=function(c){return b.isValidElement(c)?void 0:a(!1),c}},{142:142,50:50}],120:[function(f,e,d){var b=f(105);e.exports=function(a){return'"'+b(a)+'"'}},{105:105}],121:[function(f,e,d){f=f(63);e.exports=f.renderSubtreeIntoContainer},{63:63}],122:[function(f,e,d){d=f(128);var b=/^[ \r\n\t\f]/,a=/<(!--|link|noscript|meta|script|style)[ \r\n\t\f\/>]/;f=function(a,
h){a.innerHTML=h};if("undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction&&(f=function(a,h){MSApp.execUnsafeLocalFunction(function(){a.innerHTML=h})}),d.canUseDOM)d=document.createElement("div"),d.innerHTML=" ",""===d.innerHTML&&(f=function(c,h){if(c.parentNode&&c.parentNode.replaceChild(c,c),b.test(h)||"\x3c"===h[0]&&a.test(h)){c.innerHTML=String.fromCharCode(65279)+h;var d=c.firstChild;1===d.data.length?c.removeChild(d):d.deleteData(0,1)}else c.innerHTML=h});e.exports=f},{128:128}],123:[function(f,
e,d){d=f(128);var b=f(105),a=f(122);f=function(a,h){a.textContent=h};d.canUseDOM&&("textContent"in document.documentElement||(f=function(c,h){a(c,b(h))}));e.exports=f},{105:105,122:122,128:128}],124:[function(f,e,d){e.exports=function(b,a){var c=null===b||!1===b,h=null===a||!1===a;if(c||h)return c===h;c=typeof b;h=typeof a;return"string"===c||"number"===c?"string"===h||"number"===h:"object"===h&&b.type===a.type&&b.key===a.key}},{}],125:[function(f,e,d){function b(a){return n[a]}function a(a,c){return a&&
null!=a.key?"$"+(""+a.key).replace(q,b):c.toString(36)}function c(d,e,f,n){var v=typeof d;if(("undefined"===v||"boolean"===v)&&(d=null),null===d||"string"===v||"number"===v||h.isValidElement(d))return f(n,d,""===e?m+a(d,0):e),1;var w,x,y=0;e=""===e?m:e+p;if(Array.isArray(d))for(v=0;v<d.length;v++)w=d[v],x=e+a(w,v),y+=c(w,x,f,n);else{var B=k(d);if(B)if(v=B.call(d),B!==d.entries)for(B=0;!(d=v.next()).done;)w=d.value,x=e+a(w,B++),y+=c(w,x,f,n);else for(;!(d=v.next()).done;)(d=d.value)&&(w=d[1],x=e+("$"+
(""+d[0]).replace(q,b))+p+a(w,0),y+=c(w,x,f,n));else"object"===v&&(String(d),l(!1))}return y}var h=(f(34),f(50));d=f(59);var k=f(113),l=f(142),m=(f(151),d.SEPARATOR),p=":",n={"\x3d":"\x3d0",".":"\x3d1",":":"\x3d2"},q=/[=.:]/g;e.exports=function(a,h,b){return null==a?0:c(a,"",h,b)}},{113:113,142:142,151:151,34:34,50:50,59:59}],126:[function(f,e,d){d=(f(23),f(134));f=(f(151),d);e.exports=f},{134:134,151:151,23:23}],127:[function(f,e,d){var b=f(134);e.exports={listen:function(a,c,h){return a.addEventListener?
(a.addEventListener(c,h,!1),{remove:function(){a.removeEventListener(c,h,!1)}}):a.attachEvent?(a.attachEvent("on"+c,h),{remove:function(){a.detachEvent("on"+c,h)}}):void 0},capture:function(a,c,h){return a.addEventListener?(a.addEventListener(c,h,!0),{remove:function(){a.removeEventListener(c,h,!0)}}):{remove:b}},registerDefault:function(){}}},{134:134}],128:[function(f,e,d){f=!("undefined"==typeof window||!window.document||!window.document.createElement);e.exports={canUseDOM:f,canUseWorkers:"undefined"!=
typeof Worker,canUseEventListeners:f&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:f&&!!window.screen,isInWorker:!f}},{}],129:[function(f,e,d){var b=/-(.)/g;e.exports=function(a){return a.replace(b,function(a,h){return h.toUpperCase()})}},{}],130:[function(f,e,d){var b=f(129),a=/^-ms-/;e.exports=function(c){return b(c.replace(a,"ms-"))}},{129:129}],131:[function(f,e,d){var b=f(144);e.exports=function(a,c){var h=!0;a:for(;h;){var h=a,d=c;if(h&&d){if(h===d)return!0;if(b(h))return!1;
if(b(d)){a=h;c=d.parentNode;h=!0;continue a}return h.contains?h.contains(d):h.compareDocumentPosition?!!(16&h.compareDocumentPosition(d)):!1}return!1}}},{144:144}],132:[function(f,e,d){var b=f(150);e.exports=function(a){return a&&("object"==typeof a||"function"==typeof a)&&"length"in a&&!("setInterval"in a)&&"number"!=typeof a.nodeType&&(Array.isArray(a)||"callee"in a||"item"in a)?Array.isArray(a)?a.slice():b(a):[a]}},{150:150}],133:[function(f,e,d){d=f(128);var b=f(132),a=f(138),c=f(142),h=d.canUseDOM?
document.createElement("div"):null,k=/^\s*<(\w+)/;e.exports=function(d,e){var f=h;h?void 0:c(!1);var n;if(n=(n=(n=d.match(k))&&n[1].toLowerCase())&&a(n)){f.innerHTML=n[1]+d+n[2];for(n=n[0];n--;)f=f.lastChild}else f.innerHTML=d;n=f.getElementsByTagName("script");n.length&&(e?void 0:c(!1),b(n).forEach(e));for(n=b(f.childNodes);f.lastChild;)f.removeChild(f.lastChild);return n}},{128:128,132:132,138:138,142:142}],134:[function(f,e,d){function b(a){return function(){return a}}function a(){}a.thatReturns=
b;a.thatReturnsFalse=b(!1);a.thatReturnsTrue=b(!0);a.thatReturnsNull=b(null);a.thatReturnsThis=function(){return this};a.thatReturnsArgument=function(a){return a};e.exports=a},{}],135:[function(f,e,d){e.exports={}},{}],136:[function(f,e,d){e.exports=function(b){try{b.focus()}catch(a){}}},{}],137:[function(f,e,d){e.exports=function(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(b){return document.body}}},{}],138:[function(f,e,d){d=f(128);var b=
f(142),a=d.canUseDOM?document.createElement("div"):null,c={};f=[1,'\x3cselect multiple\x3d"true"\x3e',"\x3c/select\x3e"];d=[1,"\x3ctable\x3e","\x3c/table\x3e"];var h=[3,"\x3ctable\x3e\x3ctbody\x3e\x3ctr\x3e","\x3c/tr\x3e\x3c/tbody\x3e\x3c/table\x3e"],k=[1,'\x3csvg xmlns\x3d"http://www.w3.org/2000/svg"\x3e',"\x3c/svg\x3e"],l={"*":[1,"?\x3cdiv\x3e","\x3c/div\x3e"],area:[1,"\x3cmap\x3e","\x3c/map\x3e"],col:[2,"\x3ctable\x3e\x3ctbody\x3e\x3c/tbody\x3e\x3ccolgroup\x3e","\x3c/colgroup\x3e\x3c/table\x3e"],
legend:[1,"\x3cfieldset\x3e","\x3c/fieldset\x3e"],param:[1,"\x3cobject\x3e","\x3c/object\x3e"],tr:[2,"\x3ctable\x3e\x3ctbody\x3e","\x3c/tbody\x3e\x3c/table\x3e"],optgroup:f,option:f,caption:d,colgroup:d,tbody:d,tfoot:d,thead:d,td:h,th:h};"circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop text tspan".split(" ").forEach(function(a){l[a]=k;c[a]=!0});e.exports=function(h){return a?void 0:b(!1),l.hasOwnProperty(h)||(h="*"),c.hasOwnProperty(h)||
("*"===h?a.innerHTML="\x3clink /\x3e":a.innerHTML="\x3c"+h+"\x3e\x3c/"+h+"\x3e",c[h]=!a.firstChild),c[h]?l[h]:null}},{128:128,142:142}],139:[function(f,e,d){e.exports=function(b){return b===window?{x:window.pageXOffset||document.documentElement.scrollLeft,y:window.pageYOffset||document.documentElement.scrollTop}:{x:b.scrollLeft,y:b.scrollTop}}},{}],140:[function(f,e,d){var b=/([A-Z])/g;e.exports=function(a){return a.replace(b,"-$1").toLowerCase()}},{}],141:[function(f,e,d){var b=f(140),a=/^ms-/;e.exports=
function(c){return b(c).replace(a,"-ms-")}},{140:140}],142:[function(f,e,d){e.exports=function(b,a,c,h,d,e,f,p){if(!b){if(void 0===a)b=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var n=[c,h,d,e,f,p],q=0;b=Error(a.replace(/%s/g,function(){return n[q++]}));b.name="Invariant Violation"}throw b.framesToPop=1,b;}}},{}],143:[function(f,e,d){e.exports=function(b){return!(!b||!("function"==typeof Node?b instanceof
Node:"object"==typeof b&&"number"==typeof b.nodeType&&"string"==typeof b.nodeName))}},{}],144:[function(f,e,d){var b=f(143);e.exports=function(a){return b(a)&&3==a.nodeType}},{143:143}],145:[function(f,e,d){var b=f(142);e.exports=function(a){var c,h={};a instanceof Object&&!Array.isArray(a)?void 0:b(!1);for(c in a)a.hasOwnProperty(c)&&(h[c]=c);return h}},{142:142}],146:[function(f,e,d){e.exports=function(b){for(var a in b)if(b.hasOwnProperty(a))return a;return null}},{}],147:[function(f,e,d){var b=
Object.prototype.hasOwnProperty;e.exports=function(a,c,h){if(!a)return null;var d={},e;for(e in a)b.call(a,e)&&(d[e]=c.call(h,a[e],e,a));return d}},{}],148:[function(f,e,d){e.exports=function(b){var a={};return function(c){return a.hasOwnProperty(c)||(a[c]=b.call(this,c)),a[c]}}},{}],149:[function(f,e,d){var b=Object.prototype.hasOwnProperty;e.exports=function(a,c){if(a===c)return!0;if("object"!=typeof a||null===a||"object"!=typeof c||null===c)return!1;var h=Object.keys(a),d=Object.keys(c);if(h.length!==
d.length)return!1;for(var d=b.bind(c),e=0;e<h.length;e++)if(!d(h[e])||a[h[e]]!==c[h[e]])return!1;return!0}},{}],150:[function(f,e,d){var b=f(142);e.exports=function(a){var c=a.length;if(Array.isArray(a)||"object"!=typeof a&&"function"!=typeof a?b(!1):void 0,"number"!=typeof c?b(!1):void 0,0===c||c-1 in a?void 0:b(!1),a.hasOwnProperty)try{return Array.prototype.slice.call(a)}catch(h){}for(var d=Array(c),e=0;c>e;e++)d[e]=a[e];return d}},{142:142}],151:[function(f,e,d){f=f(134);e.exports=f},{134:134}]},
{},[1])(1)})},"react/react-dom.min":function(){!function(g){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=g(require("react"));else if("function"==typeof define&&define.amd)define(["react"],g);else{var f;f="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this;f.ReactDOM=g(f.React)}}(function(g){return g.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED})},"react/main":function(){define(["react/react.min"],function(g){return g})},
"mw-tree/utils/ViewEventHandlers":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["dojo/promise/all"],function(f){return function(){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this._controllers={};this._adaptors={}}g(e,[{key:"registerEventListeners",
value:function(d,b){var a=this,c=Object.keys(d);b?c.forEach(function(c){var b=a._controllers[c]||[];b.push(d[c]);a._controllers[c]=b}):c.forEach(function(c){var b=a._adaptors[c]||[];b.push(d[c]);a._adaptors[c]=b})}},{key:"_handleAdaptorEvents",value:function(d,b){var a=this._adaptors[d],c=[];Array.isArray(a)&&a.forEach(function(a){(a=a(b))&&a.then&&c.push(a)});return f(c)}},{key:"handleEvent",value:function(d,b,a){var c=this,h=this._controllers[d],e=[];Array.isArray(h)&&h.forEach(function(a){(a=a(b))&&
e.push(a)});0<e.length?f(e).then(function(){c._handleAdaptorEvents(d,b).then(function(){return a()})}):this._handleAdaptorEvents(d,b).then(function(){return a()})}}]);return e}()})},"mw-tree/utils/KeyCodeEnum":function(){define([],function(){return Object.freeze({BACKSPACE:8,NUM_START:48,NUM_END:57,F2:113,SPACE:32,ENTER:13,ESCAPE:27,ALPHA_START:65,ALPHA_END:90,NUMPAD_START:95,NUMPAD_END:112,SYM1_START:185,SYM1_END:193,SYM2_START:219,SYM2_END:222,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,ARROW_LEFT:37,
ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40})})},"mw-tree/utils/MouseCodeEnum":function(){define([],function(){return Object.freeze({MOUSE_LEFT_BUTTON:0,MOUSE_MIDDLE_BUTTON:1,MOUSE_RIGHT_BUTTON:2})})},"mw-tree/utils/TreeUtils":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["mw-tree/view/DefaultsEnum",
"mw-tree-data-model/rangeUtil"],function(f,e){return function(){function d(){if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");}g(d,null,[{key:"computeTableHeight",value:function(b,a){return(b*a||0)+"px"}},{key:"isViewPortRangeInDataBuffer",value:function(b){var a=b.viewPort.rangeList[0];b=b.viewBuffer.rangeList[0];var c=Math.max(0,a.rows.start-4),a=a.rows.end+4;return c>=b.rows.start&&a<=b.rows.end}},{key:"getRangeListForRange",value:function(b,a,c){a=Math.max(a,b.dataSize.rows.start);
b=Math.min(c,b.dataSize.rows.end);return[e.range().setRows(a,b).setColumns(0,0)]}},{key:"dynamicScrollTopCalculator",value:function(b,a){return function(c){c.top=a.viewPort.size.top;c.left=a.viewPort.size.left;d.calculateAndUpdateViewPort(a,c);var h=a.getStateByKey("nodeHeightInPx").value,e;e=a.viewPort.rangeList[0].rows;e=e.start<=b&&b<=e.end?e.start:Math.max(a.dataSize.rows.start,b-(e.count-1));c=a.viewPort.rangeList[0].rows.start!==e?e*h:c.top;b===e+(a.viewPort.rangeList[0].rows.count-1)&&(h=a.viewPort.rangeList[0].rows.count*
h-a.viewPort.size.height,c=0<h?c+h:c);return c}}},{key:"calculateAndUpdateViewPort",value:function(b,a){var c=0,h=0,e=b.getStateByKey("nodeHeightInPx");e&&(e=e.value,c=Math.round(a.height/e),h=Math.round(a.top/e));d.updateViewPort(b,h,c,a)}},{key:"updateViewPort",value:function(b,a,c,h){var d=b.viewPort,e=0,f=0;h&&(d.size=h);"number"===typeof a&&0<=a&&(e=Math.max(a,b.dataSize.rows.start));f="number"===typeof c&&0<c?Math.max(0,e+c-1):Math.max(0,e+d.rangeList[0].rows.count-1);a=d.rangeList;a[0]=a[0].setRows(e,
f).setColumns(0,0);d.rangeList=a;b.viewPort=d}},{key:"updateDataBuffer",value:function(b,a){if(a||!d.isViewPortRangeInDataBuffer(b)){var c=b.getStateByKey("lookAheadNodeBuffer").value,h=Math.max(b.dataSize.rows.start,b.viewPort.rangeList[0].rows.start-c),c=b.viewPort.rangeList[0].rows.end+c;b.viewBuffer={size:null,rangeList:[e.range().setRows(h,c).setColumns(0,0)]}}}}]);return d}()})},"mw-tree/view/DefaultsEnum":function(){define([],function(){return Object.freeze({nodeHeight:21,lookAheadNodeBuffer:10})})},
"mw-tree/view/EventsConfig":function(){define([],function(){return Object.freeze({rightClick:"",contextMenuClick:"treeContextMenu",dblClick:"treeExpandCollapse",keyDownNavigation:"treeNavigation",keyDownMetaNavigation:"treeNavigation",keyDownRangeNavigation:"treeNavigation",keyDownAlphaNum:"",keyDownF2:"treeNodeEditKeyPress",keyDownEnter:"treeNodeEditKeyPress",keyDown:"treeKeyPress",nodeMouseDown:"treeNodeMouseDown",treeMouseDown:"treeMouseDown",nodeMouseDownFocused:"treeNodeEditMouseEvent"})})},
"mw-tree/view/DesignTimeEventsConfig":function(){define([],function(){return Object.freeze({rightClick:"treeContextMenuSelection",contextMenuClick:"",dblClick:"treeNodeEditMouseEvent",keyDownNavigation:"treeNavigation",keyDownMetaNavigation:"",keyDownRangeNavigation:"treeNavigation",keyDownAlphaNum:"treeNodeEditKeyPress",keyDownF2:"treeNodeEditKeyPress",keyDownEnter:"",keyDown:"treeKeyPress",nodeMouseDown:"treeNodeMouseDown",treeMouseDown:"treeMouseDown",nodeMouseDownFocused:""})})},"mw-tree/view/TreeBuilder":function(){var g=
function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define("./TreeDisclosureNode ./TreeNode ./TreeContainer ./TreeRenderer mw-tree/renderers/IconLabelRenderer react/react.min".split(" "),function(f,e,d,b,a,c){return function(){function h(c,b,d){if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");
this._viewModel=c;this.dataTestId=d.dataTestId;this.handlers=b;this.renderer=d.renderer?d.renderer:a}g(h,[{key:"_getScrollTopValue",value:function(a){var c=this._viewModel.getStateByKey("scrollTopCalc");return c&&a?(a=c.value(a),this._viewModel.viewPort.size.top=a,this._viewModel.deleteState("scrollTopCalc"),a):this._viewModel.viewPort.size.top}},{key:"_getUpdatedTreeProps",value:function(){var a=this,c={},h=this._viewModel.getStateByKey("nodeHeightInPx");c.treeNodeHeight=h?h.value:0;c.treeHeight=
0<=this._viewModel.dataSize.rows.end?this._viewModel.dataSize.rows.end*c.treeNodeHeight:0;c.treeWidth=this._viewModel.getStateByKey("treeWidth");c.treeWidth=c.treeWidth?c.treeWidth.value:null;c.translateY=this._viewModel.viewBuffer.rangeList[0].rows.start*c.treeNodeHeight;c.forceContainerFocus=this._viewModel.getStateByKey("forceContainerFocus");c.forceContainerFocus=c.forceContainerFocus?c.forceContainerFocus.value:null;this._viewModel.deleteState("forceContainerFocus");c.viewHeight=this._viewModel.viewPort.size.height;
c.scrollTopFunc=function(c){return a._getScrollTopValue(c)};h=(h=this._viewModel.getStateByKey("ContainerFocused"))&&h.value;c.containerClass=h?"mw-tree-scroll-component focused":"mw-tree-scroll-component";return c}},{key:"buildTree",value:function(a){var h=this._getUpdatedTreeProps(),b=1,e=[];if(a)for(var f=a.range.rows.end,g=a.range.rows.start;g<=f&&a(g)(0).value;g++)e.push(this.buildTreeNode(a(g)(0),b,g,h)),b++;return c.createElement(d,{classes:"tree",dataTestId:this.dataTestId,translateY:h.translateY,
viewHeight:h.viewHeight,bodyHeight:h.treeHeight,treeNodeHeight:h.treeNodeHeight,scrollHandler:this.handlers.tree._scrollHandler,scrollTopFunc:h.scrollTopFunc,scrollLeft:h.scrollLeft,setTreeNodeProperty:this.handlers.tree._setTreeNodeHeightHandler,setTreeWidth:this.handlers.tree._setTreeWidthProperty,width:h.treeWidth,containerClass:h.containerClass,forceContainerFocus:h.forceContainerFocus,focusHandler:this.handlers.tree._focusHandler,containerMountHandler:this.handlers.tree._containerMountHandler,
containerUpdateHandler:this.handlers.tree._containerUpdateHandler,blurHandler:this.handlers.tree._blurHandler,contextMenuHandler:this.handlers.tree._contextMenuHandler,keyHandler:this.handlers.tree._keyDownHandler},e)}},{key:"buildContentNode",value:function(a,c){var h={content:null,additionalDataAttributes:{}};h.content=this.buildRenderer(a);return h}},{key:"buildTreeNode",value:function(a,h,b,d){var f=a.value,g=this._getStylingAndClasses(f),r=this.buildDisclosureNode(f,b);d.nodeIndentation=g.nodeDataIndentation;
d=this.buildContentNode(a,d);a=this.buildRenderer(a);return c.createElement(e,{key:h,classes:g.classes,rowIndex:b,node:f,additionalDataAttributes:d.additionalDataAttributes,content:d.content,renderer:a,disclosureNode:r,nodeMouseUp:this.handlers.treeNode._nodeMouseUpHandler,nodeMouseDown:this.handlers.treeNode._nodeMouseDownHandler,nodeDblClick:this.handlers.treeNode._nodeDblClickHandler,nodeClick:this.handlers.treeNode._nodeClickHandler,treeNodeStyle:g.style})}},{key:"buildRenderer",value:function(a){return c.createElement(b,
{renderer:this.renderer,node:a})}},{key:"buildDisclosureNode",value:function(a,h){var b=void 0;a.isExpandable&&(b=["disclosureIcon"],a.isExpanded?b.push("collapse"):b.push("expand"),b=b.join(" "),b=c.createElement(f,{classes:b,node:a,disclosureMouseDown:this.handlers.disclosureNode._disclosureMouseDownHandler,rowIndex:h}));return b}},{key:"_getStylingAndClasses",value:function(a){var c=["tree-list-item","treeNode"],h={marginLeft:18*a.level},b=h.marginLeft,d=this._viewModel.getStateByKey("selected");
d&&(d.rangeList&&0<d.rangeList.length)&&(d=d.rangeList[0],d.some(function(c){return a.id===c.id})&&c.push("selected"));if((d=this._viewModel.getStateByKey("contextMenuFocus"))&&d.value)d=d.value,a.id===d.id&&(h.marginLeft-=1,c.push("contextFocus"));if((d=this._viewModel.getStateByKey("contextMenuFocus")?null:this._viewModel.getStateByKey("focused"))&&d.value)d=d.value,a.id===d.id&&(h.marginLeft-=1,c.push("focused"));(d=this._viewModel.getStateByKey("dnd"))&&d.value&&c.push("dojoDndItem");a.isExpandable?
(b+=18,c.push("parentNode")):(c.push("leafNode"),h.marginLeft+=18,b+=18);return{classes:c.join(" "),style:h,nodeDataIndentation:b}}},{key:"_updateScrollLeftIfNeccessary",value:function(a){var c=this._viewModel.viewPort.size.width,h=this._viewModel.viewPort.size.left;this._viewModel.viewPort.size.left=a>0.5*(h+c)?a-0.5*(h+c):a<h&&a>c?a:0}}]);return h}()})},"mw-tree/view/TreeDisclosureNode":function(){define(["react/react.min"],function(g){return function(f){return g.createElement("span",{className:f.classes,
"data-row-index":f.rowIndex,"data-test-id":"disclosureHandle","data-disclosure-id":f.node.data.id,onMouseDown:f.disclosureMouseDown},g.createElement("span",{className:"disclosureImage","data-disclosure-id":f.node.data.id,"data-row-index":f.rowIndex}))}})},"mw-tree/view/TreeNode":function(){var g=Object.assign||function(f){for(var e=1;e<arguments.length;e++){var d=arguments[e],b;for(b in d)Object.prototype.hasOwnProperty.call(d,b)&&(f[b]=d[b])}return f};define(["react/react.min"],function(f){return function(e){return f.createElement("div",
g({className:e.classes,"data-row-index":e.rowIndex,"data-level-index":e.node.level,"data-test-id":e.node.data.id},e.additionalDataAttributes,{onMouseDown:e.nodeMouseDown,onMouseUp:e.nodeMouseUp,onClick:e.nodeClick}),f.createElement("div",{className:"treeNodeData","data-test-id":"nodeContentHandle",onDoubleClick:e.nodeDblClick,style:e.treeNodeStyle},e.disclosureNode,e.content))}})},"mw-tree/view/TreeContainer":function(){function g(d,b){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return b&&("object"===typeof b||"function"===typeof b)?b:d}function f(d,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}var e=function(){function d(b,a){for(var c=0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=!0;"value"in
h&&(h.writable=!0);Object.defineProperty(b,h.key,h)}}return function(b,a,c){a&&d(b.prototype,a);c&&d(b,c);return b}}();define(["dojo/dom-style","./BrowserFeatureSupport","react/react.min","mw-tree/utils/MouseCodeEnum"],function(d,b,a,c){return function(h){function k(a){if(!(this instanceof k))throw new TypeError("Cannot call a class as a function");var c=g(this,(k.__proto__||Object.getPrototypeOf(k)).call(this,a));c._scrollHandler=function(a){return c.props.scrollHandler(a)};c._disableUserSelectHandler=
function(a){return c._handleDisableUserSelect(a)};c._getContainerRef=function(a){return c.myContainerDiv=a};c._contextMenuHandler=function(a){return c._handleContextMenu(a)};return c}f(k,h);e(k,[{key:"_handleDisableUserSelect",value:function(a){var c=a.target&&a.target.tagName;"INPUT"!==c&&"TEXTAREA"!==c&&a.preventDefault()}},{key:"_calculateTreeNodeHeight",value:function(){var a=this.myContainerDiv.childNodes[0].childNodes[0].childNodes[0];a&&(a=a.clientHeight+d.get(a,"margin-top")+d.get(a,"margin-bottom"),
this.props.setTreeNodeProperty(a))}},{key:"_adjustScrollTop",value:function(a){var c=void 0,c=a?this.props.scrollTopFunc({height:this.myContainerDiv.clientHeight,width:this.myContainerDiv.clientWidth}):this.props.scrollTopFunc();this.myContainerDiv.scrollTop!==c&&(this.myContainerDiv.scrollTop=c)}},{key:"_handleContextMenu",value:function(a){switch(a.button){case c.MOUSE_LEFT_BUTTON:a.preventDefault();break;case c.MOUSE_RIGHT_BUTTON:a.preventDefault(),this.props.contextMenuHandler(a)}}},{key:"componentWillUpdate",
value:function(){this._adjustScrollTop()}},{key:"componentDidMount",value:function(){this._calculateTreeNodeHeight();b.isSeparateUserSelectRequired&&this.myContainerDiv.addEventListener("selectstart",this._disableUserSelectHandler);this.props.containerMountHandler({treeContainerNode:this.myContainerDiv,mwTreeNode:this.mwTreeNode})}},{key:"componentDidUpdate",value:function(){this.props.treeNodeHeight||this._calculateTreeNodeHeight();b.containsActiveNodeLostIssue&&this.props.forceContainerFocus&&this.myContainerDiv.focus();
this._adjustScrollTop(!0);this.props.containerUpdateHandler()}},{key:"componentWillUnmount",value:function(){b.isSeparateUserSelectRequired&&this.myContainerDiv.removeEventListener("selectstart",this._disableUserSelectHandler)}},{key:"render",value:function(){var c=this,h={height:this.props.bodyHeight},d=this.props.containerClass;b.shouldHoverBeDisabled||(d+=" hoverable");this.props.width&&(h.minWidth=this.props.width);var e={transform:"translateY("+this.props.translateY+"px)"};e["-webkit-transform"]=
"translateY("+this.props.translateY+"px)";return a.createElement("div",{className:d,onScroll:this._scrollHandler,onFocus:this.props.focusHandler,onBlur:this.props.blurHandler,onKeyDown:this.props.keyHandler,tabIndex:"0",ref:this._getContainerRef,onContextMenu:this._contextMenuHandler},a.createElement("div",{className:"mw-tree-body-component",style:h},a.createElement("div",{className:this.props.classes,style:e,ref:function(a){return c.mwTreeNode=a}},this.props.children)))}}]);return k}(a.Component)})},
"mw-tree/view/BrowserFeatureSupport":function(){define(["dojo/has"],function(g){var f=!g("chrome")&&602>g("webkit"),e=g("trident");g=g("trident");return{shouldHoverBeDisabled:f,isSeparateUserSelectRequired:e,containsActiveNodeLostIssue:g}})},"mw-tree/view/TreeRenderer":function(){function g(e,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,
configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["react/react.min"],function(e){return function(d){function b(){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");var a=(b.__proto__||
Object.getPrototypeOf(b)).apply(this,arguments);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&("object"===typeof a||"function"===typeof a)?a:this}g(b,d);f(b,[{key:"shouldComponentUpdate",value:function(a){return!this.props.node.isEqual(a.node)}},{key:"componentDidUpdate",value:function(){var a=this.rendererContainer,c=this.props;this.rendererContainer.replaceChild(this._getRendererDom(c.renderer,c.node),a.firstChild)}},{key:"_getRendererDom",
value:function(a,c){return a.getDomNode(c.value.data,{highlight:this.props.node.value.highlight})}},{key:"componentDidMount",value:function(){var a=this.props;this.rendererContainer.appendChild(this._getRendererDom(a.renderer,a.node))}},{key:"render",value:function(){var a=this;return e.createElement("span",{ref:function(c){return a.rendererContainer=c},className:"mw-treeNode-renderer-container"})}}]);return b}(e.Component)})},"mw-tree/renderers/IconLabelRenderer":function(){define(["mw-tree/utils/Highlight"],
function(g){return{getDomNode:function(f,e){var d=void 0,b=document.createElement("span");b.className="mw-tree-renderer";var d=void 0,a=f.iconUri;a&&(d=document.createElement("span"),d.setAttribute("data-test-id","icon1"),d.className="treeNodeIcon",d.style.backgroundImage="url('"+encodeURI(a)+"')",b.appendChild(d));d=this._getLabelDOMNode(f,e);b.appendChild(d);return b},_getLabelDOMNode:function(f,e){var d=document.createElement("span");d.className="treeNodeText";d.setAttribute("data-test-id","label");
d.setAttribute("data-region",!0);e&&Array.isArray(e.highlight)?g.getHighlightedTextDOM(f.label,"label",e.highlight).forEach(function(b){b.setAttribute&&b.setAttribute("data-region",!0);d.appendChild(b)}):d.textContent=f.label;return d}}})},"mw-tree/utils/Highlight":function(){define([],function(){return{getHighlightedTextDOM:function(g,f,e){var d=[],b=[],b=e.filter(function(a){return a.field===f});0<b.length?d=this._getMatchedDOM(g,b[0]):d.push(this._createNonHighlightedTextContentForDisplay(g));
return d},_getMatchedDOM:function(g,f){var e=this,d=[],b=void 0,a=void 0,c=0;f.matches.forEach(function(h){h.start>c&&(b=e._createNonHighlightedTextContentForDisplay(g.substring(c,h.start)),d.push(b));a=e._createHighlightedTextContentForDisplay(g.substring(h.start,h.start+h.count));a.className=h.className||f.className||"treeHighlight";d.push(a);c=h.start+h.count});g.length>c&&(b=this._createNonHighlightedTextContentForDisplay(g.substring(c,g.length)),d.push(b));return d},_createHighlightedTextContentForDisplay:function(g){var f=
document.createElement("mark");f.textContent=g;return f},_createNonHighlightedTextContentForDisplay:function(g){return document.createTextNode(g)}}})},"mw-tree/view/EditableTreeView":function(){function g(b,a){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&("object"===typeof a||"function"===typeof a)?a:b}function f(b,a){if("function"!==typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function, not "+typeof a);
b.prototype=Object.create(a&&a.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}});a&&(Object.setPrototypeOf?Object.setPrototypeOf(b,a):b.__proto__=a)}var e=function(){function b(a,c){for(var h=0;h<c.length;h++){var b=c[h];b.enumerable=b.enumerable||!1;b.configurable=!0;"value"in b&&(b.writable=!0);Object.defineProperty(a,b.key,b)}}return function(a,c,h){c&&b(a.prototype,c);h&&b(a,h);return a}}(),d=function a(c,h,d){null===c&&(c=Function.prototype);var e=Object.getOwnPropertyDescriptor(c,
h);if(void 0===e)return c=Object.getPrototypeOf(c),null===c?void 0:a(c,h,d);if("value"in e)return e.value;h=e.get;return void 0===h?void 0:h.call(d)};define(["mw-tree/utils/KeyCodeEnum","./TreeView","./EditableTreeBuilder"],function(a,c,h){return function(c){function l(a,c){var h=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};if(!(this instanceof l))throw new TypeError("Cannot call a class as a function");var d=g(this,(l.__proto__||Object.getPrototypeOf(l)).call(this,a,c,h));d.handlers.editor=
{};d.handlers.editor._editCompleteHandler=function(a){return d._handleEditComplete(a)};d.handlers.editor._editCanceledHandler=function(a){return d._handleEditCanceled(a)};d.handlers.treeNode._nodeClickHandler=function(a){return d._handleNodeClick(a)};d.handlers.treeNode._nodeMouseUpHandler=function(a){return d._handleNodeMouseUp(a)};d._mouseDownHandled={};d._clickHandled={};return d}f(l,c);e(l,[{key:"createTreeBuilder",value:function(a){return new h(this._viewModel,this.handlers,a)}},{key:"_handleNodeDoubleClick",
value:function(a){var c=this,h=a.target.attributes["data-editor"];!this._clickHandled[a.currentTarget]&&!h&&d(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"_handleNodeDoubleClick",this).call(this,a);Object.keys(this._clickHandled).forEach(function(a){c._clickHandled[a]=!1})}},{key:"_handleEditComplete",value:function(a){var c=this;this._viewEventHandler.handleEvent("treeNodeEditComplete",a,function(){c._viewModel.deleteState("treeWidth");c.render()});this._setEditState(!1)}},{key:"_handleEditCanceled",
value:function(a){var c=this;this._viewEventHandler.handleEvent("treeNodeEditCanceled",a,function(){c.render()});this._setEditState(!1)}},{key:"_setEditState",value:function(a){this._viewModel.setState("isInEditing",a)}},{key:"_handleKeyDown",value:function(c){var h=this,e=void 0,k=void 0;c.keyCode===a.ENTER?e=this._EVENTS_CONFIG.keyDownEnter:c.keyCode===a.F2?e=this._EVENTS_CONFIG.keyDownF2:(c.keyCode>=a.ALPHA_START&&c.keyCode<=a.ALPHA_END||c.keyCode>=a.NUM_START&&c.keyCode<=a.NUM_END||c.keyCode>=
a.NUMPAD_START&&c.keyCode<=a.NUMPAD_END)&&!c.metaKey&&!c.ctrlKey&&!c.altKey?(k=c.key,e=this._EVENTS_CONFIG.keyDownAlphaNum):e="";e?(k={firstChar:k,keyCode:c.keyCode,metaKey:c.metaKey,ctrlKey:c.ctrlKey,shiftKey:c.shiftKey,altKey:c.altKey},c.preventDefault(),this._viewEventHandler.handleEvent(e,k,function(){h.render()})):d(l.prototype.__proto__||Object.getPrototypeOf(l.prototype),"_handleKeyDown",this).call(this,c)}},{key:"_handleNodeMouseDown",value:function(a,c){var h=this,d=a.currentTarget.classList.contains("focused"),
e=a.target.attributes["data-region"],d=this._EVENTS_CONFIG.nodeMouseDownFocused&&d&&e,e=a.currentTarget.attributes["data-row-index"].nodeValue,e={node:this._data(parseInt(e))(0).value,metaKey:a.metaKey,ctrlKey:a.ctrlKey,shiftKey:a.shiftKey,nodeIndex:parseInt(e)};d||(this._viewEventHandler.handleEvent(c,e,function(){h.render()}),this._mouseDownHandled[a.currentTarget]={target:a.target})}},{key:"_handleNodeMouseUp",value:function(a,c){var h=this._mouseDownHandled[a.currentTarget];h&&h.target!==a.target&&
(this._mouseDownHandled[a.currentTarget]=null)}},{key:"_handleNodeClick",value:function(a){var c=this,h=this._EVENTS_CONFIG.nodeMouseDownFocused,d=a.currentTarget.classList.contains("focused"),e=a.target.attributes["data-region"],k=!this._viewModel.getStateByKey("dndEnds")||this._viewModel.getStateByKey("dndEnds")&&!this._viewModel.getStateByKey("dndEnds").value[a.target];if(h&&d&&e&&!this._mouseDownHandled[a.currentTarget]&&k){a.preventDefault();d=a.currentTarget.attributes["data-row-index"].nodeValue;
d={node:this._data(parseInt(d))(0).value,altKey:a.altKey,metaKey:a.metaKey,ctrlKey:a.ctrlKey,shiftKey:a.shiftKey,nodeIndex:parseInt(d)};if(!this._viewModel.getStateByKey("isInDragging")||!this._viewModel.getStateByKey("isInDragging").value)this._viewEventHandler.handleEvent(h,d,function(){c.render()}),this._setEditState(!0);this._clickHandled[a.currentTarget]=!0}Object.keys(this._mouseDownHandled).forEach(function(a){c._mouseDownHandled[a]=null});this._viewModel.getStateByKey("dndEnds")&&this._viewModel.setState("dndEnds",
{})}}]);return l}(c)})},"mw-tree/view/EditableTreeBuilder":function(){function g(d,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}var f=function(){function d(b,a){for(var c=0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=
!0;"value"in h&&(h.writable=!0);Object.defineProperty(b,h.key,h)}}return function(b,a,c){a&&d(b.prototype,a);c&&d(b,c);return b}}(),e=function b(a,c,h){null===a&&(a=Function.prototype);var e=Object.getOwnPropertyDescriptor(a,c);if(void 0===e)return a=Object.getPrototypeOf(a),null===a?void 0:b(a,c,h);if("value"in e)return e.value;c=e.get;return void 0===c?void 0:c.call(h)};define(["./TreeBuilder","./TreeEditor","react/react.min"],function(b,a,c){return function(h){function b(a,c){var h=2<arguments.length&&
void 0!==arguments[2]?arguments[2]:{};if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");var e;e=(b.__proto__||Object.getPrototypeOf(b)).call(this,a,c,h);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");e=e&&("object"===typeof e||"function"===typeof e)?e:this;e._editor={type:h.editor.type,config:h.editor.config};return e}g(b,h);f(b,[{key:"_getUpdatedTreeProps",value:function(){var a=e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),
"_getUpdatedTreeProps",this).call(this),c=this._viewModel.getStateByKey("ActiveEditNode");a.activeEditNode=c?c.value:null;return a}},{key:"buildContentNode",value:function(a,c){var h={content:null,additionalDataAttributes:{}},b=c.activeEditNode&&c.activeEditNode.node.id===a.value.id;this._editor.type&&b?(h.content=this.buildEditor(a,c.activeEditNode.parentNode,c.activeEditNode.firstChar,c.nodeIndentation),h.additionalDataAttributes={"data-edit-mode":!0}):h.content=this.buildRenderer(a);return h}},
{key:"buildEditor",value:function(h,b,e,k){return c.createElement(a,{editor:this._editor,maxWidth:this._viewModel.viewPort.size.width+this._viewModel.viewPort.size.left-k,editCompleteHandler:this.handlers.editor._editCompleteHandler,editCancelledHandler:this.handlers.editor._editCanceledHandler,parentNode:b,firstChar:e,node:h})}}]);return b}(b)})},"mw-tree/view/TreeEditor":function(){function g(e,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+
typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["react/react.min"],function(e){return function(d){function b(){if(!(this instanceof
b))throw new TypeError("Cannot call a class as a function");var a=(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&("object"===typeof a||"function"===typeof a)?a:this}g(b,d);f(b,[{key:"componentDidMount",value:function(){var a=this,c=this.props,h=c.editor,c=c.node,b={firstChar:this.props.firstChar,height:this._editorContainer.clientHeight},d;for(d in h.config)h.config.hasOwnProperty(d)&&
(b[d]=h.config[d]);this._editorInstance=new h.type(c.value.data,b);this._editorInstance.on("editComplete",function(c){a._editCompleted(c)});this._editorInstance.on("editCanceled",function(c){a._editCanceled(c)});this._mountEditor()}},{key:"_refocusToPreviousNode",value:function(){this._previousActiveNode&&this._previousActiveNode.focus()}},{key:"_editCanceled",value:function(a){this._unMountEditor();this.props.editCancelledHandler({node:this.props.node,oldValue:a.oldValue,newValue:a.newValue,validationResult:a.validationResult});
this._refocusToPreviousNode()}},{key:"_editCompleted",value:function(a){this._unMountEditor();this.props.editCompleteHandler({node:this.props.node,parentNode:this.props.parentNode,oldValue:a.oldValue,newValue:a.newValue,hasValueChanged:a.hasValueChanged});this._refocusToPreviousNode()}},{key:"_mountEditor",value:function(){this._editorContainer.appendChild(this._editorInstance.getDomNode());this._previousActiveNode=document.activeElement;this._editorInstance.setFocus()}},{key:"_unMountEditor",value:function(){this._editorInstance.destroy();
this._editorInstance=null}},{key:"componentWillUnmount",value:function(){this._editorInstance&&(this._editorInstance.commitValue?this._editorInstance.commitValue():this._editCompleted({oldValue:this.props.node.value.data,newValue:this.props.node.value.data,hasValueChanged:!1}))}},{key:"render",value:function(){var a=this;return e.createElement("div",{ref:function(c){return a._editorContainer=c},className:"mw-treeNode-editor-container",style:{maxWidth:this.props.maxWidth+"px"}})}}]);return b}(e.Component)})},
"mw-tree/controller/edit/EditController":function(){function g(d,b){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"===typeof b||"function"===typeof b)?b:d}function f(d,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,
b):d.__proto__=b)}var e=function(){function d(b,a){for(var c=0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=!0;"value"in h&&(h.writable=!0);Object.defineProperty(b,h.key,h)}}return function(b,a,c){a&&d(b.prototype,a);c&&d(b,c);return b}}();define(["dojo/Deferred","mw-tree/utils/EventEmitter"],function(d,b){return function(a){function c(a,b,d){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var e=g(this,(c.__proto__||Object.getPrototypeOf(c)).call(this));
e._view=a;e._viewModel=b;e._dataStore=d;e._view.registerEventCallback({treeNodeEditMouseEvent:function(a){return e._handleFocusedNodeClick(a)},treeNodeEditKeyPress:function(a){return e._handleEnterKeyPress(a)},treeNodeEditComplete:function(a){return e._handleEditComplete(a)},treeNodeEditCanceled:function(a){return e._handleEditCanceled(a)}},!0);return e}f(c,a);e(c,[{key:"_enterEditMode",value:function(a){var c=this,b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return this._dataStore.getParentNode(a).then(function(d){c._viewModel.setState("ActiveEditNode",
{node:a,parentNode:d?d.node:{id:null},firstChar:b.firstChar})})}},{key:"_exitEditMode",value:function(){this._viewModel.deleteState("ActiveEditNode")}},{key:"_handleEnterKeyPress",value:function(a){var c=this,b=new d,e=this._viewModel.getStateByKey("keyboardActive");e.value&&this._dataStore.getNode(e.value).then(function(d){d?c._enterEditMode(e.value,{firstChar:a.firstChar}).then(function(){b.resolve()}):b.resolve()});return b.promise}},{key:"_handleFocusedNodeClick",value:function(a){return this._enterEditMode(a.node)}},
{key:"_handleEditComplete",value:function(a){this._exitEditMode();a.hasValueChanged&&(this._dataStore.update(a.parentNode,a.node.value,a.newValue),this.emit("editCompleted",{nodeId:a.node.value.id,oldValue:a.oldValue,newValue:a.newValue}))}},{key:"_handleEditCanceled",value:function(a){this._exitEditMode();var c=[];a.validationResult&&c.push(a.validationResult);this.emit("editCanceled",{nodeId:a.node.value.id,oldValue:a.oldValue,newValue:a.newValue,validationResults:c})}},{key:"emits",get:function(){return["editCompleted",
"editCanceled"]}}]);return c}(b)})},"mw-tree/controller/TreeNodeController":function(){function g(d,b){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"===typeof b||"function"===typeof b)?b:d}function f(d,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}});
b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}var e=function(){function d(b,a){for(var c=0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=!0;"value"in h&&(h.writable=!0);Object.defineProperty(b,h.key,h)}}return function(b,a,c){a&&d(b.prototype,a);c&&d(b,c);return b}}();define(["dojo/Deferred","mw-tree/utils/EventEmitter","mw-tree/utils/KeyCodeEnum","mw-tree/controller/navigation/KeyController"],function(d,b,a,c){var h=["expanded","collapsed"];return function(a){function b(a,
h,d){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");var e=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));e._view=a;e._viewModel=h;e._dataStore=d;e._treeNavHandler=new c(e._viewModel,e._dataStore);e._treeNavHandler.emits.forEach(function(a){e._treeNavHandler.on(a,function(c){return e.emit(a,c)})});e._view.registerEventCallback({treeDisclosureMouseDown:function(a){return e._disclosureClickHandler(a)},treeNodeMouseDown:function(a){return e._nodeClickHandler(a)},
treeContextMenuSelection:function(a){a.node&&e._nodeClickHandler(a)},treeExpandCollapse:function(a){return e._disclosureClickHandler(a)},treeNavigation:function(a){return e._nodeKeyPressHandler(a)}},!0);return e}f(b,a);e(b,[{key:"_expandNode",value:function(a){var c=this;!a.isExpanded&&a.isExpandable&&this._dataStore.expand([a]).then(function(){c.emit("expanded",{nodeId:a.id})})}},{key:"_collapseNode",value:function(a){var c=this;a.isExpanded&&a.isExpandable&&this._dataStore.collapse([a]).then(function(){c.emit("collapsed",
{nodeId:a.id})})}},{key:"_nodeClickHandler",value:function(a){var c=a.ctrlKey||a.metaKey;a.altKey||c&&a.shiftKey||(this._viewModel.deleteState("potentialNextKeyboardActiveNode"),this._viewModel.setState("keyboardActive",a.node),this._viewModel.setState("keyboardActiveIndex",a.nodeIndex))}},{key:"_updatePotentialKeyboardActiveNode",value:function(a){var c=this,h=this._viewModel.getStateByKey("potentialNextKeyboardActiveNode");h?(h=h.value,this._dataStore.getNode(h).then(function(h){h||c._viewModel.setState("potentialNextKeyboardActiveNode",
a)})):this._viewModel.setState("potentialNextKeyboardActiveNode",a)}},{key:"_disclosureClickHandler",value:function(a){var c=this;a.node.isExpanded?this._collapseNode(a.node):this._expandNode(a.node);var h=this._viewModel.getStateByKey("keyboardActive");h&&h.value&&(h=h.value,this._dataStore.getNode(h).then(function(h){h||c._updatePotentialKeyboardActiveNode(a.node)}))}},{key:"_nodeKeyPressHandler",value:function(a){return this._treeNavHandler.handleKeyEvent(a)}},{key:"destroy",value:function(){}},
{key:"emits",get:function(){return h}}]);return b}(b)})},"mw-tree/controller/navigation/KeyController":function(){function g(e,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];
c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define("dojo/Deferred dojo/when mw-tree/utils/TreeUtils mw-tree/utils/KeyCodeEnum mw-tree/utils/EventEmitter mw-tree/controller/navigation/TreeNodeKeyNavigation mw-tree/controller/navigation/ActiveNodeHandler mw-tree/utils/ViewStateEnums".split(" "),function(e,d,b,a,c,h,k,l){return function(c){function b(a,c){if(!(this instanceof
b))throw new TypeError("Cannot call a class as a function");var h;h=(b.__proto__||Object.getPrototypeOf(b)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");h=h&&("object"===typeof h||"function"===typeof h)?h:this;h._viewModel=a;h._dataStore=c;h._initializeKeyNavigationAndActiveNode();return h}g(b,c);f(b,[{key:"_initializeKeyNavigationAndActiveNode",value:function(){var a=this;this._keyNavigation=new h({expandHandler:function(c){return a._expandNode(c)},
collapseHandler:function(c){return a._collapseNode(c)}});this._activeNodeHandler=new k({viewModel:this._viewModel,treeNodeHandler:function(c){return a._getViewIndexOfNode(c)}})}},{key:"_expandNode",value:function(a){var c=this;!a.isExpanded&&a.isExpandable&&this._dataStore.expand([a]).then(function(){c.emit("expanded",{nodeId:a.id})})}},{key:"_collapseNode",value:function(a){var c=this;a.isExpanded&&a.isExpandable&&this._dataStore.collapse([a]).then(function(){c.emit("collapsed",{nodeId:a.id})})}},
{key:"_getParentNode",value:function(a){return this._dataStore.getParentNode(a)}},{key:"_getViewIndexOfNode",value:function(a){return this._dataStore.getNode(a)}},{key:"_getKeyboardEvent",value:function(a){a={keyCode:a.keyCode};a.currentDataSize=this._viewModel.dataSize.rows;a.currentViewPort=this._viewModel.viewPort.rangeList[0].rows;return a}},{key:"_isKeyCodeValid",value:function(c){var h=c.ctrlKey||c.metaKey,b=c.shiftKey,d=!(c.altKey||h&&b)&&this._keyNavigation.getKeyCommand(c.keyCode);return h?
d:b?c.keyCode!==a.ARROW_LEFT&&c.keyCode!==a.ARROW_RIGHT:d}},{key:"handleKeyEvent",value:function(a){var c=this;if(this._isKeyCodeValid(a)){var h=new e,b=this._getKeyboardEvent(a);this._activeNodeHandler.getActiveNodeInfo(b).then(function(a){d(c._processKeyEvt(b,a)).then(function(a){a?d(c._activeNodeHandler.setActiveNode({index:0<=a.index?a.index:a.keyboardActiveIndex,activeNode:a.keyboardActiveNode||a.node},0<=a.firstVisibleIndex?a.firstVisibleIndex:a.index),function(){return h.resolve()}):h.resolve()})});
return h}}},{key:"_processKeyEvt",value:function(a,c){var h=c.isPotentialActiveNode||c.isDefaultInitialIndex;a.currentKeyboardActiveNode=c.node;a.currentKeyboardActiveIndex=c.index;return h?this._processNoActiveNodeInView(a):d(this._processExistingActiveIndex(a))}},{key:"_processNoActiveNodeInView",value:function(c){var h=void 0;switch(c.keyCode){case a.PAGE_UP:case a.PAGE_DOWN:case a.HOME:case a.END:h=this._keyNavigation.getKeyCommand(c.keyCode)(c);break;default:h={firstVisibleIndex:c.currentKeyboardActiveIndex,
keyboardActiveIndex:c.currentKeyboardActiveIndex}}return h}},{key:"_processExistingActiveIndex",value:function(a){a=this._keyNavigation.getKeyCommand(a.keyCode)(a);return a.parentIsNewKeyboardActiveNode?this._getParentNode(a.keyboardActiveNode):a}},{key:"emits",get:function(){return["expanded","collapsed"]}}]);return b}(c)})},"mw-tree/controller/navigation/TreeNodeKeyNavigation":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=
!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["mw-tree/utils/KeyCodeEnum"],function(f){return function(){function e(d){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this._constructCommands();this._expandNode=d.expandHandler;this._collapseNode=d.collapseHandler}g(e,[{key:"_constructCommands",value:function(){var d=this;this.keyCommands={};this.keyCommands[f.HOME]=function(b){return d._handleHome(b)};
this.keyCommands[f.END]=function(b){return d._handleEnd(b)};this.keyCommands[f.PAGE_UP]=function(b){return d._handlePageUp(b)};this.keyCommands[f.PAGE_DOWN]=function(b){return d._handlePageDown(b)};this.keyCommands[f.ARROW_UP]=function(b){return d._handleArrowUp(b)};this.keyCommands[f.ARROW_DOWN]=function(b){return d._handleArrowDown(b)};this.keyCommands[f.ARROW_LEFT]=function(b){return d._handleArrowLeft(b)};this.keyCommands[f.ARROW_RIGHT]=function(b){return d._handleArrowRight(b)};this.keyCommands[f.SPACE]=
function(b){return d._handleSpace(b)}}},{key:"getKeyCommand",value:function(d){return this.keyCommands[d]}},{key:"_handleSpace",value:function(d){var b=d.currentKeyboardActiveIndex;d.currentViewPort.start<=d.currentKeyboardActiveIndex&&d.currentViewPort.end>=d.currentKeyboardActiveIndex&&(b=d.currentViewPort.start);return{firstVisibleIndex:b,keyboardActiveIndex:d.currentKeyboardActiveIndex}}},{key:"_handleHome",value:function(d){return{firstVisibleIndex:d.currentDataSize.start,keyboardActiveIndex:d.currentDataSize.start}}},
{key:"_handleEnd",value:function(d){var b=d.currentDataSize.end;return{keyboardActiveIndex:b,firstVisibleIndex:Math.max(d.currentDataSize.start,b-(d.currentViewPort.count-1))}}},{key:"_getFirstVisibleIndexForPaging",value:function(d,b,a,c){var h=void 0;return h=d.start<=a&&a<=d.end?Math.max(c-(a-d.start),b):c}},{key:"_handlePageUp",value:function(d){var b=Math.max(d.currentKeyboardActiveIndex-d.currentViewPort.count,d.currentDataSize.start);return{keyboardActiveIndex:b,firstVisibleIndex:this._getFirstVisibleIndexForPaging(d.currentViewPort,
d.currentDataSize.start,d.currentKeyboardActiveIndex,b)}}},{key:"_handlePageDown",value:function(d){var b=Math.min(d.currentKeyboardActiveIndex+d.currentViewPort.count,d.currentDataSize.end);return{keyboardActiveIndex:b,firstVisibleIndex:this._getFirstVisibleIndexForPaging(d.currentViewPort,d.currentDataSize.start,d.currentKeyboardActiveIndex,b)}}},{key:"_handleArrowDown",value:function(d){var b=Math.min(d.currentKeyboardActiveIndex+1,d.currentDataSize.end);d=Math.max(d.currentDataSize.start,b-d.currentViewPort.count+
1);return{keyboardActiveIndex:b,firstVisibleIndex:d}}},{key:"_handleArrowUp",value:function(d){var b=Math.max(d.currentKeyboardActiveIndex-1,d.currentDataSize.start),a=b;d.currentViewPort.start<=b&&d.currentViewPort.end>=b&&(a=d.currentViewPort.start);return{keyboardActiveIndex:b,firstVisibleIndex:a}}},{key:"_handleArrowRight",value:function(d){if(d.currentKeyboardActiveNode.isExpanded&&d.currentKeyboardActiveNode.isExpandable)return this._handleArrowDown(d);this._expandNode(d.currentKeyboardActiveNode);
return{keyboardActiveIndex:d.currentKeyboardActiveIndex,firstVisibleIndex:d.currentKeyboardActiveIndex}}},{key:"_handleArrowLeft",value:function(d){var b=!d.currentKeyboardActiveNode.isExpandable;if(d.currentKeyboardActiveNode.isExpandable&&!d.currentKeyboardActiveNode.isExpanded||b)return{keyboardActiveNode:d.currentKeyboardActiveNode,parentIsNewKeyboardActiveNode:!0};this._collapseNode(d.currentKeyboardActiveNode);return{keyboardActiveIndex:d.currentKeyboardActiveIndex,firstVisibleIndex:d.currentKeyboardActiveIndex}}}]);
return e}()})},"mw-tree/controller/navigation/ActiveNodeHandler":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["dojo/Deferred","dojo/when","mw-tree/utils/ViewStateEnums","mw-tree/utils/TreeUtils"],function(f,e,d,b){return function(){function a(c){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");
this._viewModel=c.viewModel;this._getViewIndexOfNode=c.treeNodeHandler}g(a,[{key:"getActiveNodeInfo",value:function(a){var h=this,b=new f;this._getInitialActiveNodeIndex(a,d.ACTIVE_NODE).then(function(a){return a?(b.resolve(a),!0):!1}).then(function(e){e||h._getInitialActiveNodeIndex(a,d.POTENTIAL_ACTIVE_NODE).then(function(a){a.isPotentialActiveNode=a.isDefaultInitialIndex?!1:!0;b.resolve(a)})});return b}},{key:"_getInitialActiveNodeIndex",value:function(a,h){var b=this._viewModel.getStateByKey(h),
d=void 0;b&&b.value?(b=b.value,d=this._getViewIndexOfNode(b)):d={isDefaultInitialIndex:!0,index:a.currentDataSize.start};return e(d)}},{key:"_getViewportEnd",value:function(a,h,b){return Math.max(0,Math.min(a+h-1,b))}},{key:"_boundedScrollTo",value:function(a){var h=void 0;return h=Math.max(Math.min(a,this._viewModel.dataSize.rows.end-this._viewModel.viewPort.rangeList[0].rows.count+1),0)}},{key:"_isActiveIndexInViewPort",value:function(a){var h=this._viewModel.viewPort;return a>=h.rangeList[0].rows.start&&
a<=h.rangeList[0].rows.end}},{key:"_getNodeInfoFromViewPort",value:function(a){var h=this._viewModel.getStateByKey("currentViewPortData").value;return h(a)(0).value}},{key:"_updateViewPort",value:function(a,h){var d=this,e=this._boundedScrollTo(h);b.updateViewPort(this._viewModel,e);if(b.isViewPortRangeInDataBuffer(this._viewModel))this._updateActiveNodeInViewModel(a,!0);else{var m=new f,g=this._viewModel.on("currentViewPortData",function(){g.remove();d._updateActiveNodeInViewModel(a,!0);m.resolve()});
b.updateDataBuffer(this._viewModel);return m.promise}}},{key:"_updateActiveNodeInViewModel",value:function(a,h){var b=this._getNodeInfoFromViewPort(a);this._viewModel.setState("keyboardActive",b);this._viewModel.setState("keyboardActiveIndex",a);h&&this._viewModel.setState("shouldScroll",!0);this._viewModel.deleteState("potentialNextKeyboardActiveNode")}},{key:"setActiveNode",value:function(a,h){this._viewModel.setState("scrollTopCalc",b.dynamicScrollTopCalculator(a.index,this._viewModel));this._isActiveIndexInViewPort(a.index)?
this._updateActiveNodeInViewModel(a.index):this._updateViewPort(a.index,h)}}]);return a}()})},"mw-tree/utils/ViewStateEnums":function(){define([],function(){return Object.freeze({ACTIVE_NODE:"keyboardActive",POTENTIAL_ACTIVE_NODE:"potentialNextKeyboardActiveNode"})})},"mw-tree/controller/scrolling/ScrollController":function(){function g(d,b){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"===typeof b||"function"===typeof b)?b:d}function f(d,
b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}var e=function(){function d(b,a){for(var c=0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=!0;"value"in h&&(h.writable=!0);Object.defineProperty(b,h.key,h)}}return function(b,
a,c){a&&d(b.prototype,a);c&&d(b,c);return b}}();define(["dojo/Deferred","mw-tree-data-model/rangeUtil","mw-tree/utils/EventEmitter","mw-tree/utils/TreeUtils"],function(d,b,a,c){return function(a){function b(a,c,h){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");var d=g(this,(b.__proto__||Object.getPrototypeOf(b)).call(this));d._view=a;d._viewModel=c;d._dataStore=h;d._view.registerEventCallback({treeScroll:function(a){return d._handleScroll(a)},treeProgrammaticScroll:function(a){return d._handleProgrammaticScroll(a)}},
!0);return d}f(b,a);e(b,[{key:"_scrollToIndex",value:function(a){var h=this._viewModel.getStateByKey("nodeHeightInPx").value,b=Math.min(a,Math.max(0,this._viewModel.dataSize.rows.end-(this._viewModel.viewPort.rangeList[0].rows.count-1)));this._viewModel.viewPort.size.top=b*h;this._viewModel.setState("scrollTopCalc",c.dynamicScrollTopCalculator(a,this._viewModel));c.calculateAndUpdateViewPort(this._viewModel,this._viewModel.viewPort.size)}},{key:"_scrollToNode",value:function(a){var c=this;return this._dataStore.expandTo(a).then(function(a){a&&
c._scrollToIndex(a.index)})}},{key:"_handleProgrammaticScroll",value:function(a){return a.node?this._scrollToNode(a.node):this._scrollToIndex(a.nodeIndex)}},{key:"_handleScroll",value:function(a){this._handleUpdateViewPort(a)}},{key:"_handleUpdateViewPort",value:function(a){c.calculateAndUpdateViewPort(this._viewModel,{left:a.left,top:a.top,width:a.width,height:a.height})}},{key:"destroy",value:function(){}}]);return b}(a)})},"mw-tree-data-model/DataModel":function(){var g=function(){function f(e,
d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["./On","./rangeUtil"],function(f,e){return function(){function d(b){var a=this;if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");this._on=new f;this._dataStore=b;this._pagedRangeList=[];this._pagedData=[];this._dataStore.on("dataChanged",this._reactToNewData.bind(this));
this._dataStore.on("dataSizeChanged",function(c){return a._on.emit(c.eventName,c)})}g(d,[{key:"managePaging",value:function(b){var a=this._pagedRangeList;this._dataStore.managePaging(b);this._pagedRangeList=b.slice();this._updateViewBufferSizes(a,this._pagedRangeList);this._reactToNewBufferSize()}},{key:"_updateViewBufferSizes",value:function(b,a){var c=this;this._pagedData.length>a.length&&(this._pagedData=this._pagedData.slice(0,a.length));var h=function(a,c,h,b,d){for(;a<h;)d(a),a+=1;for(a=b+1;a<=
c;)d(a),a+=1};a.forEach(function(a,d){var e=b[d];e?(h(e.rows.start,e.rows.end,a.rows.start,a.rows.end,function(a){delete c._pagedData[d][a]}),(e.columns.start<a.columns.start||e.columns.end>a.columns.end)&&function(){for(var b=Math.max(a.rows.start,e.rows.start),f=Math.min(a.rows.end,e.rows.end),g=b;g<=f;)h(e.columns.start,e.columns.end,a.columns.start,a.columns.end,function(a){delete c._pagedData[d][g][a]}),g+=1}()):c._pagedData[d]=[]})}},{key:"_reactToNewBufferSize",value:function(){var b=this;
this._pagedRangeList.forEach(function(a,c){var h=b._pagedData[c];if(!h.range||!e.isRangeEqual(h.range,a))h.range&&e.isRangeInside(h.range,a)?h.range=a:(h=b._updateCellRange(h,a.rows.start,a.rows.end,a.columns.start,a.columns.end,!h.range||a.columns.start<h.range.columns.start||a.columns.end>h.range.columns.end,!0),h.range=a,b._pagedData[c]=h)});this._emitPagedDataChanged()}},{key:"_emitPagedDataChanged",value:function(){this._on.emit("pagedDataChanged",{pagedData:this._pagedData})}},{key:"_updateCellRange",
value:function(b,a,c,h,d,e,f){for(;a<=c;a+=1){var g=b[a];if(e||!g){var n=[];if(g){for(var q=b.range.columns.start;q<h;q+=1)n[q]=b[a][q];for(q=d+1;q<=b.range.columns.end;q+=1)n[q]=b[a][q]}for(q=h;q<=d;q+=1)if(f&&g&&b.range.columns.start<=q&&b.range.columns.end>=q)n[q]=b[a][q];else{var r=this._dataStore.getLocalCellData(a,q);n[q]=this._shallowCopyIfObject(r)}b[a]=n}}return b}},{key:"_shallowCopyIfObject",value:function(b){if(!(b instanceof Object))return b;var a={};Object.keys(b).forEach(function(c){a[c]=
b[c]});return a}},{key:"_reactToNewData",value:function(b){var a=this,c=!1,h=b.rangeList;this._pagedRangeList.forEach(function(b,d){h.forEach(function(h){if(e.doesRangeIntersect(b,h)){var f=a._pagedData[d],g=Math.max(b.rows.start,h.rows.start),q=Math.min(b.rows.end,h.rows.end),r=Math.max(b.columns.start,h.columns.start);h=Math.min(b.columns.end,h.columns.end);f=a._updateCellRange(f,g,q,r,h,!0,!1);a._pagedData[d]=f;c=!0}})});c&&this._emitPagedDataChanged()}},{key:"on",value:function(b,a){return this._on.on(b,
a)}},{key:"dataSize",get:function(){return this._dataStore.dataSize}}]);return d}()})},"mw-tree/viewModel/ViewModel":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["./LinkedList","./DataMapper","mw-tree-data-model/rangeUtil"],function(f,e,d){return function(){function b(a){if(!(this instanceof
b))throw new TypeError("Cannot call a class as a function");this._stateCategoryIndex={};this._stateRangeIndex=new f;this._events={};this._dataMapper=new e;this._dataModel=a;this._viewColumnRange=a.dataSize.columns;this.setColumnHeaders([]);this._dataModel.on("pagedDataChanged",this._handlePagedDataChanged.bind(this));this._dataModel.on("dataSizeChanged",this._emitDataSizeChanged.bind(this));this.setState("headers",{},[])}g(b,[{key:"_emitDataSizeChanged",value:function(){this._emit("dataSizeChanged",
{dataSize:this.dataSize})}},{key:"_handlePagedDataChanged",value:function(a){a=a.pagedData;var c=this.getStateByKey("viewBuffer");c&&(a=this._dataMapper.modelToViewDataMapping(a,c.rangeList),this._emit("viewDataChanged",{viewData:a}))}},{key:"setColumnHeaders",value:function(a){if(!a||0===a.length)this._dataMapper.viewColumnIndexToDataIndex=[],this._viewColumnRange=this._dataModel.dataSize.columns,a=[d.range().setColumns(0,-1).setRows(0,Infinity)],this.setState("columnHeaders",[],a),this._emitDataSizeChanged();
else{var c=[d.range().setColumns(0,a.length-1).setRows(0,Infinity)];this._viewColumnRange=c[0].columns;this._dataMapper.viewColumnIndexToDataIndex=a.map(function(a){return a.dataIndex});this.setState("columnHeaders",a,c)}}},{key:"getColumnHeaders",value:function(){return this.getStateByKey("columnHeaders").value}},{key:"setState",value:function(a,c){var h=this,b=2<arguments.length&&void 0!==arguments[2]?arguments[2]:[];if(0<=["all","keys"].indexOf(a))throw Error("The key '"+a+"' is reserved, and cannot be used to setState");
var b=b.slice(),d={value:c,rangeList:b,pointerList:[]};this._deleteState(a);this._stateCategoryIndex[a]=d;b.forEach(function(c){c=h._stateRangeIndex.insert(c,a);d.pointerList.push(c)});this._emit(a,this.getStateByKey(a))}},{key:"deleteState",value:function(a){this._deleteState(a);this._emit(a)}},{key:"_deleteState",value:function(a){var c=this;if(this._stateCategoryIndex[a]){var h=this._stateCategoryIndex[a];delete this._stateCategoryIndex[a];h.pointerList.forEach(function(a){c._stateRangeIndex.remove(a)})}}},
{key:"getStateByKey",value:function(a){return(a=this._stateCategoryIndex[a])?{value:a.value,rangeList:a.rangeList.slice()}:null}},{key:"getStateByRangeList",value:function(a){var c=this,h={keys:[]};a.forEach(function(a){c._stateRangeIndex.forEach(function(b){var e=b.key;b=b.value;!h[b]&&d.doesRangeIntersect(a,e)&&(h[b]=c.getStateByKey(b),h[b].firstMatch=e,h.keys.push(b))})});return h}},{key:"on",value:function(a,c){var h=this;this._events[a]||(this._events[a]=[]);this._events[a].push(c);var b={remove:function(){var d=
h._events[a].indexOf(c);h._events[a].splice(d,1);b.remove=function(){return null}}};return b}},{key:"_emit",value:function(a){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},h=this._events.all,b=this._events[a],d=Object.getOwnPropertyNames(c),e={};e.eventName=a;d.forEach(function(a){e[a]=c[a]});d=function(a){a&&a.forEach(function(a){a(e)})};d(b);d(h)}},{key:"viewBuffer",set:function(a){var c=a.size;a=a.rangeList.slice();var h=this._dataMapper.viewToModelRangeMapping(a);this.setState("viewBuffer",
c,a);this._dataModel.managePaging(h)},get:function(){var a=this.getStateByKey("viewBuffer");return{size:a.value,rangeList:a.rangeList}}},{key:"viewPort",set:function(a){this.setState("viewPort",a.size,a.rangeList)},get:function(){var a=this.getStateByKey("viewPort");return{size:a.value,rangeList:a.rangeList}}},{key:"dataSize",get:function(){var a=d.range(),a=a.setColumns(this._viewColumnRange.start,this._viewColumnRange.end);return a=a.setRows(this._dataModel.dataSize.rows.start,this._dataModel.dataSize.rows.end)}}]);
return b}()})},"mw-tree/viewModel/LinkedList":function(){function g(e,d){if(!(e instanceof d))throw new TypeError("Cannot call a class as a function");}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define([],function(){var e=function(){function d(b,a){g(this,d);this._prev=this._next=null;this._value=
a;this._key=b}f(d,[{key:"next",get:function(){return this._next},set:function(b){this._next=b}},{key:"prev",get:function(){return this._prev},set:function(b){this._prev=b}},{key:"isLast",get:function(){return null===this._next}},{key:"isFirst",get:function(){return null===this._prev}},{key:"key",get:function(){return this._key}},{key:"value",get:function(){return this._value}}]);return d}();return function(){function d(){g(this,d);this._root=null}f(d,[{key:"insert",value:function(b,a){var c=new e(b,
a);null!==this._root&&(this._root.prev=c,c.next=this._root);return this._root=c}},{key:"find",value:function(b){if(null===this._root)return null;for(var a=this._root;a;){if(a.key===b)return a;a=a.next}return null}},{key:"forEach",value:function(b){if(null!==this._root)for(var a=this._root;a;)b(a),a=a.next}},{key:"removeWithKey",value:function(b){b=this.find(b);this.remove(b)}},{key:"remove",value:function(b){b&&(b.isFirst?(this._root=b.next,this.root&&!this.root.isLast&&(b.next.prev=null)):b.isLast?
b.prev.next=null:(b.prev.next=b.next,b.next.prev=b.prev))}},{key:"root",get:function(){return this._root}}]);return d}()})},"mw-tree/viewModel/DataMapper":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["./Row","mw-tree-data-model/rangeUtil"],function(f,e){var d=function(a,h){var b=
[],d=[];if(0===h.length)d=a.slice(0);else{a.forEach(function(a){if(a.start>=h.length||a.end>=h.length)throw Error("RangeIndex exceeds dataIndexMap size");a=h.slice(a.start,a.end+1);b=b.concat(a)});if(0===b.length)return[];b.sort(function(a,c){return a-c});var e={start:b[0],end:b[0]};d.push(e);for(var f=1;f<b.length;f+=1){var g=b[f];e.end+1===g||e.end===g?e.end=g:(e={start:g,end:g},d.push(e))}}return d},b=function(a,h){var b=[],f=a.map(function(a){return a.columns}),f=d(f,h);return b=b.concat(f.map(function(h){return e.range().setColumns(h.start,
h.end).setRows(a[0].rows.start,a[0].rows.end)}))},a=function(a,h,d){var f=[];b([a],d).forEach(function(a){for(var c=!1,b=0;b<h.length;b+=1)if(e.isRangeInside(a,h[b])){c=!0;f.push(b);break}if(!c)throw Error("Data Range to view range mapping not found");});return f};return function(){function c(){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");this._viewColumnIndexToDataIndex=[]}g(c,[{key:"viewToModelRangeMapping",value:function(a){var c=this,d=[];e.groupRangeListByRow(a).forEach(function(a){a=
b(a,c.viewColumnIndexToDataIndex);d=d.concat(a)});return d}},{key:"modelToViewDataMapping",value:function(h,b){var d=this,e=[],f=h.map(function(a){return a.range});b.forEach(function(b,k){var g=void 0,g=a(b,f,d.viewColumnIndexToDataIndex);g.sort(function(a,c){return h[a].range.columns.start-h[c].range.columns.start});var s=[];e[k]=function(a){if(a<s.length)return s[a];throw Error("No Data Found for rowIndex: "+a);};e[k].range=b;for(var t=b.rows.start;t<=b.rows.end;t+=1){var u=c._createRow(t,g,h,d.viewColumnIndexToDataIndex);
s[t]=u}});return e}},{key:"viewColumnIndexToDataIndex",set:function(a){this._viewColumnIndexToDataIndex=a},get:function(){return this._viewColumnIndexToDataIndex}}],[{key:"_createRow",value:function(a,c,b,d){c=c.map(function(c){c=b[c];return{start:c.range.columns.start,end:c.range.columns.end,cells:c[a]}});return f(c,d)}}]);return c}()})},"mw-tree/viewModel/Row":function(){define([],function(){return function(g,f){if(0>g.length)throw Error("No rowData Present");var e=function b(a){var c=void 0,c=
0===f.length?a:f[a],h=b._lastAccessRowDataIndex;do{if(c>=g[h].start&&c<=g[h].end)return{value:g[h].cells[c],isEqual:function(a){return a.value===this.value}};h+=1;h%=g.length}while(h!==b._lastAccessRowDataIndex);throw Error("No Data Found for cellIndex: "+a);};e._lastAccessRowDataIndex=0;e._rowData=g;e._dataIndexMap=f;e.isEqual=function(b){if(b._rowData.length!==g.length||f!==b._dataIndexMap)return!1;for(b=0;b<=g.length;b+=1)if(e._rowData[b].data!==g[b].data)return!1;return!0};return e}})},"mw-tree/editors/EditorEnum":function(){define(["mw-tree/editors/IconLabelEditor",
"mw-tree/editors/DesignTimeEditor"],function(g,f){return Object.freeze({DefaultEditor:g,DesignTimeEditor:f})})},"mw-tree/editors/IconLabelEditor":function(){function g(e,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}var f=function(){function e(d,
b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["mw-tree/utils/EventEmitter","mw-tree/editors/EditorDecorator"],function(e,d){return function(b){function a(c,h){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");var b;b=(a.__proto__||Object.getPrototypeOf(a)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
b=b&&("object"===typeof b||"function"===typeof b)?b:this;c=c||{};b._config=h;b._oldValue=d._shallowCloneObject(c);b._newValue=d._shallowCloneObject(c);b._constructDom(b._newValue);return b}g(a,b);f(a,[{key:"_getTextField",value:function(){return this._textField}},{key:"_getInputNode",value:function(){return this._textField}}],[{key:"config",value:function(a){return d.config(a,this._createInstance)}},{key:"_createInstance",value:function(c,h){return new a(c,h)}}]);f(a,[{key:"_constructDom",value:function(a){var h=
document.createElement("div");h.className="treeNodeIconEditor";var b=void 0,e=a.iconUri;e&&(b=document.createElement("span"),b.className="treeNodeIcon",b.style.backgroundImage="url('"+encodeURI(e)+"')",h.appendChild(b));b=this._textField=document.createElement("input");b.input="text";b.setAttribute("data-editor",!0);b.spellcheck=!1;b.value=a.label;b.size=a.label.length||1;b.tabIndex=0;b.className="mwTreeTextEditor";h.appendChild(b);this._domNode=h;d.decorateEditor(this)}},{key:"_configureListeners",
value:function(a){var h=this;a.forEach(function(a){h._getInputNode().addEventListener(a.event,a.handler)});this._eventsHandlers=a}},{key:"_emitEditCompleteEvent",value:function(a,h){this.emit("editComplete",{newValue:a,oldValue:h,hasValueChanged:h.label!==a.label})}},{key:"_emitEditCanceledEvent",value:function(a,h){this.emit("editCanceled",{newValue:a,oldValue:h})}},{key:"_handleTextChange",value:function(a){}},{key:"_validateAndCompleteEdit",value:function(){this._newValue.label=this._textField.value.trim();
this._newValue.label||this._config&&this._config.acceptEmptyLabel?this._emitEditCompleteEvent(this._newValue,this._oldValue):this._emitEditCanceledEvent(this._newValue,this._oldValue)}},{key:"setFocus",value:function(){this._textField.focus();this._textField.setSelectionRange(this._textField.value.length,this._textField.value.length)}},{key:"getDomNode",value:function(a){return this._domNode}},{key:"commitValue",value:function(){this._validateAndCompleteEdit()}},{key:"destroy",value:function(){var a=
this;this._textField&&(this._eventsHandlers.forEach(function(h){a._getInputNode().removeEventListener(h.event,h.handler)}),delete this._textField);delete this._domNode}},{key:"value",get:function(){this._newValue.label=this._textField.value;return this._newValue},set:function(a){this._textField.value=a.label}}]);return a}(e)})},"mw-tree/editors/EditorDecorator":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in
a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["mw-tree/utils/KeyCodeEnum"],function(f){return function(){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");}g(e,null,[{key:"config",value:function(d,b){return function(a,c){Object.keys(d).forEach(function(a){c[a]=d[a]});return b(a,c)}}},{key:"_shallowCloneObject",value:function(d){var b={},a;for(a in d)Object.prototype.hasOwnProperty.call(d,
a)&&(b[a]=d[a]);return b}},{key:"decorateEditor",value:function(d){var b=this._handleContextMenu(d),a=this._handleKeyDown(d),c=this._handleBlur(d),h=this._handleInput(d),e=this._handleMouseDown(d);d._configureListeners([{event:"contextmenu",handler:b},{event:"blur",handler:c},{event:"input",handler:h},{event:"keydown",handler:a},{event:"mousedown",handler:e}])}},{key:"_handleContextMenu",value:function(d){return function(b){b.stopPropagation()}}},{key:"_handleMouseDown",value:function(d){return function(b){b.stopPropagation()}}},
{key:"_handleKeyDown",value:function(d){return function(b){b.stopPropagation();switch(b.keyCode){case f.ENTER:d._validateAndCompleteEdit(!0);break;case f.ESCAPE:d._getTextField().value=d._oldValue.label;d._emitEditCompleteEvent(d._oldValue,d._oldValue);break;case f.END:if(!b.shiftKey){var a=d._getInputNode().value.length;d._getInputNode().setSelectionRange(a,a);b.preventDefault()}break;case f.HOME:b.shiftKey||(d._getInputNode().setSelectionRange(0,0),b.preventDefault());break;case f.PAGE_UP:case f.PAGE_DOWN:b.preventDefault()}}}},
{key:"_handleInput",value:function(d){return function(b){b.currentTarget.size=b.target.value.length||1;d._handleTextChange(b.target.value)}}},{key:"_handleBlur",value:function(d){return function(b){d._validateAndCompleteEdit(!1)}}}]);return e}()})},"mw-tree/editors/DesignTimeEditor":function(){function g(e,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,
writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["mw-tree/utils/EventEmitter","mw-tree/utils/KeyCodeEnum","./IconLabelEditor"],function(e,d,b){return function(a){function c(){if(!(this instanceof
c))throw new TypeError("Cannot call a class as a function");var a=(c.__proto__||Object.getPrototypeOf(c)).apply(this,arguments);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&("object"===typeof a||"function"===typeof a)?a:this}g(c,a);f(c,[{key:"setFocus",value:function(){this._textField.focus();this._config.firstChar?(this._textField.value=this._config.firstChar,this._textField.setSelectionRange(this._textField.value.length,this._textField.value.length)):
this._textField.select()}}]);return c}(b)})},"mw-tree/plugins/PluginEnum":function(){function g(f,e,d){e in f?Object.defineProperty(f,e,{value:d,enumerable:!0,configurable:!0,writable:!0}):f[e]=d;return f}define("mw-tree/plugins/contextMenu/ContextMenu mw-tree/plugins/dnd/DnD mw-tree/plugins/filter/Filter mw-tree/plugins/focus/DesignTimeFocus mw-tree/plugins/focus/Focus mw-tree/plugins/search/Search mw-tree/plugins/selection/SingleNodeSelection mw-tree/plugins/selection/MultipleNodeSelection".split(" "),
function(f,e,d,b,a,c,h,k){var l;return Object.freeze({AVAILABLE:(l={Focus:a,Filter:d,Search:c},g(l,"Search",c),g(l,"DragAndDrop",e),g(l,"ContextMenu",f),g(l,"SingleNodeSelection",[a,h]),g(l,"MultipleNodeSelection",[a,k]),g(l,"DesignTimeMultipleNodeSelection",[b,k]),l),INCOMPATIBLE:[[h,k]]})})},"mw-tree/plugins/contextMenu/ContextMenu":function(){function g(d,b){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"===typeof b||"function"===
typeof b)?b:d}function f(d,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}var e=function(){function d(b,a){for(var c=0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=!0;"value"in h&&(h.writable=!0);Object.defineProperty(b,
h.key,h)}}return function(b,a,c){a&&d(b.prototype,a);c&&d(b,c);return b}}();define(["mw-tree/utils/EventEmitter","mw-tree/adaptors/ContextMenuAdaptor"],function(d,b){return function(a){function c(a){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var b=g(this,(c.__proto__||Object.getPrototypeOf(c)).call(this));b.adaptor=a;b._listeners=[];b._listeners.push(b.adaptor.on("treeContextMenu",function(a){return b._handleRightClick(a)}));return b}f(c,a);e(c,[{key:"exposedAPI",
value:function(){return{}}},{key:"_handleRightClick",value:function(a){a.node&&!a.isNodeAlreadySelected&&this.adaptor.setContextMenuFocus(a.node);this.emit("contextMenu",{top:a.top,left:a.left,target:a.emitTarget})}},{key:"destroy",value:function(){this._listeners.forEach(function(a){return a.remove()})}},{key:"emits",get:function(){return["contextMenu"]}}],[{key:"adaptor",get:function(){return b}}]);return c}(d)})},"mw-tree/adaptors/ContextMenuAdaptor":function(){function g(d,b){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return b&&("object"===typeof b||"function"===typeof b)?b:d}function f(d,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}var e=function(){function d(b,a){for(var c=0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=!0;"value"in
h&&(h.writable=!0);Object.defineProperty(b,h.key,h)}}return function(b,a,c){a&&d(b.prototype,a);c&&d(b,c);return b}}();define(["./utils/ContextMenuUtility","mw-tree/utils/EventEmitter"],function(d,b){return function(a){function c(a,b,d){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var e=g(this,(c.__proto__||Object.getPrototypeOf(c)).call(this));e._view=b;e._viewState=a;e._view.registerEventCallback({treeContextMenu:function(a){return e._processAndEmitContextMenuClickEvt(a)}},
!0);return e}f(c,a);e(c,[{key:"_processAndEmitContextMenuClickEvt",value:function(a){a.node&&(a.isNodeAlreadySelected=d.isNodeAlreadySelected(this._viewState,a.node));this.emit("treeContextMenu",a)}},{key:"setContextMenuFocus",value:function(a){d.setContextMenuFocus(this._viewState,a)}}]);return c}(b)})},"mw-tree/adaptors/utils/ContextMenuUtility":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=
!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define([],function(){return function(){function f(){if(!(this instanceof f))throw new TypeError("Cannot call a class as a function");}g(f,null,[{key:"getSelectedNodes",value:function(e){var d=void 0;(e=e.getStateByKey("selected"))&&(d=e.rangeList[0]);return d&&d.length&&(d=d.map(function(b){return{id:b.id}}),0<d.length)?d:[]}},{key:"isNodeAlreadySelected",value:function(e,d){return f.getSelectedNodes(e).some(function(b){return d.id===
b.id})}},{key:"setContextMenuFocus",value:function(e,d){e.setState("contextMenuFocus",d)}},{key:"removeContextMenuFocus",value:function(e){e.deleteState("contextMenuFocus")}}]);return f}()})},"mw-tree/plugins/dnd/DnD":function(){function g(d,b){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"===typeof b||"function"===typeof b)?b:d}function f(d,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+
typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}var e=function(){function d(b,a){for(var c=0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=!0;"value"in h&&(h.writable=!0);Object.defineProperty(b,h.key,h)}}return function(b,a,c){a&&d(b.prototype,a);c&&d(b,c);return b}}();define(["mw-tree/plugins/dnd/impl/DnDSource","mw-tree/utils/EventEmitter",
"mw-tree/adaptors/DnDAdaptor"],function(d,b,a){return function(c){function h(a){if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");var c=g(this,(h.__proto__||Object.getPrototypeOf(h)).call(this));c.adaptor=a;c.adaptor.on("registerDnDSource",function(a){return c._registerDnDSource(a)});c.adaptor.on("syncDnDSource",function(a){return c._syncDnDSource()});c.adaptor.on("moveFailed",function(a){return c._emitDropFailed(a)});c.adaptor.on("moveCompleted",function(a){return c._emitDropCompleted(a)});
c.dndBetweenTrees=!1;c.reparentDnd=!0;return c}f(h,c);e(h,[{key:"_registerDnDSource",value:function(a){var c=this;this.dndSource=new d(a.treeContainerNode,{dropParent:a.mwTreeNode,skipForm:!0,singular:!0,skip:!0},{getCurrentViewPortData:function(){return c.adaptor.getCurrentViewPortData()},getEditState:function(){return c.adaptor.getEditState()},setDragState:function(a){return c.adaptor.setDragState(a)},getDragState:function(){return c.adaptor.getDragState()},setDnDEndsState:function(a){return c.adaptor.setDnDEndsState(a)},
canSourceDrag:function(a){return c.canSourceDrag(a)},canTargetAcceptSource:function(a,h){return c.canTargetAcceptSource(a,h)},moveTreeNodes:function(a,h){return c.adaptor.moveTreeNodes(a,h)},allowExternalDnd:this.dndBetweenTrees,reparentDnd:this.reparentDnd})}},{key:"_syncDnDSource",value:function(){this.dndSource.sync();this.dndSource.updateDropState()}},{key:"_emitDropCompleted",value:function(a){this.emit("dropCompleted",a)}},{key:"_emitDropFailed",value:function(a){this.emit("dropFailed",a)}},
{key:"exposedAPI",value:function(){return{}}},{key:"canSourceDrag",value:function(a){a={nodeIds:a.map(function(a){return a.id}),type:"TREENODE"};return this.adaptor.getDragAndDropConfig().canDrag?this.adaptor.getDragAndDropConfig().canDrag(a):!0}},{key:"canTargetAcceptSource",value:function(a,c){var h={nodeIds:c.map(function(a){return a.id}),type:"TREENODE"},b=null;a&&(b=a.id);var d=void 0,d=null===b?{type:"TREE"}:{nodeId:b,type:"TREENODE"};return this.adaptor.getDragAndDropConfig().canDrop?this.adaptor.getDragAndDropConfig().canDrop(h,
d):!0}},{key:"destroy",value:function(){this.dndSource&&this.dndSource.destroy()}},{key:"emits",get:function(){return["dropFailed","dropCompleted"]}}],[{key:"adaptor",get:function(){return a}}]);return h}(b)})},"mw-tree/plugins/dnd/impl/DnDSource":function(){function g(b,a){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&("object"===typeof a||"function"===typeof a)?a:b}function f(b,a){if("function"!==typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function, not "+
typeof a);b.prototype=Object.create(a&&a.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}});a&&(Object.setPrototypeOf?Object.setPrototypeOf(b,a):b.__proto__=a)}var e=function(){function b(a,c){for(var h=0;h<c.length;h++){var b=c[h];b.enumerable=b.enumerable||!1;b.configurable=!0;"value"in b&&(b.writable=!0);Object.defineProperty(a,b.key,b)}}return function(a,c,h){c&&b(a.prototype,c);h&&b(a,h);return a}}(),d=function a(c,h,d){null===c&&(c=Function.prototype);var e=Object.getOwnPropertyDescriptor(c,
h);if(void 0===e)return c=Object.getPrototypeOf(c),null===c?void 0:a(c,h,d);if("value"in e)return e.value;h=e.get;return void 0===h?void 0:h.call(d)};define("dojo/topic dojo/dnd/Source dojo/dnd/common dojo/dnd/Manager mw-dnd/DnDUtils ./DnDAvatar".split(" "),function(a,c,h,k,l,m){return function(c){function n(a,c,h){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");var d=g(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,a,c));d.getCurrentViewPortData=h.getCurrentViewPortData;
d.canTargetAcceptSource=h.canTargetAcceptSource;d.canSourceDrag=h.canSourceDrag;d.moveTreeNodes=h.moveTreeNodes;d.getEditState=h.getEditState;d.setDragState=h.setDragState;d.getDragState=h.getDragState;d.setDnDEndsState=h.setDnDEndsState;d.manager=k.manager();l.registerMakeAvatar(d,function(){return new m(d.manager)});d.allowExternalDnd=h.allowExternalDnd;d.reparentDnd=h.reparentDnd;return d}f(n,c);e(n,[{key:"onDndStart",value:function(){d(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),
"onDndStart",this).apply(this,arguments);if(this.manager.nodes&&this.manager.source===this){var c=this.sourceInfo=this._getSourceInfo(this.manager.nodes);if(!this.canSourceDrag(c)||this.getEditState()||!this.current)this.manager.canDrop(!1),this.manager.stopDrag(),a.publish("/dnd/cancel")}}},{key:"onDrop",value:function(a,c,h){if(this!==a){if(this.allowExternalDnd&&a.allowExternalDnd)this.onDropExternal(a,c,h)}else this.onDropInternal(c,h)}},{key:"onDropInternal",value:function(a,c){var h=this._getTargetInfo(this.manager.target),
d=this.sourceInfo;this.reparentDnd&&this.dropReparenting(d,h)}},{key:"onDropExternal",value:function(a,c,h){}},{key:"dropReparenting",value:function(a,c){this.moveTreeNodes(a,c)}},{key:"onMouseDown",value:function(a){if(!a.altKey&&!this.mouseDown&&this._legalMouseDown(a)&&(!this.skipForm||!h.isFormElement(a)))if(this.mouseDown=!0,this._lastX=a.pageX,this._lastY=a.pageY,this.autoSync&&this.sync(),this.current)if(!this.singular&&!h.getCopyKeyState(a)&&!a.shiftKey&&this.current.id in this.selection)this.simpleSelection=
!0;else{if(a.target.classList.contains("disclosureImage")||a.target.classList.contains("disclosureIcon"))this._disclosureClicked=!0;if(!this.singular&&a.shiftKey){if(h.getCopyKeyState(a)||this._removeSelection(),a=this.getAllNodes(),a.length&&(this.anchor||(this.anchor=a[0],this._addItemClass(this.anchor,"Anchor")),this.selection[this.anchor.id]=1,this.anchor!==this.current)){for(var c=0,d;c<a.length&&!(d=a[c],d===this.anchor||d===this.current);++c);for(++c;c<a.length;++c){d=a[c];if(d===this.anchor||
d===this.current)break;this._addItemClass(d,"Selected");this.selection[d.id]=1}this._addItemClass(this.current,"Selected");this.selection[this.current.id]=1}}else this.singular?(this.anchor===this.current?h.getCopyKeyState(a)&&this.selectNone():(this.selectNone(),this.anchor=this.current,this._addItemClass(this.anchor,"Anchor"),this.selection[this.current.id]=1),this.anchorNodeId=this.anchor?this.anchor.getAttribute("data-test-id"):null):h.getCopyKeyState(a)?this.anchor===this.current?(delete this.selection[this.anchor.id],
this._removeAnchor()):this.current.id in this.selection?(this._removeItemClass(this.current,"Selected"),delete this.selection[this.current.id]):(this.anchor&&(this._removeItemClass(this.anchor,"Anchor"),this._addItemClass(this.anchor,"Selected")),this.anchor=this.current,this._addItemClass(this.current,"Anchor"),this.selection[this.current.id]=1):this.current.id in this.selection||(this.selectNone(),this.anchor=this.current,this._addItemClass(this.current,"Anchor"),this.selection[this.current.id]=
1)}}},{key:"onMouseMove",value:function(c){d(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"onMouseMove",this).apply(this,arguments);this.isDragging&&((c.target.classList.contains("disclosureImage")||c.target.classList.contains("disclosureIcon"))&&this._disclosureClicked?(this.manager.canDrop(!1),this.manager.stopDrag(),a.publish("/dnd/cancel"),this._disclosureClicked=!1):(this.setDragState(!0),this._setCanDrop()))}},{key:"onMouseUp",value:function(a){if(this.getDragState()){var c={};
c[a.target]=!0;this.setDnDEndsState(c)}this.setDragState(!1);this._disclosureClicked=!1;d(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"onMouseUp",this).apply(this,arguments)}},{key:"copyState",value:function(){return!1}},{key:"updateDropState",value:function(){this.isDragging&&this._setCanDrop()}},{key:"_markDndStatus",value:function(a){d(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"_markDndStatus",this).call(this,arguments);this._setCanDrop()}},{key:"_setCanDrop",value:function(){if(this.manager.target){var a=
void 0,c=this.manager.target,h=this.manager.target.current;c&&(a=this._getTargetInfo(c));!this._isTargetSameAsSource(h,a)&&(this.manager.copy||this.canTargetAcceptSource(a,this.sourceInfo))?this.manager.canDrop(!0):this.manager.canDrop(!1)}}},{key:"_isTargetSameAsSource",value:function(a,c){if(!c)return!1;var h=this.anchor?this.anchorNodeId!==this.anchor.getAttribute("data-test-id"):!0;return a&&h?this.anchorNodeId===a.getAttribute("data-test-id"):a&&a===this.anchor}},{key:"_getSourceInfo",value:function(a){var c=
this.getCurrentViewPortData(),h=[],d=void 0;a.forEach(function(a){d=parseInt(a.getAttribute("data-row-index"));h.push(c(d)(0).value)});return h}},{key:"_getTargetInfo",value:function(a){if(a.current){var c=this.getCurrentViewPortData();a=parseInt(a.current.getAttribute("data-row-index"));return c(a)(0).value}return{id:null}}}]);return n}(c)})},"mw-tree/plugins/dnd/impl/DnDAvatar":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=
!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["dojo/dom-construct","dojo/dom-class","dojo/string"],function(f,e,d){return function(){function b(a){function c(a){a=f.create("tr",null,a);return f.create("td",null,a)}if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");this.manager=a;a=f.create("table",{"class":"mwTreeDnDAvatar"});var h=f.create("tbody",null,a),d=c(h);d.setAttribute("class",
"mwTreeDnDAvatarHeader");f.create("span",{textContent:this.manager.source.generateText?this._generateText():""},d);for(var d=this.manager.nodes,e=Math.min(5,d.length),m=0;m<e;++m){var g=d[m].firstChild.lastChild.firstChild.cloneNode(!0);f.place(g,c(h))}e<d.length&&f.create("span",{textContent:"..."},c(h));this.node=a}g(b,[{key:"destroy",value:function(){f.destroy(this.node);this.node=!1}},{key:"update",value:function(){e.toggle(this.node,"mwTreeAvatarCanDrop",this.manager.canDropFlag)}},{key:"_generateText",
value:function(){return this.manager.copy?d.substitute("Copy ${0} item(s)",[this.manager.nodes.length.toString()]):d.substitute("Move ${0} item(s)",[this.manager.nodes.length.toString()])}}]);return b}()})},"mw-tree/adaptors/DnDAdaptor":function(){function g(d,b){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"===typeof b||"function"===typeof b)?b:d}function f(d,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+
typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}var e=function(){function d(b,a){for(var c=0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=!0;"value"in h&&(h.writable=!0);Object.defineProperty(b,h.key,h)}}return function(b,a,c){a&&d(b.prototype,a);c&&d(b,c);return b}}();define(["mw-tree/utils/EventEmitter"],function(d){return function(b){function a(c,
h,b,d){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");var e=g(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));e.viewState=c;e.dataStore=b;e.dragAndDropConfig=d.dragAndDropConfig;e.viewState.setState("dnd",!0);c={containerMount:function(a){return e.emit("registerDnDSource",a)},containerUpdate:function(){return e.emit("syncDnDSource")}};h&&h.registerEventCallback(c);e.setDnDEndsState({});return e}f(a,b);e(a,[{key:"getCurrentViewPortData",value:function(){return this.viewState.getStateByKey("currentViewPortData").value}},
{key:"getDragAndDropConfig",value:function(){return this.dragAndDropConfig||{}}},{key:"moveTreeNodes",value:function(a,h){var b=this;a.forEach(function(d){b.dataStore.getParentNode({id:d.id}).then(function(e){e=e?e.node:{id:null};var f={nodeIds:a.map(function(a){return a.id}),type:"TREENODE"},g={};null===h.id?g.type="TREE":g={nodeId:h.id,type:"TREENODE"};b.dataStore.move({id:e.id},{id:d.id},{id:h.id}).then(function(){b.emit("moveCompleted",{source:f,target:g});b.dataStore.getNode({id:h.id}).then(function(a){a&&
(a.node&&!a.node.isExpanded)&&b.viewState.setState("potentialNextKeyboardActiveNode",a.node)})},function(a){b.emit("moveFailed",{error:{reason:a.reason,message:a.message},source:f,target:g})})})})}},{key:"setDragState",value:function(a){this.viewState.setState("isInDragging",a)}},{key:"getDragState",value:function(){return this.viewState.getStateByKey("isInDragging")&&this.viewState.getStateByKey("isInDragging").value}},{key:"setDnDEndsState",value:function(a){this.viewState.setState("dndEnds",a)}},
{key:"getEditState",value:function(){return this.viewState.getStateByKey("isInEditing")&&this.viewState.getStateByKey("isInEditing").value}}]);return a}(d)})},"mw-tree/plugins/filter/Filter":function(){function g(e,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):
e.__proto__=d)}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["mw-tree/utils/EventEmitter","mw-tree/adaptors/FilterAdaptor"],function(e,d){return function(b){function a(c){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");var h;h=(a.__proto__||Object.getPrototypeOf(a)).call(this);
if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");h=h&&("object"===typeof h||"function"===typeof h)?h:this;h.adaptor=c;return h}g(a,b);f(a,[{key:"filter",value:function(a){this.adaptor.filter(a)}},{key:"clearFilter",value:function(){this.adaptor.clearFilter()}},{key:"exposedAPI",value:function(){var a=this;return{filter:function(h){return a.filter(h)},clearFilter:function(){return a.clearFilter()}}}},{key:"destroy",value:function(){}},{key:"emits",get:function(){return[]}}],
[{key:"adaptor",get:function(){return d}}]);return a}(e)})},"mw-tree/adaptors/FilterAdaptor":function(){function g(e,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=
c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["mw-tree/utils/EventEmitter"],function(e){return function(d){function b(a,c,h){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");a=(b.__proto__||Object.getPrototypeOf(b)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");a=a&&("object"===typeof a||
"function"===typeof a)?a:this;a._dataStore=h;return a}g(b,d);f(b,[{key:"filter",value:function(a){this._dataStore.filter(a);this._dataStore.expandAll();this._dataStore.search(a)}},{key:"clearFilter",value:function(a){this._dataStore.clearFilter();this._dataStore.clearSearch()}}]);return b}(e)})},"mw-tree/plugins/focus/DesignTimeFocus":function(){function g(d,b){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"===typeof b||"function"===
typeof b)?b:d}function f(d,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}var e=function(){function d(b,a){for(var c=0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=!0;"value"in h&&(h.writable=!0);Object.defineProperty(b,
h.key,h)}}return function(b,a,c){a&&d(b.prototype,a);c&&d(b,c);return b}}();define(["dojo/dom-class","./Focus"],function(d,b){return function(a){function c(a){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var b=g(this,(c.__proto__||Object.getPrototypeOf(c)).call(this,a));b.adaptor=a;b.adaptor.on("containerMount",function(){return b._containerAddDesignTimeClass()});b.adaptor.on("containerUpdate",function(){return b._containerAddDesignTimeClass()});return b}f(c,a);
e(c,[{key:"exposedAPI",value:function(){return{setFocus:this.setFocus.bind(this),getFocus:this.getFocus.bind(this),isNodeInViewPort:this.isNodeInViewPort.bind(this)}}},{key:"setFocus",value:function(a){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:!0;this.adaptor.setFocusedState(a,!0);this.adaptor.setKeyboardActiveState(a);c&&this.adaptor.getTreeContainerNode().focus()}},{key:"getFocus",value:function(){return this.adaptor.getFocusedState()}},{key:"isNodeInViewPort",value:function(a){for(var c=
this.adaptor.getViewPortInfo(),b=c.currentViewPort.rangeList[0].rows,d=b.end,c=c.currentViewPortData,b=b.start;b<=d;b++)if(c(b)(0).value&&c(b)(0).value.id===a)return!0;return!1}},{key:"_containerAddDesignTimeClass",value:function(){var a=this.adaptor.getTreeContainerNode();d.add(a,"mw-tree-design-time")}}]);return c}(b)})},"mw-tree/plugins/focus/Focus":function(){function g(d,b){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"===typeof b||
"function"===typeof b)?b:d}function f(d,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}var e=function(){function d(b,a){for(var c=0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=!0;"value"in h&&(h.writable=!0);Object.defineProperty(b,
h.key,h)}}return function(b,a,c){a&&d(b.prototype,a);c&&d(b,c);return b}}();define(["mw-tree/utils/EventEmitter","mw-tree/adaptors/FocusAdaptor"],function(d,b){return function(a){function c(a){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var b=g(this,(c.__proto__||Object.getPrototypeOf(c)).call(this));b.adaptor=a;b.adaptor.on("nodeFocusClick",function(a){return b._nodeClicked(a)});b.adaptor.on("nodeFocusKeyPress",function(a){return b._keyPressed(a)});return b}f(c,
a);e(c,[{key:"focus",value:function(){this.adaptor.setContainerFocus()}},{key:"_nodeClicked",value:function(a){var c=a.ctrlKey||a.metaKey;a.altKey||a.shiftKey&&c||this.adaptor.setFocusedState(a.node)}},{key:"_keyPressed",value:function(a){this.adaptor.setFocusedState(a.currentKeyboardActiveNode)}},{key:"exposedAPI",value:function(){var a=this;return{focus:function(){return a.focus()}}}},{key:"destroy",value:function(){}},{key:"emits",get:function(){return[]}}],[{key:"adaptor",get:function(){return b}}]);
return c}(d)})},"mw-tree/adaptors/FocusAdaptor":function(){function g(d,b){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"===typeof b||"function"===typeof b)?b:d}function f(d,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,
b):d.__proto__=b)}var e=function(){function d(b,a){for(var c=0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=!0;"value"in h&&(h.writable=!0);Object.defineProperty(b,h.key,h)}}return function(b,a,c){a&&d(b.prototype,a);c&&d(b,c);return b}}();define(["./utils/ContextMenuUtility","mw-tree/utils/EventEmitter"],function(d,b){return function(a){function c(a,b){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var d=g(this,(c.__proto__||Object.getPrototypeOf(c)).call(this));
d.viewState=a;d.view=b;var e={treeNodeMouseDown:function(a){return d._processAndEmitClickEvt(a)},treeContextMenuSelection:function(a){a.node&&d._processAndEmitClickEvt(a)},treeNavigation:function(a){return d._processAndEmitKeyPress(a)},containerMount:function(){return d.emit("containerMount")},containerUpdate:function(){return d.emit("containerUpdate")}};b&&b.registerEventCallback(e);return d}f(c,a);e(c,[{key:"_processAndEmitClickEvt",value:function(a){this.emit("nodeFocusClick",a)}},{key:"_processAndEmitKeyPress",
value:function(a){this.viewState.getStateByKey("keyboardActive")&&(a.currentKeyboardActiveNode=this.viewState.getStateByKey("keyboardActive").value,this.emit("nodeFocusKeyPress",a))}},{key:"setContainerFocus",value:function(){d.removeContextMenuFocus(this.viewState);this.getTreeContainerNode().focus();this.viewState.setState("updateView",!0)}},{key:"setFocusedState",value:function(a,c){this.viewState.setState("focused",a);c&&this.viewState.setState("updateView",!0)}},{key:"getFocusedState",value:function(){var a=
this.viewState.getStateByKey("focused");return a&&a.value?{id:a.value.id}:null}},{key:"setKeyboardActiveState",value:function(a){this.viewState.setState("keyboardActive",a)}},{key:"getTreeContainerNode",value:function(){var a=this.viewState.getStateByKey("treeContainerNode");return a&&a.value?a.value:null}},{key:"getViewPortInfo",value:function(){var a=this.viewState.getStateByKey("viewPort"),c=this.viewState.getStateByKey("currentViewPortData").value;return{currentViewPort:a,currentViewPortData:c}}}]);
return c}(b)})},"mw-tree/plugins/search/Search":function(){function g(e,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in
c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["mw-tree/utils/EventEmitter","mw-tree/adaptors/SearchAdaptor"],function(e,d){return function(b){function a(c){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");var h;h=(a.__proto__||Object.getPrototypeOf(a)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");h=h&&("object"===typeof h||"function"===
typeof h)?h:this;h.adaptor=c;return h}g(a,b);f(a,[{key:"search",value:function(a){this.adaptor.search(a)}},{key:"clearSearch",value:function(){this.adaptor.clearSearch()}},{key:"exposedAPI",value:function(){var a=this;return{search:function(h){return a.search(h)},clearSearch:function(){return a.clearSearch()}}}},{key:"destroy",value:function(){}},{key:"emits",get:function(){return[]}}],[{key:"adaptor",get:function(){return d}}]);return a}(e)})},"mw-tree/adaptors/SearchAdaptor":function(){function g(e,
d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,
b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["mw-tree/utils/EventEmitter"],function(e){return function(d){function b(a,c,h){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");a=(b.__proto__||Object.getPrototypeOf(b)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");a=a&&("object"===typeof a||"function"===typeof a)?a:this;a._dataStore=h;return a}g(b,d);f(b,[{key:"search",value:function(a){this._dataStore.search(a)}},
{key:"clearSearch",value:function(a){this._dataStore.clearSearch()}}]);return b}(e)})},"mw-tree/plugins/selection/SingleNodeSelection":function(){function g(d,b){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"===typeof b||"function"===typeof b)?b:d}function f(d,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,
enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}var e=function(){function d(b,a){for(var c=0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=!0;"value"in h&&(h.writable=!0);Object.defineProperty(b,h.key,h)}}return function(b,a,c){a&&d(b.prototype,a);c&&d(b,c);return b}}();define(["mw-tree/utils/EventEmitter","mw-tree/utils/KeyCodeEnum","mw-tree/adaptors/SelectionAdaptor"],function(d,b,a){return function(c){function h(a){if(!(this instanceof
h))throw new TypeError("Cannot call a class as a function");var c=g(this,(h.__proto__||Object.getPrototypeOf(h)).call(this));c.adaptor=a;c._listeners=[];c._listeners.push(c.adaptor.on("nodeSelectionClick",function(a){return c._nodeClickHandler(a)}));c._listeners.push(c.adaptor.on("nodeSelectionContextMenu",function(a){return c._contextMenuHandler(a)}));c._listeners.push(c.adaptor.on("nodeSelectionKeyPress",function(a){return c._setKeyboardSelection(a,a.currentKeyboardActiveNode)}));return c}f(h,c);
e(h,[{key:"_toggleSelection",value:function(a,c){var h=a.currentSelection&&a.currentSelection[0]?a.currentSelection[0]:null;h&&c.id===h.id?(this.adaptor.setSelectionState([]),this.emit("selectionChanged",{nodeIds:[]})):this._setSelection(a,c)}},{key:"_setSelection",value:function(a,c){var h=a.currentSelection&&a.currentSelection[0]?a.currentSelection[0]:null;if(null===h&&null!==c||h&&c.id!==h.id)h=[c],this.adaptor.setSelectionState(h),h=h.map(function(a){return a.id}),this.emit("selectionChanged",
{nodeIds:h})}},{key:"_contextMenuHandler",value:function(a){this._setSelection(a,a.node)}},{key:"_nodeClickHandler",value:function(a){a.altKey||(a.ctrlKey||a.metaKey?this._toggleSelection(a,a.node):this._setSelection(a,a.node))}},{key:"_setKeyboardSelection",value:function(a,c){a.ctrlKey||a.metaKey?a.keyCode===b.SPACE&&this._toggleSelection(a,c):this._setSelection(a,c)}},{key:"setSelection",value:function(a){null===a&&(a=[]);if(Array.isArray(a))1<a.length?a.length=1:a.length,this.adaptor.setSelectionState(a,
null,!0);else throw Error("Expected: TreeNodes array or null to signify no selection.Usage: setSelection([{id: 'node5'}]), setSelection([]), setSelection(null)");}},{key:"getSelection",value:function(){return this.adaptor.getSelectionState()}},{key:"exposedAPI",value:function(){var a=this;return{setSelection:function(c){return a.setSelection(c)},getSelection:function(){return a.getSelection()}}}},{key:"destroy",value:function(){this._listeners.forEach(function(a){return a.remove()})}},{key:"emits",
get:function(){return["selectionChanged"]}}],[{key:"adaptor",get:function(){return a}}]);return h}(d)})},"mw-tree/adaptors/SelectionAdaptor":function(){function g(b,a){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&("object"===typeof a||"function"===typeof a)?a:b}function f(b,a){if("function"!==typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function, not "+typeof a);b.prototype=Object.create(a&&a.prototype,{constructor:{value:b,
enumerable:!1,writable:!0,configurable:!0}});a&&(Object.setPrototypeOf?Object.setPrototypeOf(b,a):b.__proto__=a)}function e(b,a){if(!(b instanceof a))throw new TypeError("Cannot call a class as a function");}var d=function(){function b(a,c){for(var h=0;h<c.length;h++){var b=c[h];b.enumerable=b.enumerable||!1;b.configurable=!0;"value"in b&&(b.writable=!0);Object.defineProperty(a,b.key,b)}}return function(a,c,h){c&&b(a.prototype,c);h&&b(a,h);return a}}();define(["mw-tree/utils/EventEmitter","mw-tree/utils/TreeUtils",
"./RangeSelection"],function(b,a,c){var h=function(){function a(){e(this,a)}d(a,[{key:"processAndEmitEvt",value:function(a,c){c(a)}},{key:"updateBoundaryNode",value:function(a){}},{key:"getContiguousSelectionRange",value:function(a){}}]);return a}();return function(b){function l(a,c,b){e(this,l);var d=g(this,(l.__proto__||Object.getPrototypeOf(l)).call(this));d.viewState=a;d._view=c;d._dataStore=b;d.selectionModelDelegate=new h;a={treeNodeMouseDown:function(a){return d._processAndEmitClickEvt(a)},
treeNavigation:function(a){return d._processAndEmitKeyPress(a)},treeContextMenuSelection:function(a){a.node&&d._processAndEmitContextMenuEvt(a)}};c&&c.registerEventCallback(a);return d}f(l,b);d(l,[{key:"setRangeSelectionModel",value:function(){this.selectionModelDelegate=new c(this.viewState,this._view,this._dataStore)}},{key:"_processAndEmitClickEvt",value:function(a){var c=this;a.currentSelection=this.getSelectionState();return this.selectionModelDelegate.processAndEmitEvt(a,function(a){c.emit("nodeSelectionClick",
a)})}},{key:"_processAndEmitContextMenuEvt",value:function(a){var c=this;a.currentSelection=this.getSelectionState()||[];a.isNodeAlreadySelected=a.currentSelection.some(function(c){return c.id===a.node.id});return this.selectionModelDelegate.processAndEmitEvt(a,function(a){c.emit("nodeSelectionContextMenu",a)})}},{key:"_processAndEmitKeyPress",value:function(a){var c=this;a.currentSelection=this.getSelectionState();var h=this.viewState.getStateByKey("keyboardActive"),b=this.viewState.getStateByKey("keyboardActiveIndex"),
h=h?h.value:null,b=b?b.value:null;a.currentKeyboardActiveNode=h;a.nodeIndex=b;return this.selectionModelDelegate.processAndEmitEvt(a,function(a){c.emit("nodeSelectionKeyPress",a)})}},{key:"_getNodeIndexInCurrentSelection",value:function(a,c){for(var h=0;h<a.length;h++)if(a[h].id===c.id)return h;return-1}},{key:"_toggleSelection",value:function(a,c){a=a||[];var h=this._getNodeIndexInCurrentSelection(a,c),b=[];Array.isArray(a)&&(b=a.slice(0,a.length));-1<h?b.splice(h,1):b.push({id:c.id});this.setSelectionState(b)}},
{key:"setIndividualSelection",value:function(a,c){this.selectionModelDelegate.updateBoundaryNode(a);this.setSelectionState([a.node]);c(this.getSelectionState())}},{key:"setDiscontiguousSelection",value:function(a,c){this.selectionModelDelegate.updateBoundaryNode(a);this._toggleSelection(this.getSelectionState(),a.node);c(this.getSelectionState())}},{key:"setContiguousSelection",value:function(a,c){var h=this.selectionModelDelegate.getContiguousSelectionRange(a.nodeIndex);h?this._setRangeSelection(h.start,
h.end,c):c(this.getSelectionState())}},{key:"_getSelectionForNodesInViewBuffer",value:function(a,c,h){for(var b=[];c<=h;c++)b.push({id:a(c)(0).value.id});return b}},{key:"_setRangeSelection",value:function(c,h,b){var d=this,e=this.viewState.viewBuffer.rangeList[0].rows,k=e.start,e=e.end,f=c>=k&&h<=e,l=this.viewState.getStateByKey("currentViewPortData").value,g=void 0;f?(g=this._getSelectionForNodesInViewBuffer(l,c,h),this.setSelectionState(g),b(g)):(g=this._getSelectionForNodesInViewBuffer(l,c>=k?
c:k,h<=e?h:e),this.setSelectionState(g),c=a.getRangeListForRange(this.viewState,c,h),this._dataStore.getData(c).then(function(a){g=[];a[0].forEach(function(a){return g.push({id:a[0].id})});d.setSelectionState(g);b(g)}))}},{key:"setSelectionState",value:function(a,c,h){c=this.viewState;Array.isArray(a)&&a.length?c.setState("selected",!0,[a]):c.setState("selected",!1,[]);h&&c.setState("updateView",!0)}},{key:"getSelectionState",value:function(){var a=void 0,c=this.viewState.getStateByKey("selected");
c&&(a=c.rangeList[0]);return a&&a.length&&(a=a.map(function(a){return{id:a.id}}),0<a.length)?a:[]}}]);return l}(b)})},"mw-tree/adaptors/RangeSelection":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["mw-tree/utils/KeyCodeEnum"],function(f){return function(){function e(d,b,a){var c=
this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this._viewState=d;this._dataStore=a;this._view=b;b.registerEventCallback({treeDisclosureMouseDown:function(a){return c._setPotentialBoundaryNodeOnDisclosureCollapse(a)}})}g(e,[{key:"_setPotentialBoundaryNodeOnDisclosureCollapse",value:function(d){var b=this,a=this._viewState.getStateByKey("BoundaryNode");if(a&&a.value)return a=a.value,this._dataStore.getNode(a.node).then(function(a){a||b._setPotentialBoundaryNode({node:d.node,
nodeIndex:d.nodeIndex})})}},{key:"_getBoundaryNodeInView",value:function(d){var b=this,a=d;return this._dataStore.getNode(a.node).then(function(c){c?a.nodeIndex=c.index:a=(c=b._viewState.getStateByKey("PotentialBoundaryNode"))?c.value:null;return a})}},{key:"_setBoundaryNode",value:function(d){this._viewState.setState("BoundaryNode",d);this._viewState.deleteState("PotentialBoundaryNode")}},{key:"_setPotentialBoundaryNode",value:function(d){this._viewState.setState("PotentialBoundaryNode",d)}},{key:"processAndEmitEvt",
value:function(d,b){if(d.shiftKey)return this._processAndEmitShiftEvt(d,b);b(d)}},{key:"_processAndEmitShiftEvt",value:function(d,b){var a=this,c=this._viewState.getStateByKey("BoundaryNode");if(c&&c.value)return this._getBoundaryNodeInView(c.value).then(function(c){a._setBoundaryNode(c);b(d)});b(d)}},{key:"updateBoundaryNode",value:function(d){this._setBoundaryNode(d)}},{key:"getContiguousSelectionRange",value:function(d){var b=this._viewState.getStateByKey("BoundaryNode"),a=b&&b.value?b.value.nodeIndex:
0,b=Math.min(a,d);d=Math.max(a,d);return{start:b,end:d}}}]);return e}()})},"mw-tree/plugins/selection/MultipleNodeSelection":function(){function g(d,b){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"===typeof b||"function"===typeof b)?b:d}function f(d,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,
enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}var e=function(){function d(b,a){for(var c=0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=!0;"value"in h&&(h.writable=!0);Object.defineProperty(b,h.key,h)}}return function(b,a,c){a&&d(b.prototype,a);c&&d(b,c);return b}}();define(["mw-tree/utils/EventEmitter","mw-tree/utils/KeyCodeEnum","mw-tree/adaptors/SelectionAdaptor"],function(d,b,a){return function(c){function h(a){if(!(this instanceof
h))throw new TypeError("Cannot call a class as a function");var c=g(this,(h.__proto__||Object.getPrototypeOf(h)).call(this));c.adaptor=a;c._listeners=[];c._listeners.push(c.adaptor.on("nodeSelectionClick",function(a){return c._handleClick(a)}));c._listeners.push(c.adaptor.on("nodeSelectionContextMenu",function(a){return c._handleContextMenu(a)}));c._listeners.push(c.adaptor.on("nodeSelectionKeyPress",function(a){return c._handleKeyboard(a,{node:a.currentKeyboardActiveNode,nodeIndex:a.nodeIndex})}));
c.adaptor.setRangeSelectionModel();return c}f(h,c);e(h,[{key:"_hasSelectionChanged",value:function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[];return a.length!==c.length?!0:c[c.length-1].id!==a[a.length-1].id}},{key:"_emitSelectionEvt",value:function(a,c){a=a||[];c=c||[];if(this._hasSelectionChanged(a,c)){var h=c.map(function(a){return a.id});this.emit("selectionChanged",{nodeIds:h})}}},{key:"_handleClick",value:function(a){this._handleSelection(a,
{node:a.node,nodeIndex:a.nodeIndex})}},{key:"_handleContextMenu",value:function(a){var c=this;a.isNodeAlreadySelected||this.adaptor.setIndividualSelection({node:a.node,nodeIndex:a.nodeIndex},function(h){return c._emitSelectionEvt(a.currentSelection,h)})}},{key:"_isValidExtendedSelectionkey",value:function(a){switch(a.keyCode){case b.ARROW_DOWN:case b.ARROW_UP:case b.PAGE_DOWN:case b.PAGE_UP:case b.HOME:case b.END:case b.SPACE:return!0;default:return!1}}},{key:"_handleSelection",value:function(a,c){var h=
this,b=a.ctrlKey||a.metaKey,d=a.shiftKey,e=function(c){return h._emitSelectionEvt(a.currentSelection,c)},f={node:c.node,nodeIndex:c.nodeIndex};a.altKey||b&&d||(b?this.adaptor.setDiscontiguousSelection(f,e):d?this.adaptor.setContiguousSelection(f,e):this.adaptor.setIndividualSelection(f,e))}},{key:"_handleKeyboard",value:function(a,c){var h=a.ctrlKey||a.metaKey;(!h&&!a.shiftKey||h&&a.keyCode===b.SPACE||a.shiftKey&&this._isValidExtendedSelectionkey(a))&&this._handleSelection(a,c)}},{key:"setSelection",
value:function(a){null===a&&(a=[]);if(Array.isArray(a))this.adaptor.setSelectionState(a,null,!0);else throw Error("Expected: TreeNodes array or null to signify no selection.Usage: setSelection([{id: 'node5'}]), setSelection([]), setSelection(null)");}},{key:"getSelection",value:function(){return this.adaptor.getSelectionState()}},{key:"exposedAPI",value:function(){var a=this;return{setSelection:function(c){return a.setSelection(c)},getSelection:function(){return a.getSelection()}}}},{key:"destroy",
value:function(){this._listeners.forEach(function(a){return a.remove()})}},{key:"emits",get:function(){return["selectionChanged"]}}],[{key:"adaptor",get:function(){return a}}]);return h}(d)})},"mw-tree/viewModel/DataEnum":function(){define([],function(){return Object.freeze({FIRST_NODE:{},LAST_NODE:{}})})},"matlab_preferences/preferencesUI/widgets/CustomRenderer":function(){define([],function(){return{getDomNode:function(g,f){var e=f.highlight,d=document.createElement("span");d.className="mw-tree-renderer";
var b=g.label,a=document.createElement("span");a.className="treeNodeText";a.textContent=b.trim();a.setAttribute("data-test-id","label1");d.appendChild(a);e&&(e=e[0].matches.length,b=document.createElement("span"),b.className="preferenceSearchCounterNode",9<e&&(e="9+"),b.textContent=e,d.appendChild(b));return d}}})},"MOTW/feedback/FeedbackDialogCreator":function(){define("dojo/_base/declare MOTW/feedback/FeedbackDialogService MW/feedbackdialog/FeedbackWithEmailContent MW/feedbackdialog/FeedbackDialog MW/feedbackdialog/FeedbackController MOTW/feedback/FeedbackDialogEnum dojo/i18n!MOTW/l10n/nls/feedbackDialog".split(" "),
function(g,f,e,d,b,a,c){return g([],{constructor:function(a){},createFeedbackDialog:function(h){var k=new f,l=new e({headingLabel:c.feedbackContentDefaultHeadingLabel,feedbackBottomLabel:c.feedbackContentFeedbackDefaultBottomLabel,emailBottomLabel:c.feedbackContentEmailDefaultBottomLabel,requireSubjectField:a.REQUIRE_SUBJECT,emailEditable:a.EMAIL_NOT_EDITABLE});l.emailInput.set("value",h);this.feedbackDialog=new d({feedbackContent:l});this.feedbackDialog.privacyPolicyLinkNode.onclick=null;(new b(k,
this.feedbackDialog)).openFeedbackDialog()}})})},"MOTW/feedback/FeedbackDialogService":function(){define("dojo/_base/declare dojo/Deferred dojo/_base/array mw-browser-utils/BrowserUtils mw-remote/Remote dojo/i18n!MOTW/l10n/nls/motw dojo/i18n!l10n/nls/feedbackDialog MW/feedbackdialog/_AbstractFeedbackService".split(" "),function(g,f,e,d,b,a,c,h){return g([h],{constructor:function(){this._deferred=new f;b.registerResponseHandler("FeedbackResponse",this._handleSubmitFeedbackResponse,this);b.registerFaultHandler("Feedback",
this._handleSubmitFeedbackFault,this)},submitFeedback:function(c){this._deferred=new f;var h=d.getSystemInfo();h.TYPE="motw";h.VERSION=a.versionNumber;b.sendMessage({Feedback:{summary:c.subject,description:c.feedback,nameValuePairs:h}});return this._deferred.promise},_handleSubmitFeedbackResponse:function(a){e.forEach(a,function(a){a.messageFaults&&0<a.messageFaults.length?this._handleSubmitFeedbackFault(a):this._deferred.resolve(c.udcSuccessMessage)},this)},_handleSubmitFeedbackFault:function(a){this._deferred.reject(c.udcFailureMessage)}})})},
"MW/feedbackdialog/_AbstractFeedbackService":function(){define(["dojo/_base/declare"],function(g){return g([],{submitFeedback:function(f){throw"This function must be implemented in a sub class and return a promise.";}})})},"MW/feedbackdialog/FeedbackWithEmailContent":function(){define("dojo/_base/declare mw-form/TextField mw-form/TextArea dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!./templates/FeedbackWithEmailContentTemplate.html dojo/i18n!l10n/nls/feedbackDialog ./_AbstractFeedbackContent".split(" "),
function(g,f,e,d,b,a,c,h,k){return g([d,b,a,k],{templateString:c,baseClass:"feedbackWithEmailContent",headingLabel:h.feedbackContentHeadingLabelDefault,subjectPlaceholder:h.feedbackContentSubjectPlaceholderDefault,feedbackPlaceholder:h.feedbackContentFeedbackPlaceholderDefault,feedbackBottomLabel:h.feedbackContentFeedbackBottomLabelDefault,emailPlaceholder:h.feedbackContentEmailPlaceholderDefault,emailBottomLabel:h.feedbackContentEmailBottomLabelDefault,requireSubjectField:null,emailEditable:!0,subjectInputContainerNode:null,
feedbackInputContainerNode:null,emailInputContainerNode:null,subjectInput:null,feedbackInput:null,emailInput:null,constructor:function(a){a=a||{};a.requireSubjectField&&(this.subjectPlaceholder=h.feedbackContentSubjectPlaceholderRequired)},buildRendering:function(){this.inherited(arguments);this.subjectInput=new f({placeholder:this.subjectPlaceholder,"class":"feedback-input","data-test-id":"feedback.subjectInput"});this.feedbackInput=new e({placeholder:this.feedbackPlaceholder,"class":"feedback-input-textarea",
"data-test-id":"feedback.feedbackInput"});this.emailInput=new f({placeholder:this.emailPlaceholder,"class":"feedback-input","data-test-id":"feedback.emailInput",editable:this.emailEditable});this.subjectInput.placeAt(this.subjectInputContainerNode);this.feedbackInput.placeAt(this.feedbackInputContainerNode);this.emailInput.placeAt(this.emailInputContainerNode)},getFeedback:function(){return{subject:this.subjectInput.get("value"),feedback:this.feedbackInput.get("value"),email:this.emailInput.get("value")}},
validateFeedback:function(){var a="",c=this.feedbackInput.get("value"),b=this.subjectInput.get("value");""===c&&(a=h.feedbackContentValidationMessage);this.requireSubjectField&&""===b&&(a=h.feedbackSubjectValidationMessage);return a},_setHeadingLabelAttr:{node:"headingLabelNode",type:"innerHTML"},_setFeedbackBottomLabelAttr:{node:"feedbackBottomLabelNode",type:"innerHTML"},_setEmailTopLabelAttr:{node:"emailTopLabelNode",type:"innerHTML"},_setEmailBottomLabelAttr:{node:"emailBottomLabelNode",type:"innerHTML"}})})},
"MW/feedbackdialog/_AbstractFeedbackContent":function(){define(["dojo/_base/declare"],function(g){return g([],{getFeedback:function(){throw"This function must be implemented in a sub class.";},validateFeedback:function(){throw"This function must be implemented in a sub class.";}})})},"MW/feedbackdialog/FeedbackDialog":function(){define("dojo/_base/declare dojo/dom-construct dojo/_base/lang mw-form/PushButton dijit/_WidgetBase dijit/_TemplatedMixin dojo/text!./templates/FeedbackDialogTemplate.html dojo/i18n!l10n/nls/feedbackDialog".split(" "),
function(g,f,e,d,b,a,c,h){return g([b,a],{templateString:c,baseClass:"feedback-dialog",privacyPolicyLinkLabel:h.feedbackDialogPrivacyPolicyLinkLabel,submitButtonLabel:h.feedbackDialogSubmitButtonLabel,cancelButtonLabel:h.feedbackDialogCancelButtonLabel,statusMessageLabel:"",title:h.feedbackDialogTitleDefault,feedbackContentNode:null,privacyPolicyLinkNode:null,statusIconNode:null,buttonContainerNode:null,submitButton:null,cancelButton:null,constructor:function(a){if(!a.feedbackContent)throw"Feedback content required to display FeedbackDialog.";
},buildRendering:function(){this.inherited(arguments);this.submitButton=new d({text:"Submit","class":"feedback-button","data-test-id":"feedback.submitButton"});this.cancelButton=new d({text:"Cancel","class":"feedback-button","data-test-id":"feedback.cancelButton"});f.place(this.submitButton.domNode,this.buttonContainerNode);f.place(this.cancelButton.domNode,this.buttonContainerNode)},postCreate:function(){this.inherited(arguments);f.place(this.feedbackContent.domNode,this.feedbackContentNode);this.feedbackContent.startup();
this.submitButton.on("click",e.hitch(this,function(a){this.emit("submitClicked",a)}));this.cancelButton.on("click",e.hitch(this,function(a){this.emit("cancelClicked",a)}));this.privacyPolicyLinkNode.onclick=e.hitch(this,function(){this.emit("privacyPolicyClicked",{url:this.privacyPolicyLinkNode.getAttribute("href")});return!1})},displayMessage:function(a,c){"error"===a?this.statusIconNode.setAttribute("class","feedback-status-errorIcon"):"success"===a?this.statusIconNode.setAttribute("class","feedback-status-successIcon"):
this.statusIconNode.setAttribute("class","feedback-statusMessage-noIcon");this.set("statusMessageLabel",c)},_setStatusMessageLabelAttr:{node:"statusMessageNode",type:"innerHTML"},_setPrivacyPolicyLinkLabelAttr:{node:"privacyPolicyLinkNode",type:"innerHTML"},_setTitleAttr:function(a){this._set("title",a)},_setSubmitButtonLabelAttr:function(a){this.submitButton.set("text",a)},_setSubmitButtonDisabledAttr:function(a){this.submitButton.set("disabled",a)},_setCancelButtonLabelAttr:function(a){this.cancelButton.set("text",
a)},_setCancelButtonDisabledAttr:function(a){this.submitButton.set("disabled",a)}})})},"MW/feedbackdialog/FeedbackController":function(){define("dojo/_base/declare dojo/_base/lang dojo/on dijit/Destroyable mw-remote/Remote dojo/i18n!l10n/nls/feedbackDialog mw-dialog-utils/_DialogUtils".split(" "),function(g,f,e,d,b,a,c){return g([d],{constructor:function(a,c){this._feedbackService=a;this._feedbackDialog=c;this._feedbackServicePromise=this._modalDialog=null;this.own(e(this._feedbackDialog,"submitclicked",
f.hitch(this,"_handleSubmitClicked")),e(this._feedbackDialog,"cancelclicked",f.hitch(this,"_handleCancelClicked")),e(this._feedbackDialog,"privacypolicyclicked",f.hitch(this,"_handlePrivacyPolicyLinkClicked")))},openFeedbackDialog:function(){this._modalDialog=c.displayModalDialog(this._feedbackDialog.get("title"),this._feedbackDialog,[],{closeCallback:f.hitch(this,"_cancelFeedbackServicePromise"),dialogClass:"mwFeedbackDialog"});this._feedbackDialog.displayMessage("none","")},closeFeedbackDialog:function(){this._cancelFeedbackServicePromise();
this._modalDialog.close();this.destroy()},_cancelFeedbackServicePromise:function(){this._feedbackServicePromise&&this._feedbackServicePromise.cancel()},_handleSubmitClicked:function(){var c=this._feedbackDialog.get("feedbackContent"),b=c.validateFeedback();b?this._feedbackDialog.displayMessage("error",b):(this._feedbackDialog.set("submitButtonLabel",a.feedbackDialogSubmittingButtonLabel),this._feedbackDialog.set("submitButtonDisabled",!0),c=c.getFeedback(),this._feedbackServicePromise=this._feedbackService.submitFeedback(c),
this._feedbackServicePromise.then(f.hitch(this,"_handleSubmissionSuccess"),f.hitch(this,"_handleSubmissionFailure")))},_handleCancelClicked:function(){this.closeFeedbackDialog()},_handlePrivacyPolicyLinkClicked:function(a){b.sendMessage({FEval:{"function":"web",arguments:[a.url],nargout:0,priority:1}},{},"FeedbackDialogPrivacyPolicyLink")},_handleSubmissionSuccess:function(c){this._feedbackDialog.set("submitButtonDisabled",!0);this._feedbackDialog.set("submitButtonLabel",a.feedbackDialogSubmittedButtonLabel);
this._feedbackDialog.set("cancelButtonLabel",a.feedbackDialogCloseButtonLabel);this._feedbackDialog.displayMessage("success",c)},_handleSubmissionFailure:function(c){this._feedbackServicePromise.isCanceled()||(this._feedbackDialog.set("submitButtonDisabled",!1),this._feedbackDialog.set("submitButtonLabel",a.feedbackDialogSubmitButtonLabel),this._feedbackDialog.displayMessage("error",c))}})})},"mw-dialog-utils/_DialogUtils":function(){define("dijit/_Widget dijit/focus dijit/form/Button dojo/_base/declare dojo/_base/lang dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/keys dojo/on dojo/window ./Dialog ./FloatingPane mw-dnd/BoundedMover dojo/i18n!./l10n/nls/dialog mw-deprecation-utils/deprecation".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u){u.deprecated({deprecated:{module:"MW/dialog/_DialogUtils"},replacement:{module:"mw-dialogs/Dialogs"},geckNumber:1471429});var v=d([r],{postCreate:function(){this.inherited(arguments);this.ownerDocumentBody.appendChild(this.domNode);this._setDomStyleToCenter();this.own(p(this.domNode,"keydown",b.hitch(this,"_onKey")))},_onKey:function(a){a.keyCode===m.ESCAPE&&(this.close(),a.stopPropagation(),a.preventDefault())},resize:function(a){this.inherited(arguments);
a||this._setDomStyleToCenter()},_setDomStyleToCenter:function(){var a=this.domNode,c=n.getBox(this.ownerDocument),h=k.position(a);l.set(a,{left:Math.floor(c.l+(c.w-h.w)/2)+"px",top:Math.floor(c.t+(c.h-h.h)/2)+"px"})}});return{displayModalDialog:function(c,b,d,e){var k=new q({title:c||"","class":"mwMessageDialog mwModalMessageDialog "+(e.dialogClass?e.dialogClass:""),closable:!1===e.closable?!1:!0,content:b,autofocus:void 0===e.autofocus?!0:e.autofocus});d instanceof Array&&0<d.length&&(c=this._constructButtonContainer(d,
k),h.place(c,k.containerNode,"last"));k.close=function(){k._showPromise.isResolved()?k.hide():k._showPromise.then(function(){k.hide()})};k.onHide=function(){e.closeCallBack&&"function"===typeof e.closeCallBack&&e.closeCallBack();k.destroyRecursive()};k.onCancel=function(){k.close()};e["data-test-id"]&&a.set(k.domNode,"data-test-id",e["data-test-id"]);k._showPromise=k.show();k._showPromise.then(function(){k.closeButtonNode.setAttribute("tabindex","0")});b.startup();return k},displayNonModalDialog:function(c,
b,d,e){c=new v({title:c,"class":"mwMessageDialog mwNonModalMessageDialog "+(e.dialogClass?e.dialogClass:""),resizable:e.resizable,dockable:!1,content:b});d instanceof Array&&0<d.length&&(d=this._constructButtonContainer(d,c),h.place(d,c.containerNode,"after"));c.onClose=function(){e.closeCallBack&&"function"===typeof e.closeCallBack&&e.closeCallBack()};e["data-test-id"]&&a.set(c.domNode,"data-test-id",e["data-test-id"]);c.startup();c.bringToTop();c.show();return c},_constructButtonContainer:function(c,
b){var d=h.create("div",{"class":"mwDialogButtonContainer"});b.buttonWidgets=[];c.forEach(function(c,h){var e=this._createButton(c,b);c["data-test-id"]&&a.set(e.domNode,"data-test-id",c["data-test-id"]);b.buttonWidgets[h]=e;d.appendChild(e.domNode)},this);return d},_createButton:function(a,c){var h=a.label||b.getObject(a.name,!1,t)||a.name,d=this._getHandlerFunction(a,c);return new e({label:h,onClick:d})},_getHandlerFunction:function(a,c){var h=a.buttonHandler.scope,d;d=a.buttonHandler.handler;return d=
h?b.hitch(h,d,a,c):b.hitch(this,d,a,c)}}})},"MOTW/feedback/FeedbackDialogEnum":function(){define([],function(){return Object.freeze({REQUIRE_SUBJECT:!0,NOT_REQUIRE_SUBJECT:!1,EMAIL_EDITABLE:!0,EMAIL_NOT_EDITABLE:!1})})},"MOTW/editor/plugins/save/MatlabOnlineSaveHandlerFactory":function(){define(["MOTW/editor/plugins/save/MatlabOnlineSaveHandler","MOTW/motw/MotwApp","MW/rtc/plugins/debug/DebugServicesFactory"],function(g,f,e){var d=null;return{getInstance:function(){if(null===d){var b=e.getInstance();
d=new g(b,f)}return d}}})},"MOTW/editor/plugins/save/MatlabOnlineSaveHandler":function(){define("dojo/aspect dojo/_base/declare dojo/_base/lang dojo/i18n!MOTW/l10n/nls/motw dojo/promise/all mw-notifications/Notifications MW/rtc/abstract/AbstractPlugin".split(" "),function(g,f,e,d,b,a,c){return f(c,{_PROMPT_WHEN_SAVING_IN_DEBUG_MODE:!1,constructor:function(a,c){this._debugServices=a;this._motwApp=c;this._saveReadyManagers=[];this._needsSaveOnQuitDebugging=!1;this._saveSessionWasEnabled=this._motwApp.sessionService&&
this._motwApp.sessionService.isSessionSaveEnabled();this.own(g.after(this._debugServices,"onDebugModeChanged",e.hitch(this,"_handleDebugModeChanged"),!0))},registerSaveReadyPlugin:function(a){this._saveReadyManagers.push(a)},unregisterSaveReadyPlugin:function(a){this._saveReadyManagers=this._saveReadyManagers.filter(function(c){return c!==a})},save:function(a){this._debugServices.isPaused?this._PROMPT_WHEN_SAVING_IN_DEBUG_MODE?this._showSaveWhileDebuggingDialog(a):this._stopDebuggingAndSave():this._motwApp.fileDataService.saveOpenFiles()},
_showSaveWhileDebuggingDialog:function(c){var b=d.debugSaveDialogTitle,f=d.debugSaveDialogText;c=c(e.hitch(this,"_stopDebuggingAndSave"));a.displayConfirmDialog(b,f,c)},_stopDebuggingAndSave:function(){this._needsSaveOnQuitDebugging=!0;this._motwApp.executionService.executionEval("dbquit all")},_performSave:function(){var a=this._saveReadyManagers.map(function(a){return a.getReadyPromise()});b(a).then(function(){this._motwApp.fileDataService.saveOpenFiles()})},_handleDebugModeChanged:function(a){a?
(this._saveSessionWasEnabled=this._motwApp.sessionService.isSessionSaveEnabled(),this._motwApp.sessionService.disableSessionSave()):(this._saveSessionWasEnabled&&this._motwApp.sessionService.enableSessionSave(),this._needsSaveOnQuitDebugging&&(this._needsSaveOnQuitDebugging=!1,this._performSave()))}})})},"MW/rtc/abstract/AbstractPlugin":function(){define(["dojo/_base/declare","dijit/Destroyable"],function(g,f){return g(f,{})})},"MW/rtc/plugins/debug/DebugServicesFactory":function(){define(["MW/rtc/plugins/debug/DebugServices"],
function(g){var f=null;return{getInstance:function(){null===f&&(f=new g);return f}}})},"MW/rtc/plugins/debug/DebugServices":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect mw-messageservice/MessageService MW/rtc/plugins/debug/AbstractDebuggerService MW/rtc/plugins/debug/DebugServicesChannels MW/rtc/plugins/debug/StackFrame".split(" "),function(g,f,e,d,b,a,c){return g(b,{_STOP_IF_ERROR_FLAG:1,_STOP_IF_WARNING_FLAG:2,_STOP_IF_NAN_INF_FLAG:8,constructor:function(c){this.messageService=
c||d;this.messageService.subscribe(a.DEBUGGER_STATE_CHANGED,"_handleDebugModeChanged",this);this.messageService.subscribe(a.DBCONT_EVENT,"_handleDBContEvent",this);this.messageService.subscribe(a.DBSTOP_EVENT,"_handleDBStopEvent",this);this.messageService.subscribe(a.STACK_CHANGE,"_handleStackChanged",this);this.messageService.subscribe(a.DEBUG_STOP_CONDITIONS_EVENT,"_handleDbStopConditionsEvent",this);this.isPaused=this.isDebugging=!1;this._requestInitialState();this.messageService.start&&(this.connection=
e.after(this.messageService,"start",f.hitch(this,"_requestInitialState"),!0))},_requestInitialState:function(){this.messageService.publish(a.DEBUGGER_STATE_REQUEST,{});this.messageService.publish(a.STACK_REQUEST,{});this.messageService.publish(a.DB_STOP_IF_STATUS,{})},_handleDebugModeChanged:function(a){this.isPaused=this.isDebugging=a.data.isDebugging;this.onDebugModeChanged(this.isDebugging)},_handleStackChanged:function(a){var b=a.data.currentIndex,d=a.data.lineNumbers,e=a.data.fullFileNames;a=
a.data.stack.map(function(a,h){return new c(a,e[h],d[h])});this.onStackChanged(a,b)},onStackChanged:function(a,c){},_handleDbStopConditionsEvent:function(a){a=this._createDBStopIfConditionObject(a.data.dbStopConditions);this.onDbStopConditionsEvent(a)},_createDBStopIfConditionObject:function(a){return{stopIfError:(a&this._STOP_IF_ERROR_FLAG)===this._STOP_IF_ERROR_FLAG,stopIfWarning:(a&this._STOP_IF_WARNING_FLAG)===this._STOP_IF_WARNING_FLAG,stopIfNanInf:(a&this._STOP_IF_NAN_INF_FLAG)===this._STOP_IF_NAN_INF_FLAG}},
onDbStopConditionsEvent:function(a){},onDebugModeChanged:function(a){},_handleDBContEvent:function(){this.isPaused=!1;this.onDBCont()},onDBCont:function(){},_handleDBStopEvent:function(a){var c=a.data.fileName;a=a.data.lineNumber;this.isPaused=!0;this.onDBStop(c,a)},onDBStop:function(a,c){},debugContinue:function(){this.messageService.publish(a.DEBUG_CONTINUE,{})},debugPause:function(){this.messageService.publish(a.DEBUG_PAUSE,{})},debugStep:function(){this.messageService.publish(a.DEBUG_STEP,{})},
debugStepIn:function(){this.messageService.publish(a.DEBUG_STEP_IN,{})},debugStepOut:function(){this.messageService.publish(a.DEBUG_STEP_OUT,{})},debugExit:function(){this.messageService.publish(a.DEBUG_EXIT,{})},dbUpDown:function(c){this.messageService.publish(a.STACK_UPDOWN,{deltaValue:c})},requestStackState:function(){this.messageService.publish(a.STACK_REQUEST,{})},setDBStopIfError:function(c){this.messageService.publish(a.DB_STOP_IF_ERROR,c)},setDBStopIfWarning:function(c){this.messageService.publish(a.DB_STOP_IF_WARNING,
c)},setDBStopIfNanInf:function(c){this.messageService.publish(a.DB_STOP_IF_NAN_INF,c)},dispose:function(){this.messageService.unsubscribe(a.DEBUGGER_STATE_CHANGED,"_handleDebugModeChanged",this);this.messageService.unsubscribe(a.STACK_CHANGE,"_handleStackChanged",this);this.messageService.unsubscribe(a.DBCONT_EVENT,"_handleDBContEvent",this);this.messageService.unsubscribe(a.DBSTOP_EVENT,"_handleDBStopEvent",this);this.messageService.unsubscribe(a.DEBUG_STOP_CONDITIONS_EVENT,"_handleDbStopConditionsEvent",
this);this.connection&&this.connection.remove()}})})},"MW/rtc/plugins/debug/AbstractDebuggerService":function(){define(["dojo/_base/declare"],function(g){return g(null,{debugContinue:function(){throw Error("Unimplemented API: MW.rtc.plugins.debug.DebugActions.debugContinue");},debugStep:function(){throw Error("Unimplemented API: MW.rtc.plugins.debug.DebugActions.debugStep");},debugStepIn:function(){throw Error("Unimplemented API: MW.rtc.plugins.debug.DebugActions.debugStepIn");},debugStepOut:function(){throw Error("Unimplemented API: MW.rtc.plugins.debug.DebugActions.debugStepOut");
},debugExit:function(){throw Error("Unimplemented API: MW.rtc.plugins.debug.DebugActions.debugExit");}})})},"MW/rtc/plugins/debug/DebugServicesChannels":function(){define([],function(){return{DEBUGGER_STATE_CHANGED:"/editor/debugger/debugger-state-change",DEBUGGER_STATE_REQUEST:"/editor/debugger/debugger-state-request",DBSTOP_EVENT:"/editor/debugger/dbstop",DBCONT_EVENT:"/editor/debugger/dbcont",STACK_CHANGE:"/editor/debugger/stack-change",STACK_REQUEST:"/editor/debugger/stack-request",DEBUG_STOP_CONDITIONS_EVENT:"/editor/debugger/debug-stop-if",
DEBUG_CONTINUE:"/editor/debugger/debug-continue",DEBUG_PAUSE:"/editor/debugger/debug-pause",DEBUG_STEP:"/editor/debugger/debug-step",DEBUG_STEP_IN:"/editor/debugger/debug-step-in",DEBUG_STEP_OUT:"/editor/debugger/debug-step-out",DEBUG_EXIT:"/editor/debugger/debug-exit",STACK_UPDOWN:"/editor/debugger/stack-up-down",DB_STOP_IF_ERROR:"/editor/debugger/debug-stop-if-error",DB_STOP_IF_WARNING:"/editor/debugger/debug-stop-if-warning",DB_STOP_IF_NAN_INF:"/editor/debugger/debug-stop-if-nan-inf",DB_STOP_IF_STATUS:"/editor/debugger/debug-stop-if-status-request"}})},
"MW/rtc/plugins/debug/StackFrame":function(){define(["dojo/_base/declare"],function(g){return g(null,{constructor:function(f,e,d){this._name=f;this._fullPath=e||null;this._lineNumber=d||null},getName:function(){return this._name},getFullPath:function(){return this._fullPath},getLineNumber:function(){return this._lineNumber},destroy:function(){}})})},"addressbar-ui/AddressBarService":function(){define(["dojo/_base/declare","dojo/Evented","dojo/_base/lang","addressbar-ui/MSHelperForAddressBarServices"],
function(g,f,e,d){return g([f],{constructor:function(b){this.messageService=new d({callback:e.hitch(this,"_responseHandler")})},start:function(){},reset:function(){},stop:function(){this.reset()},listFolders:function(b){this.messageService.publish({request:"listFolderRequest",path:b})},listOfLocationOptions:function(b){this.messageService.publish({request:"listOfLocationOptions",path:b})},_responseHandler:function(b){"listFolderResponse"===b.identifier?this.emit("listFolderResponse",b.data):"listOfLocationOptionsResponse"===
b.identifier&&this.emit("listOfLocationOptionsResponse",b.data)}})})},"addressbar-ui/MSHelperForAddressBarServices":function(){define(["dojo/_base/declare","dojo/_base/lang","mw-messageservice/MessageService"],function(g,f,e){return g([],{_publishChannel:"",_subscribeChannel:"",_messageType:"",_callbackFunction:"",constructor:function(d){this.args=d||{};this._publishChannel=this.getChannelPrefix();this._subscribeChannel=this.getChannelPrefix();d&&(this.subscribe(f.hitch(this,this._handleJavaResponse)),
this._messageType=d.messageType,this._callbackFunction=d.callback)},publish:function(d){e.publish(this._publishChannel,d)},subscribe:function(d){e.subscribe(this._subscribeChannel,d)},getChannelPrefix:function(){return"/matlab/addressBarServicesChannel"},_handleJavaResponse:function(d){this._callbackFunction(d.data)}})})},"currentfolderbrowser-ui/service/FileDataService":function(){define("dojo/_base/declare dojo/_base/Deferred dojo/_base/lang dojo/Evented dojo/on dojo/store/Memory mw-log/Log mw-remote/Remote mw-remote/remoteFaultCodes mw-filename-utils/FileNameUtil mw-utils/Utils dojo/i18n!../l10n/resources/currentfolderbrowser/nls/fileDataServiceFaultMessages ./FileDataStore mw-messageservice/MessageService".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q){var r=g([a],{size:function(){return this.query().length}});return g([d],{constructor:function(a){a=a||{};this._pathService=a.pathService;this.fileStore=new n({fileService:this});this.openedFilesDataStore=new r;this.classifier=a.classifier;q.subscribe("/matlab/FileDataServiceChannel",this._responseHandler,this)},_responseHandler:function(a){try{var c=[a.data];"ListFolderResponse"===c[0].identifier?this._handleListFolderResponse(c):"newFolderCreationResponse"===
c[0].identifier?this._handleCreateFolderResponse(c):"renameFileResponse"===c[0].identifier?this._handleRenameFileResponse(c):"renameNewFileResponse"===c[0].identifier&&this._handleRenameFileResponse(c)}catch(h){}},reset:function(){this.fileStore.resetStore();this.openedFilesDataStore.setData([])},getAllOpenedFileInfoPaths:function(){var a=[];this.openedFilesDataStore.query().forEach(function(c){a.push(c.fileInfo)});return a},setWraDataService:function(a){this._wraService=a},start:function(){q.publish("/matlab/FileDataServiceChannel",
{type:"startServerSide",filepaths:[]});var a=this.classifier?":"+this.classifier:"";h.registerDefaultMessageFactory("UpdateFile"+a,this._createUpdateFileRequest,this);h.registerDefaultMessageFactory("CloseFile"+a,this._createCloseAllFilesRequest,this);h.registerResponseHandler("CreateFileResponse"+a,this._handleCreateFileResponse,this);h.registerResponseHandler("DeleteFileResponse"+a,this._handleDeleteFileResponse,this);h.registerResponseHandler("OpenFileResponse"+a,this._handleOpenFileResponse,this);
h.registerResponseHandler("CloseFileResponse"+a,this._handleCloseFileResponse,this);h.registerResponseHandler("UpdateFileResponse"+a,this._handleUpdateFileResponse,this);h.registerResponseHandler("MoveFileResponse"+a,this._handleMoveFileResponse,this);h.registerFaultHandler("CreateFile"+a,this._logErrorInConsole,this);h.registerFaultHandler("DeleteFile"+a,this._logErrorInConsole,this);h.registerFaultHandler("OpenFile"+a,this._logErrorInConsole,this);h.registerFaultHandler("CloseFile"+a,this._logErrorInConsole,
this);h.registerFaultHandler("UpdateFile"+a,this._logErrorInConsole,this);h.registerFaultHandler("MoveFile"+a,this._logErrorInConsole,this);this._pathService&&b(this._pathService,"CWDChanged",e.hitch(this,this._handleCurrentFolderChange))},lockListFolderRequestAndResponse:function(){this.isListFolderRequestAndResponseLocked=!0},unLockListFolderRequestAndResponse:function(){this.isListFolderRequestAndResponseLocked=!1;this.listFolder(this.getCurrentFolderInfo())},stop:function(){var a=this.classifier?
":"+this.classifier:"";h.deregisterDefaultMessageFactory("UpdateFile"+a,this._createUpdateFileRequest,this);h.deregisterDefaultMessageFactory("CloseFile"+a,this._createCloseAllFilesRequest,this);h.deregisterResponseHandler("CreateFileResponse"+a,this._handleCreateFileResponse,this);h.deregisterResponseHandler("DeleteFileResponse"+a,this._handleDeleteFileResponse,this);h.deregisterResponseHandler("OpenFileResponse"+a,this._handleOpenFileResponse,this);h.deregisterResponseHandler("CloseFileResponse"+
a,this._handleCloseFileResponse,this);h.deregisterResponseHandler("UpdateFileResponse"+a,this._handleUpdateFileResponse,this);h.deregisterResponseHandler("MoveFileResponse"+a,this._handleMoveFileResponse,this);h.deregisterFaultHandler("CreateFile"+a,this._logErrorInConsole,this);h.deregisterFaultHandler("DeleteFile"+a,this._logErrorInConsole,this);h.deregisterFaultHandler("OpenFile"+a,this._logErrorInConsole,this);h.deregisterFaultHandler("CloseFile"+a,this._logErrorInConsole,this);h.deregisterFaultHandler("UpdateFile"+
a,this._logErrorInConsole,this);h.deregisterFaultHandler("MoveFile"+a,this._logErrorInConsole,this);this.reset()},refreshOpenFolders:function(){this._listFolderRequest(this._createDefaultListFolderMessage(),void 0)},_listFolderRequest:function(a,c){a&&0<a.length&&q.publish("/matlab/FileDataServiceChannel",{type:"ListFolder",filePaths:a,context:c?c:{type:""}})},onExpandOrCollapse:function(a,c){if(c)this.onExpand(a);else this.onCollapse(a)},onExpand:function(a){a=[{path:a}];this._listFolderRequest(a);
q.publish("/matlab/FileDataServiceChannel",{type:"RegisterChildren",filePaths:a})},onCollapse:function(a){q.publish("/matlab/FileDataServiceChannel",{type:"UnregisterChildren",filePaths:[{path:a}]})},_handleListFolderResponse:function(a){var c=this.fileStore,h=this;a.forEach(function(a){h.isListFolderRequestAndResponseLocked||(c.syncFolder(a.folder,a.folderContents),a.context&&("renameFile"===a.context.type?h.renameFileListFolderComplete.resolve(a.context):"moveFile"===a.context.type&&h.moveFileListFolderComplete.resolve(a.context)))})},
_handleCurrentFolderChange:function(){this.currentWorkingFolder=this.getCurrentFolderInfo();this.listFolder(this.getCurrentFolderInfo())},_logErrorInConsole:function(a){c.error("Error received in FileDataService");c.dir(a)},currentDirectory:function(a){a&&(!this.getCurrentFolderInfo()||a!==l.pathFromFileInfo(this.getCurrentFolderInfo()))&&this._pathService.setMATLABCWD(a)},getUserIdForPublish:function(){return this._wraService.getCurrentUserInfo().userId},getUserPublishLocation:function(){return l.constructPathFromUserName(this.getUserIdForPublish())},
getPublishURLFromMATLABDriveURL:function(a){return l.convertToPublishURLFromMATLABDriveURL(a,this.getUserPublishLocation())},listFolder:function(a,c){this.isListFolderRequestAndResponseLocked||(l.assertIsFileInfo(a),this._listFolderRequest([{path:l.pathFromFileInfo(a)}],c))},createFile:function(a,c){l.assertIsFile(a);var b=l.remoteFile(a),d=a.fileInfo.location,e={file:b},k={};k.CreateFile={file:b,updateIfExists:c};b.fileInfo.isDirectory?this._createNewFolderRequest(b):h.sendMessage(k,e,this.classifier);
this._listFolderRequest([{path:d}],e)},_createNewFolderRequest:function(a){q.publish("/matlab/FileDataServiceChannel",{type:"createNewFolder",name:a.fileInfo.name,filePaths:[{path:a.fileInfo.location}]})},renameFile:function(a,h){l.assertIsFileInfo(a);l.assertIsFileInfo(h);var b=l.pathFromFileInfo(a);c.log("renameFile"+b);this.saveOpenFiles();this._queryForRelatedOpenFiles(b).forEach(e.hitch(this,function(a){this.openedFilesDataStore.remove(l.pathFromFileInfo(a.fileInfo));this.onFileClose(a.fileInfo)}));
q.publish("/matlab/FileDataServiceChannel",{type:"renameFileRequest",oldName:a.name,newName:h.name,filePaths:[{path:a.location}]})},renameNewFile:function(a,h){l.assertIsFileInfo(a);l.assertIsFileInfo(h);var b=l.pathFromFileInfo(a);c.log("renameNewFile"+b);this.saveOpenFiles();this._queryForRelatedOpenFiles(b).forEach(e.hitch(this,function(a){this.openedFilesDataStore.remove(l.pathFromFileInfo(a.fileInfo));this.onFileClose(a.fileInfo)}));q.publish("/matlab/FileDataServiceChannel",{type:"renameNewFileRequest",
oldName:a.name,newName:h.name,filePaths:[{path:a.location}]})},deleteFile:function(a){var c={};l.assertIsFileInfo(a);this._isFileOpen(a)&&this._doCloseFile(a,!1);c.DeleteFile={path:l.pathFromFileInfo(a)};h.sendMessage(c,null,this.classifier);this._listFolderRequest([{path:l.fileInfoFromPath(a.location).location}],void 0)},cdUpOneFolder:function(){var a=this.getCurrentFolderInfo().location;this._pathService.setMATLABCWD(a)},moveFile:function(a,c){var b=[],d={},e={};e.listFolderTargetPath=[{path:l.pathFromFileInfo(c)}];
e.fileInfos=a;a.forEach(function(a){this.fileStore.store.remove(l.pathFromFileInfo(a))},this);l.isFileInfo(c)&&c.isDirectory&&(a.forEach(function(a){b.push({srcPath:l.pathFromFileInfo(a),destPath:l.pathFromFileInfo(c)})},this),this.saveOpenFiles(),d.MoveFile=0===m.getArrayLength(b)?[{}]:b,h.sendMessage(d,e,this.classifier))},openFile:function(a,c){l.assertIsFileInfo(a);this._showIfOpen(a,c)||h.sendMessage({OpenFile:{path:l.pathFromFileInfo(a)}},{showVersionHistory:c},this.classifier)},closeFile:function(a){this._doCloseFile(a,
!0)},setFileModified:function(a){c.assert(this._isFileOpen(a.fileInfo),"MW.FileDataService: cannot mark '"+l.pathFromFileInfo(a.fileInfo)+"' modified because it is not open.");c.assert(!a.fileInfo.filePermissions||a.fileInfo.filePermissions.canWrite,"MW.FileDataService: cannot mark '"+l.pathFromFileInfo(a.fileInfo)+"' modified because it is read-only");this._setModifiedDate(a,new Date,!1)},setFileClean:function(a){this._setModifiedDate(a,null,!0)},isFileModified:function(a){return!!this._getModifiedDate(a)},
saveFile:function(a,c){if(a&&this.isFileModified(a)&&!a.savePending){a.savePending=!0;this.openedFilesDataStore.put(a);var b=l.remoteFile(a),d=l.pathFromFileInfo(b.fileInfo),e={ModifiedDates:{},postSaveWork:c};e.ModifiedDates[d]=this._getModifiedDate(b);h.sendMessage({UpdateFile:[{file:b}]},e)}else c&&c()},saveOpenFiles:function(a){},doesOpenModifiedFileExist:function(){var a,c=this.openedFilesDataStore.query();for(a=0;a<c.length;a+=1)if(this.isFileModified(c[a]))return!0;return!1},doesFileExistAtLocation:function(a,
c){var h=!1;c=l.normalizeLocation(c);var b=c+a;null!==b&&0<this.getFileInfoFromPath(b).length&&(h=!0);return h},_doCloseFile:function(a,h){var b=this._getOpenFile(a);c.assert(b,"MW.FileDataService: cannot close '"+l.pathFromFileInfo(a)+"' because it is not open.");var d=h&&this.isFileModified(b),b=this._prepareFileForClose(b);this.openedFilesDataStore.remove(l.pathFromFileInfo(b.fileInfo));this._sendFileCloseMessage(b,d)},_sendFileCloseMessage:function(a,c){h.sendMessage({CloseFile:{file:a,updateFile:c}},
null,this.classifier)},_prepareFileForClose:function(a){this.onFileClose(a.fileInfo);return a=l.remoteFile(a)},_isFileOpen:function(a){return this._getOpenFile(a)},_handleCreateFileResponse:function(a,c){a.forEach(function(a){var h;if(a.messageFaults&&0<a.messageFaults.length)this.onFileMessageFault(a);else if(!a.fileInfo.isDirectory&&(this.fileStore.addOrUpdateFile(a.fileInfo),this.onCreate(a.fileInfo),h=c.file))h.fileInfo=a.fileInfo,this.openedFilesDataStore.put(dojo.mixin(h,{modifiedDate:null,
savePending:!1,id:l.pathFromFileInfo(h.fileInfo)})),this.onFileOpen(h,!1,a.lineNumber,a.column)},this)},_handleCreateFolderResponse:function(a){"newFolderCreationSuccess"===a.identifier?(this.fileStore.addOrUpdateFile(a.folder),this.onCreate(a.folder)):(a.messageFaults=[{message:p.NewFolderCreationError.replace("{0}",a.folder)}],this.onFileMessageFault(a))},_handleRenameFileResponse:function(a){var c=this,h,b={},d=new f;a.forEach(function(a){if(a.messageFaults&&0<a.messageFaults.length)this.onFileMessageFault(a);
else h=a.fileInfo.path,b.type="renameFile",b.newFilePath=h,c.renameFileListFolderComplete=d,c._listFolderRequest(c._createDefaultListFolderMessage(),b),f.when(c.renameFileListFolderComplete,function(a){var b=l.fileInfoFromPath(h);b.path=h;c.onRename(b);c.renameFileListFolderComplete=null;return a})},this)},_handleDeleteFileResponse:function(a){a.forEach(function(a){if(a.messageFaults&&0<a.messageFaults.length)this.onFileMessageFault(a)},this)},_handleOpenFileResponse:function(a,c){var h=c&&c.showVersionHistory;
a.forEach(function(a){if(a.messageFaults&&0<a.messageFaults.length)this.onFileMessageFault(a);else this._showIfOpen(a.file.fileInfo,h,a.lineNumber,a.column,a.isDebugEvent)||(this.openedFilesDataStore.put(dojo.mixin(a.file,{modifiedDate:null,savePending:!1,id:l.pathFromFileInfo(a.file.fileInfo)})),this.onFileOpen(a.file,h,a.lineNumber,a.column,a.isDebugEvent))},this)},_showIfOpen:function(a,c,h,b,d){return this._isFileOpen(a)?(this.onFileShow(this._getOpenFile(a),c,h,b,d),!0):!1},_handleCloseFileResponse:function(a){this.onFileClosed(a[0].fileInfo);
c.log("File closed:"+a[0].fileInfo.name)},_handleUpdateFileResponse:function(a,c){a.forEach(function(a){var h=this._getOpenFile(a.fileInfo);h&&(a=c.ModifiedDates[l.pathFromFileInfo(a.fileInfo)],""!==this._getModifiedDate(h)&&a.valueOf()===this._getModifiedDate(h).valueOf()&&this._setModifiedDate(h,null,!0),c.postSaveWork&&c.postSaveWork(),h=l.pathFromFileInfo(h.fileInfo),this.openedFilesDataStore.get(h).savePending=!1)},this)},_handleMoveFileResponse:function(a,c){var h=new f,b=this,d=[{path:l.pathFromFileInfo(this.getCurrentFolderInfo())}];
c.fileInfos.forEach(function(a){d.push({path:l.getParentPath(l.pathFromFileInfo(a))})},this);this._listFolderRequest(d,void 0);if(a[0]&&a[0].fault)this.onMoveFileMessageFault(a[0].fault);else c.type="moveFile",this.moveFileListFolderComplete=h,this._listFolderRequest(c.listFolderTargetPath,c),f.when(this.moveFileListFolderComplete,function(c){b.onMove(a[0].fileInfo);b.emit("fileMoveEvent",a[0].fileInfo);this.moveFileListFolderComplete=null;return c})},_createDefaultListFolderMessage:function(){var a=
[];this.getCurrentFolderInfo()&&a.push({path:l.pathFromFileInfo(this.getCurrentFolderInfo())});this.openedFilesDataStore.query().forEach(function(c){a.push({path:l.pathFromFileInfo(c.fileInfo)})},this);return a},_createUpdateFileRequest:function(a){var c=[];a.ModifiedDates={};var h=this;this.openedFilesDataStore.query().forEach(function(b){if(h.isFileModified(b)&&!b.savePending){var d=l.remoteFile(b);c.push({file:d});b.savePending=!0;h.openedFilesDataStore.put(b);a.ModifiedDates[l.pathFromFileInfo(d.fileInfo)]=
h._getModifiedDate(d)}});return 0===m.getArrayLength(c)?[]:c},_createCloseAllFilesRequest:function(){var a=[];this.openedFilesDataStore.query().forEach(function(c){var h=this.isFileModified(c)&&!c.savePending;a.push({file:l.remoteFile(c),updateFile:h});this._setModifiedDate(c,null,!0);this.onFileClose(c.fileInfo)},this);this.openedFilesDataStore.setData([]);return a},_getOpenFile:function(a){l.assertIsFileInfo(a);return this.openedFilesDataStore.get(l.pathFromFileInfo(a))},_getModifiedDate:function(a){return(a=
this.openedFilesDataStore.get(l.pathFromFileInfo(a.fileInfo)))?a.modifiedDate:""},_setModifiedDate:function(a,c,h){var b=this.openedFilesDataStore.get(l.pathFromFileInfo(a.fileInfo));b&&(b.modifiedDate=c,this.onFileModificationChange(a.fileInfo,h))},_queryForRelatedOpenFiles:function(a){var c=this.openedFilesDataStore.query({});return c=c.filter(function(c){return 0===l.pathFromFileInfo(c.fileInfo).indexOf(a)})},onCurrentFolderChange:function(a){},onFileOpen:function(a,c,h,b,d){},onMove:function(a){},
onCreate:function(a){},onRename:function(a){},onFileClose:function(a){},onFileClosed:function(a){},onFileShow:function(a,c,h,b,d){},onFileModificationChange:function(a,c){},onFileMessageFault:function(a,c){},onMoveFileMessageFault:function(a,c){},getOpenFileInfoFromName:function(a){for(var c=[".m",".mat"],h=this.openedFilesDataStore.query(),b=0;b<c.length;b++)for(var d=0;d<h.length;d++){var e=h[d].id;if(l.extractSelectedFileName(e)===a.concat(c[b]))return l.fileInfoFromPath(e)}return null},getFileInfoFromPath:function(a){return this.fileStore.store.query({path:a})},
getFileInfosFromPaths:function(a){var c=[],h=this;a.forEach(function(a){""!==a&&(a=h.getFileInfoFromPath(a)[0])&&c.push(a)});return c},getCurrentFolderInfo:function(){return this._pathService?this._pathService.getCurrentFolder():null},syncFolderInGroupedMode:function(a,c,h){this.emit("syncFolderInGroupedMode",a,c,h)},addOrUpdateFilesInStore:function(a){this.fileStore.addOrUpdateFile(a)}})})},"currentfolderbrowser-ui/service/FileDataStore":function(){define(["dojo/_base/declare","dojo/_base/lang",
"dojo/store/Memory","dojo/store/Observable","mw-filename-utils/FileNameUtil"],function(g,f,e,d,b){return g([],{constructor:function(a){this.fileService=a.fileService;this.store=new d(new e({idProperty:"path",getChildren:function(a,h){return this.query(f.mixin({},h&&h.originalQuery||null,{parent:a.path}),h)},mayHaveChildren:function(a){return a.hasChildren},getIdentity:function(a){return a.path}}))},deleteFile:function(a){this.store.remove(b.pathFromFileInfo(a))},syncFolderInGroupedMode:function(a,
c,h){this.fileService.syncFolderInGroupedMode(a,c,h)},addOrUpdateFile:function(a){this.store.put(a)},_shouldFileUpdate:function(a,c){return a.modifiedUtc!==c.modifiedUtc||a.name!==c.name||a.size!==c.size||a.type!==c.type||a.hasChildren!==c.hasChildren},_childrenToAdd:function(a,c){var h=this.store.get(a.path);h?this._shouldFileUpdate(h,a)&&c.push(a):c.push(a)},syncFolder:function(a,c){var h=[],b=this;c.forEach(function(a){b._childrenToAdd(a,h)});b.store.isGroupingMode?this.syncFolderInGroupedMode(a,
c,h):(h.forEach(function(a){b.addOrUpdateFile(a)}),b.recursiveDelete(a,c))},resetStore:function(){var a=this;this.store.query({}).forEach(function(c){a.deleteFile(c)})},isItemAChild:function(a,c){return 0===b.normalizePath(b.pathFromFileInfo(a)).indexOf(b.normalizePath(b.pathFromFileInfo(c)))},recursiveDelete:function(a,c){var h=[],b,d,e=this;this.store.query({parent:a.path}).forEach(function(a){b=!0;for(d=0;d<c.length;d+=1)if(c[d].path===a.path){b=!1;break}b&&(e._queryForRelatedSubFolders(a.path).forEach(function(a){h.push(a)}),
h.push(a))});h.forEach(function(a){e.deleteFile(a)})},_queryForRelatedSubFolders:function(a){return this.store.query({location:a+b.getFileSeparator(a)})}})})},"dojo/store/Observable":function(){define(["../_base/kernel","../_base/lang","../when","../_base/array"],function(g,f,e,d){g=function(b){function a(a,c){var h=b[a];h&&(b[a]=function(d){var k;"put"===a&&(k=b.getIdentity(d));if(l)return h.apply(this,arguments);l=!0;try{var f=h.apply(this,arguments);e(f,function(a){c("object"==typeof a&&a||d,k)});
return f}finally{l=!1}})}var c=[],h=0;b=f.delegate(b);b.notify=function(a,b){h++;for(var d=c.slice(),e=0,k=d.length;e<k;e++)d[e](a,b)};var k=b.query;b.query=function(a,l){l=l||{};var g=k.apply(this,arguments);if(g&&g.forEach){var q=f.mixin({},l);delete q.start;delete q.count;var r=b.queryEngine&&b.queryEngine(a,q),s=h,t=[],u;g.observe=function(a,k){1==t.push(a)&&c.push(u=function(a,c){e(g,function(e){var f=e.length!=l.count,m,g;if(++s!=h)throw Error("Query is out of date, you must observe() the query prior to any data modifications");
var n,q=-1,u=-1;if(void 0!==c){m=0;for(g=e.length;m<g;m++){var v=e[m];if(b.getIdentity(v)==c){n=v;q=m;(r||!a)&&e.splice(m,1);break}}}if(r){if(a&&(r.matches?r.matches(a):r([a]).length))m=-1<q?q:e.length,e.splice(m,0,a),u=d.indexOf(r(e),a),e.splice(m,1),l.start&&0==u||!f&&u==e.length?u=-1:e.splice(u,0,a)}else a&&(void 0!==c?u=q:l.start||(u=b.defaultIndex||0,e.splice(u,0,a)));if((-1<q||-1<u)&&(k||!r||q!=u)){f=t.slice();for(m=0;e=f[m];m++)e(a||n,q,u)}})});var f={};f.remove=f.cancel=function(){var h=d.indexOf(t,
a);-1<h&&(t.splice(h,1),t.length||c.splice(d.indexOf(c,u),1))};return f}}return g};var l;a("put",function(a,c){b.notify(a,c)});a("add",function(a){b.notify(a)});a("remove",function(a){b.notify(void 0,a)});return b};f.setObject("dojo.store.Observable",g);return g})},"currentfolderbrowser-ui/service/FileDataServiceFaultHandler":function(){define("dojo/_base/declare dojo/aspect dojo/_base/lang mw-notifications/Notifications dojo/i18n!../l10n/resources/currentfolderbrowser/nls/fileDataServiceFaultMessages mw-html-utils/HtmlUtils".split(" "),
function(g,f,e,d,b,a){var c=function(c){c=a.escapeHtml(c);d.displayAlertDialog(b.ErrorDialogTitle,c,{"data-test-id":"fileDataServiceFaultDialog"})};return g([],{constructor:function(a){a=a||{};this.fileDataService=a.fileDataService;f.after(this.fileDataService,"onFileMessageFault",e.hitch(this._handleFileMessageFault),!0);f.after(this.fileDataService,"onMoveFileMessageFault",e.hitch(this._handleMoveFileMessageFault),!0);f.after(this.fileDataService,"onListFolderMessageFault",e.hitch(this._handleFileMessageFault),
!0)},_handleFileMessageFault:function(a){var b;for(b=0;b<a.messageFaults.length;b+=1){var d=a.messageFaults[b];if(d){c(d.message);break}}},_handleMoveFileMessageFault:function(a){c(a.message)}})})},"MOTW/ExecutionDataService":function(){define("dojo/_base/declare dojo/_base/lang dojo/i18n!MOTW/l10n/nls/cmdWindow mw-log/Log MW/cmdhistory/CommandHistoryStore MOTW/motw/ActionIdConstants mw-remote/Remote mw-messageservice/MessageService mw-remote/remoteFaultCodes mw-filename-utils/FileNameUtil MOTW/dialog/PathUpdateDialog".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m){return g([],{SERVER_PROMPT_TYPES:"ready debug keyboard input completingBlock pause".split(" "),EXECUTION_STATES:{BUSY:"busy",PAUSE:"pause",READY:"ready",DEBUG:"debug",KEYBOARD:"keyboard",INPUT:"input",COMPLETING_BLOCK:"completingBlock"},PROMPT_STRINGS:{busy:"",pause:"",ready:"\x3e\x3e ",debug:"K\x3e\x3e ",keyboard:"K\x3e\x3e ",input:function(a){return this._inputPromptString||""},completingBlock:""},REGEX:/\n/,waitingCommands:[],FILE_WILL_RUN:1,constructor:function(a){this.ASYNC_HANDLERS=
[{channel:"/eval/response/completion",handler:"_completionHandler"},{channel:"/eval/response/output",handler:"_outputHandler"},{channel:"/eval/response/error",handler:"_errorHandler"},{channel:"/eval/response/sinktext/output",handler:"_sinktextOutputHandler"},{channel:"/eval/response/sinktext/error",handler:"_sinktextErrorHandler"},{channel:"/eval/response/suggest",handler:"_suggestionHandler"},{channel:"/eval/response/iqminput",handler:"_promptChangeHandler"},{channel:"/eval/response/commandwindow/clear",
handler:"_clcHandler"},{channel:"/eval/response/commandwindow/home",handler:"onHomeExecution"},{channel:"/eval/response/editor/openfile",handler:"_openEditorHandler"}];a=a||{};this.historyStore=a.historyStore||new b;this.actionService=a.actionService;this.outputWidthInColumns=80;this.commandListeners={};this.streamingEval=!1;this.executionState=this.EXECUTION_STATES.READY;this.fileDataService=a.fileDataService||{};this.pathDataService=a.pathDataService||{};c.registerDefaultMessageFactory("Eval",function(){return[{mcode:""}]});
c.registerResponseHandler("EvalResponse",this._handleEvalResponse,this);c.registerFaultHandler("Eval",this._handleEvalError,this);c.registerResponseHandler("FEvalResponse:FileOnPath",this._dispatchAction,this);c.registerFaultHandler("FEvalResponse:FileOnPath",function(a){d.error("Error received while trying to file on path",a)},this);c.registerResponseHandler("EvalResponse:RunFile",this._handleEvalResponse,this);c.registerFaultHandler("Eval:RunFile",this._handleEvalError,this);c.registerFaultHandler("Eval:MlsPublishPre",
this._handleEvalError,this);c.registerResponseHandler("InterruptResponse",this._handleInterruptResponse,this);c.registerFaultHandler("Interrupt",this._handleEvalError,this);this.turnOnStreamingEval()},turnOnStreamingEval:function(){this.streamingEval=!0;this.subscribeAsyncHandlers()},turnOffStreamingEval:function(){this.streamingEval=!1;this.unsubscribeAsyncHandlers()},subscribeAsyncHandlers:function(){for(var a=0;a<this.ASYNC_HANDLERS.length;a++)h.subscribe(this.ASYNC_HANDLERS[a].channel,this.ASYNC_HANDLERS[a].handler,
this)},unsubscribeAsyncHandlers:function(){for(var a=0;a<this.ASYNC_HANDLERS.length;a++)h.unsubscribe(this.ASYNC_HANDLERS[a].channel,this.ASYNC_HANDLERS[a].handler,this)},_completionHandler:function(a){var h=this;setTimeout(function(){if(!h.promptHasBeenCalled){var a=h._previousExecutionState,c=h.executionState;a===h.EXECUTION_STATES.COMPLETING_BLOCK&&c===h.EXECUTION_STATES.BUSY||a===h.EXECUTION_STATES.BUSY&&c===h.EXECUTION_STATES.COMPLETING_BLOCK||(0<h.waitingCommands.length?h._runQueue(h.waitingCommands[0]):
h._setExecutionState(h.stateBeforeExecution))}},100);c.sendMessage({CurrentFolder:{}})},_promptChangeHandler:function(a){this.promptHasBeenCalled=!0;a=a.data.split("_")[0];"BASE"===a&&(a="READY");"INCOMPLETE"===a&&(a="COMPLETING_BLOCK");this._setExecutionState(this.EXECUTION_STATES[a])},_suggestionHandler:function(a){a&&a.data&&(this.historyStore.newItem({type:"response",value:e.typoSuggestionText,isError:!1,visible:!0}),this.onTypoCorrection(a.data))},onTypoCorrection:function(a){},_sinktextErrorHandler:function(a){a&&
a.data&&this.historyStore.newItem({type:"response",value:a.data,isError:!0,visible:!0})},_checkIfFileOnPath:function(a,h,b){var d={FEval:{"function":"mdbfileonpath",arguments:[l.pathFromFileInfo(a)],nargout:2}};c.sendMessage(d,{fileInfo:a,successCallback:h,failureCallback:b},"FileOnPath")},_dispatchAction:function(a,c){var h=a[0].results[0],b=a[0].results[1];b===this.FILE_WILL_RUN?c.successCallback&&c.successCallback():this._showPathUpdateDialog(c.fileInfo,b,h,c.successCallback,c.failureCallback)},
_showPathUpdateDialog:function(a,c,h,b,d){m({fileInfo:a,displayName:h,fileStatus:c,fileService:this.fileDataService,pathService:this.pathDataService,runAction:b,cancelAction:d})},_sinktextOutputHandler:function(a){if(a&&a.data){var c=this.historyStore.items[this.historyStore.items.length-1];c&&("request"!==c.type||null===/input\('(.+)'\)/.exec(c.value))&&this.handleLineBreaks(a.data)}},_streamingAuthoringEval:function(a){var c=Date.now();this._addRequestItem(a,c);this._streamingExecutionEval(a);this.onAuthoringEval(a,
c)},_checkExecutionStateAndSetToBusyIfNecessary:function(){this.executionState!==this.EXECUTION_STATES.BUSY&&(this.executionState!==this.EXECUTION_STATES.COMPLETING_BLOCK&&this.executionState!==this.EXECUTION_STATES.PAUSE)&&(this.stateBeforeExecution=this.executionState,this._setExecutionState(this.EXECUTION_STATES.BUSY))},_streamingExecutionEval:function(a){""!==a&&""!==a.trim()?this._isIntercepted(a)?(this._handleInterceptedCommand(a),this._setExecutionState(this.executionState)):(this.promptHasBeenCalled=
!1,this.executionState===this.EXECUTION_STATES.BUSY?this.waitingCommands.push({command:a,type:"eval"}):this._publishToEvalChannel(a),this._checkExecutionStateAndSetToBusyIfNecessary()):this.executionState===this.EXECUTION_STATES.INPUT?this._publishToEvalChannel(a):this.executionState===this.EXECUTION_STATES.COMPLETING_BLOCK&&this._publishToEvalChannel(a)},_runQueue:function(a){"file"===a.type?this._sendRunFileRequest(a.command):this._publishToEvalChannel(a.command);this.waitingCommands.shift()},publishPauseMessage:function(){this._publishToEvalChannel("\n")},
_publishToEvalChannel:function(a){h.publish("/eval/request",a)},_outputHandler:function(a){a&&a.data&&this.handleLineBreaks(a.data)},onHistoryTruncation:function(a){},handleLineBreaks:function(a){var c=this.historyStore.items,c=c[c.length-1],h=!0;if(c)var b=this.historyStore.getValue(c,"type"),d=this.historyStore.getValue(c,"isError");if(b&&"request"!==b&&!d){var e=this.historyStore.getValue(c,"value"),b=e.indexOf("\n",e.length-1),d=a.indexOf("\n");if(0>b||0>d)h=!1}this.onHistoryTruncation(a);h?this.historyStore.newItem({type:"response",
value:a,isError:!1,visible:!0}):this.historyStore.setValue(c,"value",e+a)},_errorHandler:function(a){a&&a.data&&this.historyStore.newItem({type:"response",value:a.data,isError:!0,visible:!0})},_openEditorHandler:function(a){a&&a.data&&(a.data instanceof Array||(a.data=[a.data]),this.fileDataService._handleOpenFileResponse(a.data))},_clcHandler:function(a){a&&a.data&&"clear"===a.data&&this._clearCommandWindow()},_clearCommandWindow:function(){var a=this.historyStore;a.fetch({onItem:function(c){a.setValue(c,
"visible",!1)}});this.onClcExecution()},onClcExecution:function(){},onHomeExecution:function(){},runFile:function(a){var c=f.hitch(this,"_runFileAction",a);this._checkIfFileOnPath(a,c)},_runFileAction:function(a){this.executionState===this.EXECUTION_STATES.BUSY?this.waitingCommands.push({command:a,type:"file"}):this._sendRunFileRequest(a)},_sendRunFileRequest:function(a){var c=l.getFullyQualifiedMatlabName(a);this._addRequestItem(c);a=this.fileDataService._getOpenFile(a);if(this.streamingEval){var h=
this;this.promptHasBeenCalled=!1;this._checkExecutionStateAndSetToBusyIfNecessary();this.fileDataService.saveFile(a,function(){return h._publishToEvalChannel(c)})}else this._eval(c,{},"RunFile")},publishFile:function(a,c,h){c=f.hitch(this,"_publishFileAction",a,c,h);this._checkIfFileOnPath(a,c,h)},_publishFileAction:function(a,c,h){var b=l.pathFromFileInfo(a),d="mls.internal.publishPre('"+l.getFullyQualifiedMatlabName(a)+"', '"+c+"');";this._eval(d,{callback:function(){d="mls.internal.publish('"+
b+"', '"+c+"');";this._eval(d,{callback:function(){h&&h()}})}},"MlsPublishPre")},ping:function(){this._eval("",{},"Ping")},authoringEval:function(a,c){if(c)this._streamingAuthoringEval(a);else{var h=Date.now(),b=a;a=this._normalizeCommand(a);this._addRequestItem(a.matlabCode,h);this._eval(a);this.onAuthoringEval(b,h)}},onAuthoringEval:function(a,c){},executionEval:function(a,c){c?this._streamingExecutionEval(a):this._eval(this._normalizeCommand(a),a)},interrupt:function(){c.sendMessage({Interrupt:{}});
this.waitingCommands=[]},getPromptString:function(){var a=this.PROMPT_STRINGS[this.executionState];f.isFunction(a)&&(a=a.call(this));if(this.streamingEval&&this.executionState===this.EXECUTION_STATES.INPUT){var c=this.historyStore.items[this.historyStore.items.length-1];"request"===c.type&&(c=/input\('(.+)'\)/.exec(c.value))&&(a=c[1])}return a},intercept:function(a,c,h){f.isArray(a)||(a=[a]);var b=h||this;a.forEach(function(a){this.commandListeners[a]=f.hitch(b,c)},this)},removeIntercept:function(a){this.commandListeners[a]&&
delete this.commandListeners[a]},onExecutionStateChange:function(a){},reset:function(){var a=this.historyStore;a.fetch({onItem:function(c){a.deleteItem(c)}})},setOutputWidthInColumns:function(a){a&&(this.outputWidthInColumns=10<a?a:10)},updateHistoryStore:function(a){var c,h=!1;for(c=a.length-1;0<=c;c-=1)"clc"===a[c].value.trim()&&(h=!0),h&&(a[c].visible=!1),"request"===a[c].type&&void 0===a[c].promptString&&(a[c].promptString=this.PROMPT_STRINGS.ready);a.forEach(this.historyStore.newItem,this.historyStore)},
_eval:function(a,h,b){this._setExecutionState(this.EXECUTION_STATES.BUSY);a=this._normalizeCommand(a);this._isIntercepted(a.matlabCode)?(this._handleInterceptedCommand(a.matlabCode),this._setExecutionState(this._previousExecutionState)):a.matlabPre&&a.matlabPost?c.sendMessage({Eval:[{mcode:a.matlabPre},{mcode:a.matlabCode,width:a.width},{mcode:a.matlabPost}]},h||{},b):c.sendMessage({Eval:{mcode:a.matlabCode,width:a.width}},h||{},b);""===a.matlabCode&&this._previousExecutionState!==this.EXECUTION_STATES.INPUT&&
this._setExecutionState(this._previousExecutionState)},_handleEvalResponse:function(a,c){if(c&&c.callback)c.callback.apply(this,arguments),this._setExecutionState(this.EXECUTION_STATES.READY);else{var h=0;a.forEach(function(a){var c=a.responseStr;h=a.promptType||h;a.clearCommandWindow&&this._clearCommandWindow();if(c){if(this.SERVER_PROMPT_TYPES[h]===this.EXECUTION_STATES.INPUT){var b=c.lastIndexOf("\n");0<=b?(this._inputPromptString=c.substring(b+1,c.length),c=c.substring(0,b)):(this._inputPromptString=
c,c="")}this.historyStore.newItem({type:"response",value:c,isError:a.isError,visible:!0})}},this);0<this.waitingCommands.length?this._runQueue(this.waitingCommands[0]):this._setExecutionState(this.SERVER_PROMPT_TYPES[h])}},_handleEvalError:function(a){a&&(0<a.length&&a[0].faultCode!==k.WORKER_RESPONSE_FAILURE)&&(d.error("Error received while eval'ing a command.",a),this._setExecutionState(this.EXECUTION_STATES.READY))},_handleInterruptResponse:function(a){a.forEach(function(a){a.messageFaults&&0<
a.messageFaults.length&&d.error("Error interrupting MATLAB: ",a)})},_setExecutionState:function(c){this._previousExecutionState=this.executionState;this.executionState=c;this._previousExecutionState!==this.executionState&&(this.onExecutionStateChange(this.executionState),this.actonExecutionStateChangeionService&&this.actionService.updateAction(a.STOP,{enabled:c!==this.EXECUTION_STATES.READY&&c!==this.EXECUTION_STATES.KEYBOARD&&c!==this.EXECUTION_STATES.DEBUG}))},_normalizeCommand:function(a){a=a?
f.isString(a)?{matlabCode:a}:a:{matlabCode:""};a.width=this.outputWidthInColumns;return a},_isIntercepted:function(a){var c=!1;/^\s*[a-z][A-Za-z0-9_\.]*(\s*;\s*|\s+([^;].*)*)?$/.test(a)&&(a=this._getCommandParts(a),c=0<a.length&&this.commandListeners.hasOwnProperty(a[0]));return c},_handleInterceptedCommand:function(a){a=this._getCommandParts(a);(a=1<a.length?this.commandListeners[a[0]].apply(this,a.slice(1,a.length)):this.commandListeners[a[0]]())&&a.message&&this.historyStore.newItem({type:"response",
value:a.message,isError:a.isError,visible:!0})},_addRequestItem:function(a,c){this.historyStore.newItem({commandHistoryDivId:c,type:"request",value:a,visible:!0,historyVisible:!0,promptType:this.executionState,promptString:this.getPromptString()})},_getCommandParts:function(a){return a.split(/[ ;]+/).filter(function(a){return!!a})}})})},"MW/cmdhistory/CommandHistoryStore":function(){define(["dojo/_base/declare","mw-store-utils/InMemoryStore"],function(g,f){return g([f],{_timestampProp:"timestamp",
constructor:function(e){e=e||{};Array.isArray(e.history)&&e.history.forEach(function(d){this.newItem(d)},this)},getAttributes:function(){return["type","timestamp","value"]}})})},"MOTW/dialog/PathUpdateDialog":function(){define("dojo/dom-construct dojo/dom-class dojo/_base/declare dojo/_base/lang dojo/keys dojo/dom-style dojo/dom-attr dojo/on dijit/_Widget dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!./PathUpdateTemplate.html mw-notifications/Notifications mw-filename-utils/FileNameUtil mw-remote/Remote dojo/i18n!MOTW/l10n/nls/motw dojo/i18n!MOTW/l10n/nls/dialog dojo/query dojo/NodeList-traverse dojo/NodeList-manipulate".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u){return e([k,l,m],{templateString:p,idAttr:"motw-dialog-pathUpdate",FILE_NOT_ON_PATH:0,FILE_WILL_RUN:1,FILE_SHADOWED_BY_PWD:2,FILE_SHADOWED_BY_TBX:3,FILE_SHADOWED_BY_PFILE:4,FILE_SHADOWED_BY_MEXFILE:5,FILE_SHADOWED_BY_MLXFILE:6,FILE_SHADOWED_BY_MLAPPFILE:7,CHANGE_DIR_ACTION_ID:1,ADD_PATH_ACTION_ID:2,CANCEL_ACTION_ID:3,HELP_ACTION_ID:4,constructor:function(a){a=a||{};this.fileInfo=a.fileInfo;this._filename=a.fileInfo.name;this._displayName=a.displayName;
this._fileStatus=a.fileStatus;this.fileService=a.fileService;this.pathService=a.pathService;this.runAction=a.runAction;this.cancelAction=a.cancelAction;this._errorText="";this._dialog=null;this._actions=this.setDialogActions;this._content=p;this._localization=t;this._content=this._content.replace("${_localization.cancel}",t.cancel);r.registerResponseHandler("FEvalResponse:AddPath",function(a,c){this.runAction(this.fileInfo)},this);r.registerFaultHandler("FEvalResponse:AddPath",function(a){Log.error("Error received while trying to add file to path.",
a)},this)},getDialog:function(){return this._dialog},runFileOnChangeDir:function(){this.runAction(this.fileInfo);this._handle.remove()},setDialogActions:function(a){a.response===this.CHANGE_DIR_ACTION_ID?(this._handle=h(this.pathService,"CWDChanged",d.hitch(this,"runFileOnChangeDir")),this.fileService.currentDirectory(this.fileInfo.location)):a.response===this.ADD_PATH_ACTION_ID&&this._fileStatus!==this.FILE_SHADOWED_BY_PWD?r.sendMessage({FEval:{"function":"addpath",arguments:[this.fileInfo.location],
nargout:1}},{},"AddPath"):(a.response===this.CANCEL_ACTION_ID||this._fileStatus===this.FILE_SHADOWED_BY_PWD&&a.response===this.CANCEL_ACTION_ID-1)&&"function"===typeof this.cancelAction&&this.cancelAction()},setNotificationActions:function(a){},postCreate:function(){var a="",c="",h="",b=[s.changeDir,s.addPath,t.cancel],e=!1;switch(this._fileStatus){case this.FILE_NOT_ON_PATH:a=s.notOnPath.replace("{0}",this._displayName);c=s.solutionChangeOrAdd;break;case this.FILE_SHADOWED_BY_PWD:b=[s.changeDir,
t.cancel];a=s.shadowedByPwd.replace("{0}",this._displayName);c=s.solutionChangeDir;break;case this.FILE_SHADOWED_BY_TBX:a=s.shadowedByPath.replace("{0}",this._displayName);c=s.solutionChangeOrAdd;break;case this.FILE_SHADOWED_BY_PFILE:h=s.shadowerPcode;e=!0;break;case this.FILE_SHADOWED_BY_MEXFILE:h=s.shadowerMex;e=!0;break;case this.FILE_SHADOWED_BY_MLXFILE:h=s.shadowerMlx.replace("{0}",q.nameFromPath(this._displayName));e=!0;break;case this.FILE_SHADOWED_BY_MLAPPFILE:h=s.shadowerMlapp.replace("{0}",
q.nameFromPath(this._displayName)),e=!0}e&&(b=[t.ok],this._actions=this.setNotificationActions,a=s.fileCannotRun,c=this._displayName);var b={buttonText:b,defaultAcceptButton:this.CHANGE_DIR_ACTION_ID,defaultCancelButton:this.CANCEL_ACTION_ID,"data-testid":"pathUpdateDialog",icon:"info",closeCallback:d.hitch(this,this._actions)},k=g.toDom(this._content);k.querySelector(".pathUpdateDialog .messageTitle").textContent=a;k.querySelector(".pathUpdateDialog .messageDesc").textContent=c;k.querySelector(".pathUpdateDialog .messageDetails").textContent=
h;e||k.querySelector(".pathUpdateDialog .messageTitle").classList.add("titleBold");this._dialog=n.displayConfirmDialog("MATLAB Editor",k,b);this._dialog.domNode.classList.add("wideDialog")}})})},"MOTW/browser/BrowserDataService":function(){define("dojo/_base/declare dojo/_base/window mw-log/Log MOTW/motw/ActionIdConstants mw-remote/Remote mw-filename-utils/FileNameUtil".split(" "),function(g,f,e,d,b,a){return g([],{constructor:function(a){a=a||{};this._actionService=a.actionService;b.registerResponseHandler("OpenWithBrowser",
this._handleOpenWithBrowser,this)},_handleOpenWithBrowser:function(c,h){c.forEach(function(c){c=c.uri;e.assert(c,"No URI was sent in the response");/^(\/|[a-z]:\\).*/i.test(c)?this._actionService.executeAction(d.OPEN_FILE,{fileInfo:a.fileInfoFromPath(c)}):(/^https?:\/\/.*/i.test(c)||(c="http://"+c),f.global.open(c,"_blank"))},this)}})})},"MOTW/motw/feature/FeatureDataService":function(){define("dojo/_base/declare dojo/_base/lang mw-log/Log mw-store-utils/InMemoryStore MW/motw/feature/Feature ./FeatureError ./PollableFeature".split(" "),
function(g,f,e,d,b,a,c){return g([],{_featureStore:null,_executionService:null,constructor:function(h){h=h||{};this._featureStore=new d;if(this._executionService=h.executionService)this._executionService.intercept("motw.internal.featureList",this._listFeatures,this);else throw new a("Can't create FeatureDataService: required ExecutionDataService reference not passed to constructor.");h.pollableFeatures&&h.pollableFeatures.forEach(function(a){this.addFeature(new c(a))},this)},addFeature:function(c){if(!(c instanceof
b))throw new a("Can't add feature: it's not a subclass of MOTW.motw.feature.Feature");if(this.getFeature(c.name()))throw new a("Can't add feature: already added to service");this._executionService.intercept(c.name(),f.hitch(this,this._processEvalFeatureSwitch,c.name()));return this._featureStore.newItem(f.mixin({id:c.name()},c))},removeFeature:function(c){var b=this.getFeature(c);if(b)this._featureStore.deleteItem(b),this._executionService.removeIntercept(b.name());else throw new a("Can't remove feature: "+
c+" not in this FeatureDataService");},enableFeature:function(c,b){var d=this.getFeature(c);if(d){try{d.enable.call(d.executionScope())}catch(f){e.warn("Error enabling feature: "+c+", "+f)}b&&this._featureStore.setValue(d,"saveInSession",!0)}else throw new a("Can't enable feature: "+c+" not in this FeatureDataService");},disableFeature:function(c){var b=this.getFeature(c);if(b){try{b.disable.call(b.executionScope())}catch(d){e.warn("Error disabling feature: "+c+", "+d)}b.saveInSession&&this._featureStore.setValue(b,
"saveInSession",!1)}else throw new a("Can't disable feature: "+c+" not in this FeatureDataService");},getSessionData:function(){var a="";this._featureStore.fetch({query:{saveInSession:!0},onItem:function(c){c&&(0<a.length&&(a+=","),a+=c.name())}});return a},setSessionData:function(a){a&&(a=a.split(","),a.forEach(function(a){try{this.enableFeature(a,!0)}catch(c){e.warn("Feature "+name+" is not registered - ignoring request to turn feature: ON from Session Data")}},this))},processFeatureSwitches:function(a){a.forEach(function(a){var c=
a.name,h=a.status;this._isFeatureRegistered(c)?"ON"===a.status?this.enableFeature(c):"OFF"===a.status&&this.disableFeature(c):e.warn("Feature "+c+" is not registered - ignoring request to turn feature: "+h+" from FeatureSwitches (likely a URL)")},this)},reset:function(){var a;this._featureStore.fetch({onComplete:function(c){a=c}});a.forEach(function(a){this.disableFeature(a.name())},this)},_processEvalFeatureSwitch:function(a,c){var b,d;d=c?c.toLocaleLowerCase().trim().split(":"):[];var e={message:"",
isError:!1};0<d.length&&(b=d[0],d="always"===d[1],"on"===b?this.enableFeature(a,d):"off"===b&&this.disableFeature(a));if(b=this.getFeature(a))e.message+="\n  "+a,e.message+=" : ",e.message+=b.featureState()+"\n\n";return e},_listFeatures:function(){var a={message:"",isError:!1};this._featureStore.fetch({onItem:function(c){a.message||(a.message="\n");a.message+="  "+c.name();a.message+=" : ";a.message+=c.featureState();a.message+=c.saveInSession?" (always)":"";a.message+="\n"}});a.message=a.message?
a.message+"\n":"\n  No features registered.\n\n";return a},getFeature:function(a){var c;this._featureStore.fetch({query:{id:a},onItem:function(a){a&&(c=a)}});return c},_isFeatureRegistered:function(a){return!!this.getFeature(a)}})})},"MW/motw/feature/Feature":function(){define(["dojo/_base/declare"],function(g){return g([],{ON:"ON",OFF:"OFF",constructor:function(f,e){if(!f||!dojo.isString(f))throw Error("Feature name missing");this._name="motw.internal."+f;this._featureState=this.OFF;dojo.safeMixin(this,
e)},name:function(){return this._name},executionScope:function(){return this},enableFeature:function(){throw Error("Unimplemented API: MW.motw.feature.Feature.enableFeature");},disableFeature:function(){throw Error("Unimplemented API: MW.motw.feature.Feature.disableFeature");},enable:function(){this._featureState!==this.ON&&(this.enableFeature(),this._featureState=this.ON)},disable:function(){this._featureState!==this.OFF&&(this.disableFeature(),this._featureState=this.OFF)},featureState:function(){return this._featureState}})})},
"MOTW/motw/feature/FeatureError":function(){define(["dojo/_base/declare"],function(g){return g([Error],{constructor:function(f){this.message=f}})})},"MOTW/motw/feature/PollableFeature":function(){define(["dojo/_base/declare","MW/motw/feature/Feature"],function(g,f){return g([f],{enabled:!1,enableFeature:function(){this.enabled=!0},disableFeature:function(){this.enabled=!1},isEnabled:function(){return this.enabled}})})},"MOTW/motw/ShadowDataService":function(){define(["dojo/_base/declare","dojo/_base/lang",
"mw-log/Log","MOTW/ExecutionDataService","dojo/i18n!MOTW/l10n/nls/motw"],function(g,f,e,d,b){return g([],{constructor:function(a){a=a||{};this._executionService=a.executionService},addShadow:function(a){this._executionService.intercept(a,function(){return{message:f.replace(b.commandNotSupported,{cmd:a}),isError:!0}},this)},removeShadow:function(a){this._executionService.removeIntercept(a)}})})},"pathdataservice-js/js/PathDataService":function(){define("dojo/_base/declare dojo/_base/lang dojo/Deferred dojo/Evented mw-filename-utils/FileNameUtil mw-deprecation-utils/deprecation mw-messageservice/MessageService mw-utils/Utils".split(" "),
function(g,f,e,d,b,a,c,h){a.deprecated({module:"PathDataService",method:"getCurrentFolder",replacement:"getCwd",additionalInformation:"method will be removed in 19a"});a.deprecated({module:"PathDataService",method:"getCurrentFolderPath",replacement:"getCwd",additionalInformation:"method will be removed in 19a"});a.deprecated({module:"PathDataService",method:"setMATLABCWD",replacement:"setCwd",additionalInformation:"method will be removed in 19a"});return g([d],{constructor:function(){this.pathCache=
[];this.arrayOfPathEntriesFromServer=[];this._setCwdDeferreds={};this._getCwdDeferred=void 0},start:function(){c.subscribe("/matlab/pathDataService",this._responseHandler,this);c.publish("/matlab/pathDataService",{request:"startServerSide"});c.publish("/actionsMenu/matlabOnlineToJava/reports",{action:"startServerSide"});this.getCwd().then(function(a){this._notifyCWDChanged(a)}.bind(this))},reset:function(){c.unsubscribe(this._responseHandler);this.startupFolder=this.currentWorkingFolder=void 0;this.pathCache=
[];this.arrayOfPathEntriesFromServer=[]},stop:function(){this.reset()},setCwd:function(a){var b=Util.generateUuid(),h=new e;this._setCwdDeferreds[b]=h;c.publish("/matlab/pathDataService",{request:"setCwd",path:a,uuid:b});return h.promise},getCwd:function(){void 0===this._getCwdDeferred&&(this._getCwdDeferred=new e,c.publish("/matlab/pathDataService",{request:"getCwd"}));return this._getCwdDeferred.promise},_handleCwdResponse:function(a){this._getCwdDeferred.resolve(a)},_updateMatlabPathCache:function(a){this.pathCache=
[];this.arrayOfPathEntriesFromServer=a;a.forEach(f.hitch(this,function(a){0>this.pathCache.indexOf(a)&&this.pathCache.push(a)}));this.pathCache.forEach(f.hitch(this,function(a){0>this.arrayOfPathEntriesFromServer.indexOf(a)&&-1!==this.arrayOfPathEntriesFromServer.indexOf(a)&&this.pathCache.splice(a,1)}));this.emit("MaltabPathChanged",this.pathCache)},_listPathEntries:function(){c.publish("/matlab/pathDataService",{request:"listPathEntries"})},getAccessibleRoots:function(){c.publish("/matlab/pathDataService",
{request:"getAccessibleRoots"})},_requestCWD:function(){c.publish("/matlab/pathDataService",{request:"reqCWD"})},setMATLABCWD:function(a){c.publish("/matlab/pathDataService",{request:"setCWD",path:a})},_responseHandler:function(a){"listPathEntries"===a.data.identifier?this._updateMatlabPathCache(a.data.data):"notifyCWDChange"===a.data.identifier?this._notifyCWDChanged(a.data.data):"notifyCWDFault"===a.data.identifier?this.emit("CWDFault",a.data):"cwdNotChanged"===a.data.identifier?this.emit("cwdNotChanged",
a.data):"listRootFolderResponse"===a.data.identifier?this.emit("accessibleRoots",a.data):"cwdResponse"===a.data.identifier&&this._handleCwdResponse(a.data.data)},getCurrentFolder:function(){return this.currentWorkingFolder},getCurrentFolderPath:function(){return this.getCurrentFolder()?b.pathFromFileInfo(this.getCurrentFolder()):""},_notifyCWDChanged:function(a){this.currentWorkingFolder=a.fileInfo;this._setStartupFolder(this.currentWorkingFolder);this.currentFolderMetaData=a.metaData;this.friendlyNameLocation=
this.currentFolderMetaData.friendlyNameLocation;this.pathIcon=this.currentFolderMetaData.icon;this.emit("CWDChanged",this.currentWorkingFolder)},_setStartupFolder:function(a){this.startupFolder||(this.startupFolder=a,this.emit("PathDataServiceStarted"))},getFriendlyLocation:function(){var a="",c;for(c in this.friendlyNameLocation)this.friendlyNameLocation.hasOwnProperty(c)&&(a+=this.friendlyNameLocation[c]);return a}})})},"pathdataservice-js/js/PathDataServiceFaultHandler":function(){define("dojo/_base/declare dojo/aspect dojo/on dojo/_base/lang dojo/Evented dojo/i18n!../l10n/nls/PathDataServiceMessages mw-notifications/Notifications mw-html-utils/HtmlUtils".split(" "),
function(g,f,e,d,b,a,c,h){return g([b],{constructor:function(a){a=a||{};this.pathDataService=a.pathDataService;e(this.pathDataService,"CWDFault",d.hitch(this,function(a){this._handleSetCWDMessageFault(a)}))},_handleSetCWDMessageFault:function(b){c.displayAlertDialog(a.cwdFaultErrorDialogTitle,h.escapeHtml(b.data),{"data-test-id":"cwdFaultDialog"});this.emit("CWDFault",b)}})})},"searchservice-js/js/SearchService":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/Evented","dojo/on","mw-messageservice/MessageService"],
function(g,f,e,d,b){return g([e],{constructor:function(a){this.args=a||{}},start:function(){b.subscribe("/matlab/searchServiceChannel",f.hitch(this,this._responseHandler))},performSearch:function(a){this.emit("searchOperationStarted");this.isSearchOn=!0;this._publish({request:"startSearch",searchText:a.searchText,location:a.location,shouldSearchSubFolders:a.shouldSearchSubFolders})},cancelSearch:function(){this.isSearchOn=!1;this._publish({request:"cancelSearchOperation"})},_responseHandler:function(a){"searchResults"===
a.data.message?this.isSearchOn&&this.emit("searchResults",a.data):this.emit(a.data.message)},_publish:function(a){b.publish("/matlab/searchServiceChannel",a)}})})},"MOTW/modules/settings/index":function(){define(["dojo/Deferred","matlab_preferences/preferencesUI/PreferenceSettingsServiceFactory","MOTW/motw/MotwApp","MOTW/motw/CoreActions"],function(g,f,e,d){return{initialize:function(b){var a=new g;b=f.getInstance(b);d.setService({PreferenceSettingsService:b});e.PreferenceSettingsService=b;a.resolve({exports:{PreferenceSettingsService:b}});
return a.promise},reset:function(b){}}})},"matlab_preferences/preferencesUI/PreferenceSettingsServiceFactory":function(){define(["matlab_preferences/preferencesUI/PreferenceSettingsService"],function(g){var f=null;return PreferenceSettingsServiceFactory={getInstance:function(e){f||(f=new g(e));return f},destroy:function(){f&&(f=null)}}})},"matlab_preferences/preferencesUI/PreferenceSettingsService":function(){define("dojo/_base/lang dojo/aspect dojo/Evented dojo/_base/declare dojo/Deferred mw-messageservice/MessageService mw-remote/Remote mw-utils/Utils".split(" "),
function(g,f,e,d,b,a,c,h){var k=[],l=!1,m=[],p=function(c){c&&(l=!0,Object.keys(m).forEach(g.hitch(this,function(c){a.publish("/JavaScript/Preferences/Settings/SettingsChannel",{eventType:m[c].eventType,uuid:m[c].uuid,SettingPath:m[c].SettingPath,settingKey:m[c].settingKey,SettingValue:m[c].SettingValue})})))},n=function(a){var c=a.data.uuid,b=a.data;a.data[1]&&a.data[1].message&&(c=a.data[0]);k[c]&&(a.data[1]&&a.data[1].message?k[c].reject(a.data[1].message):k[c].resolve(b),delete k[c])},q=function(a){throw Error("Error received: JavaScript Preference Settings service:"+
a);};return d([e],{constructor:function(b){a.subscribe("/JavaScript/Preferences/Settings/SettingsChannel",n);a.subscribe("/JavaScript/Preferences/Settings/SettingsWatchChannel",g.hitch(this,this.watchSetting));c.registerResponseHandler("FEvalResponse:GetPreferenceSettingsServiceInstance",p);c.registerFaultHandler("FEval:GetPreferenceSettingsServiceInstance",q);b&&b.workerReady?b.workerReady.then(g.hitch(this,"_sendMessage")):a.isConnected()?this._sendMessage():f.after(a,"onConnected",g.hitch(this,
function(){this._sendMessage()},!1))},_sendMessage:function(){c.sendMessage({FEval:{"function":"internal.matlab.desktop.preferences.JavaScriptSettings.getInstance",arguments:[],nargout:0,priority:1,dequeMode:"ppe"}},{},"GetPreferenceSettingsServiceInstance")},getSetting:function(c,d){var e=new b,f=h.generateUuid();k[f]=e;f={eventType:"getSetting",uuid:f,SettingPath:c,settingKey:d};l?a.publish("/JavaScript/Preferences/Settings/SettingsChannel",f):m.push(f);return e.promise},setSetting:function(c,d,
e){var f=new b,g=h.generateUuid();k[g]=f;c={eventType:"setSetting",uuid:g,SettingPath:c,settingKey:d,SettingValue:e};l?a.publish("/JavaScript/Preferences/Settings/SettingsChannel",c):m.push(c);return f.promise},watchSetting:function(a){this.emit("settingchanged",{settingKey:a.data.settingKey,oldValue:a.data.oldValue,newValue:a.data.newValue})}})})},"MOTW/modules/faults/index":function(){define(["dojo/Deferred","MOTW/motw/faultHandlerModule"],function(g,f){return{initialize:function(e){var d=new g;
f.setup(e);d.resolve({exports:{faultHandlerModule:f}});return d.promise}}})},"MOTW/motw/faultHandlerModule":function(){define("dojo/_base/connect dojo/aspect mw-messageservice/MessageService mw-remote/Remote mw-remote/remoteFaultCodes mw-log/Log MOTW/dialog/dialogStateManager dojo/i18n!MOTW/l10n/nls/motw".split(" "),function(g,f,e,d,b,a,c,h){var k,l,m,p,n;return{setup:function(g){k=g.wraService;l=g.iframeMessageService;m=g.uiConfigService;p=g.manifestService;k&&k.registerPostLogoutTask&&k.registerPostLogoutTask(function(){n=
!1}.bind(this));n=!0;d.registerTopLevelFaultHandler("*",function(a,d,e){var f;d={};if(n&&(!e||!e.requestMessages||!e.requestMessages.Logout)){e=h.fault.genericFailureTitle;f=h.fault.genericFailureMessage;if(a&&"unauthorized"!==k.getCurrentState()&&(a.faultCode===b.USER_NOT_AUTHORIZED||"403"===a.statusCode))e=h.fault.noLongerAuthorizedTitle,f=h.fault.noLongerAuthorizedMessage;d.closeCallback=function(){k.logoutWithoutSessionSave()};k.logoutWithoutSessionSave();c.openNotificationAlertDialog(e,f,d)}});
d.registerTopLevelFaultHandler(b.WORKER_NO_LONGER_AVAILABLE,function(){var a=h.fault.workerNoLongerAvailableTitle,b=h.fault.workerNoLongerAvailableMessage;k.logoutWithoutSessionSave();c.openNotificationAlertDialog(a,b,{})});d.registerTopLevelFaultHandler(b.INVALID_WORKER_REQUEST,function(a){c.openNotificationAlertDialog("invalid msg",a,{})});d.ignoreTopLevelFault(b.NO_WORKERS_AVAILABLE);d.ignoreTopLevelFault(b.SERVICE_UNAVAILABLE);d.registerTopLevelFaultHandler(b.CONNECTION_FAULT,function(b,d,e){if(!e.requestMessages.CurrentUser&&
!e.requestMessages.SyntaxHighlighting&&!e.requestMessages.RouterLogin&&!e.requestMessages.Login&&!k.isResettingWorker()){if(b&&";0"===b.message){a.log("registerTopLevelFaultHandler: XHR request was aborted");if(!this._firstSeenTime||this._firstSeenTime+2E3<Date.now()){this._firstSeenTime=Date.now();return}if(this._firstSeenTime+500>Date.now())return}var f=h.fault.connectionFaultTitle,l=h.fault.connectionFaultMessage,m={buttonText:[h.refresh],defaultAcceptButton:1,defaultCancelButton:2,icon:"error",
closeCallback:function(a){1===a.response&&document.location.reload(!0)}};setTimeout(function(){c.openNotificationConfirmDialog(f,l,m)},200)}});d.registerTopLevelFaultHandler(b.IFRAME_LOAD_TIMEOUT,function(a){c.openNotificationAlertDialog(h.fault.remoteLoadFaultTitle,h.fault.remoteLoadFaultMessage)});g=function(){"computeResourceReady"===k.getCurrentState()&&k.sendGetCurrentUser()};f.after(e,"onNotConnected",g);f.after(e,"onFatallyDisconnected",g);e.subscribe("/error/crash",function(){n=!1;this._handleMATLABCrash()}.bind(this))},
_handleMATLABCrash:function(){c.openNotificationConfirmDialog(h.fault.matlabCrashFaultTitle,h.fault.matlabCrashFaultMessage,{buttonText:[h.fault.restartMATLAB,h.logout],defaultAcceptButton:1,defaultCancelButton:2,icon:"error",closeCallback:function(a){1===a.response?this.isLiveEditorMode()?l.postMessage("reload",p.handleManifestReload()):k.workerReset():this.isLiveEditorMode()?l.postMessage("disconnect"):k.logoutWithoutSessionSave()}.bind(this)})},isLiveEditorMode:function(){return"LIVE_EDITOR"===
m.layoutMap.mode?!0:!1},setService:function(a){}}})},"MOTW/modules/layout/index":function(){define("dojo/Deferred dojo/_base/lang dojo/dom-class dojo/dom-style dojo/_base/connect matlab_preferences/preferencesUI/PreferenceSettingsServiceFactory MOTW/navigationShortcutsDialog/NavigationShortcutsDialog MOTW/motw/MotwApp MOTW/motw/CoreActions MOTW/layout/Layout MOTW/layout/LayoutManager MOTW/layout/LayoutFacade MOTW/layout/LayoutSessionDataAdapter MOTW/motw/MotwDefaultLayout MOTW/toolstrip/qab/QABContextualControlsActionMap MW/uiframework/UIContainer MOTW/motw/ActionIdConstants MOTW/findFiles/FindFilesKeyBindings dojo/i18n!MOTW/l10n/nls/motw".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v){return{initialize:function(d){var x=new g,y=l,B=new m({layoutStore:y.layoutStore,actionService:d.actionService},d.obsoleteView),D=new s("motw",{title:v.matlabOnlineTitle,globalPanelSetTitle:"MATLAB",showSingleDocumentTab:!0,reserveDocumentSpace:!1,groupDocumentsByType:!0,enableOnTopExpand:!0,persistLayout:!0,persistDocuments:!1,tabGroupTags:["motwToolstrip.globalTabGroup"],qabControlToActionMap:r,defaultLayout:q,actionService:d.actionService,sessionDataService:new n,
undockedPage:0<location.href.indexOf("-debug")?"/ui/webgui/src/undocked-debug.html":"/ui/webgui/src/undocked.html",hasMnemonics:!0,enableQABCustomization:!0});h.uiContainer=D;D.application=h;D.sessionDataService.uiContainer=D;e.add(D.getRootNode(),"hidden");var E=D._contextManager,F=D.uiBuilder;a.getInstance().getSetting(["matlab","confirmationdialogs"],"NavigationShortcutsConfirm").then(function(a){h.commonShortcutsDialog=new c({actionService:d.actionService,preferenceValue:a.value,executionService:h.executionService,
selector:h.uiContainer.getRootSelector()})});y=new p({layoutService:y,uiContainer:D});h.layoutService=y;var I=[t.NEW_FILE,t.NEW_FILE_LIVE_EDITOR,t.NEW_FOLDER,t.UPLOAD,t.DOWNLOAD,t.FIND_FILES,t.SAVE,t.SHOW_HISTORY],L=[];b.connect(d.executionService,"onExecutionStateChange",function(a){a===d.executionService.EXECUTION_STATES.INPUT?(y&&(y.disableWidget("cfb"),y.disableWidget("workspace"),y.disableWidget("veDialogGroup"),y.disableWidget("documents"),y.disableWidget("toolstrip")),L=I.map(function(a){var c=
d.actionService.getAction(a),b=!1;c&&(b=c.enabled,d.actionService.disableAction(a));return b})):(y&&(y.enableWidget("cfb"),y.enableWidget("workspace"),y.enableWidget("veDialogGroup"),y.enableWidget("documents"),y.enableWidget("toolstrip")),L.forEach(function(a,c){d.actionService.updateAction(I[c],{enabled:a})}),L=[])});k.setService({executionService:d.executionService,fileDataService:d.fileDataService,uiContainer:D,wraService:d.wraService,layoutService:y});d.actionService.loadActions(k.actions);u.setUpKeyBindings(d.actionService);
d.userReady.then(f.hitch(this,"_start",{uiContainer:D,layoutService:y}));var C=new g;d.workerReady.then(f.hitch(this,"_displayContainer",{uiContainer:D,uiContainerReady:C}));x.resolve({exports:{layoutManager:B,uiContainer:D,layoutService:y,uiBuilder:F,contextManager:E,uiContainerReady:C.promise}});return x.promise},_start:function(a){e.remove(a.uiContainer.getRootNode(),"hidden");d.set(a.uiContainer.getRootNode(),"opacity",1);a.layoutService.focusWidget("commandWindow")},_displayContainer:function(a){a.uiContainer.startup();
a.uiContainerReady.resolve()}}})},"MOTW/navigationShortcutsDialog/NavigationShortcutsDialog":function(){function g(f,e,d,b){b=!!b;f.addEventListener(e,d,b);return{remove:function(){f.removeEventListener(e,d,b)}}}define("dojo/_base/declare dojo/i18n!MOTW/l10n/nls/navigationShortcutsDialog dojo/keys matlab_preferences/preferencesUI/PreferenceSettingsServiceFactory mw-keybindings/KeyBindings mw-keybindings/shortcutStringGenerator mw-table/Table mw-tabular-data-model/DataStore MW/uiframework/AdvertiseShortcutsDialogManager mw-log/Log".split(" "),
function(f,e,d,b,a,c,h,k,l,m){return f(null,{constructor:function(a){a.actionService?this._actionService=a.actionService:m.error("actionService is required to define the AdvertiseShortcutsDialogManager.");a.preferenceValue?this._preferenceValue=a.preferenceValue:m.error("preferenceValue is required to determine the value of the checkbox in the navigation shortcuts dialog.");a.executionService?this._executionService=a.executionService:m.error("executionService is required to open the documentation link within the navigation shortcuts dialog content.");
a.selector?this._selector=a.selector:m.error("selector is required to define a keybinding on it for the navigation shortcuts dialog.");this._preferenceSettingsService=b.getInstance();this._createAdvertiseShortcutsDialogManager(this._actionService,this._preferenceValue)},_createAdvertiseShortcutsDialogManager:function(a,c){var b={dataTestId:"navigationShortcutsColModelTable",rowHeaderModel:{},columnModel:{columnConfig:[{label:e.shortcutsTableColumn1Label,dataIndex:0,width:{value:55,unit:"%"}},{label:e.shortcutsTableColumn2Label,
dataIndex:1,width:{value:45,unit:"%"}}]}},d=this._makeTableData(),f=new k(d),d=document.createElement("div");d.classList.add("navigationShortcutsDialogContent");var m=document.createElement("div");m.classList.add("navigationShortcutsTableContainer");b=new h(f,b);m.appendChild(b.domNode);b.startup();d.appendChild(m);d.appendChild(document.createElement("br"));b=document.createElement("div");b.setAttribute("id","navigationShortcutsDocContainer");m=document.createElement("span");m.setAttribute("id",
"navigationShortcutsDocLink");m.setAttribute("tabIndex","0");m.setAttribute("role","link");m.setAttribute("aria-labelledby","navigationShortcutsDocContainer navigationShortcutsDocLink");m.innerText=e.documentationLinkLabel;b.innerText=e.shortcutsDocContainerInnerText;b.appendChild(m);d.appendChild(b);this._advertiseShortcutsDialogManager=new l({actionService:a,dialogContent:d,dialogTitle:e.shortcutsDialogTitle,needCheckboxToNotShowDialogOnStartup:!0,selector:this._selector,preferenceValue:c,callback:this._dialogCallback.bind(this)})},
_navigationShortcutsDocLinkAction:function(){this._advertiseShortcutsDialogManager.closeDialog();this._executionService.executionEval("helpview('matlab','matlab_navigation_shortcuts','CSHelpWindow')");this._removeListeners()},_handleKeyDown:function(a){a.keyCode===d.ENTER&&(this._navigationShortcutsDocLinkAction(a),a.preventDefault())},_dialogCallback:function(a,c){var b=document.getElementById("navigationShortcutsDocLink");switch(a){case "beforeOpen":this._preferenceSettingsService.getSetting(["matlab",
"confirmationdialogs"],"NavigationShortcutsConfirm").then(function(a){this._advertiseShortcutsDialogManager.setPreferenceValue(a.value)}.bind(this));break;case "opened":b&&(this._listeners=[],this._listeners.push(g(b,"click",this._navigationShortcutsDocLinkAction.bind(this))),this._listeners.push(g(b,"keydown",this._handleKeyDown.bind(this))));break;case "closed":this._preferenceSettingsService.setSetting(["matlab","confirmationdialogs"],"NavigationShortcutsConfirm",c),b&&this._removeListeners()}},
_makeTableData:function(){var b=c.getString([a.Keys.SYSCTRL]),h=[];h.push([e.forwardShortcutLabel,"Ctrl + F6"]);h.push([e.backwardShortcutLabel,"Ctrl + Shift + F6"]);h.push([e.MoveIntoAToolLabel,"Tab"]);h.push([e.MoveBetweenControlsLabel,e.MoveBetweenControlsShortcutLabel]);h.push([e.AccessKeysLabel,"Alt"]);h.push([e.ListOfKeyboardShortcutsLabel,b+" + /"]);return h},_removeListeners:function(){this._listeners.forEach(function(a){a.remove()})}})})},"mw-table/Table":function(){var g=function(){function f(e,
d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define("dojo/on mw-table/view/TableView mw-table/viewmodel/ViewModel mw-table/controllers/scrolling/Scroll ./controllers/edit/EditControllerProxy mw-tabular-data-model/DataModel mw-tabular-data-model/rangeUtil mw-tabular-data-model/sort/Enum mw-table/utils/StateMutation mw-table/utils/rangeInterface mw-table/enums/PluginEnum mw-table/enums/StateEnum ./io/DataSize ./io/ViewPortGeom ./utils/Registration".split(" "),
function(f,e,d,b,a,c,h,k,l,m,p,n,q,r,s){function t(c){var h=void 0;new s;return{createtable:function(c,d,k){var f=new l(d),g=new a({viewModel:d,dataStore:c}),n=new q(d),p=[new r({viewPortItem:d.viewPort.rangeList[0],viewModel:d,dataSize:n})],s=new b({viewPortList:p,viewModel:d});return h=new e({dataSize:n,viewPortList:p,viewModel:d,scrollController:s,options:k,dataStore:c,rangeInterface:m,stateMutator:f,editControllerProxy:g})},mixinFacade:function(){h.registry.forEach(function(a){if(a[0].exposedAPI){a=
a[0].exposedAPI();for(var b in a)c[b]=a[b]}})},facadeListeners:function(){h.registry.forEach(function(a){a[0].emits&&a[0].emits.forEach(function(b){return c._eventMap[b]=a[0]})})}}}return function(){function a(b){var h=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");this._events=[];this.resizeHandler=this.resizeHandler.bind(this);var e=new c(b),k=new d(e),k=a._setViewModel(k,h),e=new t(this),h=this._tableView=
e.createtable(b,k,h);this._eventMap={};e.mixinFacade();e.facadeListeners();h.initializeTable()}g(a,[{key:"startup",value:function(){this._tableView.renderTable()}},{key:"destroy",value:function(){this._events.forEach(function(a){a.remove()});this._tableView.removeTable(this._container)}},{key:"on",value:function(a,c){var b=f(this._eventMap[a],a,c);this._events.push(b);return b}},{key:"scrollTo",value:function(a){}},{key:"getRangeFromId",value:function(a){}},{key:"resizeHandler",value:function(){this._tableView.throttledResize()}},
{key:"emits",value:function(){}},{key:"domNode",get:function(){return this._tableView.domNode}}],[{key:"_setViewModel",value:function(a,c){a.setState("lookAheadRowBuffer",c.lookAheadRowBuffer||3);a.setState("rowReloadPoint",c.rowReloadPoint||9);a.setState("translate3dThead",c.translate3dThead||"");a.viewPort=c.viewPort||{size:{left:0,top:0,width:0,height:0},rangeList:[h.range().setRows(0,11).setColumns(0,5)]};return a}},{key:"range",value:function(){return h.range()}},{key:"FEATURE",get:function(){return p.AVAILABLE}},
{key:"compare",get:function(){return k.compare}}]);return a}()})},"mw-table/view/TableView":function(){var g=function(){return function(e,d){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){var b=[],a=!0,c=!1,h=void 0;try{for(var k=e[Symbol.iterator](),f;!(a=(f=k.next()).done)&&!(b.push(f.value),d&&b.length===d);a=!0);}catch(m){c=!0,h=m}finally{try{if(!a&&k["return"])k["return"]()}finally{if(c)throw h;}}return b}throw new TypeError("Invalid attempt to destructure non-iterable instance");
}}(),f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define("../functional/FunctionalUtils ../enums/StateEnum ../utils/Geometry ../utils/Throttle ../controllers/data/IdController ../controllers/geometry/GeometryController ../controllers/scrolling/Scroll ../controllers/resize/tableResize ../controllers/events/EventsController ../controllers/columns/ColConfigController ../adaptors/columns/ColConfigAdaptor ../utils/initialization ../utils/Registration ../enums/PluginEnum ../enums/LogicalSizeEnum ../lifecycle/LifeCycle ../parsing/headers/ColumnHeaderState mw-tabular-data-model/rangeUtil".split(" "),
function(e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w){return function(){function b(a){var f=this;if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");this.initializeTable=this.initializeTable.bind(this);this.renderTable=this.renderTable.bind(this);this._initialized=!1;var s=a.dataStore,t=a.viewModel,u=a.viewPortList,I=a.dataSize,L=a.options;a=a.editControllerProxy;this._viewModel=t;this._dataStore=s;w.range().setRows(0,0).setColumns(0,0);t.setState(d.tableAffordanceWidth,{run:function(){return 0}});
t.setState(d.tableBottomLeftAffordanceHeight,0);t.setState(d.WIDTH_CHANGED,!1);t.setState(d.colResize,!1);t.setState("scrollPositionChanged",!1);t.setState(d.TABLE_AFFORDANCE_WIDTH,{run:function(){return 0}});var C=L=L||{},M=C.columnModel,G=C.features;t.setState(d.testId,"__MW_TABLE__"+C.dataTestId);this.viewPortList=u;var C=new h({viewModel:t}),N=new l({viewModel:t,viewPortList:u}),P=new m({viewModel:t}),M=M||{};this._headerParser=new v({dataSize:I,columnModel:M,viewModel:t});var M=new c({dataStore:s}),
I=new n({viewModel:t}),R=new p({adaptor:I}),G=G||["SingleRowSelection"],S=this.registry=[];this._adaptorList=new r;a.eventList().forEach(function(a){return f._adaptorList.register(a)});this._adaptorList.register(C.eventList());this._adaptorList.register(N.eventList());this._adaptorList.register(P.eventList());this._adaptorList.register(M.eventList());this._adaptorList.register(I.eventList());S.push([a],[C],[N],[P],[M],[R]);a=q.separateControllers(e.dedupe(e.flatten(G)),L._TreeTablePlugin);G=g(a,2);
a=G[0];G=G[1];a.push(k);a.forEach(function(a){a=new a({viewModel:t,dataStore:s,viewPortList:u,options:L});f._adaptorList.register(a.eventList());S.push([a])});G=q.prunePlugins(G,L._TreeTablePlugin);this._setupPlugins(G,L,[I])}f(b,[{key:"_setupPlugins",value:function(a,c){var b=this,h=2<arguments.length&&void 0!==arguments[2]?arguments[2]:[];a.forEach(function(a){var d=void 0;"string"===typeof a.adaptor&&(d=s.EXPERIMENTAL_ADAPTORS[a.adaptor]);try{var e=void 0,k=d?d:a.adaptor,f=h.indexOf(k);0>f?(e=
new k({viewModel:b._viewModel,dataStore:b._dataStore,options:c}),h.push(e)):e=h[f];b.registry.push([new a({adaptor:e}),e]);b._adaptorList.register(e.eventList())}catch(l){}})}},{key:"initializeTable",value:function(){this._lifecycle=new u(this._viewModel,this._adaptorList,this.viewPortList)}},{key:"renderTable",value:function(){var c=this._lifecycle.mount();this.throttledResize=a(c._handleResize,1E3/60)}},{key:"removeTable",value:function(){this._viewModel.destroy();this._lifecycle.unmount()}},{key:"domNode",
get:function(){return this._lifecycle.domNode}}]);return b}()})},"mw-table/functional/FunctionalUtils":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define([],function(){return function(){function f(){if(!(this instanceof f))throw new TypeError("Cannot call a class as a function");}g(f,
null,[{key:"curry",value:function(e){return function b(){var a=arguments;return a.length>=e.length?e.apply(null,a):function(){var c=[];Array.prototype.push.apply(c,a);Array.prototype.push.apply(c,arguments);return b.apply(null,c)}}}},{key:"find",value:function(e,d){for(var b=0;b<e.length&&!d(e[b]);)b++;return b<e.length?e[b]:null}},{key:"flatten",value:function(e){var d=[];e.forEach(function(b){b=Array.isArray(b)?b:[b];Array.prototype.push.apply(d,b)});return d}},{key:"dedupe",value:function(e){return e.reduce(function(d,
b){0>d.indexOf(b)&&d.push(b);return d},[])}},{key:"getNestedProp",value:function(e,d){var b=0,a=e;if(a){for(;b<d.length;){if(!a.hasOwnProperty(d[b]))return;a=a[d[b]];b+=1}return a}}},{key:"compose",value:function(){var e=[].concat(Array.prototype.slice.call(arguments)).reverse();return function(){for(var d=e[0].apply(this,arguments),b=1;b<e.length;b+=1)d=e[b].call(this,d);return d}}},{key:"fork",value:function(e,d,b){return function(a){return e(d(a),b(a))}}},{key:"alt",get:function(){return f.curry(function(e,
d,b){return e(b)||d(b)})}}]);return f}()})},"mw-table/enums/StateEnum":function(){define([],function(){return Object.freeze({ROW_HEIGHT:"rowHeight",COL_WIDTH:"colWidth",HEADER_MENU_AFFORDANCE:"headerMenuAffordance",EDIT_STATE:"editState",FOCUSED:"focused",SELECTED:"selected",tableFlexWidth:"tableFlexWidth",origHeaders:"origHeaders",tableBottomLeftAffordanceHeight:"tableBottomLeftAffordanceHeight",TABLE_AFFORDANCE_WIDTH:"tableAffordanceWidth",COLUMN_RESIZED:"columnResized",WIDTH_CHANGED:"widthChanged",
colResize:"colResize",testId:"data-test-id",displayRowHeader:"displayRowHeader",rowHeaderWidth:"rowHeaderWidth",PIVOT:"pivot",SORTED:"_sortIndicator",INTERACTIVE_CHANGE:"interactiveChange",ROW_HEADER_NODE:"rowHeaderNode",VIEWPORT_CHANGED:"viewportChanged",SET_SCROLL_TOP:"setScrollTop",SCROLL_COMPONENT_WIDTH:"scrollComponentWidth",SCROLL_COMPONENT_LEFT:"scrollComponentLeft",SCROLL_CONTAINER:"scrollComponent",TOTAL_COLUMN_WIDTH:"totalColumnWidth",TBODY:"tbody",TABLE_WIDTH:"tableWidth",VIEWPORT_CONTAINER:"viewportContainer",
TRANSLATE_X:"translateX",LOGICAL_VIEWPORT:"logicalViewport",SORTABLE:"sortable",COLUMN_CONFIG:"colconfig",state:{ACTIVE_CELL:"activeCell",VIEWPORT_CHANGED:"viewportChanged",PIVOT:"pivot"},publisher:{ROW_HEADER:"rowHeader",CELL_ENTER:"cellEnter",SCROLL_BAR_HEIGHT:"scrollBarHeight",SCROLL_BAR_WIDTH:"scrollBarWidth",TOOLTIP_DISMISS:"tooltipDismiss",HEADER_TRANSX:"headerTranslateX",CALCULATED_TABLE_WIDTH:"calculatedTableWidth",HEADER_ROW_HEIGHT:"headerRowHeight"},subscriber:{ROW_HEADER_PARENT:"rowHeaderParent",
TOP_LEFT:"topLeft",TOOLTIP_ENTER:"tooltipEnter",TOOLTIP_LEAVE:"tooltipLeave",TOOLTIP_GLOBAL_LEAVE:"tooltipGlobalLeave",TABLE_BOTTOM_LEFT_AFFORDANCE:"tableBottomLeftAffordance",HEADER_RIGHT_AFFORDANCE:"headerRightAffordance",TABLE_HAS_VERT_SCROLL:"tableHasVertScroll",HEADER_MIN_HEIGHT:"headerMinHeight",HEADER_TRANSFORMX:"headerTransformX",TBODY_TRANSFORM:"tbodyTransform",TABLE_WIDTH:"tableWidth",HEADER_WIDTH:"headerWidth"},treetable:{displayTreeColumn:"displayTreeColumn",ComponentFactory:"ComponentFactory",
PropManager:"PropManager"}})})},"mw-table/utils/Geometry":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define([],function(){var f={"%":"100%",px:"0px"};return function(){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");}g(e,null,[{key:"getMaxWidthForUnit",
value:function(d){return f[d]||"0px"}},{key:"getColUnit",value:function(d){return d&&d.width&&d.width.unit?d.width.unit:null}}]);return e}()})},"mw-table/utils/Throttle":function(){define([],function(){return function(g,f){function e(h){d=!0;c=window.setTimeout(function(){g.apply(null,a);b=Date.now();d=!1},h)}var d=!1,b=0,a=void 0,c=-1;return function(){a=arguments;var h=f-(Date.now()-b);0>=h||h>f?(g.apply(null,arguments),b=Date.now(),window.clearTimeout(c),d=!1):d||e(h)}}})},"mw-table/controllers/data/IdController":function(){var g=
function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["mw-tabular-data-model/rangeUtil"],function(f){return function(){function e(d){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this._dataStore=d.dataStore;this.getRangeFromId=this.getRangeFromId.bind(this)}g(e,[{key:"eventList",
value:function(){return{}}},{key:"exposedAPI",value:function(){return{getRangeFromId:this.getRangeFromId}}},{key:"getRangeFromId",value:function(d){if(!d||void 0===d.id)throw Error("You must provide a id to locate a range");return this._dataStore.getIndex({id:d.id}).then(function(b){return b&&null!=b.index?f.range().setRows(b.index,b.index):null})}}]);return e}()})},"mw-tabular-data-model/rangeUtil":function(){function g(e,d){if(!(e instanceof d))throw new TypeError("Cannot call a class as a function");
}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define([],function(){var e=function(b,a){if(!(0===b||0<b))throw Error("Invalid start value set");if(!(0===a||0<a))if(0!==b||-1!==a)throw Error("Invalid end value set");var c={};Object.defineProperty(c,"start",{value:b,enumerable:!0});Object.defineProperty(c,
"end",{value:a,enumerable:!0});Object.defineProperty(c,"count",{value:a-b+1,enumerable:!0});return c},d=function(){function b(a,c,h,d){g(this,b);Object.defineProperty(this,"rows",{value:e(a,c),enumerable:!0});Object.defineProperty(this,"columns",{value:e(h,d),enumerable:!0})}f(b,[{key:"setEntireColumns",value:function(a,c){void 0===c&&(c=a);return new b(0,Infinity,a,c)}},{key:"setEntireRows",value:function(a,c){void 0===c&&(c=a);return new b(a,c,0,Infinity)}},{key:"setColumns",value:function(a,c){return new b(this.rows.start,
this.rows.end,a,c)}},{key:"setRows",value:function(a,c){return new b(a,c,this.columns.start,this.columns.end)}},{key:"column",get:function(){return this.columns.start===this.columns.end&&0===this.rows.start&&Infinity===this.rows.end?this.columns.start:null}},{key:"row",get:function(){return this.rows.start===this.rows.end&&0===this.columns.start&&Infinity===this.columns.end?this.rows.start:null}}]);return b}();Object.defineProperty(d.prototype,"row",{enumerable:!0});Object.defineProperty(d.prototype,
"column",{enumerable:!0});return function(){function b(){g(this,b)}f(b,null,[{key:"range",value:function(){return new d(0,-1,0,-1)}},{key:"doesRangeIntersect",value:function(a,c){return a.columns.start<=c.columns.end&&a.columns.end>=c.columns.start&&a.rows.start<=c.rows.end&&a.rows.end>=c.rows.start?!0:!1}},{key:"isRangeEqual",value:function(a,c){return a===c||a.columns.start===c.columns.start&&a.columns.end===c.columns.end&&a.rows.start===c.rows.start&&a.rows.end===c.rows.end}},{key:"isRangeInside",
value:function(a,c){return a===c||a.columns.start<=c.columns.start&&a.columns.end>=c.columns.end&&a.rows.start<=c.rows.start&&a.rows.end>=c.rows.end}},{key:"groupRangeListByRow",value:function(a){return b._groupRangeList(a,"rows")}},{key:"groupRangeListByColumn",value:function(a){return b._groupRangeList(a,"columns")}},{key:"_groupRangeList",value:function(a,c){var h=[],d={};a.forEach(function(a){var e=b._hashRankFromRange(a,c),f=d[e];0<=f?h[f].push(a):(f=h.length,d[e]=f,h[f]=[a])});return h}},{key:"_hashRankFromRange",
value:function(a,c){var b=a[c].start,d=a[c].end;return 0===a[c].count?-1:d*d+d+b}}]);return b}()})},"mw-table/controllers/geometry/GeometryController":function(){function g(e,d,b){d in e?Object.defineProperty(e,d,{value:b,enumerable:!0,configurable:!0,writable:!0}):e[d]=b;return e}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,
b);a&&e(d,a);return d}}();define(["../../enums/EventEnum","../../enums/StateEnum"],function(e,d){return function(){function b(a){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");this._vm=a.viewModel;this._vm.setState(d.ROW_HEADER_NODE,{offsetWidth:0});this._publishNode={};this._subscribeNode={}}f(b,[{key:"exposedAPI",value:function(){return{}}},{key:"eventList",value:function(){var a=this,c;return c={},g(c,e.internal.NODE_PUBLISH,function(c){return a._nodePublish(c.event)}),
g(c,e.internal.NODE_SUBSCRIBE,function(c){return a._nodeSubscribe(c.event)}),g(c,e.internal.NODE_UNSUBSCRIBE,function(c){return a._nodeUnsubscribe(c.event)}),g(c,e.internal.NODE_NOTIFY,function(c){return a._notifyChannel(c.event)}),g(c,e.internal.FORCE_LAYOUT,this._notifyAll.bind(this)),c}},{key:"_nodePublish",value:function(a){this._publishNode[a.publisherId]=a.publisherFn}},{key:"_nodeSubscribe",value:function(a){this._subscribeNode[a.subscriberId]={subscriberFn:a.subscriberFn,publisherId:a.subscribeTo}}},
{key:"_nodeUnsubscribe",value:function(a){delete this._subscribeNode[a.subscriberId]}},{key:"_notifyChannel",value:function(a){var c=a.publisherFn;a=g({},a.publisherId,c());this._notifySubscribers(a)}},{key:"_notifyAll",value:function(){var a=this,c={};Object.keys(this._publishNode).forEach(function(b){c[b]=(0,a._publishNode[b])()});this._notifySubscribers(c)}},{key:"_notifySubscribers",value:function(a){var c=this;Object.keys(this._subscribeNode).forEach(function(b){if(c._subscribeNode[b]){var d=
c._subscribeNode[b];b=d.subscriberFn;d=d.publisherId;a.hasOwnProperty(d)&&b(a[d])}})}}]);return b}()})},"mw-table/enums/EventEnum":function(){define([],function(){return Object.freeze({ScrollComponentMounted:"scrollMounted",internal:{SCROLL_COMPONENT_MOUNTED:"scrollMounted",SCROLL_COMPONENT_UPDATED:"scrollUpdated",TABLE_CELL_CLICK:"tableCellClick",INTERACTIVE_CELL_CLICK:"interactiveCellClick",TABLE_KEY_PRESS:"tableKeyPress",CELL_FOCUS_KEY:"cellFocusKeyPress",CELL_FOCUS_CLICK:"cellFocusClick",CELL_SELECTION_CLICK:"cellSelectionClick",
CELL_SELECTION_KEY:"cellSelectionKeyPress",SORT_AFFORDANCE_CLICKED:"sortAffordanceClicked",TABLE_COLUMN_SORT:"tableColumnSort",TABLE_RESIZE:"tableResized",COL_RESIZE:"colResize",COL_HEADER_MOUNT:"colHeaderDidMount",TABLE_MOUNT:"tableMounted",TABLE_SCROLL:"tableScroll",FORCE_LAYOUT:"forceLayout",NODE_PUBLISH:"nodePublish",NODE_SUBSCRIBE:"nodeSubscribe",NODE_UNSUBSCRIBE:"nodeUnsubscribe",NODE_NOTIFY:"nodeNotify",BUFFER_DATA:"viewDataChanged",DATA_SIZE:"dataSizeChanged",ROW_META:"pagedRowMetaDataChanged",
TBODY_MOUNT:"tbodyMount",COL_HEADER_UPDATE:"colHeaderUpdate",SET_LAST_COLUMN:"setLastColumn",COMPUTE_TRANSLATEX:"computeTranslateX",TABLE_WIDTH:"tableWidth",RESET_SCROLL_TO:"resetScrollTo",TABLE_DBL_CLICK:"tableDblClick",TABLE_SELECTED_ACTION:"tableSelectedAction",HEADER_RECTS:"headerRects",ROW_RECTS:"rowRects",HEADER_CLICKED:"headerClicked",TABLE_RIGHT_CLICK:"tableRightClick"},exposed:{SELECTION_CHANGED:"selectionChanged",HEADER_MENU:"headerMenuRequested",SELECTED_ACTION:"selectedAction",CONTEXT_MENU:"contextMenu"}})})},
"mw-table/controllers/scrolling/Scroll":function(){var g=function(){return function(e,d){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){var b=[],a=!0,c=!1,h=void 0;try{for(var k=e[Symbol.iterator](),f;!(a=(f=k.next()).done)&&!(b.push(f.value),d&&b.length===d);a=!0);}catch(m){c=!0,h=m}finally{try{if(!a&&k["return"])k["return"]()}finally{if(c)throw h;}}return b}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),f=function(){function e(d,b){for(var a=0;a<
b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define("../../view/TableUtils ../../calc/BufferMath ../../parsing/headers/PureColumnUtils ../../enums/StateEnum ../../enums/EventEnum ../../enums/DefaultsEnum ../../enums/LogicalSizeEnum".split(" "),function(e,d,b,a,c,h,k){return function(){function a(c){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");
this._viewPortList=c.viewPortList;this.viewModel=c.viewModel;this._geomObject={scrollLeft:0,translateX:0};this._scrollLeft=0;this._size=new k(this.viewModel);this._headerRects=function(){}}f(a,[{key:"exposedAPI",value:function(){return{}}},{key:"eventList",value:function(){var a=this,b={};b[c.internal.TABLE_SCROLL]=function(c){return a._handler(c.event)};b[c.internal.RESET_SCROLL_TO]=function(c){return a._resetScrollTo(c.event)};b[c.internal.COMPUTE_TRANSLATEX]=function(c){return a._getTranslateX(c.event)};
b[c.internal.TABLE_WIDTH]=function(c){return a._updateGeomObject(c.event)};b[c.internal.HEADER_RECTS]=function(c){return a._setHeaderNodes(c)};return b}},{key:"_setHeaderNodes",value:function(a){this._headerRects=a.event.children}},{key:"_calcMaxWidth",value:function(a,c){for(var b=this._viewPortList[0].getWidth(),h=void 0,d=0,h=a.length-1;0<=h&&!(d+=a[h].offsetWidth,d>b);h-=1);h=Math.max(h,0);h=Math.floor(this._size.COL_WIDTH*((d-b)/a[h].offsetWidth+(h+c)));return[h+b,h]}},{key:"_allColumnsInView",
value:function(a){var c=this.viewModel.dataSize.columns.count,c=this.viewModel.getColumnHeaders().length||c;if(b.areColumnsNotPaged(c))return this._geomObject.translateX=0,a.result=this._geomObject,this._geomObject.translateX}},{key:"_scrollPositionAndWidthUnchanged",value:function(a){if(this._geomObject.physScrollX===this._scrollLeft&&!a)return this._geomObject.translateX}},{key:"_resizeAtScrollZero",value:function(a){if(a&&0===this._scrollLeft)return this._geomObject.translateX}},{key:"_scrollExceedsTableWidth",
value:function(a){this._updateGeomObject(a);a=this._geomObject;var c=a.physicalWidth,b=a.childClientWidth;if(this._scrollLeft>=a.maxScroll)return this._geomObject.translateX=c-b,this._geomObject.translateX}},{key:"_setPostUpdate",value:function(a){var c=this,b=this.viewModel.getStateByKey("LastScrollColumnFn").value,h=b(this._headerRects());h!==a?setTimeout(function(){c.viewModel.deleteState("LastScrollColumn");c.viewModel.deleteState("LastScrollColumnFn");c._viewPortList[0].setScrollLeftPx(h,!0)},
0):(this.viewModel.deleteState("LastScrollColumn"),this.viewModel.deleteState("LastScrollColumnFn"))}},{key:"_keyboardScrollTranslateX",value:function(a){var c=this._viewPortList[0].getWidth(),b=this._viewPortList[0].getScrollLeft(),h=0,d=this.viewModel.getStateByKey("LastScrollColumn");if(d)for(var d=d.value,e=this._headerRects(),k=Object.keys(e),f=0;f<k.length;f+=1){var l=k[f],h=h+e[l].width;if(Number(l)===d)return this._setPostUpdate(b),c=Math.min(b-h+c-1,b),this._geomObject.translateX=c,a.result=
this._geomObject,this._geomObject.translateX}}},{key:"_computeTranslateX",value:function(a){for(var c=a.headerList,b=this._geomObject,h=b.physScrollX,d=b.scrollWidth,e=b.scrollXPos,b=b.bufferedColCount,k=0,f=0;f<b;f+=1)c[f]&&(k+=c[f].offsetWidth-this._size.COL_WIDTH);this._geomObject.translateX=Math.floor(e-k-(d/this._size.COL_WIDTH-1)*(h%this._size.COL_WIDTH));a.result=this._geomObject;return this._geomObject.translateX}},{key:"_getTranslateX",value:function(a){a.result=this._geomObject;return 0===
this._allColumnsInView(a)?this._geomObject.translateX:this._scrollPositionAndWidthUnchanged(a.widthChanged)||this._resizeAtScrollZero(a.widthChanged)||this._scrollExceedsTableWidth(a)||this._keyboardScrollTranslateX(a)||this._computeTranslateX(a)}},{key:"_updateGeomObject",value:function(a){var c=a.headerList,e=a.headerThead,k=this.viewModel.viewBuffer.rangeList[0].columns.start,f=this._size.COL_WIDTH*k,l=this._viewPortList[0].getLastBufferedColumn(),t=this.viewModel.dataSize.columns.count,u=this.viewModel.dataSize.columns.count-
1,v=Math.min(u,d.calculateFirstVisible(this._size.COL_WIDTH,this._scrollLeft)),w=u*this._size.COL_WIDTH,x=this._viewPortList[0].getWidth(),t=this.viewModel.getColumnHeaders().length||t;if(b.areColumnsPaged(t)){var t=Math.min(Math.max(0,v-k),l),y=Infinity,B=0;Math.floor((w-x)/this._size.COL_WIDTH)-h.buffers.COL_OVERSCAN<=k&&l===u&&(u=this._calcMaxWidth(c,k),w=g(u,2),u=w[0],y=w[1],B=Math.floor(u));this._geomObject={maxScroll:y,physicalWidth:B,childClientWidth:e.offsetWidth,scrollXPos:f,bufferedColCount:Math.min(v-
k,l),scrollWidth:c[t].scrollWidth,physScrollX:this._scrollLeft,translateX:this._geomObject.translateX}}a.result=this._geomObject}},{key:"_handler",value:function(a){var c=this.viewModel.viewPort;c.rangeList[0]=this._viewPortList[0].getViewPort();this._scrollLeft=a.target.scrollLeft;this.viewModel.viewPort=c;e.renderUpdate(this.viewModel,this._viewPortList[0].getBufferedViewPort())}}]);return a}()})},"mw-table/view/TableUtils":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=
d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["../enums/DefaultsEnum","../enums/StateEnum","../parsing/headers/PureColumnUtils","mw-tabular-data-model/rangeUtil"],function(f,e,d,b){return function(){function a(){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");}g(a,null,[{key:"getFocusedCell",value:function(a){var b={},d=void 0;
a&&(a.rangeList&&a.rangeList[0])&&(d=a.rangeList[0]);d&&(d.rows&&d.columns)&&(a=[d.rows.start,d.columns.start].join(),b[a]="mw-table-cell-focused");return b}},{key:"getInteractiveRendererFor",value:function(c,b,d){for(var e=c.rangeList||[],f=0;f<e.length;f++)if(a.isCellInRange(e[f],b,d)){if(c.value[f])return{renderer:c.value[f],range:e[f]};break}return null}},{key:"isCellInRange",value:function(a,b,d){return d>=a.columns.start&&d<=a.columns.end&&b>=a.rows.start&&b<=a.rows.end?!0:!1}},{key:"isInRange",
value:function(a,b,d){return d>=a&&d<=b}},{key:"getMeta",value:function(c,b,d,e){var f={};b=c+b;c-=1;if(d&&e){d=d.rangeList;for(var g=0;g<d.length;g++)for(var n=Number(d[g].rows.start),q=Number(d[g].rows.end),r=c;r<=b;r++)a.isInRange(n,q,r)&&(f[r]=f[r]||{},f[r][e]=!0)}return f}},{key:"getTableHeaderStyle",value:function(a,b){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,l=3<arguments.length&&void 0!==arguments[3]?arguments[3]:f.dimensions.COL_WIDTH,m={};isNaN(a)&&(a=l,b="px");""===
b&&(b="px");switch(b){case "percent":case "%":d.areColumnsPaged(e);m={maxWidth:"none",width:Math.min(100,Math.abs(a))+"%"};break;case "px":a=Math.max(l,a),m={maxWidth:a,minWidth:a}}return m}},{key:"computeTableHeight",value:function(a,b){return(Math.max(a*b,1)||1)+"px"}},{key:"renderUpdate",value:function(a,b){a.viewBuffer={size:null,rangeList:[b]}}}]);return a}()})},"mw-table/enums/DefaultsEnum":function(){define([],function(){var g=Object.freeze({COL_WIDTH:82,ROW_HEIGHT:22,MIN_ROW_HEADER_WIDTH:40,
TOOLTIP_MIN_WIDTH:300}),f=Object.freeze({ROW_OVERSCAN:4,COL_OVERSCAN:3,UNPAGED_COL_LIMIT:12});return Object.freeze({dimensions:g,buffers:f,BORDER_WIDTH:1,ZERO_HEIGHT_ROWS:12,ZERO_WIDTH_COLS:12})})},"mw-table/parsing/headers/PureColumnUtils":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();
define(["../../functional/FunctionalUtils","../../functional/Maybe","../../enums/DefaultsEnum","../../renderers/DefaultRenderer","../../editors/DefaultEditor"],function(f,e,d,b,a){var c=function(a){return 0<a.length},h=function(a){return 0<=a.dataIndex},k=function(a){return"px"===a.width.unit||"%"===a.width.unit||""===a.width.unit||!a.width.value&&!a.width.unit},l=function(a){return!isNaN(a.value)},m=function(a){return!isNaN(a.value)&&"%"!==a.unit};return function(){function a(){if(!(this instanceof
a))throw new TypeError("Cannot call a class as a function");}g(a,null,[{key:"areColumnsPaged",value:function(a){return a>=d.buffers.UNPAGED_COL_LIMIT}},{key:"areColumnsNotPaged",value:function(c){return!a.areColumnsPaged(c)}},{key:"parseHeaderConfig",value:function(a,c,b){var d=c.label,d=void 0===d?"":d,f=c.dataIndex,f=void 0===f?-1:f,l=c.width,m=c.renderer,m=void 0===m?null:m,g=c.editor,g=void 0===g?null:g,p=c.interactiveRenderer,p=void 0===p?null:p,y=c.hidden,y=void 0===y?!1:y,B=c.hideable,B=void 0===
B?!0:B,D=c.columnId,D=void 0===D?null:D;c=c.headerRenderer;c=void 0===c?null:c;a=e.fromType(a,void 0===l?{}:l).orElse({});p&&(m=g=null);return e.fromType(h,{label:d,dataIndex:f,width:a,editor:g,renderer:m,interactiveRenderer:p,columnId:null!==D?D.toString():b.toString(),hidden:y,hideable:B,headerRenderer:c}).filter(k).orElse(null)}},{key:"initializeConfiguredHeaders",value:function(b){b=b.columnConfig;b=void 0===b?[]:b;var h=e.fromType(a.areColumnsNotPaged,b.length).chain(function(){return l}).orElse(m),
d=f.curry(a.parseHeaderConfig)(h);return e.fromType(c,b).chain(function(a){return a.map(d)}).chain(function(a){return a.filter(function(a){return a})}).orElse(null)}},{key:"validateColPct",value:function(a){var c=0,b=0,h=-1;a.forEach(function(a,d){if(a.width&&!isNaN(a.width.value)&&"%"===a.width.unit){var e=Math.abs(a.width.value);c+=e;e>b&&(h=d,b=e)}});a=100-c;1>a&&(h=-1);return[a,h]}},{key:"getTbodyHeaderClass",value:function(c){var b=c.headers;c=c.dataSize;return a.areColumnsPaged((void 0===b?
[]:b).length||c)?"mw-tbody-paged-columns":"mw-tbody-all-columns"}},{key:"getTableHeaderClass",value:function(c){var b=c.headers;c=c.dataSize;return a.areColumnsPaged((void 0===b?[]:b).length||c)?"mw-table-paged-columns":""}},{key:"getPercentColumnPageWidth",value:function(c){function b(a){if(a.width)return"%"===a.width.unit}var h=c.headers,h=void 0===h?[]:h;c=c.dataSize;return a.areColumnsNotPaged(h.length||c)&&f.find(h,b)?"100%":null}}]);return a}()})},"mw-table/functional/Maybe":function(){function g(b,
a){if(!b)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&("object"===typeof a||"function"===typeof a)?a:b}function f(b,a){if("function"!==typeof a&&null!==a)throw new TypeError("Super expression must either be null or a function, not "+typeof a);b.prototype=Object.create(a&&a.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}});a&&(Object.setPrototypeOf?Object.setPrototypeOf(b,a):b.__proto__=a)}function e(b,a){if(!(b instanceof
a))throw new TypeError("Cannot call a class as a function");}var d=function(){function b(a,c){for(var b=0;b<c.length;b++){var d=c[b];d.enumerable=d.enumerable||!1;d.configurable=!0;"value"in d&&(d.writable=!0);Object.defineProperty(a,d.key,d)}}return function(a,c,h){c&&b(a.prototype,c);h&&b(a,h);return a}}();define([],function(){var b=function(){function b(){e(this,b)}d(b,[{key:"isNothing",get:function(){return!1}},{key:"isJust",get:function(){return!1}}],[{key:"fromType",value:function(b,h){return b(h)?
new c(b,h):new a}}]);return b}(),a=function(a){function c(){e(this,c);return g(this,(c.__proto__||Object.getPrototypeOf(c)).apply(this,arguments))}f(c,a);d(c,[{key:"chain",value:function(a){return this}},{key:"filter",value:function(){return this}},{key:"orElse",value:function(a){return a}},{key:"isNothing",get:function(){return!0}}]);return c}(b),c=function(a){function c(a,b){e(this,c);var h=g(this,(c.__proto__||Object.getPrototypeOf(c)).call(this));h._typeCheck=a;h._value=b;return h}f(c,a);d(c,
[{key:"chain",value:function(a){return b.fromType(this._typeCheck,a(this._value))}},{key:"filter",value:function(a){return b.fromType(a,this._value)}},{key:"orElse",value:function(){return this._value}},{key:"isJust",get:function(){return!0}}]);return c}(b);return b})},"mw-table/renderers/DefaultRenderer":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}
return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define([],function(){return function(){function f(e){if(!(this instanceof f))throw new TypeError("Cannot call a class as a function");this.config=e}g(f,[{key:"getTooltip",value:function(e){return{text:e}}},{key:"getDomNode",value:function(e){var d=document.createElement("div");d.style.textAlign="left";d.style.textOverflow="ellipsis";d.textContent=e;d.style.overflow="hidden";d.className="mw-string-renderer";return d}}]);return f}()})},
"mw-table/editors/DefaultEditor":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["mw-table/utils/Emitter","../enums/KeyCodeEnum"],function(f,e){return function(){function d(b,a){if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");var c=new f;void 0===b&&
(b="");this.config=a;this._emit=c.emit.bind(c);this.on=c.on.bind(c);this._handleKeyDown=this._handleKeyDown.bind(this);this._handleBlur=this._handleBlur.bind(this);c=document.createElement("div");this._oldValue=b;var h=this._textField=document.createElement("input");h.input="text";h.value=b;h.tabIndex=0;c.appendChild(h);this._domNode=c;h.className="mwTableTextEditor";this._textField.addEventListener("blur",this._handleBlur);this._textField.addEventListener("keydown",this._handleKeyDown)}g(d,[{key:"_handleBlur",
value:function(){this._emit("editComplete",{newValue:this._textField.value,oldValue:this._oldValue})}},{key:"_handleKeyDown",value:function(b){b.stopPropagation();switch(b.keyCode){case 27:this._emit("editCanceled");break;case 13:this._emit("editComplete",{newValue:this._textField.value,oldValue:this._oldValue});break;case e.PAGE_UP:case e.PAGE_DOWN:b.preventDefault()}}},{key:"setFocus",value:function(){this._textField.focus()}},{key:"getDomNode",value:function(){return this._domNode}},{key:"destroy",
value:function(){this._textField.removeEventListener("blur",this._handleBlur);this._textField.removeEventListener("keydown",this._handleKeyDown);delete this._textField;delete this._domNode}},{key:"value",get:function(){return this._textField.value},set:function(b){this._textField.value=b}}]);return d}()})},"mw-table/utils/Emitter":function(){define(["dojo/Evented","dojo/_base/declare"],function(g,f){var e=f([g],{});return function b(){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");
var a=new e;this.emit=a.emit.bind(a);this.on=a.on.bind(a)}})},"mw-table/enums/KeyCodeEnum":function(){define([],function(){return Object.freeze({BACKSPACE:8,NUM_START:48,NUM_END:57,SPACE:32,ENTER:13,ALPHA_START:65,ALPHA_END:91,NUMPAD_START:95,NUMPAD_END:112,SYM1_START:185,SYM1_END:193,SYM2_START:219,SYM2_END:222,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,CTRL:17,SHIFT:16,META:91,ALT:16})})},"mw-table/calc/BufferMath":function(){var g=function(){function f(e,
d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["../enums/DefaultsEnum"],function(f){return function(){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");}g(e,null,[{key:"calculateRangeEnd",value:function(d,b,a){return Number(b)+Math.ceil(a/d)}},{key:"calcVisible",value:function(d,
b){return Number(d)+Number(b)-1}},{key:"calculateFirstVisible",value:function(d,b){return Math.max(0,Math.floor(b/d))}},{key:"sum",value:function(d,b){return Number(d)+Number(b)}},{key:"roundedDivision",value:function(d,b){return Math.floor(b/d)}},{key:"calculateMaxFirstVisible",value:function(d,b){return Math.max(0,d-b)}},{key:"min2",value:function(d,b){return Math.min(d,b)}},{key:"max2",value:function(d,b){return Math.max(d,b)}}]);return e}()})},"mw-table/enums/LogicalSizeEnum":function(){var g=
function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["../enums/DefaultsEnum","../enums/StateEnum"],function(f,e){return function(){function d(b){if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");this._viewModel=b}g(d,[{key:"COL_WIDTH",get:function(){var b=this._viewModel.getStateByKey(e.COL_WIDTH),
a=f.dimensions.COL_WIDTH;b&&b.value&&(a=b.value);return a}},{key:"ROW_HEIGHT",get:function(){var b=this._viewModel.getStateByKey(e.ROW_HEIGHT),a=f.dimensions.ROW_HEIGHT;b&&b.value&&(a=b.value);return a}}]);return d}()})},"mw-table/controllers/resize/tableResize":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&
f(e,b);return e}}();define(["../../view/TableUtils","../../enums/StateEnum","../../enums/EventEnum"],function(f,e,d){return function(){function b(a){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");this.viewModel=a.viewModel;this._viewPortList=a.viewPortList}g(b,[{key:"eventList",value:function(){var a=this,c={};c[d.internal.TABLE_RESIZE]=function(c){return a.handleResize(c.event)};c[d.internal.TABLE_MOUNT]=function(c){return a.handleInit(c.event)};return c}},{key:"handleInit",
value:function(a){this._viewPortList[0].setContainer(a.table)}},{key:"handleResize",value:function(){var a=this.viewModel.viewPort;a.rangeList[0]=this._viewPortList[0].getViewPort();this.viewModel.setState(e.WIDTH_CHANGED,!0);this.viewModel.viewPort=a;f.renderUpdate(this.viewModel,this._viewPortList[0].getBufferedViewPort())}}]);return b}()})},"mw-table/controllers/events/EventsController":function(){function g(e,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+
typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["../../utils/Emitter","../../enums/EventEnum","mw-tabular-data-model/rangeUtil"],
function(e,d,b){return function(a){function c(a){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var b;b=(c.__proto__||Object.getPrototypeOf(c)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");b=b&&("object"===typeof b||"function"===typeof b)?b:this;b._viewModel=a.viewModel;return b}g(c,a);f(c,[{key:"exposedAPI",value:function(){return{}}},{key:"eventList",value:function(){var a={};a[d.internal.TABLE_RIGHT_CLICK]=
this._handleRightClick.bind(this);return a}},{key:"_handleRightClick",value:function(a){var c=a.event,b=c.row,d=c.col,c=(this._viewModel.getColumnHeaders()[Number(d)]||{dataIndex:d}).dataIndex,d=this._getRangeFromCellIndices(b,d),b=this._getRangeFromCellIndices(b,c);this.emit("contextMenu",{top:a.event.top,left:a.event.left,viewRange:d,dataRange:b})}},{key:"_getRangeFromCellIndices",value:function(a,c){var d=Math.max(0,a),e=Math.max(-1,a),f=Math.max(0,c),g=Math.max(-1,c);return b.range().setRows(d,
e).setColumns(f,g)}},{key:"emits",get:function(){return["contextMenu"]}}]);return c}(e)})},"mw-table/controllers/columns/ColConfigController":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["../../adaptors/columns/ColConfigAdaptor"],function(f,e){return function(){function d(b){if(!(this instanceof
d))throw new TypeError("Cannot call a class as a function");this._adaptor=b.adaptor}g(d,[{key:"exposedAPI",value:function(){return{getColumnConfig:this.getColumnConfig.bind(this),setColumnConfig:this.setColumnConfig.bind(this)}}},{key:"setColumnConfig",value:function(b){this._adaptor.setColumnConfig(b)}},{key:"getColumnConfig",value:function(){return this._adaptor.getColumnConfig()}},{key:"listensOn",get:function(){return[]}},{key:"emits",get:function(){return[]}}],[{key:"adaptor",get:function(){return e}}]);
return d}()})},"mw-table/adaptors/columns/ColConfigAdaptor":function(){function g(d,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}var f=function(){return function(d,b){if(Array.isArray(d))return d;if(Symbol.iterator in Object(d)){var a=[],c=!0,
h=!1,e=void 0;try{for(var f=d[Symbol.iterator](),m;!(c=(m=f.next()).done)&&!(a.push(m.value),b&&a.length===b);c=!0);}catch(g){h=!0,e=g}finally{try{if(!c&&f["return"])f["return"]()}finally{if(h)throw e;}}return a}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),e=function(){function d(b,a){for(var c=0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=!0;"value"in h&&(h.writable=!0);Object.defineProperty(b,h.key,h)}}return function(b,a,c){a&&d(b.prototype,
a);c&&d(b,c);return b}}();define(["../../utils/Emitter","../../enums/StateEnum","../../enums/EventEnum","../../parsing/headers/PureColumnUtils","./ColConfigUtil"],function(d,b,a,c,h){return function(d){function l(a){if(!(this instanceof l))throw new TypeError("Cannot call a class as a function");var c;c=(l.__proto__||Object.getPrototypeOf(l)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");c=c&&("object"===typeof c||"function"===typeof c)?
c:this;c._viewModel=a.viewModel;c._baseColumnConfig=Object.create(c._viewModel.getColumnHeaders());c._orderedColumnConfig=Object.create(c._baseColumnConfig);c._computedHeaderWidths=[];c._getMapping();c.setColumnConfig(c.getColumnConfig());return c}g(l,d);e(l,[{key:"eventList",value:function(){var c=this,b={};b[a.internal.COL_HEADER_MOUNT]=function(a){return c._storePixelWidths(a.event)};b[a.internal.COL_RESIZE]=function(a){return c._swapPercentsForPixels(a.event)};return b}},{key:"_columnsNotPaged",
value:function(a){return c.areColumnsNotPaged(a.length||this._viewModel.dataSize.columns.end)}},{key:"_storePixelWidths",value:function(a){var c=a.width;a=a.column;var b=this._viewModel.getColumnHeaders();this._columnsNotPaged(b)&&(this._computedHeaderWidths[this._customMapping[b[a].columnId]]=c)}},{key:"_swapPercentsForPixels",value:function(){var a=this,c=this._viewModel.getColumnHeaders();this._columnsNotPaged(c)&&this._baseColumnConfig.forEach(function(c,b){c.width={value:a._computedHeaderWidths[b],
unit:"px"}});this.setColumnConfig(this.getColumnConfig());this._swapPercentsForPixels=function(){return!0};this._storePixelWidths=function(){return!0}}},{key:"_removeHiddenColumns",value:function(){for(var a=Object.create(this._orderedColumnConfig),c=0;c<a.length;c+=1){var b=void 0!==a[c].hideable?a[c].hideable:!0;a[c].hidden&&(b&&1<a.length)&&(a.splice(c,1),c-=1)}this._autoFillMissingPercentageWidth(a);return a}},{key:"_autoFillMissingPercentageWidth",value:function(a){var b=c.validateColPct(a),
b=f(b,2),h=b[0],d=b[1];if(-1<d){var e=Object.create(a[d]);Object.keys(a[d]).forEach(function(c){e[c]=a[d][c]});e.width={value:e.width.value+h,unit:"%"};a[d]=e}}},{key:"_mergeBaseItem",value:function(a,c){Object.keys(c).forEach(function(b){a[b]=c[b]})}},{key:"_moveColumns",value:function(a){var c=this;a.forEach(function(a){var b=c._orderedColumnConfig.indexOf(a.item);c._orderedColumnConfig.splice(b,1);c._orderedColumnConfig.splice(a.toIndex,0,a.item)})}},{key:"_getMapping",value:function(){var a=[],
c=Object.create(a);this._baseColumnConfig.forEach(function(b,h){var d=h.toString();a.push(h);d!==b.columnId&&(c[b.columnId]=h)});this._customMapping=c}},{key:"getColumnConfig",value:function(){return h(this._baseColumnConfig,this._customMapping)}},{key:"setColumnConfig",value:function(a){var c=this;this._moveColumns(a._moves);Object.keys(a).forEach(function(b){c._mergeBaseItem(c._baseColumnConfig[b],a[b])});this._viewModel.setColumnHeaders(this._removeHiddenColumns());this._viewModel.setState(b.WIDTH_CHANGED,
!0);this._viewModel.setState(b.COLUMN_CONFIG,!0)}}]);return l}(d)})},"mw-table/adaptors/columns/ColConfigUtil":function(){define([],function(){return function(g,f){function e(b){return!b||null===b.columnId||void 0===b.columnId||isNaN(f[b.columnId])||0>f[b.columnId]?!1:!0}var d=[];return Object.create(null,{getColumn:{value:function(b){if(!e(b))return null;b=f[b.columnId];if(!this[b]){var a=Object.create(g[b]);this[b]=a}return this[b]},writable:!1},moveColumn:{value:function(b,a){if(e(b)){var c;c=
!a||null===a.index||void 0===a.index?!1:isNaN(a.index)?!1:!0;c&&(c=Math.min(Math.max(a.index,0),g.length-1),d.push({item:g[f[b.columnId]],toIndex:c}))}},writable:!1},_moves:{get:function(){return d}}})}})},"mw-table/utils/initialization":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["../functional/FunctionalUtils",
"../enums/ErrorEnum","../enums/PluginEnum"],function(f,e,d){var b=["px","%",""];return function(){function a(){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");}g(a,null,[{key:"column",value:function(a){var h={},d=a.label,l=a.dataIndex;a=a.width;var m=a.value,g=a.unit,g=g||"";if(isNaN(l)||0>l)throw e.error.DATA_INDEX_REQUIRED;if(null===f.find(b,function(a){return g===a}))throw e.error.INVALID_UNIT;h.name=d||"";h.dataIndex=l;h.width=m;h.unit=g;return h}},{key:"validateColPct",
value:function(a){var b=0,d=0,e=-1;a.forEach(function(a,c){if(a.width&&a.width.unit&&!isNaN(a.width.value)&&"%"===a.width.unit){var f=Math.abs(a.width.value);b+=f;f>d&&(e=c,d=f)}});a=100-b;0>a&&(e=-1);return[a,e]}},{key:"separateControllers",value:function(a,b){var e=[],f=[];b&&(d=b);d.CONTROLLERS.forEach(function(b){var h=0;b.forEach(function(b){var d=a.indexOf(b);-1<d&&(1>h++&&e.push(b),f.push(d))})});f.sort(function(a,c){return c-a}).forEach(function(b){a.splice(b,1)});return[e,a]}},{key:"prunePlugins",
value:function(a,b){var e=[];b&&(d=b);d.INCOMPATIBLE.forEach(function(b){var h=0;b.forEach(function(b,d){var f=a.indexOf(b);-1<f&&0<h++&&e.push(f)})});e.forEach(function(b){a.splice(b,1)});return a}}]);return a}()})},"mw-table/enums/ErrorEnum":function(){define([],function(){return Object.freeze({error:{INVALID_UNIT:Error("Invalid column width unit specified, only 'px' or '%' allowed"),DATA_INDEX_REQUIRED:Error("The dataIndex property is required in the column configuration")}})})},"mw-table/enums/PluginEnum":function(){define("../plugins/focus/CellFocus ../plugins/selection/SingleRowSelection ../plugins/selection/MultiRowSelection ../plugins/colresize/ColResize ../plugins/sort/SingleColumnSort ../plugins/headers/RowHeaders ../plugins/menus/HeaderMenu ../controllers/navigation/KeyController ../controllers/navigation/SimplifiedKeyController ../adaptors/CellSizingAdaptor".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return Object.freeze({AVAILABLE:{CellFocus:[g,h],SingleRowSelection:[f,h],MultiRowSelection:[e,g,h],ColumnResize:d,IndividualColumnSort:b,RowHeaders:a,HeaderMenu:c},INCOMPATIBLE:[[e,f]],CONTROLLERS:[[h,k]],EXPERIMENTAL_ADAPTORS:{SizingAdaptor:l}})})},"mw-table/plugins/focus/CellFocus":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,
a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define("mw-table/utils/rangeInterface mw-table/functional/FunctionalUtils mw-table/controllers/navigation/CellNavigation mw-table/utils/Emitter mw-table/adaptors/FocusAdaptor mw-table/enums/KeyCodeEnum".split(" "),function(f,e,d,b,a,c){return function(){function c(a){var d=this;if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");this.adaptor=a.adaptor;this.eventCallback=a.eventCallback;var e=new b;this._emit=
e.emit.bind(e);this.on=e.on.bind(e);this._events={};a.adaptor.on("cellFocusClick",function(a){return d._rowClicked(a)});a.adaptor.on("cellFocusKeyPress",function(a){return d._keyPressed(a)})}g(c,[{key:"exposedAPI",value:function(){return{setCellFocus:this.setCellFocus.bind(this),getFocusedCell:this.getFocusedCell.bind(this)}}},{key:"_rowClicked",value:function(a){a=f.getRangeForCell(a.row,a.column);this.adaptor.setFocusState([a]);this._emit("cellFocused",a)}},{key:"_keyPressed",value:function(a){this.adaptor.setFocusState(a.range?
[a.range]:[])}},{key:"setCellFocus",value:function(a){this.adaptor.setFocusState(a)}},{key:"getFocusedCell",value:function(){var a=this.adaptor.getFocusState(),c={};a&&a.rangeList[0]&&(c.row=a.rangeList[0].rows.start,c.column=a.rangeList[0].columns.start);return c}},{key:"emits",get:function(){return["cellFocused"]}},{key:"listensOn",get:function(){return["cellFocusClick","cellFocusKeyPress"]}}],[{key:"adaptor",get:function(){return a}}]);return c}()})},"mw-table/utils/rangeInterface":function(){var g=
function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["mw-tabular-data-model/rangeUtil"],function(f){return function(){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");}g(e,null,[{key:"addMetadataToCol",value:function(d,b,a,c){var h=[],e=[],l=b.getStateByKey(a);
l&&(e=l.value,h=l.rangeList);e.push(c);h.push(f.range().setEntireColumns(d));b.setState(a,e,h)}},{key:"addMetadataToRow",value:function(d,b,a,c){var h=[],e=[],l=b.getStateByKey(a);l&&(h=l.rangeList,e=l.value);e.push(c);h.push(f.range().setEntireRows(d));b.setState(a,e,h)}},{key:"addMetadataToRange",value:function(d,b,a,c,h,e,l){var m=[],g=[],n=h.getStateByKey(e);n&&(m=n.rangeList,g=n.value);g.push(l);m.push(f.range().setRows(d,b).setColumns(a,c));h.setState(e,g,m)}},{key:"getRangeForCell",value:function(d,
b){return f.range().setRows(d,d).setColumns(b,b)}},{key:"getRangeForRow",value:function(d){return f.range().setEntireRows(d)}},{key:"getRangeForColumn",value:function(d){return f.range().setEntireColumns(d)}},{key:"getStateForKey",value:function(d,b){var a=d.getStateByKey(b);return a?{rangeList:a.rangeList,value:a.value}:{rangeList:null,value:null}}},{key:"updateDataForCell",value:function(d,b,a,c){b=Number(b);a=Number(a);b=f.range().setRows(b,b).setColumns(a,a);d.update(b,[[c]])}}]);return e}()})},
"mw-table/controllers/navigation/CellNavigation":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define("mw-tabular-data-model/rangeUtil ./UnbufferedCellNavigation ./BufferedCellNavigation ../../parsing/headers/PureColumnUtils ../../functional/Lens ../../functional/Monad ../../enums/LogicalSizeEnum ../../enums/StateEnum".split(" "),
function(f,e,d,b,a,c,h,k){return function(){function k(a){if(!(this instanceof k))throw new TypeError("Cannot call a class as a function");var c=void 0,c=new h(a);a=a.getColumnHeaders().length||a.dataSize.columns.count;c=b.areColumnsPaged(a)?d(c):e(c);this.getScrollTopPosition=c.getScrollTopPosition;this.getScrollBottomPosition=c.getScrollBottomPosition;this.getScrollLeftPosition=c.getScrollLeftPosition;this.getScrollRightPosition=c.getScrollRightPosition}g(k,[{key:"increment",value:function(a,c,
b){return Math.min(b+Number(c),a)}},{key:"decrement",value:function(a,c,b){return Math.max(b-c,a)}},{key:"setCellMeta",value:function(a,c,b,h){b=f.range().setRows(b,b).setColumns(h,h);return{scrollInPixels:{scrollLeft:c,scrollTop:a,scrollCol:h},activeRange:b}}},{key:"getCurrent",value:function(a,b){return c.maybe(a).chain(function(a){return a.currentState}).chain(function(a){return a.rangeList}).chain(function(a){return a[0]}).therefore(-1,function(a){return a[b].start})}},{key:"isInRange",value:function(a,
c){return a.prev<=c.prev&&a.next>=c.next}},{key:"isNextItem",value:function(a,c){return a.next>c.prev&&a.next<=c.next}},{key:"isPreviousItem",value:function(a,c){return a.prev>c.prev&&a.prev<=c.next}},{key:"getRowPosition",value:function(c,b,h,d){b=a.map(b,[["top","prev"],["bottom","next"]]);c=a.map(c,[["top","prev"],["bottom","next"]]);return this.isNextItem(c,b)?this.getScrollBottomPosition(d,h):this.isPreviousItem(c,b)||!this.isInRange(c,b)?this.getScrollTopPosition(h):null}},{key:"getColPosition",
value:function(c,b,h,d){var e=a.map(d[c]||{},[["left","prev"],["right","next"]]);b=a.map(b,[["left","prev"],["right","next"]]);return this.isNextItem(b,e)?this.getScrollRightPosition(h,c,d):this.isPreviousItem(b,e)||!this.isInRange(b,e)?this.getScrollLeftPosition(c,d):null}}]);return k}()})},"mw-table/controllers/navigation/UnbufferedCellNavigation":function(){define(["../../enums/DefaultsEnum"],function(g){return function(f){return{getScrollLeftPosition:function(e,d){for(var b=Math.max(e,0),a=0;d[b-=
1];)a+=d[b].width;return a},getScrollRightPosition:function(e,d,b){d=Math.max(d,0);var a=0;do a+=b[d].width;while(b[d-=1]);return Math.max(0,a-e)},getScrollBottomPosition:function(e,d){return Math.max(0,(d+1)*f.ROW_HEIGHT-e)},getScrollTopPosition:function(e){return Math.max(0,e)*f.ROW_HEIGHT}}}})},"mw-table/controllers/navigation/BufferedCellNavigation":function(){define(["../../functional/Monad"],function(g){return function(f){function e(d){return Math.max(0,f.COL_WIDTH*d)}return{getScrollLeftPosition:e,
getScrollRightPosition:function(d,b,a){var c=g.maybe(a[b]).chain(function(a){return a.width}).therefore(-1,function(a){return d-a});if(0>c)return Math.max(e(b)-d,0);for(var h=0;a[b-=1]&&h<c;)h+=a[b].width;b+=1;a=Math.max(0,(h-c)/a[b].width);return Math.floor(f.COL_WIDTH*b)+Math.floor(a*f.COL_WIDTH)},getScrollBottomPosition:function(d,b){return Math.max(0,(b+1)*f.ROW_HEIGHT-d)},getScrollTopPosition:function(d){return Math.max(0,d)*f.ROW_HEIGHT}}}})},"mw-table/functional/Monad":function(){function g(e,
d){if(!(e instanceof d))throw new TypeError("Cannot call a class as a function");}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define([],function(){var e=function(){function b(){g(this,b)}f(b,null,[{key:"chain",value:function(a){return b}},{key:"therefore",value:function(a,c){return a}}]);return b}(),
d=function(){function b(){g(this,b)}f(b,null,[{key:"Something",value:function(a,c){return{chain:function(b){return a.maybe(b(c))},therefore:function(a,b){return b(c)}}}}]);return b}();return function(){function b(){g(this,b)}f(b,null,[{key:"maybe",value:function(a){return null===a||"undefined"===typeof a?e:d.Something(b,a)}}]);return b}()})},"mw-table/functional/Lens":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;
"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define([],function(){return function(){function f(e){if(!(this instanceof f))throw new TypeError("Cannot call a class as a function");this._mapping=e;for(var d in e)this[d]=e[d]}g(f,[{key:"get",value:function(e){return this._mapping[e]}}],[{key:"map",value:function(e,d){var b={};Array.isArray(d)&&(b=d.reduce(function(a,c){a[c[1]]=e[c[0]];return a},{}));return new f(b)}}]);
return f}()})},"mw-table/adaptors/FocusAdaptor":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define("../utils/Emitter ../functional/FunctionalUtils mw-tabular-data-model/rangeUtil ./AdaptorUtils ../enums/StateEnum ../enums/EventEnum".split(" "),function(f,e,d,b,a,c){return function(){function h(a){if(!(this instanceof
h))throw new TypeError("Cannot call a class as a function");var c=new f;this._emit=c.emit.bind(c);this.on=c.on.bind(c);this.viewModel=a.viewModel;this._events={}}g(h,[{key:"eventList",value:function(){var a=this,b={};b[c.internal.TABLE_CELL_CLICK]=function(b){return a._emit(c.internal.CELL_FOCUS_CLICK,b.event)};b[c.internal.TABLE_KEY_PRESS]=function(c){return a._processAndEmitKeyPress(c)};return b}},{key:"_processAndEmitKeyPress",value:function(a){var h=a.event,d={keyCode:h.keyCode},e=b.getActiveCell(this.viewModel);
d.modifiers=h;d.dataSize={};d.viewPort={};d.dataSize=a.dataSize;d.viewPort=a.viewPort.rangeList[0];d.range=e.rows?e:null;this._emit(c.internal.CELL_FOCUS_KEY,d)}},{key:"_removeFocus",value:function(){this.viewModel.deleteState(a.FOCUSED);this.viewModel.deleteState(a.state.ACTIVE_CELL)}},{key:"_setFocus",value:function(c){var h=e.curry(b.fitRangeToBounds)(this.viewModel.dataSize.rows.end,this.viewModel.dataSize.columns.end);c=d.range().setRows(c.rows.start,c.rows.start).setColumns(c.columns.start,
c.columns.start);h=h(c);this.viewModel.setState(a.FOCUSED,null,[h]);this.viewModel.setState(a.state.ACTIVE_CELL,null,[h])}},{key:"setFocusState",value:function(a){null===a||void 0===a?this._removeFocus():Array.isArray(a)&&(0<a.length?this._setFocus(a[0]):this._removeFocus())}},{key:"getFocusState",value:function(){var c=this.viewModel.getStateByKey(a.FOCUSED);if(c)return c||null}}]);return h}()})},"mw-table/adaptors/AdaptorUtils":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=
d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["mw-tabular-data-model/rangeUtil","../enums/StateEnum"],function(f,e){return function(){function d(){if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");}g(d,null,[{key:"fitRangeToBounds",value:function(b,a,c){var h,d;if(c.rows.start>b||c.columns.start>a||0>c.rows.end||0>c.columns.end)return null;
h=Math.max(Math.min(c.rows.start,b),0);d=Math.max(Math.min(c.columns.start,a),0);b=Infinity===c.rows.end?Infinity:Math.max(Math.min(c.rows.end,b),h);a=Infinity===c.columns.end?Infinity:Math.max(Math.min(c.columns.end,a),d);return f.range().setRows(h,b).setColumns(d,a)}},{key:"getActiveCell",value:function(b){return(b=b.getStateByKey(e.state.ACTIVE_CELL))?b.rangeList[0]:[]}}]);return d}()})},"mw-table/plugins/selection/SingleRowSelection":function(){function g(d,b){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return b&&("object"===typeof b||"function"===typeof b)?b:d}function f(d,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}var e=function(){function d(b,a){for(var c=0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=!0;"value"in
h&&(h.writable=!0);Object.defineProperty(b,h.key,h)}}return function(b,a,c){a&&d(b.prototype,a);c&&d(b,c);return b}}();define(["mw-tabular-data-model/rangeUtil","mw-table/utils/Emitter","mw-table/adaptors/SelectionAdaptor","../../enums/KeyCodeEnum","../../enums/EventEnum"],function(d,b,a,c,h){return function(b){function l(a){if(!(this instanceof l))throw new TypeError("Cannot call a class as a function");var c=g(this,(l.__proto__||Object.getPrototypeOf(l)).call(this));c.adaptor=a.adaptor;c._events=
{};a.adaptor.on(h.internal.CELL_SELECTION_CLICK,function(a){return c._calculateProperSelection(a)});a.adaptor.on(h.internal.CELL_SELECTION_KEY,function(a){return c._keyPressed(a)});a.adaptor.on(h.internal.TABLE_SELECTED_ACTION,function(a){return c._handleSelectedAction(a)});return c}f(l,b);e(l,[{key:"_handleSelectedAction",value:function(a){this.emit("selectedAction",a)}},{key:"emits",get:function(){return[h.exposed.SELECTION_CHANGED,"selectedAction"]}}]);e(l,[{key:"_calculateProperSelection",value:function(a){var c=
d.range().setEntireRows(Number(a.row));a.ctrlKey?(a=d.range().setEntireRows(c.rows.start,c.rows.start),-1<this.adaptor.isRowSelected(a)?this.adaptor.setSelectionState([]):this.adaptor.setSelectionState([a])):this.adaptor.setIndividualRow(c);this.emit(h.exposed.SELECTION_CHANGED,this.adaptor.getSelectionState())}},{key:"_keyPressed",value:function(a){if(a.ctrlKey)a.keyCode===c.SPACE&&this._calculateProperSelection(a);else switch(a.keyCode){case c.ARROW_DOWN:case c.ARROW_UP:case c.PAGE_DOWN:case c.PAGE_UP:case c.HOME:case c.END:case c.ARROW_DOWN:case c.SPACE:this._calculateProperSelection(a)}}},
{key:"setSelection",value:function(a){Array.isArray(a)&&(1<a.length?a.length=1:a.length,this.adaptor.setSelectionState(a))}},{key:"getSelection",value:function(){return this.adaptor.getSelectionState()}},{key:"exposedAPI",value:function(){return{setSelection:this.setSelection.bind(this),getSelection:this.getSelection.bind(this)}}}],[{key:"adaptor",get:function(){return a}}]);return l}(b)})},"mw-table/adaptors/SelectionAdaptor":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=
d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define("mw-tabular-data-model/rangeUtil ../utils/Emitter ../functional/FunctionalUtils ./AdaptorUtils ../enums/StateEnum ../enums/EventEnum ../enums/KeyCodeEnum".split(" "),function(f,e,d,b,a,c,h){return function(){function k(a){if(!(this instanceof k))throw new TypeError("Cannot call a class as a function");var c=new e;
this._emit=c.emit.bind(c);this.on=c.on.bind(c);this.viewModel=a.viewModel;this._events={}}g(k,[{key:"_setPivot",value:function(c){var h=d.curry(b.fitRangeToBounds)(this.viewModel.dataSize.rows.end,this.viewModel.dataSize.columns.end);c=f.range().setRows(c.rows.start,c.rows.start).setColumns(c.columns.start,c.columns.start);(h=h(c))&&this.viewModel.setState(a.PIVOT,null,[h])}},{key:"_getSelectedRangeList",value:function(){var c=this.viewModel.getStateByKey(a.SELECTED);return c?c.rangeList:[]}},{key:"_getFittedRange",
value:function(a){var c=d.curry(b.fitRangeToBounds)(this.viewModel.dataSize.rows.end,this.viewModel.dataSize.columns.end);return a.map(c).filter(function(a){return null!=a})}},{key:"setContiguousRows",value:function(c){var b=this.viewModel.getStateByKey(a.PIVOT).rangeList[0],h=Math.min(b.rows.start,c.rows.start);c=Math.max(b.rows.start,c.rows.start);h=[f.range().setEntireRows(h,c)];this.viewModel.setState(a.SELECTED,null,this._getFittedRange(h))}},{key:"setIndividualRow",value:function(a){var c=f.range().setEntireRows(a.rows.start,
a.rows.start);this._setPivot(a);this.setSelectionState([c])}},{key:"setDiscontiguousRow",value:function(a){this._setPivot(a);var c=f.range().setEntireRows(a.rows.start,a.rows.start);a=this._getSelectedRangeList().concat();var b=this.isRowSelected(c);-1<b?(c=this.splitRange(a[b],c),a.splice(b,1),a=a.concat(c)):a.push(c);this.setSelectionState(a)}},{key:"splitRange",value:function(a,c){var b=void 0,h=void 0,d=[];if(a.rows.start===a.rows.end)return[];if(a.rows.start===c.rows.start)return b=c.rows.start+
1,h=a.rows.end,d.push(f.range().setEntireRows(b,h)),d;if(a.rows.end===c.rows.start)return h=c.rows.end-1,b=a.rows.start,d.push(f.range().setEntireRows(b,h)),d;d.push(f.range().setEntireRows(a.rows.start,c.rows.start-1));d.push(f.range().setEntireRows(c.rows.end+1,a.rows.end));return d}},{key:"isRowSelected",value:function(a){var c=a.rows.start,b=a.rows.end;a=this._getSelectedRangeList();var h=-1;return d.find(a,function(a){h++;return a.rows.start<=c&&a.rows.end>=b})?h:-1}},{key:"eventList",value:function(){var a=
this,b={};b[c.internal.TABLE_CELL_CLICK]=function(b){return a._emit(c.internal.CELL_SELECTION_CLICK,b.event)};b[c.internal.TABLE_KEY_PRESS]=function(c){return a._processAndEmitKeyPress(c)};b[c.internal.TABLE_DBL_CLICK]=function(c){return a._handleDoubleClick(c)};return b}},{key:"_processAndEmitKeyPress",value:function(a){var d=a.event,e=b.getActiveCell(this.viewModel);d.modifiers=d;d.dataSize={};d.viewPort={};d.dataSize=a.dataSize;d.viewPort=a.viewPort.rangeList[0];e.rows&&(d.row=e.rows.start);this._emit(c.internal.CELL_SELECTION_KEY,
d);d.keyCode===h.ENTER&&this._emit(c.internal.TABLE_SELECTED_ACTION,{selectedRange:this.getSelectionState()})}},{key:"_handleDoubleClick",value:function(a){this._emit(c.internal.TABLE_SELECTED_ACTION,{selectedRange:this.getSelectionState()})}},{key:"setSelectionState",value:function(c){this.viewModel.setState(a.SELECTED,null,this._getFittedRange(c))}},{key:"getSelectionState",value:function(){var c=this.viewModel.getStateByKey(a.SELECTED);return c?c.rangeList:null}}]);return k}()})},"mw-table/plugins/selection/MultiRowSelection":function(){function g(d,
b){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"===typeof b||"function"===typeof b)?b:d}function f(d,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}var e=function(){function d(b,a){for(var c=
0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=!0;"value"in h&&(h.writable=!0);Object.defineProperty(b,h.key,h)}}return function(b,a,c){a&&d(b.prototype,a);c&&d(b,c);return b}}();define(["mw-tabular-data-model/rangeUtil","mw-table/utils/Emitter","mw-table/adaptors/SelectionAdaptor","../../enums/KeyCodeEnum","../../enums/EventEnum"],function(d,b,a,c,h){var k=function(a,c){var b=a.rows.start<c.rows.start?-1:a.rows.start>c.rows.start?1:0;return 0===b?a.rows.end<c.rows.end?
-1:a.rows.end>c.rows.end?1:0:b};return function(b){function m(a){if(!(this instanceof m))throw new TypeError("Cannot call a class as a function");var c=g(this,(m.__proto__||Object.getPrototypeOf(m)).call(this));c.adaptor=a.adaptor;a.adaptor.on(h.internal.CELL_SELECTION_CLICK,function(a){return c._calculateProperSelection(a)});a.adaptor.on(h.internal.CELL_SELECTION_KEY,function(a){return c._keyPressed(a)});a.adaptor.on(h.internal.TABLE_SELECTED_ACTION,function(a){return c._handleSelectedAction(a)});
return c}f(m,b);e(m,[{key:"_handleSelectedAction",value:function(a){this.emit("selectedAction",a)}},{key:"emits",get:function(){return[h.exposed.SELECTION_CHANGED,"selectedAction"]}}]);e(m,[{key:"_hasSelectionChanged",value:function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],c=this.adaptor.getSelectionState()||[],b=!0;a.sort(k);c.length===a.length&&(c.sort(k),b=a.reduce(function(a,b,h){return a||!d.isRangeEqual(b,c[h])},!1));return b}},{key:"_calculateProperSelection",value:function(a){var c=
d.range().setEntireRows(Number(a.row)),b=this.adaptor.getSelectionState()||[];a.ctrlKey||a.meta?this.adaptor.setDiscontiguousRow(c):a.shiftKey?this.adaptor.setContiguousRows(c):this.adaptor.setIndividualRow(c);this._hasSelectionChanged(b)&&this.emit(h.exposed.SELECTION_CHANGED,{rangeList:this.adaptor.getSelectionState()})}},{key:"_keyPressed",value:function(a){if(a.ctrlKey||a.meta)a.keyCode===c.SPACE&&this._calculateProperSelection(a);else switch(a.keyCode){case c.ARROW_DOWN:case c.ARROW_UP:case c.PAGE_DOWN:case c.PAGE_UP:case c.HOME:case c.END:this._calculateProperSelection(a);
break;case c.SPACE:a.shiftKey?this._calculateProperSelection(a):0>this.adaptor.isRowSelected(d.range().setEntireRows(Number(a.row)))&&(a.ctrlKey=!0,this._calculateProperSelection(a))}}},{key:"setSelection",value:function(a){Array.isArray(a)&&this.adaptor.setSelectionState(a)}},{key:"getSelection",value:function(){return this.adaptor.getSelectionState()}},{key:"exposedAPI",value:function(){return{setSelection:this.setSelection.bind(this),getSelection:this.getSelection.bind(this)}}}],[{key:"adaptor",
get:function(){return a}}]);return m}(b)})},"mw-table/plugins/colresize/ColResize":function(){function g(d,b){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"===typeof b||"function"===typeof b)?b:d}function f(d,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}});
b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}var e=function(){function d(b,a){for(var c=0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=!0;"value"in h&&(h.writable=!0);Object.defineProperty(b,h.key,h)}}return function(b,a,c){a&&d(b.prototype,a);c&&d(b,c);return b}}();define(["../../utils/Emitter","../../adaptors/ResizeAdaptor","../../enums/EventEnum"],function(d,b,a){return function(c){function h(c){if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");
var b=g(this,(h.__proto__||Object.getPrototypeOf(h)).call(this));b.adaptor=c.adaptor;c.adaptor.on(a.internal.COL_RESIZE,function(a){return b._handleResize(a)});return b}f(h,c);e(h,[{key:"exposedAPI",value:function(){return{}}},{key:"_handleResize",value:function(a){this.adaptor.setColumnResize(a)}},{key:"listensOn",get:function(){return[a.internal.COL_RESIZE]}},{key:"emits",get:function(){return[]}}],[{key:"adaptor",get:function(){return b}}]);return h}(d)})},"mw-table/adaptors/ResizeAdaptor":function(){function g(e,
d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,
b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["../utils/Emitter","../enums/StateEnum","../enums/EventEnum"],function(e,d,b){return function(a){function c(a){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var b;b=(c.__proto__||Object.getPrototypeOf(c)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");b=b&&("object"===typeof b||"function"===typeof b)?b:this;b.viewModel=a.viewModel;b.viewModel.setState(d.colResize,
!0);return b}g(c,a);f(c,[{key:"eventList",value:function(){var a=this,c={};c[b.internal.COL_RESIZE]=function(c){return a.emit(b.internal.COL_RESIZE,c.event)};return c}},{key:"_updatePagedHeader",value:function(a,c){var b=this.viewModel.getColumnHeaders(),d={value:c,unit:"px"};0===b.length?this.viewModel.setColumnMetaData("width",d,a):b[a].width=d}},{key:"setColumnResize",value:function(a){var c=a.width;a=a.column;this.viewModel.setState(d.WIDTH_CHANGED,!0);this.viewModel.setState(d.COLUMN_RESIZED,
!0);"number"===typeof a&&this._updatePagedHeader(a,c)}}]);return c}(e)})},"mw-table/plugins/sort/SingleColumnSort":function(){function g(d,b){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"===typeof b||"function"===typeof b)?b:d}function f(d,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,
writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}var e=function(){function d(b,a){for(var c=0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=!0;"value"in h&&(h.writable=!0);Object.defineProperty(b,h.key,h)}}return function(b,a,c){a&&d(b.prototype,a);c&&d(b,c);return b}}();define(["../../utils/Emitter","../../adaptors/SortAdaptor","../../enums/EventEnum","../../functional/FunctionalUtils","mw-tabular-data-model/sort/Enum"],
function(d,b,a,c,h){return function(c){function d(c){if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");var b=g(this,(d.__proto__||Object.getPrototypeOf(d)).call(this));b.adaptor=c.adaptor;c.adaptor.on(a.internal.TABLE_COLUMN_SORT,function(a){return b._handleSort(a)});return b}f(d,c);e(d,[{key:"exposedAPI",value:function(){return{setSortIndicator:this.setSortIndicator.bind(this)}}},{key:"_handleSort",value:function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:
{},c=a.order,b=a.column,a=a.type;c&&(0<=b&&a)&&this.adaptor.sortColumn({columnIndex:b,order:c,compare:a})}},{key:"setSortIndicator",value:function(){this.adaptor.setSortIndicator(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{})}},{key:"emits",get:function(){return[]}}],[{key:"adaptor",get:function(){return b}},{key:"enum",get:function(){return{compare:h.compare}}}]);return d}(d)})},"mw-table/adaptors/SortAdaptor":function(){function g(e,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+
typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["mw-tabular-data-model/rangeUtil","../functional/FunctionalUtils",
"../utils/Emitter","../enums/EventEnum","../enums/StateEnum"],function(e,d,b,a,c){return function(b){function k(a){if(!(this instanceof k))throw new TypeError("Cannot call a class as a function");var b;b=(k.__proto__||Object.getPrototypeOf(k)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");b=b&&("object"===typeof b||"function"===typeof b)?b:this;b._viewModel=a.viewModel;b.viewModel=a.viewModel;b._initialize(a.options);b._viewModel.setState(c.SORTABLE,
!0);return b}g(k,b);f(k,[{key:"eventList",value:function(){var c=this,b={};b[a.internal.SORT_AFFORDANCE_CLICKED]=function(b){return c.emit(a.internal.TABLE_COLUMN_SORT,b.event)};return b}},{key:"_initialize",value:function(a){var c=this._viewModel.getColumnHeaders()||[],b=d.getNestedProp(a,["columnModel","columnConfig"]);b&&c.forEach(function(a,c){b[c]&&b[c].sortType&&(a.sortType=b[c].sortType)})}},{key:"sortColumn",value:function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},
c=a.columnIndex,b=a.order;!isNaN(c)&&(!(0>c)&&b)&&(this.setSortIndicator(a),this._viewModel.sort([a]))}},{key:"_removeColumnSortState",value:function(){var a=this._viewModel.getStateByKey(c.SORTED);a&&a.rangeList&&this._viewModel.deleteColumnMetaData(c.SORTED,a.rangeList[0].columns.start)}},{key:"_addColumnSortState",value:function(a,b){var h={order:b},d=e.range().setEntireColumns(a);this._viewModel.setColumnMetaData(c.SORTED,h,a);this._viewModel.setState(c.SORTED,b,[d])}},{key:"setSortIndicator",
value:function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},b=a.columnIndex,h=a.order,b=Number(b);0===Object.keys(a).length?(this._removeColumnSortState(),this._viewModel.deleteState(c.SORTED)):!isNaN(b)&&(0<=b&&h)&&(this._removeColumnSortState(),this._addColumnSortState(b,h))}}]);return k}(b)})},"mw-tabular-data-model/sort/Enum":function(){define([],function(){return{order:{ASC:"ASC",DESC:"DESC"},compare:{NUMERIC:"NUMERIC",STRING:"STRING"}}})},"mw-table/plugins/headers/RowHeaders":function(){var g=
function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["../../adaptors/RowHeaderAdaptor"],function(f){return function(){function e(d){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.adaptor=d.adaptor}g(e,[{key:"exposedAPI",value:function(){return{}}},{key:"emits",get:function(){return[]}}],
[{key:"adaptor",get:function(){return f}},{key:"enum",get:function(){return{}}}]);return e}()})},"mw-table/adaptors/RowHeaderAdaptor":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["../enums/StateEnum"],function(f){return function(){function e(d){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");
this._viewModel=d.viewModel;this._viewModel.setState(f.displayRowHeader,!0);this._viewModel.setState(f.rowHeaderWidth,0)}g(e,[{key:"eventList",value:function(){return{}}}]);return e}()})},"mw-table/plugins/menus/HeaderMenu":function(){function g(d,b){if(!d)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return b&&("object"===typeof b||"function"===typeof b)?b:d}function f(d,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+
typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}var e=function(){function d(b,a){for(var c=0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=!0;"value"in h&&(h.writable=!0);Object.defineProperty(b,h.key,h)}}return function(b,a,c){a&&d(b.prototype,a);c&&d(b,c);return b}}();define(["../../utils/Emitter","../../adaptors/MenuAdaptor","../../enums/EventEnum"],
function(d,b,a){return function(c){function h(c){if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");var b=g(this,(h.__proto__||Object.getPrototypeOf(h)).call(this));b.adaptor=c.adaptor;c.adaptor.on(a.internal.HEADER_CLICKED,function(a){return b._handleHeaderMenu(a)});return b}f(h,c);e(h,[{key:"exposedAPI",value:function(){return{}}},{key:"_handleHeaderMenu",value:function(){this.emit(a.exposed.HEADER_MENU,0<arguments.length&&void 0!==arguments[0]?arguments[0]:{})}},{key:"emits",
get:function(){return[a.exposed.HEADER_MENU]}}],[{key:"adaptor",get:function(){return b}}]);return h}(d)})},"mw-table/adaptors/MenuAdaptor":function(){function g(e,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}var f=function(){function e(d,b){for(var a=
0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["../utils/Emitter","../enums/EventEnum","../enums/StateEnum","../functional/FunctionalUtils"],function(e,d,b,a){return function(c){function h(a){if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");var c;c=(h.__proto__||Object.getPrototypeOf(h)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
c=c&&("object"===typeof c||"function"===typeof c)?c:this;c._viewModel=a.viewModel;c._handleHeaderMenu=c._handleHeaderMenu.bind(c);c._viewModel.setState(b.HEADER_MENU_AFFORDANCE,!0);c._initialize(a.options);return c}g(h,c);f(h,[{key:"_initialize",value:function(c){var b=this._viewModel.getColumnHeaders()||[],h=a.getNestedProp(c,["columnModel","columnConfig"]);h&&b.forEach(function(a,c){h[c]&&h[c].headerMenu&&(a.headerMenu=h[c].headerMenu)})}},{key:"eventList",value:function(){var a={};a[d.internal.HEADER_CLICKED]=
this._handleHeaderMenu;return a}},{key:"_handleHeaderMenu",value:function(a){this.emit(d.internal.HEADER_CLICKED,{top:a.event.bottomRect,left:a.event.leftRect,columnIndex:a.event.columnIndex})}}]);return h}(e)})},"mw-table/controllers/navigation/KeyController":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&
f(e,b);return e}}();define("../../utils/rangeInterface ../../functional/FunctionalUtils ./CellNavigation ./ActiveCell ../../functional/Lens ../../enums/KeyCodeEnum ../../enums/StateEnum ../../enums/EventEnum".split(" "),function(f,e,d,b,a,c,h,k){return function(){function l(a){if(!(this instanceof l))throw new TypeError("Cannot call a class as a function");var h=a.viewModel;this._viewModel=h;this._logicalViewPort=a.viewPortList[0];this._activeCell=new b(a);this._handler={};this._handler[c.PAGE_UP]=
this._handlePageUp.bind(this);this._handler[c.PAGE_DOWN]=this._handlePageDown.bind(this);this._handler[c.END]=this._handleEnd.bind(this);this._handler[c.HOME]=this._handleHome.bind(this);this._handler[c.ARROW_LEFT]=this._handleArrowLeft.bind(this);this._handler[c.ARROW_UP]=this._handleArrowUp.bind(this);this._handler[c.ARROW_RIGHT]=this._handleArrowRight.bind(this);this._handler[c.ARROW_DOWN]=this._handleArrowDown.bind(this);this._rowRects=[];this._headerRects=[];this.cellNav=new d(h)}g(l,[{key:"exposedAPI",
value:function(){return{scrollTo:this.scrollTo.bind(this)}}},{key:"eventList",value:function(){var a=this,c={};c[k.internal.TABLE_CELL_CLICK]=function(c){return a._rowClicked(c.event)};c[k.internal.TABLE_KEY_PRESS]=function(c){return a._processAndEmitKeyPress(c)};c[k.internal.HEADER_RECTS]=function(c){return a._setHeaderRects(c)};c[k.internal.ROW_RECTS]=function(c){return a._setRowRects(c)};return c}},{key:"scrollTo",value:function(a){if(0<a.rows.count){var c=this.cellNav.getScrollTopPosition(this._viewModel.dataSize.rows.count>
a.rows.start?a.rows.start:this._viewModel.dataSize.rows.count-1);this._logicalViewPort.setScrollTopPx(c)}0<a.columns.count&&(a=this.cellNav.getScrollLeftPosition(this._viewModel.dataSize.columns.count>a.columns.start?a.columns.start:this._viewModel.dataSize.columns.count-1,this._headerRects()),this._logicalViewPort.setScrollLeftPx(a))}},{key:"_setRowRects",value:function(a){this._rowRects=a.event.children}},{key:"_setHeaderRects",value:function(a){this._headerRects=a.event.children}},{key:"_hasModifier",
value:function(a){return!1}},{key:"_getActiveState",value:function(){var a=this._viewModel.getStateByKey(h.state.ACTIVE_CELL);if(a)return a||null}},{key:"_processAndEmitKeyPress",value:function(a){var c=a.event,b={keyCode:c.keyCode};b.modifiers=c;b.dataSize={};b.viewPort={};b.dataSize=a.dataSize;b.viewPort=a.viewPort.rangeList[0];b.viewModel=this._viewModel;b.headerRects=this._headerRects;b.currentState=this._getActiveState();this._keyPressed(b)}},{key:"_rowClicked",value:function(a){a=f.getRangeForCell(a.row,
a.column);this._viewModel.setState(h.state.ACTIVE_CELL,null,[a])}},{key:"_getLastRowPositionForHeight",value:function(){var a=this._logicalViewPort.getHeight();return e.curry(this.cellNav.getScrollBottomPosition)(a)}},{key:"_getRightColPositionForWidth",value:function(){var a=this._logicalViewPort.getWidth();return e.curry(this.cellNav.getScrollRightPosition)(a)}},{key:"_getScrollRect",value:function(){var a=this._logicalViewPort.getBoundingRect(),c=a.height-this._logicalViewPort.getHeight(),b=a.width-
this._logicalViewPort.getWidth();return{top:a.top,left:a.left,bottom:a.bottom-c,right:a.right-b}}},{key:"_handleVertical",value:function(c,b,h){var d=this.cellNav.getCurrent(c,"rows");c=Math.max(0,this.cellNav.getCurrent(c,"columns"));b=b(d);var e=this._getScrollRect(),k=this._logicalViewPort.getWidth(),d=null,k=this.cellNav.getColPosition(c,e,k,this._headerRects()),f=this._rowRects()[b]||{},f=a.map(f,[["top","prev"],["bottom","next"]]),e=a.map(e,[["top","prev"],["bottom","next"]]);this.cellNav.isInRange(e,
f)||(d=h(b));return this.cellNav.setCellMeta(d,k,b,c)}},{key:"_handlePageUp",value:function(a){var c=e.curry(this.cellNav.decrement)(a.dataSize.rows.start,a.viewPort.rows.count);return this._handleVertical(a,c,this.cellNav.getScrollTopPosition)}},{key:"_handlePageDown",value:function(a){var c=e.curry(this.cellNav.increment)(a.dataSize.rows.end,a.viewPort.rows.count);return this._handleVertical(a,c,this._getLastRowPositionForHeight())}},{key:"_handleArrowUp",value:function(a){var c=e.curry(this.cellNav.decrement)(a.dataSize.rows.start,
1);return this._handleVertical(a,c,this.cellNav.getScrollTopPosition)}},{key:"_handleArrowDown",value:function(a){var c=e.curry(this.cellNav.increment)(a.dataSize.rows.end,1);return this._handleVertical(a,c,this._getLastRowPositionForHeight())}},{key:"_handleHome",value:function(a){return this._handleHorizontal(a,function(){return 0},this.cellNav.getScrollLeftPosition)}},{key:"_handleEnd",value:function(a){var c=this._handleHorizontal(a,function(){return a.dataSize.columns.end},this._getRightColPositionForWidth());
c.leftScrollFn=this._logicalViewPort.setScrollRightPx;return c}},{key:"_handleHorizontal",value:function(c,b,h){var d=Math.max(0,this.cellNav.getCurrent(c,"rows"));c=this.cellNav.getCurrent(c,"columns");b=b(c);c=this._headerRects();var k=c[b]||{},f=this._getScrollRect(),k=a.map(k,[["left","prev"],["right","next"]]),l=a.map(f,[["left","prev"],["right","next"]]),g=null,v=this._rowRects()[d]||{},f=this.cellNav.getRowPosition(f,v,d,this._logicalViewPort.getHeight());this.cellNav.isInRange(l,k)||(g=h(b,
c));d=this.cellNav.setCellMeta(f,g,d,b);d.scrollInPixels.scrollFn=e.curry(h)(b);return d}},{key:"_handleArrowLeft",value:function(a){var c=e.curry(this.cellNav.decrement)(a.dataSize.columns.start,1);a=this._handleHorizontal(a,c,this.cellNav.getScrollLeftPosition);a.leftScrollFn=this._logicalViewPort.setScrollLeftPx;return a}},{key:"_handleArrowRight",value:function(a){var c=e.curry(this.cellNav.increment)(a.dataSize.columns.end,1),b=this._getRightColPositionForWidth();a=this._handleHorizontal(a,c,
b);a.leftScrollFn=this._logicalViewPort.setScrollRightPx;e.curry(b)(a.scrollInPixels.scrollCol);return a}},{key:"_keyPressed",value:function(a){if(!this._hasModifier(a)){var c=this._handler[a.keyCode];c&&(a=c(a),a.leftScrollFn=a.leftScrollFn||this._logicalViewPort.setScrollLeftPx,a.topScrollFn=this._logicalViewPort.setScrollTopPx,this._activeCell.setActiveCell(a))}}}]);return l}()})},"mw-table/controllers/navigation/ActiveCell":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=
d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["mw-tabular-data-model/rangeUtil","../../enums/StateEnum"],function(f,e){return function(){function d(b){if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");this._viewModel=b.viewModel;this._logicalViewPort=b.viewPortList[0]}g(d,[{key:"setActiveCell",value:function(b){var a=b.activeRange,
c=b.scrollInPixels,h=b.leftScrollFn;b=b.topScrollFn;var d=[a];if(a){this._viewModel.setState(e.state.ACTIVE_CELL,null,d);if(c){var a=c.scrollLeft,d=c.scrollCol,f=c.scrollFn;!isNaN(a)&&null!==a&&h(a,d,f)}c&&(c=c.scrollTop,!isNaN(c)&&null!==c&&b(c))}else this._viewModel.setState(e.state.ACTIVE_CELL,null,[])}}]);return d}()})},"mw-table/controllers/navigation/SimplifiedKeyController":function(){function g(e,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+
typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["./KeyController"],function(e){return function(d){function b(a){if(!(this instanceof
b))throw new TypeError("Cannot call a class as a function");a=(b.__proto__||Object.getPrototypeOf(b)).call(this,a);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&("object"===typeof a||"function"===typeof a)?a:this}g(b,d);f(b,[{key:"_hasModifier",value:function(a){a=a.modifiers;var c=a.shiftKey,b=a.altKey,d=a.meta;return a.ctrlKey||c||b||d}}]);return b}(e)})},"mw-table/adaptors/CellSizingAdaptor":function(){function g(e,d){if("function"!==typeof d&&
null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&
e(d,a);return d}}();define(["../utils/Emitter","../enums/StateEnum","../enums/EventEnum"],function(e,d,b){return function(a){function c(a){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var b;b=(c.__proto__||Object.getPrototypeOf(c)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");b=b&&("object"===typeof b||"function"===typeof b)?b:this;b._viewModel=a.viewModel;return b}g(c,a);f(c,[{key:"eventList",value:function(){return{}}},
{key:"setDefaultColumnWidth",value:function(a){a=Math.max(0,a);isNaN(a)||this._viewModel.setState(d.COL_WIDTH,a)}},{key:"setDefaultRowHeight",value:function(a){a=Math.max(0,a);isNaN(a)||this._viewModel.setState(d.ROW_HEIGHT,a)}}]);return c}(e)})},"mw-table/utils/Registration":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,
d);b&&f(e,b);return e}}();define([],function(){return function(){function f(){if(!(this instanceof f))throw new TypeError("Cannot call a class as a function");this._handlers={}}g(f,[{key:"register",value:function(e){for(var d in e)this._handlers[d]=this._handlers[d]||[],this._handlers[d].push(e[d])}},{key:"handleEvent",value:function(e,d){var b=this._handlers[e];Array.isArray(b)&&b.forEach(function(a){return a(d)})}}]);return f}()})},"mw-table/lifecycle/LifeCycle":function(){var g=function(){function f(e,
d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["./BuildComponents","./IncomingDataUpdates","./Render","./InteractionEvents","../view/TableUtils"],function(f,e,d,b,a){return function(){function c(a,e,l){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");this._viewModel=a;this._viewPortList=l;
this._adaptorList=e;a=new b(this._viewModel,this._adaptorList,this._viewPortList);this._buildComponents=new f(this._viewModel,a.eventCallback);this._render=new d(this._buildComponents.buildOuterWrapper())}g(c,[{key:"mount",value:function(){var c=this._render.mount();this._incomingData=new e(this._viewModel,this._render,this._buildComponents);a.renderUpdate(this._viewModel,this._viewPortList[0].getBufferedViewPort());this._render.resize();return c}},{key:"unmount",value:function(){this._render.unmount()}},
{key:"domNode",get:function(){return this._render.domNode}}]);return c}()})},"mw-table/lifecycle/BuildComponents":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["../enums/StateEnum","../utils/PropManager","../view/ComponentFactory"],function(f,e,d){return function(){function b(a,
c){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");this._viewModel=a;this._hasTreeColumn=a.getStateByKey(f.treetable.displayTreeColumn)||{value:!1};this._hasTreeColumn.value&&(e=this._viewModel.getStateByKey(f.treetable.PropManager).value,d=this._viewModel.getStateByKey(f.treetable.ComponentFactory).value);this._propManager=new e({},a,c);this._factory=new d(this._propManager);this._rowHeader=void 0;this._headerEl=[];this._tableComp=void 0}g(b,[{key:"buildDataComponents",
value:function(a){this._hasTreeColumn.value&&this._propManager.updateTreeColumnProps(a);this._propManager.updateProps(a);this._buildColumnHeader(a.columnMetaData);var c=this._factory.makeRowElements(),c=this._factory.makeTbody(c);this._propManager.props.displayRowHeader&&this._buildRowHeader(a.rowMetaData);this._tableComp=this._factory.makeTableComponent(c)}},{key:"_buildColumnHeader",value:function(a){a=this._factory.makePagedColHeaderComponent(a);this._headerEl=this._factory.makeHeaderComponent(a)}},
{key:"_buildRowHeader",value:function(a){a=this._factory.makeRowHeaderList(a);this._rowHeader=this._factory.makeRowHeaderComponent(a)}},{key:"buildTable",value:function(){return[this._factory.makeScrollComponent(this._tableComp,this._rowHeader),this._headerEl]}},{key:"buildOuterWrapper",value:function(){return this._factory.makeWrapperComponent(this.buildTable())}}]);return b}()})},"mw-table/utils/PropManager":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=
a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define("mw-table/view/TableUtils mw-table/renderers/DefaultRenderer mw-table/view/TableRow mw-table/enums/StateEnum mw-table/enums/DefaultsEnum mw-table/enums/LogicalSizeEnum ../functional/FunctionalUtils mw-table/utils/rangeInterface ../parsing/headers/PureColumnUtils".split(" "),function(f,e,d,b,a,c,h,k,l){var m=new e;return function(){function a(d,
e,k){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");this._viewModel=e;this._dataStore=d;this._props={};this._props.eventCallback=k;this._rowComponentList=e.getStateByKey("RowComponent")||{};this._props.dataTestId=null;this._sorted=[];this._size=new c(e);this._props.headers=[];l.getPercentColumnPageWidth;this._tableWidth=h.curry(f.computeTableHeight);this._initViewStateProps();e.getStateByKey(b.testId)&&(this._props.dataTestId=e.getStateByKey(b.testId).value)}g(a,
[{key:"_initViewStateProps",value:function(){var a=this;[{name:b.ROW_HEIGHT,"default":this._size.ROW_HEIGHT},{name:b.HEADER_MENU_AFFORDANCE,"default":!1},{name:b.SORTABLE,"default":!1},{name:b.tableBottomLeftAffordanceHeight,"default":0},{name:b.TABLE_AFFORDANCE_WIDTH,"default":{run:function(){return 0}}},{name:b.TRANSLATE_X,"default":0},{name:b.WIDTH_CHANGED,"default":!1}].forEach(function(c){var b=a._viewModel.getStateByKey(c.name);(!b||!b.value)&&a._viewModel.setState(c.name,c.default)})}},{key:"setHeaderSortState",
value:function(a){this._sorted[a._index]=a[b.SORTED]||{order:""}}},{key:"getHeaderSortType",value:function(a){return this._props.headers[a].sortType}},{key:"_isA",value:function(a,c){return Object.keys(c).reduce(function(c,b){return c&&"function"===typeof a[b]},!0)}},{key:"setHeaders",value:function(a){var c=this;this._props.headers=a;var h=this._viewModel;h.deleteState("renderer");h.deleteState("editor");h.deleteState("interactiveRenderer");var d={getDomNode:1,handleAction:1},e={getDomNode:1};a.forEach(function(a,
f){a.interactiveRenderer&&c._isA(a.interactiveRenderer,d)?k.addMetadataToCol(a._index,h,"interactiveRenderer",a.interactiveRenderer):(a.editor&&k.addMetadataToCol(a._index,h,"editor",a.editor),a.renderer&&c._isA(a.renderer,e)&&k.addMetadataToCol(a._index,h,"renderer",a.renderer));c._sorted[a._index]=a[b.SORTED]||{order:""}});this._renderList=h.getStateByKey("renderer")||{};this._props.interactiveRenderList=h.getStateByKey("interactiveRenderer")||{};this._editorList=h.getStateByKey("editor")||{}}},
{key:"_resetProps",value:function(){this._viewModel.setState(b.WIDTH_CHANGED,!1)}},{key:"updateProps",value:function(a){var c=this._viewModel,h=a.viewData[0].range,d=c.dataSize,e=c.viewBuffer.rangeList[0],k=c.getColumnHeaders()||[];this._headers=k;var m=this._tableWidth(this._size.COL_WIDTH);this._sorted=[];var g={headers:k,dataSize:d.columns.count},p=l.getPercentColumnPageWidth(g);this._props.width=p||m(d.columns.count);this._props.columnClass=l.getTbodyHeaderClass(g);this._props.tableClass=l.getTableHeaderClass(g);
this._props.lastDataColumn=k.length-1;this._props.editState=this.getEditState(c.getStateByKey(b.EDIT_STATE));this._props.startRow=h.rows.start;this._props.endRow=h.rows.end;this._props.startCol=h.columns.start;this._props.endCol=h.columns.end;this._props.colResize=c.getStateByKey(b.colResize).value;this._props.tableAffordanceWidth=c.getStateByKey(b.TABLE_AFFORDANCE_WIDTH).value.run();this._props.tableBottomLeftAffordanceHeight=c.getStateByKey(b.tableBottomLeftAffordanceHeight).value;c.getStateByKey(b.displayRowHeader)&&
(this._props.displayRowHeader=c.getStateByKey(b.displayRowHeader).value,this._props.rowHeaderWidth=c.getStateByKey(b.rowHeaderWidth).value);this._props.widthChanged=c.getStateByKey(b.WIDTH_CHANGED).value;this._props.rowHeight=c.getStateByKey(b.ROW_HEIGHT).value;if(!c.getStateByKey(b.treetable.displayTreeColumn)||!c.getStateByKey(b.treetable.displayTreeColumn).value)this._props.focused=f.getFocusedCell(c.getStateByKey(b.FOCUSED)),this._props.metadata=f.getMeta(e.rows.start,e.rows.count,c.getStateByKey("selected"),
"selected");this._props.translateX=c.getStateByKey(b.TRANSLATE_X).value;this._props.height=f.computeTableHeight(d.rows.count,this._size.ROW_HEIGHT);this._props.data=a.viewData[0];this._props.colMenuAffordance=c.getStateByKey(b.HEADER_MENU_AFFORDANCE).value;this._props.sortable=c.getStateByKey(b.SORTABLE).value;this._props.scrollXPos=this._size.COL_WIDTH*this._props.startCol;this._props.scrollYPos=this._size.ROW_HEIGHT*this._props.startRow;this._props.totalLogicalWidth=this._size.COL_WIDTH*this._props.lastDataColumn;
this._props.translateY=this._size.ROW_HEIGHT*this._props.startRow;this._props.logicalColWidth=this._size.COL_WIDTH;this._props.logicalRowHeight=this._size.ROW_HEIGHT;this._resetProps();return this._props}},{key:"getSortedState",value:function(a){return this._sorted[a]||{order:""}}},{key:"getEditState",value:function(a){return a&&a.hasOwnProperty("value")?a.value:!1}},{key:"getRendererFor",value:function(a,c){for(var b=this._renderList.rangeList||[],h=0;h<b.length;h++)if(this.checkRange(b[h],a,c))return this._renderList.value[h]||
m;return m}},{key:"getEditorFor",value:function(a,c){for(var b=this._editorList.rangeList||[],h=0;h<b.length;h++)if(this.checkRange(b[h],a,c))return this._editorList.value[h]||null;return null}},{key:"checkRange",value:function(a,c,b){return b>=a.columns.start&&b<=a.columns.end&&c>=a.rows.start&&c<=a.rows.end?!0:!1}},{key:"props",get:function(){return this._props}}]);return a}()})},"mw-table/view/TableRow":function(){function g(e,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+
typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["react/react.min","./ClassMapEnum"],function(e,d){return function(b){function a(){if(!(this instanceof
a))throw new TypeError("Cannot call a class as a function");var c=(a.__proto__||Object.getPrototypeOf(a)).apply(this,arguments);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return c&&("object"===typeof c||"function"===typeof c)?c:this}g(a,b);f(a,[{key:"render",value:function(){var a=this.props,b=a.children,f=a.metadata,a=a.rowIndex,l=["mw-table-row"],m;for(m in f)l.push(d[m]);return e.createElement("tr",{"data-test-id":a,"data-row-index":a,className:l.join(" ")},
b)}}]);return a}(e.Component)})},"mw-table/view/ClassMapEnum":function(){define([],function(){return Object.freeze({selected:"mw-table-row-selected",names:{ROW_SELECTED:"mw-table-row-selected"},selectors:{ROW_SELECTED:".mw-table-row-selected"}})})},"mw-table/view/ComponentFactory":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&
f(e.prototype,d);b&&f(e,b);return e}}();define("../enums/DefaultsEnum ./EditableTableCell ./InteractiveTableCell ./TableCell ./TableRow ./ColumnHeader ./HeaderRow ./TbodyComponent ./TableComponent ./ScrollComponent ./OuterWrapperComponent ./ColResizeAffordance ./SortAffordance ./RowHeader ./RowHeaderCell ./HeaderMenuAffordance ./Tooltip ./TableUtils react/react.min".split(" "),function(f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w){var x=function(){return w.createElement("div",{className:"mwTableHeaderAffordancePlaceholder"})};
return function(){function f(a){if(!(this instanceof f))throw new TypeError("Cannot call a class as a function");this.propFactory=a}g(f,[{key:"validateStartValue",value:function(a){"number"!==typeof a?a=0:0>a&&(a=0);return a}},{key:"validateEndValue",value:function(a){"number"!==typeof a&&(a=-1);return a}},{key:"makeCell",value:function(a,c,h){var f=this.propFactory.props,k=f.headers,l=f.data,m=f.eventCallback,g=f.focused,n=f.editState,p=f.forceCellRender,q=f.interactiveRenderList,r=f.logicalRowHeight,
f=this.propFactory.getRendererFor(a,c),s=v.getInteractiveRendererFor(q,a,c),q=this.propFactory.getEditorFor(a,c),t=b,n=n[a+","+c];s?(t=d,f=s.renderer):q&&(t=e);h=k[h]?k[h].styleData:{};h={minWidth:h.minWidth,maxWidth:h.maxWidth,width:h.width,height:r+"px"};k=[a,c].join();return w.createElement(t,{forceUpdate:p,key:c,styleData:h,row:a,column:c,cellData:l(a)(c),eventCallback:m,focusClass:g[k],renderer:f,editor:q,editState:n})}},{key:"makeCellsForRow",value:function(a){for(var c=this.propFactory.props,
b=c.startCol,c=c.endCol,h=[],b=this.validateStartValue(b),c=this.validateEndValue(c),d=b;d<=c;d++)h.push(this.makeCell(a,d,d-b));return h}},{key:"makeRowElements",value:function(){for(var c=this.propFactory.props,b=c.startRow,h=c.endRow,c=c.metadata,b=this.validateStartValue(b),h=this.validateEndValue(h),d=[];b<=h;b+=1){var e=c[b.toString()]||{},f=this.makeCellsForRow(b);d.push(w.createElement(a,{key:b,rowIndex:b,children:f,metadata:e}))}return d}},{key:"makeTooltip",value:function(){return w.createElement(u,
{eventCallback:this.propFactory.props.eventCallback})}},{key:"makeRowHeaderCell",value:function(a,c){var b=this.propFactory.props;return w.createElement(s,{key:a,rowIndex:a,styleData:{},metadata:c,rowHeight:b.logicalRowHeight,eventCallback:b.eventCallback})}},{key:"makeRowHeaderList",value:function(a){a=a||[function(){return{value:void 0}}];for(var c=this.propFactory.props,b=c.startRow,c=c.endRow,h=b,d=[],e=function(){return{value:{label:""},classList:"mw-table-index-only",isEqual:function(){return!0}}},
b=this.validateStartValue(b),c=this.validateEndValue(c),h=b;h<=c;h+=1){var b=a[0](h).value,f=void 0,f=b&&void 0!==b.label?a[0](h):e(),b=this.makeRowHeaderCell(h,f);d.push(b)}return d}},{key:"makeRowHeaderComponent",value:function(a){var c=this.propFactory.props;return w.createElement(r,{scrollPos:c.scrollYPos,rowHeaderHeight:c.height,eventCallback:c.eventCallback,rowHeight:c.logicalRowHeight,children:a})}},{key:"makeTbody",value:function(a){var c=this.propFactory.props;return w.createElement(k,{translateY:c.scrollYPos,
translateX:c.translateX,eventCallback:c.eventCallback,columnClass:c.columnClass,children:a})}},{key:"makeSortAffordance",value:function(a,c){var b=this.propFactory.props,h=b.eventCallback,d=a.sortType;if(b.sortable&&d)return w.createElement(q,{colIndex:c,eventCallback:h,sortType:d,sorted:this.propFactory.getSortedState(c).order})}},{key:"makeColResizeAffordance",value:function(a){var c=this.propFactory.props,b=c.eventCallback,h=c.widthChanged,d=c.logicalColWidth;return c.colResize?w.createElement(n,
{colIndex:a,widthChanged:h,eventCallback:b,colWidth:d}):w.createElement(x,null)}},{key:"makeColMenuAffordance",value:function(a,c){var b=this.propFactory.props,h=b.eventCallback,d=a.headerMenu;if(b.colMenuAffordance&&d)return w.createElement(t,{colIndex:c,eventCallback:h,sorted:this.propFactory.getSortedState(c).order})}},{key:"makeColumnHeader",value:function(a,b){var h=a.label,d=a.styleData,e=a.headerRenderer,f=this.propFactory.props,k=f.eventCallback,l=f.widthChanged,f=f.logicalColWidth,d=d||{},
m=[];m.push(this.makeColMenuAffordance(a,b)||this.makeSortAffordance(a,b));m.push(this.makeColResizeAffordance(b));return w.createElement(c,{renderer:e,key:b,defaultWidth:f,colIndex:b,styleData:d,eventCallback:k,widthChanged:l,sorted:this.propFactory.getSortedState(b).order,rightChildren:m,name:h})}},{key:"makePagedColHeaderComponent",value:function(a){a=a||[function(){return{value:{}}}];for(var c=this.propFactory.props,b=c.startCol,h=c.endCol,d=c.lastDataColumn,c=c.logicalColWidth,e=b,f=[],k=[],
b=this.validateStartValue(b),h=this.validateEndValue(h),e=b;e<=h;e+=1){var b=a[0](e).value,l=c,m="px";b.label||(b.label=e+1);b.width&&(l=Math.floor(b.width.value),m=b.width.unit);b._index=e;b.styleData=v.getTableHeaderStyle(l,m,d,c);k.push(b);this.propFactory.setHeaderSortState(b);b=this.makeColumnHeader(b,e);f.push(b)}this.propFactory.setHeaders(k);return f}},{key:"makeTableComponent",value:function(a){var c=this.propFactory.props;return w.createElement(l,{tableClass:c.tableClass,tbody:a,height:c.height,
width:c.width,eventCallback:c.eventCallback})}},{key:"makeScrollComponent",value:function(a,c){var b=this.propFactory.props;return w.createElement(m,{eventCallback:b.eventCallback,scrollTop:b.scrollTop,table:a,rowHeader:c,rowHeaderWidth:b.rowHeaderWidth,tableAffordanceWidth:b.tableAffordanceWidth,tableBottomLeftAffordanceHeight:b.tableBottomLeftAffordanceHeight})}},{key:"makeHeaderComponent",value:function(a){var c=this.propFactory.props,b=c.width;return w.createElement(h,{displayRowHeader:c.displayRowHeader,
widthChanged:c.widthChanged,scrollXPos:c.scrollXPos,flexWidth:b,lastDataColumn:c.lastDataColumn,width:b,eventCallback:c.eventCallback,startCol:c.startCol,tableAffordanceWidth:c.tableAffordanceWidth,children:a,columnClass:c.columnClass,totalLogicalWidth:c.totalLogicalWidth})}},{key:"makeWrapperComponent",value:function(a,c){var b=this.propFactory.props;return w.createElement(p,{dataTestId:b.dataTestId,style:{maxWidth:b.maxWidth||"none"},scrollComponent:a,header:c,eventCallback:b.eventCallback,tooltip:this.makeTooltip()})}}]);
return f}()})},"mw-table/view/EditableTableCell":function(){function g(d,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}var f=function(){function d(b,a){for(var c=0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=!0;"value"in
h&&(h.writable=!0);Object.defineProperty(b,h.key,h)}}return function(b,a,c){a&&d(b.prototype,a);c&&d(b,c);return b}}(),e=function b(a,c,h){null===a&&(a=Function.prototype);var e=Object.getOwnPropertyDescriptor(a,c);if(void 0===e)return a=Object.getPrototypeOf(a),null===a?void 0:b(a,c,h);if("value"in e)return e.value;c=e.get;return void 0===c?void 0:c.call(h)};define(["react/react.min","./TableCell"],function(b,a){return function(a){function b(){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");
var a;a=(b.__proto__||Object.getPrototypeOf(b)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");a=a&&("object"===typeof a||"function"===typeof a)?a:this;a._handleEditComplete=a._handleEditComplete.bind(a);return a}g(b,a);f(b,[{key:"_handleClick",value:function(a){var c=this.props,f=c.editState;c.focusClass&&!f?e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"_handleClick",this).call(this,a,"","enterEditMode"):f||e(b.prototype.__proto__||
Object.getPrototypeOf(b.prototype),"_handleClick",this).call(this,a)}},{key:"_handleMouseEnter",value:function(a){this.props.editState||e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"_handleMouseEnter",this).call(this,a)}},{key:"_handleEditComplete",value:function(a){if(this._content){delete this._content;var c=this.props,b=c.row,h=c.column;(c=c.eventCallback)&&c("editComplete",{value:a,row:b,column:h})}}},{key:"_mountContent",value:function(){var a=this.cell,c=this,b=this.props,h=b.editor,
e=b.renderer,f=b.cellData,g=b.focusClass,s=b.eventCallback,t=void 0,u=[];if(b.editState&&g){a.removeAttribute("data-title");try{this._content=t=new h(f.value,{}),this._previousActiveElement=document.activeElement}catch(v){return e}u.push(t.on("editComplete",function(b){u.forEach(function(a){a.remove()});u=[];b=b.newValue;t.destroy();t=void 0;(a.contains(document.activeElement)||document.activeElement===c._previousActiveElement)&&c._previousActiveElement.focus();c._handleEditComplete(b)}));u.push(t.on("editCanceled",
function(){u.forEach(function(a){a.remove()});u=[];t.destroy();delete c._content;t=void 0;c._previousActiveElement.focus();s("leaveEditMode",{})}));return t}return e}},{key:"_focusMe",value:function(a){this.cell.setAttribute("data-edit",this.props.editState||!1);this.props.editState&&this.props.focusClass&&(this._previousActiveElement=document.activeElement,a.setFocus())}},{key:"shouldComponentUpdate",value:function(a,c){if(this.props.editState!==a.editState||this.props.focusClass!==a.focusClass)return!0;
var b=JSON.stringify(this.props.styleData)!==JSON.stringify(a.styleData);return!this.props.cellData.isEqual(a.cellData)||b}},{key:"componentWillUnmount",value:function(){this.props.editState&&this.props.focusClass&&this._previousActiveElement.focus()}},{key:"componentDidMount",value:function(){var a=this.props.cellData,c=this._mountContent();this.cell.appendChild(c.getDomNode(a.value));this._focusMe(c)}},{key:"componentDidUpdate",value:function(a){var c=this.props.cellData.isEqual(a.cellData);if(a.editState!==
this.props.editState||!this.props.editState&&!c)a=this.props.cellData,c=this._mountContent(),this.cell.replaceChild(c.getDomNode(a.value),this.cell.firstChild),this._focusMe(c)}},{key:"baseStyle",get:function(){return"mw-table-cell"}}]);return b}(a)})},"mw-table/view/TableCell":function(){function g(d,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,
writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}var f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(d){return typeof d}:function(d){return d&&"function"===typeof Symbol&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},e=function(){function d(b,a){for(var c=0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=!0;"value"in h&&(h.writable=!0);Object.defineProperty(b,h.key,h)}}return function(b,
a,c){a&&d(b.prototype,a);c&&d(b,c);return b}}();define(["../enums/EventEnum","../enums/StateEnum","react/react.min"],function(d,b,a){var c=function(){};return function(h){function k(){if(!(this instanceof k))throw new TypeError("Cannot call a class as a function");var a;a=(k.__proto__||Object.getPrototypeOf(k)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");a=a&&("object"===typeof a||"function"===typeof a)?a:this;a._handleMouseEnter=a._handleMouseEnter.bind(a);
a._handleClick=a._handleClick.bind(a);a._handleReplaceChild=a._handleReplaceChild.bind(a);return a}g(k,h);e(k,[{key:"_handleReplaceChild",value:function(){var a=this.props;this.cell.replaceChild(a.renderer.getDomNode(a.cellData.value),this.cell.firstChild)}},{key:"_handleMouseEnter",value:function(a){var c=this;a=a.target;var h=this.props,e=h.renderer,f=h.cellData,k=h.row,g=h.column,h=Math.max(0,a.clientWidth-a.firstChild.clientWidth);e.getTooltip&&(a.firstChild&&Math.max(a.firstChild.offsetWidth,
a.firstChild.scrollWidth)+h>a.clientWidth)&&this.props.eventCallback(d.internal.NODE_NOTIFY,{publisherFn:function(){return{node:c.cell,id:k+","+g,content:e.getTooltip(f.value).text}},publisherId:b.publisher.CELL_ENTER,noRender:!0})}},{key:"_handleClick",value:function(a,c){var b=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"tableCellClick",h=this.cell,d=Number(h.getAttribute("data-row")),h=Number(h.getAttribute("data-col"));this.props.eventCallback&&this.props.eventCallback(b,{row:d,column:h,
meta:a.metaKey,ctrlKey:a.ctrlKey,shiftKey:a.shiftKey,altKey:a.altKey})}},{key:"shouldComponentUpdate",value:function(a,c){if(this.props.focusClass!==a.focusClass)return!0;var b=JSON.stringify(this.props.styleData)!==JSON.stringify(a.styleData);return!this.props.cellData.isEqual(a.cellData)||b}},{key:"componentWillUpdate",value:function(a){a=this.props.cellData.isEqual(a.cellData);this._replaceChild=c;a||(this._replaceChild=this._handleReplaceChild)}},{key:"componentDidUpdate",value:function(){this._replaceChild()}},
{key:"componentDidMount",value:function(){var a=this.props;this.cell.appendChild(a.renderer.getDomNode(a.cellData.value))}},{key:"render",value:function(){var c=this,b=this.props,h=b.row,d=b.column,e=b.cellData,k=b.styleData,b=b.focusClass;if("object"!==("undefined"===typeof k?"undefined":f(k)))k={};if("object"!==("undefined"===typeof e?"undefined":f(e))||!e.hasOwnProperty("isEqual"))throw Error("cellData property requires an isEqual function.");e=[this.baseStyle,b].join(" ");return a.createElement("td",
{ref:function(a){return c.cell=a},style:k,"data-row":h,"data-col":d,onMouseEnter:this._handleMouseEnter,onClick:this._handleClick,className:e})}},{key:"baseStyle",get:function(){return"mw-table-cell mw-table-cell-background"}}]);return k}(a.Component)})},"mw-table/view/InteractiveTableCell":function(){function g(d,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,
enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}var f=function(){function d(b,a){for(var c=0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=!0;"value"in h&&(h.writable=!0);Object.defineProperty(b,h.key,h)}}return function(b,a,c){a&&d(b.prototype,a);c&&d(b,c);return b}}(),e=function b(a,c,h){null===a&&(a=Function.prototype);var e=Object.getOwnPropertyDescriptor(a,c);if(void 0===e)return a=Object.getPrototypeOf(a),
null===a?void 0:b(a,c,h);if("value"in e)return e.value;c=e.get;return void 0===c?void 0:c.call(h)};define(["react/react.min","./TableCell"],function(b,a){return function(a){function b(){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");var a;a=(b.__proto__||Object.getPrototypeOf(b)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");a=a&&("object"===typeof a||"function"===typeof a)?a:this;a._handleClick=a._handleClick.bind(a);
return a}g(b,a);f(b,[{key:"_handleClick",value:function(a,c){var f=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"interactiveCellClick",g=this.props,n=g.renderer,q=g.cellData,r=this.cell,g=Number(r.getAttribute("data-row")),r=Number(r.getAttribute("data-col"));(n=n.handleAction({value:q.value,target:a.target}))?this.props.eventCallback&&this.props.eventCallback(f,{row:g,column:r,oldValue:n.oldValue,newValue:n.newValue}):e(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"_handleClick",
this).call(this,a)}},{key:"baseStyle",get:function(){return"mw-table-cell"}}]);return b}(a)})},"mw-table/view/ColumnHeader":function(){function g(d,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=b)}var f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?
function(d){return typeof d}:function(d){return d&&"function"===typeof Symbol&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},e=function(){function d(b,a){for(var c=0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=!0;"value"in h&&(h.writable=!0);Object.defineProperty(b,h.key,h)}}return function(b,a,c){a&&d(b.prototype,a);c&&d(b,c);return b}}();define(["../enums/EventEnum","../enums/StateEnum","../enums/DataTestEnum","../renderers/MultiLineRenderer","react/react.min"],
function(d,b,a,c,h){var k=function(a,c){var b=c.renderer;return b&&"function"===typeof b.getDomNode?{renderer:b}:{}};return function(l){function m(a){if(!(this instanceof m))throw new TypeError("Cannot call a class as a function");var b;b=(m.__proto__||Object.getPrototypeOf(m)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");b=b&&("object"===typeof b||"function"===typeof b)?b:this;b._handleMouseEnter=b._handleMouseEnter.bind(b);a=k(void 0,
a).renderer;b.state={renderer:a||new c};return b}g(m,l);e(m,[{key:"shouldComponentUpdate",value:function(a,c){var b=this.props,h=b.name,d=b.styleData,e=b.colIndex,f=b.sorted,b=b.renderer,k=a.styleData||{},d=d||{};return h!==a.name||e!==a.colIndex||a.widthChanged||a.sorted!==f||b!==a.renderer||d.maxWidth!==k.maxWidth||d.minWidth!==k.minWidth||d.width!==k.width}},{key:"componentDidMount",value:function(){this.columnHeader.appendChild(this.state.renderer.getDomNode(this.props.name))}},{key:"componentWillReceiveProps",
value:function(a){a.renderer!==this.state.renderer&&this.setState(k)}},{key:"componentDidUpdate",value:function(a,c){(this.state.renderer!==c.renderer||this.props.name!==a.name)&&this.columnHeader.replaceChild(this.state.renderer.getDomNode(this.props.name),this.columnHeader.firstChild)}},{key:"_handleMouseEnter",value:function(a){var c=this,h=this.columnHeader.firstChild,e=this.props.colIndex,f=this.props.name;this.state.renderer.getTooltip&&h.offsetWidth<h.scrollWidth&&this.props.eventCallback(d.internal.NODE_NOTIFY,
{publisherFn:function(){return{node:a.target,id:"colHeader"+e,content:c.state.renderer.getTooltip(f).text,className:"mw-table-header-column"}},publisherId:b.publisher.CELL_ENTER,noRender:!0})}},{key:"render",value:function(){var c=this,b=this.props,d=b.styleData,e=b.colIndex,k=b.rightChildren,b=b.defaultWidth;if("object"!==("undefined"===typeof d?"undefined":f(d)))d={maxWidth:b+"px"};return h.createElement("th",{"data-col-index":e,style:d,className:"mw-table-header-column mw-table-flex-container"},
h.createElement("div",{className:"mwTableHeaderWrapper"},h.createElement("div",{ref:function(a){return c.columnHeader=a},"data-test-id":a.HEADER_LABEL,onMouseEnter:this._handleMouseEnter,className:"mw-table-header-label"}),k))}}]);return m}(h.Component)})},"mw-table/enums/DataTestEnum":function(){define([],function(){return Object.freeze({HEADER_LABEL:"mw-header-label",ROW_HEADER_LABEL:"mw-row-header-label",RESIZE_AFFORDANCE:"mw-table-resize-affordance"})})},"mw-table/renderers/MultiLineRenderer":function(){var g=
"function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define([],function(){return function(){function e(d){if(!(this instanceof
e))throw new TypeError("Cannot call a class as a function");this.config=d}f(e,[{key:"getTooltip",value:function(d){if(void 0===d||null===d||"object"===("undefined"===typeof d?"undefined":g(d)))d="";"string"!==typeof d&&(d=d.toString());return{text:d}}},{key:"getDomNode",value:function(d){var b=document.createElement("div");if(void 0===d||null===d||"object"===("undefined"===typeof d?"undefined":g(d)))d="";"string"!==typeof d&&(d=d.toString());d.split("\n").map(function(a){var c=document.createElement("span");
c.textContent=a;b.appendChild(c);b.appendChild(document.createElement("br"))});b.className="mw-default-header-cell";return b}}]);return e}()})},"mw-table/view/HeaderRow":function(){function g(e,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}var f=
function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["react/react.min","../enums/DefaultsEnum","../enums/EventEnum","../enums/StateEnum"],function(e,d,b,a){return function(c){function h(){if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");var a;a=(h.__proto__||Object.getPrototypeOf(h)).call(this);
if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");a=a&&("object"===typeof a||"function"===typeof a)?a:this;a._headerRow={affordanceWidth:0};a._geomObject={scrollLeft:0,translateX:0};return a}g(h,c);f(h,[{key:"_getHeaderRects",value:function(){for(var a=this.theadRef.childNodes[0].childNodes,c={},b=0;b<a.length;b+=1)c[a[b].getAttribute("data-col-index")]=a[b].getBoundingClientRect();return c}},{key:"_clientWidth",value:function(a){return 0<a?a+"px":"100%"}},
{key:"_publishMinHeight",value:function(){var a=this,c=this.headerRef.offsetHeight;return function(){return c=Math.max(c,a.headerRef.offsetHeight)}}},{key:"_setComputedWidth",value:function(){var a=0,c=this.tableRef,b=this.props.tableAffordanceWidth||0,h=this.headerRef.parentNode;this.props.displayRowHeader&&(a=this.headerRef.childNodes[0].offsetWidth);"100%"!==this.props.flexWidth&&0<c.scrollWidth&&(h.style.maxWidth=c.scrollWidth+a+b-2*d.BORDER_WIDTH+"px")}},{key:"_setAffordanceWidth",value:function(){var a=
0<arguments.length&&void 0!==arguments[0]?arguments[0]:0;this._headerRow.affordanceWidth=a;var c=this.headerRef.childNodes;0===a?(c[c.length-1].style.width="0px",c[c.length-1].classList.remove("mw-table-top-right-affordance")):(c[c.length-1].style.width=a+"px",c[c.length-1].classList.add("mw-table-top-right-affordance"));this._setComputedWidth()}},{key:"componentDidUpdate",value:function(){this.props.widthChanged&&this._setComputedWidth()}},{key:"_getGeomObject",value:function(a){var c={flexWidth:this.props.flexWidth,
headerList:this.theadRef.childNodes[0].childNodes,headerThead:this.theadRef,widthChanged:this.props.widthChanged,noRender:!0};this.props.eventCallback(a,c);this._geomObject=c.result||this._geomObject}},{key:"_getTableWidth",value:function(){this.props.widthChanged&&this._getGeomObject(b.internal.TABLE_WIDTH);return this._geomObject.physicalWidth||0}},{key:"_getTranslateX",value:function(){this._getGeomObject(b.internal.COMPUTE_TRANSLATEX);return this._geomObject.translateX}},{key:"_setScrollLeft",
value:function(a){this._geomObject.scrollLeft!==a&&(this.dynRef.scrollLeft=a,this._geomObject.scrollLeft=a)}},{key:"_setTranslateX",value:function(a){a="translateX("+a+"px)";this.theadRef.style.transform=a;this.theadRef.style.webkitTransform=a}},{key:"_setTableWidth",value:function(a){0<a&&(this.tableRef.style.width=a+"px",this.tableRef.style.minWidth=a+"px",this.tableRef.style.maxWidth=a+"px")}},{key:"componentDidMount",value:function(){var c=this;this.props.eventCallback(b.internal.NODE_SUBSCRIBE,
{subscriberFn:function(a){c.topLeft.style.minWidth=a+"px";c.topLeft.style.maxWidth=a+"px"},subscriberId:a.subscriber.TOP_LEFT,subscribeTo:a.publisher.ROW_HEADER,noRender:!0});this.props.eventCallback(b.internal.NODE_SUBSCRIBE,{subscriberFn:this._setAffordanceWidth.bind(this),subscriberId:a.subscriber.HEADER_RIGHT_AFFORDANCE,subscribeTo:a.publisher.SCROLL_BAR_WIDTH,noRender:!0});this.props.eventCallback(b.internal.NODE_SUBSCRIBE,{subscriberFn:function(a){c.headerRef.style.minHeight=a+"px"},subscriberId:a.subscriber.HEADER_MIN_HEIGHT,
subscribeTo:a.publisher.HEADER_ROW_HEIGHT,noRender:!0});this.props.eventCallback(b.internal.NODE_PUBLISH,{publisherFn:this._getTranslateX.bind(this),publisherId:a.publisher.HEADER_TRANSX,noRender:!0});this.props.eventCallback(b.internal.NODE_PUBLISH,{publisherFn:this._getTableWidth.bind(this),publisherId:a.publisher.CALCULATED_TABLE_WIDTH,noRender:!0});this.props.eventCallback(b.internal.NODE_PUBLISH,{publisherFn:this._publishMinHeight().bind(this),publisherId:a.publisher.HEADER_ROW_HEIGHT,noRender:!0});
this.props.eventCallback(b.internal.NODE_SUBSCRIBE,{subscriberFn:this._setTranslateX.bind(this),subscriberId:a.subscriber.HEADER_TRANSFORMX,subscribeTo:a.publisher.HEADER_TRANSX,noRender:!0});this.props.eventCallback(b.internal.NODE_SUBSCRIBE,{subscriberFn:this._setScrollLeft.bind(this),subscriberId:a.subscriber.HEADER_SCROLL_LEFT,subscribeTo:a.publisher.SCROLL_COMPONENT_LEFT,noRender:!0});this.props.eventCallback(b.internal.NODE_SUBSCRIBE,{subscriberFn:this._setTableWidth.bind(this),subscriberId:a.subscriber.HEADER_WIDTH,
subscribeTo:a.publisher.CALCULATED_TABLE_WIDTH,noRender:!0});this.props.eventCallback(b.internal.HEADER_RECTS,{children:this._getHeaderRects.bind(this),noRender:!0});this._setComputedWidth()}},{key:"render",value:function(){var a=this,c=this.props,b=c.children,h=c.trans3dHeader,d=c.flexWidth,f=c.displayRowHeader,c=c.columnClass,d=d||"0px",h={WebkitTransform:h,MozTransform:h,msTransform:h,OTransform:h,transform:h,minWidth:d,maxWidth:d,width:d},d=void 0;f&&(d=e.createElement("div",{ref:function(c){return a.topLeft=
c},className:"mw-table-top-left-affordance"}));return e.createElement("div",{ref:function(c){return a.headerRef=c},className:"mw-table-flex-container mw-table-header-wrapper"},d,e.createElement("div",{className:"mw-table-flex-dynamic-item",ref:function(c){return a.dynRef=c}},e.createElement("table",{ref:function(c){return a.tableRef=c},style:h,className:"mw-table-header"},e.createElement("thead",{ref:function(c){return a.theadRef=c},className:c},e.createElement("tr",{style:{display:"flex",width:"100%"},
className:"mw-table-header-row"},b)))),e.createElement("div",null))}}]);return h}(e.Component)})},"mw-table/view/TbodyComponent":function(){function g(e,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}var f=function(){function e(d,b){for(var a=0;a<
b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["react/react.min","../enums/EventEnum","../enums/StateEnum"],function(e,d,b){return function(a){function c(){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var a=(c.__proto__||Object.getPrototypeOf(c)).apply(this,arguments);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return a&&("object"===typeof a||"function"===typeof a)?a:this}g(c,a);f(c,[{key:"_setTranslateX",value:function(a){var c=this.tbodyRef.style.transform.split(",")[1];a="translate("+(a+"px")+","+c;this.tbodyRef.style.transform=a;this.tbodyRef.style.webkitTransform=a}},{key:"_getRowRects",value:function(){for(var a=this.tbodyRef.childNodes,c={},b=0;b<a.length;b+=1)c[a[b].getAttribute("data-row-index")]=a[b].getBoundingClientRect();return c}},{key:"componentDidMount",value:function(){this.props.eventCallback(d.internal.NODE_SUBSCRIBE,
{subscriberFn:this._setTranslateX.bind(this),subscriberId:b.subscriber.TBODY_TRANSFORM,subscribeTo:b.publisher.HEADER_TRANSX,noRender:!0});this.props.eventCallback(d.internal.ROW_RECTS,{children:this._getRowRects.bind(this),noRender:!0})}},{key:"render",value:function(){var a=this,c=this.props,b="translate("+c.translateX+"px, 0px)";return e.createElement("tbody",{ref:function(c){return a.tbodyRef=c},className:"mw-table-tbody "+c.columnClass,style:{transform:b,WebkitTransform:b,top:c.translateY+"px"}},
c.children)}}]);return c}(e.Component)})},"mw-table/view/TableComponent":function(){function g(e,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;
c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["react/react.min","../enums/EventEnum","../enums/StateEnum"],function(e,d,b){return function(a){function c(){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var a=(c.__proto__||Object.getPrototypeOf(c)).apply(this,arguments);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
return a&&("object"===typeof a||"function"===typeof a)?a:this}g(c,a);f(c,[{key:"_setTableWidth",value:function(a){0<a&&(this.myTable.style.width=a+"px",this.myTable.style.maxWidth=a+"px")}},{key:"componentDidMount",value:function(){this.props.eventCallback(d.internal.NODE_SUBSCRIBE,{subscriberFn:this._setTableWidth.bind(this),subscriberId:b.subscriber.TABLE_WIDTH,subscribeTo:b.publisher.CALCULATED_TABLE_WIDTH,noRender:!0})}},{key:"render",value:function(){var a=this,c=this.props;return e.createElement("table",
{ref:function(c){return a.myTable=c},"data-test-id":"mwtable",style:{height:c.height,width:c.width},className:"mw-table "+c.tableClass},c.tbody)}}]);return c}(e.Component)})},"mw-table/view/ScrollComponent":function(){function g(e,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,
d):e.__proto__=d)}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["../enums/EventEnum","../enums/StateEnum","react/react.min"],function(e,d,b){return function(a){function c(a){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");a=(c.__proto__||Object.getPrototypeOf(c)).call(this,
a);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");a=a&&("object"===typeof a||"function"===typeof a)?a:this;a.handleScroll=a.handleScroll.bind(a);a.handleWheel=a.handleWheel.bind(a);a.handleMouseDown=a.handleMouseDown.bind(a);a.setTabIndex=a.setTabIndex.bind(a);a._scrollDims={};return a}g(c,a);f(c,[{key:"_setRowHeaderScroll",value:function(){this.props.rowHeader&&(this.rowHeader.childNodes[0].scrollTop=this.scrollNode.scrollTop)}},{key:"handleWheel",
value:function(a){}},{key:"handleMouseDown",value:function(a){this.scrollNode.removeAttribute("tabIndex")}},{key:"setTabIndex",value:function(a){this.scrollNode.setAttribute("tabIndex","-1")}},{key:"handleScroll",value:function(a){this.scrollNode===a.target&&(a={noRender:!0,target:{scrollTop:a.target.scrollTop,scrollLeft:a.target.scrollLeft}},this.props.eventCallback&&(this._setRowHeaderScroll(),this.props.eventCallback(e.internal.TABLE_SCROLL,a)))}},{key:"_getScrollAffordanceWidth",value:function(a){a=
this.scrollNode.offsetWidth-this.scrollNode.clientWidth;return 0<a?(this._scrollDims.scrollbarWidth=this._scrollDims.scrollbarWidth||a,this._scrollDims.scrollbarWidth):0}},{key:"_getScrollAffordanceHeight",value:function(){var a=this.scrollNode.offsetHeight-this.scrollNode.clientHeight;if(0<a)return this.myScrollComponent.classList.add("mw-table-has-horizontal-scroll"),this._scrollDims.scrollbarHeight=this._scrollDims.scrollbarHeight||a,this._scrollDims.scrollbarHeight;this.myScrollComponent.classList.remove("mw-table-has-horizontal-scroll");
return 0}},{key:"_setScrollAffordanceHeight",value:function(a){var c=this.rowHeader.childNodes[1];0<a?c.classList.add("mw-table-bottom-left-affordance"):c.classList.remove("mw-table-bottom-left-affordance");c.style.height=a+"px"}},{key:"_getScrollLeft",value:function(){return this.scrollNode.scrollLeft}},{key:"componentDidMount",value:function(){var a=this;this.props.eventCallback(e.internal.NODE_PUBLISH,{publisherFn:this._getScrollAffordanceHeight.bind(this),publisherId:d.publisher.SCROLL_BAR_HEIGHT,
noRender:!0});this.rowHeader&&(this.props.eventCallback(e.internal.NODE_SUBSCRIBE,{subscriberFn:function(c){a.rowHeader.style.maxWidth=c+"px";a.rowHeader.style.minWidth=c+"px"},subscribeTo:d.publisher.ROW_HEADER,subscriberId:d.subscriber.ROW_HEADER_PARENT,noRender:!0}),this.props.eventCallback(e.internal.NODE_SUBSCRIBE,{subscriberFn:this._setScrollAffordanceHeight.bind(this),subscribeTo:d.publisher.SCROLL_BAR_HEIGHT,subscriberId:d.subscriber.TABLE_BOTTOM_LEFT_AFFORDANCE,noRender:!0}));this.props.eventCallback(e.internal.NODE_PUBLISH,
{publisherFn:this._getScrollLeft.bind(this),publisherId:d.publisher.SCROLL_COMPONENT_LEFT,noRender:!0});this.props.eventCallback(e.internal.NODE_PUBLISH,{publisherFn:this._getScrollAffordanceWidth.bind(this),publisherId:d.publisher.SCROLL_BAR_WIDTH,noRender:!0});this.props.eventCallback(e.internal.TABLE_MOUNT,{table:this.scrollNode})}},{key:"render",value:function(){var a=this,c=this.props,d=c.table,e=c.rowHeader,f=c.rowHeaderWidth,c={};f&&(c={width:f+"px"});f=void 0;e&&(f=b.createElement("div",{className:"mw-table-row-header-container",
style:c,ref:function(c){return a.rowHeader=c}},b.createElement("div",{className:"mw-table-row-header-scrolling-div"},e),b.createElement("div",null)));return b.createElement("div",{ref:function(c){return a.myScrollComponent=c},className:"mw-table-flex-container mw-table-scroll-container"},f,b.createElement("div",{className:"mw-table-inner-wrapper mw-scrolling-div","data-test-id":"scrollNode",tabIndex:"-1",onMouseDown:this.handleMouseDown,onMouseUp:this.setTabIndex,onMouseLeave:this.setTabIndex,onScroll:this.handleScroll,
onWheel:this.handleWheel,ref:function(c){return a.scrollNode=c}},d))}}]);return c}(b.Component)})},"mw-table/view/OuterWrapperComponent":function(){function g(e,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}var f=function(){function e(d,b){for(var a=
0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["../enums/EventEnum","../enums/StateEnum","../enums/KeyCodeEnum","../enums/MouseCodeEnum","react/react.min"],function(e,d,b,a,c){return function(h){function k(a){if(!(this instanceof k))throw new TypeError("Cannot call a class as a function");var c;c=(k.__proto__||Object.getPrototypeOf(k)).call(this,
a);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");c=c&&("object"===typeof c||"function"===typeof c)?c:this;c.state=a;c._handleResize=c._handleResize.bind(c);c._handleKeyDown=c._handleKeyDown.bind(c);c._handleFocus=c._handleFocus.bind(c);c._handleBlur=c._handleBlur.bind(c);c._handleDoubleClick=c._handleDoubleClick.bind(c);c._handleContextMenu=c._handleContextMenu.bind(c);return c}g(k,h);f(k,[{key:"_handleKeyDown",value:function(a){switch(a.keyCode){case b.ARROW_UP:case b.ARROW_DOWN:case b.ARROW_RIGHT:case b.ARROW_LEFT:case b.PAGE_UP:case b.PAGE_DOWN:case b.END:case b.HOME:case b.SPACE:a.preventDefault();
a.stopPropagation();break;case b.ALT:case b.SHIFT:case b.CTRL:case b.META:return}this.props.eventCallback&&(this.myOuterWrapper.focus(),this.props.eventCallback(e.internal.TABLE_KEY_PRESS,{keyCode:a.keyCode,meta:a.metaKey,ctrlKey:a.ctrlKey,shiftKey:a.shiftKey,altKey:a.altKey}),this.props.eventCallback(e.internal.NODE_NOTIFY,{publisherFn:function(){return!0},publisherId:d.publisher.TOOLTIP_DISMISS,noRender:!0}))}},{key:"_handleFocus",value:function(a){this.props.eventCallback&&this.props.eventCallback("tableFocus",
{target:a.target,noRender:!0});this.setState({wrapperClass:"mw-table-outer-wrapper"})}},{key:"_handleBlur",value:function(a){this.setState({wrapperClass:"mw-table-outer-wrapper-blurred"})}},{key:"_handleResize",value:function(){this.myOuterWrapper&&this.state.eventCallback(e.internal.TABLE_RESIZE)}},{key:"_handleDoubleClick",value:function(a){this.props.eventCallback&&this.props.eventCallback(e.internal.TABLE_DBL_CLICK,a)}},{key:"_handleRightClick",value:function(a){for(var c=a.target,b=c.tagName;"TD"!==
b&&"TH"!==b;)if(c=c.parentNode,b=c.tagName,"BODY"===b)return;c=this._getRowColIndex(c);this.props.eventCallback&&this.props.eventCallback(e.internal.TABLE_RIGHT_CLICK,{left:a.pageX,top:a.pageY,row:c.row,col:c.col})}},{key:"_handleContextMenu",value:function(c){switch(c.button){case a.MOUSE_LEFT_BUTTON:c.preventDefault();break;case a.MOUSE_RIGHT_BUTTON:c.preventDefault(),this._handleRightClick(c)}}},{key:"_getRowColIndex",value:function(a){var c={row:-1,col:-1},b=a.tagName;"TD"===b?(c.col=Number(a.getAttribute("data-col")),
c.row=Number(a.getAttribute("data-row"))):"TH"===b&&(a.getAttribute("data-col-index")?c.col=Number(a.getAttribute("data-col-index")):c.row=Number(a.getAttribute("data-row-index")));return c}},{key:"_setScrollAffordanceWidth",value:function(a){0<a?this.myOuterWrapper.classList.add("mw-table-has-vertical-scroll"):this.myOuterWrapper.classList.remove("mw-table-has-vertical-scroll")}},{key:"componentDidUpdate",value:function(){this.state.eventCallback(e.internal.FORCE_LAYOUT,{noRender:!0})}},{key:"componentDidMount",
value:function(){this.props.eventCallback(e.internal.NODE_SUBSCRIBE,{subscriberFn:this._setScrollAffordanceWidth.bind(this),subscribeTo:d.publisher.SCROLL_BAR_WIDTH,subscriberId:d.subscriber.TABLE_HAS_VERT_SCROLL,noRender:!0})}},{key:"render",value:function(){var a=this,b=this.state,h=b.header,d=b.scrollComponent,e=b.dataTestId,f=b.wrapperClass,b=b.tooltip;return c.createElement("div",{className:"mw-table-component mw-table-scoped"},c.createElement("div",{ref:function(c){return a.myOuterWrapper=c},
tabIndex:"0","data-test-id":e,className:f||"mw-table-outer-wrapper-blurred",onKeyDown:this._handleKeyDown,onFocus:this._handleFocus,onBlur:this._handleBlur,onDoubleClick:this._handleDoubleClick,onContextMenu:this._handleContextMenu},h,d,b))}}]);return k}(c.Component)})},"mw-table/enums/MouseCodeEnum":function(){define([],function(){return Object.freeze({MOUSE_LEFT_BUTTON:0,MOUSE_MIDDLE_BUTTON:1,MOUSE_RIGHT_BUTTON:2})})},"mw-table/view/ColResizeAffordance":function(){function g(e,d){if("function"!==
typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,
b);a&&e(d,a);return d}}();define(["../enums/DataTestEnum","../enums/EventEnum","react/react.min"],function(e,d,b){return function(a){function c(){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var a;a=(c.__proto__||Object.getPrototypeOf(c)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");a=a&&("object"===typeof a||"function"===typeof a)?a:this;a._handleMouseDown=a._handleMouseDown.bind(a);a._handleMouseUp=
a._handleMouseUp.bind(a);a._handleMouseMove=a._handleMouseMove.bind(a);a.state={computedWidth:null};return a}g(c,a);f(c,[{key:"shouldComponentUpdate",value:function(a,c){return c.computedWidth!==this.state.computedWidth||!0===a.widthChanged}},{key:"_getComputedWidth",value:function(){return this.affordance.parentNode.parentNode.offsetWidth}},{key:"_handleMouseDown",value:function(a){a.preventDefault();a.target.hasAttribute("data-affordance-index")&&(document.addEventListener("mouseup",this._handleMouseUp),
document.addEventListener("mousemove",this._handleMouseMove),this.setState({column:Number(a.target.getAttribute("data-col-index")),computedWidth:this._getComputedWidth(),startPos:a.clientX}))}},{key:"_handleMouseUp",value:function(a){document.removeEventListener("mouseup",this._handleMouseUp);document.removeEventListener("mousemove",this._handleMouseMove);this._handleMouseMove(a)}},{key:"_handleMouseMove",value:function(a){var c=window.getComputedStyle(this.affordance.parentNode).width;c.substring(0,
c.length-2);this.props.eventCallback(d.internal.COL_RESIZE,{width:Math.max(this.props.colWidth,a.clientX-this.state.startPos+this.state.computedWidth),column:this.props.colIndex})}},{key:"_reportComputedWidth",value:function(){this.props.eventCallback&&this.props.eventCallback(d.internal.COL_HEADER_MOUNT,{width:this._getComputedWidth(),column:this.props.colIndex,noRender:!0})}},{key:"componentDidUpdate",value:function(){this._reportComputedWidth()}},{key:"componentDidMount",value:function(){this._reportComputedWidth()}},
{key:"render",value:function(){var a=this;return b.createElement("div",{ref:function(c){return a.affordance=c},"data-test-id":e.RESIZE_AFFORDANCE,"data-affordance-index":this.props.colIndex,onMouseDown:this._handleMouseDown,className:"mw-table-resize-affordance"})}}]);return c}(b.Component)})},"mw-table/view/SortAffordance":function(){function g(e,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);e.prototype=Object.create(d&&
d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["mw-tabular-data-model/sort/Enum","../enums/EventEnum","react/react.min"],function(e,d,b){return function(a){function c(){if(!(this instanceof
c))throw new TypeError("Cannot call a class as a function");var a;a=(c.__proto__||Object.getPrototypeOf(c)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");a=a&&("object"===typeof a||"function"===typeof a)?a:this;a._handleClick=a._handleClick.bind(a);return a}g(c,a);f(c,[{key:"shouldComponentUpdate",value:function(a){return a.sorted!==this.props.sorted}},{key:"_handleClick",value:function(a){a.stopPropagation();a=e.order.ASC;this.props.sorted===
a&&(a=e.order.DESC);this.props.eventCallback(d.internal.SORT_AFFORDANCE_CLICKED,{order:a,type:this.props.sortType,column:this.props.colIndex})}},{key:"render",value:function(){var a=this.props;return b.createElement("div",{"data-affordance-index":a.colIndex,"data-sorted":a.sorted,onClick:this._handleClick,className:"mwTableSortAffordance"})}}]);return c}(b.Component)})},"mw-table/view/RowHeader":function(){function g(e,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+
typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["../enums/EventEnum","../enums/StateEnum","react/react.min"],
function(e,d,b){return function(a){function c(){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var a=(c.__proto__||Object.getPrototypeOf(c)).apply(this,arguments);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&("object"===typeof a||"function"===typeof a)?a:this}g(c,a);f(c,[{key:"_publishMaxWidth",value:function(){var a=this,c=this.props.rowHeight;return function(){c=Math.max(c,a.rowHeader.offsetWidth);a.rowHeader.style.minWidth=
c+"px";return c}}},{key:"componentDidMount",value:function(){this.props.eventCallback(e.internal.NODE_PUBLISH,{publisherFn:this._publishMaxWidth().bind(this),publisherId:d.publisher.ROW_HEADER,noRender:!0})}},{key:"render",value:function(){var a=this,c=this.props,d=c.children,e=c.scrollPos,c=c.rowHeaderHeight,f={},g={};"number"===typeof e&&(f={height:c},g={transform:"translateY("+e+"px)",WebkitTransform:"translateY("+e+"px)"});return b.createElement("table",{className:"mw-table-row-header",ref:function(c){return a.rowHeader=
c},"data-test-id":"mw-table-row-header",style:f},b.createElement("tbody",{className:"mw-table-tbody-row-header",style:g},d))}}]);return c}(b.Component)})},"mw-table/view/RowHeaderCell":function(){function g(d,b){if("function"!==typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);d.prototype=Object.create(b&&b.prototype,{constructor:{value:d,enumerable:!1,writable:!0,configurable:!0}});b&&(Object.setPrototypeOf?Object.setPrototypeOf(d,b):d.__proto__=
b)}var f="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(d){return typeof d}:function(d){return d&&"function"===typeof Symbol&&d.constructor===Symbol&&d!==Symbol.prototype?"symbol":typeof d},e=function(){function d(b,a){for(var c=0;c<a.length;c++){var h=a[c];h.enumerable=h.enumerable||!1;h.configurable=!0;"value"in h&&(h.writable=!0);Object.defineProperty(b,h.key,h)}}return function(b,a,c){a&&d(b.prototype,a);c&&d(b,c);return b}}();define(["../enums/DefaultsEnum","../enums/EventEnum",
"../enums/StateEnum","../enums/DataTestEnum","react/react.min"],function(d,b,a,c,h){return function(d){function l(){if(!(this instanceof l))throw new TypeError("Cannot call a class as a function");var a;a=(l.__proto__||Object.getPrototypeOf(l)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");a=a&&("object"===typeof a||"function"===typeof a)?a:this;a.state={mousedown:!1};a._handleMouseEnter=a._handleMouseEnter.bind(a);a._handleMouseDown=a._handleMouseDown.bind(a);
a._handleMouseUp=a._handleMouseUp.bind(a);a._removeDataTitle=a._removeDataTitle.bind(a);return a}g(l,d);e(l,[{key:"shouldComponentUpdate",value:function(a,c){return(this.props.metadata.value||{}).label!==(a.metadata.value||{}).label||this.props.rowHeight!==a.rowHeight}},{key:"_removeDataTitle",value:function(){this.labelRef.removeAttribute("data-title")}},{key:"_handleMouseEnter",value:function(c){var h=this,d=this.labelRef,e=this.props.rowIndex;d.offsetWidth<d.scrollWidth&&this.props.eventCallback(b.internal.NODE_NOTIFY,
{publisherFn:function(){return{node:d.parentNode,id:"rowheader"+e,content:h._label}},publisherId:a.publisher.CELL_ENTER,noRender:!0})}},{key:"_handleMouseDown",value:function(){this._removeDataTitle();document.addEventListener("mouseup",this._handleMouseUp);this.setState({mousedown:!0})}},{key:"_handleMouseUp",value:function(){document.removeEventListener("mouseup",this._handleMouseUp);this.setState({mousedown:!1})}},{key:"render",value:function(){var a=this,b=this.props,d=b.rowIndex,e=b.rowHeight,
b=b.metadata,b=void 0===b?{value:{}}:b,k=b.value||{},l=f(k.label),g="",u={};e&&(u={minHeight:e+"px",maxHeight:e+"px"});if("string"===l||"number"===l)g=" "+k.label;this._label=e=isNaN(d)?g:Number(d)+1+g;k=["mw-table-row-header-label"];k.push(b.classList);return h.createElement("tr",{className:"mw-table-flex-dynamic-item"},h.createElement("th",{style:u,onMouseDown:this._handleMouseDown,"data-row-index":d,className:"mw-table-row-header-cell mw-table-flex-container"},h.createElement("div",{ref:function(c){return a.labelRef=
c},"data-test-id":c.ROW_HEADER_LABEL,onMouseEnter:this._handleMouseEnter,className:k.join(" ")},e)))}}]);return l}(h.Component)})},"mw-table/view/HeaderMenuAffordance":function(){function g(e,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}var f=
function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["../enums/EventEnum","react/react.min"],function(e,d){return function(b){function a(){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");var c;c=(a.__proto__||Object.getPrototypeOf(a)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
c=c&&("object"===typeof c||"function"===typeof c)?c:this;c._handleClick=c._handleClick.bind(c);return c}g(a,b);f(a,[{key:"shouldComponentUpdate",value:function(a){return a.sorted!==this.props.sorted}},{key:"_handleClick",value:function(a){a=this.menuRef.getBoundingClientRect();this.props.eventCallback(e.internal.HEADER_CLICKED,{columnIndex:this.props.colIndex,bottomRect:window.pageYOffset+a.bottom,leftRect:window.pageXOffset+a.left,noRender:!0})}},{key:"render",value:function(){var a=this,b=this.props;
return d.createElement("div",{"data-affordance-index":b.colIndex,ref:function(b){return a.menuRef=b},"data-sorted":b.sorted,onClick:this._handleClick,className:"mwTableHeaderMenuAffordance"})}}]);return a}(d.Component)})},"mw-table/view/Tooltip":function(){function g(e,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});
d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,d):e.__proto__=d)}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["../enums/EventEnum","../enums/StateEnum","../enums/DefaultsEnum","react/react.min"],function(e,d,b,a){return function(c){function h(){if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");
var a=(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return a&&("object"===typeof a||"function"===typeof a)?a:this}g(h,c);f(h,[{key:"_dismissTooltip",value:function(a){this.props.eventCallback(e.internal.NODE_NOTIFY,{publisherFn:function(){return!0},publisherId:d.publisher.TOOLTIP_DISMISS+a.id,noRender:!0})}},{key:"_addListeners",value:function(a){function c(){b.removeEventListener("mouseleave",
c);b.removeEventListener("wheel",c);b.removeEventListener("click",c);d._dismissTooltip({node:b,id:h})}var b=a.node,h=a.id,d=this;b.addEventListener("wheel",c);b.addEventListener("click",c);b.addEventListener("mouseleave",c);return c}},{key:"_getTipData",value:function(a){var c=a.node,b=a.content;a=a.id;var h=c.getBoundingClientRect(),d=window.getComputedStyle(c);return{id:a,node:c,top:h.top,left:h.left+1,width:h.width,backgroundColor:d.backgroundColor||"rgb(255, 255, 255)",content:b}}},{key:"_unsetPosition",
value:function(){this.myTooltip.removeAttribute("style");this.props.eventCallback(e.internal.NODE_UNSUBSCRIBE,{subscriberId:d.subscriber.TOOLTIP_LEAVE,noRender:!0})}},{key:"_subscribeToDismissal",value:function(a){var c=a.id,c=void 0===c?"":c;a=this._addListeners({id:c,node:a.node});this.props.eventCallback(e.internal.NODE_SUBSCRIBE,{subscriberFn:this._unsetPosition.bind(this),subscriberId:d.subscriber.TOOLTIP_LEAVE,subscribeTo:d.publisher.TOOLTIP_DISMISS+c,noRender:!0});this.props.eventCallback(e.internal.NODE_SUBSCRIBE,
{subscriberFn:a,subscriberId:d.subscriber.TOOLTIP_GLOBAL_LEAVE,subscribeTo:d.publisher.TOOLTIP_DISMISS,noRender:!0})}},{key:"_setPosition",value:function(a){this.myTooltip.style.top=a.top+"px";this.myTooltip.style.visibility="visible";this.myTooltip.firstChild.style.maxWidth=Math.max(b.dimensions.TOOLTIP_MIN_WIDTH,a.width)+"px";this.myTooltip.firstChild.style.backgroundColor=a.backgroundColor;this.myTooltip.firstChild.textContent=a.content;a=a.left+Math.min(0,document.documentElement.clientWidth-
(a.left+this.myTooltip.clientWidth));this.myTooltip.style.left=Math.max(0,a)+"px"}},{key:"componentDidMount",value:function(){var a=this;this.props.eventCallback(e.internal.NODE_SUBSCRIBE,{subscriberFn:function(c){c=a._getTipData(c);0<c.content.length&&(a._setPosition(c),a._subscribeToDismissal(c))},subscriberId:d.subscriber.TOOLTIP_ENTER,subscribeTo:d.publisher.CELL_ENTER,noRender:!0})}},{key:"render",value:function(){var c=this;return a.createElement("div",{className:"mw-table-tooltip-wrapper",
ref:function(a){return c.myTooltip=a}},a.createElement("div",{"data-test-id":"mw-table-tooltip",className:"mw-table-tooltip"}))}}]);return h}(a.Component)})},"mw-table/lifecycle/IncomingDataUpdates":function(){var g=function(){return function(e,d){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){var b=[],a=!0,c=!1,h=void 0;try{for(var f=e[Symbol.iterator](),l;!(a=(l=f.next()).done)&&!(b.push(l.value),d&&b.length===d);a=!0);}catch(g){c=!0,h=g}finally{try{if(!a&&f["return"])f["return"]()}finally{if(c)throw h;
}}return b}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["../enums/StateEnum"],function(e){return function(){function d(b,a,c){if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");this._viewModel=
b;this._renderer=a;this._build=c;b.on("dataSizeChanged",this._dataSizeChanged.bind(this));b.on("viewDataChanged",this._viewDataChanged.bind(this))}f(d,[{key:"_removeDirtyStates",value:function(){var b=this._viewModel.getStateByKey(e.SORTED);b&&b.rangeList&&(this._viewModel.deleteColumnMetaData(e.SORTED,b.rangeList[0].columns.start),this._viewModel.deleteState(e.SORTED))}},{key:"_dataSizeChanged",value:function(){this._removeDirtyStates();this._renderer.resize()}},{key:"_viewDataChanged",value:function(b){this.buffEnd=
this._viewModel.viewBuffer.rangeList[0].rows.end;this._build.buildDataComponents(b);this._triggerRender()}},{key:"_triggerRender",value:function(){var b=this._build.buildTable(),b=g(b,2);this._renderer.render(b[0],b[1])}}]);return d}()})},"mw-table/lifecycle/Render":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,
d);b&&f(e,b);return e}}();define(["react/react-dom.min"],function(f){return function(){function e(d){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this._container=document.createElement("div");this._container.style.height="100%";this._container.style.width="100%";this._table=d}g(e,[{key:"mount",value:function(){this._tableComponent=f.render(this._table,this._container);this.resize();return this._tableComponent}},{key:"render",value:function(d,b){this._tableComponent&&
this._tableComponent.setState({scrollComponent:d,header:b})}},{key:"resize",value:function(){this._tableComponent._handleResize()}},{key:"unmount",value:function(){f.unmountComponentAtNode(this._container);this._container.parentNode&&this._container.parentNode.removeChild(this._container);this._tableComponent=this._container=null}},{key:"domNode",get:function(){return this._container}}]);return e}()})},"mw-table/lifecycle/InteractionEvents":function(){var g=function(){function f(e,d){for(var b=0;b<
d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["../utils/Throttle","../view/TableUtils","../enums/StateEnum"],function(f,e,d){var b=f(e.renderUpdate,1E3/60);return function(){function a(c,b,e){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");this._viewModel=c;this._adaptorList=b;this._viewPortList=e;this._triggerRender=
this._handlingUserInteraction=!1;this._handleMetaDataUpdate=this._handleMetaDataUpdate.bind(this);this._handleMetaDataFlags=this._handleMetaDataFlags.bind(this);this.eventCallback=this.eventCallback.bind(this);c.on(d.SELECTED,this._handleMetaDataUpdate);c.on(d.FOCUSED,this._handleMetaDataUpdate);c.on(d.SORTED,this._handleMetaDataUpdate);c.on(d.EDIT_STATE,this._handleMetaDataUpdate);c.on(d.COLUMN_RESIZED,this._handleMetaDataFlags);c.on(d.COLUMN_CONFIG,this._handleMetaDataFlags)}g(a,[{key:"_handleMetaDataFlags",
value:function(){var a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};!0===a.value&&this._handleMetaDataUpdate(a)}},{key:"_handleMetaDataUpdate",value:function(){this._handlingUserInteraction?this._triggerRender=!0:b(this._viewModel,this._viewPortList[0].getBufferedViewPort())}},{key:"eventCallback",value:function(a,h){h=h||{};this._handlingUserInteraction=!0;this._adaptorList.handleEvent(a,{dataSize:this._viewModel.dataSize,viewPort:this._viewModel.viewPort,event:h});var d=this._viewModel.getStateByKey("scrollPositionChanged")||
{value:!1};this._triggerRender&&!d.value&&b(this._viewModel,this._viewPortList[0].getBufferedViewPort());this._triggerRender=!1;this._viewModel.setState("scrollPositionChanged",!1);this._handlingUserInteraction=!1}}]);return a}()})},"mw-table/parsing/headers/ColumnHeaderState":function(){var g=function(){return function(e,d){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){var b=[],a=!0,c=!1,h=void 0;try{for(var f=e[Symbol.iterator](),l;!(a=(l=f.next()).done)&&!(b.push(l.value),d&&b.length===
d);a=!0);}catch(g){c=!0,h=g}finally{try{if(!a&&f["return"])f["return"]()}finally{if(c)throw h;}}return b}throw new TypeError("Invalid attempt to destructure non-iterable instance");}}(),f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["../../functional/FunctionalUtils","../../utils/rangeInterface",
"./PureColumnUtils"],function(e,d,b){return function(){function a(c){var h=c.columnModel,h=void 0===h?{}:h;c=c.viewModel;c=void 0===c?{}:c;if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");this._viewModel=c;this._headers=e.alt(b.initializeConfiguredHeaders,function(){return[]},{columnConfig:h.columnConfig});h=b.validateColPct(this._headers);h=g(h,2);this._setAutoFilledColumn(h[1],h[0]);c.setColumnHeaders(this._headers)}f(a,[{key:"_setAutoFilledColumn",value:function(){var a=
0<arguments.length&&void 0!==arguments[0]?arguments[0]:-1,b=arguments[1];-1<a&&(this._headers[a].width.value+=b)}}]);return a}()})},"mw-table/viewmodel/ViewModel":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["./_LinkedList","./_DataMapper","./_RankMetaData","mw-tabular-data-model/rangeUtil"],
function(f,e,d,b){var a=function(a,b){b.eventName=a;return b};return function(){function c(b){var k=this;if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");this._stateCategoryIndex={};this._stateRangeIndex=new f;this._events={};this._columnDataMapper=new e;this._rowDataMapper=new e;this._viewColumnRange=this._dataModel=b;this._rowMetaData=new d({rankType:"row",dataViewMapper:this._rowDataMapper});this._columnMetaData=new d({rankType:"column",dataViewMapper:this._columnDataMapper});
this._ownedListeners=[];this.setColumnHeaders([]);this._dataModel.setBuffer?(this._manageDataModelPaging=this._dataModel.setBuffer.bind(this._dataModel),this._addOwnListeners(this._dataModel.on("bufferDataChanged",function(c,b){k._handlePagedDataChanged(a(c,{pagedData:b}))})),this._addOwnListeners(this._dataModel.on("dataSizeChanged",function(c,b){k._emitDataSizeChanged(a(c,{dataSize:b}))})),this._addOwnListeners(this._dataModel.on("pagedRowMetaDataChanged",function(c,b){k._handlePagedRowMetaDataChanged(a(c,
b))})),this._addOwnListeners(this._dataModel.on("pagedColumnMetaDataChanged",function(c,b){k._handlePagedColumnMetaDataChanged(a(c,b))}))):(this._manageDataModelPaging=this._dataModel.managePaging.bind(this._dataModel),this._addOwnListeners(this._dataModel.on("pagedDataChanged",this._handlePagedDataChanged.bind(this))),this._addOwnListeners(this._dataModel.on("dataSizeChanged",this._emitDataSizeChanged.bind(this))))}g(c,[{key:"_handlePagedRowMetaDataChanged",value:function(a){var c=this.getStateByKey("viewBuffer");
c&&(this._rowMetaData.setRangeList(c.rangeList),this._rowMetaData.setDataMetaData(a.metaData),this._emitViewDataChanged())}},{key:"_handlePagedColumnMetaDataChanged",value:function(a){var c=this.getStateByKey("viewBuffer");c&&(this._columnMetaData.setRangeList(c.rangeList),this._columnMetaData.setDataMetaData(a.metaData),this._emitViewDataChanged())}},{key:"setRowMetaData",value:function(a,c,b){this._rowMetaData.setViewMetaData(a,c,b);this._emitViewDataChanged()}},{key:"deleteRowMetaData",value:function(a,
c){this._rowMetaData.deleteViewMetaData(a,c);this._emitViewDataChanged()}},{key:"setColumnMetaData",value:function(a,c,b){this._columnMetaData.setViewMetaData(a,c,b);this._emitViewDataChanged()}},{key:"deleteColumnMetaData",value:function(a,c){this._columnMetaData.deleteViewMetaData(a,c);this._emitViewDataChanged()}},{key:"_emitDataSizeChanged",value:function(){this._emit("dataSizeChanged",{dataSize:this.dataSize})}},{key:"_handlePagedDataChanged",value:function(a){var c=this.getStateByKey("viewBuffer");
c&&(this._viewData=this._columnDataMapper.modelToViewDataMapping(a.pagedData,c.rangeList),a.columnMetaData&&a.rowMetaData&&(this._rowMetaData.setRangeList(c.rangeList),this._columnMetaData.setRangeList(c.rangeList),this._columnMetaData.setDataMetaData(a.columnMetaData),this._rowMetaData.setDataMetaData(a.rowMetaData)),this._emitViewDataChanged())}},{key:"_emitViewDataChanged",value:function(){var a=this.getStateByKey("viewBuffer");if(a){var c=this._columnMetaData.getUnifiedMetaData(),b=this._rowMetaData.getUnifiedMetaData(),
d=this._columnMetaData.getMetaDataRangeList(),e=this._rowMetaData.getMetaDataRangeList();if(this._viewData&&this._viewData.length===d.length&&this._viewData.length===e.length){for(var f=0;f<this._viewData.length;f+=1){var g=this._viewData[f].range,r=d[f],s=e[f];if(g.columns.start!==r.columns.start||g.columns.end!==r.columns.end||g.rows.start!==s.rows.start||g.rows.end!==s.rows.end)return}this._emit("viewDataChanged",{viewData:this._viewData,columnMetaData:c,rowMetaData:b,rangeList:a.rangeList})}}}},
{key:"sort",value:function(a){for(var c=[],b=0;b<a.length;b+=1){var d=a[b];if(d.columnIndex<this.dataSize.columns.start||d.columnIndex>this.dataSize.columns.end)throw Error("columnIndex is out of bounds");d={columnIndex:this._columnDataMapper.viewToDataIndex(d.columnIndex),order:d.order,compare:d.compare};c.push(d)}this._dataModel.sort(c)}},{key:"setColumnHeaders",value:function(a){this.getStateByKey("viewBuffer");if(!a||0===a.length)this._columnDataMapper.viewColumnIndexToDataIndex=[],this._viewColumnRange=
this._dataModel,a=[b.range().setColumns(0,-1).setRows(0,Infinity)],this.setState("columnHeaders",[],a),this._columnMetaData.setViewHeaders([]),this._emitDataSizeChanged();else{var c=[b.range().setColumns(0,a.length-1).setRows(0,Infinity)];this._viewColumnRange={dataSize:c[0]};this._columnDataMapper.viewColumnIndexToDataIndex=a.map(function(a){return a.dataIndex});this._columnMetaData.setViewHeaders(a);this.setState("columnHeaders",a,c)}}},{key:"getColumnHeaders",value:function(){return this.getStateByKey("columnHeaders").value}},
{key:"setState",value:function(a,c){var b=this,d=2<arguments.length&&void 0!==arguments[2]?arguments[2]:[];if(0<=["all","keys"].indexOf(a))throw Error("The key '"+a+"' is reserved, and cannot be used to setState");var d=d.slice(),e={value:c,rangeList:d,pointerList:[]};this._deleteState(a);this._stateCategoryIndex[a]=e;d.forEach(function(c){c=b._stateRangeIndex.insert(c,a);e.pointerList.push(c)});this._emit(a,this.getStateByKey(a))}},{key:"deleteState",value:function(a){this._deleteState(a);this._emit(a)}},
{key:"_deleteState",value:function(a){var c=this;if(this._stateCategoryIndex[a]){var b=this._stateCategoryIndex[a];delete this._stateCategoryIndex[a];b.pointerList.forEach(function(a){c._stateRangeIndex.remove(a)})}}},{key:"getStateByKey",value:function(a){return(a=this._stateCategoryIndex[a])?{value:a.value,rangeList:a.rangeList.slice()}:null}},{key:"getStateByRangeList",value:function(a){var c=this,d={keys:[]};a.forEach(function(a){c._stateRangeIndex.forEach(function(h){var e=h.key;h=h.value;!d[h]&&
b.doesRangeIntersect(a,e)&&(d[h]=c.getStateByKey(h),d[h].firstMatch=e,d.keys.push(h))})});return d}},{key:"on",value:function(a,c){var b=this;this._events[a]||(this._events[a]=[]);this._events[a].push(c);var d={remove:function(){var e=b._events[a].indexOf(c);b._events[a].splice(e,1);d.remove=function(){return null}}};return d}},{key:"_addOwnListeners",value:function(a){this._ownedListeners.push(a)}},{key:"_removeOwnListeners",value:function(){this._ownedListeners.forEach(function(a){return a.remove()})}},
{key:"destroy",value:function(){this._removeOwnListeners();this._dataModel=null}},{key:"_emit",value:function(a){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},b=this._events.all,d=this._events[a],e={};Object.getOwnPropertyNames(c).forEach(function(a){e[a]=c[a]});e.eventName=a;var f=function(a){a&&a.forEach(function(a){a(e)})};f(d);f(b)}},{key:"_viewColumnRange",set:function(a){this._viewColumnObject=a},get:function(){return this._viewColumnObject.dataSize.columns}},{key:"viewBuffer",
set:function(a){var c=a.size;a=a.rangeList.slice();var b=this._columnDataMapper.viewToModelRangeMapping(a);this.setState("viewBuffer",c,a);this._manageDataModelPaging(b)},get:function(){var a=this.getStateByKey("viewBuffer");return{size:a.value,rangeList:a.rangeList}}},{key:"viewPort",set:function(a){this.setState("viewPort",a.size,a.rangeList)},get:function(){var a=this.getStateByKey("viewPort");return{size:a.value,rangeList:a.rangeList}}},{key:"dataSize",get:function(){var a=b.range(),a=a.setColumns(this._viewColumnRange.start,
this._viewColumnRange.end);return a=a.setRows(this._dataModel.dataSize.rows.start,this._dataModel.dataSize.rows.end)}}]);return c}()})},"mw-table/viewmodel/_LinkedList":function(){function g(e,d){if(!(e instanceof d))throw new TypeError("Cannot call a class as a function");}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);
a&&e(d,a);return d}}();define([],function(){var e=function(){function d(b,a){g(this,d);this._prev=this._next=null;this._value=a;this._key=b}f(d,[{key:"next",get:function(){return this._next},set:function(b){this._next=b}},{key:"prev",get:function(){return this._prev},set:function(b){this._prev=b}},{key:"isLast",get:function(){return null===this._next}},{key:"isFirst",get:function(){return null===this._prev}},{key:"key",get:function(){return this._key}},{key:"value",get:function(){return this._value}}]);
return d}();return function(){function d(){g(this,d);this._root=null}f(d,[{key:"insert",value:function(b,a){var c=new e(b,a);null!==this._root&&(this._root.prev=c,c.next=this._root);return this._root=c}},{key:"find",value:function(b){if(null===this._root)return null;for(var a=this._root;a;){if(a.key===b)return a;a=a.next}return null}},{key:"forEach",value:function(b){if(null!==this._root)for(var a=this._root;a;)b(a),a=a.next}},{key:"removeWithKey",value:function(b){b=this.find(b);this.remove(b)}},
{key:"remove",value:function(b){b&&(b.isFirst?(this._root=b.next,this.root&&!this.root.isLast&&(b.next.prev=null)):b.isLast?b.prev.next=null:(b.prev.next=b.next,b.next.prev=b.prev))}},{key:"root",get:function(){return this._root}}]);return d}()})},"mw-table/viewmodel/_DataMapper":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&
f(e.prototype,d);b&&f(e,b);return e}}();define(["./_Row","mw-tabular-data-model/rangeUtil"],function(f,e){var d=function(a,b){var d=[],e=[];if(0===b.length)e=a.slice(0);else{a.forEach(function(a){if(a.start>=b.length||a.end>=b.length)throw Error("RangeIndex exceeds dataIndexMap size");a=b.slice(a.start,a.end+1);d=d.concat(a)});if(0===d.length)return[];d.sort(function(a,c){return a-c});var f={start:d[0],end:d[0]};e.push(f);for(var g=1;g<d.length;g+=1){var n=d[g];f.end+1===n||f.end===n?f.end=n:(f={start:n,
end:n},e.push(f))}}return e},b=function(a,b){var f=[],l=a.map(function(a){return a.columns}),l=d(l,b);return f=f.concat(l.map(function(b){return e.range().setColumns(b.start,b.end).setRows(a[0].rows.start,a[0].rows.end)}))},a=function(a,h,d){var f=[];b([a],d).forEach(function(a){for(var c=!1,b=0;b<h.length;b+=1)if(e.isRangeInside(a,h[b])){c=!0;f.push(b);break}if(!c)throw Error("Data Range to view range mapping not found");});return f};return function(){function c(){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");
this._viewColumnIndexToDataIndex=[]}g(c,[{key:"viewToModelRangeMapping",value:function(a){var c=this,d=[];e.groupRangeListByRow(a).forEach(function(a){a=b(a,c.viewColumnIndexToDataIndex);d=d.concat(a)});return d}},{key:"modelToViewDataMapping",value:function(b,d){var e=this,f=[],g=b.map(function(a){return a.range});d.forEach(function(d,k){var r=void 0,r=a(d,g,e.viewColumnIndexToDataIndex);r.sort(function(a,c){return b[a].range.columns.start-b[c].range.columns.start});var s=[];f[k]=function(a){if(a<
s.length)return s[a];throw Error("No Data Found for rowIndex: "+a);};f[k].range=d;for(var t=d.rows.start;t<=d.rows.end;t+=1){var u=c._createRow(t,r,b,e.viewColumnIndexToDataIndex);s[t]=u}});return f}},{key:"viewToDataIndex",value:function(a){var c=this.viewColumnIndexToDataIndex;return 0<c.length?c[a]:a}},{key:"viewColumnIndexToDataIndex",set:function(a){this._viewColumnIndexToDataIndex=a},get:function(){return this._viewColumnIndexToDataIndex}}],[{key:"_createRow",value:function(a,c,b,d){c=c.map(function(c){c=
b[c];return{start:c.range.columns.start,end:c.range.columns.end,cells:c[a]}});return f(c,d)}}]);return c}()})},"mw-table/viewmodel/_Row":function(){define([],function(){return function(g,f){if(0>g.length)throw Error("No rowData Present");var e=function b(a){var c=void 0,c=0===f.length?a:f[a],h=b._lastAccessRowDataIndex;do{if(c>=g[h].start&&c<=g[h].end)return{value:g[h].cells[c],isEqual:function(a){return a.value===this.value}};h+=1;h%=g.length}while(h!==b._lastAccessRowDataIndex);throw Error("No Data Found for cellIndex: "+
a);};e._lastAccessRowDataIndex=0;e._rowData=g;e._dataIndexMap=f;e.isEqual=function(b){if(b._rowData.length!==g.length||f!==b._dataIndexMap)return!1;for(b=0;b<=g.length;b+=1)if(e._rowData[b].data!==g[b].data)return!1;return!0};return e}})},"mw-table/viewmodel/_RankMetaData":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,
d);b&&f(e,b);return e}}();define([],function(){return function(){function f(e){if(!(this instanceof f))throw new TypeError("Cannot call a class as a function");this._flatRangeList=[];this._headerMetaData=[];this._dataMetaData=[];this._viewMetaData=[];this._rankType=e.rankType||"row";"row"===this._rankType?(this._flattenRangeDimension=function(d){return d.setColumns(0,0)},this._flattenData=function(d,b,a){return d[b](a)(0)}):"column"===this._rankType&&(this._flattenRangeDimension=function(d){return d.setRows(0,
0)},this._flattenData=function(d,b,a){return d[b](0)(a)});this._dataViewMapper=e.dataViewMapper}g(f,[{key:"setViewHeaders",value:function(e){this._headerMetaData=e.slice(0)}},{key:"setRangeList",value:function(e){this._flatRangeList=e.map(this._flattenRangeDimension)}},{key:"setViewMetaData",value:function(e,d,b){this._viewMetaData[b]||(this._viewMetaData[b]={version:0,value:{}});this._viewMetaData[b].value[e]=d;this._viewMetaData[b].version+=1}},{key:"deleteViewMetaData",value:function(e,d){this._viewMetaData[d]&&
(delete this._viewMetaData[d].value[e],this._viewMetaData[d].version+=1)}},{key:"setDataMetaData",value:function(e){this._dataMetaData=this._transform(e,this._dataViewMapper,this._flattenData)}},{key:"getMetaDataRangeList",value:function(){return this._flatRangeList}},{key:"getUnifiedMetaData",value:function(){for(var e=this,d=this._dataMetaData,b=this._headerMetaData,a=[],c=function(a,c){Object.keys(a).forEach(function(b){c[b]=a[b]});return c},h=function(h){a.push(function(a){var f=d[h](a).value,
f=Object(f),k={},k=c(f,k),f={_dataMetaData:d[h](a),isEqual:function(a){return this._headerMetaData===a._headerMetaData&&this._viewMetaDataVersion===a._viewMetaDataVersion&&this._dataMetaData.isEqual(a._dataMetaData)}};b[a]&&(k=c(b[a],k),f._headerMetaData=b);if(e._viewMetaData[a]){var g=e._viewMetaData[a].value;a=e._viewMetaData[a].version;Object.keys(g).forEach(function(a){k[a]=g[a]});f._viewMetaDataVersion=a}f.value=k;return f})},f=0;f<d.length;f+=1)h(f);return a}},{key:"_transform",value:function(e,
d,b){e=d.modelToViewDataMapping(e,this._flatRangeList);d=[];b=b.bind(this,e);for(var a=0;a<e.length;a+=1){var c=b.bind(this,a);d.push(c)}return d}}]);return f}()})},"mw-table/controllers/edit/EditControllerProxy":function(){function g(e,d){if("function"!==typeof d&&null!==d)throw new TypeError("Super expression must either be null or a function, not "+typeof d);e.prototype=Object.create(d&&d.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}});d&&(Object.setPrototypeOf?Object.setPrototypeOf(e,
d):e.__proto__=d)}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["../../utils/Emitter","../../enums/EventEnum","./EditController","../interactive/InteractiveController"],function(e,d,b,a){return function(c){function h(c){if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");
var d;d=(h.__proto__||Object.getPrototypeOf(h)).call(this);if(!this)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");d=d&&("object"===typeof d||"function"===typeof d)?d:this;c.emitEditCompleted=d.emitEditCompleted.bind(d);d._editController=new b(c);d._interactiveController=new a(c);return d}g(h,c);f(h,[{key:"exposedAPI",value:function(){return{}}},{key:"eventList",value:function(){return[this._editController.eventList(),this._interactiveController.eventList()]}},
{key:"emitEditCompleted",value:function(a){this.emit("editCompleted",a)}},{key:"emits",get:function(){return["editCompleted"]}}]);return h}(e)})},"mw-table/controllers/edit/EditController":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["mw-table/enums/StateEnum","mw-table/enums/KeyCodeEnum",
"mw-tabular-data-model/rangeUtil"],function(f,e,d){return function(){function b(a){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");var c=a.emitEditCompleted,h=a.viewModel;this._dataStore=a.dataStore;this._viewModel=h;this._emitEditCompleted=c;this._validKeys={};for(a=e.BACKSPACE;a<=e.SYM2_END;a++)this._validKeys[a]=this._isValidKeyDownEvent(a)}g(b,[{key:"eventList",value:function(){var a=this;return{tableKeyPress:function(c){return a.setEditorOnKeyPress(c)},editComplete:function(c){return a.editHandler(c)},
enterEditMode:function(c){return a.setEditorOnCell(c)},leaveEditMode:function(c){return a.removeEditorOnCell(c)}}}},{key:"_hasModifierKey",value:function(a){a=a.event;var c=a.meta,b=a.shiftKey,d=a.altKey;return a.ctrlKey||d||c||b}},{key:"editHandler",value:function(a){var c=this;a=a.event;var b=a.value,e=a.row,l=a.column,e=Number(e),g=(this._viewModel.getColumnHeaders()[Number(l)]||{dataIndex:l}).dataIndex;this.removeEditorOnCell();this._viewModel.deleteColumnMetaData(f.SORTED,g);var p=d.range().setRows(e,
e).setColumns(g,g);this._dataStore.getData([p]).then(function(a){c._emitEditCompleted({oldValue:a[0][e][g],newValue:b,viewRange:d.range().setRows(e,e).setColumns(l,l),dataRange:p});c._dataStore.update(p,[[b]])})}},{key:"setEditorOnCell",value:function(a){if(!this._hasModifierKey(a)){var c=a.event;a=c.row;var c=c.column,b=d.range().setRows(a,a).setColumns(c,c),e={};e[a+","+c]=!0;this._viewModel.setState(f.EDIT_STATE,e,[b])}}},{key:"removeEditorOnCell",value:function(){this._viewModel.deleteState(f.EDIT_STATE)}},
{key:"setEditorOnKeyPress",value:function(a){a=a.event;if(!a.ctrlKey&&(!a.altKey&&!(a.meta||a.shiftKey&&a.keyCode===e.SPACE))&&this._validKeys[a.keyCode])if(a=this._viewModel.getStateByKey(f.FOCUSED)||{},a.rangeList&&0<a.rangeList.length){a=a.rangeList[0];var c={};c[a.rows.start+","+a.columns.start]=!0;this._viewModel.setState(f.EDIT_STATE,c,[a])}}},{key:"_isValidKeyDownEvent",value:function(a){a=a||1;return a>=e.NUM_START&&a<=e.NUM_END||a===e.SPACE||a===e.ENTER||a>=e.ALPHA_START&&a<=e.ALPHA_END||
a>=e.NUMPAD_START&&a<=e.NUMPAD_END||a>=e.SYM1_START&&a<=e.SYM1_END||a>=e.SYM2_START&&a<=e.SYM2_END}}]);return b}()})},"mw-table/controllers/interactive/InteractiveController":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["../../enums/EventEnum","../../enums/StateEnum","../../enums/KeyCodeEnum",
"../../view/TableUtils","mw-tabular-data-model/rangeUtil"],function(f,e,d,b,a){return function(){function c(a){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");var b=a.emitEditCompleted,d=a.dataStore;this._viewModel=a.viewModel;this._dataStore=d;this._emitEditCompleted=b}g(c,[{key:"eventList",value:function(){var a={};a[f.internal.INTERACTIVE_CELL_CLICK]=this._handleCellClickEvent.bind(this);a[f.internal.TABLE_KEY_PRESS]=this._handleKeyPressEvent.bind(this);return a}},
{key:"_mapViewColumnsToDataColumns",value:function(a){for(var c={},b=a.columns.start;b<=a.columns.end;b++)c[this._getDataColumn(b)]=b;return c}},{key:"_convertViewRangeToDataRange",value:function(c){var b=void 0,d=this._getDataColumn(c.columns.start),e=this._getDataColumn(c.columns.end),b=Infinity===c.rows.end?this._dataStore.dataSize.rows.end:c.rows.end;return a.range().setRows(c.rows.start,b).setColumns(d,e)}},{key:"_getNewValueIfUnchecked",value:function(a,c){var b=a.handleAction({value:c,shouldUpdate:!0});
return{oldState:b?!1:!0,value:b}}},{key:"_getDataColumn",value:function(a){var c=(this._viewModel.getColumnHeaders()[Number(a)]||{}).dataIndex;if(-1>=c||void 0===c)c=a;return c}},{key:"_getOldValueToToggle",value:function(c,b){for(var d=b.range,e=b.renderer,f=this._convertViewRangeToDataRange(d),d=this._mapViewColumnsToDataColumns(d),g=void 0,q=void 0,r=void 0,s=void 0,s=f.rows.start;s<=f.rows.end;s++)for(r=f.columns.start;r<=f.columns.end;r++)if(this._getNewValueIfUnchecked(e,c[0][s][r]).oldState)return q=
a.range().setRows(s,s).setColumns(r,r),g=e.handleAction({value:c[0][s][r],shouldUpdate:!0,shouldToggle:!0}),r=d[r],s=a.range().setRows(s,s).setColumns(r,r),{value:g,dataRange:q,viewRange:s}}},{key:"_updateDataStore",value:function(a,c,b){this._dataStore.update(a,[[b.newValue]]);this._emitEditCompleted({oldValue:b.oldValue,newValue:b.newValue,viewRange:c,dataRange:a})}},{key:"_updateToggledValues",value:function(a){var c=this,b=a.interactiveRenderer,d=a.newToggledValue,e=this,f=b.renderer;a=this._getViewandDataRange(a);
var g=a.dataRange,r=a.viewRange;a=this._convertViewRangeToDataRange(b.range);this._dataStore.getData([a]).then(function(a){if(d=d||c._getNewValueIfUnchecked(f,a[0][g.rows.start][g.columns.start]).value)(a=e._getOldValueToToggle(a,b))&&c._dataStore.update(a.dataRange,[[a.value.newValue]]),c._updateDataStore(g,r,d)})}},{key:"_getViewandDataRange",value:function(c){var b=c.viewPosition;c=c.viewRange;b&&(c=a.range().setRows(b.row,b.row).setColumns(b.column,b.column));b=this._getDataColumn(c.columns.start);
b=a.range().setRows(c.rows.start,c.rows.start).setColumns(b,b);return{viewRange:c,dataRange:b}}},{key:"_handleCellClickEvent",value:function(a){var c=this._viewModel.getStateByKey("interactiveRenderer")||{};if(c=b.getInteractiveRendererFor(c,a.event.row,a.event.column)){var d={interactiveRenderer:c,viewPosition:{row:a.event.row,column:a.event.column},newToggledValue:a.event};c.renderer.toggle?this._updateToggledValues(d):(c=this._getViewandDataRange(d),this._updateDataStore(c.dataRange,c.viewRange,
a.event))}}},{key:"_handleKeyPressEvent",value:function(a){var c=this;if(a.event.keyCode===d.ENTER||a.event.keyCode===d.SPACE){a=this._viewModel.getStateByKey(e.FOCUSED);var f=this._viewModel.getStateByKey("interactiveRenderer")||{};if(a&&a.rangeList&&0<a.rangeList.length){var g=a.rangeList[0];if(a=b.getInteractiveRendererFor(f,g.rows.start,g.columns.start)){var p=a.renderer;a={interactiveRenderer:a,viewRange:g};var n=this._getViewandDataRange(a).dataRange;p.toggle?this._updateToggledValues(a):this._dataStore.getData([n]).then(function(a){(a=
c._getNewValueIfUnchecked(p,a[0][n.rows.start][n.columns.start]).value)&&c._updateDataStore(n,g,a)})}}}}}]);return c}()})},"mw-tabular-data-model/DataModel":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["./On","./rangeUtil","./impl/_PagedDataModel"],function(f,e,d){return function(){function b(a){if(!(this instanceof
b))throw new TypeError("Cannot call a class as a function");this._on=new f;this._dataStore=a;this._pagedRangeList=[];this._pagedRowMetaDataRangeList=[];this._pagedColumnMetaDataRangeList=[];this._pagedData=new d({getLocalCell:a.getLocalCellData.bind(a)});this._pagedRowMetaData=new d({getLocalCell:function(c,b){return a.getLocalRowMetaData(c)}});this._pagedColumnMetaData=new d({getLocalCell:function(c,b){return a.getLocalColumnMetaData(b)}});this.sort=a.sort.bind(a);this._dataStore.on("dataChanged",
this._reactToNewData.bind(this));this._dataStore.on("pagedRowMetaDataChanged",this._reactToNewRowMetaData.bind(this));this._dataStore.on("pagedColumnMetaDataChanged",this._reactToNewColumnMetaData.bind(this));this._dataStore.on("dataSizeChanged",this._on.emit.bind(this._on))}g(b,[{key:"setBuffer",value:function(a){this._dataStore.setBuffer(a);var c=this._destructureRangesByType(a);a=c.rowRange;var b=c.columnRange,c=this._pagedData.managePaging(c.dataRange).data,d=this._pagedRowMetaData.managePaging(a).data,
e=this._pagedColumnMetaData.managePaging(b).data;this._on.emit("bufferDataChanged",c);this._on.emit("pagedRowMetaDataChanged",{metaData:d,rangeList:a});this._on.emit("pagedColumnMetaDataChanged",{metaData:e,rangeList:b})}},{key:"_reactToNewData",value:function(a,c){var b=this._pagedData.dataArrived(c),d=b.data;b.dataChanged&&this._on.emit("bufferDataChanged",d)}},{key:"_reactToNewRowMetaData",value:function(a,c){var b=c.rangeList,d=this._pagedRowMetaData.dataArrived(b),e=d.data;d.dataChanged&&(b=
this._destructureRangesByType(b).rowRange,this._on.emit("pagedRowMetaDataChanged",{metaData:e,rangeList:b}))}},{key:"_reactToNewColumnMetaData",value:function(a,c){var b=c.rangeList,d=this._pagedColumnMetaData.dataArrived(b),e=d.data;d.dataChanged&&(b=this._destructureRangesByType(b).columnRange,this._on.emit("pagedColumnMetaDataChanged",{metaData:e,rangeList:b}))}},{key:"_destructureRangesByType",value:function(a){return{dataRange:a,rowRange:a.map(function(a){return a.setColumns(0,0)}),columnRange:a.map(function(a){return a.setRows(0,
0)})}}},{key:"on",value:function(a,c){return this._on.on(a,c)}},{key:"dataSize",get:function(){return this._dataStore.dataSize}}]);return b}()})},"mw-tabular-data-model/On":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define([],function(){return function(){function f(){if(!(this instanceof
f))throw new TypeError("Cannot call a class as a function");this._events={}}g(f,[{key:"on",value:function(e,d){var b=this;this._events[e]||(this._events[e]=[]);this._events[e].push(d);var a={remove:function(){var c=b._events[e].indexOf(d);b._events[e].splice(c,1);a.remove=function(){return null}}};return a}},{key:"emit",value:function(e){for(var d=arguments.length,b=Array(1<d?d-1:0),a=1;a<d;a++)b[a-1]=arguments[a];(function(a){a&&a.forEach(function(a){a.apply(void 0,[e].concat(b))})})(this._events[e])}}]);
return f}()})},"mw-tabular-data-model/impl/_PagedDataModel":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["../rangeUtil"],function(f){return function(){function e(d){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this._getLocalCell=d.getLocalCell;
this._pagedRangeList=[];this._pagedData=[]}g(e,[{key:"managePaging",value:function(d){var b=this._pagedRangeList;this._pagedRangeList=d;this._reactToNewPageRanges(b,d);return{dataChanged:!1,data:this._pagedData}}},{key:"dataArrived",value:function(d){return{dataChanged:this._reactToNewData(d),data:this._pagedData}}},{key:"_reactToNewPageRanges",value:function(d,b){this._discardOrphanedPagedData(d,b);this._fillInMissingPagedData(b)}},{key:"_discardOrphanedPagedData",value:function(d,b){var a=this;
this._pagedData.length>b.length&&(this._pagedData=this._pagedData.slice(0,b.length));var c=function(a,c,b,d,e){for(;a<b;)e(a),a+=1;for(a=d+1;a<=c;)e(a),a+=1};b.forEach(function(b,e){var f=d[e];f?(c(f.rows.start,f.rows.end,b.rows.start,b.rows.end,function(c){delete a._pagedData[e][c]}),(f.columns.start<b.columns.start||f.columns.end>b.columns.end)&&function(){for(var d=Math.max(b.rows.start,f.rows.start),g=Math.min(b.rows.end,f.rows.end),n=d;n<=g;)c(f.columns.start,f.columns.end,b.columns.start,b.columns.end,
function(c){delete a._pagedData[e][n][c]}),n+=1}()):a._pagedData[e]=[]})}},{key:"_fillInMissingPagedData",value:function(d){var b=this;d.forEach(function(a,c){var d=b._pagedData[c];if(!d.range||!f.isRangeEqual(d.range,a))d.range&&f.isRangeInside(d.range,a)?d.range=a:(d=b._updateCellRange(d,a.rows.start,a.rows.end,a.columns.start,a.columns.end,!d.range||a.columns.start<d.range.columns.start||a.columns.end>d.range.columns.end,!0),d.range=a,b._pagedData[c]=d)})}},{key:"_reactToNewData",value:function(d){var b=
this,a=!1;this._pagedRangeList.forEach(function(c,h){d.forEach(function(d){if(f.doesRangeIntersect(c,d)){var e=b._pagedData[h],g=Math.max(c.rows.start,d.rows.start),p=Math.min(c.rows.end,d.rows.end),n=Math.max(c.columns.start,d.columns.start);d=Math.min(c.columns.end,d.columns.end);e=b._updateCellRange(e,g,p,n,d,!0,!1);b._pagedData[h]=e;a=!0}})});return a}},{key:"_updateCellRange",value:function(d,b,a,c,h,e,f){for(;b<=a;b+=1){var g=d[b];if(e||!g){var p=[];if(g){for(var n=d.range.columns.start;n<c;n+=
1)p[n]=d[b][n];for(n=h+1;n<=d.range.columns.end;n+=1)p[n]=d[b][n]}for(n=c;n<=h;n+=1)if(f&&g&&d.range.columns.start<=n&&d.range.columns.end>=n)p[n]=d[b][n];else{var q=this._getLocalCell(b,n);p[n]=this._shallowCopyIfObject(q)}d[b]=p}}return d}},{key:"_shallowCopyIfObject",value:function(d){if(!(d instanceof Object))return d;var b=Object.getPrototypeOf(d),a=Object.create(b);Object.keys(d).forEach(function(c){a[c]=d[c]});return a}}]);return e}()})},"mw-table/utils/StateMutation":function(){function g(e){if(Array.isArray(e)){for(var d=
0,b=Array(e.length);d<e.length;d++)b[d]=e[d];return b}return Array.from(e)}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define([],function(){return function(){function e(d){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this._vm=d}f(e,[{key:"appendValue",value:function(d,
b){var a=[];return a=Array.isArray(d)?[].concat(g(d),[b]):[b]}},{key:"mutateState",value:function(d,b,a){this._vm.setState(d,b,a)}},{key:"deleteState",value:function(d){this._vm.deleteState(d)}}]);return e}()})},"mw-table/io/DataSize":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["../functional/IOMonad"],
function(f){return function(){function e(d){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this._viewModel=d}g(e,[{key:"numRows",get:function(){var d=this;return function(){return d._viewModel.dataSize.rows.count}}},{key:"numColumns",get:function(){var d=this;return function(){return d._viewModel.dataSize.columns.count}}}]);return e}()})},"mw-table/functional/IOMonad":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=
a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define([],function(){return function(){function f(e){if(!(this instanceof f))throw new TypeError("Cannot call a class as a function");this.map=this.map.bind(this);this.chain=this.chain.bind(this);this.run=this.run.bind(this);if("function"===typeof e)this.effect=e;else throw Error("IO Monad requires a function");}g(f,[{key:"map",value:function(e){var d=
this;return new f(function(){return e(d.effect())})}},{key:"chain",value:function(e){return e(this.effect())}},{key:"run",value:function(){return this.effect()}}],[{key:"of",value:function(e){return new f(function(){return e})}},{key:"from",value:function(e){return new f(e)}}]);return f}()})},"mw-table/io/ViewPortGeom":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,
a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define("../functional/IOMonad ../calc/BufferMath ../functional/FunctionalUtils ../enums/DefaultsEnum ../enums/LogicalSizeEnum ../enums/StateEnum ../parsing/headers/PureColumnUtils mw-tabular-data-model/rangeUtil".split(" "),function(f,e,d,b,a,c,h,k){return function(){function l(b){var d=b.viewModel;b=b.dataSize;if(!(this instanceof l))throw new TypeError("Cannot call a class as a function");this._dataSize=b;this._viewModel=
d;this.getBufferedViewPort=this.getBufferedViewPort.bind(this);this._viewModel.setState(c.TABLE_AFFORDANCE_WIDTH,f.from(function(){return 0}));this._viewModel.setState("headerRow",[]);this._size=new a(this._viewModel)}g(l,[{key:"getFirstVisibleRow",value:function(){return 0}},{key:"getLastVisibleRow",value:function(){return 0}},{key:"getVisibleRowCount",value:function(){return 0}},{key:"getFirstVisibleColumn",value:function(){return 0}},{key:"getLastVisibleColumn",value:function(){return 0}},{key:"getVisibleColumnCount",
value:function(){return 0}},{key:"getFirstBufferedRow",value:function(){return 0}},{key:"getLastBufferedRow",value:function(){return 0}},{key:"getFirstBufferedColumn",value:function(){return 0}},{key:"getLastBufferedColumn",value:function(){return 0}},{key:"_maxColIndex",value:function(){var a=this._viewModel.getColumnHeaders().length-1;return 0>a?this._viewModel.dataSize.columns.end:a}},{key:"getViewPort",value:function(){return k.range().setRows(this.getFirstVisibleRow(),this.getLastVisibleRow()).setColumns(this.getFirstVisibleColumn(),
this.getLastVisibleColumn())}},{key:"getBufferedViewPort",value:function(){var a=this.getFirstBufferedColumn(),c=this.getLastBufferedColumn(),b=this._viewModel.getColumnHeaders().length||this._viewModel.dataSize.columns.count;h.areColumnsNotPaged(b)&&(a=0,c=this._maxColIndex());return k.range().setRows(this.getFirstBufferedRow(),this.getLastBufferedRow()).setColumns(a,c)}},{key:"setScrollTop",value:function(a){}},{key:"getScrollTop",value:function(){return 0}},{key:"getScrollLeft",value:function(){return 0}},
{key:"getWidth",value:function(){return 0}},{key:"setContainer",value:function(a){var h=this;this._viewModel.setState(c.VIEWPORT_CONTAINER,a);var k=d.curry(e.sum)(-1*b.buffers.ROW_OVERSCAN),l=d.curry(e.sum)(-1*b.buffers.COL_OVERSCAN),g=d.curry(e.sum)(b.buffers.ROW_OVERSCAN),s=d.curry(e.sum)(b.buffers.COL_OVERSCAN);f.from(function(){return a});var t=f.from(function(){return a.clientHeight}),u=f.from(function(){return a.clientWidth}),v=f.from(function(){return a.scrollLeft}),w=f.from(function(){return a.scrollTop}),
x=function(){var a=h._viewModel.getColumnHeaders().length;return 0===a?h._viewModel.dataSize.columns.count:a};this.getScrollTop=function(){return w.run()};this.getScrollLeft=function(){return v.run()};this.getWidth=function(){return u.run()};this.getHeight=function(){return t.run()};this.getBoundingRect=function(){return a.getBoundingClientRect()};this._viewModel.setState(c.TABLE_AFFORDANCE_WIDTH,f.from(function(){return a.offsetWidth-a.clientWidth}));var y=d.curry(e.max2)(0),B=function(a){a=a||b.ZERO_WIDTH_COLS;
var c=h._maxColIndex();return Math.max(Math.min(c,a),-1)},D=function(a){a=a||b.ZERO_WIDTH_COLS;var c=x();return Math.max(Math.min(c,a),-1)},E=function(a){return Math.max(e.min2(a,h._dataSize.numRows()-1),-1)},F=function(a){return Math.max(e.min2(a,h._dataSize.numRows()),0)||b.ZERO_HEIGHT_ROWS},I=function(){var a=d.curry(e.calculateFirstVisible)(h._size.ROW_HEIGHT);return w.map(a).run()},L=function(){var a=d.curry(e.calculateFirstVisible)(h._size.COL_WIDTH);return v.map(a).run()};this.getVisibleColumnCount=
function(){var a=d.curry(e.roundedDivision)(h._size.COL_WIDTH);return u.map(a).chain(D)};this.getVisibleRowCount=function(){var a=d.curry(e.roundedDivision)(h._size.ROW_HEIGHT);return t.map(a).chain(F)};var C=d.fork(e.calculateMaxFirstVisible,x,this.getVisibleColumnCount),M=d.fork(e.calcVisible,L,this.getVisibleColumnCount),G=d.fork(e.calculateMaxFirstVisible,this._dataSize.numRows,this.getVisibleRowCount),N=d.fork(e.calcVisible,I,this.getVisibleRowCount);this.getLastVisibleColumn=d.compose(B,M);
this.getLastVisibleRow=d.compose(E,N);this.getFirstVisibleColumn=d.compose(function(a){return Math.min(L(),a)},C);this.getFirstVisibleRow=d.compose(function(a){return Math.min(I(),a)},G);this.getFirstBufferedColumn=d.compose(y,l,this.getFirstVisibleColumn);this.getFirstBufferedRow=d.compose(y,k,this.getFirstVisibleRow);this.getLastBufferedRow=d.compose(E,g,this.getLastVisibleRow);this.getLastBufferedColumn=d.compose(B,s,this.getLastVisibleColumn);this.setScrollRightPx=function(c,b,d){h._viewModel.setState("LastScrollColumn",
b);h._viewModel.setState("LastScrollColumnFn",d);h._viewModel.setState("scrollPositionChanged",Math.ceil(a.scrollLeft)!==c);a.scrollLeft=c};this.setScrollLeftPx=function(c){var b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:!1;h._viewModel.setState("scrollPositionChanged",Math.ceil(a.scrollLeft)!==c);a.scrollLeft=c;var d=a.scrollWidth-a.clientWidth;!b&&c>d&&(h._viewModel.setState("LastScrollColumn",c/h._size.COL_WIDTH),h._viewModel.setState("LastScrollColumnFn",function(){return c}))};this.setScrollTopPx=
function(c){h._viewModel.setState("scrollPositionChanged",Math.ceil(a.scrollTop)!==c);a.scrollTop=c}}}]);return l}()})},"mw-tabular-data-model/DataStore":function(){function g(e){if(Array.isArray(e)){for(var d=0,b=Array(e.length);d<e.length;d++)b[d]=e[d];return b}return Array.from(e)}var f=function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,
b);a&&e(d,a);return d}}();define("./On ./rangeUtil ./sort/_compareFunctions ./sort/Enum ./impl/_filter dojo/Deferred".split(" "),function(e,d,b,a,c,h){var k=function(a){var c=new h;setTimeout(function(){return a(c.resolve,c.reject)},0);this.then=c.promise.then};return function(){function h(a){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!(this instanceof h))throw new TypeError("Cannot call a class as a function");this._on=new e;this._dataSize=d.range();this.replaceAll(a,c);this._filtering=
!1;this._getLocalRowMetaData=function(a){return{}};this._getLocalColumnMetaData=function(a){return{}}}f(h,[{key:"setBuffer",value:function(a){}},{key:"_updateDataSize",value:function(){var a=h._calcTableSize(this._data,this._defaultColumnCount);if(a.rows.count!==this._dataSize.rows.count||a.columns.count!==this._dataSize.columns.count)this._dataSize=a,this._on.emit("dataSizeChanged",a)}},{key:"getLocalCellData",value:function(a,c){var b=this._data[a];return!b?void 0:b[c]}},{key:"getLocalRowMetaData",
value:function(a){var c=this._gatherRowForMetaData(a);(a=this._getLocalRowMetaData(a))||(a={});a.id=this._getId(c);return a}},{key:"getLocalColumnMetaData",value:function(a){return this._getLocalColumnMetaData(a)}},{key:"_emitPagedColumnMetaDataChanged",value:function(a){this._on.emit("pagedColumnMetaDataChanged",{rangeList:a})}},{key:"_emitPagedRowMetaDataChanged",value:function(a){this._on.emit("pagedRowMetaDataChanged",{rangeList:a})}},{key:"getIndex",value:function(a){var c=this;return new k(function(b,
d){for(var h=0;h<c._data.length;h+=1){var e=c._gatherRowForMetaData(h);a.id===c._getId(e)&&b({index:h})}b({index:null})})}},{key:"getData",value:function(a){var c=this,b=a.slice();return new k(function(a,h){var e=[];b.forEach(function(a,b){Infinity===a.columns.end&&(a=a.setColumns(a.columns.start,c.dataSize.columns.end));Infinity===a.rows.end&&(a=a.setRows(a.rows.start,c.dataSize.rows.end));if(d.isRangeInside(c.dataSize,a)){var f=c._getCellBlock(a.rows.start,a.rows.end,a.columns.start,a.columns.end);
f.range=a;e[b]=f}else h(Error("Range exceeds data size"))});a(e)})}},{key:"_gatherRowForMetaData",value:function(a){for(var c=[],b=0;b<this._metaDataColumns.length;b+=1){var d=this._metaDataColumns[b];c[d]=this.getLocalCellData(a,d)}return c}},{key:"_getCellBlock",value:function(a,c,b,d){for(var h=[];a<=c;a+=1){for(var e=[],f=b;f<=d;f+=1)e[f]=this.getLocalCellData(a,f);h[a]=e}return h}},{key:"insert",value:function(a,c){if(this._filtering)throw Error("Data cannot be inserted in filter mode. Clear filter before inserting data.");
var b=void 0;if(a.rows.start===a.rows.end&&0===a.columns.start&&Infinity===a.columns.end){var h;if(a.rows.start>this._dataSize.rows.count||0>a.rows.start)throw Error("Index "+a.rows.start+" is out of range for insert");for(b=0;b<c.length;b+=1)if(c[b].length!==this._dataSize.columns.count)throw Error("data["+b+"] needs to contain "+(this._dataSize.columns.count+" columns of data for insert"));(h=this._data).splice.apply(h,[a.rows.start,0].concat(g(c)));b=d.range().setRows(a.rows.start,Infinity).setColumns(0,
Infinity)}else if(a.columns.start===a.columns.end&&0===a.rows.start&&Infinity===a.rows.end){if(a.columns.start>this._dataSize.columns.count||0>a.columns.start)throw Error("Index "+a.columns.start+" is out of range for insert");h=null;if(c.length!==this._dataSize.rows.count&&0<this._dataSize.rows.count)throw Error("data needs to contain "+(this._dataSize.rows.count+" rows of data for insert"));for(b=0;b<c.length;b+=1)if(null===h)h=c[b].length;else if(h!==c[b].length)throw Error("The data["+b+"] needs to contain "+
("the same number of columns ("+h+") as the ")+"first row for insert");for(h=0;h<c.length;h+=1)(b=this._data[h])?b.splice.apply(b,[a.columns.start,0].concat(g(c[h]))):this._data[h]=c[h];b=d.range().setRows(0,Infinity).setColumns(a.columns.start,Infinity)}else throw Error("Could not determine insert type for given range");this._updateDataSize();this._dataChanged([b])}},{key:"update",value:function(a,c){if(a.rows.count!==c.length)throw Error("Range rows count "+a.rows.count+" does not match data.length for update");
if(!d.isRangeInside(this.dataSize,a))throw Error("Range exceeds dataSize for update");for(var b=0;b<c.length;b+=1)if(c[b].length!==a.columns.count)throw Error("data["+b+"] needs to contain "+(a.columns.count+" columns of data for update"));for(var b=0,h=a.rows.start;h<=a.rows.end;h+=1){var e=this._data[h];e.splice.apply(e,[a.columns.start,a.columns.count].concat(g(c[b])));b+=1}this._dataChanged([a]);this._filtering&&this.filter(this._filter.getFilterCriteria())}},{key:"delete",value:function(a){if(this._filtering)throw Error("Data cannot be deleted in filter mode. Clear filter before deleting data.");
var c=void 0;if(0===a.columns.start&&Infinity===a.columns.end){if(a.rows.start>=this._dataSize.rows.count||0>a.rows.start)throw Error("Index "+a.rows.start+" is out of range for delete");this._data.splice(a.rows.start,a.rows.count);c=d.range().setRows(a.rows.start,Infinity).setColumns(0,Infinity)}else if(0===a.rows.start&&Infinity===a.rows.end){if(a.columns.start>=this._dataSize.columns.count||0>a.columns.start)throw Error("Index "+a.columns.start+" is out of range for delete");for(c=0;c<this._dataSize.rows.count;c+=
1)this._data[c].splice(a.columns.start,a.columns.count);c=d.range().setRows(0,Infinity).setColumns(a.columns.start,Infinity)}else throw Error("Could not determine delete type for given range");this._updateDataSize();this._dataChanged([c])}},{key:"replaceAll",value:function(a){var c=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};this._data=a||[];this._defaultColumnCount=c.defaultColumnCount;0!==this._defaultColumnCount&&(!(0<this._defaultColumnCount)&&0<this._data.length)&&(this._defaultColumnCount=
this._data[0].length||0);this._metaDataColumns=c.metaDataColumns||this._metaDataColumns||[];if(c.getId){if(0===this._metaDataColumns.length)throw Error("Must specify at least one column to derive the value of getId");this._getId=c.getId}else this._getId||(this._getId=function(){});this._updateDataSize();this._dataChanged([d.range().setRows(0,Infinity).setColumns(0,Infinity)]);this._filtering&&(this._filter.setUnfilteredData(this._data),this._filter.filter())}},{key:"sort",value:function(a){if(a&&
a.length){for(var c=[],b=0;b<a.length;b+=1){var h=a[b];this._validateSortOption(h);c.push(this._generateCompareFunction(h))}a=function(a,b){for(var d=0;d<c.length;d+=1){var h=c[d](a,b);if(0!==h)return h}return 0};this._data.sort(a);this._filtering&&(b=this._filter.getUnfilteredData(),b.sort(a),this._filter.setUnfilteredData(b));this._dataChanged([d.range().setRows(0,Infinity).setColumns(0,Infinity)])}}},{key:"_validateSortOption",value:function(c){if(c.columnIndex<this.dataSize.columns.start||c.columnIndex>
this.dataSize.columns.end)throw Error("columnIndex is out of bounds");if(!a.order[c.order])throw Error("A valid sort order must be specified");if(!a.compare[c.compare]&&!b[c.compare])throw Error("A valid compare type must be specified");}},{key:"_generateCompareFunction",value:function(c){var d=1;c.order===a.order.DESC&&(d=-1);var h=b[c.compare];return function(a,b){return h(a[c.columnIndex],b[c.columnIndex])*d}}},{key:"registerSortType",value:function(c){var d=c.name;c=c.compareFn;if(!d||!("string"===
typeof d&&c&&"function"===typeof c))throw Error("A valid compare type name and comparator function must be specified");if(-1!==d.indexOf("."))throw Error("The name of sort type cannot contain a period.");if(a.compare[d])throw Error(d+" is already a built-in sort type. Please provide a unique name.");b[d]=c;return d}},{key:"_dataChanged",value:function(a){this._on.emit("dataChanged",a)}},{key:"filter",value:function(a){this._filtering&&(this._data=this._filter.getUnfilteredData());this._filtering=
!0;this._filter=new c(a,{data:this._data});this._filter.filter();this._data=this._filter.getFilteredData();this._dataChanged([d.range().setRows(0,Infinity).setColumns(0,Infinity)]);this._updateDataSize();return new k(function(a){setTimeout(a,0)})}},{key:"clearFilter",value:function(){this._filtering&&(this._data=this._filter.getUnfilteredData(),this._dataChanged([d.range().setRows(0,Infinity).setColumns(0,Infinity)]),this._updateDataSize(),this._filtering=!1);return new k(function(a){setTimeout(a,
0)})}},{key:"on",value:function(a,c){return this._on.on(a,c)}},{key:"dataSize",get:function(){return this._dataSize}}],[{key:"_calcTableSize",value:function(a,c){var b=function(a){return a?{start:0,end:a.length-1}:{start:0,end:-1}},h=d.range(),e=b(a),h=h.setRows(e.start,e.end),e=0<h.rows.count?b(a[0]):b({length:c||0});return h=h.setColumns(e.start,e.end)}}]);return h}()})},"mw-tabular-data-model/sort/_compareFunctions":function(){define([],function(){return{NUMERIC:function(g,f){"number"!==typeof g&&
(g=parseFloat(g));"number"!==typeof f&&(f=parseFloat(f));var e=g-f;return!isNaN(e)?e:isNaN(g)&&isNaN(f)?0:isNaN(g)?-1:1},STRING:function(g,f){"string"!==typeof g&&(g=g.toString());"string"!==typeof f&&(f=f.toString());return g<f?-1:g>f?1:0}}})},"mw-tabular-data-model/impl/_filter":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&
f(e.prototype,d);b&&f(e,b);return e}}();define([],function(){return function(){function f(e,d){if(!(this instanceof f))throw new TypeError("Cannot call a class as a function");this._unfilteredData=d.data;this._data=[];this._filterCriteria=e}g(f,[{key:"filter",value:function(){var e=this.getFilterCriteria();this._data=[];for(var d=0;d<this._unfilteredData.length;d+=1)this._isMatch(this._unfilteredData[d],e)&&this._data.push(this._unfilteredData[d])}},{key:"getFilteredData",value:function(){return this._data}},
{key:"getUnfilteredData",value:function(){return this._unfilteredData}},{key:"getFilterCriteria",value:function(){return this._filterCriteria}},{key:"_compareContent",value:function(e,d){return d.test(e)?!0:!1}},{key:"_compareBlank",value:function(e,d){return""===e?!0:!1}},{key:"_escapeRegExp",value:function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$\x26")}},{key:"_isMatch",value:function(e,d){return!this._checkComposite(d)?this._andCriteria(e,[d]):this._compositeCriteria(e,d)}},{key:"_checkComposite",
value:function(e){var d=!1;if(e.and||e.or||e.exclude)d=!0;return d}},{key:"_compositeCriteria",value:function(e,d){var b=!1;d.and?b=this._andCriteria(e,d.and):d.or&&(b=this._orCriteria(e,d.or));d.exclude&&(b=this._excludeCriteria(e,d,b));return b}},{key:"_excludeCriteria",value:function(e,d,b){if(b&&(d.or||d.and)||!d.and&&!d.or)return!this._orCriteria(e,d.exclude,!0)}},{key:"_orCriteria",value:function(e,d){var b=2<arguments.length&&void 0!==arguments[2]?arguments[2]:!1;return 0===d.length&&b?!1:
this._filterRows(e,d,!0)}},{key:"_andCriteria",value:function(e,d){return this._filterRows(e,d,!1)}},{key:"_filterRows",value:function(e,d,b){for(var a=!0,c=0;c<d.length;c+=1)if(this._checkColumn(d[c])?a=this._columnCriteria(e,d[c]):this._checkComposite(d[c])&&(a=this._compositeCriteria(e,d[c])),a===b)return b;return a}},{key:"_columnCriteria",value:function(e,d){var b=d.columnIndex,a=d.value,c=d.field,h=""!==a?this._compareContent:this._compareBlank,a=RegExp(this._escapeRegExp(a),"i"),b=e[b],c=c?
this._getValueToFilter(b,c):b;return h(c,a)?!0:!1}},{key:"_checkColumn",value:function(e){return e.value||""===e.value?!0:!1}},{key:"_getValueToFilter",value:function(e,d){for(var b=e,a=d.split("."),c=0;c<a.length;c+=1)b=b[a[c]];return b}}]);return f}()})},"MW/uiframework/AdvertiseShortcutsDialogManager":function(){function g(f,e,d,b){b=!!b;f.addEventListener(e,d,b);return{remove:function(){f.removeEventListener(e,d,b)}}}define("dijit/registry dojo/_base/declare dojo/keys dojo/on dojo/topic mw-dialogs/ButtonEnum mw-dialogs/Dialogs mw-form/CheckBox mw-keybindings/KeyBindings mw-keybindings/KeyBindingsFactory mw-log/Log dojo/i18n!l10n/nls/AdvertiseShortcutsDialog".split(" "),
function(f,e,d,b,a,c,h,k,l,m,p,n){return e(null,{constructor:function(a){a.actionService?this._actionService=a.actionService:p.error("actionService is required for AdvertiseShortcutsDialogManager.");a.selector?this._selector=a.selector:p.error("selector is required to apply Ctrl + / or Command + / keybinding for opening the shortcuts dialog.");a.dialogContent?this._dialogContent=a.dialogContent:p.error("dialogContent is required.");this._dialogTitle=a.dialogTitle?a.dialogTitle:n.defaultDialogTitle;
this._keyBindings=m.getInstance(this._actionService);a.needCheckboxToNotShowDialogOnStartup&&(this._needCheckboxToNotShowDialogOnStartup=a.needCheckboxToNotShowDialogOnStartup,this._checkbox=new k({text:"Do not show again on startup","class":"confirmationDialogCheckBox"}),a.callback?this._callback=a.callback:p.error("Callback function is required when 'needCheckboxToNotShowDialogOnStartup' property is set to true"),a.hasOwnProperty("preferenceValue")?this.setPreferenceValue(a.preferenceValue):p.error("Preference value is required when 'needCheckboxToNotShowDialogOnStartup' property is set to true"));
this._listeners=[g(document.body,"keydown",this._handleKeyDown.bind(this),!0)];window.PointerEvent?this._listeners.push(g(document.body,"pointerdown",this._handleMouseDown.bind(this),!0)):this._listeners.push(g(document.body,"mousedown",this._handleMouseDown.bind(this),!0));a={id:"advertiseShortcutsDialogAction",enabled:!0,shortcut:[l.Keys.SYSCTRL,l.Keys.FORWARD_SLASH],callback:this._openAdvertiseShortcutsDialog.bind(this)};this._actionService.addAction(a);this._keyBindings.getBinding(a.shortcut).setAction(this._selector,
a.id)},_handleKeyDown:function(a){if(a.keyCode===d.TAB||a.keyCode===d.ALT)if(!this._needCheckboxToNotShowDialogOnStartup||!0===this._needCheckboxToNotShowDialogOnStartup&&!0===this._preferenceValue)this._openAdvertiseShortcutsDialog(),a.preventDefault(),a.stopPropagation();this._removeListeners()},_handleMouseDown:function(){this._removeListeners()},_removeListeners:function(){this._listeners.forEach(function(a){a.remove()})},_openAdvertiseShortcutsDialog:function(){if(!document.body.querySelector(".mwModalDialog")&&
!document.body.querySelector(".dijitDialog")){this._callback&&this._callback("beforeOpen");var a=document.createElement("div");a.appendChild(this._dialogContent);this._checkbox&&(this._checkbox.set("checked",!this._preferenceValue),a.appendChild(document.createElement("br")),a.appendChild(this._checkbox.domNode));this._dialog=h.createDialog({title:this._dialogTitle,dialogType:h.MODAL,closeOnEscape:!0,closable:!0,draggable:!0,buttons:[c.CLOSE],content:a,defaultActionButton:c.CLOSE});this._dialog.addButtonEventListener(c.CLOSE,
this._closeCallback.bind(this),!0);this._callback&&this._callback("opened")}},_closeCallback:function(){this._checkbox&&(this._preferenceValue=!this._checkbox.get("checked"),this._callback&&this._callback("closed",this._preferenceValue))},closeDialog:function(){this._dialog.close()},setPreferenceValue:function(a){this._preferenceValue=a;this._checkbox.set("checked",!this._preferenceValue)}})})},"MOTW/layout/LayoutManager":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/connect dojo/_base/window dojo/dom-class dojo/dom-style dojo/dom-construct dojo/window dijit/_Widget MOTW/layout/BorderManager MOTW/layout/DocumentManager MOTW/layout/MainManager MOTW/layout/SplitManager MOTW/layout/TabManager MOTW/layout/DialogManager MOTW/layout/NonModalDialogManager MOTW/layout/AppWindowManager MOTW/layout/DockableDialogManager mw-log/Log dijit/layout/StackContainer".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w){return g([k],{constructor:function(a){a=a||{};if(!a.layoutStore)throw Error("A layoutStore must be specified");this.layoutStore=a.layoutStore;this.actionService=a.actionService;this.layoutPlugins=a.layoutPlugins;f.isObject(this.layoutPlugins)||(this.nonModalDialogManager=new s,this.layoutPlugins={},this.addPlugin(new p),this.addPlugin(new l),this.addPlugin(new n),this.addPlugin(new q),this.addPlugin(new m(this.actionService)),this.addPlugin(new r),
this.addPlugin(this.nonModalDialogManager),this.addPlugin(new t),this.addPlugin(new u));this.layoutStore.fetch({onComplete:function(a){if(a&&0<a.length)throw Error("The LayoutManager does not handle modules already existing in the store. Please create the LayoutManager before any modules are added.");}});e.connect(this.layoutStore,"onNew",this,this._onNewModule);e.connect(this.layoutStore,"onDelete",this,this._onDeleteModule);e.connect(this.layoutStore,"onSet",this,this._onUpdateModule);c.create("div",
{id:"veFloatingPane"},d.body());var b=this;d.global.onresize=function(){f.hitch(b,b._handleResize())}},postCreate:function(){this.inherited(arguments);b.add(this.domNode,"layout")},addPlugin:function(a){for(var c in a.handles)a.handles.hasOwnProperty(c)&&(this.layoutPlugins[a.handles[c]]=a)},hasPlugin:function(a){return this.layoutPlugins.hasOwnProperty(a)},getPlugin:function(a){if(this.hasPlugin(a))return this.layoutPlugins[a];throw Error("Unknown plugin type: "+a);},layout:function(){this.layoutStore.fetch({query:{parentId:"root"},
onItem:function(a){a.widget.resize&&a.widget.resize();a.widget.layout&&a.widget.layout()}})},_onNewModule:function(a){a.widget||(a.widget=this.getPlugin(a.containerType).createContainer(a));"root"===a.parentId?(a.widget.placeAt(this.domNode,"last"),a.widget.startup&&a.widget.startup()):this._callWithParent(a.parentId,function(c){this.getPlugin(c.containerType).addModule(c,a)})},_onDeleteModule:function(a){"root"!==a.parentId&&this._callWithParent(a.parentId,function(c){this.getPlugin(c.containerType).removeModule(c,
a)});a.containerType&&this.getPlugin(a.containerType).destroyContainer(a)},_onUpdateModule:function(a,c,b,d){if("parentType"===c)throw Error("Changing the parentId is not yet supported.");this._callWithParent(a.parentId,function(h){this.getPlugin(h.containerType).updateModule(h,a,c,b,d)})},_callWithParent:function(a,c,b){b=b||this;this.layoutStore.fetch({query:{id:a},onComplete:function(d){if(1===d.length)d=d[0];else if(1<d.length)v.info("More than 1 module matches id: "+a),d=d[0];else throw Error("Could not find parent module: "+
a);c.apply(b,[d])}})},_handleResize:function(){var c=function(c,b,d){setTimeout(function(){a.set(c,{top:b+"px",left:d+"px"})},0)},b=h.getBox();this.layoutStore.fetch({query:{parentId:"veNonModalDialog"},onItem:function(a){var d=b.w/2-parseInt(a.wrapper.domNode.style.width,10)/2,h=b.h/2-parseInt(a.wrapper.domNode.style.height,10)/2;c(a.wrapper.domNode,h,d)}});this.layoutStore.fetch({query:{parentId:"chNonModalDialog"},onItem:function(d){var h=b.w-a.get(d.wrapper.domNode,"width")-91,e=b.h-a.get(d.wrapper.domNode,
"height")-36;c(d.wrapper.domNode,e,h)}});this.layoutStore.fetch({query:{parentId:"inspectorNonModalDialog"},onItem:function(a){var d=b.w/2-parseInt(a.wrapper.domNode.style.width,10)/2,h=b.h/2-parseInt(a.wrapper.domNode.style.height,10)/2;c(a.wrapper.domNode,h,d)}})},getLayoutState:function(){var a={version:2};["document","border","split","main"].forEach(function(c){var b=this.getPlugin(c);b&&(a[c+"Containers"]=b.getContainerStates())},this);return a},setLayoutState:function(a){a&&2===a.version&&["document",
"border","split","main"].forEach(function(c){var b=c+"Containers";a[b]&&(c=this.getPlugin(c))&&c.setContainerStates(a[b])},this)},setFooter:function(a){var c=this.getPlugin("main");c&&c.setFooter(a)}})})},"MOTW/layout/BorderManager":function(){define(["dojo/_base/declare","MW/layout/BorderContainer","MOTW/layout/_LayoutPlugin","MOTW/layout/_ContainerManagerMixin"],function(g,f,e,d){return g([e,d],{handles:["border"],createContainer:function(b){var a=new f({id:b.id,liveSplitters:!1,gutters:b.gutters||
!1,style:"width:100% !important;height:100% !important;",persist:!1});this.onCreate(b.id,a);return a},destroyContainer:function(b){this.onDestroy(b.id);this.inherited(arguments)}})})},"MOTW/layout/_LayoutPlugin":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom dojo/dom-style dojo/dom-class dojo/_base/window dojo/dom-attr dijit/focus dijit/layout/ContentPane mw-overlay-utils/DisabledOverlay MOTW/layout/Layout".split(" "),function(g,f,e,d,b,a,c,h,k,l,m){var p=g(k,{});return g(null,{addModule:function(a,
c){c.wrapper=this._createWrapper(c);this.addToContainer(a,c)},removeModule:function(a,c){a.widget.removeChild(c.wrapper);c.wrapper.destroyRecursive()},updateModule:function(c,b,d,f,k){"focused"===d&&k?!b.blockFocus&&(b.widget&&h.curNode!==b.widget.domNode&&!e.isDescendant(h.curNode,b.widget.domNode))&&(b.blockFocus=!0,dijit.focus(b.widget.domNode),b.blockFocus=!1):"enabled"===d?!0===k&&b.wrapper.disabledOverlay?b.wrapper.disabledOverlay.hide():(b.wrapper.disabledOverlay||(b.wrapper.disabledOverlay=
new l({target:b.wrapper.domNode}),b.wrapper.disabledOverlay.placeAt(a.body()),b.wrapper.disabledOverlay.startup()),b.wrapper.disabledOverlay.show()):"widget"===d?(b.wrapper.set("content",k),f.hasOwnProperty("destroyRecursive")&&f.destroyRecursive()):b.wrapper.set(d,k)},addToContainer:function(a,c){a.widget.addChild(c.wrapper,c.position);c.widget&&c.widget.startup&&c.widget.startup();c.wrapper&&c.wrapper.startup&&c.wrapper.startup()},createContainer:function(a){throw Error("subclasses need to override this method");
},destroyContainer:function(a){a.widget.destroyRecursive()},_createWrapper:function(a){var c=new p({title:a.title||"",tooltip:a.tooltip,id:a.id+"Wrapper",layoutId:a.layoutId,splitter:a.splitter,collapsible:a.collapsible,minSize:a.minSize,closable:a.closable,style:a.style,region:a.region,"class":a["class"]||"layoutContainer"});this._addWrapperEvents(c,a);c.set("content",a.widget);d.set(c.domNode,{overflow:a.overflow||"hidden"});return c},_addWrapperEvents:function(a,c){c.focusBorder&&b.add(a.domNode,
"focusable");a.onClose=function(){return c.widget.onClose&&c.widget.onClose(arguments)};a.onShow=function(){return c.widget.onShow&&c.widget.onShow(arguments)};a.onFocus=function(){c.focusBorder&&(b.add(a.domNode,"focused"),c.wrapper.set("isSelected",!0));return c.widget.onFocus&&c.widget.onFocus(arguments)};a.onBlur=function(){c.focusBorder&&(b.remove(a.domNode,"focused"),c.wrapper.set("isSelected",!1));return c.widget.onBlur&&c.widget.onBlur(arguments)};a.watch("isSelected",function(d,e,f){f&&!b.contains(a.domNode,
"focused")?(h.focus(c.widget.domNode),b.add(a.domNode,"focused"),m.focusWidget(c.id)):!f&&b.contains(a.domNode,"focused")&&b.remove(a.domNode,"focused")})}})})},"mw-overlay-utils/DisabledOverlay":function(){define(["require","dojo/_base/config","dojo/_base/declare","dojox/widget/Standby"],function(g,f,e,d){return e([d],{image:(f.blankGif||g.toUrl("dojo/resources/blank.gif")).toString(),templateString:'\x3cdiv class\x3d"disabledOverlay"\x3e\x3cdiv style\x3d"display: none; opacity: 0.75; z-index: 9999; position: absolute;" data-dojo-attach-point\x3d"_underlayNode"\x3e\x3c/div\x3e\x3cimg src\x3d"${_blankGif}" style\x3d"opacity: 1; display: none; z-index: -10000; position: absolute; top: 0px; left: 0px;" data-dojo-attach-point\x3d"_imageNode"\x3e\x3cdiv style\x3d"opacity: 0; display: none; z-index: -10000; position: absolute; top: 0px;" data-dojo-attach-point\x3d"_textNode"\x3e\x3c/div\x3e\x3c/div\x3e',
duration:100,_scrollerWidths:function(){return{v:0,h:0}}})})},"dojox/widget/Standby":function(){define("dojo/_base/kernel dojo/_base/declare dojo/_base/array dojo/_base/event dojo/_base/sniff dojo/dom dojo/dom-attr dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/window dojo/_base/window dojo/_base/fx dojo/fx dijit/_Widget dijit/_TemplatedMixin dijit/registry".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t){g.experimental("dojox.widget.Standby");return f("dojox.widget.Standby",[r,s],
{image:require.toUrl("dojox/widget/Standby/images/loading.gif").toString(),imageText:"Please Wait...",text:"Please wait...",centerIndicator:"image",target:"",color:"#C0C0C0",duration:500,zIndex:"auto",opacity:0.75,templateString:'\x3cdiv\x3e\x3cdiv style\x3d"display: none; opacity: 0; z-index: 9999; position: absolute; cursor:wait;" dojoAttachPoint\x3d"_underlayNode"\x3e\x3c/div\x3e\x3cimg src\x3d"${image}" style\x3d"opacity: 0; display: none; z-index: -10000; position: absolute; top: 0px; left: 0px; cursor:wait;" dojoAttachPoint\x3d"_imageNode"\x3e\x3cdiv style\x3d"opacity: 0; display: none; z-index: -10000; position: absolute; top: 0px;" dojoAttachPoint\x3d"_textNode"\x3e\x3c/div\x3e\x3c/div\x3e',
_underlayNode:null,_imageNode:null,_textNode:null,_centerNode:null,_displayed:!1,_resizeCheck:null,_started:!1,_parent:null,startup:function(d){if(!this._started){if("string"===typeof this.target){var e=t.byId(this.target);this.target=e?e.domNode:a.byId(this.target)}this.text&&(this._textNode.innerHTML=this.text);"image"===this.centerIndicator?(this._centerNode=this._imageNode,c.set(this._imageNode,"src",this.image),c.set(this._imageNode,"alt",this.imageText)):this._centerNode=this._textNode;l.set(this._underlayNode,
{display:"none",backgroundColor:this.color});l.set(this._centerNode,"display","none");this.connect(this._underlayNode,"onclick","_ignore");this.domNode.parentNode&&this.domNode.parentNode!=p.body()&&p.body().appendChild(this.domNode);7==b("ie")&&(this._ieFixNode=h.create("div"),l.set(this._ieFixNode,{opacity:"0",zIndex:"-1000",position:"absolute",top:"-1000px"}),p.body().appendChild(this._ieFixNode));this.inherited(arguments)}},show:function(){this._displayed||(this._anim&&(this._anim.stop(),delete this._anim),
this._displayed=!0,this._size(),this._disableOverflow(),this._fadeIn())},hide:function(){if(this._displayed)try{this._anim&&(this._anim.stop(),delete this._anim),this._size()}catch(a){}finally{this._fadeOut(),this._displayed=!1,null!==this._resizeCheck&&(clearInterval(this._resizeCheck),this._resizeCheck=null)}},isVisible:function(){return this._displayed},onShow:function(){},onHide:function(){},uninitialize:function(){this._displayed=!1;this._resizeCheck&&clearInterval(this._resizeCheck);l.set(this._centerNode,
"display","none");l.set(this._underlayNode,"display","none");7==b("ie")&&this._ieFixNode&&(p.body().removeChild(this._ieFixNode),delete this._ieFixNode);this._anim&&(this._anim.stop(),delete this._anim);this._centerNode=this._textNode=this._imageNode=this.target=null;this.inherited(arguments)},_size:function(){if(this._displayed){var a=c.get(p.body(),"dir");a&&(a=a.toLowerCase());var d,h=this._scrollerWidths(),e=this.target,f=l.get(this._centerNode,"display");l.set(this._centerNode,"display","block");
var g=k.position(e,!0);if(e===p.body()||e===p.doc)g=m.getBox(),g.x=g.l,g.y=g.t;var n=k.getMarginBox(this._centerNode);l.set(this._centerNode,"display",f);this._ieFixNode&&(d=-this._ieFixNode.offsetTop/1E3,g.x=Math.floor((g.x+0.9)/d),g.y=Math.floor((g.y+0.9)/d),g.w=Math.floor((g.w+0.9)/d),g.h=Math.floor((g.h+0.9)/d));var q=l.get(e,"zIndex"),r=f=q;if("auto"===this.zIndex)if("auto"!=q)f=parseInt(f,10),r=parseInt(r,10);else{var s=e;if(s&&s!==p.body()&&s!==p.doc){s=e.parentNode;for(d=-1E5;s&&s!==p.body();){if((q=
l.get(s,"zIndex"))&&"auto"!==q)q=parseInt(q,10),d<q&&(d=q,f=q+1,r=q+1);s=s.parentNode}}}else f=parseInt(this.zIndex,10),r=parseInt(this.zIndex,10);l.set(this._centerNode,"zIndex",r);l.set(this._underlayNode,"zIndex",f);if((f=e.parentNode)&&f!==p.body()&&e!==p.body()&&e!==p.doc){s=g.h;r=g.w;e=k.position(f,!0);this._ieFixNode&&(d=-this._ieFixNode.offsetTop/1E3,e.x=Math.floor((e.x+0.9)/d),e.y=Math.floor((e.y+0.9)/d),e.w=Math.floor((e.w+0.9)/d),e.h=Math.floor((e.h+0.9)/d));e.w-=f.scrollHeight>f.clientHeight&&
0<f.clientHeight?h.v:0;e.h-=f.scrollWidth>f.clientWidth&&0<f.clientWidth?h.h:0;"rtl"===a&&(b("opera")?(g.x+=f.scrollHeight>f.clientHeight&&0<f.clientHeight?h.v:0,e.x+=f.scrollHeight>f.clientHeight&&0<f.clientHeight?h.v:0):b("ie")?e.x+=f.scrollHeight>f.clientHeight&&0<f.clientHeight?h.v:0:b("webkit"));e.w<g.w&&(g.w-=e.w);e.h<g.h&&(g.h-=e.h);var t=e.y,C=e.y+e.h,M=g.y,G=g.y+s,a=e.x;d=e.x+e.w;var q=g.x,N=g.x+r;if(G>t&&M<t)g.y=e.y,s-=t-M,g.h=s<e.h?s:g.h-2*(f.scrollWidth>f.clientWidth&&0<f.clientWidth?
h.h:0);else if(M<C&&G>C)g.h=C-M;else if(G<=t||M>=C)g.h=0;if(N>a&&q<a)g.x=e.x,r-=a-q,g.w=r<e.w?r:g.w-2*(f.scrollHeight>f.clientHeight&&0<f.clientHeight?h.w:0);else if(q<d&&N>d)g.w=d-q;else if(N<=a||q>=d)g.w=0}0<g.h&&0<g.w?(l.set(this._underlayNode,{display:"block",width:g.w+"px",height:g.h+"px",top:g.y+"px",left:g.x+"px"}),h=["borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],this._cloneStyles(h),b("ie")||(h="MozBorderRadius MozBorderRadiusTopleft MozBorderRadiusTopright MozBorderRadiusBottomleft MozBorderRadiusBottomright WebkitBorderRadius WebkitBorderTopLeftRadius WebkitBorderTopRightRadius WebkitBorderBottomLeftRadius WebkitBorderBottomRightRadius".split(" "),
this._cloneStyles(h,this)),h=g.h/2-n.h/2,f=g.w/2-n.w/2,g.h>=n.h&&g.w>=n.w?l.set(this._centerNode,{top:h+g.y+"px",left:f+g.x+"px",display:"block"}):l.set(this._centerNode,"display","none")):(l.set(this._underlayNode,"display","none"),l.set(this._centerNode,"display","none"));if(null===this._resizeCheck){var P=this;this._resizeCheck=setInterval(function(){P._size()},100)}}},_cloneStyles:function(a){e.forEach(a,function(a){l.set(this._underlayNode,a,l.get(this.target,a))},this)},_fadeIn:function(){var a=
this,c=n.animateProperty({duration:a.duration,node:a._underlayNode,properties:{opacity:{start:0,end:a.opacity}}}),b=n.animateProperty({duration:a.duration,node:a._centerNode,properties:{opacity:{start:0,end:1}},onEnd:function(){a.onShow();delete a._anim}});this._anim=q.combine([c,b]);this._anim.play()},_fadeOut:function(){var a=this,c=n.animateProperty({duration:a.duration,node:a._underlayNode,properties:{opacity:{start:a.opacity,end:0}},onEnd:function(){l.set(this.node,{display:"none",zIndex:"-1000"})}}),
b=n.animateProperty({duration:a.duration,node:a._centerNode,properties:{opacity:{start:1,end:0}},onEnd:function(){l.set(this.node,{display:"none",zIndex:"-1000"});a.onHide();a._enableOverflow();delete a._anim}});this._anim=q.combine([c,b]);this._anim.play()},_ignore:function(a){a&&d.stop(a)},_scrollerWidths:function(){var a=h.create("div");l.set(a,{position:"absolute",opacity:0,overflow:"hidden",width:"50px",height:"50px",zIndex:"-100",top:"-200px",padding:"0px",margin:"0px"});var c=h.create("div");
l.set(c,{width:"200px",height:"10px"});a.appendChild(c);p.body().appendChild(a);c=k.getContentBox(a);l.set(a,"overflow","scroll");var b=k.getContentBox(a);p.body().removeChild(a);return{v:c.w-b.w,h:c.h-b.h}},_setTextAttr:function(a){this.text=this._textNode.innerHTML=a},_setColorAttr:function(a){l.set(this._underlayNode,"backgroundColor",a);this.color=a},_setImageTextAttr:function(a){c.set(this._imageNode,"alt",a);this.imageText=a},_setImageAttr:function(a){c.set(this._imageNode,"src",a);this.image=
a},_setCenterIndicatorAttr:function(a){this.centerIndicator=a;"image"===a?(this._centerNode=this._imageNode,l.set(this._textNode,"display","none")):(this._centerNode=this._textNode,l.set(this._imageNode,"display","none"))},_setTargetAttr:function(c){if("string"===typeof c){var b=t.byId(c);this._set("target",b?b.domNode:a.byId(c))}},_disableOverflow:function(){if(this.target===p.body()||this.target===p.doc){this._overflowDisabled=!0;var a=p.body();this._oldOverflow=a.style&&a.style.overflow?l.get(a,
"overflow"):"";if(b("ie")&&!b("quirks")){if(a.parentNode&&a.parentNode.style&&a.parentNode.style.overflow)this._oldBodyParentOverflow=a.parentNode.style.overflow;else try{this._oldBodyParentOverflow=l.get(a.parentNode,"overflow")}catch(c){this._oldBodyParentOverflow="scroll"}l.set(a.parentNode,"overflow","hidden")}l.set(a,"overflow","hidden")}},_enableOverflow:function(){if(this._overflowDisabled){delete this._overflowDisabled;var a=p.body();b("ie")&&!b("quirks")&&(a.parentNode.style.overflow=this._oldBodyParentOverflow,
delete this._oldBodyParentOverflow);l.set(a,"overflow",this._oldOverflow);if(b("webkit")){var c=h.create("div",{style:{height:"2px"}});a.appendChild(c);setTimeout(function(){a.removeChild(c)},0)}delete this._oldOverflow}}})})},"MOTW/layout/_ContainerManagerMixin":function(){define(["dojo/_base/declare"],function(g){return g([],{constructor:function(){this._containers={};this._savedStates={}},getContainerStates:function(){var f={},e=this;Object.keys(this._savedStates).forEach(function(d){f[d]=e._savedStates[d]});
Object.keys(this._containers).forEach(function(d){f[d]=e._containers[d].getState()});return f},setContainerStates:function(f){var e=this;Object.keys(f).forEach(function(d){e._containers[d]?e._containers[d].setState(f[d]):e._savedStates[d]=f[d]})},onCreate:function(f,e,d){d&&this._savedStates[f]&&(e.setState(this._savedStates[f]),delete this._savedStates[f]);this._containers[f]=e},onDestroy:function(f,e){this._containers[f]&&(e&&(this._savedStates[f]=this._containers[f].getState()),delete this._containers[f])}})})},
"MOTW/layout/DocumentManager":function(){define("dojo/has dojo/_base/declare dojo/dom-class dojo/dom-geometry MW/layout/DocumentContainer MW/layout/LayoutChildProperty MOTW/layout/_LayoutPlugin MOTW/layout/_ContainerManagerMixin".split(" "),function(g,f,e,d,b,a,c,h){return f([c,h],{handles:["document"],constructor:function(a){this.actionService=a},addToContainer:function(c,b){this.inherited(arguments);!1!==b.active&&b.wrapper.set(a.IS_SELECTED,!0)},createContainer:function(a){if(a.typeInfo&&this.actionService){var c,
d,h;for(c in a.typeInfo)if(d=a.typeInfo[c].plusActions)for(i=0;i<d.length;i++)h=d[i],"string"===typeof h&&(d[i]=this.actionService.getAction(h))}c=new b({animationEnabled:!1,id:a.id,typeInfo:a.typeInfo,groupTabsByType:!0});this.onCreate(a.id,c,!0);return c},_createWrapper:function(a){var c=this.inherited(arguments);c.documentType=a.documentType;c.focusUponShow=a.focusUponShow;c.connect(c,"resize",function(){if(a.onResize)a.onResize(a)});return c},destroyContainer:function(a){this.onDestroy(a.id,!0);
this.inherited(arguments)},updateModule:function(c,b,d,h,e){"active"===d&&!0===e?b.wrapper.set(a.IS_SELECTED,!0):this.inherited(arguments)}})})},"MOTW/layout/MainManager":function(){define(["dojo/_base/declare","MW/layout/MainContainer","MOTW/layout/_LayoutPlugin","MOTW/layout/_ContainerManagerMixin"],function(g,f,e,d){return g([e,d],{handles:["main"],createContainer:function(b){var a=new f({id:b.id,style:"width:100%;height:100%;",selectionManager:{registerContainer:function(){}}});this.footer&&a.setFooter(this.footer);
b.initialState&&a.setState(b.initialState);this.onCreate(b.id,a);return a},destroyContainer:function(b){this.onDestroy(b.id);this.inherited(arguments)},setContainerStates:function(b){f.stateIncludes(b.main,"cfb")&&(f.stateIncludes(b.main,"workspace")&&f.stateIncludes(b.main,"commandWindow"))&&this.inherited(arguments)},setFooter:function(b){this._containers.main&&this._containers.main.setFooter(b);b&&(this.footer=b)}})})},"MOTW/layout/SplitManager":function(){define(["dojo/_base/declare","dojo/_base/lang",
"MW/layout/BorderContainer","MOTW/layout/_LayoutPlugin","MOTW/layout/_ContainerManagerMixin"],function(g,f,e,d,b){return g([d,b],{handles:["split"],createContainer:function(a){var c=new e({id:a.id});this._containers[a.id]=c;this.onCreate(a.id,c);return c},destroyContainer:function(a){this.onDestroy(a.id);this.inherited(arguments)}})})},"MOTW/layout/TabManager":function(){define("dojo/has dojo/_base/declare dojo/_base/connect dojo/dom-class dojo/dom-geometry dijit/focus dijit/layout/TabContainer MOTW/layout/_LayoutPlugin".split(" "),
function(g,f,e,d,b,a,c,h){return f([h],{handles:["tabgroup"],updateModule:function(a,c,h,e,f){"active"===h&&!0===f?(a.widget.selectChild(c.wrapper,!0),g("ie")&&(d.add(c.wrapper.domNode,"repaint"),b.position(c.wrapper.domNode),d.remove(c.wrapper.domNode,"repaint"))):this.inherited(arguments)},_createWrapper:function(a){var c=this.inherited(arguments);c.connect(c,"resize",function(){if(a.onResize)a.onResize(a)});return c},createContainer:function(b){var d=new c({id:b.id,useMenu:!1,style:"width:100%;height:100%;"});
e.connect(d,"selectChild",function(c){b.focusOnTabChildren&&a.focus(c.domNode)});return d}})})},"MOTW/layout/DialogManager":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-style dojo/_base/event dojo/_base/window dojo/keys dojo/on mw-dialog-utils/Dialog MOTW/layout/_LayoutPlugin mw-dialog-utils/DialogDisplayUtilities".split(" "),function(g,f,e,d,b,a,c,h,k,l){return g([k,l],{handles:["dialog"],addToContainer:function(a,c){c.wrapper.show();c.widget.startup()},removeModule:function(a,
c){c.wrapper.destroyRecursive()},createContainer:function(){},destroyContainer:function(){},_createWrapper:function(a){a.dialogClass=a.dialogClass||a["class"];a.refocus=!1;var c=this.createModalDialogWrapper(a);this._addWrapperEvents(c,a);c.onCancel=c.onClose;return c}})})},"MOTW/layout/NonModalDialogManager":function(){define("dojo/_base/declare dojo/_base/connect dojo/_base/lang dojo/window dojo/_base/window dojo/query dojo/dom dojo/dom-construct dojo/dom-geometry dojo/aspect mw-dialog-utils/FloatingPane MOTW/layout/_LayoutPlugin mw-dnd/BoundedMover mw-utils/Utils".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q){return g([p],{handles:["floatingPane"],dialogPositions:{},signals:{},addToContainer:function(a,c){var b=d.getBox(),h=this;c.wrapper.startup();c.wrapper.bringToTop();c.wrapper.show();c.wrapper.set("title",a.title);c.wrapper._moveable.mover=n;c.wrapper.resizable&&(c.wrapper._resizeHandle.constrainMax=!0,c.wrapper._resizeHandle.maxSize=b);"chNonModalDialog"===c.parentId&&(this.signals.chNonModalDialog=l.after(c.wrapper._moveable,"onMoveStop",function(){h._saveCHNonModalDialogPosition(c)}));
"inspectorNonModalDialog"===c.parentId&&(this.signals.inspectorNonModal=l.after(c.wrapper._moveable,"onMoveStop",function(){h._saveInspectorNonModalDialogPosition(c)}));"webDdgNonModalDialog"===c.parentId&&c.wrapper.set("title",c.title);"rteNonModalFindDialog"===c.parentId&&c.wrapper.set("title",c.title)},removeModule:function(a,c){c.wrapper&&(c.wrapper.destroyRecursive(),this.signals.chNonModalDialog&&this.signals.chNonModalDialog.remove(),this.signals.inspectorNonModalDialog&&this.signals.inspectorNonModalDialog.remove())},
createContainer:function(){},destroyContainer:function(){},_createWrapper:function(l){var g,n,p,v;l.parentId&&(p=l.parentId+"floating",g=a(l.parentId));var w=d.getBox();if("veNonModalDialog"===l.parentId)w="top:"+parseInt(w.h/2-200,10)+"px;left:"+parseInt(w.w/2-150,10)+"px;",v=l.style+w,n=function(){f.publish("/nonModalDialogClose")};else if("chNonModalDialog"===l.parentId)this.dialogPositions.chNonModalDialog?(n=w.h<this.dialogPositions.chNonModalDialog.y+this.dialogPositions.chNonModalDialog.h?
w.h-this.dialogPositions.chNonModalDialog.h:this.dialogPositions.chNonModalDialog.y,w=w.w<this.dialogPositions.chNonModalDialog.x+this.dialogPositions.chNonModalDialog.w?w.w-this.dialogPositions.chNonModalDialog.w:this.dialogPositions.chNonModalDialog.x,0>n&&(n=0),0>w&&(w=0),w="top:"+n+"px;left:"+w+"px;"):w="top:"+parseInt(w.h/2-202,10)+"px;left:"+parseInt(w.w/2-153,10)+"px;",v=l.style+w,n=function(){f.publish("/chNonModalDialogClose")};else if("rteNonModalFindDialog"===l.parentId)n=function(){setTimeout(e.hitch(l.widget,
"onClose"),550)};else if("inspectorNonModalDialog"===l.parentId){n=parseInt(w.h/2-300,10);v=parseInt(w.w/2-150,10);var x=600,y=300;this.dialogPositions.inspectorNonModalDialog&&(n=this.dialogPositions.inspectorNonModalDialog.y,v=this.dialogPositions.inspectorNonModalDialog.x,y=Math.max(this.dialogPositions.inspectorNonModalDialog.h,100),x=Math.max(this.dialogPositions.inspectorNonModalDialog.w,100));if(n+y>w.h||v+x>w.w)n=parseInt(w.h/2-300,10),v=parseInt(w.w/2-150,10),x=600,y=300;v=l.style+("top:"+
n+"px;left:"+v+"px;width:"+x+"px;height:"+y+"px;");var B=this;n=function(){l.wrapper&&l.wrapper.domNode&&(B.dialogPositions.inspectorNonModalDialog=k.position(l.wrapper.domNode));setTimeout(e.hitch(l.widget,"onClose"),550)}}else"webDdgNonModalDialog"===l.parentId&&(v=l.style,n=function(){setTimeout(e.hitch(l.widget,"onClose"),550)});c.byId(p)||h.create("div",{id:p},b.body());g.hasOwnProperty("startup")||(g={title:l.title||"",id:"webDdgNonModalDialog"===l.parentId?l.parentId+"_"+q.generateUuid():l.parentId,
resizable:"rteNonModalFindDialog"===l.parentId?!1:!0,dockable:!1,style:v},l["class"]&&(g["class"]=l["class"]),g=new m(g,c.byId(p)),g.duration=500,this._addWrapperEvents(g,l),g.onClose=n,l.widget.close=e.hitch(g,"close"),g.set("content",l.widget));return g},getDialogPositions:function(){return this.dialogPositions},setDialogPositions:function(a){a&&(this.dialogPositions=a)},_saveCHNonModalDialogPosition:function(a){this.dialogPositions.chNonModalDialog=k.position(a.wrapper.domNode)},_saveInspectorNonModalDialogPosition:function(a){this.dialogPositions.inspectorNonModalDialog=
k.position(a.wrapper.domNode)}})})},"MOTW/layout/AppWindowManager":function(){define("dojo/_base/declare dojo/dom-construct dojo/_base/connect dojo/dom-style dojo/_base/window dojo/aspect dojo/keys dijit/focus ./_LayoutPlugin mw-log/Log dojo/i18n!MOTW/l10n/nls/mgg".split(" "),function(g,f,e,d,b,a,c,h,k,l,m){return g([k],{handles:["appWindow"],originalWindow:b.global,addToContainer:function(a,c){c.widget.startup()},removeModule:function(a,c){c.wrapper.close()},updateModule:function(a,c,b,d,h){"softClose"===
b&&h?e.disconnect(c.onBeforeUnload):this.inherited(arguments)},createContainer:function(){},destroyContainer:function(){},_createWrapper:function(a){var c=b.global.open("appWindow.html",a.id,this._parseOptions(a));c.onload=function(){c.document.title=a.title||"MATLAB";a.widget.placeAt(c.document.body);setTimeout(function(){a.wrapper.inset={width:a.wrapper.outerWidth-a.wrapper.innerWidth,height:a.wrapper.outerHeight-a.wrapper.innerHeight}},0);a.focusHandle=h.registerWin(c)};a.oldWidth=d.get(a.widget.domNode,
"width");a.oldHeight=d.get(a.widget.domNode,"height");this._addWidgetResizeListener(c,a);this._addWindowEvents(c,a);return c},_addWidgetResizeListener:function(a,c){e.connect(c.widget,"resize",function(){c.timeout&&clearTimeout(c.timeout);c.timeout=setTimeout(function(){delete c.timeout;var a=d.get(c.widget.domNode,"width"),b=d.get(c.widget.domNode,"height");if(0<a&&0<b){var h=c.wrapper.inset;c.wrapper.resizeTo(a+h.width,b+h.height)}},250)})},_addWindowEvents:function(a,d){var h=this;d.onBeforeUnload=
e.connect(a,"onbeforeunload",function(a){if(this.refreshFlag)return this.refreshFlag=!1,a.returnValue=m.closeGuiConfirmation});e.connect(a,"onunload",function(c){if(a.active){b.setContext(h.originalWindow,h.originalWindow.document);if(d.widget.onClose)d.widget.onClose(arguments);d.focusHandle.remove()}});e.connect(a,"onfocus",function(c){b.setContext(a,a.document);if(d.widget.onFocus)d.widget.onFocus(arguments)});e.connect(a,"onblur",function(a){b.setContext(h.originalWindow,h.originalWindow.document);
if(d.widget.onBlur)d.widget.onBlur(arguments)});e.connect(a,"onkeydown",function(a){var b=a.which||a.keyCode,d=String.fromCharCode(a.keyCode).toUpperCase();this.refreshFlag=b===c.F5||a.ctrlKey&&"R"===d||a.metaKey&&"R"===d?!0:!1})},_parseOptions:function(a){var c=[];a.top&&a.left&&("number"===typeof a.top&&"number"===typeof a.left?(c.push("top\x3d"+a.top),c.push("left\x3d"+a.left)):l.log.error("Top and Left should be numbers"));a.width&&a.height&&("number"===typeof a.width&&"number"===typeof a.height?
(c.push("width\x3d"+a.width),c.push("height\x3d"+a.height)):l.log.error("Width and height should be numbers"));return c.join(",")}})})},"MOTW/layout/DockableDialogManager":function(){define("dojo/_base/declare dojo/_base/connect dojo/_base/lang dojo/window dojo/_base/window dojo/query dojo/dom dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/aspect dijit/registry mw-dialog-utils/FloatingPane MOTW/layout/_LayoutPlugin".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p,n,q){return g([q],{handles:["dockableFloatingPane"],
addToContainer:function(a,c){c.wrapper.startup();!1!==c.active&&!0!==c.minimized&&c.wrapper.bringToTop();c.wrapper.show()},removeModule:function(a,c){c.wrapper&&(c.wrapper.set("content",""),delete c.wrapper.close,c.wrapper.forceClose())},createContainer:function(){},destroyContainer:function(){},updateModule:function(a,c,b,d,h){this.inherited(arguments);"top"===b&&l.set(c.wrapper.domNode,{top:h+"px"});"left"===b&&l.set(c.wrapper.domNode,{left:h+"px"});"active"===b&&(!0===h&&!0!==c.minimized)&&c.wrapper.bringToTop();
"minimized"===b&&(!0===h?c.wrapper.hide(!0):c.wrapper.show());var e=this;c._sizeDirty||(c._sizeDirty=setTimeout(function(){e._updateSize(c.wrapper,c);c._sizeDirty=!1},0))},_createWrapper:function(d){var e,f;d.parentId&&(e=d.parentId+"floating");d.titleHeight=22;f="top:"+d.top+"px;left:"+d.left+"px;";c.byId(e)||h.create("div",{id:e},b.body());var k=a('[data-tag\x3d"motwToolstrip.qab.globalQAGroup.switchWindows"]')[0];e=new n({title:d.title||"",id:d.id,resizable:d.resizable,dockable:!!k,dockTo:k&&p.byNode(k),
autofocus:!1!==d.autofocus,style:f,"class":d["class"]},c.byId(e));e.close=function(){return d.widget.onClose()?this.inherited("close",arguments):!1};this._addListeners(e,d);e.set("content",d.widget);this._updateSize(e,d);return e},_addListeners:function(a,c){a.own(m.after(a._moveable,"onMoveStop",function(){if(c.onMove&&c.wrapper)c.onMove(c);this._naturalState=k.position(a.domNode)}));var b=this;a.own(m.after(a,"resize",function(d){if(!a.minimized){if(d&&a.canvas&&a.containerNode){if(d=k.position(a.canvas),
l.set(a.containerNode,{position:"relative",width:d.w+"px",height:d.h+"px"}),!c._updating&&c.onResize)c.onResize(c)}else b._updateSize(a,c);this._naturalState=k.position(a.domNode)}},!0));a.own(m.after(a,"onMinimize",function(){if(c.onMinimize)c.onMinimize(c)}));a.own(m.after(a,"_onShow",function(){if(c.onWindowShow)c.onWindowShow(c)}));a.own(m.after(a,"onBringToTop",function(){if(c.onBringToTop)c.onBringToTop(c)}))},_updateSize:function(a,c){c._updating=!0;if(c.widget.domNode){var b=k.position(c.widget.domNode);
0!==b.w&&0!==b.h&&(l.set(a.domNode,{width:b.w+"px",height:b.h+c.titleHeight+"px"}),l.set(a.canvas,{width:b.w+"px",height:b.h+"px"}),l.set(a.containerNode,{position:"relative",width:b.w+"px",height:b.h+"px"}));this._naturalState=k.position(a.domNode)}setTimeout(function(){c._updating=!1},0)}})})},"MOTW/layout/LayoutFacade":function(){define("dojo/_base/declare dojo/_base/lang dojo/Deferred dojo/dom-attr dojo/dom-class dijit/focus dijit/layout/ContentPane mw-log/Log mw-overlay-utils/BusyOverlay MW/uiframework/UIContainer MW/uiframework/uicontainer/ChildProperties".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m){return g(null,{_layoutIdToDocumentTypeMap:{editor:"editorFile",liveEditor:"liveCodeFile",figure:"figure",mggDocked:"figure",vEditor2:"variable"},constructor:function(a){this._layoutService=a.layoutService;this._uiContainer=a.uiContainer;this._documentIdToWidgetIdMap={};this.layoutStore=a.layoutService.layoutStore;this._uiContainer&&this._uiContainer.watch(l.SELECTED_CHILD,function(a,c,d){c&&c.domNode&&b.remove(c.domNode,"focused");d&&d.domNode&&b.add(d.domNode,"focused")})},
addWidget:function(c,b,d,h){var f=this;if("mggDocked"===b||"mggFloatingPane"===b)d.busyIndicator=new k,d.busyIndicator.set("target",d.domNode);if("workspace"===c)this._uiContainer.addPanel(d,new m({panelId:c,title:"Workspace",closable:!1,qabControlToActionMap:{}}));else if("editor"===b||"liveEditor"===b||"vEditor2"===b||"mggDocked"===b){"mggDocked"===b&&(d=this._createWrapper(d));this._documentIdToWidgetIdMap[c]=d.id;var l=new m({documentType:this._layoutIdToDocumentTypeMap[b],title:h.title,description:h.tooltip,
closable:!0});d.onClose&&(l.canClose=function(){l.closeRequest=new e;if(l.closePreApproved)l.closeRequest.resolve();else d.onClose(d.getParent(),d);return l.closeRequest.promise});this._uiContainer.addDocument(d,l);l.watch(m.IS_OPEN,function(a,b,d){d||delete f._documentIdToWidgetIdMap[c]});l.watch(m.IS_SELECTED,function(c,b,h){h&&(d.domNode&&0>a.activeStack.indexOf(d.domNode.id))&&a.focus(d.domNode)})}else this._layoutService.addWidget(c,b,d,h)},removeWidget:function(c){if("workspace"===c)this._uiContainer.removePanel(c);
else{var b=this._getProperties(c);b?b.closeRequest?b.closeRequest.resolve():(b.closePreApproved=!0,b.set(m.IS_OPEN,!1)):(this._layoutService.removeWidget(c),0!==c.indexOf("mgg")&&(c=void 0,this._uiContainer&&(c=this._uiContainer._focusManager.lastPermanentFocus),c&&a.focus(c)))}},removeWidgetsWithParentId:function(a){this._layoutService.removeWidgetsWithParentId(a)},removeWidgetsWithLayoutId:function(a){this._layoutService.removeWidgetsWithLayoutId(a)},closeAppWindows:function(){this._layoutService.closeAppWindows()},
showWidget:function(a){var c=this._getProperties(a);c?c.set(m.IS_SHOWING,!0):this._layoutService.showWidget(a)},focusWidget:function(a){var c=this._getProperties(a);c?c.set(m.IS_SELECTED,!0):this._layoutService.focusWidget(a)},disableWidget:function(a){},enableWidget:function(a){},updateWidget:function(a,c,b){var d=this._getProperties(a);d?"title"===c?d.set(m.TITLE,b):"tooltip"===c?d.set(m.DESCRIPTION,b):c===m.ACTIVE_CONTEXTS&&d.set(m.ACTIVE_CONTEXTS,b):this._layoutService.updateWidget(a,c,b)},updateWidgetsWithLayoutId:function(a,
c,b){this._layoutService.updateWidgetsWithLayoutId(a,c,b)},ensureParentExistsInStore:function(a){this._layoutService.ensureParentExistsInStore(a)},_getProperties:function(a){return(a=this._documentIdToWidgetIdMap[a])?this._uiContainer.getChildProperties(a):null},_createWrapper:function(a){var b=new c({id:a.id+"Wrapper",content:a});d.set(b.domNode,"tabindex",0);a.onClose&&(b.onClose=function(){return a.onClose(arguments)});a.onShow&&(b.onShow=function(){return a.onShow(arguments)});a.onFocus&&(b.onFocus=
function(){return a.onFocus(arguments)});a.onBlur&&(b.onBlur=function(){return a.onBlur(arguments)});return b}})})},"MOTW/layout/LayoutSessionDataAdapter":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/Deferred","MW/uiframework/UIContainer","MW/uiframework/uicontainer/SessionDataService"],function(g,f,e,d,b){return g([b],{save:function(a,c){!this._isFrozen&&0<=a.indexOf("Layout")&&(this._pendingSavedLayout=c)},retrieve:function(a){var c=new e;0<=a.indexOf("Layout")?this._pendingReceivedLayout?
(this._fulfillRetrieval(c,this._pendingReceivedLayout),delete this._pendingReceivedLayout):this._pendingRetrieval=c:c.reject(a+" retrieval not supported");return c.promise},freezeState:function(){this._isFrozen=!0},thawState:function(){this._isFrozen=!1},setLayoutState:function(a){this._pendingRetrieval?(this._fulfillRetrieval(this._pendingRetrieval,a),delete this._pendingRetrieval):(this._pendingReceivedLayout=a,this.uiContainer&&this.uiContainer.resetLayout())},getLayoutState:function(){return this._pendingSavedLayout},
layoutStateNotRetrieved:function(){this._pendingRetrieval&&(this._pendingRetrieval.reject("Session layout not retrieved"),delete this._pendingRetrieval)},_checkState:function(a){return d.stateIncludes(a,"cfb")&&d.stateIncludes(a,"workspace")&&d.stateIncludes(a,"commandWindow")},_fulfillRetrieval:function(a,c){this._checkState(c)?a.resolve(c):a.reject("Retrieved layout not valid")}})})},"MOTW/toolstrip/qab/QABContextualControlsActionMap":function(){define(["./QABContextualControls","./QABPlaceHolderActionIdConstants"],
function(g,f){var e={};e[g.UNDO]=f.UNDO;e[g.REDO]=f.REDO;return e})},"MOTW/toolstrip/qab/QABContextualControls":function(){define([],function(){return{UNDO:"motwToolstrip.qab.globalQAGroup.undo",REDO:"motwToolstrip.qab.globalQAGroup.redo"}})},"MOTW/toolstrip/qab/QABPlaceHolderActionIdConstants":function(){define([],function(){return{UNDO:"motw.qab.undoPlaceHolder",REDO:"motw.qab.redoPlaceHolder"}})},"MOTW/findFiles/FindFilesKeyBindings":function(){define(["MOTW/motw/ActionIdConstants","mw-keybindings/KeyBindings",
"mw-keybindings/KeyBindingsFactory"],function(g,f,e){return{setUpKeyBindings:function(d){d=e.getInstance(d);d.getBinding([f.Keys.SYSCTRL,f.Keys.SHIFT,f.Keys.F]).setAction(".motwApplication",g.FIND_FILES);d.getBinding([f.Keys.SYSCTRL,f.Keys.F]).setAction(".CurrentFolderBrowser",g.FIND_FILES)}}})},"MOTW/modules/versioning/index":function(){define(["dojo/Deferred","MOTW/versioning/VersioningDataService","MOTW/motw/MotwApp"],function(g,f,e){return{initialize:function(d){var b=new g;d=new f({fileDataService:d.fileDataService});
e.versioningService=d;b.resolve({exports:{versioningService:d}});return b.promise}}})},"MOTW/versioning/VersioningDataService":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/lang mw-filename-utils/FileNameUtil mw-remote/Remote MOTW/versioning/VersionDataStore mw-log/Log".split(" "),function(g,f,e,d,b,a,c){return f(null,{constructor:function(a){a&&a.fileDataService&&(this._fileDataService=a.fileDataService);b.registerResponseHandler("ListVersionResponse",this._handleListVersionResponse,
this);b.registerResponseHandler("DisplayVersionResponse",this._handleDisplayVersionResponse,this);b.registerResponseHandler("SetActiveVersionResponse",this._handleSetActiveVersionResponse,this);b.registerFaultHandler("ListVersionResponse",this._getErrorHandler("ListVersion"),this);b.registerFaultHandler("DisplayVersionResponse",this._getErrorHandler("DisplayVersion"),this);b.registerFaultHandler("SetActiveVersionResponse",this._getErrorHandler("SetActiveVersion"),this);this._versionStoresByPath={};
this._isEnabled=!0},getEmptyStore:function(){var c=new a;c.addVersion({isDirectory:!1,location:"",name:""},!0);return c},_hasStore:function(a){a=d.pathFromFileInfo(a);return void 0!==this._versionStoresByPath[a]},getStore:function(a){var b=d.pathFromFileInfo(a);c.assert(this._hasStore(a),'No store for "'+b+'"');return this._versionStoresByPath[b]},_resetStore:function(c){c=d.pathFromFileInfo(c);var b=this._versionStoresByPath[c];b?b.flush():(b=new a,this._versionStoresByPath[c]=b);return b},loadVersions:function(a){d.assertIsFileInfo(a);
a=d.pathFromFileInfo(a);this._sendMessage({ListVersion:{path:a}})},_handleListVersionResponse:function(a){g.forEach(a,function(a){var c;if(a.fileInfoList&&0<a.fileInfoList.length){var b=this._resetStore(a.fileInfoList[0]),d=e.clone(a.fileInfoList[a.fileInfoList.length-1]);b.addVersion(d,!0);for(c=a.fileInfoList.length-1;0<=c;c-=1)b.addVersion(a.fileInfoList[c],!1);this.versionsLoaded(d,b)}},this)},versionsLoaded:function(a,c){},getVersionContent:function(a,b){c.assert(this._hasStore(a.file.fileInfo),
"No store for "+a.file.fileInfo);if(void 0!==a.file.content)b(a);else{var d={DisplayVersion:this._createPathAndVersionPayload(a.file.fileInfo)};this._sendMessage(d,{callback:b,versionedFile:a})}},_handleDisplayVersionResponse:function(a,c){g.forEach(a,function(a){var b=c.callback,d=c.versionedFile;this.getStore(d.file.fileInfo).setFileContent(d,a.file.content);b(d)},this)},setActiveVersion:function(a){c.assert(a,"'fileInfo' cannot be undefined");this._sendMessage({SetActiveVersion:this._createPathAndVersionPayload(a)})},
_createPathAndVersionPayload:function(a){return{path:d.pathFromFileInfo(a),version:a.version.versionNumber}},_handleSetActiveVersionResponse:function(a){g.forEach(a,function(a){this.loadVersions(a.file.fileInfo);this._fileDataService.setFileClean(a.file)},this)},_getErrorHandler:function(a){return e.hitch(null,this._handleError,a)},_handleError:function(a,b){c.error("Error received while calling the "+a+" command.",b)},_sendMessage:function(a,c){this._isEnabled&&b.sendMessage(a,c)},disable:function(){this._isEnabled=
!1},enable:function(){this._isEnabled=!0;g.forEach(this._fileDataService.getAllOpenedFileInfoPaths(),function(a){this._hasStore(a)&&this.loadVersions(a)},this)}})})},"MOTW/versioning/VersionDataStore":function(){define(["dojo/_base/declare","mw-store-utils/CurrentItemDataStore","mw-filename-utils/FileNameUtil","MOTW/versioning/VersioningUtils","mw-log/Log"],function(g,f,e,d,b){return g(f,{_fileDataUtils:e,addVersion:function(a,c){this._fileDataUtils.assertIsFileInfo(a);var b={displayName:c?d.getLatestLabel():
this._generateName(a),file:{content:void 0,fileInfo:a},isLatest:c};b.id=String(this.items.length);this.newItem(b)},flush:function(){this.deleteItems();this.onStoreFlushed()},onStoreFlushed:function(){},setFileContent:function(a,c){a&&void 0!==c&&(this.setValue(a,"file",{content:c,fileInfo:a.file.fileInfo}),this.onFileContentChanged(a))},onFileContentChanged:function(a){},getVersionedFile:function(a){return this.getItemById(a)},getLabelAttributes:function(){return["displayName"]},getLabel:function(a){return a.displayName},
refreshDisplayNames:function(){var a;for(a=0;a<this.items.length;a+=1)this.items[a].isLatest||this.setValue(this.items[a],"displayName",this._generateName(this.items[a].file.fileInfo))},_generateName:function(a){b.assert(a,"'fileInfo' cannot be undefined");var c=new Date(Date.parse(a.version.versionDate));return d.formatAsDelta(c)+" ("+a.version.versionNumber+")"},getLatestVersion:function(){b.assert(0<this.items.length,"No versions loaded into this store yet");return this.getFirstItem()},setToLaterVersion:function(){this.setToOlderItem()},
setToEarlierVersion:function(){this.setToNewerItem()},isLatestVersion:function(){return this.isFirstItem()},isOldestVersion:function(){return this.isLastItem()}})})},"mw-store-utils/CurrentItemDataStore":function(){define(["dojo/_base/declare","mw-log/Log","mw-store-utils/InMemoryStore"],function(g,f,e){return g([e],{_currentItem:null,getItemById:function(d){var b=parseInt(d,10);f.assert(this.isItemIdInStore(d),"ID '"+d+"' is invalid");return this.items[b]},isItemIdInStore:function(d){d=parseInt(d,
10);return 0<=d&&d<this.items.length},deleteItems:function(){var d;for(d=this.items.length-1;0<=d;d-=1)this.deleteItem(this.items[d]);this._currentItem=null},setToOlderItem:function(){var d=this.getCurrentItem();this.isFirstItem()||this._setCurrentItem(this._getNextItem(d,!1))},setToNewerItem:function(){var d=this.getCurrentItem();this.isLastItem()||this._setCurrentItem(this._getNextItem(d,!0))},setCurrentItemById:function(d){this._setCurrentItem(this.getItemById(d))},_setCurrentItem:function(d){this._assertIsInStore(d);
this._currentItem!==d&&(this._currentItem=d,this.onCurrentItemChanged(d))},getCurrentItem:function(){!this._currentItem&&0<this.items.length&&this._setCurrentItem(this.getFirstItem());return this._currentItem},getFirstItem:function(){f.assert(0<this.items.length,"No items in store");return this.items[0]},_getNextItem:function(d,b){var a=this.items.indexOf(d);return b?this.items[a+1]:this.items[a-1]},onCurrentItemChanged:function(d){},getItems:function(){var d=[];this.items.forEach(function(b,a){var c=
{};c.label=b.displayName;c.value=a.toString();this._currentItem===b&&(c.selected=!0);d.push(c)},this);return d},isFirstItem:function(){return 0===this.items.indexOf(this.getCurrentItem())},isLastItem:function(){var d=this.items.indexOf(this.getCurrentItem())===this.items.length-1;return 0<this.items.length&&d},_assertIsInStore:function(d){if(-1===this.items.indexOf(d))throw Error("MW.utils.CurrentItemDataStore: The item specified was not found in the store.");}})})},"MOTW/versioning/VersioningUtils":function(){define(["dojo/_base/kernel",
"dojo/_base/lang","dojo/date/locale","dojo/i18n!MOTW/l10n/nls/versioning"],function(g,f,e,d){return{MINUTE:6E4,HOUR:36E5,DAY:864E5,formatAsDelta:function(b,a){var c;c=new Date;var d=void 0===a||!0===a?new Date(b.getTime()-b.getTimezoneOffset()*this.MINUTE):b;c=c.getTime()-d.getTime();if(c<this.MINUTE)return this.lookup("lessThanMinute");if(c<this.HOUR)return c=Math.round(c/this.MINUTE),f.replace(1<c?this.lookup("minutesAgo"):this.lookup("minuteAgo"),{number:c});if(c<this.DAY)return c=Math.round(c/
this.HOUR),f.replace(1<c?this.lookup("hoursAgo"):this.lookup("hourAgo"),{number:c});"en-us"===g.locale?(c=e.format(b,{datePattern:"MMMM d, yyy",selector:"date"}),c+=" "+e.format(b,{timePattern:"(K:mm a)",selector:"time"})):(c=e.format(b,{formatLength:"long",selector:"date"}),c+=" "+e.format(b,{formatLength:"short",selector:"time"}));return c},lookup:function(b){this._localization||(this._localization=d);return this._localization[b]},getLatestLabel:function(){return this.lookup("latest")},getLoadingMessage:function(){return this.lookup("loading")}}})},
"MOTW/modules/iframeLayoutManager/index":function(){define(["dojo/Deferred","dojo/_base/lang","MOTW/iframecontainer/IframeLayoutManager","MOTW/motw/MotwApp"],function(g,f,e,d){return{initialize:function(b){var a=new g,c=new e({});b.workerReady.then(f.hitch(this,"_start",{layoutService:b.layoutService,iframeLayoutManager:c}));d.iframeLayoutManager=c;a.resolve({exports:{iframeLayoutManager:c}});return a.promise},_start:function(b){b.iframeLayoutManager.start({layoutService:b.layoutService})}}})},"MOTW/iframecontainer/IframeLayoutManager":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/on dojo/dom-style dojo/dom-class dojo/touch dojo/_base/connect dojo/dom-geometry dojo/query".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return g([],{constructor:function(){this.documentType="iframeFloatingPane"},start:function(a){this.layoutService=a.layoutService},addWidget:function(a,c,b){var d=this,k={resizable:!0,title:a.name,"class":"mwNonModalDialog dojoxFloatingPane dijitContentPane "+this.documentType+(void 0!=a.visibility?!1===a.visibility?" visibilityHidden":"":" visibilityVisible"),top:a.position[0],left:a.position[1],width:a.position[2],height:a.position[3],onBringToTop:f.hitch(this,this._onBringToTop),
onResize:f.hitch(this,this._onResize),onMove:f.hitch(this,this._onResize),documentType:this.documentType};!1!==b&&(e.after(this.layoutService,"addWidget",f.hitch(this,"_mouseMoveEvent",c)),h.subscribe("/dojo/resize/start",function(a){d.queryLayoutStore(function(a){a.widget.onSendBack();a.widget.isMoving=!0},{id:a.targetId})}),h.subscribe("/dojo/resize/stop",function(a){d.queryLayoutStore(function(a){a.widget.isMoving=!1;a.widget.onBringToTop()},{id:a.targetId})}));this.layoutService.addWidget(c.layoutWidgetId,
this.documentType,c,k);!1===a.resizable&&this._addRemoveResizeHandle(c,!1)},_mouseMoveEvent:function(a){this.queryLayoutStore(function(a){d(a.wrapper.titleNode,c.press,function(){a.widget.onSendBack();a.widget.isMoving=!0});d(a.wrapper.titleNode,c.release,function(){a.widget.isMoving=!1;a.widget.onBringToTop()})},{id:a.layoutWidgetId})},_addRemoveResizeHandle:function(a,c){this.layoutService.layoutStore.fetch({query:{id:a.layoutWidgetId},onItem:function(a){if(a=l('div[id^\x3d"dojox_layout_ResizeHandle_"]',
a.wrapper.domNode)[0])a.style.display=!1===c?"none":"block"}})},reset:function(){var a=this;this.layoutStore&&this.queryLayoutStore(function(c){a.remove(c.id)})},remove:function(a){this.layoutService.removeWidget(a)},_update:function(c,b){var d=this;this.queryLayoutStore(function(h){b.position&&(d._resizeWindow(h,b),d.layoutService.updateWidget(c,"top",b.position[0]),d.layoutService.updateWidget(c,"left",b.position[1]),d.layoutService.updateWidget(c,"width",b.position[2]),d.layoutService.updateWidget(c,
"height",b.position[3]));b.name&&d.layoutService.updateWidget(c,"title",b.name);b.hasOwnProperty("resizable")&&d._addRemoveResizeHandle(h.widget,b.resizable);b.hasOwnProperty("visibility")&&(!1===b.visibility?(a.remove(h.wrapper.domNode,"visibilityVisible"),a.add(h.wrapper.domNode,"visibilityHidden")):!0===b.visibility&&(a.add(h.wrapper.domNode,"visibilityVisible"),a.remove(h.wrapper.domNode,"visibilityHidden")))},{id:c})},updateVisibleWidget:function(a,c){var b=this;this.queryLayoutStore(function(a){b._updateWindow(a,
c)},{id:a})},_updateWindow:function(a,c){"windowPropertyChanged"===c.eventType?(c.position&&this._resizeWindow(a,c),this._update(c.peerNodeId,c)):"windowClosed"===c.eventType&&this.remove(c.peerNodeId)},_resizeWindow:function(a,c){a.widget.update(c.position[2],c.position[3])},bringToTop:function(a){this.queryLayoutStore(function(a){a.wrapper.bringToTop()},{id:a})},isWindowMinimized:function(a){this.queryLayoutStore(function(a){return a.wrapper._isMinimized},{id:a})},isWindowFocused:function(a){this.queryLayoutStore(function(a){return a.wrapper.focused},
{id:a})},restore:function(a){this.queryLayoutStore(function(a){a.wrapper.show()},{id:a})},_onBringToTop:function(a){a.widget.onBringToTop();this.setIframeContainerTransparentDivVisible(a.id)},_onResize:function(a){var c=k.position(a.wrapper.containerNode);a.widget.onResize({w:c.w,h:c.h})},setIframeContainerTransparentDivVisible:function(a){this.queryLayoutStore(function(c){if(c.id!==a)c.widget.onSendBack()})},queryLayoutStore:function(a,c){var b={documentType:this.documentType};c&&(b=f.mixin(b,c));
this.layoutService.layoutStore.fetch({query:b,onItem:function(c){a(c)}})}})})},"MOTW/modules/footer/index":function(){define(["dojo/Deferred","MOTW/motw/MotwFooter"],function(g,f){return{initialize:function(e){var d=new g,b=new f({executionService:e.executionService});e.uiContainer.set("footer",b);d.resolve({exports:{footer:b}});return d.promise}}})},"MOTW/motw/MotwFooter":function(){define("dojo/_base/connect dojo/_base/declare dojo/dom dojo/dom-geometry dojo/dom-style dijit/_base/focus dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin mw-form/PushButton dojo/text!./motwFooter.html".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m){return f([c,h,k],{templateString:m,constructor:function(a){this.executionService=a.executionService;g.connect(this.executionService,"onExecutionStateChange",this,"_handleExecutionStateChange")},startup:function(){},onShow:function(){},stopExecution:function(){this.executionService.interrupt()},_handleExecutionStateChange:function(a){var c=this;"busy"===a||"completingBlock"===a?(this.stopButtonTimeout=setTimeout(function(){c.stopButton.set("icon","end_16");c.stopButton.set("text",
"Stop");c.stopButton.set("disabled",!1)},2E3),this.stopButton.set("text","Busy"),c.stopButton.set("disabled",!0),this.stopButton.set("icon","smallBusy"),b.set(c.stopButton.domNode,"visibility","visible")):"ready"===a&&(this.stopButtonTimeout&&clearTimeout(this.stopButtonTimeout),b.set(c.stopButton.domNode,"visibility","hidden"),c.stopButton.set("disabled",!0))},onFocus:function(){var c=a._prevFocus;setTimeout(function(){c&&(a.focus(c),a._prevFocus=c)},0)}})})},"MOTW/modules/workspace/index":function(){define(["dojo/Deferred",
"dojo/_base/lang","dojo/aspect","workspacebrowser/WorkspaceBrowserMain","MW/rtc/plugins/debug/DebugServicesFactory"],function(g,f,e,d,b){return{initialize:function(a){var c=new g,h=d.getInstance({messageService:a.messageService,layoutService:a.layoutService,executionService:a.executionService,fileDataService:a.fileDataService,uiContainer:a.uiContainer});this._debugServices=b.getInstance();e.after(this._debugServices,"onStackChanged",f.hitch(h,"onStackChanged"),!0);a.workerReady.then(f.hitch(this,
"_start",{workspaceBrowser:h}));c.resolve({exports:{workspaceBrowser:h}});return c.promise},_start:function(a){a.workspaceBrowser.start()}}})},"MOTW/modules/mgg/index":function(){define("dojo/Deferred dojo/aspect dojo/_base/lang MOTW/mgg/GUIDataService MOTW/mgg/GUIManager MOTW/mgg/MggFeature MOTW/mgg/MggPanesFeature MOTW/mgg/MggPopupFeature MOTW/mgg/MggToggleDockFeature MOTW/mgg/MggLazyLoadFeature mw-messageservice/MessageService MOTW/toolstrip/managers/LegacyFigureControlsManager MOTW/toolstrip/configs/figure/FigureTabGroupConfig MW/uiframework/uicontainer/DocumentTypeProperties MW/uiframework/FeatureDetectionService".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r){return{initialize:function(m){var t=new g,u=new c("GraphicsAndGuisPanes");m.featureService.addFeature(u);var v=new h("GraphicsAndGuisPopup");m.featureService.addFeature(v);var w=new k("GraphicsAndGuisToggleDock");m.featureService.addFeature(w);var x=new l("GraphicsAndGuisLazyLoad",{executionService:m.executionService});m.featureService.addFeature(x);var y=new d({messageService:m.messageService.messageService,figureService:void 0,executionService:m.executionService});
m.uiBuilder.addTabGroupFromConfig(n,"motwToolstrip.figureTabGroup");var B=new q({defaultRegion:"right",title:"Figures",collectiveLabel:"Figures",suppressInitialFocus:!0,plusActions:["motw.newFigure"],willReopen:!0,tabGroupTags:["motwToolstrip.figureTabGroup"]});m.uiContainer.registerDocumentType("figure",B);var B=new p({mggGuiDataService:y}),D=new b({guiDataService:y,layoutService:m.layoutService,pathService:m.pathService,legacyFigureControlsManager:B});y.flushHandler=D;f.after(D.getRoot(),"emptyEval",
function(){m.executionService&&"computeResourceReady"===m.wraService.getCurrentState()&&setTimeout(function(){"computeResourceReady"===m.wraService.getCurrentState()&&m.fileDataService.refreshOpenFolders()},500)});!1===r.getFeatureStatus(r.FeatureNames.SIMULINK)&&m.shadowService.addShadow("simulink");a.prototype.mggOn=!0;m.workerReady.then(e.hitch(this,"_start",{mggGuiDataService:y}));t.resolve({exports:{mggGuiDataService:y,mggGuiManager:D,legacyFigureControlsManager:B,mggPanesFeature:u,mggLazyLoadFeature:x,
mggPopupFeature:v,mggToggleDockFeature:w}});return t.promise},_start:function(a){a.mggGuiDataService.start()}}})},"MOTW/mgg/GUIDataService":function(){define("dojo/_base/declare dojo/Deferred mw-log/Log mw-peermodel/PeerModelManager ./Root ./utils/InMemoryStore ./utils/ImageStream ./utils/MouseStream ./dataservices/WidgetDataService ./dataservices/AxesDataService ./dataservices/RootDataService".split(" "),function(g,f,e,d,b,a,c,h,k,l,m){return g([],{constructor:function(b){b=b||{};this.guiDataStore=
b.guiDataStore||new a;this.figureService=b.figureService;this.executionService=b.executionService;this.maxFiguresWarningOff=!1;this.manager=b.manager||d.getInstance("/jcp");this.ORIGINATOR={guiDataService:this};b.messageService&&(b.messageService.registerTypeSerializer(function(a){return a instanceof c},"imageStream",function(a){return{channel:a.channel}}),b.messageService.registerTypeDeserializer("imageStream",function(a){return new c(a)}),b.messageService.registerTypeSerializer(function(a){return a instanceof
c.StreamImage},"streamImage",function(a){return a.image.src}),b.messageService.registerTypeDeserializer("streamImage",function(a){return new c.StreamImage(a)}),b.messageService.registerTypeSerializer(function(a){return a instanceof h},"mouseStream",function(a){return{channel:a.channel}}),b.messageService.registerTypeDeserializer("mouseStream",function(a){return new h(a)}));this.dataServiceRegistry=this.registerHandlerService();this.addManagerListeners()},start:function(){this.manager.setSyncEnabled(!0)},
stop:function(){this.manager.setSyncEnabled(!1);this.manager.getRoot()&&this.manager.getRoot().destroy()},flush:function(){if(this.flushHandler)return this.flushHandler.flush();var a=new f;a.resolve();return a.promise},addManagerListeners:function(){this.manager.addEventListener("rootSet",this.rootSetObserver,this);this.manager.addEventListener("rootUnset",this.rootUnsetObserver,this)},removeManagerListeners:function(){this.manager.removeEventListener("rootSet",this.rootSetObserver,this);this.manager.removeEventListener("rootUnset",
this.rootUnsetObserver,this)},addNodeListeners:function(a){a.addEventListener("childAdded",this.childAddedObserver,this);a.addEventListener("childDestroyed",this.childDestroyedObserver,this);a.addEventListener("propertiesSet",this.propertySetObserver,this)},removeNodeListeners:function(a){a.removeEventListener("childAdded",this.childAddedObserver,this);a.removeEventListener("childDestroyed",this.childDestroyedObserver,this);a.removeEventListener("propertiesSet",this.propertySetObserver,this)},rootSetObserver:function(a){this.addNodeListeners(a.target);
this.addGUIComponent(a,a.originator!==this.ORIGINATOR)},rootUnsetObserver:function(a){this.removeNodeListeners(a.target)},childAddedObserver:function(a){this.addNodeListeners(a.data.child);this.addGUIComponent(a,a.originator!==this.ORIGINATOR)},childDestroyedObserver:function(a){this.removeNodeListeners(a.data.child);this.destroyGUIComponent(a,a.originator!==this.ORIGINATOR)},propertySetObserver:function(a){this.updateGUIComponent(a,a.originator!==this.ORIGINATOR)},registerHandlerService:function(){this.handlerServiceMap||
(this.handlerServiceMap={root:new m({manager:this.manager,guiDataService:this,figureService:this.figureService,originator:this.ORIGINATOR}),Canvas:new l({manager:this.manager,store:this.guiDataStore,figureService:this.figureService,originator:this.ORIGINATOR}),StreamCanvas:new l({manager:this.manager,store:this.guiDataStore,figureService:this.figureService,originator:this.ORIGINATOR})});var a=this;return{registerDataServiceHandler:function(c,b){c&&(a.handlerServiceMap[c]=b)},removeDataServiceHandler:function(c){c&&
delete a.handlerServiceMap[c]},getHandler:function(c){if(c)return a.handlerServiceMap[c]||(a.handlerServiceMap[c]=new k({manager:a.manager,originator:a.ORIGINATOR})),a.handlerServiceMap[c]}}},addGUIComponent:function(a,c){var b=a.data.child||a.target;if(b.getType()){var d=this.guiDataStore.items[b.getId()];d&&this._removeItemRecursive(d.id,c);b=this.dataServiceRegistry.getHandler(b.getType()).create(b);this.guiDataStore.newItem(b,c,a.data.index)}else e.log.error("Illegal Component Creation: Must provide id/parentId/Type")},
updateGUIComponent:function(a,c){var b=a.target;if(b.getType()&&b.getId()){var d=this.guiDataStore.items[b.getId()];d&&this.dataServiceRegistry.getHandler(b.getType()).update(b,this.guiDataStore,d,Object.keys(a.data.newValues),c)}},destroyGUIComponent:function(a,c){var d=a.data.child;"GUIContainer"===d.getType()&&b.emptyEval();this._removeItemRecursive(d.getId(),c)},_removeItemRecursive:function(a,c){var b=this.guiDataStore;this._removeChildren(a,c);var d=b.items[a];d&&b.deleteItem(d,c)},remove:function(a){},
_removeChildren:function(a,c){var b,d;if(this.guiDataStore.items[a]){var h=this.guiDataStore.items[a]._children;for(b=h.length-1;0<=b;b-=1)d=h[b],this._removeChildren(d.id,c),this.guiDataStore.deleteItem(d,c)}}})})},"MOTW/mgg/Root":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/window dojo/aspect dojo/dom-geometry dojo/dom-style dojo/has dojo/on dojo/dom dojo/query dojo/window dijit/registry dijit/Tooltip mw-log/Log MOTW/dialog/MotwDialogUtils ./components/Clipboard ./components/MaxFiguresDialog dojo/i18n!MOTW/l10n/nls/mgg".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u){function v(){}function w(a){a._autoResizeEventHasSent=!1;x.sendBrowserResize=function(){a._autoResizeEventHasSent||(a._createResizeEvent=!0,a._autoResizeEventHasSent=!0,a._sendBrowserResize())}}var x;x=g([],{FLOATING_PANE_PADDING_W:5,FLOATING_PANE_PADDING_H:15,preWidgetId:"mgg_",constructor:function(a){a=a||{};this.componentData=a.widgetData;this.guiDataService=a.guiDataService;this.layoutService=a.layoutService;this.handler=a.handler;this.children=[];
var c=this;setTimeout(function(){c._sendBrowserResize()},0);d.after(e.global,"onresize",f.hitch(this,this._sendBrowserResize));this._started=!0;this._resizing={};this._tooltipOpenMethod=n.prototype.open;w(this)},update:function(a,c){this.componentData=a;var b;"clipboard"===c&&this._showClipboard(this.componentData.clipboard);if("selectedChild"===c){var d,h=this.getChildren();for(d=0;d<h.length;d+=1)h[d].componentData.id===this.componentData.selectedChild&&(b=h[d],x.lazyLoadEnabled&&b.componentData.docked&&
b.busyIndicator.show(),this.layoutService.showWidget(b.layoutWidgetId)),x.lazyLoadEnabled&&this._updateVisibility(h[d])}!1!==this.componentData.enableTooltips&&n.prototype.open===v?n.prototype.open=this._tooltipOpenMethod:!1===this.componentData.enableTooltips&&(n.prototype.open=v);"openGuis"===c&&this._checkMaxFigures()},addChild:function(a){x.windowOpenedOrClosed();this.children.push(a);if(!(a.componentData.filtered||"FileChooser"===a.componentData.type)){this._addToLayout(a);x.lazyLoadEnabled&&
a.busyIndicator&&a.busyIndicator.show();var c=this;a.onShow=function(){c.handler.setProperties(c.componentData.id,{selectedChild:a.widgetId})};setTimeout(function(){c.layoutService.updateWidget(a.layoutWidgetId,"dirty",Math.random())},0);d.after(a,"addChild",function(){a.componentData.docked?c._onWidgetResize(a):c.layoutService.updateWidget(a.layoutWidgetId,"dirty",Math.random())});d.after(a,"childUpdated",function(){if(a.componentData.docked){if(c._onWidgetResize(a),x.lazyLoadEnabled){var b,d=c.getChildren();
for(b=0;b<d.length;b+=1)c._updateVisibility(d[b])}}else c.layoutService.updateWidget(a.layoutWidgetId,"dirty",Math.random())});d.after(a,"removeChild",function(){a.componentData.docked?c._onWidgetResize(a):c.layoutService.updateWidget(a.layoutWidgetId,"dirty",Math.random())});d.after(a,"onMinimized",function(){a.componentData.docked||c.layoutService.updateWidget(a.layoutWidgetId,"minimized",!0)});d.after(a,"onWindowShown",function(){a.componentData.docked||c.layoutService.updateWidget(a.layoutWidgetId,
"minimized",!1);x.lazyLoadEnabled&&a.busyIndicator&&a.busyIndicator.hide()})}},childUpdated:function(a,c,b,d){a.componentData.filtered||(a._lastPosition!==a.componentData.position?(this.layoutService.updateWidget(a.layoutWidgetId,"dirty",Math.random()),a._lastPosition=a.componentData.position):a._lastDocked!==a.componentData.docked?(a.getParent().removeChild(a),this.layoutService.removeWidget(a.layoutWidgetId),this._addToLayout(a)):this.layoutService.updateWidget(a.layoutWidgetId,c,d))},removeChild:function(a){x.windowOpenedOrClosed();
var c=this.children.indexOf(a);0<=c&&this.children.splice(c,1);a.componentData.filtered||"FileChooser"===a.componentData.type||this.layoutService.removeWidget(a.layoutWidgetId);a.destroyRecursive()},destroyRecursive:function(){this.children.map(function(a){return a}).forEach(this.removeChild,this)},getChildren:function(){return this.children},_addToLayout:function(a){var c="mggDocked";if(!a.componentData.docked&&x.usePanes||!1===a.componentData.dockable)c=a.componentData.modal?"mggDialog":"mggFloatingPane";
x.dockAll&&(c="mggDocked");a._lastDocked=a.componentData.docked;var d=Math.max(0,a.componentData.top),h=Math.max(0,a.componentData.left);if(a.componentData.isPositionRelative)if(a.componentData.anchor_id){var e=p.byId(a.componentData.anchor_id);e&&(b.getBorderExtents(e.domNode),e=b.position(e.domNode),d=e.y+e.h,h=e.x)}else if(a.componentData.relativeParentId&&(e=p.byId("mgg_"+a.componentData.relativeParentId)))e=b.position(e.domNode),d+=e.y-20,h+=e.x;a.layoutWidgetId=this.preWidgetId+a.componentData.id+
"_"+Math.random();a.connect(a,"resize",f.hitch(this,this._onWidgetResize,a));this.layoutService.addWidget(a.layoutWidgetId,c,a,{title:a.componentData.title||" ",relativeParentId:a.componentData.relativeParentId||void 0,top:d,left:h,tooltip:a.componentData.title,overflow:"hidden",resizable:this._shouldGuiBeResizable(a.componentData),"class":"mgg"+(a.componentData.relativeParentId?" hideMinimizeButton":""),autofocus:a.componentData.modal,active:a.componentData.id===this.componentData.selectedChild,
onResize:f.hitch(this,this._onResize),onMinimize:f.hitch(this,this._onMinimize),onWindowShow:f.hitch(this,this._onWindowShow),onMove:f.hitch(this,this._onMove),onBringToTop:f.hitch(this,this._onBringToTop)})},_updateVisibility:function(a){if("GUIContainer"===a.componentData.type){var c=this.layoutService._getProperties(a.layoutWidgetId);c&&(a.componentData.visible=c.isShowing,a.handler.handleEvent(a.widgetId,{type:"makeVisible",visible:a.componentData.visible},!0))}},_onResize:function(a){this._onWidgetResize(a.widget)},
_onMinimize:function(a){this.handler.setProperties(a.widget.peerNode.getId(),{minimized:!0},!0)},_onWindowShow:function(a){x.lazyLoadEnabled&&a.widget.busyIndicator.show();this.handler.setProperties(a.widget.peerNode.getId(),{minimized:!1},!0);this._bringRelativeChildOnTop(a)},_onWidgetResize:function(a){var c=a.componentData.id;this._resizing[c]&&clearTimeout(this._resizing[c]);var d=this;this._resizing[c]=setTimeout(function(){clearTimeout(d._resizing[c]);delete d._resizing[c];if(a.componentData.resizable&&
a.domNode&&a.domNode.parentNode){var h=b.position(a.contentContainer),e=h.w/h.h,f=0;a.menuContainer&&(f=b.position(a.menuContainer).h);var k=0;a.toolBarContainer&&(k=b.position(a.toolBarContainer).h);var l=b.position(a.domNode.parentNode);l.h-=f;l.h-=k;a.componentData.docked&&(e<l.w/l.h?l.w=l.h*e:l.h=l.w/e);l.w=Math.round(l.w);l.h=Math.round(l.h);0<l.w&&0<l.h&&(d._doSendBrowserResize(),e=l.w-h.w,h=l.h-h.h,(0>e||2<e||0>h||2<h)&&a.handler.handleEvent(a.widgetId,{type:"resize",width:l.w,height:l.h}),
a.componentData.docked&&d.handler.setProperties(d.componentData.id,{dockedWidth:l.w,dockedHeight:l.h}),x.lazyLoadEnabled&&a.busyIndicator&&a.busyIndicator.hide())}},500)},_onMove:function(a){var c=b.position(a.wrapper.domNode);a.widget.handler.setProperties(a.widget.widgetId,{top:c.y,left:c.x},!0)},_onBringToTop:function(a){this.handler.setProperties(this.componentData.id,{selectedChild:a.widget.widgetId},!0);this._autoResizeEventHasSent=!1;var c=this;a.relativeParentId||this.layoutService.layoutStore.fetch({query:{relativeParentId:a.widget.widgetId},
onItem:function(a){c._bringRelativeChildOnTop(a)}})},_bringRelativeChildOnTop:function(c){var b=l('div[id^\x3d"'+this.preWidgetId+c.relativeParentId+'_"]')[0],b=b?parseInt(a.get(b,"z-index"))+1:null;null!==b&&(c=k.byId(c.id),a.set(c,"z-index",b))},_sendBrowserResize:function(){this._browserResizing&&clearTimeout(this._browserResizing);var a=this;this._browserResizing=setTimeout(function(){a._doSendBrowserResize()},500)},_doSendBrowserResize:function(){clearTimeout(this._browserResizing);this._browserResizing=
!1;var a=0;if(this._createResizeEvent){this._createResizeEvent=!1;for(a=Math.round(10*Math.random())+1;a===this._tempResizeNumber;)a=Math.round(10*Math.random())+1;this._tempResizeNumber=a}else this._autoResizeEventHasSent=!1;this.handler.setProperties(this.componentData.id,{screenWidth:m.getBox().w-a-2*this.FLOATING_PANE_PADDING_W,screenHeight:m.getBox().h-2*this.FLOATING_PANE_PADDING_H},!1)},_showClipboard:function(a){var c=this;this._clipboard?this._clipboard.setText(a):(this._clipboard=new s({text:a}),
r.displayMessage(this._clipboard,u.clipboardTitle,[{name:"Ok",label:u.clipboardButton,buttonHandler:{scope:this,handler:"dismiss"}}]),d.after(this._clipboard,"destroyRecursive",function(){c._clipboard=null}))},_checkMaxFigures:function(){(x.lazyLoadEnabled?this.componentData.maxGuis:this.componentData.openGuis.some(function(a){return!a.isLoaded}))&&(!this.guiDataService.maxFiguresWarningOff&&!this.guiDataService.maxFiguresWarningOffAlways)&&this._showMaxFiguresDialog()},_showMaxFiguresDialog:function(){var a=
new t({guiDataService:this.guiDataService});setTimeout(function(){r.displayFault(a,a.title,a.buttons)},0)},_shouldGuiBeResizable:function(a){return a.title&&-1!==a.title.indexOf("Filter Design \x26 Analysis Tool")?!0:a.resizable}});x.usePanes=!0;x.usePopups=!c("ie")&&!c("trident");x.dockAll=!1;x.lazyLoadEnabled=!1;x.windowOpenedOrClosed=function(){};x.emptyEval=function(){};return x})},"MOTW/mgg/components/Clipboard":function(){define("dojo/_base/declare dojo/dom-style dojo/dom-construct dijit/_WidgetBase dijit/_TemplatedMixin dojo/text!./clipboard.html dojo/i18n!MOTW/l10n/nls/mgg".split(" "),
function(g,f,e,d,b,a,c){return g([d,b],{templateString:a,constructor:function(a){a=a||{};this.text=a.text;this.localization=c},setText:function(a){this.text=a;this.textarea.innerHTML=a;this.textarea.focus()},_handleFocus:function(){var a=this;setTimeout(function(){a.textarea.select()},0)}})})},"MOTW/mgg/components/MaxFiguresDialog":function(){define("dojo/_base/declare dojo/dom-attr dijit/_Widget dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dijit/form/RadioButton dojo/text!./maxFiguresDialog.html dojo/i18n!MOTW/l10n/nls/mgg".split(" "),
function(g,f,e,d,b,a,c,h){return g([e,d,b],{templateString:c,postCreate:function(){this.inherited(arguments);this._updateStringsWithLocalization();this._createOKButton()},_updateStringsWithLocalization:function(){this.title=h.MaxFiguresExceededDialog.title;f.set(this.content,"innerHTML",h.MaxFiguresExceededDialog.content);f.set(this.lblNone,"innerHTML",h.MaxFiguresExceededDialog.radioNone);f.set(this.lblNone,"for",this.radioNone.id);f.set(this.lblSession,"innerHTML",h.MaxFiguresExceededDialog.radioSession);
f.set(this.lblSession,"for",this.radioSession.id);f.set(this.lblNever,"innerHTML",h.MaxFiguresExceededDialog.radioNever);f.set(this.lblNever,"for",this.radioNever.id)},_createOKButton:function(){var a=this;this.buttons={};this.buttons.ok=function(){a.radioNever.checked?(a.guiDataService.maxFiguresWarningOff=!0,a.guiDataService.maxFiguresWarningOffAlways=!0):a.radioSession.checked&&(a.guiDataService.maxFiguresWarningOff=!0);this.onClose()}}})})},"MOTW/mgg/utils/InMemoryStore":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/data/util/filter","dojo/data/util/simpleFetch","mw-utils/Utils"],function(g,f,e,d,b){g=g([],{_storeRef:"_S",_shouldSortItems:!1,constructor:function(a){a=a||{};this.items={};!0===a.sortItems&&(this._shouldSortItems=!0);a.items&&a.items.forEach(function(a){this.newItem(a)},this)},_fetchItems:function(a,c){var b=[],d,f,g,p,n,q,r,s={};if(a.query)if(d=a.queryOptions?a.queryOptions.ignoreCase:!1,!d&&1===Object.keys(a.query).length&&void 0!==a.query.id&&void 0!==this.items[a.query.id])b.push(this.items[a.query.id]);
else{for(f in a.query)a.query.hasOwnProperty(f)&&(r=a.query[f],"string"===typeof r&&/[\*\?]+/.test(r)?s[f]=e.patternToRegExp(r,d):r instanceof RegExp&&(s[f]=r));d=Object.keys(this.items);q=d.length;for(g=0;g<q;g+=1){p=!0;n=this.items[d[g]];if(null===n)p=!1;else for(f in a.query)a.query.hasOwnProperty(f)&&(r=a.query[f],this._containsValue(n,f,r,s[f])||(p=!1));p&&b.push(n)}}else this.items&&Object.keys(this.items).forEach(function(a){null!==this.items[a]&&b.push(this.items[a])},this);this._shouldSortItems&&
b.sort(function(a,c){return a.id-c.id});c(b,a)},getFeatures:function(){return{"dojo.data.api.Read":!0,"dojo.data.api.Write":!0,"dojo.data.api.Notification":!0,"dojo.data.api.Identity":!0}},getAttributes:function(a){var c=[],b;for(b in a)a.hasOwnProperty(b)&&(b!==this._storeRefPropName&&b!==this._loadedPropName&&b!==this._filePathPropName)&&c.push(b);return c},isItem:function(a){return a&&a[this._storeRef]===this},isItemLoaded:function(a){return this.isItem(a)},loadItem:function(){},getValues:function(a,
c){},getValue:function(a,c){if(a.hasOwnProperty(c))return a[c]},hasAttribute:function(a,c){var b=this.getValue(a,c);return void 0!==b?[b]:[]},containsValue:function(a,c,b){var d;"string"===typeof b&&(d=e.patternToRegExp(b,!1));return this._containsValue(a,c,b,d)},_containsValue:function(a,c,b,d){a=this.getValue(a,c);if(b===a)return!0;if(d)throw Error("MOTW.mgg.utils.InMemoryStore: does not support regexp due to performance issues");return!1},setMultipleValues:function(a,c,b){var d=[];Object.keys(c).forEach(function(b){var h=
a[b];h!==c[b]&&(a[b]=c[b],d.push([a,b,h,c[b]]))});d.forEach(function(a){this.onSet.apply(this,a)},this)},setValues:function(a,c,b,d){var e;if(!f.isString(c))throw Error("MOTW.utils.InMemoryStore: invalid attribute");e=a[c];e!==b&&d&&(a[c]=b,this.onSet(a,c,e,b))},setValue:function(a,c,b,d){this.setValues(a,c,b,d)},newItem:function(a,c,d){a[this._storeRef]=this;a.hasOwnProperty("id")||(a.id=b.generateUuid());this.items[a.id]=a;a._children=[];a.hasOwnProperty("parentId")&&this.items[a.parentId]&&this.items[a.parentId]._children.splice(d,
0,a);if(c)this.onNew(a);return a},deleteItem:function(a,c){var b=this.items[a.parentId];if(b){var d=b._children.indexOf(a);0<=d&&b._children.splice(d,1)}delete this.items[a.id];if(c)this.onDelete(a)},getIdentity:function(a){return a.id},save:function(a){},revert:function(){return!1},isDirty:function(a){return!1},onNew:function(){},onDelete:function(){},onSet:function(){}});f.extend(g,d);return g})},"MOTW/mgg/utils/ImageStream":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/has mw-deferred-utils/Deferred mw-deferred-utils/DeferredList mw-messageservice/MessageService mw-log/Log".split(" "),
function(g,f,e,d,b,a,c,h){var k=this.performance=this.performance||{};k.now=k.now||k.webkitNow||k.msNow||k.mozNow||Date.now;var l;l=function(a){this.image=l.getImageFromPool();this.image.src=a};d("ie")||d("trident")?l.getImageFromPool=function(){return new Image}:(l.imagePool=Array(50),l.nextIndex=0,l.getImageFromPool=function(){var a;l.imagePool[l.nextIndex]?(a=l.imagePool[l.nextIndex],a.onload=null,a.onerror=null,a.src=""):(a=new Image,l.imagePool[l.nextIndex]=a);l.nextIndex=(l.nextIndex+1)%l.imagePool.length;
return a});var m=g([],{constructor:function(){this._canvas=document.createElement("canvas");this._context=this._canvas.getContext("2d",{alpha:!0});this._updateQueue=[];this._frameTimes=[];for(var a=0;100>a;a+=1)this._frameTimes[a]=0;this._frameTimesIndex=0;this._frameTimes[this._frameTimesIndex]=k.now()},computeImageDifferences:function(a,c){return[{x:0,y:0,image:c}]},applyImageDifferences:function(c){var b,d=c.length,e=this;if(0!==d){var f=this._createQueuedDeferred();f.name="applyImageDifferences deferred";
var k=[];for(b=0;b<d;b+=1)k.push(this._wrapImageInDeferred(c[b].image.image));b=new a(k);var l=e._updateQueue[e._updateQueue.length-2];b.then(function(){0<=e._updateQueue.indexOf(l)?l.then(function(){e._applyLoadedImageDifferences(c,f)}):e._applyLoadedImageDifferences(c,f)},function(){h.log("rejecting deferred applyImageDifferences");f.reject();e._cancelQueuedDeferreds()});return f}},clearImage:function(){},setImage:function(a){var c=a.image;a=this._wrapImageInDeferred(c);var b=this._createQueuedDeferred();
b.name="updateImage deferred";var d=this;a.then(function(){d._canvas.width=c.width;d._canvas.height=c.height;d._context.clearRect(0,0,c.width,c.height);d._context.drawImage(c,0,0,c.width,c.height);d._updateFPS();d._cancelQueuedDeferreds(b);b.isCanceled()||b.resolve()},function(){b.isCanceled()||b.reject()});return b},_applyLoadedImageDifferences:function(a,c){var b;for(b=0;b<a.length;b+=1)this._context.clearRect(a[b].x,a[b].y,a[b].image.image.width,a[b].image.image.height),this._context.drawImage(a[b].image.image,
a[b].x,a[b].y);this._updateFPS();c.resolve()},_updateFPS:function(){if(-1<location.search.indexOf("fps\x3don")){var a=this._frameTimesIndex;this._frameTimesIndex=(this._frameTimesIndex+1)%100;this._frameTimes[this._frameTimesIndex]=k.now();for(var c,b=this._frameTimes[this._frameTimesIndex]-this._frameTimes[a],d=b,h=b,e=0;100>e;e+=1)if(e!=a&&e!=this._frameTimesIndex){var f=this._frameTimes[e],l=this._frameTimes[(e+1)%100];c=l-f;0<c&&(0<l&&0<f)&&(b+=c,c<d?d=c:c>h&&(h=c))}b/=99;this._context.beginPath();
this._context.clearRect(0,0,55,32);this._context.closePath();this._context.fillText("mean: "+b.toFixed(1),0,10);this._context.fillText("min: "+d.toFixed(1),0,20);this._context.fillText("max: "+h.toFixed(1),0,30)}},_wrapImageInDeferred:function(a){var c=new b;c.name="wrapImage deferred";var e=function(){function b(){a.onload&&(c.resolve(),a.onload=null,a.onerror=null)}!d("ie")&&!d("trident")?b():window.setImmediate?window.setImmediate(b):setTimeout(b,0)};a.onload=e;a.onerror=function(){h.log("Error loading image");
c.reject();a.onload=null;a.onerror=null};a.complete&&0<a.src.length&&e();return c},_createQueuedDeferred:function(){var a;a=new b;var c=f.hitch(this,this._removeDeferredFromQueue,a);a.then(c,c);this._updateQueue.push(a);return a},_removeDeferredFromQueue:function(a){a=this._updateQueue.indexOf(a);0<=a&&this._updateQueue.splice(a,1)},_cancelQueuedDeferreds:function(a){for(;this._updateQueue&&0<this._updateQueue.length;){var c=this._updateQueue.shift();if(a&&c===a)return;c.cancel("Queued deferreds cancelled")}this._updateQueue=
[]}});g=g([],{_PERIODIC_READY_INTERVAL:15E3,constructor:function(a){this.channel=a.channel;this._imageDifferencer=new m;this._started=!1},start:function(){var a=this;this._started||(c.subscribe(this.channel+"/*",this._handleMessage,this),this._reconnect=e.after(c,"onReconnected",function(){a._publish("/error")}),this._publish("/getFullUpdate"),this._resetPeriodicReady(),this._started=!0)},stop:function(){this._started&&(this._reconnect.remove(),c.unsubscribe(this.channel+"/*",this._handleMessage,
this),clearTimeout(this._periodicReady),this._started=!1)},getCanvas:function(){return this._imageDifferencer._canvas},_handleMessage:function(a){this._resetPeriodicReady();if(0<a.channel.indexOf("fullUpdate"))this._imageDifferencer.clearImage(),this._imageDifferencer.setImage(a.data),this._publish("/ready");else if(0<a.channel.indexOf("diff")){var c=this;this._imageDifferencer.applyImageDifferences(a.data).then(function(){c._publish("/ready")},function(){c._publish("/error")})}},_publish:function(a,
b){var d=this;if(void 0===b)b=0;else if(2E3<b){h.error("Unable to send image stream message, giving up!");return}c.publish(this.channel+a,"").then(void 0,function(){setTimeout(function(){d._publish("/error",b+100)},b)})},_resetPeriodicReady:function(){this._periodicReady&&clearTimeout(this._periodicReady);var a=this;this._periodicReady=setTimeout(function(){a._periodicReady=!1;a._publish("/ready");a._resetPeriodicReady()},this._PERIODIC_READY_INTERVAL)}});g.Deferred=b;g.DeferredList=a;g.StreamImage=
l;return g})},"mw-deferred-utils/Deferred":function(){define([],function(){var g=function(){this._state=0;this._callbacks=[];this._errbacks=[]};g.prototype.then=function(f,e){1===this._state&&f?f():2===this._state&&e?e():(f&&this._callbacks.push(f),e&&this._errbacks.push(e));return this};g.prototype.resolve=function(){if(0===this._state){for(this._state=1;this._callbacks.length;)this._callbacks.pop()();this._callbacks=[];this._errbacks=[]}};g.prototype.reject=function(){if(0===this._state){for(this._state=
2;this._errbacks.length;)this._errbacks.pop()();this._callbacks=[];this._errbacks=[]}};g.prototype.cancel=function(){0===this._state&&(this._state=3,this._callbacks=[],this._errbacks=[])};g.prototype.isCanceled=function(){return 3===this._state};return g})},"mw-deferred-utils/DeferredList":function(){define(["./Deferred"],function(g){var f=function(e){g.apply(this);this._successes=0;this._total=e.length;var d;for(d=0;d<this._total;d+=1)e[d].then(this._callback.bind(this),this.reject.bind(this))};
f.prototype=new g;f.prototype.constructor=f;f.prototype._callback=function(){this._successes+=1;this._successes===this._total&&this.resolve()};return f})},"MOTW/mgg/utils/MouseStream":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","mw-messageservice/MessageService"],function(g,f,e,d){return g([],{constructor:function(b){this.channel=b.channel;this.messageService=b.messageService||d.messageService},start:function(){this._started||(this.messageService.subscribe(this.channel+"/*",
this._handleMessage,this),this._started=this.ready=!0)},stop:function(){this._started&&(this.messageService.unsubscribe(this.channel+"/*",this._handleMessage,this),this._started=!1)},isStarted:function(){return this._started},pressed:function(b,a,c,d){this._queueEvent({type:"pressed",data:{x:b,y:a,buttons:c,modifiers:d}})},released:function(b,a,c,d){this._queueEvent({type:"released",data:{x:b,y:a,buttons:c,modifiers:d}})},moved:function(b,a,c,d){this._queueEvent({type:"moved",data:{x:b,y:a,buttons:c,
modifiers:d}})},scroll:function(b,a,c){this._queueEvent({type:"scroll",data:{x:b,y:a,zoom:c}})},onCursor:function(b){},_queueEvent:function(b){this._event=b;"moved"===b.type?this._sendIfReady():this._send()},_sendIfReady:function(){this.ready&&this._send()},_send:function(){if(this._event&&this._started){this.messageService.publish(this.channel+"/"+this._event.type,this._event.data);this._event=null;this.ready=!1;clearTimeout(this.forceTimeout);var b=this;this.forceTimeout=setTimeout(function(){b.ready=
!0;b.forceTimeout=null},500)}},_handleMessage:function(b){0<b.channel.indexOf("ready")&&(this.ready=!0,this._sendIfReady());if(b.data.cursor)this.onCursor(b.data.cursor)}})})},"MOTW/mgg/dataservices/WidgetDataService":function(){define(["dojo/_base/declare","mw-log/Log","./ComponentDataService"],function(g,f,e){return g([e],{constructor:function(d){d=d||{};this.manager=d.manager;this.ORIGINATOR=d.originator},create:function(d){var b={id:d.getId(),type:d.getType(),parentId:d.hasParent()?d.getParent().getId():
""},a,c=d.getProperties();for(a in c)c.hasOwnProperty(a)&&(b[a]=this.convertProperty(d,a));if(!b.hasOwnProperty("id")||!b.hasOwnProperty("type")||!b.hasOwnProperty("parentId"))b=null,f.log.error("Illegal Widget Creation: Must provide id/parentId/Type");return b},update:function(d,b,a,c,h){var e={};c.forEach(function(a){e[a]=this.convertProperty(d,a)},this);b.setMultipleValues(a,e,h)},remove:function(d){},convertProperty:function(d,b){return d.getProperty(b)},handleEvent:function(d,b,a){this.manager.hasById(d)&&
(d=this.manager.getById(d),d.dispatchEvent("peerEvent",d,b,a?this.ORIGINATOR:void 0))},setProperties:function(d,b,a){this.manager.hasById(d)&&this.manager.getById(d).setProperties(b,a?this.ORIGINATOR:void 0)}})})},"MOTW/mgg/dataservices/ComponentDataService":function(){define(["dojo/_base/declare"],function(g){return g([],{create:function(f){},update:function(f,e,d,b){},handleEvent:function(f,e){}})})},"MOTW/mgg/dataservices/AxesDataService":function(){define(["dojo/_base/declare","./WidgetDataService"],
function(g,f){return g([f],{constructor:function(e){e=e||{};this.manager=e.manager;this.figureService=e.figureService;this.eventObserver=this.mouseEventsObserver();this.constants=this.getConstants();this.store=e.store},create:function(e){var d=this.inherited(arguments);e.addEventListener("peerEvent",this.peerEventObserver,this);return d},remove:function(e){var d=this.inherited(arguments);e.removeEventListener("peerEvent",this.peerEventObserver,this);return d},getConstants:function(){return{AXES_THRESHOLD_X:5,
AXES_THRESHOLD_Y:5,TIME_SPACING:100,OBSERVER_LIFETIME:800}},handleEvent:function(e,d){d.target=e;"mouseUp"===d.type?(this.eventObserver.dispatchAndClear(),this.dispatchPeerEvent(d),this.figureService&&(this.manager.getById(this.manager.getRoot().getProperty("selectedChild")).getProperty("isGui")||this.figureService.refresh())):"mouseMove"===d.type?this.eventObserver.processNewEvent(d):this.dispatchPeerEvent(d)},dispatchPeerEvent:function(e){if(this.manager.hasById(e.target)){var d=this.manager.getById(e.target);
d.dispatchEvent("peerEvent",d,e,this.ORIGINATOR)}},mouseEventsObserver:function(){this.newEvent=this.oldestEvent=this.timeOut=null;var e=this;return{processNewEvent:function(d){e.newEvent=d;!0===e.eventObserver.shouldApplyRules()&&e.eventObserver.dispatchAndClear()},shouldApplyRules:function(){if(null===e.oldestEvent)e.oldestEvent=e.newEvent,clearTimeout(e.timeOut),e.timeOut=setTimeout(function(){e.eventObserver.dispatchAndClear()},e.constants.OBSERVER_LIFETIME);else{var d=Math.abs(e.oldestEvent.x-
e.newEvent.x),b=Math.abs(e.oldestEvent.y-e.newEvent.y),a=Math.abs(e.newEvent.timestamp-e.oldestEvent.timestamp);if((d>e.constants.AXES_THRESHOLD_X||b>e.constants.AXES_THRESHOLD_Y)&&a>e.constants.TIME_SPACING)return!0}return!1},dispatchAndClear:function(){var d=e.newEvent;d&&e.dispatchPeerEvent(d);void 0!==typeof e.timeOut&&clearTimeout(e.timeOut);e.oldestEvent=null;e.newEvent=null}}},peerEventObserver:function(e){this.onPeerEvent(e)},onPeerEvent:function(e){}})})},"MOTW/mgg/dataservices/RootDataService":function(){define(["dojo/_base/declare",
"./WidgetDataService"],function(g,f){return g([f],{constructor:function(e){e=e||{};this.figureService=e.figureService;this.guiDataService=e.guiDataService;this.ORIGINATOR=e.originator},create:function(e){e.addPeerEventListener("flush",this._handleFlush,this);return this.inherited(arguments)},remove:function(e){e.removePeerEventListener("flush",this._handleFlush,this);return this.inherited(arguments)},_handleFlush:function(e){this.guiDataService.flush().then(function(){e.target.dispatchPeerEvent("flushResponse",
e.target,{},this.ORIGINATOR)})},update:function(e,d,b,a){var c=this.inherited(arguments);0<=a.indexOf("selectedChild")&&(this.figureService&&this.figureService.refresh(),this.onSelectedChildChanged());return c},onSelectedChildChanged:function(){}})})},"MOTW/mgg/GUIManager":function(){define("dojo/_base/declare dojo/_base/connect dojo/Deferred dijit/registry dojo/dom-geometry dojo/dom dojo/window mw-log/Log ./Root ./containers/GUIContainer ./containers/DocumentContainer ./containers/ClosablePanel ./containers/LayoutPanel ./containers/Panel ./containers/ContextMenuPanel ./containers/SingleClickPanel ./containers/ScrollPane ./containers/ClassificationLearnerModelListScrollPane ./containers/SplitPane ./containers/TabContainer ./containers/ContentPane ./containers/ToolBarContainer ./containers/ToolBar ./containers/Tree ./containers/TreeNode ./menus/MenuBar ./menus/Menu ./menus/PopupMenu ./menus/MenuItem ./menus/CheckBoxMenuItem ./menus/DropdownPopup ./menus/ColorPickerMenuItem ./menus/MJCheckBoxMenuItem ./components/Canvas ./components/StreamCanvas ./components/Separator ./components/Dropdown ./components/Slider ./components/ScrollBar ./components/NumberSpinner ./components/TextBox ./components/MultiLineTextBox ./components/Label ./components/PanelSeparator ./components/FileChooser ./components/DTTitleBar ./components/IFrame ./components/Toolstrip ./table/Table ./table/List ./buttons/Button ./buttons/ToggleButton ./buttons/CheckBox ./buttons/CheckBoxSplitterButton ./buttons/RadioButton ./buttons/DropdownButton ./buttons/ScrollStripButton".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x,y,B,D,E,F,I,L,C,M,G,N,P,R,S,K,Q,U,T,X,$,V,ka,la,da,ma,ga,na,A,W,J,aa,oa,ea,wa,Ha,z){Function.prototype.bind||(Function.prototype.bind=function(a){if("function"!==typeof this)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");var c=Array.prototype.slice.call(arguments,1),b=this,d=function(){},h=function(){return b.apply(this instanceof d&&a?this:a,c.concat(Array.prototype.slice.call(arguments)))};d.prototype=
this.prototype;h.prototype=new d;return h});return g([],{processingDelay:0,synchronous:!1,manualProcessing:!1,constructor:function(a){a=a||{};if(!a.guiDataService)throw Error("The GUI Data Service service was not specified.");if(!a.layoutService)throw Error("Layout service was not specified.");this._deferred=[];this.guiDataService=a.guiDataService;this.guiDataStore=a.guiDataService.guiDataStore;this.layoutService=a.layoutService;this.pathService=a.pathService;this.legacyFigureControlsManager=a.legacyFigureControlsManager;
a=this._create.bind(this);this.guiDataStore.fetch({query:{type:"GUIContainer"},onItem:a});f.connect(this.guiDataStore,"onNew",this,this._create);f.connect(this.guiDataStore,"onSet",this,this._update);f.connect(this.guiDataStore,"onDelete",this,this._remove);this.widgetHandlerRegistry=this.WidgetHandlerRegistry()},flush:function(){try{this.processDeferred()}catch(a){}var c=new e;setTimeout(function(){c.resolve()},200);return c.promise},WidgetHandlerRegistry:function(){var a=this,c={root:k,GUIContainer:l,
DocumentContainer:m,TabContainer:w,ContentPane:x,MenuBar:F,Menu:I,PopupMenu:L,MenuItem:C,CheckBoxMenuItem:C,MJCheckBoxMenuItem:P,Separator:K,ContextMenuPanel:r,SingleClickPanel:s,Panel:q,LayoutPanel:n,ClosablePanel:p,ScrollPane:t,ClassificationLearnerModelListScrollPane:u,ScrollStrip:t,SplitPane:v,Canvas:R,StreamCanvas:S,IFrame:ga,ToolBarContainer:y,ToolBar:B,Dropdown:Q,Slider:U,ScrollBar:T,NumberSpinner:X,TextBox:$,MultiLineTextBox:V,SyntaxTextPane:V,Label:ka,Button:J,CheckBoxSplitterButton:ea,ToggleButton:aa,
DropdownButton:Ha,CheckBox:oa,RadioButton:wa,PaletteButton:J,ScrollStripButton:z,Table:A,List:W,Tree:D,TreeNode:E,FileChooser:da,PanelSeparator:la,ColorPickerMenuItem:N,DropdownPopup:G,DTTitleBar:ma,Toolstrip:na};return{getHandler:function(b,d){var h,e;if(b&&(a.legacyFigureControlsManager&&(h=a.legacyFigureControlsManager.findAncestorGuiContainer(d)),e=c[b]||"unknown",h&&("GUIContainer"===b||"ToolBarContainer"===b)))e=g([e],{addChild:function(a,c){(!h.docked&&!k.dockAll||"MenuBar"!==a.componentData.type&&
"ToolBar"!==a.componentData.type)&&this.inherited(arguments)}});return e}}},_create:function(a){try{this._createWidget(a)}catch(c){h.log(c)}},_update:function(a,c,b,d){try{this._deferUpdate(a,c,b);var e=this.guiDataStore.items[a.parentId];e&&this._deferChildUpdated(e,a,c,b)}catch(f){h.log(f)}},_remove:function(a){try{var c=this.guiDataStore.items[a.parentId];c&&this._deferRemove(c,a)}catch(b){h.log(b)}},_createWidget:function(a){var c=this.guiDataStore.items[a.parentId];this._deferCreate(c,a);c&&
this._deferAddChild(c,a)},_deferCreate:function(a,c){this._deferred.push({type:"create",parent:a,child:c});this._scheduleProcess()},_deferAddChild:function(a,c){this._deferred.push({type:"append",parent:a,child:c});this._scheduleProcess()},_deferUpdate:function(a,c,b){this._deferred.push({type:"update",item:a,attribute:c,oldValue:b});this._scheduleProcess()},_deferChildUpdated:function(a,c,b,d){this._deferred.push({type:"childUpdated",parent:a,child:c,attribute:b,oldValue:d});this._scheduleProcess()},
_deferRemove:function(a,c){this._deferred.push({type:"destroy",parent:a,child:c});this._scheduleProcess()},_scheduleProcess:function(){if(this.synchronous&&!this.manualProcessing)this._processDeferredActions(this._deferred),this._deferred=[];else if(!this._deferTimeout&&!this.manualProcessing){var a=this;this._deferTimeout=setTimeout(function(){var c=a._deferred;a._deferred=[];a._processDeferredActions(c);a._deferTimeout=null},this.processingDelay)}},processDeferred:function(){var a=this._deferred;
this._deferred=[];this._processDeferredActions(a)},_processDeferredActions:function(a){a=this._filterDestroyedActions(a);a=this._filterRedundantUpdates(a);this._splitDeferredActionRuns(a).forEach(this._processDeferredActionRun,this)},_filterDestroyedActions:function(a){var c,b,d={},h={};for(c=a.length-1;0<=c;c-=1)b=a[c],"destroy"===b.type?h[b.child.id]=c:"create"===b.type&&void 0!==h[b.child.id]?(d[c]=!0,d[h[b.child.id]]=!0):"update"===b.type&&void 0!==h[b.item.id]?d[c]=!0:b.child&&void 0!==h[b.child.id]&&
(d[c]=!0);return a.filter(function(a,c){return!d[c]})},_filterRedundantUpdates:function(a){var c={},b={};return a.filter(function(a){if("update"===a.type){if(!0===c[a.item.id]||c[a.item.id]&&c[a.item.id][a.attribute])return!1;c[a.item.id]=c[a.item.id]||{};return c[a.item.id][a.attribute]=!0}if("childUpdated"===a.type){if(!0===b[a.child.id]||b[a.child.id]&&b[a.child.id][a.attribute])return!1;b[a.child.id]=b[a.child.id]||{};return b[a.child.id][a.attribute]=!0}"create"===a.type&&(c[a.child.id]=!0,b[a.child.id]=
!0);return!0})},_splitDeferredActionRuns:function(a){var c=[],b=0,d=0;a.forEach(function(h,e){var f=d;"create"===h.type||"append"===h.type?f=1:"destroy"===h.type&&(f=2);f!==d&&0!==d?(c.push(a.slice(b,e)),d=0,b=e):d=f});c.push(a.slice(b,a.length));return c},_processDeferredActionRun:function(a){var c={create:[],update:[],append:[],childUpdated:[],destroy:[]};a.forEach(function(a){c[a.type].push(a)},this);this._processDestroy(c.destroy);this._processCreate(c.create);this._processUpdate(c.update);this._processAppend(c.append);
this._processChildUpdated(c.childUpdated)},_processCreate:function(a){var c,b;for(b=0;b<a.length;b+=1){c=a[b];try{var d=this.widgetHandlerRegistry.getHandler(c.child.type,c.child);c.child.widget=new d({widgetData:c.child,parentData:c.parent,peerNode:this.guiDataService.manager.getById(c.child.id),handler:this.guiDataService.registerHandlerService().getHandler(c.child.type),guiDataService:this.guiDataService,layoutService:this.layoutService,pathService:this.pathService})}catch(e){h.error("Error while trying to construct widget: ",
c,e)}}},_processUpdate:function(a){var c,b,d=this.getRoot();for(b=0;b<a.length;b+=1){c=a[b];try{c.item.widget&&c.item.widget.update&&(c.item.widget.update(c.item,c.attribute,c.oldValue,c.item[c.attribute]),"GUIContainer"===c.item.type&&"position"===c.attribute&&c.item.widget.componentData.resizable&&this._isGUIContainerInsideVisibleArea(c.item.position,c.item.widget.layoutWidgetId)&&"function"===typeof d.sendBrowserResize&&d.sendBrowserResize()),"GUIContainer"===c.item.type&&"docked"===c.attribute&&
this._updateToolstrip(c.item)}catch(e){h.error("Error while trying to notify parent widget of child updated: ",c,e)}}},_processAppend:function(a){var c=[],b=[],d={};a.forEach(function(a){d[a.parent.id]?c.push(a):b.push(a);d[a.child.id]=!0});c.forEach(this._doAppend,this);b.forEach(this._doAppend,this)},_doAppend:function(a){try{var c=this._calculateIndex(a.parent,a.child);this._addToToolstrip(a.child);a.parent.widget.addChild(a.child.widget,c)}catch(b){h.error("Error while trying to add child widget: ",
a,b)}},_processChildUpdated:function(a){var c,b;for(c=0;c<a.length;c+=1){b=a[c];try{b.child.widget&&(b.parent.widget&&b.parent.widget.childUpdated)&&b.parent.widget.childUpdated(b.child.widget,b.attribute,b.oldValue,b.child[b.attribute])}catch(d){h.error("Error while trying to notify parent widget of child updated: ",b,d)}}},_processDestroy:function(a){var c,b,d={};for(c=a.length-1;0<=c;c-=1){b=a[c];try{d[b.child.id]=!0,this._cleanupToolstrip(b.child),b.child.parentId&&!d[b.child.parentId]&&b.parent&&
b.parent.widget&&b.parent.widget.removeChild(b.child.widget),"PopupMenu"!==b.child.widget.componentData.type&&!b.child.widget._destroyed&&b.child.widget.destroyRecursive(),delete b.child.widget}catch(e){h.error("Error while trying to destroy widget: ",b,e);try{b.child.widget.destroyRecursive()}catch(f){}}}},_calculateIndex:function(a,c){for(var b="GUIContainer"===a.type||"ToolBar"===a.type||"MenuBar"===a.type||"PopupMenu"===a.type||"ContextMenu"===a.type||"DropdownPopup"===a.type||"Menu"===a.type||
"ToolBarContainer"===a.type||"LayoutPanel"===a.type||"TreeNode"===a.type||"Tree"===a.type||"TabContainer"===a.type||"DocumentContainer"===a.type,d=a._children.map(function(a){return a.id}),h=d.indexOf(c.id),e=a.widget.getChildren(),f,k,l=0,g=e.length;1<=g-l;)f=l+Math.floor((g-l)/2),k=d.indexOf(e[f].id.substring(4)),b&&h<k||!b&&h>k?g=f:l=f+1;return l},_updateToolstrip:function(a){var c=this,b=this._updateToolstripChild.bind(this,a);this.guiDataStore.fetch({query:{type:"MenuBar",parentId:a.id},onItem:b});
this.guiDataStore.fetch({query:{type:"ToolBar",parentId:a.id},onItem:b});this.guiDataStore.fetch({query:{type:"ToolBarContainer",parentId:a.id},onItem:function(b){c._doAppend({parent:a,child:b});c.guiDataStore.fetch({query:{type:"ToolBar",parentId:b.id},onItem:c._updateToolstripChild.bind(c,b)})}})},_updateToolstripChild:function(a,c){this._cleanupToolstrip(c);this._doAppend({parent:a,child:c})},_addToToolstrip:function(a){if(("ToolBar"===a.type||"MenuBar"===a.type)&&this.legacyFigureControlsManager){var c=
this.legacyFigureControlsManager.findAncestorGuiContainer(a);if(c&&(c.docked||k.dockAll))a.docked=!0,this.legacyFigureControlsManager.addWidgetToMap(a.widget,c.id),this.legacyFigureControlsManager.addWidgetToWrapperInToolstrip(a.widget)}},_cleanupToolstrip:function(a){if(("ToolBar"===a.type||"MenuBar"===a.type)&&a.docked&&this.legacyFigureControlsManager)this.legacyFigureControlsManager.removeWidgetFromMap(a.widget),a.parentId=null},getRoot:function(){return k},_isGUIContainerInsideVisibleArea:function(d,
h){var e=d.width,f=d.height,k=a.byId(h);if(k){var l=b.position(k),k=l.x,l=l.y,g=c.getBox(),m=g.h;return e+k>g.w||f+l>m}return!1}})})},"MOTW/mgg/containers/GUIContainer":function(){define("dojo/_base/declare dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/on dojo/_base/event dijit/form/Button ./AbstractContainer".split(" "),function(g,f,e,d,b,a,c,h,k){var l;l=g([k],{resize:function(){this.getChildren().forEach(function(a){a.resize&&a.resize()})},onClose:function(){this.dataService.registerHandlerService().getHandler("GUIContainer").handleEvent(this.widgetId,
{type:"windowClosing"});return!1},_getStyle:function(a){var c=this.inherited(arguments);c.position="relative";delete c.left;delete c.top;return c},buildRendering:function(){this.inherited(arguments);f.add(this.domNode,"mgg")},destroyRecursive:function(){this.contentContainer.onscroll=null;this.inherited(arguments)},getChildren:function(){this.containerNode=this.menuContainer;var a=this.inherited(arguments);this.containerNode=this.toolBarContainer;a=a.concat(this.inherited(arguments));this.containerNode=
this.contentContainer;return a=a.concat(this.inherited(arguments))},_renderComponent:function(d){d.title&&f.add(this.domNode,"mw_name_"+d.title.toLowerCase().replace(/ /g,"_"));d.docked=void 0===d.docked?!0:d.docked;this.contentContainer||(this.menuContainer=e.create("div",{"class":"relativeChild menuBarWrapper"},this.domNode,"last"),this.toolBarContainer=e.create("div",{"class":"relativeChild toolBarWrapper"},this.domNode,"last"),this.contentContainer=e.create("div",{"class":"contentWrapper"},this.domNode,
"last"),this.contentContainer.onscroll=function(){this.scrollTop=this.scrollLeft=0},this.own(a(this.contentContainer,"onselectstart",c,c.stopEvent)));f.toggle(this.contentContainer,"relativeChild",!!d.hasToolBar);l.enableToggleDock&&d.resizable&&!d.modal&&d.dockable?(this.dockButton||(this.dockButton=new h({"class":"dockButton"}),this.connect(this.dockButton,"onClick","_toggleDock"),this.dockButton.placeAt(this.domNode,"last")),this.dockButton.set("iconClass",d.docked?"undockIcon":"dockIcon")):this.dockButton&&
this.dockButton.destroyRecursive();if(!0===d.minimized)this.onMinimized();else this.onWindowShown();d=this._getStyle(d);b.set(this.contentContainer,d);d.width&&b.set(this.domNode,"width",d.width)},addChild:function(a,c){this._addRemoveHelper(a,"add",c)},removeChild:function(a){this._addRemoveHelper(a,"remove")},_addRemoveHelper:function(a,c,b){if("MenuBar"===a.componentData.type)this.containerNode=this.menuContainer;else if("ToolBarContainer"===a.componentData.type||"ToolBar"===a.componentData.type)this.containerNode=
this.toolBarContainer;else{if("PopupMenu"===a.componentData.type){if(dojo.global.contextMenuPosition&&"add"===c){clearTimeout(this.timeout);var d=this.domNode;this.timeout=setTimeout(function(){a.delegate&&!a.delegate._destroyed&&a.delegate._openMyself({target:d,iframe:void 0,coords:{x:dojo.global.contextMenuPosition.x,y:dojo.global.contextMenuPosition.y}})},0);var h=this.dataService;a.delegate.connect(a.delegate,"onClose",function(){h.registerHandlerService().getHandler("PopupMenu").handleEvent(a.componentData.id,
{type:"closeMenu"})})}this.containerNode=this.contentContainer;return}if("null.contentPane"===a.componentData.name)return;this.containerNode=this.contentContainer;this.resize()}"add"===c?(b=Math.max(0,Math.min(b,this.containerNode.children.length)),b===this.containerNode.children.length?this.containerNode.appendChild(a.domNode):this.containerNode.insertBefore(a.domNode,this.containerNode.children[b]),this._started&&(!a._started&&a.startup)&&a.startup(),a.update&&a.update()):a.domNode.parentNode.removeChild(a.domNode);
this.containerNode=this.contentContainer},_toggleDock:function(){this.dataService.registerHandlerService().getHandler("GUIContainer").setProperties(this.componentData.id,{docked:!this.componentData.docked})},onMinimized:function(){},onWindowShown:function(){}});l.enableToggleDock=!1;return l})},"MOTW/mgg/containers/AbstractContainer":function(){define(["dojo/_base/declare","dojo/_base/lang","dijit/layout/_LayoutWidget","../components/AbstractComponent"],function(g,f,e,d){return g([e,d],{addChild:function(b){this.inherited(arguments);
b.update&&b.update()},resize:function(){this.inherited(arguments);this.getChildren().forEach(function(b){b.resize&&b.resize()})}})})},"MOTW/mgg/components/AbstractComponent":function(){define("dojo/_base/declare dojo/dom-class dojo/dom-style dojo/dom-geometry dijit/_Widget mw-browser-utils/BrowserUtils".split(" "),function(g,f,e,d,b,a){function c(){k=this;m||(m=setTimeout(function(){m=null;k.handleFocus();l=k},100))}function h(){p||(p=setTimeout(function(){p=null;l&&l.handleBlur&&l.handleBlur()},
100))}var k,l,m,p;return g([b],{constructor:function(a){a=a||{};if(!a.widgetData)throw Error("No data specified.");if(!a.guiDataService)throw Error("No GUI service specified.");a.id="mgg_"+a.widgetData.id;this.componentData=a.widgetData;this.dataService=a.guiDataService;this.handler=a.handler},postCreate:function(){this.inherited(arguments);a.setClassName(this.domNode,{type:this.componentData.type,name:this.componentData.name});this.widgetId=this.componentData.id;this._focusListener=c.bind(this);
this._blurListener=h.bind(this);this.domNode.addEventListener("focus",this._focusListener,!0);this.domNode.addEventListener("blur",this._blurListener,!0)},destroyRecursive:function(){this.domNode&&(this.domNode.removeEventListener("focus",this._focusListener,!0),this.domNode.removeEventListener("blur",this._blurListener,!0));this.inherited(arguments)},update:function(c){c||(c=this.componentData);this._renderComponent(c);a.setClassName(this.domNode,{type:c.type,name:c.name})},buildRendering:function(){this.inherited(arguments);
this._renderComponent(this.componentData)},startup:function(){this.inherited(arguments);this.update(this.componentData)},_renderComponent:function(a){this._updateDomNodeStyle(a)},_updateDomNodeStyle:function(a){var c=this._getStyle(a);"function"===typeof this.getParent&&(this.getParent()&&"function"===typeof this.getParent().childStyleChanged)&&(c=this.getParent().childStyleChanged(a,c));var b=Object.keys(c),d,h,e,k,l,g=this._style;if(g){l=Object.keys(g);h=l.length;for(d=0;d<h;d+=1)e=l[d],0>b.indexOf(e)&&
(this.domNode.style[e]=null)}h=b.length;for(d=0;d<h;d+=1)if(e=b[d],k=c[e],!l||k!==g[e])this.domNode.style[e]=k;this._style=c;c=this._getClassState(a);b=Object.keys(c);h=b.length;for(d=0;d<h;d+=1)e=b[d],f.toggle(this.domNode,e,c[e]);this.resize&&(this._started&&(c.invisible!==this._lastInvisible&&!c.invisible)&&this.resize(),this._lastInvisible=c.invisible);a.focusable&&(this.domNode.tabIndex=0);a.focused&&!this._lastFocused&&this._setFocus();this._lastFocused=a.focused},_setFocus:function(){var a=
this._getFocusNode(this.domNode);a&&a.focus()},_getFocusNode:function(a){if(this.focusNode)return this.focusNode;for(a=a.firstElementChild;a;){var c=a.tagName.toLowerCase();if(0<=["input","button","select","textbox","textarea"].indexOf(c)||void 0!==a.tabIndex)return a;if(c=this._getFocusNode(a))return c;a=a.nextElementSibling}},handleFocus:function(){this.handler.setProperties(this.componentData.id,{focused:!0},!0)},_getStyle:function(a){var c={};a.position&&(c.position="absolute",c.left=a.position.x+
"px",c.top=a.position.y+"px",c.width=a.position.width+"px",c.height=a.position.height+"px");a.background&&(c.backgroundColor="rgb("+a.background.join(",")+")");a.renderer&&a.renderer.fontSize&&(c.fontSize=a.renderer.fontSize+"px");return c},_getClassState:function(a){var c={},b=void 0===a.visibility||a.visibility;c.invisible=!b;c.passThroughEvents=!b||!!a.passThrough;c.notFocusable=void 0!==a.focusable&&!a.focusable;c.filtered=void 0!==a.filtered&&a.filtered;this.getParent&&(this.getParent()&&this.getParent().childClassStateChanged)&&
(c=this.getParent().childClassStateChanged(a,c));return c}})})},"MOTW/mgg/containers/DocumentContainer":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-construct dojo/dom-style dojo/dom-geometry dijit/registry dojo/Stateful MW/layout/DocumentContainer MW/layout/TabContainer MW/layout/LayoutContainerEvent MW/layout/LayoutChildProperty dijit/layout/ContentPane ./AbstractContainer".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p,n,q){var r=" top  right  bottom  left".split(" "),
s=g([k],{_continueHorizontalSplitterDrag:function(a){this.inherited(arguments);this._continueSplitterDrag(function(a,c,b){return a._rowTop[c.splitterIndex+1]/b.h})},_continueVerticalSplitterDrag:function(a){this.inherited(arguments);this._continueSplitterDrag(function(a,c,b){return a._columnLeft[c.splitterIndex+1]/b.w})},_continueSplitterDrag:function(c){var b=this._splitterDragInfo,d=a.position(this.domNode);c=c(this,b,d);this.dataService.registerHandlerService().getHandler("DocumentContainer").setProperties(this.id,
{splitterRatio:c},!0)},_isAnyInGroupClosable:function(a){return!1}});return g([q],{_renderComponent:function(a){var c=this,b=this.container;this.inherited(arguments);if(b){this._setArrangementClient(a.id,a.arrangement);for(var d=b._getTabContainers(),h=0;h<d.length;h++){var f="center";0<d.length&&(f=0===h?"left":"right");this._addTabContainerWatch(f,d[h])}for(var l in b._properties)b._properties[l].setId="left";a.tabPosition1&&c.container._getTabContainers()[0].tabPosition!=a.tabPosition1&&c.container._getTabContainers()[0]._setTabPositionAttr(a.tabPosition1);
a.tabPosition2&&(0!=c.container._getArrangementAttr()&&c.container._getTabContainers()[1].tabPosition!=a.tabPosition2)&&c.container._getTabContainers()[1]._setTabPositionAttr(a.tabPosition2);if(Object.keys(a.documents).length===c.container.getDocuments().length&&(0===c.container._getArrangementAttr()||!Object.values(a.documents).every(function(a){return"left"===a}))){var g=c.container.getDocuments(),m=a.documents.sort(function(a,c){return a.region!=c.region?"right"===a.region||"bottom"===a.region:
a.order>c.order});if(0!=c.container._getArrangementAttr())for(h=0;h<g.length;h++)(d=m.find(function(a){return g[h].title===a.title}))&&d.region!=g[h].getParent().region&&c.container.moveDocument(g[h],d.region);for(var d=-1,n,h=0;h<m.length;h++)if(l="right"===m[h].region||"bottom"===m[h].region?1:0,d!=l&&(d=l,n=-1),n++,l=c.container._getTabContainers()[l],m[h].title!=l._tabBar._buttonInfo[n].button.widget.title){var p=l._tabBar._buttonInfo.findIndex(function(a){return m[h].title===a.button.widget.title});
0<=p&&(c.container.clientOnly=!0,l._tabBar._changeButtonIndices(p,n,1),delete c.container.clientOnly)}}if(c.container.arrangementChanged){delete c.container.arrangementChanged;g=c.container.getDocuments();for(h=0;h<g.length;h++)a.documents.find(function(a){return a.isShowing&&g[h].title===a.title})&&g[h].getParent()._getShowingChildAttr()!=g[h]&&g[h].getParent()._setShowingChildAttr(g[h])}}else{b=this.container=new s({id:a.id,groupTabsByType:!0,typeInfo:{left:{defaultRegion:"left",collectiveLabel:"Type 1s",
willReopen:!0},right:{defaultRegion:"right",collectiveLabel:"Type 2s",willReopen:!0},center:{defaultRegion:"center",collectiveLabel:"Type 3s",willReopen:!0}},userTilingEnabled:!0,restrictToSingleSplit:!0,tileByDragEnabled:!1,showSingleDocumentTab:!0,animationEnabled:!1,dataService:this.dataService},this.domNode);this._setArrangementClient(a.id,a.arrangement);var q=b.closeAll;b.closeAll=function(){b.closeAllCount=b.getDocuments().length;q.bind(b)()};b.watch(k.ARRANGEMENT,function(a,b,d){c._setArrangement(c.componentData.id,
d);for(f in c.container._borderInfo)c.container._borderInfo[f].isCollapsible=!1});e.before(b,"_setGridSizeAttr",function(a){b.gridResizing=!0});e.after(b,"_setGridSizeAttr",function(a){delete b.gridResizing;return a});e.before(b,"_endChildDrag",function(a){a=b._childDragInfo;var d;if(a.startTile!==a.tile){d=c.container._getTabContainers()[a.startTile].tablist._buttonInfo;var h;h=0===a.startTile?1===c.container._getArrangementAttr()?"left":"top":2===c.container._getArrangementAttr()?"right":"bottom";
if(1==d.length)c._setArrangement(0,0);else{var e,f=a.children[0].getParent().tablist._buttonInfo;for(d=0;d<f.length;d++)if(a.children[0].title===f[d].button.widget.title){e=d;break}c.dataService.registerHandlerService().getHandler("DocumentContainer").handleEvent(c.componentData._children[0].id,{type:"moveDocument",region:h,tabPosition:e})}}})}b&&this._started&&(b.startup(),b.resize())},_setArrangementClient:function(a,c){this.container.get("arrangement")!=c&&(this.container._setArrangementAttr(c),
this.container.arrangementChanged=!0)},_setArrangement:function(a,c){if(this.arrangement!=c){this.arrangement=c;var b=this.dataService.registerHandlerService().getHandler("DocumentContainer"),d="left";0===c&&(d="center");b.setProperties(this.componentData.id,{arrangement:c.toString(),region:d,newIndex:0},!0);this.container.arrangementChanged=!0}},_addTabContainerWatch:function(a,c){var b=this,d=b.dataService.registerHandlerService().getHandler("DocumentContainer");c.region=a;c.hasWatched||(c.hasWatched=
!0,c.watch(l.TAB_POSITION,function(a,h,e){a={type:"tabPosition",region:c.region,tabPosition:r.indexOf(e)};d.handleEvent(b.componentData._children[0].id,a)}),c.watch(l.SHRINK_TABS_TO_FIT,function(a,h,e){d.setProperties(b.componentData.id,{region:c.region,shrinkTabsToFit:e},!0)}),c._tabBar.tabContainer=c,e.after(c._tabBar,"_changeButtonIndices",function(a,h){b.container.clientOnly||d.handleEvent(b.componentData._children[0].id,{type:"orderTab",region:c.region,tabIndexFrom:h[0],tabIndexTo:h[1],selectedTitle:c.selectedChildWidget.title})}))},
removeChild:function(a){this.container.removeChild(a);this.inherited(arguments)},addChild:function(a){var c=this,b=c.dataService.registerHandlerService().getHandler("DocumentContainer");a.onClose=function(){var a=this.getParent().region;if(("left"===a||"top"===a)&&0===this.parentData.arrangement)a="center";var d,h=c.container.closeAllCount&&0<c.container.closeAllCount;if(!h&&1<this.getParent()._tabInfo.length){d=-1;for(h=0;h<this.getParent().tablist._buttonInfo.length;h++)if(this.id===this.getParent().tablist._buttonInfo[h].properties.documentId){d=
h;break}}else{d=0;if(!h&&("right"===a||"bottom"===a))totalTabs=c.container._getTabContainers()[0].tablist._buttonInfo.length+c.container._getTabContainers()[1].tablist._buttonInfo.length,d=totalTabs-1;0<c.container.closeAllCount&&c.container.closeAllCount--;b.setProperties(c.componentData.id,{arrangement:"0"},!0);a="center"}b.handleEvent(this.widgetId,{type:"closeTab",region:a,index:d});return!0};var d=a.widgetData.documentType,e=new h({title:a.title,description:a.description,documentId:a.id,closable:!0,
documentType:d});0<c.container.getChildren().length&&(c.container._targetTile="right"===d||"bottom"===d?1:0);e.set(p.REGION,d);e.watch(p.IS_SELECTED,function(d,h,e){"isSelected"===d&&(h!=e&&e)&&(d=a.getParent()._tabBar._buttonInfo.findIndex(function(c){return a.title===c.button.widget.title}),d={type:"selectDocument",region:0===c.container._getArrangementAttr()?"center":a.widgetData.documentType,index:d},b.handleEvent(a.widgetId,d))});c.container.addWithProperties(a,e)},destroyRecursive:function(){this.container.destroyRecursive();
this.inherited(arguments)}})})},"MOTW/mgg/containers/ClosablePanel":function(){define(["dojo/_base/declare","dojo/dom-construct","dojo/dom-style","dijit/TitlePane","./AbstractContainer"],function(g,f,e,d,b){return g([b],{buildRendering:function(){this.containerNode=f.create("div");this.inherited(arguments)},_getStyle:function(a){var c=this.inherited(arguments);delete c.width;delete c.height;return c},_renderComponent:function(a){this.inherited(arguments);if(this.titlePane)this.titlePane.set("title",
a.title),this.titlePane.set("open",!1!==a.open);else{this.titlePane=new d({title:a.title,open:!1!==a.open,content:this.containerNode,duration:0});this.own(this.titlePane);this.titlePane.placeAt(this.domNode);var c=this.dataService;this.titlePane.watch("open",function(){c.registerHandlerService().getHandler("Button").setProperties(a.id,{open:this.get("open")})})}e.set(this.containerNode,{position:"relative",width:this.componentData.position.width+"px",height:this.componentData.position.height+"px"})}})})},
"MOTW/mgg/containers/LayoutPanel":function(){define(["dojo/_base/declare","dojo/dom-construct","dojo/dom-style","./Panel"],function(g,f,e,d){return g([d],{_getStyle:function(b){var a=this.inherited(arguments);delete a.width;delete a.height;return a},childStyleChanged:function(b,a){delete a.left;delete a.top;"none"!==a.display&&(a.display="block");a.position="relative";return a}})})},"MOTW/mgg/containers/Panel":function(){define(["dojo/_base/declare","dojo/dom-construct","dojo/dom-style","./AbstractContainer",
"../utils/TextUtils"],function(g,f,e,d,b){return g([d],{_getStyle:function(a){var c=this.inherited(arguments);delete c.pointerEvents;a.borderType&&("LineBorder"===a.borderType&&!(a.borderTitle||"TitledBorder"===a.borderType))&&this._addBorderProperties(a,c);return c},_addBorderProperties:function(a,c){c=c||{};var b;a.borderColor&&(b=a.borderColor.map(function(a){return Math.floor(255*a)}),c.borderColor="rgb("+b.join(",")+")");a.borderWidth&&(c.borderWidth=a.borderWidth+"px",c.borderStyle="solid");
return c},_renderComponent:function(a){this.inherited(arguments);if(a.borderTitle&&void 0===this.field){this.containerNode=this.field=f.create("fieldset");this.title=f.create("legend",{innerHTML:a.borderTitle});a.fontName&&(this.title.style.font=a.fontName);a.fontColor&&(this.title.style.fontColor="rgb("+a.fontColor.join(",")+")");if(a.fontSize){var c=b.getAdjustedFontSize(a.fontSize);this.title.style.fontSize=c+"px";this.title.style.lineHeight=a.fontSize+"px"}a.fontBold&&(this.title.style.fontWeight=
"bolder");a.fontItalic&&(this.title.style.fontStyle="italic");f.place(this.title,this.field);f.place(this.field,this.domNode)}a.borderType&&"TitledBorder"===a.borderType&&(void 0===this.field&&(this.containerNode=this.field=f.create("fieldset"),f.place(this.field,this.domNode)),e.set(this.field,this._addBorderProperties(a)));this.handleOnScroll()},handleOnScroll:function(){this.domNode.onscroll=function(){this.scrollTop=this.scrollLeft=0}}})})},"MOTW/mgg/utils/TextUtils":function(){define([],function(){var g=
{size:"fontSize",family:"fontFamily",style:"fontStyle",weight:"fontWeight",align:"textAlign",valign:"verticalAlign",color:"color"},f={size:"font-size",family:"font-family",style:"font-style",weight:"font-weight",align:"text-align",valign:"vertical-align",color:"color"};return{getTextStyle:function(e){return this._getTextStyle(e,g)},getTextStyleDashes:function(e){return this._getTextStyle(e,f)},_getTextStyle:function(e,d){var b=null,a={Dialog:"Helvetica",DialogInput:"Monaco",Monospaced:"monospace",
Serif:"serif",SansSerif:"sans-serif",Helvetica:"Helvetica"},b=!1===e.enabled?[128,128,128]:e.fontColor,c={},h=this.getAdjustedFontSize(e.fontSize);c[d.size]=h+"px";c[d.family]=e.fontName?a[e.fontName]:void 0;c[d.style]=e.fontItalic?"italic":void 0;c[d.weight]=e.fontBold?"bolder":"normal";c[d.align]=e.horizontalAlignment||e.textAlign;c[d.valign]=e.verticalAlignment;c[d.color]=b?"rgb("+b.join(",")+")":"";return c},getAdjustedFontSize:function(e){var d=12;e&&(d=11<e?Math.max(11,Math.round(0.85*e)):e);
return d}}})},"MOTW/mgg/containers/ContextMenuPanel":function(){define("dojo/_base/declare dojo/on dojo/dom-geometry dojo/_base/event dojo/_base/lang ./AbstractContainer".split(" "),function(g,f,e,d,b,a){var c=this;return g([a],{_renderComponent:function(a){this.inherited(arguments)},postCreate:function(){this.own(f(this.domNode,"contextmenu",b.hitch(this,"onContextMenu")))},onContextMenu:function(a){d.stop(a);var b=e.position(this.domNode);c.contextMenuPosition={x:a.pageX,y:a.pageY};this.handler.handleEvent(this.componentData.id,
{type:"contextMenu",x:a.pageX-b.x,y:a.pageY-b.y})}})})},"MOTW/mgg/containers/SingleClickPanel":function(){define(["dojo/_base/declare","dojo/on","./AbstractContainer"],function(g,f,e){return g([e],{_renderComponent:function(d){this.inherited(arguments)},postCreate:function(){var d=this;this.own(f(this.domNode,"click",function(){d.handler.handleEvent(d.componentData.id,{type:"clicked"})}))}})})},"MOTW/mgg/containers/ScrollPane":function(){define(["dojo/_base/declare","./Panel"],function(g,f){return g([f],
{_overflowMap:{"default":"auto",always:"scroll",needed:"auto",never:"hidden"},childStyleChanged:function(e,d){this._childWidth=e.position.width;this._childHeight=e.position.height;this.defer(this.update,0);return this.inherited(arguments)||d},_getStyle:function(e){var d=this.inherited(arguments);d.overflowX=!this._childWidth||this._childWidth>e.position.width?this._overflowMap[e.horizontalScrollPolicy||"default"]:"hidden";d.overflowY=!this._childHeight||this._childHeight>e.position.height?this._overflowMap[e.verticalScrollPolicy||
"default"]:"hidden";return d},handleOnScroll:function(){}})})},"MOTW/mgg/containers/ClassificationLearnerModelListScrollPane":function(){define(["dojo/_base/declare","./ScrollPane","dojo/dom-geometry","dojo/dom"],function(g,f,e,d){return g([f],{childStyleChanged:function(b,a){if(d.byId(b.widget.id)){var c=e.position(b.widget.id);e.position(this.id).y>=c.y-2&&0>b.position.y&&(a.top="0px")}this._childWidth=b.position.width;this._childHeight=b.position.height;this.defer(this.update,0);return this.inherited(arguments)||
a}})})},"MOTW/mgg/containers/SplitPane":function(){define("dojo/_base/declare dojo/_base/event dojo/_base/window dojo/dom-class dojo/dom-construct dojo/dom-style ./Panel".split(" "),function(g,f,e,d,b,a,c){return g([c],{constructor:function(){this._dragListeners=[]},_renderComponent:function(c){this.inherited(arguments);this.componentData=c;this.splitter||(this.splitter=b.create("div",{"class":"splitter"},this.domNode,"first"),this.connect(this.splitter,"onmousedown",this._handleMouseDown));d.toggle(this.splitter,
"horizontal","horizontal"!==c.orientation);d.toggle(this.splitter,"vertical","horizontal"===c.orientation);"horizontal"===c.orientation?a.set(this.splitter,{position:"absolute",left:c.dividerLocation+"px",width:c.dividerSize+"px",height:"100%",backgroundColor:this.domNode.style.backgroundColor}):a.set(this.splitter,{position:"absolute",top:c.dividerLocation+"px",width:"100%",height:c.dividerSize+"px",backgroundColor:this.domNode.style.backgroundColor})},addChild:function(){this.inherited(arguments);
this._updateCursor()},removeChild:function(){this.inherited(arguments);this._updateCursor()},_updateCursor:function(){var c="default";1<this.getChildren().length&&this.splitter&&(c="horizontal"===this.componentData.orientation?"col-resize":"row-resize");a.set(this.splitter,"cursor",c)},_handleMouseDown:function(c){1<this.getChildren().length&&!this._dragging&&(this._startX=c.pageX,this._startY=c.pageY,a.set(this.splitter,{backgroundColor:"gray"}),this._dragListeners.push(this.connect(e.doc,"onmousemove",
this._handleMouseMove)),this._dragListeners.push(this.connect(e.doc,"onmouseup",this._handleMouseUp)),this._dragListeners.push(this.connect(e.body(),"onselectstart",f,f.stop)),d.add(e.body(),"preventDragSelection"),this._dragging=!0)},_handleMouseMove:function(c){1<this.getChildren().length&&this._dragging&&(f.stop(c),"horizontal"===this.componentData.orientation?(this._newDividerLocation=this.componentData.dividerLocation+c.pageX-this._startX,a.set(this.splitter,"left",this._newDividerLocation+"px")):
(this._newDividerLocation=this.componentData.dividerLocation+c.pageY-this._startY,a.set(this.splitter,"top",this._newDividerLocation+"px")))},_handleMouseUp:function(c){f.stop(c);this._dragListeners.forEach(function(a){this.disconnect(a)},this);this._dragListeners=[];d.remove(e.body(),"preventDragSelection");a.set(this.splitter,{backgroundColor:this.domNode.style.backgroundColor});this._dragging=!1;1<this.getChildren().length?this.dataService.registerHandlerService().getHandler("SplitPane").handleEvent(this.widgetId,
{type:"setDividerLocation",dividerLocation:this._newDividerLocation}):this.update()}})})},"MOTW/mgg/containers/TabContainer":function(){define(["dojo/_base/declare","dijit/layout/TabContainer","./AbstractContainer"],function(g,f,e){return g([e],{_renderComponent:function(d){this.inherited(arguments);this.tabContainer||(this.tabContainer=new f({useMenu:!1,style:"width:100%; height:100%;"}),this.own(this.tabContainer),this.tabContainer.placeAt(this.domNode,"first"),this._started&&this.tabContainer.startup());
this.tabContainer.getChildren().indexOf(this.tabContainer.selectedChildWidget)!=d.selectedIndex&&this.setSelectedIndex(d.selectedIndex);this._started&&this.tabContainer.resize()},setSelectedIndex:function(d){(d=this.tabContainer.getChildren()[d])&&this.tabContainer.selectChild(d)},_getStyle:function(d){var b=this.inherited(arguments);delete b.backgroundColor;if(d.borderType&&"LineBorder"===d.borderType){var a=d.borderColor.map(function(a){return Math.floor(255*a)});b.borderColor="rgb("+a.join(",")+
")";b.borderWidth=d.borderWidth+"px";b.borderStyle="solid"}d.insets&&(b.paddingLeft=d.insets.left+"px",b.paddingRight=d.insets.right+"px",b.paddingTop=d.insets.top+"px",b.paddingBottom=d.insets.bottom+"px");return b},addChild:function(d,b){var a=this;d.onShow=function(){a._addingChild||this.dataService.registerHandlerService().getHandler("TabContainer").setProperties(a.componentData.id,{selectedIndex:a.tabContainer.getChildren().indexOf(this)},!0)};d.onClose=function(){var c={type:"closeTab",tabId:a.tabContainer.getChildren().indexOf(this)};
this.dataService.registerHandlerService().getHandler("ContentPane").handleEvent(this.widgetId,c);return!1};this.componentData.selectedIndex===b&&d.set("selected",!0);this._addingChild=!0;this.tabContainer.addChild(d,b);this._addingChild=!1;this.tabContainer._started&&this.setSelectedIndex(this.componentData.selectedIndex)},removeChild:function(d){delete d.onShow;delete d.onClose;this.tabContainer.removeChild(d)},getChildren:function(){return this.tabContainer?this.tabContainer.getChildren():[]},startup:function(){this.inherited(arguments);
if(!this.tabContainer._started){this.tabContainer.startup();var d=this.tabContainer.getChildren()[this.componentData.selectedIndex];d&&this.tabContainer._showChild(d);this.tabContainer.resize()}},resize:function(){this.inherited(arguments);return this.tabContainer.resize()}})})},"MOTW/mgg/containers/ContentPane":function(){define(["dojo/_base/declare","mw-html-utils/HtmlUtils","./Panel"],function(g,f,e){return g([e],{constructor:function(d){this.title=d.widgetData.title;this.tooltip=d.widgetData.tooltip;
this.closable=!!d.widgetData.closable},_renderComponent:function(d){this.inherited(arguments);this.set("title",f.escapeHtml(d.title));this.domNode.title="";this.set("tooltip",d.tooltip||"");this.set("closable",!!d.closable);this.set("disabled",!1===d.enabled)}})})},"MOTW/mgg/containers/ToolBarContainer":function(){define(["dojo/_base/declare","./Panel"],function(g,f){return g([f],{_getStyle:function(e){var d=this.inherited(arguments);delete d.position;delete d.width;delete d.height;return d},addChild:function(){this.inherited(arguments);
this._updateParent()},removeChild:function(){this.inherited(arguments);this._updateParent()},_updateParent:function(){if(this.domNode){var e=this.getParent();e&&e.childUpdated&&e.childUpdated(this)}}})})},"MOTW/mgg/containers/ToolBar":function(){define(["dojo/_base/declare","dijit/Toolbar","mw-browser-utils/BrowserUtils","../components/AbstractComponent","../components/_DelegatingComponent"],function(g,f,e,d,b){return g([d,b],{buildRendering:function(){this.inherited(arguments);this.delegate.placeAt(this.domNode)},
destroyRecursive:function(){this.delegate.destroyRecursive();this.inherited(arguments)},update:function(){this.inherited(arguments);this._renderComponent(this.componentData)},_getStyle:function(){var a=this.inherited(arguments);delete a.position;delete a.width;return a},_getClassState:function(a){var c=this.inherited(arguments);c.mgg=!0;return c},_constructDelegate:function(){var a=new f({});a.childStyleChanged=function(a,b){delete b.position;delete b.left;delete b.top;delete b.backgroundColor;"none"!==
b.display&&(b.display="inline-block");b.position="relative";return b};return a}})})},"dijit/Toolbar":function(){define("require dojo/_base/declare dojo/has dojo/keys dojo/ready ./_Widget ./_KeyNavContainer ./_TemplatedMixin".split(" "),function(g,f,e,d,b,a,c,h){return f("dijit.Toolbar",[a,h,c],{templateString:'\x3cdiv class\x3d"dijit" role\x3d"toolbar" tabIndex\x3d"${tabIndex}" data-dojo-attach-point\x3d"containerNode"\x3e\x3c/div\x3e',baseClass:"dijitToolbar",_onLeftArrow:function(){this.focusPrev()},
_onRightArrow:function(){this.focusNext()}})})},"MOTW/mgg/components/_DelegatingComponent":function(){define(["dojo/_base/declare","dojo/dom-style","mw-browser-utils/BrowserUtils"],function(g,f,e){return g([],{constructor:function(d){d=d||{};this.componentData=d.widgetData;this.parentData=d.parentData;this.dataService=d.guiDataService;this.delegate=this._constructDelegate("mgg_"+this.componentData.id,this.componentData,this.parentData);this._updateDelegate(this.delegate,this.componentData,this.parentData);
e.setClassName(this.delegate.domNode,{type:this.componentData.type,name:this.componentData.name})},startup:function(){this.inherited(arguments);this.delegate.startup()},update:function(d){d?this.componentData=d:d=this.componentData;this.delegate=this._updateDelegate(this.delegate,d,this.parentData)},addChild:function(d,b){d.delegate?this.delegate.addChild(d.delegate,b):this.delegate.addChild(d,b)},removeChild:function(d){d.delegate?this.delegate.removeChild(d.delegate):this.delegate.removeChild(d)},
getChildren:function(){return this.delegate.getChildren()},destroyRecursive:function(){this.delegate.destroyRecursive();this.inherited(arguments)},_updateDelegate:function(d,b,a){b.text&&d.set("label",b.text);d.set("disabled",!b.enabled);if("PopupMenu"===b.type)return d;b.filtered||!1===b.visibility||"Menu"===b.type&&""===b.text?f.set(d.domNode,{display:"none"}):f.set(d.domNode,{display:""});return d}})})},"MOTW/mgg/containers/Tree":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/event dojo/_base/lang dojo/dom-class dojo/on dijit/registry ./Panel".split(" "),
function(g,f,e,d,b,a,c,h){var k=this;return g([h],{handleOnScroll:function(){},buildRendering:function(){this.inherited(arguments);this.own(a(this.domNode,".treeNodeArrow:click",d.hitch(this,"onArrowClick")));this.own(a(this.domNode,".treeNodeLabel:click",d.hitch(this,"onItemClick")));this.own(a(this.domNode,".treeNodeLabel:contextmenu",d.hitch(this,"onItemContextMenu")));this.own(a(this.domNode,".treeNodeLabel:dblclick",d.hitch(this,"onItemDblClick")))},onArrowClick:function(a){a=c.getEnclosingWidget(a.target);
var b=this.componentData.expandedNodes||[],b=b.slice(0,b.length),d=b.indexOf(a.componentData.id);-1<d?b.splice(d,1):b.push(a.componentData.id);this.dataService.registerHandlerService().getHandler("Tree").setProperties(this.componentData.id,{expandedNodes:b})},onItemClick:function(a){a=c.getEnclosingWidget(a.target);this.dataService.registerHandlerService().getHandler("Tree").setProperties(this.componentData.id,{selectedNodes:[a.componentData.id]})},onItemDblClick:function(a){a=c.getEnclosingWidget(a.target);
this.dataService.registerHandlerService().getHandler("Tree").setProperties(this.componentData.id,{selectedNodes:[a.componentData.id]});this.dataService.registerHandlerService().getHandler("Tree").handleEvent(this.componentData.id,{type:"mouseDoubleClick",node:a.componentData.id})},onItemContextMenu:function(a){k.contextMenuPosition={x:a.pageX,y:a.pageY};e.stop(a);a=c.getEnclosingWidget(a.target);this.dataService.registerHandlerService().getHandler("Tree").setProperties(this.componentData.id,{selectedNodes:[a.componentData.id]});
this.dataService.registerHandlerService().getHandler("Tree").handleEvent(this.componentData.id,{type:"contextMenu",node:a.componentData.id})},_renderComponent:function(a){this.inherited(arguments);b.toggle(this.domNode,"rootHidden",!a.rootVisible);this._updateChildren(a.selectedNodes);this._updateChildren(a.expandedNodes);this._updateChildren(this.oldSelected);this._updateChildren(this.oldExpanded);this.oldSelected=this.componentData.selectedNodes;this.oldExpanded=this.componentData.expandedNodes},
_updateChildren:function(a){a&&a.forEach(function(a){(a=c.byId("mgg_"+a))&&a.update()})},childClassStateChanged:function(a,c){c.expanded=this.componentData.expandedNodes&&-1<this.componentData.expandedNodes.indexOf(a.id);c.selected=this.componentData.selectedNodes&&-1<this.componentData.selectedNodes.indexOf(a.id);return c}})})},"MOTW/mgg/containers/TreeNode":function(){define(["dojo/_base/declare","dojo/dom-construct","dojo/dom-class","../components/_IconComponent","./AbstractContainer"],function(g,
f,e,d,b){return g([b,d],{_renderComponent:function(a){this.inherited(arguments);this.item?this.oldLabel!==a.label&&(this.oldLabel=this.itemData.innerHTML=a.label):(this.item=f.create("div",{"class":"treeNodeItem"},this.domNode,"first"),this.arrow=f.create("span",{"class":"treeNodeArrow"},this.item,"first"),this.iconNode=f.create("span",{"class":"treeNodeIcon"},this.item,"last"),this.itemData=f.create("span",{"class":"treeNodeLabel",innerHTML:a.label},this.item,"last"),this.containerNode=f.create("div",
{"class":"treeNodeContainer"},this.domNode,"last"));this._createOrUpdateIcon(this.iconNode,a)},_getClassState:function(a){var c=this.inherited(arguments);c.innerNode=!a.leaf;return c},childClassStateChanged:function(a,c){this.getParent&&(this.getParent()&&this.getParent().childClassStateChanged)&&(c=this.getParent().childClassStateChanged(a,c));return c}})})},"MOTW/mgg/components/_IconComponent":function(){define(["dojo/_base/declare","dojo/dom-class","dojo/dom-construct","dojo/has"],function(g,f,
e,d){return g([],{_createOrUpdateIcon:function(b,a,c){c=c||"icon";this._centeringHelper||(this._centeringHelper=e.create("span",{"class":"iconCenteringHelper"},b,"first"));a[c]&&b&&(this._canvas?(this._clear(),this._canvas.width=a[c].width,this._canvas.height=a[c].height):(this._canvas=e.create("canvas",{width:a[c].width,height:a[c].height},this._centeringHelper,"after"),this._context=this._canvas.getContext("2d")),a.icon instanceof Image?this._context.drawImage(a[c],0,0):(d("trident")&&(this._context.fillStyle=
"rgba(0,0,0,0.01)",this._context.fillRect(0,0,this._canvas.width,this._canvas.height)),this._context.putImageData(a[c],0,0)),a.position&&15>a.position.height?f.add(b,"smallIcon"):f.remove(b,"smallIcon"))},hasIcon:function(){return this._canvas},_clear:function(){this._context.beginPath();this._context.clearRect(0,0,this._canvas.width,this._canvas.height);this._context.closePath()}})})},"MOTW/mgg/menus/MenuBar":function(){define(["dojo/_base/declare","dijit/MenuBar","../components/AbstractComponent",
"../components/_DelegatingComponent"],function(g,f,e,d){return g([e,d],{buildRendering:function(){this.inherited(arguments);this.delegate.placeAt(this.domNode)},destroyRecursive:function(){this.delegate.destroyRecursive();this.inherited(arguments)},update:function(){this.inherited(arguments);this._renderComponent(this.componentData)},_getStyle:function(){var b=this.inherited(arguments);delete b.width;delete b.height;return b},_getClassState:function(b){var a=this.inherited(arguments);a.mgg=!0;return a},
_constructDelegate:function(){var b=new f({});b._onContainerFocus=function(){};return b}})})},"dijit/MenuBar":function(){define(["dojo/_base/declare","dojo/keys","./_MenuBase","dojo/text!./templates/MenuBar.html"],function(g,f,e,d){return g("dijit.MenuBar",e,{templateString:d,baseClass:"dijitMenuBar",popupDelay:0,_isMenuBar:!0,_orient:["below"],_moveToPopup:function(b){if(this.focusedChild&&this.focusedChild.popup&&!this.focusedChild.disabled)this.onItemClick(this.focusedChild,b)},focusChild:function(b){this.inherited(arguments);
this.activated&&(b.popup&&!b.disabled)&&this._openItemPopup(b,!0)},_onChildDeselect:function(b){this.currentPopupItem==b&&(this.currentPopupItem=null,b._closePopup());this.inherited(arguments)},_onLeftArrow:function(){this.focusPrev()},_onRightArrow:function(){this.focusNext()},_onDownArrow:function(b){this._moveToPopup(b)},_onUpArrow:function(){},onItemClick:function(b,a){b.popup&&b.popup.isShowingNow&&(!/^key/.test(a.type)||a.keyCode!==f.DOWN_ARROW)?(b.focusNode.focus(),this._cleanUp(!0)):this.inherited(arguments)}})})},
"MOTW/mgg/menus/Menu":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-style dijit/PopupMenuBarItem dijit/PopupMenuItem ../components/_DelegatingComponent".split(" "),function(g,f,e,d,b,a){var c=g([d],{startup:function(){this.popup&&this.inherited(arguments)},_setLabelAttr:function(a){this._set("label",a);for("object"===typeof a&&(a=a.label||a.value);this.containerNode.firstChild;)this.containerNode.removeChild(this.containerNode.firstChild);this.containerNode.appendChild(document.createTextNode(a))}}),
h=g([b],{startup:function(){this.popup&&this.inherited(arguments)},_setLabelAttr:function(a){this._set("label",a);for("object"===typeof a&&(a=a.label||a.value);this.containerNode.firstChild;)this.containerNode.removeChild(this.containerNode.firstChild);this.containerNode.appendChild(document.createTextNode(a))}});return g([a],{_constructDelegate:function(a,b,d){a="MenuBar"===d.type?new c({id:a}):new h({id:a});var g=this.dataService;"ContextMenu"!==this.parentData.type&&a.connect(a.domNode,"onclick",
function(){g.registerHandlerService().getHandler("Menu").handleEvent(b.id,{type:"buttonClicked"})});a.connect(a.domNode,"onmouseenter",function(){var a={type:"mouseEnter"},c=this.getParent(),d=c.getChildren();a.isShowingNow=c.isShowingNow||d.some(function(a){return f.getObject("popup.isShowingNow",!1,a)});g.registerHandlerService().getHandler("Menu").handleEvent(b.id,a)});a.connect(a.domNode,"onmouseleave",function(){g.registerHandlerService().getHandler("Menu").handleEvent(b.id,{type:"mouseLeave"})});
a.addChild=function(a){this.popup=a;a=this.getParent();!this._started&&(a&&a._started)&&this.startup();this.arrowWrapper&&e.set(this.arrowWrapper,"visibility","")};a.removeChild=function(){this.popup=null};return a}})})},"dijit/PopupMenuBarItem":function(){define(["dojo/_base/declare","./PopupMenuItem","./MenuBarItem"],function(g,f,e){return g("dijit.PopupMenuBarItem",[f,e._MenuBarItemMixin],{})})},"dijit/MenuBarItem":function(){define(["dojo/_base/declare","./MenuItem","dojo/text!./templates/MenuBarItem.html"],
function(g,f,e){e=g("dijit._MenuBarItemMixin",null,{templateString:e,_setIconClassAttr:null});g=g("dijit.MenuBarItem",[f,e],{});g._MenuBarItemMixin=e;return g})},"MOTW/mgg/menus/PopupMenu":function(){define(["dojo/_base/declare","dijit/Menu","../components/_DelegatingComponent"],function(g,f,e){return g([e],{_constructDelegate:function(d,b){return new f({id:d,baseClass:"ww-contextMenu"})}})})},"MOTW/mgg/menus/MenuItem":function(){define(["dojo/_base/declare","dijit/MenuItem","../Root","../components/_DelegatingComponent"],
function(g,f,e,d){var b=g([f],{_setLabelAttr:function(a){this._set("label",a);for("object"===typeof a&&(a=a.label||a.value);this.containerNode.firstChild;)this.containerNode.removeChild(this.containerNode.firstChild);this.containerNode.appendChild(document.createTextNode(a))}});return g([d],{_constructDelegate:function(a,c){var b=this._makeWidget(a,c),d=this.dataService;b.connect(b,"_onClick",function(){d.registerHandlerService().getHandler("Menu").handleEvent(c.id,{type:"buttonClicked"});"Delete"===
b.label&&e.emptyEval()});b.connect(b,"_onHover",function(){d.registerHandlerService().getHandler("Menu").handleEvent(c.id,{type:"hover"})});b.connect(b,"_onUnhover",function(){d.registerHandlerService().getHandler("Menu").handleEvent(c.id,{type:"unhover"})});return b},_makeWidget:function(a){return new b({id:a})}})})},"MOTW/mgg/menus/CheckBoxMenuItem":function(){define(["dojo/_base/declare","dijit/CheckedMenuItem","../components/_DelegatingComponent"],function(g,f,e){var d=g([f],{_setLabelAttr:function(b){this._set("label",
b);for("object"===typeof b&&(b=b.label||b.value);this.containerNode.firstChild;)this.containerNode.removeChild(this.containerNode.firstChild);this.containerNode.appendChild(document.createTextNode(b))}});return g([e],{_constructDelegate:function(b,a){var c=new d({id:b}),h=this.dataService;c.connect(c,"_onClick",function(){h.registerHandlerService().getHandler("Menu").handleEvent(a.id,{type:"buttonClicked"})});c.connect(c,"_onHover",function(){h.registerHandlerService().getHandler("Menu").handleEvent(a.id,
{type:"hover"})});c.connect(c,"_onUnhover",function(){h.registerHandlerService().getHandler("Menu").handleEvent(a.id,{type:"unhover"})});return c},_updateDelegate:function(b,a){b=this.inherited(arguments);b.set("checked",a.selected||!1);return b}})})},"MOTW/mgg/menus/DropdownPopup":function(){define("dojo/_base/declare dojo/aspect dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-style dijit/DropDownMenu ../containers/AbstractContainer".split(" "),function(g,f,e,d,b,a,c,h){return g([h],{BUTTONS_PER_ROW:8,
PADDING:6,_renderComponent:function(b){this.popup||(this.popup=new c,d.add(this.popup.domNode,"mgg_dropdownPopup"));this.popUpWidth=Math.ceil(b.itemWidth*this.BUTTONS_PER_ROW+this.PADDING*this.BUTTONS_PER_ROW);a.set(this.popup.domNode,"width",this.popUpWidth+"px");this.popup.colorRow&&a.set(this.popup.colorRow,"width",this.popUpWidth+"px")},destroyRecursive:function(){this.popup&&this.popup.destroyRecursive();this.inherited(arguments)},addChild:function(a,c){"Separator"!==a.componentData.type&&(a.delegate?
this.popup.addChild(a.delegate,c):"ColorPickerMenuItem"===a.componentData.type?(this.popup.colorRow||(this.popup.colorRow=b.create("tr",null,this.popup.domNode.tBodies[0]),this.popup.colorRowTD=b.create("td",{colspan:4},this.popup.colorRow)),this.popup.colorRowTD.appendChild(a.domNode)):(0<=a.componentData.type.indexOf("Button")&&!a.componentData.background&&(a.componentData.background=[234,234,234]),this.popup.addChild(a,c)))},removeChild:function(a){"Separator"!==a.componentData.type&&(a.delegate?
this.popup.removeChild(a.delegate):"ColorPickerMenuItem"===a.componentData.type?b.destroy(this.popup.colorRow):this.popup.removeChild(a))}})})},"MOTW/mgg/menus/ColorPickerMenuItem":function(){define(["dojo/_base/declare","dojo/dom-style","dojo/dom-class","dojo/dom-construct","../buttons/Button"],function(g,f,e,d,b){return g([b],{_renderComponent:function(a){this.inherited(arguments);f.set(this.button.focusNode,"background","rgb("+a.background+")");f.set(this.button.focusNode,"width",a.position.width*
(a.iconWidth||20)+"px");f.set(this.button.focusNode,"height",a.position.height*(a.iconHeight||20)+"px")},_getStyle:function(a){var c=void 0===a.visibility||a.visibility,c={visibility:c&&!a.passThrough?"visible":"hidden",pointerEvents:c&&!a.passThrough?"auto":"none"};void 0!==a.filtered&&a.filtered?(c.display="none",c.visibility="hidden",c.width="0",c.height="0"):1<a.position.width&&(c.display="block");return c}})})},"MOTW/mgg/buttons/Button":function(){define("dojo/_base/declare dojo/dom-style dojo/dom-class dojo/dom-construct dijit/form/Button ./AbstractButton".split(" "),
function(g,f,e,d,b,a){return g([a],{_createButtonWidget:function(a,d){return new b({label:a.text||"",disabled:!a.enabled,iconClass:"",onClick:function(){d.registerHandlerService().getHandler("Button").handleEvent(a.id,{type:"buttonClicked"})},style:{width:"100%",height:"100%"}})}})})},"MOTW/mgg/buttons/AbstractButton":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-style dojo/dom-class dojo/dom-construct dijit/Tooltip dijit/form/_ButtonMixin ../components/_IconComponent ../components/AbstractComponent ../utils/TextUtils".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return g([k,h],{destroyRecursive:function(){this.toolTip&&(this.toolTip.set("connectId",""),this.toolTip.destroyRecursive());this.button&&this.button.destroyRecursive&&this.button.destroyRecursive();this.inherited(arguments)},_renderComponent:function(c){this.inherited(arguments);this.button?this._updateButton(c):(this._createButton(c,this.dataService),this._lastText=c.text||"",this.button._setLabelAttr=function(a){var c=this.containerNode||this.focusNode;if(f.isString(a)&&
0===a.toLowerCase().indexOf("\x3chtml\x3e"))c.innerHTML=a;else{for(this._set("label",a);c.firstChild;)c.removeChild(c.firstChild);c.appendChild(document.createTextNode(a))}},this.button._setLabelAttr(this._lastText),this.connect(this.button,"onClick",this._onClick));c.tooltip&&(this.toolTip?this._lastTooltip!==c.tooltip&&this.toolTip.set("label",c.tooltip):(this.toolTip=new a({label:c.tooltip}),this.toolTip.set("connectId",this.button.domNode),this.own(this.toolTip)),this._lastTooltip=c.tooltip);
if(this.button.containerNode){var b=l.getTextStyle(c);e.set(this.button.containerNode,b)}this._createOrUpdateIcon(this.button.iconNode,c)},_onClick:function(){this.toolTip&&this.toolTip.close()},_clear:function(){this._context.beginPath();this._context.clearRect(0,0,this._canvas.width,this._canvas.height);this._context.closePath()},_createButton:function(a,c){this.button=this._createButtonWidget(a,c);this.own(this.button);this.button.placeAt(this.domNode,"last")},_createButtonWidget:function(a,c){return{placeAt:function(){}}},
_updateButton:function(a){this.button.set("disabled",!a.enabled);this._lastText!==a.text&&(this.button.set("label",a.text||""),this._lastText=a.text||"")}})})},"MOTW/mgg/menus/MJCheckBoxMenuItem":function(){define(["dojo/_base/declare","dojo/dom-class","./MenuItem"],function(g,f,e){return g([e],{_updateDelegate:function(d,b){d=this.inherited(arguments);d.set("enabled",b.enabled);b.selected?f.add(d.domNode,"checkedMenuItem"):f.remove(d.domNode,"checkedMenuItem");return d}})})},"MOTW/mgg/components/Canvas":function(){define("dojo/_base/declare dojo/_base/event dojo/_base/lang dojo/_base/window dojo/dom-construct dojo/dom-geometry dojo/dom-attr dojo/on ../containers/AbstractContainer ../utils/_MouseEvents ../utils/_KeyEvents dojo/has!touch?../utils/_TouchEvents".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p){var n=this.performance=this.performance||{};n.now=n.now||n.webkitNow||n.msNow||n.mozNow||Date.now;return g([k,p?p:l,m],{CURSOR_BUFFER_PIXELS:20,constructor:function(){this.inherited(arguments);this._shouldRequestCursor=!p;this._lastTime=n.now()},postCreate:function(){this.inherited(arguments);c.set(this.domNode,"tabindex","999");this.setupMouseEvents(this.domNode);this.setupKeyEvents(this.domNode)},startup:function(){this.inherited(arguments);var a=this.dataService.registerHandlerService().getHandler("Canvas");
this._shouldRequestCursor&&this.connect(a,"onPeerEvent",this.changeCursor);this.requestId=0},destroyRecursive:function(){this.cleanupMouseEvents();this.cleanupKeyEvents();this.inherited(arguments)},_getStyle:function(a){var c=this.inherited(arguments);c.cursor=a.cursor;return c},onDragStart:function(a){d.global.contextMenuPosition={x:a.pageX,y:a.pageY};a=this.makeMouseEvent(a);a.type="mouseDown";this.dispatchMouseEvent(a);this._shouldRequestCursor&&this.defer(function(){this._requestCursor(this.getLastEvent())},
300)},onDragStop:function(a){var c=this.makeMouseEvent(a);c.type="mouseUp";this.dispatchMouseEvent(c);this.dragStopPosition={x:a.clientX,y:a.clientY}},onDrag:function(a){a=this.makeMouseEvent(a);a.type="mouseMove";this.dispatchMouseEvent(a)},onMouseMove:function(a){var c=this;this.interval=clearTimeout(this.interval);if(this.dragStopPosition&&(Math.abs(this.dragStopPosition.x-a.clientX)>this.CURSOR_BUFFER_PIXELS||Math.abs(this.dragStopPosition.y-a.clientY)>this.CURSOR_BUFFER_PIXELS))this.changeCursor(null,
!0),this.dragStopPosition=null;this._shouldRequestCursor&&(this.makeMouseEvent(a),this.interval=setTimeout(function(){c._requestCursor(c.getLastEvent())},200))},onMouseOut:function(a){this.changeCursor(null,!0)},onMouseClick:function(a){this.domNode.focus();a=this.makeMouseEvent(a);a.type="mouseClick";this.dispatchMouseEvent(a)},onMouseDoubleClick:function(a){a=this.makeMouseEvent(a);a.type="mouseDoubleClick";this.dispatchMouseEvent(a)},onKeyUp:function(a){a.preventDefault();a=this.makeKeyEvent(a);
a.type="keyUp";this.dispatchKeyEvent(a)},onKeyDown:function(a){a.preventDefault();a=this.makeKeyEvent(a);a.type="keyDown";this.dispatchKeyEvent(a)},resize:function(){this.inherited(arguments);this.position=a.position(this.domNode)},dispatchMouseEvent:function(a){this.dataService.registerHandlerService().getHandler("Canvas").handleEvent(this.widgetId,a)},dispatchKeyEvent:function(a){this.dataService.registerHandlerService().getHandler("Canvas").handleEvent(this.widgetId,a)},_requestCursor:function(a){this.requestId+=
1;a.type="onmousehover";a.requestId=this.requestId;this.dispatchMouseEvent(a)},changeCursor:function(a,c){if(c)this.domNode.style.cursor="default",this.requestId=0;else if("onchangecursor"===a.data.type&&a.data.responseId===this.requestId){var b=a.data.cursor.split(" ")[0].toLowerCase();"hand"===b?b="pointer":"undefined"!==typeof a.data.customCursor&&(b="url(data:image/x-icon;base64,"+a.data.customCursor+") 8 8, auto");this.domNode.style.cursor=b;this.requestId=0}},_renderComponent:function(a){a.componentIndex=
0;this.inherited(arguments);this.canvas||(this.canvas=b.create("canvas"),this.own(h(this.canvas,"onselectstart",f.stop)),b.place(this.canvas,this.domNode,"first"),this.context=this.canvas.getContext("2d"));this.canvas.width=a.position.width+1;this.canvas.height=a.position.height+1;a.pixelDataSrc&&a.pixelDataSrc!==this.lastPixelDataSrc&&(a.pixelDataSrc instanceof Image?this.context.drawImage(a.pixelDataSrc,0,0):this.context.putImageData(a.pixelDataSrc,0,0,0,0,this.canvas.width-2,this.canvas.height-
2),this.lastPixelDataSrc=a.pixelDataSrc,this._updateFPS())},_updateFPS:function(){if(-1<location.search.indexOf("fps\x3don")){var a=n.now(),c=a-this._lastTime;this._lastTime=a;this._averageFrameTime=0.99*this._averageFrameTime+0.01*c;a=String(this._averageFrameTime);this.context.beginPath();this.context.clearRect(0,0,this.context.measureText(a).width,10);this.context.closePath();this.context.fillText(a,0,10)}}})})},"MOTW/mgg/utils/_MouseEvents":function(){define("dojo/_base/declare dojo/_base/event dojo/_base/kernel dojo/_base/lang dojo/dom-geometry dojo/mouse dojo/has".split(" "),
function(g,f,e,d,b,a,c){function h(a,c,b,d,h){h=!!h;var e=function(){d.apply(b,arguments)};a.addEventListener(c,e,h);return{remove:function(){a.removeEventListener(c,e,h)}}}return g([],{constructor:function(){this._mouseEvents=[];this._docEvents=[]},setupMouseEvents:function(a){this._mouseNode=a;this._mouseEvents.push(h(a,"mousedown",this,this._onMouseDown));this._mouseEvents.push(h(a,"mousemove",this,this._onMouseMove));this._mouseEvents.push(h(a,"mouseout",this,this._onMouseOut));this._mouseEvents.push(h(a,
"mousewheel",this,this._onMouseWheel));this._mouseEvents.push(h(a,"DOMMouseScroll",this,this._onMouseWheel));this._mouseEvents.push(h(a,"click",this,this._onMouseClick));this._mouseEvents.push(h(a,"dblclick",this,this._onMouseDoubleClick));this._mouseEvents.push(h(a,"selectstart",f,f.stop));this._mouseNode&&(this._nodePos=b.position(this._mouseNode))},cleanupMouseEvents:function(){this._mouseEvents.forEach(function(a){a.remove()});this._mouseEvents=[];this.cleanupDocumentEvents();this._mouseNode=
null},cleanupDocumentEvents:function(){var a=this;setTimeout(function(){a._docEvents.forEach(function(a){a.remove()});a._docEvents=[]},0)},duplicateEvent:function(a){return{offsetX:a.offsetX,offsetY:a.offsetY,layerX:a.layerX,layerY:a.layerY,altKey:a.altKey,ctrlKey:a.ctrlKey,shiftKey:a.shiftKey,metaKey:a.metaKey}},makeMouseEvent:function(a){var c={altKey:a.altKey,ctrlKey:a.ctrlKey,shiftKey:a.shiftKey,metaKey:a.metaKey,timestamp:Date.now(),button:"",left:!1,middle:!1,right:!1};if(void 0!==a.wheelDelta||
void 0!==a.detail)c.wheelZoom=a.wheelDelta?a.wheelDelta/120:-a.detail/3,1>Math.abs(c.wheelZoom)&&0<Math.abs(c.wheelZoom)&&(c.wheelZoom=0<a.wheelDelta||0>a.detail?1:-1);this.dragging&&(0<a.buttons?(c.left=0<(a.buttons&1),c.middle=0<(a.buttons&4),c.right=0<(a.buttons&2),a.buttons&1?c.button="left":a.buttons&2?c.button="right":a.buttons&4&&(c.button="middle")):(1===a.which&&(c.left=!0,c.button="left"),2===a.which&&(c.middle=!0,c.button="middle"),3===a.which&&(c.right=!0,c.button="right")));var d=0,h=
0;if(a.pageX||a.pageY)d=a.pageX,h=a.pageY;else if(a.clientX||a.clientY)d=a.clientX+e.global.document.body.scrollLeft+e.global.document.documentElement.scrollLeft,h=a.clientY+e.global.document.body.scrollTop+e.global.document.documentElement.scrollTop;this._mouseNode&&(this._nodePos=b.position(this._mouseNode));this._nodePos?(c.x=d-this._nodePos.x,c.y=h-this._nodePos.y):(c.x=0,c.y=0);return this._lastEvent=c},getLastEvent:function(){return this._lastEvent},onDragStart:function(a){},onDrag:function(a){},
onDragStop:function(a){},onMouseDown:function(a){},onMouseMove:function(a){},onMouseOut:function(a){},onMouseUp:function(a){},onMouseClick:function(a){},onMouseDoubleClick:function(a){},onMouseWheel:function(a){},_onMouseDown:function(a){this._mouseDownTime=Date.now();this.dragging||(!c("ie")&&!c("trident")&&f.stop(a),this._docEvents.push(h(e.global.document,"mouseover",f,f.stop,!0)),this._docEvents.push(h(e.global.document,"mouseout",f,f.stop,!0)),this._docEvents.push(h(e.global.document,"mouseenter",
f,f.stop,!0)),this._docEvents.push(h(e.global.document,"mouseleave",f,f.stop,!0)),this._docEvents.push(h(e.global.document,"contextmenu",f,f.stop,!0)),this._docEvents.push(h(e.global.document,"mousemove",this,this._onDocumentMouseMove,!0)),this._docEvents.push(h(e.global.document,"mouseup",this,this._onDocumentMouseUp,!0)),this.dragging=!0,this.onDragStart(a))},_onDocumentMouseMove:function(a){this.dragging&&(f.stop(a),this.onDrag(a))},_onDocumentMouseUp:function(a){this.dragging&&(f.stop(a),this.dragging=
!1,this.onDragStop(a));this.cleanupDocumentEvents()},_onMouseMove:function(a){if(!this.dragging)this.onMouseMove(a)},_onMouseOut:function(a){if(!this.dragging)this.onMouseOut(a)},_onMouseClick:function(a){if(250>Date.now()-this._mouseDownTime)this.onMouseClick(a)},_onMouseDoubleClick:function(a){this.onMouseDoubleClick(a)},_onMouseWheel:function(a){f.stop(a);this.onMouseWheel(a)},_onRightClick:function(a){f.stop(a)}})})},"MOTW/mgg/utils/_KeyEvents":function(){define("dojo/_base/declare dojo/_base/event dojo/_base/kernel dojo/_base/lang dojo/dom-geometry dojo/on".split(" "),
function(g,f,e,d,b,a){return g([],{KEY_CODE_MAP:{46:127,186:59,187:61,188:44,189:45,190:46,191:47,219:91,220:92,221:93},CODE_KEY_CODE_MAP:{Delete:127,Semicolon:59,Equal:61,NumpadEqual:61,Comma:44,Minus:45,Period:46,Slash:47,BracketLeft:91,Backslash:92,BracketRight:93},constructor:function(){this._keyEvents=[]},setupKeyEvents:function(c){this._keyEvents.push(a(c,"keydown",d.hitch(this,this._onKeyDown)));this._keyEvents.push(a(c,"keyup",d.hitch(this,this._onKeyUp)))},cleanupKeyEvents:function(){this._keyEvents.forEach(function(a){a.remove()});
this._keyEvents=[]},makeKeyEvent:function(a){var b=(a.code?this.CODE_KEY_CODE_MAP[a.code]:this.KEY_CODE_MAP[a.keyCode])||a.keyCode;return{altKey:a.altKey,ctrlKey:a.ctrlKey,shiftKey:a.shiftKey,metaKey:a.metaKey,key:a.key,keyCode:b,keyChar:a.key&&1===a.key.length?a.key:String.fromCharCode(b),timestamp:Date.now()}},onKeyUp:function(a){},onKeyDown:function(a){},_onKeyUp:function(a){this.onKeyUp(a)},_onKeyDown:function(a){this.onKeyDown(a)}})})},"MOTW/mgg/components/StreamCanvas":function(){define("dojo/_base/declare dojo/_base/event dojo/_base/lang dojo/_base/window dojo/dom-construct dojo/dom-geometry dojo/dom-attr dojo/dom-style dojo/on dojo/has dijit/focus ../containers/AbstractContainer ../utils/_MouseEvents ../utils/_KeyEvents ../utils/CursorUtils dojo/has!touch?../utils/_TouchEvents".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s){return g([p,s?s:n,q],{postCreate:function(){this.inherited(arguments);c.set(this.domNode,"tabindex","999");this.setupMouseEvents(this.domNode);this.setupKeyEvents(this.domNode)},startup:function(){this.inherited(arguments);var a=this.dataService.registerHandlerService().getHandler("StreamCanvas");this._shouldRequestCursor&&this.connect(a,"onPeerEvent",this.changeCursor);this.requestId=0},destroyRecursive:function(){this.componentData.imageStream&&this.componentData.imageStream.stop();
this.componentData.mouseStream&&this.componentData.mouseStream.stop();this.cleanupMouseEvents();this.cleanupKeyEvents();this.inherited(arguments)},_getStyle:function(a){var c=this.inherited(arguments);delete c.width;delete c.height;c.cursor=a.cursor;return c},_checkAndGiveFocusBack:function(){m.curNode&&m.curNode.id!==this.domNode.id&&this.domNode.focus()},onDragStart:function(a){d.global.contextMenuPosition={x:a.pageX,y:a.pageY};this._checkAndGiveFocusBack();this._dispatchMouseEvent("pressed",this.makeMouseEvent(a))},
onDragStop:function(a){this._dispatchMouseEvent("released",this.makeMouseEvent(a))},onDrag:function(a){this._dispatchMouseEvent("moved",this.makeMouseEvent(a))},onMouseMove:function(a){this._dispatchMouseEvent("moved",this.makeMouseEvent(a))},onMouseWheel:function(a){this._checkAndGiveFocusBack();this._dispatchMouseEvent("scroll",this.makeMouseEvent(a))},_dispatchMouseEvent:function(a,c){if(this.componentData.mouseStream)if("scroll"===a)this.componentData.mouseStream[a](c.x,c.y,c.wheelZoom);else this.componentData.mouseStream[a](c.x,
c.y,{left:c.left,middle:c.middle,right:c.right},{altKey:c.altKey,ctrlKey:c.ctrlKey,shiftKey:c.shiftKey,metaKey:c.metaKey})},onMouseOut:function(a){this.changeCursor(null,!0)},onMouseClick:function(a){this.domNode.focus()},onKeyUp:function(a){a.preventDefault();a=this.makeKeyEvent(a);a.type="keyUp";this.dispatchKeyEvent(a)},onKeyDown:function(a){a.preventDefault();a=this.makeKeyEvent(a);a.type="keyDown";this.dispatchKeyEvent(a)},resize:function(){this.inherited(arguments);this.position=a.position(this.domNode)},
dispatchKeyEvent:function(a){this.dataService.registerHandlerService().getHandler("StreamCanvas").handleEvent(this.widgetId,a)},changeCursor:function(a,c){if(c)h.set(this.domNode,"cursor","default"),this.requestId=0;else if(a.cursor||a.customCursor)if(a.customCursor&&(l("ie")||l("trident")||l("edge"))){var b=r.getCursor(a.customCursor);b?h.set(this.domNode,"cursor","url("+require.toUrl("MOTW/images/cursors/"+b+".cur")+"), default"):h.set(this.domNode,"cursor","default")}else"undefined"!==typeof a.customCursor?
h.set(this.domNode,"cursor","url(data:image/x-icon;base64,"+a.customCursor+") 8 8, auto"):h.set(this.domNode,"cursor",a.cursor)},_renderComponent:function(a){a.componentIndex=0;this.inherited(arguments);!this.canvas&&(a.imageStream&&this._imageStream!==a.imageStream)&&(this._imageStream&&this._imageStream.stop(),this._imageStream=a.imageStream,this._imageStream.start(),this.canvas=this._imageStream.getCanvas(),this.own(k(this.canvas,"onselectstart",f.stop)),b.place(this.canvas,this.domNode,"first"));
a.mouseStream&&this._mouseStream!==a.mouseStream&&(this._mouseStream&&this._mouseStream.stop(),this._mouseStream=a.mouseStream,this._mouseStream.start(),this.connect(this._mouseStream,"onCursor","changeCursor"))}})})},"MOTW/mgg/utils/CursorUtils":function(){define([],function(){var g={"iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAADFBMVEUAAAAAAAD///8AAADFTF0nAAAAAnRSTlMAAHaTzTgAAABISURBVHjaY2CAAGYGHIAJKv+fGb8C3GAwKGCEePAvzKN/0RUwM/8HUf9BSsEm/kdTwPKXGW4WVhNgBjEN5oBiIBTdo2AUIAMA+7cIMcb5GdsAAAAASUVORK5CYII\x3d":"crosshair",
"iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAADFBMVEUAAAAAAAD///8AAADFTF0nAAAAAnRSTlMAAHaTzTgAAABuSURBVHja7ZDbDoAwCENL+f9PBsR4yYydPvhqk2VLOLQDQ8v7BKZyB0H3aX2rEpogkMy+kzMDHA6UFuZl+zM8ZEQOaRJgVHdWVH6fQmbYOkc1s/arFDtXTZOEDWmSMLwQ48eyrg337TRR+PXrQQvtQSNLaogfUAAAAABJRU5ErkJggg\x3d\x3d":"zoom_in","iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAADFBMVEUAAAAAAAD///8AAADFTF0nAAAAAnRSTlMAAHaTzTgAAABfSURBVHjahY9LEsAgCENDuP+RgfJRa1dlRh1eElFBluYynFIFQdXTT0cMIeD0PJ3bgO1gW0RDlmRqHfF9GddOi1TCwv+ndEZqTiQrvVJynk5pIu8XhlxgyA2afECSeAAQih5WR5t6dQAAAABJRU5ErkJggg\x3d\x3d":"zoom_in",
"iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAADFBMVEUAAAAAAAD///8AAADFTF0nAAAAAnRSTlMAAHaTzTgAAABXSURBVHjafc/RFgARCATQmvn/T1ZbibUeNsdDFwOVKMYcsosUCMjdQ+ZYwu7Bq29RuvbWwQyG2ArDlblTf26pM5riBst1t4J+OrRE3y9MOWDKCSUfCPEHTmcRfIsAQI0AAAAASUVORK5CYII\x3d":"zoom_out","iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAADFBMVEUAAAAAAAD///8AAADFTF0nAAAAAnRSTlMAAHaTzTgAAABlSURBVHja7ZBRCsAwCEOjuf+Rq2uZsI5py/6bUhDyxKigi/03lCKhULL0FferCIav3PgFIXSJsjELqrCnXGcsU/7YIp0hg3BTG/1uKRCnVkkJmRZKCcGGmIOZvxu+1+mE4+hooQsMrxZxC2S9OgAAAABJRU5ErkJggg\x3d\x3d":"zoom_out",
"iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAADFBMVEUAAAAAAAD///8AAADFTF0nAAAAAnRSTlMAAHaTzTgAAABdSURBVHja7ZBRDsAgCEMr3P/IW0X8mQu4GX99iWJsqyjQEKQU1wtbvTKD2ERfBxbtOnDTThFGhq7bIAPDiOALjTLPTUYGvl+93oROWvAIJy0MSc0vpavc/KPD4QcVgzoSKLgjloEAAAAASUVORK5CYII\x3d":"rotate","iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAMAAABEpIrGAAAADFBMVEUAAAAAAAD///8AAADFTF0nAAAAAnRSTlMAAHaTzTgAAABqSURBVHja7ZBLDsAgCESBuf+RCYVomzZ8ku6djUaGNwLREkC1OIqksLhpYfBGL0pY/bBskOTPBmW6O2GYCWUEsBBWT4H9xWcqKyJeb5wmFed39E0Ix2j47FWbPQyKxZj0gBUxMYSOjn7oAqA1GScmRAr4AAAAAElFTkSuQmCC":"pan",
"iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAADFBMVEUAAAAAAAD///8AAADFTF0nAAAAAnRSTlMAAHaTzTgAAABZSURBVHjaXU8BDgAhCML8/5MdJ9YuzbUFCDqBXe4HmAjCKRRFkGSplR9RsJXvCNXWA206KuIeJsSzpebz91TkUlis9HclZ0gZQi8LCdOim7iuYUe657kF+AC1khokWbrj+wAAAABJRU5ErkJggg\x3d\x3d":"pan","iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAADFBMVEUAAAAAAAD///8AAADFTF0nAAAAAnRSTlMAAHaTzTgAAABISURBVHjarY7BDgAgCEJR+/8/blbYyuoa4yLDp8AnmU13yZgdEkaFRsdpuDGoghUzsMwrRCTpffEMhFcWM34acN2FWMmdB9oAR8gPJpPE7LEAAAAASUVORK5CYII\x3d":"pan_hold",
"iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAADFBMVEUAAAAAAAD///8AAADFTF0nAAAAAnRSTlMAAHaTzTgAAABKSURBVHjanc5BEsAgCAPAxPz/yR0KWqxwlEt0B1CgFbXySdCARQ77wO+MNG1oInMi/imhiTdWickic9UpzN3I0wrv4XyE3F/Gdb3BbxQ6XKXeIAAAAABJRU5ErkJggg\x3d\x3d":"polezero","iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAADFBMVEUAAAAAAAD///8AAADFTF0nAAAAAnRSTlMAAHaTzTgAAABmSURBVHjaVY8LDsAgCENLt/sfmY4KamZihNfyMYhEHaJerhs0QBSMVhZJBUMWjOWqyrMd7ak8yAFFrCu2wy3Ln+7xYoiTvA7s6RtImtAlbpbbSW+hU2CgIw5I730t/OvA00P8oQYf2/kkK8ZcITwAAAAASUVORK5CYII\x3d":"realpole",
"iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAADFBMVEUAAAAAAAD///8AAADFTF0nAAAAAnRSTlMAAHaTzTgAAABeSURBVHjaVY6BEoAgCEMZ9f+fzGIBRpyn8twmcAtTubbQCa8egGiuIiCJVhbZ1nGpbmsiPfN6AS+xcZVCmRXRxi95QP65QpUXo0zM4DEI8Dw2yH5L/P+eg9UnPWbWAw3HGzJe7w5tAAAAAElFTkSuQmCC":"realzero"};return{getCursor:function(f){return g[f]}}})},"MOTW/mgg/components/Separator":function(){define(["dojo/_base/declare","dijit/MenuSeparator","dijit/ToolbarSeparator","./_DelegatingComponent"],function(g,f,e,d){return g([d],{_constructDelegate:function(b,
a,c){return"ToolBar"===c.type?new e({id:b}):new f({id:b})},_getStyle:function(b){var a=this.inherited(arguments);delete a.position;delete a.left;delete a.top;delete a.backgroundColor;a.display="inline-block";a.verticalAlign="middle";return a}})})},"dijit/ToolbarSeparator":function(){define(["dojo/_base/declare","dojo/dom","./_Widget","./_TemplatedMixin"],function(g,f,e,d){return g("dijit.ToolbarSeparator",[e,d],{templateString:'\x3cdiv class\x3d"dijitToolbarSeparator dijitInline" role\x3d"presentation"\x3e\x3c/div\x3e',
buildRendering:function(){this.inherited(arguments);f.setSelectable(this.domNode,!1)},isFocusable:function(){return!1}})})},"MOTW/mgg/components/Dropdown":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/store/Memory dojo/window dojo/has dojo/on dijit/MenuItem dijit/form/Select dijit/form/ComboBox ./AbstractComponent ../table/tableCellRenderers dojo/text!./Dropdown.html".split(" "),function(g,f,e,d,b,a,c,h,k,
l,m,p,n,q,r,s,t){return g([r],{startup:function(){this.inherited(arguments);this.dropdown&&this.dropdown.startup()},_renderComponent:function(b){this.inherited(arguments);var h=this.dataService,f=-1;if(b.maxHeight&&(f=parseFloat(b.maxHeight),0>f||isNaN(f)||!isFinite(f)))f=-1;if(this.dropdown)this.dropdown._onChangeActive=!1,!0===b.editable?this._updateComboBox(b):this._updateSelect(b),this.dropdown.set("disabled",!b.enabled),this.dropdown._onChangeActive=!0;else{if(!0===b.editable)this.dropdown=new q({value:b.displayedValue,
store:this._generateStore(b.options),searchAttr:"label",maxHeight:f,disabled:!b.enabled,onChange:function(a){h.registerHandlerService().getHandler("Dropdown").setProperties(b.id,{selectedIndex:b.options.indexOf(a),displayedValue:a})},style:{position:"absolute",width:"100%",height:"100%",margin:0},_startSearch:function(){this.inherited("_startSearch",arguments);var a=this.dropDown;this.own(e.after(this.dropDown,"onOpen",function(){d.add(a.domNode.parentNode,"mgg")}))}}),this.dropdown._onChangeActive=
!1,this._updateComboBox(b);else{this.dropdown=new n({templateString:t,value:b.selectedIndex,maxHeight:f,disabled:!b.enabled,onChange:function(){b.selectedIndex=parseInt(this.value,10);h.registerHandlerService().getHandler("Dropdown").setProperties(b.id,{selectedIndex:b.selectedIndex})},style:{position:"absolute",width:"100%",height:"100%"},_getMenuItemForOption:function(a){var c;c=this.inherited("_getMenuItemForOption",arguments);for(d.add(c.domNode,"cell");c.domNode.firstChild;)c.domNode.removeChild(c.domNode.firstChild);
var h=s[b.renderer.type].create(b.renderer,a.label);c.domNode.appendChild(h);return c},_setDisplay:function(a){a=a||"";for(var c=s[b.renderer.type].create(b.renderer,a);this.containerNode.firstChild;)this.containerNode.removeChild(this.containerNode.firstChild);this.containerNode.appendChild(c);d.add(this.containerNode,"cell");this.focusNode.setAttribute("aria-valuetext",a.label)},_fillContent:function(){this.inherited("_fillContent",arguments);var a=this.dropDown;this.own(e.after(this.dropDown,"onOpen",
function(){d.add(a.domNode.parentNode,"mgg")}))}});var l=this.dropdown.toggleDropDown;this.dropdown.toggleDropDown=function(){var b,d=k.getBox().h,h=a.position(this.domNode),e,g;e={};e=h.y;h=h.h;this.isLoaded()?l.apply(this,arguments):(-1===f&&(this.maxHeight=e<Math.floor(d/2)?d-e-h:e),l.apply(this,arguments),-1===f&&(this.maxHeight=-1));b=a.position(this.dropDown._popupWrapper);g=b.h;b=b.y;e+h!==b&&e!==b+g&&(e+g<d?c.set(this.dropDown._popupWrapper,{top:e+h+"px"}):(e=0>e-g&&0!=b?{top:"0px",height:e+
"px",overflow:"auto"}:{top:e-g+"px"},c.set(this.dropDown._popupWrapper,e)))};this.dropdown._onChangeActive=!1;this._updateSelect(b)}this.dropdown._onChangeActive=!0;this.own(this.dropdown);this.dropdown.placeAt(this.domNode,"last")}},_updateSelect:function(a){var c=this._generatePopupOptions(a.options);this.dropdown.getOptions().forEach(function(a){c.some(function(c){return c.value===a.value})||this.dropdown.removeOption(a)},this);var b=this.dropdown.getOptions();c.forEach(function(a){b.some(function(c){return a.value===
c.value})?this.dropdown.updateOption(a):this.dropdown.addOption(a)},this);this.dropdown.set("value",a.selectedIndex)},_updateComboBox:function(a){this.dropdown.set("value",a.displayedValue);this.dropdown.store.setData(this._generatePopupOptions(a.options));c.set(this.dropdown._buttonNode,{height:"100%"});if(l("ie")||l("trident")){var b=this;this.ieFocusHandler=m(this.dropdown,"focus",function(){setTimeout(function(){b.dropdown.focusNode.focus()},250);b.ieFocusHandler.remove()});this.own(this.ieFocusHandler)}},
_generatePopupOptions:function(a){var c,b=[];for(c=0;c<a.length;c+=1)b.push({label:a[c],value:String(c)});return b},_generateStore:function(a){return new h({data:this._generatePopupOptions(a)})}})})},"dijit/form/Select":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-attr dojo/dom-class dojo/dom-geometry dojo/i18n dojo/keys dojo/_base/lang dojo/on dojo/sniff ./_FormSelectWidget ../_HasDropDown ../DropDownMenu ../MenuItem ../MenuSeparator ../Tooltip ../_KeyNavMixin ../registry dojo/text!./templates/Select.html dojo/i18n!./nls/validate".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v){function w(a){return function(c){this._isLoaded?this.inherited(a,arguments):this.loadDropDown(h.hitch(this,a,c))}}var x=f("dijit.form._SelectMenu",n,{autoFocus:!0,buildRendering:function(){this.inherited(arguments);this.domNode.setAttribute("role","listbox")},postCreate:function(){this.inherited(arguments);this.own(k(this.domNode,"selectstart",function(a){a.preventDefault();a.stopPropagation()}))},focus:function(){var a=!1,c=this.parentWidget.value;
h.isArray(c)&&(c=c[c.length-1]);c&&g.forEach(this.parentWidget._getChildren(),function(b){b.option&&c===b.option.value&&(a=!0,this.focusChild(b,!1))},this);a||this.inherited(arguments)}});b=f("dijit.form.Select"+(l("dojo-bidi")?"_NoBidi":""),[m,p,t],{baseClass:"dijitSelect dijitValidationTextBox",templateString:v,_buttonInputDisabled:l("ie")?"disabled":"",required:!1,state:"",message:"",tooltipPosition:[],emptyLabel:"\x26#160;",_isLoaded:!1,_childrenLoaded:!1,labelType:"html",_fillContent:function(){this.inherited(arguments);
if(this.options.length&&!this.value&&this.srcNodeRef){var a=this.srcNodeRef.selectedIndex||0;this._set("value",this.options[0<=a?a:0].value)}this.dropDown=new x({id:this.id+"_menu",parentWidget:this});d.add(this.dropDown.domNode,this.baseClass.replace(/\s+|$/g,"Menu "))},_getMenuItemForOption:function(a){if(!a.value&&!a.label)return new r({ownerDocument:this.ownerDocument});var c=h.hitch(this,"_setValueAttr",a);a=new q({option:a,label:("text"===this.labelType?(a.label||"").toString().replace(/&/g,
"\x26amp;").replace(/</g,"\x26lt;"):a.label)||this.emptyLabel,onClick:c,ownerDocument:this.ownerDocument,dir:this.dir,textDir:this.textDir,disabled:a.disabled||!1});a.focusNode.setAttribute("role","option");return a},_addOptionItem:function(a){this.dropDown&&this.dropDown.addChild(this._getMenuItemForOption(a))},_getChildren:function(){return!this.dropDown?[]:this.dropDown.getChildren()},focus:function(){if(!this.disabled&&this.focusNode.focus)try{this.focusNode.focus()}catch(a){}},focusChild:function(a){a&&
this.set("value",a.option)},_getFirst:function(){var a=this._getChildren();return a.length?a[0]:null},_getLast:function(){var a=this._getChildren();return a.length?a[a.length-1]:null},childSelector:function(a){return(a=u.byNode(a))&&a.getParent()==this.dropDown},onKeyboardSearch:function(a,c,b,d){a&&this.focusChild(a)},_loadChildren:function(a){if(!0===a)if(this.dropDown&&(delete this.dropDown.focusedChild,this.focusedChild=null),this.options.length)this.inherited(arguments);else{g.forEach(this._getChildren(),
function(a){a.destroyRecursive()});var c=new q({ownerDocument:this.ownerDocument,label:this.emptyLabel});this.dropDown.addChild(c)}else this._updateSelection();this._isLoaded=!1;this._childrenLoaded=!0;this._loadingStore||this._setValueAttr(this.value,!1)},_refreshState:function(){this._started&&this.validate(this.focused)},startup:function(){this.inherited(arguments);this._refreshState()},_setValueAttr:function(a){this.inherited(arguments);e.set(this.valueNode,"value",this.get("value"));this._refreshState()},
_setNameAttr:"valueNode",_setDisabledAttr:function(a){this.inherited(arguments);this._refreshState()},_setRequiredAttr:function(a){this._set("required",a);this.focusNode.setAttribute("aria-required",a);this._refreshState()},_setOptionsAttr:function(a){this._isLoaded=!1;this._set("options",a)},_setDisplay:function(a){a=("text"===this.labelType?(a||"").replace(/&/g,"\x26amp;").replace(/</g,"\x26lt;"):a)||this.emptyLabel;this.containerNode.innerHTML='\x3cspan role\x3d"option" aria-selected\x3d"true" class\x3d"dijitReset dijitInline '+
this.baseClass.replace(/\s+|$/g,"Label ")+'"\x3e'+a+"\x3c/span\x3e"},validate:function(a){a=this.disabled||this.isValid(a);this._set("state",a?"":this._hasBeenBlurred?"Error":"Incomplete");this.focusNode.setAttribute("aria-invalid",a?"false":"true");var c=a?"":this._missingMsg;c&&this.focused&&this._hasBeenBlurred?s.show(c,this.domNode,this.tooltipPosition,!this.isLeftToRight()):s.hide(this.domNode);this._set("message",c);return a},isValid:function(){return!this.required||0===this.value||!/^\s*$/.test(this.value||
"")},reset:function(){this.inherited(arguments);s.hide(this.domNode);this._refreshState()},postMixInProperties:function(){this.inherited(arguments);this._missingMsg=a.getLocalization("dijit.form","validate",this.lang).missingMessage},postCreate:function(){this.inherited(arguments);this.own(k(this.domNode,"selectstart",function(a){a.preventDefault();a.stopPropagation()}));this.domNode.setAttribute("aria-expanded","false");var a=this._keyNavCodes;delete a[c.LEFT_ARROW];delete a[c.RIGHT_ARROW]},_setStyleAttr:function(a){this.inherited(arguments);
d.toggle(this.domNode,this.baseClass.replace(/\s+|$/g,"FixedWidth "),!!this.domNode.style.width)},isLoaded:function(){return this._isLoaded},loadDropDown:function(a){this._loadChildren(!0);this._isLoaded=!0;a()},destroy:function(a){this.dropDown&&!this.dropDown._destroyed&&(this.dropDown.destroyRecursive(a),delete this.dropDown);s.hide(this.domNode);this.inherited(arguments)},_onFocus:function(){this.validate(!0)},_onBlur:function(){s.hide(this.domNode);this.inherited(arguments);this.validate(!1)}});
l("dojo-bidi")&&(b=f("dijit.form.Select",b,{_setDisplay:function(a){this.inherited(arguments);this.applyTextDir(this.containerNode)}}));b._Menu=x;b.prototype._onContainerKeydown=w("_onContainerKeydown");b.prototype._onContainerKeypress=w("_onContainerKeypress");return b})},"dijit/form/_FormSelectWidget":function(){define("dojo/_base/array dojo/_base/Deferred dojo/aspect dojo/data/util/sorter dojo/_base/declare dojo/dom dojo/dom-class dojo/_base/kernel dojo/_base/lang dojo/query dojo/when dojo/store/util/QueryResults ./_FormValueWidget".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){return b("dijit.form._FormSelectWidget",n,{multiple:!1,options:null,store:null,_setStoreAttr:function(a){this._created&&this._deprecatedSetStore(a)},query:null,_setQueryAttr:function(a){this._created&&this._deprecatedSetStore(this.store,this.selectedValue,{query:a})},queryOptions:null,_setQueryOptionsAttr:function(a){this._created&&this._deprecatedSetStore(this.store,this.selectedValue,{queryOptions:a})},labelAttr:"",onFetch:null,sortByLabel:!0,loadChildrenOnOpen:!1,
onLoadDeferred:null,getOptions:function(a){var c=this.options||[];if(null==a)return c;if(k.isArrayLike(a))return g.map(a,"return this.getOptions(item);",this);k.isString(a)&&(a={value:a});k.isObject(a)&&(g.some(c,function(c,b){for(var d in a)if(!(d in c)||c[d]!=a[d])return!1;a=b;return!0})||(a=-1));return 0<=a&&a<c.length?c[a]:null},addOption:function(a){g.forEach(k.isArrayLike(a)?a:[a],function(a){a&&k.isObject(a)&&this.options.push(a)},this);this._loadChildren()},removeOption:function(a){a=this.getOptions(k.isArrayLike(a)?
a:[a]);g.forEach(a,function(a){a&&(this.options=g.filter(this.options,function(c){return c.value!==a.value||c.label!==a.label}),this._removeOptionItem(a))},this);this._loadChildren()},updateOption:function(a){g.forEach(k.isArrayLike(a)?a:[a],function(a){var c=this.getOptions({value:a.value}),b;if(c)for(b in a)c[b]=a[b]},this);this._loadChildren()},setStore:function(a,c,b){h.deprecated(this.declaredClass+"::setStore(store, selectedValue, fetchArgs) is deprecated. Use set('query', fetchArgs.query), set('queryOptions', fetchArgs.queryOptions), set('store', store), or set('value', selectedValue) instead.",
"","2.0");this._deprecatedSetStore(a,c,b)},_deprecatedSetStore:function(a,c,b){var h=this.store;b=b||{};if(h!==a){for(var l;l=this._notifyConnections.pop();)l.remove();a.get||(k.mixin(a,{_oldAPI:!0,get:function(a){var c=new f;this.fetchItemByIdentity({identity:a,onItem:function(a){c.resolve(a)},onError:function(a){c.reject(a)}});return c.promise},query:function(a,c){var b=new f(function(){d.abort&&d.abort()});b.total=new f;var d=this.fetch(k.mixin({query:a,onBegin:function(a){b.total.resolve(a)},
onComplete:function(a){b.resolve(a)},onError:function(a){b.reject(a)}},c));return new p(b)}}),a.getFeatures()["dojo.data.api.Notification"]&&(this._notifyConnections=[e.after(a,"onNew",k.hitch(this,"_onNewItem"),!0),e.after(a,"onDelete",k.hitch(this,"_onDeleteItem"),!0),e.after(a,"onSet",k.hitch(this,"_onSetItem"),!0)]));this._set("store",a)}this.options&&this.options.length&&this.removeOption(this.options);this._queryRes&&this._queryRes.close&&this._queryRes.close();this._observeHandle&&this._observeHandle.remove&&
(this._observeHandle.remove(),this._observeHandle=null);b.query&&this._set("query",b.query);b.queryOptions&&this._set("queryOptions",b.queryOptions);a&&a.query&&(this._loadingStore=!0,this.onLoadDeferred=new f,this._queryRes=a.query(this.query,this.queryOptions),m(this._queryRes,k.hitch(this,function(h){if(this.sortByLabel&&!b.sort&&h.length)if(a.getValue)h.sort(d.createSortFunction([{attribute:a.getLabelAttributes(h[0])[0]}],a));else{var e=this.labelAttr;h.sort(function(a,c){return a[e]>c[e]?1:c[e]>
a[e]?-1:0})}b.onFetch&&(h=b.onFetch.call(this,h,b));g.forEach(h,function(a){this._addOptionForItem(a)},this);this._queryRes.observe&&(this._observeHandle=this._queryRes.observe(k.hitch(this,function(a,c,b){c==b?this._onSetItem(a):(-1!=c&&this._onDeleteItem(a),-1!=b&&this._onNewItem(a))}),!0));this._loadingStore=!1;this.set("value","_pendingValue"in this?this._pendingValue:c);delete this._pendingValue;this.loadChildrenOnOpen?this._pseudoLoadChildren(h):this._loadChildren();this.onLoadDeferred.resolve(!0);
this.onSetStore()}),k.hitch(this,function(a){this.onLoadDeferred.reject(a)})));return h},_setValueAttr:function(a,c){this._onChangeActive||(c=null);if(this._loadingStore)this._pendingValue=a;else if(null!=a){a=k.isArrayLike(a)?g.map(a,function(a){return k.isObject(a)?a:{value:a}}):k.isObject(a)?[a]:[{value:a}];a=g.filter(this.getOptions(a),function(a){return a&&a.value});var b=this.getOptions()||[];if(!this.multiple&&(!a[0]||!a[0].value)&&b.length)a[0]=b[0];g.forEach(b,function(c){c.selected=g.some(a,
function(a){return a.value===c.value})});b=g.map(a,function(a){return a.value});if(!("undefined"==typeof b||"undefined"==typeof b[0])){var d=g.map(a,function(a){return a.label});this._setDisplay(this.multiple?d:d[0]);this.inherited(arguments,[this.multiple?b:b[0],c]);this._updateSelection()}}},_getDisplayedValueAttr:function(){var a=g.map([].concat(this.get("selectedOptions")),function(a){return a&&"label"in a?a.label:a?a.value:null},this);return this.multiple?a:a[0]},_setDisplayedValueAttr:function(a){this.set("value",
this.getOptions("string"==typeof a?{label:a}:a))},_loadChildren:function(){this._loadingStore||(g.forEach(this._getChildren(),function(a){a.destroyRecursive()}),g.forEach(this.options,this._addOptionItem,this),this._updateSelection())},_updateSelection:function(){this.focusedChild=null;this._set("value",this._getValueFromOpts());var a=[].concat(this.value);if(a&&a[0]){var b=this;g.forEach(this._getChildren(),function(d){var h=g.some(a,function(a){return d.option&&a===d.option.value});h&&!b.multiple&&
(b.focusedChild=d);c.toggle(d.domNode,this.baseClass.replace(/\s+|$/g,"SelectedOption "),h);d.domNode.setAttribute("aria-selected",h?"true":"false")},this)}},_getValueFromOpts:function(){var a=this.getOptions()||[];if(!this.multiple&&a.length){var c=g.filter(a,function(a){return a.selected})[0];if(c&&c.value)return c.value;a[0].selected=!0;return a[0].value}return this.multiple?g.map(g.filter(a,function(a){return a.selected}),function(a){return a.value})||[]:""},_onNewItem:function(a,c){(!c||!c.parent)&&
this._addOptionForItem(a)},_onDeleteItem:function(a){this.removeOption({value:this.store.getIdentity(a)})},_onSetItem:function(a){this.updateOption(this._getOptionObjForItem(a))},_getOptionObjForItem:function(a){var c=this.store,b=this.labelAttr&&this.labelAttr in a?a[this.labelAttr]:c.getLabel(a);return{value:b?c.getIdentity(a):null,label:b,item:a}},_addOptionForItem:function(a){var c=this.store;c.isItemLoaded&&!c.isItemLoaded(a)?c.loadItem({item:a,onItem:function(a){this._addOptionForItem(a)},scope:this}):
(a=this._getOptionObjForItem(a),this.addOption(a))},constructor:function(a){this._oValue=(a||{}).value||null;this._notifyConnections=[]},buildRendering:function(){this.inherited(arguments);a.setSelectable(this.focusNode,!1)},_fillContent:function(){this.options||(this.options=this.srcNodeRef?l("\x3e *",this.srcNodeRef).map(function(a){return"separator"===a.getAttribute("type")?{value:"",label:"",selected:!1,disabled:!1}:{value:a.getAttribute("data-"+h._scopeName+"-value")||a.getAttribute("value"),
label:String(a.innerHTML),selected:a.getAttribute("selected")||!1,disabled:a.getAttribute("disabled")||!1}},this):[]);this.value?this.multiple&&"string"==typeof this.value&&this._set("value",this.value.split(",")):this._set("value",this._getValueFromOpts())},postCreate:function(){this.inherited(arguments);e.after(this,"onChange",k.hitch(this,"_updateSelection"));var a=this.store;if(a&&(a.getIdentity||a.getFeatures()["dojo.data.api.Identity"]))this.store=null,this._deprecatedSetStore(a,this._oValue,
{query:this.query,queryOptions:this.queryOptions});this._storeInitialized=!0},startup:function(){this._loadChildren();this.inherited(arguments)},destroy:function(){for(var a;a=this._notifyConnections.pop();)a.remove();this._queryRes&&this._queryRes.close&&this._queryRes.close();this._observeHandle&&this._observeHandle.remove&&(this._observeHandle.remove(),this._observeHandle=null);this.inherited(arguments)},_addOptionItem:function(){},_removeOptionItem:function(){},_setDisplay:function(){},_getChildren:function(){return[]},
_getSelectedOptionsAttr:function(){return this.getOptions({selected:!0})},_pseudoLoadChildren:function(){},onSetStore:function(){}})})},"MOTW/mgg/table/tableCellRenderers":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/dom-style","../utils/TextUtils","../utils/HtmlUtils"],function(g,f,e,d,b){function a(){var a=document.createElement("div");a.setAttribute("class","verticalSpacer");return a}function c(a){for(;a.firstChild;)a.removeChild(a.firstChild)}function h(a){var c=d.getTextStyleDashes(a||
{});c.display=a&&!1===a.visible?"none":void 0;var b;a="";for(b in c)c.hasOwnProperty(b)&&c[b]&&(a+=b+":"+c[b]+";");return a}var k;return k={"default":{getColumnStyles:h,create:function(c,b){var d=document.createElement("div");d.setAttribute("class","plainText");var h=document.createElement("span");h.appendChild(document.createTextNode(b||""));d.appendChild(h);d.appendChild(a());c&&c.background&&d.setAttribute("style","background: rgba("+c.background.join(", ")+")");return d},update:function(a,c,b){if("div"!==
a.nodeName.toLowerCase()||!a.getAttribute("class")||"plainText"!==a.getAttribute("class"))return this.create(c,b);a.firstElementChild.firstChild.nodeValue=b}},html:{getColumnStyles:h,create:function(c,b){var d=document.createElement("div");d.innerHTML=b;d.setAttribute("class","htmlCell");d.appendChild(a());c&&c.background&&d.setAttribute("style","background: rgba("+c.background.join(", ")+")");return d},update:function(a,c,b){if("div"!==a.nodeName.toLowerCase()||!a.getAttribute("class")||"htmlCell"!==
a.getAttribute("class"))return this.create(c,b);a.innerHTML=b}},checkbox:{getColumnStyles:h,create:function(a,c){var b=document.createElement("input");this.update(b,a,c);return b},update:function(a,c,b){if("input"!==a.nodeName.toLowerCase())return this.create(c,b);a.type="checkbox";!0===b||"true"===b?(a.setAttribute("checked",""),a.checked=!0):(a.removeAttribute("checked"),a.checked=!1);a.disabled=void 0===c.enabled?!1:!c.enabled},getCellValue:function(a){if("input"===a.nodeName.toLowerCase()&&"checkbox"===
a.type)return a.checked?a.setAttribute("checked",""):a.removeAttribute("checked"),!!a.checked}},radio:{getColumnStyles:h,create:function(a,c){var b=document.createElement("input");this.update(b,a,c);return b},update:function(a,c,b){if("input"!==a.nodeName.toLowerCase())return this.create(c,b);a.type="radio";!0===b||"true"===b?(a.setAttribute("checked",""),a.checked=!0):(a.removeAttribute("checked"),a.checked=!1);a.disabled=void 0===c.enabled?!1:!c.enabled},getCellValue:function(a){if("input"===a.nodeName.toLowerCase()&&
"radio"===a.type)return a.checked?a.setAttribute("checked",""):a.removeAttribute("checked"),!!a.checked}},text:{getColumnStyles:h,create:function(a,c){var b=document.createElement("input");this.update(b,a,c);return b},update:function(a,c,b){if("input"!==a.nodeName.toLowerCase())return this.create(c,b);a.type="text";a.value=b;!1===c.enabled?a.setAttribute("readonly",""):a.removeAttribute("readonly")},getCellValue:function(a){if("input"===a.nodeName.toLowerCase()&&"text"===a.type)return a.value}},numeric:{getColumnStyles:h,
create:function(a,c){var b=document.createElement("input");this.update(b,a,c);return b},update:function(a,c,b){if("input"!==a.nodeName.toLowerCase())return this.create(c,b);a.type="text";a.value=b;!1===c.enabled?a.setAttribute("readonly",""):a.removeAttribute("readonly")},getCellValue:function(a){if("input"===a.nodeName.toLowerCase()&&"text"===a.type)return a.value}},color:{getColumnStyles:h,create:function(a,c){var b=document.createElement("input");this.update(b,a,c);return b},update:function(a,
c,b){if("input"!==a.nodeName.toLowerCase())return this.create(c,b);a.type="text";a.value="["+b[0].toFixed(3)+", "+b[1].toFixed(3)+", "+b[2].toFixed(3)+"]";!1===c.enabled?a.setAttribute("readonly",""):a.removeAttribute("readonly")},getCellValue:function(a){if("input"===a.nodeName.toLowerCase()&&"text"===a.type)return a=a.value.replace(/[\s\[\]]*/g,"").split(","),[parseFloat(a[0]),parseFloat(a[1]),parseFloat(a[2])]}},list:{getColumnStyles:h,create:function(a,c){var b=document.createElement("select");
this.update(b,a,c);return b},update:function(a,c,b){if("select"!==a.nodeName.toLowerCase())return this.create(c,b);this._addOptions(a,c,b);a.disabled=void 0===c.enabled?!1:!c.enabled},getCellValue:function(a,c,b){if("select"===a.nodeName.toLowerCase())return c=b.listValues[a.selectedIndex],this._addOptions(a,b,c),c},_addOptions:function(a,b,d){var h,e,f;e=!1;if(b.listValues.length===a.children.length){for(h=0;h<b.listValues.length;h+=1)if(f=a.children[h],f.value!==b.listValues[h]||f.hasAttribute("selected")!==
(f.value===d)){e=!0;break}if(!e)return}c(a);for(h=0;h<b.listValues.length;h+=1)e=b.listValues[h],f=document.createElement("option"),f.value=e,f.text=e,d===e&&f.setAttribute("selected",""),a.add(f)}},label:{getColumnStyles:h,create:function(a,c){var b=document.createElement("div");b.setAttribute("class","label");this.update(b,a,c);return b},update:function(b,d,h){if("div"!==b.nodeName.toLowerCase()||"label"!==b.getAttribute("class"))return this.create(d,h);h.background?b.setAttribute("style","background: rgb("+
h.background.join(",")+")"):d.background&&b.setAttribute("style","background: rgba("+d.background.join(", ")+")");c(b);h.icon&&b.appendChild(h.icon.cloneNode());d=document.createElement("label");"string"===typeof h.value?this._setLabel(d,h.value):"string"===typeof h&&this._setLabel(d,h);b.appendChild(d);b.appendChild(a())},_setLabel:function(a,c){var d=c.trim();0===d.toLowerCase().indexOf("\x3chtml\x3e")&&!b.containsLinks(d)?d.toLowerCase().indexOf("\x3c/html\x3e")===d.length-7?a.innerHTML=d.substring(6,
d.length-7):a.innerHTML=d.substring(6,d.length):a.appendChild(document.createTextNode(c))}},expand:{create:function(a,c){var b=document.createElement("div");b.setAttribute("class","expand");var d=document.createElement("div"),h=document.createElement("div");b.appendChild(d);b.appendChild(h);this.update(b,a,c);return b},update:function(a,b,d){if("div"!==a.nodeName.toLowerCase()||"expand"!==a.getAttribute("class"))return this.create(b,d);b=a.firstChild;a=b.nextElementSibling;c(b);c(a);if(d.expandable){var h=
document.createElement("button");d.expanded&&h.setAttribute("class","expanded");b.appendChild(h)}h="";for(b=0;b<d.depth;b+=1)h+="  ";a.appendChild(document.createTextNode(h+d.text))}},prop:{create:function(a,c){var b=document.createElement("div");b.setAttribute("class","prop");var d=document.createElement("div"),h=document.createElement("div"),e=document.createElement("div");b.appendChild(d);b.appendChild(h);b.appendChild(e);this.update(b,a,c);return b},update:function(a,b,d){if("div"!==a.nodeName.toLowerCase()||
"prop"!==a.getAttribute("class"))return this.create(b,d);a=a.firstChild;b=a.nextElementSibling;var h=b.nextElementSibling;c(a);c(b);c(h);this["_"+d.leftType](a,"left",d);this["_"+d.middleType](b,"middle",d);this["_"+d.rightType](h,"right",d)},getCellValue:function(a,c,b,d){if(d&&"text"===d.middleType)return a=f.clone(d),a.middleText=c.value,a},_label:function(a,c,b){if(b[c+"Text"]){var d=document.createTextNode(b[c+"Text"]);a.appendChild(d)}this._appendIcon(a,b[c+"Icon"])},_text:function(a,c,b){var d=
document.createElement("input");d.type="text";d.value=b[c+"Text"];a.appendChild(d)},_button:function(a,c,b){var d=document.createElement("button");b[c+"Text"]&&d.appendChild(document.createTextNode(b[c+"Text"]));this._appendIcon(d,b[c+"Icon"]);a.appendChild(d)},_dropdown:function(a,c,b){var d=document.createElement("button");b[c+"Text"]&&d.appendChild(document.createTextNode(b[c+"Text"]));this._appendIcon(d,b[c+"Icon"]);a.appendChild(d)},_space:function(){},_appendIcon:function(a,c){"string"===typeof c?
a.setAttribute("class",c+"Icon"):c instanceof Image&&a.appendChild(c.cloneNode())}},cell:{create:function(a,c){var b=c&&c.renderer&&c.renderer.type,b=b&&k[b]?k[b].create(c.renderer,c.value):k["default"].create(c.renderer,c.value);this._updateNode(b,c.renderer);return b},update:function(a,c,b){if((c=b&&b.renderer&&b.renderer.type)&&k[c])if(k[c].update){if(c=k[c].update(a,b.renderer,b.value),!c){this._updateNode(a,b.renderer);return}}else c=k[c].create(b.renderer,b.value);else c=k["default"].create(b.renderer,
b.value);this._updateNode(c,b.renderer);return c},getCellValue:function(a,c,b,d){if((b=d.renderer.type)&&k[b]&&k[b].getCellValue){var h=f.clone(d);h.value=k[b].getCellValue(a,c,d.renderer,d.value);return h}},_updateNode:function(a,c){var b=c&&c.type;b&&k[b].getColumnStyles?a.setAttribute("style",k[b].getColumnStyles(c)):k["default"].getColumnStyles&&a.setAttribute("style",k["default"].getColumnStyles(c))}}}})},"MOTW/mgg/utils/HtmlUtils":function(){define(["mw-html-utils/HtmlUtils"],function(g){return{containsLinks:function(f){return g.HYPERLINK_ESCAPE_REGEXP.exec(f)||
g.HYPERLINK_WITH_PARENTHESIS_ESCAPE_REGEXP.exec(f)}}})},"MOTW/mgg/components/Slider":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-style dojo/on dijit/form/VerticalSlider dijit/form/VerticalRule dijit/form/VerticalRuleLabels dijit/form/HorizontalSlider dijit/form/HorizontalRule dijit/form/HorizontalRuleLabels ./AbstractComponent dojo/text!./VerticalSlider.html".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p){function n(a,c){return c?n(c,a%c):Math.abs(a)}function q(a){if(!a.length)return 0;
var c,b=a[0];for(c=1;c<a.length;c+=1)b=n(b,a[c]);return b}return g([m],{_renderComponent:function(a){this.inherited(arguments);this.slider&&a.orientation!==this._lastOrientation&&(this.slider.destroyRecursive(),this.labels=this.rule=this.slider=null);this.slider?this._updateProperties(a):(this._lastTickCount=-1,this._lastLabels=[],this._lastLabelsObj=null,this._constructSlider(a),this._updateProperties(a),this.slider.placeAt(this.domNode,"last"))},_getStyle:function(a){var c=this.inherited(arguments);
c.position="absolute";return c},_constructSlider:function(a){var c={id:a.id,showButtons:!1,intermediateChanges:!1,mouseDownIntermediateChanges:!0,style:"width:100%;height:100%;"};"horizontal"===a.orientation?(this.slider=new h(c),this.slider.own(d(this.slider.domNode,"mousedown",f.hitch(this.slider,"_onBarClick")))):(c.templateString=p,this.slider=new b(c));this._lastOrientation=a.orientation;var e=this.dataService;this.slider.onChange=function(c){e.registerHandlerService().getHandler("Slider").setProperties(a.id,
{value:c})};this.own(this.slider)},_updateProperties:function(b){this.slider.set("disabled",!1===b.enabled);this.slider.set("minimum",b.min);this.slider.set("maximum",b.max);this.slider.set("value",b.value);!0===b.snapToTicks?this.slider.set("discreteValues",(b.max-b.min)/b.minorTickSpacing+1):this.slider.set("discreteValues",b.max-b.min+1);"horizontal"===b.orientation?this._createOrUpdateRuleAndLabels(b,"height:5px;",k,l):this._createOrUpdateRuleAndLabels(b,"width:5px;",a,c)},_createOrUpdateRuleAndLabels:function(a,
c,b,d){var h=(a.max-a.min)/(a.minorTickSpacing||1)+1;a.showTicks&&this._lastTickCount!==h&&(this.rule&&(this.slider.removeChild(this.labels),this.rule.destroyRecursive()),this.rule=new b({count:h,style:c}),this._lastTickCount=h,this.slider.addChild(this.rule,0));this._lastLabelsObj!==a.labels&&(c=this._generateTickLabels(a),a.showLabels&&(0<c.length&&this._lastLabels.join(",")!==c.join(","))&&(this.labels&&(this.slider.removeChild(this.labels),this.labels.destroyRecursive()),this.labels=new d({labels:c}),
this._lastLabels=c,this.slider.addChild(this.labels,1)),this._lastLabelsObj=a.labels)},_generateTickLabels:function(a){var c=[];if(a.labels){var b=[];Object.keys(a.labels).forEach(function(c){c=parseInt(c,10)-a.min;0<c&&b.push(c)});var d=q(b);if(0<d){var h;for(h=0;h<=a.max-a.min;h+=d)c.push(a.labels[h+a.min]||"")}}return c}})})},"dijit/form/VerticalSlider":function(){define(["dojo/_base/declare","./HorizontalSlider","dojo/text!./templates/VerticalSlider.html"],function(g,f,e){return g("dijit.form.VerticalSlider",
f,{templateString:e,_mousePixelCoord:"pageY",_pixelCount:"h",_startingPixelCoord:"y",_handleOffsetCoord:"top",_progressPixelSize:"height",_descending:!0,_isReversed:function(){return this._descending}})})},"dijit/form/HorizontalSlider":function(){define("dojo/_base/array dojo/_base/declare dojo/dnd/move dojo/_base/fx dojo/dom-geometry dojo/dom-style dojo/keys dojo/_base/lang dojo/sniff dojo/dnd/Moveable dojo/dnd/Mover dojo/query dojo/mouse dojo/on ../_base/manager ../focus ../typematic ./Button ./_FormValueWidget ../_Container dojo/text!./templates/HorizontalSlider.html".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x){var y=f("dijit.form._SliderMover",m,{onMouseMove:function(a){var c=this.widget,d=c._abspos;d||(d=c._abspos=b.position(c.sliderBarContainer,!0),c._setPixelValue_=h.hitch(c,"_setPixelValue"),c._isReversed_=c._isReversed());a=a[c._mousePixelCoord]-d[c._startingPixelCoord];c._setPixelValue_(c._isReversed_?d[c._pixelCount]-a:a,d[c._pixelCount],!1)},destroy:function(a){m.prototype.destroy.apply(this,arguments);var c=this.widget;c._abspos=null;c._setValueAttr(c.value,
!0)}});e=f("dijit.form.HorizontalSlider",[v,w],{templateString:x,value:0,showButtons:!0,minimum:0,maximum:100,discreteValues:Infinity,pageIncrement:2,clickSelect:!0,slideDuration:r.defaultDuration,_setIdAttr:"",_setNameAttr:"valueNode",baseClass:"dijitSlider",cssStateNodes:{incrementButton:"dijitSliderIncrementButton",decrementButton:"dijitSliderDecrementButton",focusNode:"dijitSliderThumb"},_mousePixelCoord:"pageX",_pixelCount:"w",_startingPixelCoord:"x",_handleOffsetCoord:"left",_progressPixelSize:"width",
_onKeyUp:function(a){!this.disabled&&(!this.readOnly&&!a.altKey&&!a.ctrlKey&&!a.metaKey)&&this._setValueAttr(this.value,!0)},_onKeyDown:function(a){if(!this.disabled&&!this.readOnly&&!a.altKey&&!a.ctrlKey&&!a.metaKey){switch(a.keyCode){case c.HOME:this._setValueAttr(this.minimum,!1);break;case c.END:this._setValueAttr(this.maximum,!1);break;case this._descending||this.isLeftToRight()?c.RIGHT_ARROW:c.LEFT_ARROW:case !1===this._descending?c.DOWN_ARROW:c.UP_ARROW:case !1===this._descending?c.PAGE_DOWN:
c.PAGE_UP:this.increment(a);break;case this._descending||this.isLeftToRight()?c.LEFT_ARROW:c.RIGHT_ARROW:case !1===this._descending?c.UP_ARROW:c.DOWN_ARROW:case !1===this._descending?c.PAGE_UP:c.PAGE_DOWN:this.decrement(a);break;default:return}a.stopPropagation();a.preventDefault()}},_onHandleClick:function(a){!this.disabled&&!this.readOnly&&(k("ie")||s.focus(this.sliderHandle),a.stopPropagation(),a.preventDefault())},_isReversed:function(){return!this.isLeftToRight()},_onBarClick:function(a){if(!this.disabled&&
!this.readOnly&&this.clickSelect){s.focus(this.sliderHandle);a.stopPropagation();a.preventDefault();var c=b.position(this.sliderBarContainer,!0),d=a[this._mousePixelCoord]-c[this._startingPixelCoord];this._setPixelValue(this._isReversed()?c[this._pixelCount]-d:d,c[this._pixelCount],!0);this._movable.onMouseDown(a)}},_setPixelValue:function(a,c,b){if(!this.disabled&&!this.readOnly){var d=this.discreteValues;if(1>=d||Infinity==d)d=c;d--;a=Math.round(a/(c/d));this._setValueAttr(Math.max(Math.min((this.maximum-
this.minimum)*a/d+this.minimum,this.maximum),this.minimum),b)}},_setValueAttr:function(a,c){this._set("value",a);this.valueNode.value=a;this.focusNode.setAttribute("aria-valuenow",a);this.inherited(arguments);var b=this.maximum>this.minimum?(a-this.minimum)/(this.maximum-this.minimum):0,h=!1===this._descending?this.remainingBar:this.progressBar,e=!1===this._descending?this.progressBar:this.remainingBar;this._inProgressAnim&&"stopped"!=this._inProgressAnim.status&&this._inProgressAnim.stop(!0);if(c&&
0<this.slideDuration&&h.style[this._progressPixelSize]){var f=this,k={},l=parseFloat(h.style[this._progressPixelSize]),g=this.slideDuration*(b-l/100);0!=g&&(0>g&&(g=0-g),k[this._progressPixelSize]={start:l,end:100*b,units:"%"},this._inProgressAnim=d.animateProperty({node:h,duration:g,onAnimate:function(a){e.style[f._progressPixelSize]=100-parseFloat(a[f._progressPixelSize])+"%"},onEnd:function(){delete f._inProgressAnim},properties:k}),this._inProgressAnim.play())}else h.style[this._progressPixelSize]=
100*b+"%",e.style[this._progressPixelSize]=100*(1-b)+"%"},_bumpValue:function(c,d){if(!this.disabled&&!(this.readOnly||this.maximum<=this.minimum)){var h=a.getComputedStyle(this.sliderBarContainer),e=b.getContentBox(this.sliderBarContainer,h),h=this.discreteValues;if(1>=h||Infinity==h)h=e[this._pixelCount];h--;e=Math.round((this.value-this.minimum)*h/(this.maximum-this.minimum))+c;0>e&&(e=0);e>h&&(e=h);e=e*(this.maximum-this.minimum)/h+this.minimum;this._setValueAttr(e,d)}},_onClkBumper:function(a){!this.disabled&&
(!this.readOnly&&this.clickSelect)&&this._setValueAttr(a,!0)},_onClkIncBumper:function(){this._onClkBumper(!1===this._descending?this.minimum:this.maximum)},_onClkDecBumper:function(){this._onClkBumper(!1===this._descending?this.maximum:this.minimum)},decrement:function(a){this._bumpValue(a.keyCode==c.PAGE_DOWN?-this.pageIncrement:-1)},increment:function(a){this._bumpValue(a.keyCode==c.PAGE_UP?this.pageIncrement:1)},_mouseWheeled:function(a){this.focused&&(a.stopPropagation(),a.preventDefault(),this._bumpValue(0>
a.wheelDelta?-1:1,!0))},startup:function(){this._started||(g.forEach(this.getChildren(),function(a){this[a.container]!=this.containerNode&&this[a.container].appendChild(a.domNode)},this),this.inherited(arguments))},_typematicCallback:function(a,c,b){if(-1==a)this._setValueAttr(this.value,!0);else this[c==(this._descending?this.incrementButton:this.decrementButton)?"decrement":"increment"](b)},buildRendering:function(){this.inherited(arguments);this.showButtons&&(this.incrementButton.style.display=
"",this.decrementButton.style.display="");var a=p('label[for\x3d"'+this.id+'"]');a.length&&(a[0].id||(a[0].id=this.id+"_label"),this.focusNode.setAttribute("aria-labelledby",a[0].id));this.focusNode.setAttribute("aria-valuemin",this.minimum);this.focusNode.setAttribute("aria-valuemax",this.maximum)},postCreate:function(){this.inherited(arguments);this.showButtons&&this.own(t.addMouseListener(this.decrementButton,this,"_typematicCallback",25,500),t.addMouseListener(this.incrementButton,this,"_typematicCallback",
25,500));this.own(q(this.domNode,n.wheel,h.hitch(this,"_mouseWheeled")));var a=f(y,{widget:this});this._movable=new l(this.sliderHandle,{mover:a});this._layoutHackIE7()},destroy:function(){this._movable.destroy();this._inProgressAnim&&"stopped"!=this._inProgressAnim.status&&this._inProgressAnim.stop(!0);this.inherited(arguments)}});e._Mover=y;return e})},"dojo/dnd/move":function(){define("../_base/declare ../dom-geometry ../dom-style ./common ./Mover ./Moveable".split(" "),function(g,f,e,d,b,a){d=
g("dojo.dnd.move.constrainedMoveable",a,{constraints:function(){},within:!1,constructor:function(a,b){b||(b={});this.constraints=b.constraints;this.within=b.within},onFirstMove:function(a){var b=this.constraintBox=this.constraints.call(this,a);b.r=b.l+b.w;b.b=b.t+b.h;this.within&&(a=f.getMarginSize(a.node),b.r-=a.w,b.b-=a.h)},onMove:function(a,b){var d=this.constraintBox,e=a.node.style;this.onMoving(a,b);b.l=b.l<d.l?d.l:d.r<b.l?d.r:b.l;b.t=b.t<d.t?d.t:d.b<b.t?d.b:b.t;e.left=b.l+"px";e.top=b.t+"px";
this.onMoved(a,b)}});b=g("dojo.dnd.move.boxConstrainedMoveable",d,{box:{},constructor:function(a,b){var d=b&&b.box;this.constraints=function(){return d}}});g=g("dojo.dnd.move.parentConstrainedMoveable",d,{area:"content",constructor:function(a,b){var d=b&&b.area;this.constraints=function(){var a=this.node.parentNode,c=e.getComputedStyle(a),b=f.getMarginBox(a,c);if("margin"==d)return b;var h=f.getMarginExtents(a,c);b.l+=h.l;b.t+=h.t;b.w-=h.w;b.h-=h.h;if("border"==d)return b;h=f.getBorderExtents(a,c);
b.l+=h.l;b.t+=h.t;b.w-=h.w;b.h-=h.h;if("padding"==d)return b;h=f.getPadExtents(a,c);b.l+=h.l;b.t+=h.t;b.w-=h.w;b.h-=h.h;return b}}});return{constrainedMoveable:d,boxConstrainedMoveable:b,parentConstrainedMoveable:g}})},"dijit/form/VerticalRule":function(){define(["dojo/_base/declare","./HorizontalRule"],function(g,f){return g("dijit.form.VerticalRule",f,{templateString:'\x3cdiv class\x3d"dijitRuleContainer dijitRuleContainerV"\x3e\x3c/div\x3e',_positionPrefix:'\x3cdiv class\x3d"dijitRuleMark dijitRuleMarkV" style\x3d"top:',
_isHorizontal:!1})})},"dijit/form/HorizontalRule":function(){define(["dojo/_base/declare","../_Widget","../_TemplatedMixin"],function(g,f,e){return g("dijit.form.HorizontalRule",[f,e],{templateString:'\x3cdiv class\x3d"dijitRuleContainer dijitRuleContainerH"\x3e\x3c/div\x3e',count:3,container:"containerNode",ruleStyle:"",_positionPrefix:'\x3cdiv class\x3d"dijitRuleMark dijitRuleMarkH" style\x3d"left:',_positionSuffix:"%;",_suffix:'"\x3e\x3c/div\x3e',_genHTML:function(d){return this._positionPrefix+
d+this._positionSuffix+this.ruleStyle+this._suffix},_isHorizontal:!0,buildRendering:function(){this.inherited(arguments);var d;if(1==this.count)d=this._genHTML(50,0);else{var b,a=100/(this.count-1);if(!this._isHorizontal||this.isLeftToRight()){d=this._genHTML(0,0);for(b=1;b<this.count-1;b++)d+=this._genHTML(a*b,b);d+=this._genHTML(100,this.count-1)}else{d=this._genHTML(100,0);for(b=1;b<this.count-1;b++)d+=this._genHTML(100-a*b,b);d+=this._genHTML(0,this.count-1)}}this.domNode.innerHTML=d}})})},"dijit/form/VerticalRuleLabels":function(){define(["dojo/_base/declare",
"./HorizontalRuleLabels"],function(g,f){return g("dijit.form.VerticalRuleLabels",f,{templateString:'\x3cdiv class\x3d"dijitRuleContainer dijitRuleContainerV dijitRuleLabelsContainer dijitRuleLabelsContainerV"\x3e\x3c/div\x3e',_positionPrefix:'\x3cdiv class\x3d"dijitRuleLabelContainer dijitRuleLabelContainerV" style\x3d"top:',_labelPrefix:'"\x3e\x3cspan class\x3d"dijitRuleLabel dijitRuleLabelV"\x3e',_calcPosition:function(e){return 100-e},_isHorizontal:!1})})},"dijit/form/HorizontalRuleLabels":function(){define("dojo/_base/declare dojo/has dojo/number dojo/query dojo/_base/lang ./HorizontalRule".split(" "),
function(g,f,e,d,b,a){g=g("dijit.form.HorizontalRuleLabels",a,{templateString:'\x3cdiv class\x3d"dijitRuleContainer dijitRuleContainerH dijitRuleLabelsContainer dijitRuleLabelsContainerH"\x3e\x3c/div\x3e',labelStyle:"",labels:[],numericMargin:0,minimum:0,maximum:1,constraints:{pattern:"#%"},_positionPrefix:'\x3cdiv class\x3d"dijitRuleLabelContainer dijitRuleLabelContainerH" style\x3d"left:',_labelPrefix:'"\x3e\x3cdiv class\x3d"dijitRuleLabel dijitRuleLabelH"\x3e',_suffix:"\x3c/div\x3e\x3c/div\x3e",
_calcPosition:function(a){return a},_genHTML:function(a,b){var d=this.labels[b];return this._positionPrefix+this._calcPosition(a)+this._positionSuffix+this.labelStyle+this._genDirectionHTML(d)+this._labelPrefix+d+this._suffix},_genDirectionHTML:function(a){return""},getLabels:function(){var a=this.labels;!a.length&&this.srcNodeRef&&(a=d("\x3e li",this.srcNodeRef).map(function(a){return String(a.innerHTML)}));if(!a.length&&1<this.count)for(var a=[],b=this.minimum,f=(this.maximum-b)/(this.count-1),
l=0;l<this.count;l++)a.push(l<this.numericMargin||l>=this.count-this.numericMargin?"":e.format(b,this.constraints)),b+=f;return a},postMixInProperties:function(){this.inherited(arguments);this.labels=this.getLabels();this.count=this.labels.length}});f("dojo-bidi")&&g.extend({_setTextDirAttr:function(a){this.textDir!=a&&(this._set("textDir",a),d(".dijitRuleLabelContainer",this.domNode).forEach(b.hitch(this,function(a){a.style.direction=this.getTextDir(a.innerText||a.textContent||"")})))},_genDirectionHTML:function(a){return this.textDir?
"direction:"+this.getTextDir(a)+";":""}});return g})},"MOTW/mgg/components/ScrollBar":function(){define(["dojo/_base/declare","dojo/dom-geometry","./AbstractComponent","./HorizontalScrollBar","./VerticalScrollBar"],function(g,f,e,d,b){return g([e],{_renderComponent:function(a){this.inherited(arguments);var c=this.handler;this.slider&&a.orientation!==this._lastOrientation&&(this.slider.destroyRecursive(),this.slider=null);this.slider?this._updateProperties(a):(this.slider="horizontal"===a.orientation?
new d({id:a.id,style:"height: 100%; width: 100%",onChange:function(b){c.setProperties(a.id,{value:b})}}):new b({id:a.id,style:"height: 100%; width: 100%",onChange:function(b){c.setProperties(a.id,{value:b})}}),this._lastOrientation=a.orientation,this.own(this.slider),this._updateProperties(a),this.slider.placeAt(this.domNode,"last"),this._started&&this.slider.startup())},startup:function(){this.inherited(arguments);this.slider.startup()},resize:function(){this.inherited(arguments);this.slider.resize()},
_getStyle:function(a){var c=this.inherited(arguments);delete c.border;return c},_updateProperties:function(a){this.slider.set("disabled",!1===a.enabled);this.slider.set("minimum",a.min);this.slider.set("maximum",a.max);this.slider.set("value",a.value);this.slider.set("extent",a.extent||0);this.slider.set("unitIncrement",a.unitIncrement||1);this.slider.set("blockIncrement",a.blockIncrement||1);this.slider.resize();this._lastVisibility!==a.visibility&&(this._lastVisibility=a.visibility)}})})},"MOTW/mgg/components/HorizontalScrollBar":function(){define(["dojo/_base/declare",
"./VerticalScrollBar","dojo/text!./HorizontalScrollBar.html"],function(g,f,e){return g([f],{templateString:e,_pageKey:"pageX",_clientKey:"clientX",_scrollKey:"scrollLeft",_dirKey:"x",_rangeKey:"w",_minStyleKey:"minWidth",_thumbSizeKey:"width",_thumbPosKey:"left"})})},"MOTW/mgg/components/VerticalScrollBar":function(){define("dojo/_base/declare dojo/_base/event dojo/_base/lang dojo/dom-style dojo/dom-geometry dojo/has dojo/on dojo/touch dijit/typematic dijit/_WidgetBase dijit/_TemplatedMixin dijit/_CssStateMixin dojo/text!./VerticalScrollBar.html".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){return g([l,m,p],{minimum:0,maximum:100,value:0,extent:0,unitIncrement:5,blockIncrement:20,disabled:!1,intermediateChanges:!1,templateString:n,_pageKey:"pageY",_clientKey:"clientY",_scrollKey:"scrollTop",_dirKey:"y",_rangeKey:"h",_minStyleKey:"minHeight",_thumbSizeKey:"height",_thumbPosKey:"top",_events:[],postCreate:function(){this.inherited(arguments);this._placeThumbContainer();this._updateThumb();this.own(c(this.domNode,!a("mozilla")?"mousewheel":"DOMMouseScroll",
function(c){this.disabled||(f.stop(c),0<c[!a("mozilla")?"wheelDelta":"detail"]*(!a("mozilla")?1:-1)?this.set("value",this._clipValue(this.value-this.unitIncrement)):this.set("value",this._clipValue(this.value+this.unitIncrement)))}.bind(this)));this.own(k.addMouseListener(this.decrementNode,this,this._onDecrementClick,25,250));this.own(k.addMouseListener(this.incrementNode,this,this._onIncrementClick,25,250));this.own(k.addMouseListener(this.thumbContainerWrapperNode,this,this._onThumbContainerClick,
25,250))},startup:function(){this.inherited(arguments);this._placeThumbContainer();this._updateThumb()},resize:function(){this.inherited(arguments);this._placeThumbContainer();this._updateThumb()},_placeThumbContainer:function(){var a;this._started&&(a=b.position(this.domNode)[this._rangeKey],0<a&&d.set(this.thumbContainerWrapperNode,this._thumbSizeKey,a-2*d.get(this.incrementNode,this._thumbSizeKey)+"px"))},onChange:function(a){},_onDecrementClick:function(a){0<=a&&!this.disabled&&this.set("value",
this._clipValue(this.value-this.unitIncrement))},_onIncrementClick:function(a){0<=a&&!this.disabled&&this.set("value",this._clipValue(this.value+this.unitIncrement))},_onThumbContainerClick:function(a,c,d){if(0<=a&&(d.target!==this.thumbNode&&!this._destroyed&&!this.disabled)&&(a=0,d[this._pageKey]?a=d[this._pageKey]:d[this._clientKey]&&(a=d[this._clientKey]+document.body[this._scrollKey]+document.documentElement[this._scrollKey]),d=b.position(d.target)))a-=d[this._dirKey],d=b.getMarginBox(this.thumbContainerNode)[this._rangeKey],
c=this.maximum-this.minimum,a/d<(this.value-this.minimum)/c?this.set("value",this._clipValue(this.value-this.blockIncrement)):a/d>(this.value+this.extent-this.minimum)/c&&this.set("value",this._clipValue(this.value+this.blockIncrement))},onThumbDown:function(a){this.disabled||(f.stop(a),this._startPos=a[this._pageKey],this._startValue=this.value,this._range=b.getMarginBox(this.thumbNode.parentNode)[this._rangeKey],a=a.target.ownerDocument,this._events=[c(a,h.move,e.hitch(this,"onThumbMove")),c(a,
h.release,e.hitch(this,"onThumbUp")),c(a,"dragstart",f.stop),c(a.body,"selectstart",f.stop)])},onThumbMove:function(a){!this._destroyed&&!this.disabled&&(f.stop(a),this._setValueAttr(this._computeNewValue(a),this.intermediateChanges))},onThumbUp:function(a){this.disabled||(f.stop(a),this._setValueAttr(this._computeNewValue(a)));this._events.forEach(function(a){a.remove()});this._events=[]},_computeNewValue:function(a){return this._clipValue(this._startValue+(a[this._pageKey]-this._startPos)/this._range*
(this.maximum-this.minimum))},_clipValue:function(a){return Math.min(this.maximum-this.extent,Math.max(this.minimum,a))},_setExtentAttr:function(a){this.extent!==a&&(this._set("extent",a),this._updateThumb())},_setMinimumAttr:function(a){this.minimum!==a&&(this._set("minimum",a),this._updateThumb())},_setMaximumAttr:function(a){this.maximum!==a&&(this._set("maximum",a),this._updateThumb())},_setValueAttr:function(a,c){a=Math.round(a);this.value!==a&&(this._set("value",a),this._updateThumb());!1!==
c&&a!==this._lastChange&&(this._lastChange=this.value,this.onChange(this.value))},_updateThumb:function(){if(this._started){var a,c={},h,e;a=b.getMarginBox(this.thumbContainerNode)[this._rangeKey];e=this.extent/(this.maximum-this.minimum)*a+"px";h=(this.value-this.minimum)/(this.maximum-this.minimum)*a+"px";c[this._thumbSizeKey]=e;Math.ceil(parseFloat(h)+parseFloat(e))>=a&&(h=Math.ceil(a-2-parseFloat(e))+"px");c[this._thumbPosKey]=h;d.set(this.thumbNode,c)}}})})},"MOTW/mgg/components/NumberSpinner":function(){define("dojo/_base/declare dojo/keys dojo/on dijit/form/NumberSpinner mw-browser-utils/BrowserUtils ./AbstractComponent".split(" "),
function(g,f,e,d,b,a){var c=g([d],{_arrowPressed:function(a,c,b){this.inherited(arguments);this.onChange(this.get("value"))}});return g([a],{_valuePlaceholder:"$#VALUE$#",_renderComponent:function(a){this.inherited(arguments);var d=this,l=this.dataService,g=void 0===a.currentValue?a.min||0:a.currentValue,p=((a.stepSize+"").split(".")[1]||"").replace(/[0-9]/g,"#"),p=0<p.length?"#."+p:"#";this.spinner?(p=this.spinner.get("constraints"),(p.min!==a.min||p.max!==a.max)&&this.spinner.set("constraints",
{min:a.min,max:a.max}),g!==this.spinner.get("value")&&this.spinner.set("value",g),this.spinner.disabled===a.enabled&&this.spinner.set("disabled",!a.enabled)):(this.format=this._getFormat(String(a.formattedValue||g)),this.spinner=new c({value:g,smallDelta:a.stepSize||1,constraints:{min:a.min||0,max:a.max||0,pattern:p},style:"width:100%",id:a.id,_formatter:function(c,b){var e=((a.stepSize+"").split(".")[1]||[]).length,e=Math.pow(10,e);c=Math.round(c*e)/e;return d.format.replace(d._valuePlaceholder,
c)},_parser:function(a,c){return"number"===typeof a?a:parseFloat(a.replace(d._valuePlaceholder,""))},validator:function(a,c){a=this.get("value");return RegExp("^(?:"+this._computeRegexp(c)+")"+(this.required?"":"?")+"$").test(a)&&(!this.required||!this._isEmpty(a))&&(this._isEmpty(a)||void 0!==this.parse(a,c))},onChange:function(c){"Error"===this.state||void 0===c||c<a.min||c>a.max||"number"!==typeof c?this.set("value",a.currentValue):l.registerHandlerService().getHandler("NumberSpinner").setProperties(a.id,
{currentValue:c})}}),b.setClassName(this.spinner.domNode,{type:"TextField",name:a.textFieldName}),this.own(e(this.spinner,"keyUp",function(a){if((a.charCode||a.keyCode)===f.ENTER)d.spinner.onChange(d.spinner.get("value"))})),this.own(this.spinner),this.spinner.placeAt(this.domNode,"last"))},_getFormat:function(a){var c=parseFloat(a);return a.replace(c,this._valuePlaceholder)}})})},"dijit/form/NumberSpinner":function(){define(["dojo/_base/declare","dojo/keys","./_Spinner","./NumberTextBox"],function(g,
f,e,d){return g("dijit.form.NumberSpinner",[e,d.Mixin],{baseClass:"dijitTextBox dijitSpinner dijitNumberTextBox",adjust:function(b,a){var c=this.constraints,d=isNaN(b),e=!isNaN(c.max),f=!isNaN(c.min);d&&0!=a&&(b=0<a?f?c.min:e?c.max:0:e?this.constraints.max:f?c.min:0);var g=b+a;if(d||isNaN(g))return b;e&&g>c.max&&(g=c.max);f&&g<c.min&&(g=c.min);return g},_onKeyDown:function(b){if(!this.disabled&&!this.readOnly&&(b.keyCode==f.HOME||b.keyCode==f.END)&&!b.ctrlKey&&(!b.altKey&&!b.metaKey)&&"undefined"!=
typeof this.get("value")){var a=this.constraints[b.keyCode==f.HOME?"min":"max"];"number"==typeof a&&this._setValueAttr(a,!1);b.stopPropagation();b.preventDefault()}}})})},"dijit/form/_Spinner":function(){define("dojo/_base/declare dojo/keys dojo/_base/lang dojo/sniff dojo/mouse dojo/on ../typematic ./RangeBoundTextBox dojo/text!./templates/Spinner.html ./_TextBoxMixin".split(" "),function(g,f,e,d,b,a,c,h,k,l){return g("dijit.form._Spinner",h,{defaultTimeout:500,minimumTimeout:10,timeoutChangeRate:0.9,
smallDelta:1,largeDelta:10,templateString:k,baseClass:"dijitTextBox dijitSpinner",cssStateNodes:{upArrowNode:"dijitUpArrowButton",downArrowNode:"dijitDownArrowButton"},adjust:function(a){return a},_arrowPressed:function(a,c,b){!this.disabled&&!this.readOnly&&(this._setValueAttr(this.adjust(this.get("value"),c*b),!1),l.selectInputText(this.textbox,this.textbox.value.length))},_arrowReleased:function(){this._wheelTimer=null},_typematicCallback:function(a,c,b){var d=this.smallDelta;c==this.textbox&&
(c=b.keyCode,d=c==f.PAGE_UP||c==f.PAGE_DOWN?this.largeDelta:this.smallDelta,c=c==f.UP_ARROW||c==f.PAGE_UP?this.upArrowNode:this.downArrowNode);-1==a?this._arrowReleased(c):this._arrowPressed(c,c==this.upArrowNode?1:-1,d)},_wheelTimer:null,_mouseWheeled:function(a){if(this.focused){a.stopPropagation();a.preventDefault();var c=a.wheelDelta/120;Math.floor(c)!=c&&(c=0<a.wheelDelta?1:-1);a=a.detail?-1*a.detail:c;if(0!==a){var b=this[0<a?"upArrowNode":"downArrowNode"];this._arrowPressed(b,a,this.smallDelta);
this._wheelTimer&&this._wheelTimer.remove();this._wheelTimer=this.defer(function(){this._arrowReleased(b)},50)}}},_setConstraintsAttr:function(a){this.inherited(arguments);this.focusNode&&(void 0!==this.constraints.min?this.focusNode.setAttribute("aria-valuemin",this.constraints.min):this.focusNode.removeAttribute("aria-valuemin"),void 0!==this.constraints.max?this.focusNode.setAttribute("aria-valuemax",this.constraints.max):this.focusNode.removeAttribute("aria-valuemax"))},_setValueAttr:function(a,
c){this.focusNode.setAttribute("aria-valuenow",a);this.inherited(arguments)},postCreate:function(){this.inherited(arguments);this.own(a(this.domNode,b.wheel,e.hitch(this,"_mouseWheeled")),c.addListener(this.upArrowNode,this.textbox,{keyCode:f.UP_ARROW,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout),c.addListener(this.downArrowNode,this.textbox,{keyCode:f.DOWN_ARROW,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1},this,
"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout),c.addListener(this.upArrowNode,this.textbox,{keyCode:f.PAGE_UP,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout),c.addListener(this.downArrowNode,this.textbox,{keyCode:f.PAGE_DOWN,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1},this,"_typematicCallback",this.timeoutChangeRate,this.defaultTimeout,this.minimumTimeout))}})})},"dijit/form/RangeBoundTextBox":function(){define(["dojo/_base/declare",
"dojo/i18n","./MappedTextBox","dojo/i18n!./nls/validate"],function(g,f,e){return g("dijit.form.RangeBoundTextBox",e,{rangeMessage:"",rangeCheck:function(d,b){return("min"in b?0<=this.compare(d,b.min):!0)&&("max"in b?0>=this.compare(d,b.max):!0)},isInRange:function(){return this.rangeCheck(this.get("value"),this.constraints)},_isDefinitelyOutOfRange:function(){var d=this.get("value");if(null==d)return!1;var b=!1;"min"in this.constraints&&(b=this.constraints.min,b=0>this.compare(d,"number"==typeof b&&
0<=b&&0!=d?0:b));!b&&"max"in this.constraints&&(b=this.constraints.max,b=0<this.compare(d,"number"!=typeof b||0<b?b:0));return b},_isValidSubset:function(){return this.inherited(arguments)&&!this._isDefinitelyOutOfRange()},isValid:function(d){return this.inherited(arguments)&&(this._isEmpty(this.textbox.value)&&!this.required||this.isInRange(d))},getErrorMessage:function(d){var b=this.get("value");return null!=b&&""!==b&&("number"!=typeof b||!isNaN(b))&&!this.isInRange(d)?this.rangeMessage:this.inherited(arguments)},
postMixInProperties:function(){this.inherited(arguments);this.rangeMessage||(this.messages=f.getLocalization("dijit.form","validate",this.lang),this.rangeMessage=this.messages.rangeMessage)}})})},"dijit/form/NumberTextBox":function(){define("dojo/_base/declare dojo/_base/lang dojo/i18n dojo/string dojo/number ./RangeBoundTextBox".split(" "),function(g,f,e,d,b,a){var c=function(a){a=a||{};var c=e.getLocalization("dojo.cldr","number",e.normalizeLocale(a.locale)),b=a.pattern?a.pattern:c[(a.type||"decimal")+
"Format"];a="number"==typeof a.places?a.places:"string"===typeof a.places&&0<a.places.length?a.places.replace(/.*,/,""):-1!=b.indexOf(".")?b.split(".")[1].replace(/[^#0]/g,"").length:0;return{sep:c.decimal,places:a}},h=g("dijit.form.NumberTextBoxMixin",null,{pattern:function(a){return"("+(this.focused&&this.editOptions?this._regExpGenerator(f.delegate(a,this.editOptions))+"|":"")+this._regExpGenerator(a)+")"},value:NaN,editOptions:{pattern:"#.######"},_formatter:b.format,_regExpGenerator:b.regexp,
_decimalInfo:c(),postMixInProperties:function(){this.inherited(arguments);this._set("type","text")},_setConstraintsAttr:function(a){var b="number"==typeof a.places?a.places:0;b&&b++;"number"!=typeof a.max&&(a.max=9*Math.pow(10,15-b));"number"!=typeof a.min&&(a.min=-9*Math.pow(10,15-b));this.inherited(arguments,[a]);this.focusNode&&(this.focusNode.value&&!isNaN(this.value))&&this.set("value",this.value);this._decimalInfo=c(a)},_onFocus:function(){if(!this.disabled&&!this.readOnly){var a=this.get("value");
"number"==typeof a&&!isNaN(a)&&(a=this.format(a,this.constraints),void 0!==a&&(this.textbox.value=a));this.inherited(arguments)}},format:function(a,c){var b=String(a);if("number"!=typeof a)return b;if(isNaN(a))return"";if(!("rangeCheck"in this&&this.rangeCheck(a,c))&&!1!==c.exponent&&/\de[-+]?\d/i.test(b))return b;this.editOptions&&this.focused&&(c=f.mixin({},c,this.editOptions));return this._formatter(a,c)},_parser:b.parse,parse:function(a,c){var b=f.mixin({},c,this.editOptions&&this.focused?this.editOptions:
{});if(this.focused&&null!=b.places){var d=b.places,d="number"===typeof d?d:Number(d.split(",").pop());b.places="0,"+d}b=this._parser(a,b);this.editOptions&&(this.focused&&isNaN(b))&&(b=this._parser(a,c));return b},_getDisplayedValueAttr:function(){var a=this.inherited(arguments);return isNaN(a)?this.textbox.value:a},filter:function(a){if(null==a||"string"==typeof a&&""==a)return NaN;"number"==typeof a&&(!isNaN(a)&&0!=a)&&(a=b.round(a,this._decimalInfo.places));return this.inherited(arguments,[a])},
serialize:function(a,c){return"number"!=typeof a||isNaN(a)?"":this.inherited(arguments)},_setBlurValue:function(){var a=f.hitch(f.delegate(this,{focused:!0}),"get")("value");this._setValueAttr(a,!0)},_setValueAttr:function(a,c,b){if(void 0!==a&&void 0===b)if(b=String(a),"number"==typeof a)if(isNaN(a))b="";else{if("rangeCheck"in this&&this.rangeCheck(a,this.constraints)||!1===this.constraints.exponent||!/\de[-+]?\d/i.test(b))b=void 0}else a?a=void 0:(b="",a=NaN);this.inherited(arguments,[a,c,b])},
_getValueAttr:function(){var a=this.inherited(arguments);if(isNaN(a)&&""!==this.textbox.value){if(!1!==this.constraints.exponent&&/\de[-+]?\d/i.test(this.textbox.value)&&RegExp("^"+b._realNumberRegexp(f.delegate(this.constraints))+"$").test(this.textbox.value))return a=Number(this.textbox.value),isNaN(a)?void 0:a}else return a},isValid:function(a){if(!this.focused||this._isEmpty(this.textbox.value))return this.inherited(arguments);var c=this.get("value");return!isNaN(c)&&this.rangeCheck(c,this.constraints)?
!1!==this.constraints.exponent&&/\de[-+]?\d/i.test(this.textbox.value)?!0:this.inherited(arguments):!1},_isValidSubset:function(){var a="number"==typeof this.constraints.min,c="number"==typeof this.constraints.max,b=this.get("value");if(isNaN(b)||!a&&!c)return this.inherited(arguments);var h=b|0,e=0>b,f=-1!=this.textbox.value.indexOf(this._decimalInfo.sep),g=(this.maxLength||20)-this.textbox.value.length,s=f?this.textbox.value.split(this._decimalInfo.sep)[1].replace(/[^0-9]/g,""):"",h=f?h+"."+s:h+
"",g=d.rep("9",g),f=b;e?f=Number(h+g):b=Number(h+g);return!(a&&b<this.constraints.min||c&&f>this.constraints.max)}});g=g("dijit.form.NumberTextBox",[a,h],{baseClass:"dijitTextBox dijitNumberTextBox"});g.Mixin=h;return g})},"MOTW/mgg/components/TextBox":function(){define("dojo/_base/declare dojo/dom-style dojo/keys dijit/form/TextBox ./AbstractComponent ../utils/TextUtils".split(" "),function(g,f,e,d,b,a){return g([b],{_renderComponent:function(c){this.inherited(arguments);var b=this.dataService,k=
this;this.textBox||(this.textBox=new d({style:"height: 100%; width: 100%;"}),this.own(this.textBox),this.textBox.placeAt(this.domNode,"last"),f.set(this.textBox.textbox.parentNode,{width:"100%",height:"100%"}),this.connect(this.textBox,"onChange",this._doUpdateTextProperty),this.connect(this.textBox,"onKeyUp",function(a){a.which===e.ENTER&&(k._doUpdateTextProperty(),b.registerHandlerService().getHandler("TextBox").handleEvent(c.id,{type:"enter"}),k._changed=!1)}),this.connect(this.textBox,"onBlur",
function(){k._doUpdateTextProperty();k._changed&&(b.registerHandlerService().getHandler("TextBox").handleEvent(c.id,{type:"blur"}),k._changed=!1)}));this.textBox.set("value",c.text);this.textBox.set("disabled",!c.enabled);this.textBox.set("readOnly",!c.editable);var l=a.getTextStyle(c);l.width="100%";l.height="100%";f.set(this.textBox.textbox,l);this.focusNode=this.textBox.focusNode},_doUpdateTextProperty:function(){var a=this.textBox.get("displayedValue");a!==this.componentData.text&&(this._changed=
!0,this.dataService.registerHandlerService().getHandler("TextBox").setProperties(this.componentData.id,{text:a},!0))}})})},"MOTW/mgg/components/MultiLineTextBox":function(){define("dojo/_base/declare dojo/_base/event dojo/_base/window dojo/dom-class dojo/dom-style dojo/keys dijit/form/SimpleTextarea mw-log/Log ./AbstractComponent ../utils/TextUtils dojo/has ../utils/CustomExpandingTextarea".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p){var n=document.documentElement,q=n.mozMatchesSelector||n.msMatchesSelector||
n.oMatchesSelector||n.webkitMatchesSelector;return g([k],{destroyRecursive:function(){this._removeBodyListeners();this.inherited(arguments)},_getStyle:function(a){var c=this.inherited(arguments);"MarginBorder"===a.borderType&&(c.border="none",c.marginLeft=a.margin.left+"px",c.marginTop=a.margin.top+"px",c.marginRight=a.margin.right+"px",c.marginBottom=a.margin.bottom+"px");return c},_renderComponent:function(h){var e=b.get(this.domNode,"visibility");this.inherited(arguments);this.textAreaData=h;var k=
this;if(!this.textArea){e=void 0;if(h.autoResize)this.textArea=new p({value:h.text||""}),setTimeout(function(){k.textArea.resize()},0);else{this.textArea=new c({value:h.text||""});var l=this.textArea.textbox;l.autocorrect=l.autocomplete=l.autocapitalize=l.spellcheck=!1}this.own(this.textArea);this.textArea.placeAt(this.domNode,"last");this._bodyEventHandler=function(a){k.textArea.domNode!==a.target&&(k.textArea.textbox!==a.target&&q.call(a.target,".mgg *"))&&(f.stop(a),"click"===a.type&&(k.textArea.textbox.blur(),
k._onBlur(),k._updateTextProperty()))};this.connect(this.textArea,"onKeyDown",function(c){(c.keyCode||c.charCode)===a.ESCAPE&&f.stop(c)});this.connect(this.textArea,"onKeyUp",function(c){if((c.keyCode||c.charCode)===a.ESCAPE)f.stop(c),this._onEscape(),k.textArea.textbox.blur(),k._onBlur()});this.connect(this.textArea,"onChange",this._updateTextProperty);this.connect(this.textArea,"onBlur",this._onBlur)}h.text!==this.textArea.get("value")&&this.textArea.set("value",h.text||"");!1===this.textAreaData.focusable&&
(d.add(this.domNode,"preventDragSelection"),m("ie")||m("trident")?(this.textArea.textbox.setAttribute("contentEditable",!1),9===m("ie")&&this.textArea.textbox.setAttribute("unselectable","on")):m("ff")&&d.add(this.domNode,"preventUserInput"));this.textArea.set("readOnly",!1===h.editable);this.textArea.set("disabled",!1===h.enabled);h.autoResize&&this.textArea.savePosition();this._setTextStyles();h.autoResize&&(h.visibility?this._addBodyListeners():this._removeBodyListeners());this._becameVisible(e)&&
setTimeout(this._focusInTextArea.bind(this),0);this.focusNode=this.textArea.focusNode},_becameVisible:function(a){return this.textAreaData&&!1===this.textAreaData.visibility?!1:!a||"hidden"===a},_focusInTextArea:function(){if(this.textAreaData&&this.textAreaData.editable&&this.textArea.textbox){this.textArea.textbox.focus();if(this.textArea.textbox.setSelectionRange){var a=this.textArea.textbox.value.length;this.textArea.textbox.setSelectionRange(a,a)}else this.textArea.textbox.value=this.textArea.textbox.value;
this.textArea.textbox.scrollTop=999999}},_updateTextProperty:function(){this.defer(this._doUpdateTextProperty)},_doUpdateTextProperty:function(){var a=this.textArea.get("value").replace(String.fromCharCode(160),"");this.dataService.registerHandlerService().getHandler("TextBox").setProperties(this.textAreaData.id,{text:a},!0)},_onEscape:function(){this._doUpdateTextProperty();this.dataService.registerHandlerService().getHandler("TextBox").handleEvent(this.textAreaData.id,{type:"escape"})},_onBlur:function(){this._doUpdateTextProperty();
this.dataService.registerHandlerService().getHandler("TextBox").handleEvent(this.textAreaData.id,{type:"blur"});this._removeBodyListeners()},_setTextStyles:function(){h.assert(this.textAreaData,"null this.textAreaData in MultiLineTextBox");h.assert(this.textArea,"null text area object");var a=l.getTextStyle(this.textAreaData);a.whiteSpace=!1===this.textAreaData.wrapping||this.textAreaData.autoResize?"pre":"pre-wrap";this.textAreaData.autoResize?this.textArea.setTextStyle(a):(h.assert(this.textArea.textbox,
"text box does not exist"),b.set(this.textArea.textbox,a))},_addBodyListeners:function(){e.body().addEventListener("mousedown",this._bodyEventHandler,!0);e.body().addEventListener("mouseup",this._bodyEventHandler,!0);e.body().addEventListener("mousemove",this._bodyEventHandler,!0);e.body().addEventListener("click",this._bodyEventHandler,!0);e.body().addEventListener("dblclick",this._bodyEventHandler,!0);e.body().addEventListener("contextmenu",this._bodyEventHandler,!0)},_removeBodyListeners:function(){e.body().removeEventListener("mousedown",
this._bodyEventHandler,!0);e.body().removeEventListener("mouseup",this._bodyEventHandler,!0);e.body().removeEventListener("mousemove",this._bodyEventHandler,!0);e.body().removeEventListener("click",this._bodyEventHandler,!0);e.body().removeEventListener("dblclick",this._bodyEventHandler,!0);e.body().removeEventListener("contextmenu",this._bodyEventHandler,!0)}})})},"dijit/form/SimpleTextarea":function(){define(["dojo/_base/declare","dojo/dom-class","dojo/sniff","./TextBox"],function(g,f,e,d){return g("dijit.form.SimpleTextarea",
d,{baseClass:"dijitTextBox dijitTextArea",rows:"3",cols:"20",templateString:"\x3ctextarea ${!nameAttrSetting} data-dojo-attach-point\x3d'focusNode,containerNode,textbox' autocomplete\x3d'off'\x3e\x3c/textarea\x3e",postMixInProperties:function(){!this.value&&this.srcNodeRef&&(this.value=this.srcNodeRef.value);this.inherited(arguments)},buildRendering:function(){this.inherited(arguments);e("ie")&&this.cols&&f.add(this.textbox,"dijitTextAreaCols")},filter:function(b){b&&(b=b.replace(/\r/g,""));return this.inherited(arguments)},
_onInput:function(b){if(this.maxLength){var a=parseInt(this.maxLength),c=this.textbox.value.replace(/\r/g,""),a=c.length-a;if(0<a){var d=this.textbox;if(d.selectionStart){var f=d.selectionStart,l=0;e("opera")&&(l=(this.textbox.value.substring(0,f).match(/\r/g)||[]).length);this.textbox.value=c.substring(0,f-a-l)+c.substring(f-l);d.setSelectionRange(f-a,f-a)}else this.ownerDocument.selection&&(d.focus(),c=this.ownerDocument.selection.createRange(),c.moveStart("character",-a),c.text="",c.select())}}this.inherited(arguments)}})})},
"MOTW/mgg/utils/CustomExpandingTextarea":function(){define("dojo/_base/declare dojo/dom-style dojo/dom-geometry dijit/form/Textarea mw-log/Log ./TextAreaSizer".split(" "),function(g,f,e,d,b,a){return g([d],{buildRendering:function(){this.inherited(arguments);this.textSizer=new a},destroyRecursive:function(){this.inherited(arguments);this.textSizer.destroyRecursive()},setTextStyle:function(a){b.assert(a,"Cannot set null text style");b.assert(this.textbox,"null textbox");f.set(this.textbox,a);b.assert(this.textSizer,
"null text sizer utility");this.textSizer.setTextStyle(a)},savePosition:function(){this.domNode&&this.domNode.parentNode&&(this.savedTextPosition=e.position(this.domNode),this.savedPanePosition=e.position(this.domNode.parentNode))},_placeInTheMiddle:function(){if(this.domNode&&this.domNode.parentNode){b.assert(this.savedTextPosition,"null saved parent position");var a=e.position(this.textbox);f.set(this.textbox,{position:"absolute",left:(this.savedPanePosition.w-a.w)/2+"px"})}},resize:function(){this.textSizer.setText(this.textbox.value);
var a=this.textSizer.getClientSize();f.set(this.domNode,"width",a.w+5+"px");f.set(this.domNode,"height",a.h+"px");this.domNode.parentNode&&(f.set(this.domNode.parentNode,{width:"auto",height:"auto",overflow:"visible"}),this.domNode.parentNode.parentNode&&f.set(this.domNode.parentNode.parentNode,{width:"auto",height:"auto",overflow:"visible"}))}})})},"dijit/form/Textarea":function(){define(["dojo/_base/declare","dojo/dom-style","./_ExpandingTextAreaMixin","./SimpleTextarea"],function(g,f,e,d){return g("dijit.form.Textarea",
[d,e],{baseClass:"dijitTextBox dijitTextArea dijitExpandingTextArea",cols:"",buildRendering:function(){this.inherited(arguments);f.set(this.textbox,{overflowY:"hidden",overflowX:"auto",boxSizing:"border-box",MsBoxSizing:"border-box",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box"})}})})},"dijit/form/_ExpandingTextAreaMixin":function(){define("dojo/_base/declare dojo/dom-construct dojo/has dojo/_base/lang dojo/on dojo/_base/window ../Viewport".split(" "),function(g,f,e,d,b,a,c){e.add("textarea-needs-help-shrinking",
function(){var c=a.body(),b=f.create("textarea",{rows:"5",cols:"20",value:" ",style:{zoom:1,fontSize:"12px",height:"96px",overflow:"hidden",visibility:"hidden",position:"absolute",border:"5px solid white",margin:"0",padding:"0",boxSizing:"border-box",MsBoxSizing:"border-box",WebkitBoxSizing:"border-box",MozBoxSizing:"border-box"}},c,"last"),d=b.scrollHeight>=b.clientHeight;c.removeChild(b);return d});return g("dijit.form._ExpandingTextAreaMixin",null,{_setValueAttr:function(){this.inherited(arguments);
this.resize()},postCreate:function(){this.inherited(arguments);var a=this.textbox;a.style.overflowY="hidden";this.own(b(a,"focus, resize",d.hitch(this,"_resizeLater")))},startup:function(){this.inherited(arguments);this.own(c.on("resize",d.hitch(this,"_resizeLater")));this._resizeLater()},_onInput:function(a){this.inherited(arguments);this.resize()},_estimateHeight:function(){var a=this.textbox;a.rows=(a.value.match(/\n/g)||[]).length+1},_resizeLater:function(){this.defer("resize")},resize:function(){function a(){var b=
!1;""===c.value&&(c.value=" ",b=!0);var d=c.scrollHeight;b&&(c.value="");return d}var c=this.textbox;"hidden"==c.style.overflowY&&(c.scrollTop=0);if(!this.busyResizing){this.busyResizing=!0;if(a()||c.offsetHeight){var b=a()+Math.max(c.offsetHeight-c.clientHeight,0),d=b+"px";d!=c.style.height&&(c.style.height=d,c.rows=1);if(e("textarea-needs-help-shrinking")){var f=a(),g=c.style.minHeight,q=4,r=c.scrollTop;c.style.minHeight=d;for(c.style.height="auto";0<b;){c.style.minHeight=Math.max(b-q,4)+"px";d=
a();f-=d;b-=f;if(f<q)break;f=d;q<<=1}c.style.height=b+"px";c.style.minHeight=g;c.scrollTop=r}c.style.overflowY=a()>c.clientHeight?"auto":"hidden";"hidden"==c.style.overflowY&&(c.scrollTop=0)}else this._estimateHeight();this.busyResizing=!1}}})})},"MOTW/mgg/utils/TextAreaSizer":function(){define("dojo/_base/declare dojo/_base/window dojo/dom-construct dojo/_base/array dojo/dom-style dojo/dom-class".split(" "),function(g,f,e,d,b,a){g=g(null,{hiddenTextNode:null,constructor:function(c){var b={display:"inline-block",
position:"absolute",left:"-5000px",top:"-5000px",whiteSpace:"pre-line",visibility:"visible",padding:"0px 10px",minHeight:"1em"};c&&(c.visible&&(b.left="100px",b.top="100px"),d.forEach(["background-color","text-align","font-family"],function(a){c.hasOwnProperty(a)&&(b[a]=c[a])}));this.hiddenTextNode=e.create("div",{style:b},f.body(),"last");a.add(this.hiddenTextNode,"TextAreaSizer")},setText:function(a){this.hiddenTextNode.innerHTML=(a||"")+" ";return this},setTextStyle:function(a){delete a.whiteSpace;
b.set(this.hiddenTextNode,a);return this},getClientSize:function(){return{w:this.hiddenTextNode.clientWidth,h:this.hiddenTextNode.clientHeight}},destroyRecursive:function(){this.hiddenTextNode&&f.body().removeChild(this.hiddenTextNode);this.hiddenTextNode=null}});g.className="TextAreaSizer";return g})},"MOTW/mgg/components/Label":function(){define("dojo/_base/declare dojo/dom-construct dojo/dom-style dijit/Tooltip ./_IconComponent ./AbstractComponent ../utils/TextUtils".split(" "),function(g,f,e,
d,b,a,c){return g([a,b],{_getStyle:function(a){var b=c.getTextStyle(a),d=this.inherited(arguments);delete d.pointerEvents;d.display="inline-block";Object.keys(d).forEach(function(a){b[a]=d[a]});return b},postCreate:function(){this.inherited(arguments);var a=this.dataService.registerHandlerService().getHandler("Label"),c=this;this.domNode.addEventListener("mousedown",function(){a.handleEvent(c.componentData.id,{type:"clicked"})})},destroyRecursive:function(){this.toolTip&&(this.toolTip.set("connectId",
""),this.toolTip.destroyRecursive());this.inherited(arguments)},_renderComponent:function(a){this.inherited(arguments);this._createOrUpdateIcon(this.domNode,a);if(a.text!==this._lastText){this.label||(this.label=f.create("div",{},this.domNode,"last"));if(0!==a.text.toLowerCase().indexOf("\x3chtml\x3e")||a.contentType&&"text"===a.contentType){for(;this.label.firstChild;)this.label.removeChild(this.label.firstChild);this.label.appendChild(document.createTextNode(a.text))}else this.label.innerHTML=a.text;
this._lastText=a.text}if(this.label){var b=c.getTextStyle(a);b.display="inline-block";this.hasIcon()&&a.text?b.marginLeft=(a.iconTextGap||0)+"px":b.marginLeft="0px";b.whiteSpace="pre-wrap";e.set(this.label,b);a.tooltip&&(this.toolTip?this._lastTooltip!==a.tooltip&&this.toolTip.set("label",a.tooltip):(this.toolTip=new d({label:a.tooltip}),this.toolTip.set("connectId",this.domNode),this.own(this.toolTip)),this._lastTooltip=a.tooltip)}},_onClick:function(){this.toolTip&&this.toolTip.close()}})})},"MOTW/mgg/components/PanelSeparator":function(){define(["dojo/_base/declare",
"dojo/dom-construct","dojo/dom-style","./AbstractComponent"],function(g,f,e,d){return g([d],{_renderComponent:function(b){this.inherited(arguments);this.separator||(this.separator=f.create("div",{},this.domNode,"first"),e.set(this.separator,"background-color","rgb("+b.foreground.join(",")+")"))},_getStyle:function(){var b=this.inherited(arguments);"2px"===b.width&&(b.width="1px");"2px"===b.height&&(b.height="1px");return b}})})},"MOTW/mgg/components/FileChooser":function(){define("dojo/_base/declare MOTW/filechooser/FileChooser MOTW/filechooser/FileDataService mw-filename-utils/FileNameUtil mw-remote/Remote ./AbstractComponent ../Root dojo/i18n!MOTW/l10n/nls/mgg".split(" "),
function(g,f,e,d,b,a,c,h){return g([a],{constructor:function(a){this.actionService=a.actionService;this.pathService=a.pathService;this.fileService=new e({classifier:a.widgetData.id,pathService:this.pathService});this.fileService.start()},destroyRecursive:function(){this.inherited(arguments);this.fileChooser&&this.layoutService.removeWidget("fileChooser");this.fileService.stop()},_renderComponent:function(a){this.inherited(arguments);var b=this,e={},g=[];a.currentDirectory&&this.fileService.currentDirectory(a.currentDirectory);
if(!this.fileChooser){for(var n in a.filters)e[a.filters[n].label]||(g.push(a.filters[n]),e[a.filters[n].label]=1);this.fileChooser=new f({fileService:this.fileService,pathService:this.pathService,actionService:this.actionService,style:{width:"425px",height:"375px"},approveButtonText:h[a.chooserType],fileMustExist:"save"!==a.chooserType,selectionMode:a.selectionMode,filters:g});this.fileChooser.onOk=function(){var h=b.fileChooser.getName(),e=b.fileChooser.fileType.value,f=e.split("*"),g=d.getFileNameExtension(h),
m="";"*.*"!==e&&f[1]&&(m=f[1]);"open"!==a.chooserType&&""!==m&&"."+g!==m&&(h+=m);b.dataService.registerHandlerService().getHandler("FileChooser").handleEvent(a.id,{type:"fileUploaded",name:h,location:b.fileChooser.getLocation()});c.emptyEval();b.layoutService.removeWidget("fileChooser")};this.fileChooser.onCancel=this.fileChooser.onClose=function(){b.dataService.registerHandlerService().getHandler("FileChooser").handleEvent(a.id,{type:"cancel"});b.layoutService.removeWidget("fileChooser")};this.layoutService.addWidget("fileChooser",
"newDialog",this.fileChooser,{title:a.title})}}})})},"MOTW/filechooser/FileChooser":function(){define(["dojo/_base/declare","filechooser-ui/FileChooser"],function(g,f){return g([f],{postCreate:function(){this.inherited(arguments);this.connect(this,"onItemDoubleClick",function(e){this.onOk()})}})})},"filechooser-ui/FileChooser":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-geometry dojo/dom-style dojo/on dojo/keys dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dijit/form/Button dijit/form/ValidationTextBox dijit/form/Select ./filebrowser/FileBrowser mw-filename-utils/FileNameUtil dojo/text!./fileChooser.html dojo/i18n!./l10n/gen/resources/filechooser/nls/filechooser".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s){return g([c,h,k],{templateString:r,FILES_ONLY:0,DIRECTORIES_ONLY:1,FILES_AND_DIRECTORIES:2,constructor:function(a){a=a||{};this.fileService=a.fileService;this.pathService=a.pathService;this.filters=a.filters;this.excludeOnlyRoots=a.excludeOnlyRoots||[];this.selectionMode="number"===typeof a.selectionMode?a.selectionMode:this.FILES_ONLY;this.localization=f.mixin(s);this.localization.ok=a.approveButtonText||this.localization.ok;this.fileMustExist=!!a.fileMustExist;
this.fileTypeFilterMustExist=!1!==a.fileTypeFilterMustExist;this._setupSelectionMode()},buildRendering:function(){this.inherited(arguments);this.fileBrowser=new n({fileDataService:this.fileService,allowDnD:!1},this.fileBrowser);this.okButton.set("disabled",!0);this.fileName.validator=f.hitch(this,this._fileNameValidator);this.fileMustExist&&(d.set(this.fileName.domNode,{display:"none"}),d.set(this.fileNameLabel,{display:"none"}));this.fileTypeFilterMustExist||(d.set(this.fileType.domNode,{display:"none"}),
d.set(this.fileTypeLabel,{display:"none"}));if(this.filters){var a=null;this.filters.forEach(function(c){var b={label:c.label,value:c.patterns?c.patterns.join("|"):"*",selected:!!c.selected};this.fileType.addOption(b);c.selected&&(a=b.value)},this);a&&this.fileType.set("value",a)}else this.fileType.addOption({label:"All Files",value:"*",selected:!0})},postCreate:function(){this.inherited(arguments);this.own(b(this.pathService,"accessibleRoots",f.hitch(this,function(a){a=a.data;for(var c=0;c<a.directories.length;c++){var b=
q.pathFromFileInfo(a.directories[c].fileInfo);if(0===this.excludeOnlyRoots.length||-1===this.excludeOnlyRoots.indexOf(b))b=q.folderInfoFromPath(b),this.fileService.listFolder(b)}})));this.connect(this.fileBrowser,"onSelectionChange",function(){var a=this.fileBrowser.getSelectedFileInfo();this._shouldSetName(a)?(a.isDirectory||this.fileService.currentDirectory(a.location),this.fileName.set("value",a.name)):this._shouldClearName(a)?this.fileName.set("value",""):a&&a.isDirectory&&this.fileService.currentDirectory(q.pathFromFileInfo(a));
this._updateOkButton()});this.connect(this.fileBrowser,"onItemDoubleClick",function(a){this._shouldSetName(a)?(a.isDirectory||this.fileService.currentDirectory(a.location),this.fileName.set("value",a.name),this.onItemDoubleClick()):this._shouldClearName(a)&&this.fileName.set("value","");this._updateOkButton()},!0);var a=this.fileType.get("value");this.fileService.addFilter(f.hitch(this,this._filter,a));var c=this;this.connect(this.fileType,"onChange",function(a){c.fileService.addFilter(f.hitch(c,
c._filter,a));"*"!==a&&c._updatefileNameValue(a)})},_filter:function(a,c){var b=a.split("|").some(function(a){"*.*"===a&&(a="*");a=a.replace(/\./g,"\\.").replace(/\*/g,".*");return c.name.match(RegExp("^"+a+"$","i"))});return this.selectionMode===this.DIRECTORIES_ONLY?c.isDirectory:c.isDirectory||b},_shouldSetName:function(a){var c=!1;this.selectionMode===this.FILES_ONLY?c=a&&!a.isDirectory:this.selectionMode===this.DIRECTORIES_ONLY&&(c=a);return c},_shouldClearName:function(a){var c=!1;this.selectionMode===
this.FILES_ONLY&&this.fileMustExist?c=a&&a.isDirectory:this.selectionMode===this.DIRECTORIES_ONLY&&(c=!1);return c},startup:function(){this.inherited(arguments);this.fileBrowser.startup();this.resize()},destroyRecursive:function(){this.fileBrowser.destroyRecursive();this.inherited(arguments)},resize:function(){this.inherited(arguments);var a=e.position(this.domNode),c=e.position(this.bottomNode);a.h-=c.h;d.set(this.fileBrowser.domNode,{width:"100%",height:a.h+"px"});this.fileBrowser.resize(a)},_fileNameValidator:function(a){var c=
!0;a=f.trim(a);this.fileName._computeRegexp();""!==a&&(q.MATLAB_EXTENSION_PATTERN.test(a)&&(c&&63<a.length&&(this.fileName.invalidMessage=s.mFileNameLengthError,c=!1),c&&!q.MATLAB_FILENAME_PATTERN.test(a)&&(this.fileName.invalidMessage=s.invalidMFileNameError,c=!1)),c&&128<a.length?(this.fileName.invalidMessage=s.fileNameLengthError,c=!1):c&&!q.isValidFileName(a)&&(this.fileName.invalidMessage=s.invalidFileNameError,c=!1),c&&(this.fileService.doesMFileExistInOpenFolders(a,this.getLocation())&&!this.fileService.doesFileExistInCurrentDirectory(a))&&
(this.fileName.invalidMessage=s.fileOrFolderExistsError,c=!1),q.isWritable(this.fileService.currentWorkingFolder)||(this.fileName.invalidMessage=s.currentFolderIsReadOnly,c=!1),this.fileMustExist&&!this.fileService.doesFileExistInCurrentDirectory(a)&&(this.fileName.invalidMessage=s.fileMustExist,c=!1),this.selectionMode===this.DIRECTORIES_ONLY&&(c=!0));this._updateOkButton(c);return c},_updatefileNameValue:function(a){var c,b=this.fileName.get("value"),d;d=b.lastIndexOf(".");0<a.indexOf("|*.")?-1!==
d&&(c=b.substring(d,b.length),0>a.indexOf(c)?this.fileName.set("value",b.substring(0,d)):(a=b.lastIndexOf(c),this.fileName.set("value",b.substring(0,a)+c))):(c="*.*"===a?"":a.split("*")[1],a=b.lastIndexOf(c),-1===d?this.fileName.set("value",b+c):0<=a?this.fileName.set("value",b.substring(0,a)+c):(b=b.substring(0,d),this.fileName.set("value",b+c)))},_updateOkButton:function(a){this.fileName&&(void 0===a&&(a="Error"!==this.fileName.state),this.okButton.set("disabled",!(this.fileName.get("value")&&a)))},
_onNameKeyDown:function(c){this._updateOkButton();c.keyCode===a.ENTER&&this._onOkClick()},_onOkClick:function(){if(!this.okButton.get("disabled"))this.onOk()},onItemDoubleClick:function(){},onOk:function(){},_onCancelClick:function(){this.onCancel()},onCancel:function(){},getName:function(){return f.trim(this.fileName.get("value"))},getLocation:function(){if(this.fileService.currentWorkingFolder){var a=void 0!==this.fileService.currentWorkingFolder.parent?this.fileService.currentWorkingFolder.parent.path:
this.fileService.currentWorkingFolder.path;return this.selectionMode===this.DIRECTORIES_ONLY?a:this.fileService.currentWorkingFolder.path}},_setupSelectionMode:function(){this.selectionMode===this.DIRECTORIES_ONLY&&this.fileService.addFilter(function(a){return a.isDirectory})}})})},"filechooser-ui/filebrowser/FileBrowser":function(){define("dojo/_base/connect dojo/_base/declare dojo/_base/event dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/keys dojo/has dojo/on dojo/touch dojo/_base/lang dojo/dnd/Manager dijit/_WidgetBase dijit/tree/TreeStoreModel dijit/Tooltip mw-filename-utils/FileNameUtil dijit/registry ./FileBrowserTree ./FileBrowserTreeNode".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w){return f([q],{constructor:function(a){a=a||{};this.fileService=a.fileDataService;this.allowDnD=a.allowDnD;this.getAdditionalItemClasses=a.getAdditionalItemClasses;this.TreeNodeConstructor=a.TreeNodeConstructor||w;this.saveSelectedFile=null;this.noclick=!1},resize:function(a){c.set(this.folderTreeNodeWrapper,{height:a.h+"px"});this.folderTree.resize();this._updateCurrentFolder()},destroyRecursive:function(){this.folderTree.destroyRecursive();this.inherited(arguments)},
disableFeature:function(){this.destroyRecursive();g.disconnect(this.renameListener);g.disconnect(this.renameStateListener);g.disconnect(this.folderChangeListener);g.disconnect(this.moveFaultListener)},startup:function(){this.folderTree.startup();this.inherited(arguments)},buildRendering:function(){var a=this;this.inherited(arguments);d.add(this.domNode,"currentFolder");this.folderTreeNodeWrapper=b.create("div",{"class":"folderTreeNodeWrapper","data-motw-id":"folderTreeNodeWrapper"},this.domNode);
this.treeModel=new r({store:this.fileService.fileStore,query:{pathId:"ROOT"},childrenAttrs:["children"],deferItemLoadingUntilExpand:!0,labelAttr:"name",rootId:"ROOT"});this.folderTree=new v({"class":"folderTree",model:this.treeModel,openOnClick:!1,openOnDblClick:!1,persist:!1,showRoot:!1,dndSource:"dijit.tree.dndSource",dndController:"dijit.tree.dndSource",checkAcceptance:p.hitch(this,this._checkAcceptance),checkItemAcceptance:p.hitch(this,this._checkItemAcceptance),onDndDrop:p.hitch(this,this._ignoreDojoDrop),
getIconClass:this._getFileIconClass,getRowClass:function(c){var b=[];c.isCurrentFolder&&b.push("currentFolderTreeNode");a.getAdditionalItemClasses&&(c=a.getAdditionalItemClasses(c))&&(b=b.concat(c));return b.join(" ")},_createTreeNode:function(c){return new a.TreeNodeConstructor(c)}});var c=n.manager().makeAvatar;n.manager().makeAvatar=function(){return c.call(n.manager())};this.folderTree.placeAt(this.folderTreeNodeWrapper,"first");this.folderTree.dndController.copyState=function(a,c){return!1};
this.folderTree.dndController.singular=!0;this.folderTree.dndController.isSource=this.allowDnD;this.folderTree.watch("selectedNodes",function(){a.onSelectionChange()});g.connect(this,"onKeyDown",this,this._handleModuleKeyDown);g.connect(this.folderTree,"onDblClick",this,this._handleTreeDoubleClick);g.connect(this.folderTree,"onClick",this,this._handleTreeClick);g.connect(this.folderTree,"onOpen",this,this._handleFolderOpen);g.connect(this.folderTree,"onClose",this,this._handleFolderClose);g.connect(this.folderTree,
"onMouseLeave",this,this._onMouseLeave);g.connect(this.folderTree,"onMouseOver",this,this._handleMouseOver);this.renameListener=g.connect(this.fileService,"_onFileRename",this,this._handleFileRename);this.renameStateListener=g.connect(this.fileService,"_setFileRenameState",this,this._setFileRenameState);this.folderChangeListener=g.connect(this.fileService,"onCurrentFolderChange",this,this._updateCurrentFolderAndOpen);this.moveFaultListener=g.connect(this.fileService,"onMoveFault",this,this._handleMoveFault);
if(k("touch")){var h=this;l(this.folderTree.domNode,l.selector(".dijitTreeNode",m.press),function(a){h.dragged=!1});l(this.folderTree.domNode,l.selector(".dijitTreeNode",m.move),function(a){h.dragged=!0});l(this.folderTree.domNode,l.selector(".dijitTreeNode",m.release),function(a){h.dragged||h._handleTreeClickOnTouch(u.byNode(this),a)})}g.subscribe("/dnd/drop/before",this,this._handleDndDrop);g.subscribe("/dnd/start",this,this._handleStartDrag);g.subscribe("/dnd/cancel",this,this._handleDragCancel);
g.connect(this.folderTreeNodeWrapper,"onselectstart",e,e.stop);this._updateCurrentFolder()},onItemClick:function(a){},onItemDoubleClick:function(a){},onSelectionChange:function(){},highlightTarget:function(a){this.stopHighlightTarget();a&&(d.add(a,"glow"),this.holdTarget=a)},stopHighlightTarget:function(){this.holdTarget&&(d.remove(this.holdTarget,"glow"),this.holdTarget=null)},_handleDragCancel:function(){this.stopHighlightTarget()},_handleMouseOver:function(a){var c=n.manager();c.nodes&&(0<c.nodes.length&&
c.nodes[0])&&(c=dijit.getEnclosingWidget(c.nodes[0]).item,a=dijit.getEnclosingWidget(a.target).item,c&&(c.path&&t.normalizeLocation(c.path)===t.normalizeLocation(a.path))&&this.stopHighlightTarget())},_onMouseLeave:function(a){a=n.manager();a.nodes&&(0<a.nodes.length&&a.nodes[0])&&this.stopHighlightTarget()},_handleMoveFault:function(){this.setSelectedFileInfo(this.saveSelectedFile)},_updateCurrentFolderAndOpen:function(){this._updateCurrentFolder();this.fileService.currentWorkingFolder&&this._openTreeToFile(this.fileService.currentWorkingFolder)},
_updateCurrentFolder:function(){},_openTreeToFile:function(a){var c=this.folderTree.getNodesByItem(a)[0];c||this._openTreeToFile(a.parent);c&&!c.isExpanded&&this.folderTree._expandNode(c,!1)},_handleModuleKeyDown:function(a){h.BACKSPACE===a.keyCode&&(!a.ctrlKey&&!a.altKey&&!a.metaKey)&&e.stop(a)},_handleTreeDoubleClick:function(a,c){a.isDirectory&&this._handleTreeClick(a,c);this.onItemDoubleClick(a)},_handleTreeClickOnTouch:function(a){a.item&&this._handleTreeClick(a.item)},_handleTreeClick:function(a){if(!0===
this.noclick)this.noclick=!1;else{this.setSelectedFileInfo(a);if(a.isDirectory){var c=this.folderTree.getNodesByItem(a)[0];this.folderTree._expandNode(c);this._handleFolderOpen(a);this.fileService.currentDirectory(a.path)}this.onItemClick(a)}},_handleFolderOpen:function(a){this.fileService.folderOpened(a)},_handleFolderClose:function(a,c){this.fileService.folderClosed(a);c.makeExpandable();c.state="UNCHECKED";c._loadDeferred&&delete c._loadDeferred},getSelectedFileInfo:function(){try{var a=this.folderTree.get("path");
return a?a[a.length-1]:null}catch(c){return null}},_handleFileRename:function(a,c){this.setSelectedFileInfo(c)},setSelectedFileInfo:function(a){t.assertIsFileInfo(a);this.folderTree.set("selectedItem",a)},_setFileRenameState:function(a,c){void 0===c&&(c=!1);if(t.isFileInfo(a)){var b=this.folderTree.getNodesByItem(a);b&&(1===b.length&&b[0])&&b[0]._setNodeRefreshIcon(c)}},_getFileIconClass:function(a,c){if(a.isDirectory&&c)return a.shareAttributes&&a.shareAttributes.isProducedRoot?"dijitFolderOpenedAndShared motwFolderOpenedAndShared":
"dijitFolderOpened motwFolderOpened";if(a.isDirectory)return a.shareAttributes&&a.shareAttributes.isProducedRoot?"dijitFolderClosedAndShared motwFolderClosedAndShared":"dijitFolderClosed motwFolderClosed";var b=-1!==a.name.lastIndexOf(".")?a.name.lastIndexOf(".")+1:a.name.length;return"dijitLeaf motwFileType"+a.name.substring(b,a.name.length)},_ignoreDojoDrop:function(){},_checkAcceptance:function(a,c){return a.tree===this.folderTree},_checkItemAcceptance:function(a,c,b){if(c&&a){b=dijit.getEnclosingWidget(a);
var d=dijit.getEnclosingWidget(c.anchor.domNode);if(b&&d){c=b.item;var h=d.item,d=c&&t.isWritable(c),e=h.parent&&t.isWritable(h.parent),f=h.isDirectory?t.isWritable(h):!0,h=!t.isUserPublishedDirectoryPath(h.path)&&!t.isUserSharedDirectoryPath(h.path);if(d&&f&&e&&h)return c.isDirectory?this.highlightTarget(a):this.highlightTarget(b.getParent().rowNode),!0;this.highlightTarget();return!1}this.highlightTarget();return!1}this.highlightTarget();return!1},_handleStartDrag:function(a,c,b){this.noclick=!0;
if(a.anchor.item&&(a=a.anchor.item,c=t.isInUsersSharedDirectory(a.path),a.isDirectory&&t.isCurrentFolderInPath(a.path,this.fileService.currentWorkingFolder.path),t.isUserPublishedDirectoryPath(a.path)||t.isUserSharedDirectoryPath(a.path)||c))n.manager().canDrop(!1),n.manager().stopDrag(),dojo.publish("/dnd/cancel")},_handleDragOver:function(a,c,b){},_handleDndDrop:function(a,c,b){var d=[];b=a.current;dojo.publish("/dnd/cancel");a.isDragging=!1;var h;b&&b.item&&(h=b.item.isDirectory?b.item:b.item.parent);
h&&(c&&0<c.length)&&(dojo.forEach(c,function(a){d.push(dijit.getEnclosingWidget(a).item)}),this.fileService.moveFile(d,h),this.saveSelectedFile=d[0],this.setSelectedFileInfo(h))}})})},"dijit/tree/TreeStoreModel":function(){define(["dojo/_base/array","dojo/aspect","dojo/_base/declare","dojo/_base/lang"],function(g,f,e,d){return e("dijit.tree.TreeStoreModel",null,{store:null,childrenAttrs:["children"],newItemIdAttr:"id",labelAttr:"",root:null,query:null,deferItemLoadingUntilExpand:!1,constructor:function(b){d.mixin(this,
b);this.connects=[];b=this.store;if(!b.getFeatures()["dojo.data.api.Identity"])throw Error("dijit.tree.TreeStoreModel: store must support dojo.data.Identity");b.getFeatures()["dojo.data.api.Notification"]&&(this.connects=this.connects.concat([f.after(b,"onNew",d.hitch(this,"onNewItem"),!0),f.after(b,"onDelete",d.hitch(this,"onDeleteItem"),!0),f.after(b,"onSet",d.hitch(this,"onSetItem"),!0)]))},destroy:function(){for(var b;b=this.connects.pop();)b.remove()},getRoot:function(b,a){this.root?b(this.root):
this.store.fetch({query:this.query,onComplete:d.hitch(this,function(a){if(1!=a.length)throw Error("dijit.tree.TreeStoreModel: root query returned "+a.length+" items, but must return exactly one");this.root=a[0];b(this.root)}),onError:a})},mayHaveChildren:function(b){return g.some(this.childrenAttrs,function(a){return this.store.hasAttribute(b,a)},this)},getChildren:function(b,a,c){var h=this.store;if(h.isItemLoaded(b)){for(var e=[],f=0;f<this.childrenAttrs.length;f++)var m=h.getValues(b,this.childrenAttrs[f]),
e=e.concat(m);var p=0;this.deferItemLoadingUntilExpand||g.forEach(e,function(a){h.isItemLoaded(a)||p++});0==p?a(e):g.forEach(e,function(b,d){h.isItemLoaded(b)||h.loadItem({item:b,onItem:function(c){e[d]=c;0==--p&&a(e)},onError:c})})}else{var n=d.hitch(this,arguments.callee);h.loadItem({item:b,onItem:function(b){n(b,a,c)},onError:c})}},isItem:function(b){return this.store.isItem(b)},fetchItemByIdentity:function(b){this.store.fetchItemByIdentity(b)},getIdentity:function(b){return this.store.getIdentity(b)},
getLabel:function(b){return this.labelAttr?this.store.getValue(b,this.labelAttr):this.store.getLabel(b)},newItem:function(b,a,c){var d={parent:a,attribute:this.childrenAttrs[0]},e;this.newItemIdAttr&&b[this.newItemIdAttr]?this.fetchItemByIdentity({identity:b[this.newItemIdAttr],scope:this,onItem:function(f){f?this.pasteItem(f,null,a,!0,c):(e=this.store.newItem(b,d))&&void 0!=c&&this.pasteItem(e,a,a,!1,c)}}):(e=this.store.newItem(b,d))&&void 0!=c&&this.pasteItem(e,a,a,!1,c)},pasteItem:function(b,a,
c,d,e){var f=this.store,m=this.childrenAttrs[0];a&&g.forEach(this.childrenAttrs,function(c){if(f.containsValue(a,c,b)){if(!d){var e=g.filter(f.getValues(a,c),function(a){return a!=b});f.setValues(a,c,e)}m=c}});if(c)if("number"==typeof e){var p=f.getValues(c,m).slice();p.splice(e,0,b);f.setValues(c,m,p)}else f.setValues(c,m,f.getValues(c,m).concat(b))},onChange:function(){},onChildrenChange:function(){},onDelete:function(){},onNewItem:function(b,a){a&&this.getChildren(a.item,d.hitch(this,function(c){this.onChildrenChange(a.item,
c)}))},onDeleteItem:function(b){this.onDelete(b)},onSetItem:function(b,a){if(-1!=g.indexOf(this.childrenAttrs,a))this.getChildren(b,d.hitch(this,function(a){this.onChildrenChange(b,a)}));else this.onChange(b)}})})},"filechooser-ui/filebrowser/FileBrowserTree":function(){define("dojo/_base/declare dojo/dom-geometry dojo/dom-style dojo/_base/lang dijit/Tree dijit/tree/dndSource".split(" "),function(g,f,e,d,b,a){return g([b],{onOpen:function(){this._doResizeLater()},onClose:function(){this._doResizeLater()},
onNodeUpdate:function(){this._doResizeLater()},_doResizeLater:function(){if(!this._queuedResize){this._queuedResize=!0;var a=this;setTimeout(function(){a.domNode&&(a.resize(),a._queuedResize=!1)},0)}},_adjustWidths:function(){this.inherited(arguments);e.set(this.domNode,"minWidth",this.getMaxNodeWidth()+15+"px")},focus:function(){this.selectedItems&&this.focusNode(this.selectedNode)},getMaxNodeWidth:function(){var a=0,b=0,d;for(d in this._itemNodesMap)if(this._itemNodesMap.hasOwnProperty(d)&&(a=this._itemNodesMap[d][0]))a=
a._getRequiredWidth(),a>b&&(b=a);return b}})})},"dijit/Tree":function(){define("dojo/_base/array dojo/aspect dojo/cookie dojo/_base/declare dojo/Deferred dojo/promise/all dojo/dom dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/errors/create dojo/fx dojo/has dojo/_base/kernel dojo/keys dojo/_base/lang dojo/on dojo/topic dojo/touch dojo/when ./a11yclick ./focus ./registry ./_base/manager ./_Widget ./_TemplatedMixin ./_Container ./_Contained ./_CssStateMixin ./_KeyNavMixin dojo/text!./templates/TreeNode.html dojo/text!./templates/Tree.html ./tree/TreeStoreModel ./tree/ForestStoreModel ./tree/_dndSelector dojo/query!css2".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x,y,B,D,E,F,I,L,C,M,G,N,P,R,S){function K(a){return s.delegate(a.promise||a,{addCallback:function(a){this.then(a)},addErrback:function(a){this.otherwise(a)}})}var Q=d("dijit._TreeNode",[E,F,I,L,C],{item:null,isTreeNode:!0,label:"",_setLabelAttr:function(a){this.labelNode["html"==this.labelType?"innerHTML":"innerText"in this.labelNode?"innerText":"textContent"]=a;this._set("label",a);n("dojo-bidi")&&this.applyTextDir(this.labelNode)},labelType:"text",
isExpandable:null,isExpanded:!1,state:"NotLoaded",templateString:G,baseClass:"dijitTreeNode",cssStateNodes:{rowNode:"dijitTreeRow"},_setTooltipAttr:{node:"rowNode",type:"attribute",attribute:"title"},buildRendering:function(){this.inherited(arguments);this._setExpando();this._updateItemClasses(this.item);this.isExpandable&&this.labelNode.setAttribute("aria-expanded",this.isExpanded);this.setSelected(!1)},_setIndentAttr:function(a){var c=Math.max(a,0)*this.tree._nodePixelIndent+"px";l.set(this.domNode,
"backgroundPosition",c+" 0px");l.set(this.rowNode,this.isLeftToRight()?"paddingLeft":"paddingRight",c);g.forEach(this.getChildren(),function(c){c.set("indent",a+1)});this._set("indent",a)},markProcessing:function(){this.state="Loading";this._setExpando(!0)},unmarkProcessing:function(){this._setExpando(!1)},_updateItemClasses:function(a){var c=this.tree,b=c.model;c._v10Compat&&a===b.root&&(a=null);this._applyClassAndStyle(a,"icon","Icon");this._applyClassAndStyle(a,"label","Label");this._applyClassAndStyle(a,
"row","Row");this.tree._startPaint(!0)},_applyClassAndStyle:function(a,c,b){var d="_"+c+"Class";c+="Node";var e=this[d];this[d]=this.tree["get"+b+"Class"](a,this.isExpanded);h.replace(this[c],this[d]||"",e||"");l.set(this[c],this.tree["get"+b+"Style"](a,this.isExpanded)||{})},_updateLayout:function(){var a=this.getParent(),a=!a||!a.rowNode||"none"==a.rowNode.style.display;h.toggle(this.domNode,"dijitTreeIsRoot",a);h.toggle(this.domNode,"dijitTreeIsLast",!a&&!this.getNextSibling())},_setExpando:function(a){var c=
["dijitTreeExpandoLoading","dijitTreeExpandoOpened","dijitTreeExpandoClosed","dijitTreeExpandoLeaf"];a=a?0:this.isExpandable?this.isExpanded?1:2:3;h.replace(this.expandoNode,c[a],c);this.expandoNodeText.innerHTML=["*","-","+","*"][a]},expand:function(){if(this._expandDeferred)return K(this._expandDeferred);this._collapseDeferred&&(this._collapseDeferred.cancel(),delete this._collapseDeferred);this.isExpanded=!0;this.labelNode.setAttribute("aria-expanded","true");(this.tree.showRoot||this!==this.tree.rootNode)&&
this.containerNode.setAttribute("role","group");h.add(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);this==this.tree.rootNode&&this.tree.showRoot&&this.tree.domNode.setAttribute("aria-expanded","true");var a=p.wipeIn({node:this.containerNode,duration:D.defaultDuration}),c=this._expandDeferred=new b(function(){a.stop()});f.after(a,"onEnd",function(){c.resolve(!0)},!0);a.play();return K(c)},collapse:function(){if(this._collapseDeferred)return K(this._collapseDeferred);
this._expandDeferred&&(this._expandDeferred.cancel(),delete this._expandDeferred);this.isExpanded=!1;this.labelNode.setAttribute("aria-expanded","false");this==this.tree.rootNode&&this.tree.showRoot&&this.tree.domNode.setAttribute("aria-expanded","false");h.remove(this.contentNode,"dijitTreeContentExpanded");this._setExpando();this._updateItemClasses(this.item);var a=p.wipeOut({node:this.containerNode,duration:D.defaultDuration}),c=this._collapseDeferred=new b(function(){a.stop()});f.after(a,"onEnd",
function(){c.resolve(!0)},!0);a.play();return K(c)},indent:0,setChildItems:function(b){var d=this.tree,h=d.model,e=[],f=d.focusedChild,k=this.getChildren();g.forEach(k,function(a){I.prototype.removeChild.call(this,a)},this);this.defer(function(){g.forEach(k,function(a){if(!a._destroyed&&!a.getParent()){d.dndController.removeTreeNode(a);var b=function(a){var c=h.getIdentity(a.item),e=d._itemNodesMap[c];1==e.length?delete d._itemNodesMap[c]:(c=g.indexOf(e,a),-1!=c&&e.splice(c,1));g.forEach(a.getChildren(),
b)};b(a);if(d.persist){var e=g.map(a.getTreePath(),function(a){return d.model.getIdentity(a)}).join("/"),k;for(k in d._openedNodes)k.substr(0,e.length)==e&&delete d._openedNodes[k];d._saveExpandedNodes()}d.lastFocusedChild&&!c.isDescendant(d.lastFocusedChild,d.domNode)&&delete d.lastFocusedChild;f&&!c.isDescendant(f,d.domNode)&&d.focus();a.destroyRecursive()}})});this.state="Loaded";b&&0<b.length?(this.isExpandable=!0,g.forEach(b,function(a){var c=h.getIdentity(a),b=d._itemNodesMap[c],f;if(b)for(var k=
0;k<b.length;k++)if(b[k]&&!b[k].getParent()){f=b[k];f.set("indent",this.indent+1);break}f||(f=this.tree._createTreeNode({item:a,tree:d,isExpandable:h.mayHaveChildren(a),label:d.getLabel(a),labelType:d.model&&d.model.labelType||"text",tooltip:d.getTooltip(a),ownerDocument:d.ownerDocument,dir:d.dir,lang:d.lang,textDir:d.textDir,indent:this.indent+1}),b?b.push(f):d._itemNodesMap[c]=[f]);this.addChild(f);(this.tree.autoExpand||this.tree._state(f))&&e.push(d._expandNode(f))},this),g.forEach(this.getChildren(),
function(a){a._updateLayout()})):this.isExpandable=!1;this._setExpando&&this._setExpando(!1);this._updateItemClasses(this.item);b=a(e);this.tree._startPaint(b);return K(b)},getTreePath:function(){for(var a=this,c=[];a&&a!==this.tree.rootNode;)c.unshift(a.item),a=a.getParent();c.unshift(this.tree.rootNode.item);return c},getIdentity:function(){return this.tree.model.getIdentity(this.item)},removeChild:function(a){this.inherited(arguments);var c=this.getChildren();0==c.length&&(this.isExpandable=!1,
this.collapse());g.forEach(c,function(a){a._updateLayout()})},makeExpandable:function(){this.isExpandable=!0;this._setExpando(!1)},setSelected:function(a){this.labelNode.setAttribute("aria-selected",a?"true":"false");h.toggle(this.rowNode,"dijitTreeRowSelected",a)},focus:function(){y.focus(this.focusNode)}});n("dojo-bidi")&&Q.extend({_setTextDirAttr:function(a){if(a&&(this.textDir!=a||!this._created))this._set("textDir",a),this.applyTextDir(this.labelNode),g.forEach(this.getChildren(),function(c){c.set("textDir",
a)},this)}});var U=d("dijit.Tree",[E,M,F,C],{baseClass:"dijitTree",store:null,model:null,query:null,label:"",showRoot:!0,childrenAttr:["children"],paths:[],path:[],selectedItems:null,selectedItem:null,openOnClick:!1,openOnDblClick:!1,templateString:N,persist:!1,autoExpand:!1,dndController:S,dndParams:"onDndDrop itemCreator onDndCancel checkAcceptance checkItemAcceptance dragThreshold betweenThreshold".split(" "),onDndDrop:null,itemCreator:null,onDndCancel:null,checkAcceptance:null,checkItemAcceptance:null,
dragThreshold:5,betweenThreshold:0,_nodePixelIndent:19,_publish:function(a,c){u.publish(this.id,s.mixin({tree:this,event:a},c||{}))},postMixInProperties:function(){this.tree=this;this.autoExpand&&(this.persist=!1);this._itemNodesMap={};!this.cookieName&&this.id&&(this.cookieName=this.id+"SaveStateCookie");this.expandChildrenDeferred=new b;this.pendingCommandsPromise=this.expandChildrenDeferred.promise;this.inherited(arguments)},postCreate:function(){this._initState();var a=this;this.own(t(this.containerNode,
t.selector(".dijitTreeNode",v.enter),function(c){a._onNodeMouseEnter(B.byNode(this),c)}),t(this.containerNode,t.selector(".dijitTreeNode",v.leave),function(c){a._onNodeMouseLeave(B.byNode(this),c)}),t(this.containerNode,t.selector(".dijitTreeRow",x.press),function(c){a._onNodePress(B.getEnclosingWidget(this),c)}),t(this.containerNode,t.selector(".dijitTreeRow",x),function(c){a._onClick(B.getEnclosingWidget(this),c)}),t(this.containerNode,t.selector(".dijitTreeRow","dblclick"),function(c){a._onDblClick(B.getEnclosingWidget(this),
c)}));this.model||this._store2model();this.own(f.after(this.model,"onChange",s.hitch(this,"_onItemChange"),!0),f.after(this.model,"onChildrenChange",s.hitch(this,"_onItemChildrenChange"),!0),f.after(this.model,"onDelete",s.hitch(this,"_onItemDelete"),!0));this.inherited(arguments);if(this.dndController){s.isString(this.dndController)&&(this.dndController=s.getObject(this.dndController));for(var c={},b=0;b<this.dndParams.length;b++)this[this.dndParams[b]]&&(c[this.dndParams[b]]=this[this.dndParams[b]]);
this.dndController=new this.dndController(this,c)}this._load();this.onLoadDeferred=K(this.pendingCommandsPromise);this.onLoadDeferred.then(s.hitch(this,"onLoad"))},_store2model:function(){this._v10Compat=!0;q.deprecated("Tree: from version 2.0, should specify a model object rather than a store/query");var a={id:this.id+"_ForestStoreModel",store:this.store,query:this.query,childrenAttrs:this.childrenAttr};this.params.mayHaveChildren&&(a.mayHaveChildren=s.hitch(this,"mayHaveChildren"));this.params.getItemChildren&&
(a.getChildren=s.hitch(this,function(a,c,b){this.getItemChildren(this._v10Compat&&a===this.model.root?null:a,c,b)}));this.model=new R(a);this.showRoot=Boolean(this.label)},onLoad:function(){},_load:function(){this.model.getRoot(s.hitch(this,function(a){var c=this.rootNode=this.tree._createTreeNode({item:a,tree:this,isExpandable:!0,label:this.label||this.getLabel(a),labelType:this.model.labelType||"text",textDir:this.textDir,indent:this.showRoot?0:-1});this.showRoot?(this.domNode.setAttribute("aria-multiselectable",
!this.dndController.singular),this.rootLoadingIndicator.style.display="none"):(c.rowNode.style.display="none",this.domNode.setAttribute("role","presentation"),this.domNode.removeAttribute("aria-expanded"),this.domNode.removeAttribute("aria-multiselectable"),this["aria-label"]?(c.containerNode.setAttribute("aria-label",this["aria-label"]),this.domNode.removeAttribute("aria-label")):this["aria-labelledby"]&&(c.containerNode.setAttribute("aria-labelledby",this["aria-labelledby"]),this.domNode.removeAttribute("aria-labelledby")),
c.labelNode.setAttribute("role","presentation"),c.labelNode.removeAttribute("aria-selected"),c.containerNode.setAttribute("role","tree"),c.containerNode.setAttribute("aria-expanded","true"),c.containerNode.setAttribute("aria-multiselectable",!this.dndController.singular));this.containerNode.appendChild(c.domNode);a=this.model.getIdentity(a);this._itemNodesMap[a]?this._itemNodesMap[a].push(c):this._itemNodesMap[a]=[c];c._updateLayout();this._expandNode(c).then(s.hitch(this,function(){this._destroyed||
(this.rootLoadingIndicator.style.display="none",this.expandChildrenDeferred.resolve(!0))}))}),s.hitch(this,function(a){}))},getNodesByItem:function(a){if(!a)return[];a=s.isString(a)?a:this.model.getIdentity(a);return[].concat(this._itemNodesMap[a])},_setSelectedItemAttr:function(a){this.set("selectedItems",[a])},_setSelectedItemsAttr:function(a){var c=this;return this.pendingCommandsPromise=this.pendingCommandsPromise.always(s.hitch(this,function(){var b=g.map(a,function(a){return!a||s.isString(a)?
a:c.model.getIdentity(a)}),d=[];g.forEach(b,function(a){d=d.concat(c._itemNodesMap[a]||[])});this.set("selectedNodes",d)}))},_setPathAttr:function(a){return a.length?K(this.set("paths",[a]).then(function(a){return a[0]})):K(this.set("paths",[]).then(function(a){return a[0]}))},_setPathsAttr:function(c){function b(a,c){var h=a.shift(),e=g.filter(c,function(a){return a.getIdentity()==h})[0];if(e)return a.length?d._expandNode(e).then(function(){return b(a,e.getChildren())}):e;throw new U.PathError("Could not expand path at "+
h);}var d=this;return K(this.pendingCommandsPromise=this.pendingCommandsPromise.always(function(){return a(g.map(c,function(a){a=g.map(a,function(a){return a&&s.isObject(a)?d.model.getIdentity(a):a});if(a.length)return b(a,[d.rootNode]);throw new U.PathError("Empty path");}))}).then(function(a){d.set("selectedNodes",a);return d.paths}))},_setSelectedNodeAttr:function(a){this.set("selectedNodes",[a])},_setSelectedNodesAttr:function(a){this.dndController.setSelection(a)},expandAll:function(){function c(d){return b._expandNode(d).then(function(){var b=
g.filter(d.getChildren()||[],function(a){return a.isExpandable});return a(g.map(b,c))})}var b=this;return K(c(this.rootNode))},collapseAll:function(){function c(d){var h=g.filter(d.getChildren()||[],function(a){return a.isExpandable}),h=a(g.map(h,c));return!d.isExpanded||d==b.rootNode&&!b.showRoot?h:h.then(function(){return b._collapseNode(d)})}var b=this;return K(c(this.rootNode))},mayHaveChildren:function(){},getItemChildren:function(){},getLabel:function(a){return this.model.getLabel(a)},getIconClass:function(a,
c){return!a||this.model.mayHaveChildren(a)?c?"dijitFolderOpened":"dijitFolderClosed":"dijitLeaf"},getLabelClass:function(){},getRowClass:function(){},getIconStyle:function(){},getLabelStyle:function(){},getRowStyle:function(){},getTooltip:function(){return""},_onDownArrow:function(a,c){var b=this._getNext(c);b&&b.isTreeNode&&this.focusNode(b)},_onUpArrow:function(a,c){var b=c.getPreviousSibling();if(b)for(c=b;c.isExpandable&&c.isExpanded&&c.hasChildren();)b=c.getChildren(),c=b[b.length-1];else if(b=
c.getParent(),this.showRoot||b!==this.rootNode)c=b;c&&c.isTreeNode&&this.focusNode(c)},_onRightArrow:function(a,c){c.isExpandable&&!c.isExpanded?this._expandNode(c):c.hasChildren()&&(c=c.getChildren()[0])&&c.isTreeNode&&this.focusNode(c)},_onLeftArrow:function(a,c){if(c.isExpandable&&c.isExpanded)this._collapseNode(c);else{var b=c.getParent();b&&(b.isTreeNode&&(this.showRoot||b!==this.rootNode))&&this.focusNode(b)}},focusLastChild:function(){var a=this._getLast();a&&a.isTreeNode&&this.focusNode(a)},
_getFirst:function(){return this.showRoot?this.rootNode:this.rootNode.getChildren()[0]},_getLast:function(){for(var a=this.rootNode;a.isExpanded;){var c=a.getChildren();if(!c.length)break;a=c[c.length-1]}return a},_getNext:function(a){if(a.isExpandable&&a.isExpanded&&a.hasChildren())return a.getChildren()[0];for(;a&&a.isTreeNode;){var c=a.getNextSibling();if(c)return c;a=a.getParent()}return null},childSelector:".dijitTreeRow",isExpandoNode:function(a,b){return c.isDescendant(a,b.expandoNode)||c.isDescendant(a,
b.expandoNodeText)},_onNodePress:function(a,c){this.focusNode(a)},__click:function(a,c,b,d){var h=this.isExpandoNode(c.target,a);a.isExpandable&&(b||h)?this._onExpandoClick({node:a}):(this._publish("execute",{item:a.item,node:a,evt:c}),this[d](a.item,a,c),this.focusNode(a));c.stopPropagation();c.preventDefault()},_onClick:function(a,c){this.__click(a,c,this.openOnClick,"onClick")},_onDblClick:function(a,c){this.__click(a,c,this.openOnDblClick,"onDblClick")},_onExpandoClick:function(a){a=a.node;this.focusNode(a);
a.isExpanded?this._collapseNode(a):this._expandNode(a)},onClick:function(){},onDblClick:function(){},onOpen:function(){},onClose:function(){},_getNextNode:function(a){q.deprecated(this.declaredClass+"::_getNextNode(node) is deprecated. Use _getNext(node) instead.","","2.0");return this._getNext(a)},_getRootOrFirstNode:function(){q.deprecated(this.declaredClass+"::_getRootOrFirstNode() is deprecated. Use _getFirst() instead.","","2.0");return this._getFirst()},_collapseNode:function(a){a._expandNodeDeferred&&
delete a._expandNodeDeferred;if("Loading"!=a.state&&a.isExpanded){var c=a.collapse();this.onClose(a.item,a);this._state(a,!1);this._startPaint(c);return c}},_expandNode:function(a){if(a._expandNodeDeferred)return a._expandNodeDeferred;var c=this.model,d=a.item;a._loadDeferred||(a.markProcessing(),a._loadDeferred=new b,c.getChildren(d,function(c){a.unmarkProcessing();a.setChildItems(c).then(function(){a._loadDeferred.resolve(c)})},function(c){a._loadDeferred.reject(c)}));c=a._loadDeferred.then(s.hitch(this,
function(){var c=a.expand();this.onOpen(a.item,a);this._state(a,!0);return c}));this._startPaint(c);return c},focusNode:function(a){var c=this.domNode.scrollLeft;this.focusChild(a);this.domNode.scrollLeft=c},_onNodeMouseEnter:function(){},_onNodeMouseLeave:function(){},_onItemChange:function(a){var c=this.model.getIdentity(a);if(c=this._itemNodesMap[c]){var b=this.getLabel(a),d=this.getTooltip(a);g.forEach(c,function(c){c.set({item:a,label:b,tooltip:d});c._updateItemClasses(a)})}},_onItemChildrenChange:function(a,
c){var b=this.model.getIdentity(a);(b=this._itemNodesMap[b])&&g.forEach(b,function(a){a.setChildItems(c)})},_onItemDelete:function(a){a=this.model.getIdentity(a);var b=this._itemNodesMap[a];b&&(g.forEach(b,function(a){this.dndController.removeTreeNode(a);var b=a.getParent();b&&b.removeChild(a);this.lastFocusedChild&&!c.isDescendant(this.lastFocusedChild,this.domNode)&&delete this.lastFocusedChild;this.focusedChild&&!c.isDescendant(this.focusedChild,this.domNode)&&this.focus();a.destroyRecursive()},
this),delete this._itemNodesMap[a])},_initState:function(){this._openedNodes={};if(this.persist&&this.cookieName){var a=e(this.cookieName);a&&g.forEach(a.split(","),function(a){this._openedNodes[a]=!0},this)}},_state:function(a,c){if(!this.persist)return!1;var b=g.map(a.getTreePath(),function(a){return this.model.getIdentity(a)},this).join("/");if(1===arguments.length)return this._openedNodes[b];c?this._openedNodes[b]=!0:delete this._openedNodes[b];this._saveExpandedNodes()},_saveExpandedNodes:function(){if(this.persist&&
this.cookieName){var a=[],c;for(c in this._openedNodes)a.push(c);e(this.cookieName,a.join(","),{expires:365})}},destroy:function(){this._curSearch&&(this._curSearch.timer.remove(),delete this._curSearch);this.rootNode&&this.rootNode.destroyRecursive();this.dndController&&!s.isString(this.dndController)&&this.dndController.destroy();this.rootNode=null;this.inherited(arguments)},destroyRecursive:function(){this.destroy()},resize:function(a){a&&k.setMarginBox(this.domNode,a);this._nodePixelIndent=k.position(this.tree.indentDetector).w||
this._nodePixelIndent;this.expandChildrenDeferred.then(s.hitch(this,function(){this.rootNode.set("indent",this.showRoot?0:-1);this._adjustWidths()}))},_outstandingPaintOperations:0,_startPaint:function(a){this._outstandingPaintOperations++;this._adjustWidthsTimer&&(this._adjustWidthsTimer.remove(),delete this._adjustWidthsTimer);var c=s.hitch(this,function(){this._outstandingPaintOperations--;0>=this._outstandingPaintOperations&&(!this._adjustWidthsTimer&&this._started)&&(this._adjustWidthsTimer=
this.defer("_adjustWidths"))});w(a,c,c)},_adjustWidths:function(){this._adjustWidthsTimer&&(this._adjustWidthsTimer.remove(),delete this._adjustWidthsTimer);this.containerNode.style.width="auto";this.containerNode.style.width=this.domNode.scrollWidth>this.domNode.offsetWidth?"auto":"100%"},_createTreeNode:function(a){return new Q(a)},focus:function(){this.lastFocusedChild?this.focusNode(this.lastFocusedChild):this.focusFirstChild()}});n("dojo-bidi")&&U.extend({_setTextDirAttr:function(a){a&&this.textDir!=
a&&(this._set("textDir",a),this.rootNode.set("textDir",a))}});U.PathError=m("TreePathError");U._TreeNode=Q;return U})},"dijit/tree/ForestStoreModel":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/_base/kernel","dojo/_base/lang","./TreeStoreModel"],function(g,f,e,d,b){return f("dijit.tree.ForestStoreModel",b,{rootId:"$root$",rootLabel:"ROOT",query:null,constructor:function(a){this.root={store:this,root:!0,id:a.rootId,label:a.rootLabel,children:a.rootChildren}},mayHaveChildren:function(a){return a===
this.root||this.inherited(arguments)},getChildren:function(a,c,b){a===this.root?this.root.children?c(this.root.children):this.store.fetch({query:this.query,onComplete:d.hitch(this,function(a){this.root.children=a;c(a)}),onError:b}):this.inherited(arguments)},isItem:function(a){return a===this.root?!0:this.inherited(arguments)},fetchItemByIdentity:function(a){if(a.identity==this.root.id){var c=a.scope||e.global;a.onItem&&a.onItem.call(c,this.root)}else this.inherited(arguments)},getIdentity:function(a){return a===
this.root?this.root.id:this.inherited(arguments)},getLabel:function(a){return a===this.root?this.root.label:this.inherited(arguments)},newItem:function(a,c,b){return c===this.root?(this.onNewRootItem(a),this.store.newItem(a)):this.inherited(arguments)},onNewRootItem:function(){},pasteItem:function(a,c,b,d,e){if(c===this.root&&!d)this.onLeaveRoot(a);this.inherited(arguments,[a,c===this.root?null:c,b===this.root?null:b,d,e]);if(b===this.root)this.onAddToRoot(a)},onAddToRoot:function(a){},onLeaveRoot:function(a){},
_requeryTop:function(){var a=this.root.children||[];this.store.fetch({query:this.query,onComplete:d.hitch(this,function(c){this.root.children=c;if(a.length!=c.length||g.some(a,function(a,b){return c[b]!=a}))this.onChildrenChange(this.root,c)})})},onNewItem:function(a,c){this._requeryTop();this.inherited(arguments)},onDeleteItem:function(a){-1!=g.indexOf(this.root.children,a)&&this._requeryTop();this.inherited(arguments)},onSetItem:function(a,c,b,d){this._requeryTop();this.inherited(arguments)}})})},
"dijit/tree/_dndSelector":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/kernel dojo/_base/lang dojo/dnd/common dojo/dom dojo/mouse dojo/on dojo/touch ../a11yclick ./_dndContainer".split(" "),function(g,f,e,d,b,a,c,h,k,l,m){return f("dijit.tree._dndSelector",m,{constructor:function(){this.selection={};this.anchor=null;this.events.push(h(this.tree.domNode,k.press,d.hitch(this,"onMouseDown")),h(this.tree.domNode,k.release,d.hitch(this,"onMouseUp")),h(this.tree.domNode,k.move,d.hitch(this,
"onMouseMove")),h(this.tree.domNode,l.press,d.hitch(this,"onClickPress")),h(this.tree.domNode,l.release,d.hitch(this,"onClickRelease")))},singular:!1,getSelectedTreeNodes:function(){var a=[],c=this.selection,b;for(b in c)a.push(c[b]);return a},selectNone:function(){this.setSelection([]);return this},destroy:function(){this.inherited(arguments);this.selection=this.anchor=null},addTreeNode:function(a,c){this.setSelection(this.getSelectedTreeNodes().concat([a]));c&&(this.anchor=a);return a},removeTreeNode:function(c){var b=
g.filter(this.getSelectedTreeNodes(),function(b){return!a.isDescendant(b.domNode,c.domNode)});this.setSelection(b);return c},isTreeNodeSelected:function(a){return a.id&&!!this.selection[a.id]},setSelection:function(a){var c=this.getSelectedTreeNodes();g.forEach(this._setDifference(c,a),d.hitch(this,function(a){a.setSelected(!1);this.anchor==a&&delete this.anchor;delete this.selection[a.id]}));g.forEach(this._setDifference(a,c),d.hitch(this,function(a){a.setSelected(!0);this.selection[a.id]=a}));this._updateSelectionProperties()},
_setDifference:function(a,c){g.forEach(c,function(a){a.__exclude__=!0});var b=g.filter(a,function(a){return!a.__exclude__});g.forEach(c,function(a){delete a.__exclude__});return b},_updateSelectionProperties:function(){var a=this.getSelectedTreeNodes(),c=[],b=[];g.forEach(a,function(a){var d=a.getTreePath();b.push(a);c.push(d)},this);a=g.map(b,function(a){return a.item});this.tree._set("paths",c);this.tree._set("path",c[0]||[]);this.tree._set("selectedNodes",b);this.tree._set("selectedNode",b[0]||
null);this.tree._set("selectedItems",a);this.tree._set("selectedItem",a[0]||null)},onClickPress:function(a){if(!this.current||!this.current.isExpandable||!this.tree.isExpandoNode(a.target,this.current)){"mousedown"==a.type&&c.isLeft(a)&&a.preventDefault();var d="keydown"==a.type?this.tree.focusedChild:this.current;if(d){var h=b.getCopyKeyState(a),e=d.id;!this.singular&&!a.shiftKey&&this.selection[e]?this._doDeselect=!0:(this._doDeselect=!1,this.userSelect(d,h,a.shiftKey))}}},onClickRelease:function(a){this._doDeselect&&
(this._doDeselect=!1,this.userSelect("keyup"==a.type?this.tree.focusedChild:this.current,b.getCopyKeyState(a),a.shiftKey))},onMouseMove:function(){this._doDeselect=!1},onMouseDown:function(){},onMouseUp:function(){},_compareNodes:function(a,c){if(a===c)return 0;if("sourceIndex"in document.documentElement)return a.sourceIndex-c.sourceIndex;if("compareDocumentPosition"in document.documentElement)return a.compareDocumentPosition(c)&2?1:-1;if(document.createRange){var b=doc.createRange();b.setStartBefore(a);
var d=doc.createRange();d.setStartBefore(c);return b.compareBoundaryPoints(b.END_TO_END,d)}throw Error("dijit.tree._compareNodes don't know how to compare two different nodes in this browser");},userSelect:function(a,c,b){if(this.singular)this.anchor==a&&c?this.selectNone():(this.setSelection([a]),this.anchor=a);else if(b&&this.anchor){c=this._compareNodes(this.anchor.rowNode,a.rowNode);b=this.anchor;0>c?c=b:(c=a,a=b);for(b=[];c!=a;)b.push(c),c=this.tree._getNext(c);b.push(a);this.setSelection(b)}else this.selection[a.id]&&
c?this.removeTreeNode(a):c?this.addTreeNode(a,!0):(this.setSelection([a]),this.anchor=a)},getItem:function(a){return{data:this.selection[a],type:["treeNode"]}},forInSelectedItems:function(a,c){c=c||e.global;for(var b in this.selection)a.call(c,this.getItem(b),b,this)}})})},"dijit/tree/_dndContainer":function(){define("dojo/aspect dojo/_base/declare dojo/dom-class dojo/_base/lang dojo/on dojo/touch".split(" "),function(g,f,e,d,b,a){return f("dijit.tree._dndContainer",null,{constructor:function(c,h){this.tree=
c;this.node=c.domNode;d.mixin(this,h);this.containerState="";e.add(this.node,"dojoDndContainer");this.events=[b(this.node,a.enter,d.hitch(this,"onOverEvent")),b(this.node,a.leave,d.hitch(this,"onOutEvent")),g.after(this.tree,"_onNodeMouseEnter",d.hitch(this,"onMouseOver"),!0),g.after(this.tree,"_onNodeMouseLeave",d.hitch(this,"onMouseOut"),!0),b(this.node,"dragstart, selectstart",function(a){a.preventDefault()})]},destroy:function(){for(var a;a=this.events.pop();)a.remove();this.node=this.parent=
null},onMouseOver:function(a){this.current=a},onMouseOut:function(){this.current=null},_changeState:function(a,b){var d="dojoDnd"+a,f=a.toLowerCase()+"State";e.replace(this.node,d+b,d+this[f]);this[f]=b},_addItemClass:function(a,b){e.add(a,"dojoDndItem"+b)},_removeItemClass:function(a,b){e.remove(a,"dojoDndItem"+b)},onOverEvent:function(){this._changeState("Container","Over")},onOutEvent:function(){this._changeState("Container","")}})})},"dijit/tree/dndSource":function(){define("dojo/_base/array dojo/_base/declare dojo/dnd/common dojo/dom-class dojo/dom-geometry dojo/_base/lang dojo/mouse dojo/on dojo/touch dojo/topic dojo/dnd/Manager ./_dndSelector".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p){return f("dijit.tree.dndSource",p,{isSource:!0,accept:["text","treeNode"],copyOnly:!1,dragThreshold:5,betweenThreshold:0,generateText:!0,constructor:function(c,b){b||(b={});a.mixin(this,b);var h=b.accept instanceof Array?b.accept:["text","treeNode"];this.accept=null;if(h.length){this.accept={};for(var e=0;e<h.length;++e)this.accept[h[e]]=1}this.mouseDown=this.isDragging=!1;this.targetBox=this.targetAnchor=null;this.dropPosition="";this._lastY=this._lastX=0;this.sourceState=
"";this.isSource&&d.add(this.node,"dojoDndSource");this.targetState="";this.accept&&d.add(this.node,"dojoDndTarget");this.topics=[l.subscribe("/dnd/source/over",a.hitch(this,"onDndSourceOver")),l.subscribe("/dnd/start",a.hitch(this,"onDndStart")),l.subscribe("/dnd/drop",a.hitch(this,"onDndDrop")),l.subscribe("/dnd/cancel",a.hitch(this,"onDndCancel"))]},checkAcceptance:function(){return!0},copyState:function(a){return this.copyOnly||a},destroy:function(){this.inherited(arguments);for(var a;a=this.topics.pop();)a.remove();
this.targetAnchor=null},_onDragMouse:function(a,c){var d=m.manager(),h=this.targetAnchor,e=this.current,f=this.dropPosition,k="Over";if(e&&0<this.betweenThreshold){if(!this.targetBox||h!=e)this.targetBox=b.position(e.rowNode,!0);a.pageY-this.targetBox.y<=this.betweenThreshold?k="Before":a.pageY-this.targetBox.y>=this.targetBox.h-this.betweenThreshold&&(k="After")}if(c||e!=h||k!=f){h&&this._removeItemClass(h.rowNode,f);e&&this._addItemClass(e.rowNode,k);if(e)if(e==this.tree.rootNode&&"Over"!=k)d.canDrop(!1);
else{f=h=!1;if(d.source==this){var f="Over"===k,l;for(l in this.selection){var g=this.selection[l];if(g.item===e.item){h=!0;break}g.getParent().id!==e.id&&(f=!1)}}d.canDrop(!h&&!f&&!this._isParentChildDrop(d.source,e.rowNode)&&this.checkItemAcceptance(e.rowNode,d.source,k.toLowerCase()))}else d.canDrop(!1);this.targetAnchor=e;this.dropPosition=k}},onMouseMove:function(a){if(!(this.isDragging&&"Disabled"==this.targetState)){this.inherited(arguments);var c=m.manager();if(this.isDragging)this._onDragMouse(a);
else if(this.mouseDown&&this.isSource&&(Math.abs(a.pageX-this._lastX)>=this.dragThreshold||Math.abs(a.pageY-this._lastY)>=this.dragThreshold)){var b=this.getSelectedTreeNodes();if(b.length){if(1<b.length){var d=this.selection,h=0,f=[],k,l;a:for(;k=b[h++];){for(l=k.getParent();l&&l!==this.tree;l=l.getParent())if(d[l.id])continue a;f.push(k)}b=f}b=g.map(b,function(a){return a.domNode});c.startDrag(this,b,this.copyState(e.getCopyKeyState(a)));this._onDragMouse(a,!0)}}}},onMouseDown:function(a){if("touchstart"==
a.type||c.isLeft(a))this.mouseDown=!0,this.mouseButton=a.button,this._lastX=a.pageX,this._lastY=a.pageY;this.inherited(arguments)},onMouseUp:function(a){this.mouseDown&&(this.mouseDown=!1,this.inherited(arguments))},onMouseOut:function(){this.inherited(arguments);this._unmarkTargetAnchor()},checkItemAcceptance:function(){return!0},onDndSourceOver:function(a){this!=a?(this.mouseDown=!1,this._unmarkTargetAnchor()):this.isDragging&&m.manager().canDrop(!1)},onDndStart:function(a,c,b){this.isSource&&this._changeState("Source",
this==a?b?"Copied":"Moved":"");c=this.checkAcceptance(a,c);this._changeState("Target",c?"":"Disabled");this==a&&m.manager().overSource(this);this.isDragging=!0},itemCreator:function(a){return g.map(a,function(a){return{id:a.id,name:a.textContent||a.innerText||""}})},onDndDrop:function(a,c,b){if("Over"==this.containerState){var d=this.tree,h=d.model,e=this.targetAnchor,f=!1;this.isDragging=!1;var k,l,m;k=e&&e.item||d.item;"Before"==this.dropPosition||"After"==this.dropPosition?(k=e.getParent()&&e.getParent().item||
d.item,l=e.getIndexInParent(),"After"==this.dropPosition?(l=e.getIndexInParent()+1,m=e.getNextSibling()&&e.getNextSibling().item):m=e.item):(k=e&&e.item||d.item,f=!0);var p;g.forEach(c,function(d,f){var s=a.getItem(d.id);if(-1!=g.indexOf(s.type,"treeNode"))var v=s.data,L=v.item,C=v.getParent().item;a==this?("number"==typeof l&&k==C&&v.getIndexInParent()<l&&(l-=1),h.pasteItem(L,C,k,b,l,m)):h.isItem(L)?h.pasteItem(L,C,k,b,l,m):(p||(p=this.itemCreator(c,e.rowNode,a)),h.newItem(p[f],k,l,m))},this);f&&
this.tree._expandNode(e)}this.onDndCancel()},onDndCancel:function(){this._unmarkTargetAnchor();this.mouseDown=this.isDragging=!1;delete this.mouseButton;this._changeState("Source","");this._changeState("Target","")},onOverEvent:function(){this.inherited(arguments);m.manager().overSource(this)},onOutEvent:function(){this._unmarkTargetAnchor();var a=m.manager();this.isDragging&&a.canDrop(!1);a.outSource(this);this.inherited(arguments)},_isParentChildDrop:function(a,c){if(!a.tree||a.tree!=this.tree)return!1;
for(var b=a.tree.domNode,d=a.selection,h=c.parentNode;h!=b&&!d[h.id];)h=h.parentNode;return h.id&&d[h.id]},_unmarkTargetAnchor:function(){this.targetAnchor&&(this._removeItemClass(this.targetAnchor.rowNode,this.dropPosition),this.dropPosition=this.targetBox=this.targetAnchor=null)},_markDndStatus:function(a){this._changeState("Source",a?"Copied":"Moved")}})})},"filechooser-ui/filebrowser/FileBrowserTreeNode":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/event dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/i18n!../l10n/gen/resources/filechooser/nls/filechooser dojo/dom-attr dojo/dom-construct dijit/_Widget dijit/_TemplatedMixin dijit/_Container dijit/_Contained dijit/_CssStateMixin dijit/Tree mw-filename-utils/FileNameUtil".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s){return g([r._TreeNode],{postCreate:function(){this.inherited(arguments);var a;s.isUserPublishedDirectoryPath(this.item.path)?a=c.publishedMySite:s.isUserSharedDirectoryPath(this.item.path)&&(a=c.sharedWithMe);a&&(this.infoLabelNode=k.create("span",{innerHTML:a,"class":"infoLabel"},this.labelNode,"after"));h.set(this.rowNode,"data-test-tag",s.convertPathToRowClass(this.item.path))},setChildItems:function(a){var c=this.inherited(arguments);this.expand();f.forEach(a,
function(a){a.opened&&(a=this.tree.getNodesByItem(a)[0])&&!a.isExpanded&&this.tree._expandNode(a,!1)},this);this.tree.onNodeUpdate();return c},removeChild:function(a){this.inherited(arguments);this.tree.onNodeUpdate()},_setNodeRefreshIcon:function(a){var c=["dijitTreeExpandoLoading","dijitTreeExpandoOpened","dijitTreeExpandoClosed","dijitTreeExpandoLeaf"];a=a?0:this.isExpandable?this.isExpanded?1:2:3;d.remove(this.expandoNode,c);d.add(this.expandoNode,c[a]);this.expandoNodeText.innerHTML=["*","-",
"+","*"][a]},_getRequiredWidth:function(){return a.get(this.rowNode,"padding-left")+b.getMarginBox(this.contentNode).w+a.get(this.expandoNode,"width")}})})},"MOTW/filechooser/FileDataService":function(){define(["dojo/_base/declare","filechooser-ui/FileDataService"],function(g,f){return g([f],{})})},"filechooser-ui/FileDataService":function(){define("dojo/_base/connect dojo/_base/declare dojo/_base/Deferred dojo/_base/lang dojo/_base/window dojo/store/Memory dojo/on mw-log/Log mw-remote/Remote mw-remote/remoteFaultCodes mw-filename-utils/FileNameUtil mw-utils/Utils ./FileDataStore".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){var q=f([a],{size:function(){return this.query().length}});return f([],{constructor:function(a){a=a||{};this.pathService=a.pathService;this.fileStore=a.fileStore||new n;this.currentWorkingFolder=a.pathService.currentWorkingFolder;this.openedFilesDataStore=new q;g.connect(this.fileStore,"loadItem",this,this._loadFolder);this.classifier=a.classifier;this.pathService.on("accessibleRoots",d.hitch(this,function(a){this.roots=a.data.directories}))},reset:function(){this.currentWorkingFolder=
void 0;this.onCurrentFolderChange(this.currentWorkingFolder);this.fileStore.reset()},getAllOpenedFileInfoPaths:function(){var a=[];this.openedFilesDataStore.query().forEach(function(c){a.push(c.fileInfo)});return a},start:function(){var a=this.classifier?":"+this.classifier:"";k.registerDefaultMessageFactory("ListFolder"+a,this._createListFolderRequest,this);k.registerDefaultMessageFactory("UpdateFile"+a,this._createUpdateFileRequest,this);k.registerDefaultMessageFactory("CloseFile"+a,this._createCloseAllFilesRequest,
this);k.registerResponseHandler("ListFolderResponse"+a,this._handleListFolderResponse,this);k.registerResponseHandler("CreateFileResponse"+a,this._handleCreateFileResponse,this);k.registerResponseHandler("RenameFileResponse"+a,this._handleRenameFileResponse,this);k.registerResponseHandler("DeleteFileResponse"+a,this._handleDeleteFileResponse,this);k.registerResponseHandler("OpenFileResponse"+a,this._handleOpenFileResponse,this);k.registerResponseHandler("CloseFileResponse"+a,this._handleCloseFileResponse,
this);k.registerResponseHandler("UpdateFileResponse"+a,this._handleUpdateFileResponse,this);k.registerResponseHandler("MoveFileResponse"+a,this._handleMoveFileResponse,this);k.registerFaultHandler("CurrentFolder"+a,this._handleFileError,this);k.registerFaultHandler("ListFolder"+a,this._handleFileError,this);k.registerFaultHandler("CreateFile"+a,this._handleFileError,this);k.registerFaultHandler("RenameFile"+a,this._handleFileError,this);k.registerFaultHandler("DeleteFile"+a,this._handleFileError,
this);k.registerFaultHandler("OpenFile"+a,this._handleFileError,this);k.registerFaultHandler("CloseFile"+a,this._handleFileError,this);k.registerFaultHandler("UpdateFile"+a,this._handleFileError,this);k.registerFaultHandler("MoveFile"+a,this._handleFileError,this);this.pathService.getAccessibleRoots()},stop:function(){var a=this.classifier?":"+this.classifier:"";k.deregisterDefaultMessageFactory("ListFolder"+a,this._createListFolderRequest,this);k.deregisterDefaultMessageFactory("UpdateFile"+a,this._createUpdateFileRequest,
this);k.deregisterDefaultMessageFactory("CloseFile"+a,this._createCloseFileRqst,this);k.deregisterResponseHandler("ListFolderResponse"+a,this._handleListFolderResponse,this);k.deregisterResponseHandler("CreateFileResponse"+a,this._handleCreateFileResponse,this);k.deregisterResponseHandler("RenameFileResponse"+a,this._handleRenameFileResponse,this);k.deregisterResponseHandler("DeleteFileResponse"+a,this._handleDeleteFileResponse,this);k.deregisterResponseHandler("OpenFileResponse"+a,this._handleOpenFileResponse,
this);k.deregisterResponseHandler("CloseFileResponse"+a,this._handleCloseFileResponse,this);k.deregisterResponseHandler("UpdateFileResponse"+a,this._handleUpdateFileResponse,this);k.deregisterResponseHandler("MoveFileResponse"+a,this._handleMoveFileResponse,this);k.deregisterFaultHandler("CurrentFolder"+a,this._handleFileError,this);k.deregisterFaultHandler("ListFolder"+a,this._handleFileError,this);k.deregisterFaultHandler("CreateFile"+a,this._handleFileError,this);k.deregisterFaultHandler("RenameFile"+
a,this._handleFileError,this);k.deregisterFaultHandler("DeleteFile"+a,this._handleFileError,this);k.deregisterFaultHandler("OpenFile"+a,this._handleFileError,this);k.deregisterFaultHandler("CloseFile"+a,this._handleFileError,this);k.deregisterFaultHandler("UpdateFile"+a,this._handleFileError,this);k.deregisterFaultHandler("MoveFile"+a,this._handleFileError,this);this.reset()},getUserIdForPublish:function(){return this._wraService?this._wraService.getCurrentUserInfo().userId:""},getUserPublishLocation:function(){return m.constructPathFromUserName(this.getUserIdForPublish())},
getPublishURLFromMATLABDriveURL:function(a){return m.convertToPublishURLFromMATLABDriveURL(a,this.getUserPublishLocation())},currentDirectory:function(a){if(this.roots){a&&(a=a.replace(/[\/\\]?$/,""));for(var c=!1,b=0;b<this.roots.length;b++)if(0===a.search(this.roots[b].location)){c=!0;break}if(c&&a&&(!this.currentWorkingFolder||a!==m.pathFromFileInfo(this.currentWorkingFolder))){var d=this;this.fileStore.fetch({query:{path:a},onComplete:function(c){c=c[0];var b=d.fileStore,h=m.folderInfoFromPath(a);
c?(delete h.filePermissions,b.updateItem(h)):(h.opened=!0,c=b.newItem(h));d.currentWorkingFolder&&(d.fileStore.isItem(d.currentWorkingFolder)&&d.currentWorkingFolder.path!==m.pathFromFileInfo(c))&&b.unsetAttribute(d.currentWorkingFolder,"isCurrentFolder");d.currentWorkingFolder=c;b.setValue(d.currentWorkingFolder,"isCurrentFolder",!0);d.onCurrentFolderChange(c)}})}}},listFolder:function(a,c){m.assertIsFileInfo(a);this.fileStore.isItem(a)&&(a[this.fileStore._loadedPropName]="pending");k.sendMessage({ListFolder:[{path:m.pathFromFileInfo(a)}]},
c,this.classifier)},createFile:function(a,c){m.assertIsFile(a);var b=m.remoteFile(a);k.sendMessage({CreateFile:{file:b,updateIfExists:c}},{file:b},this.classifier)},renameFile:function(a,c){m.assertIsFileInfo(a);m.assertIsFileInfo(c);var b=m.pathFromFileInfo(a),d=m.pathFromFileInfo(c),f=new e,l={},g=[],n,p=this;a.isDirectory&&(n=d,this.folderClosed(a),l.ListFolder=[{path:n}]);p._setFileRenameState(a,!0);h.log("renameFile"+b);var q=this.openedFilesDataStore.query({id:{test:function(a){return 0===a.indexOf(b)}}});
p.saveOpenFiles();q.forEach(function(a){h.log("renameFile"+a.id);var c=a.id;a.fileInfo.path=m.pathFromFileInfo(a.fileInfo);a=p._prepareFileForClose(a);g.push({file:a,updateFile:p.isFileModified(a)});p.openedFilesDataStore.remove(c)});f={originalFileInfo:a,newFilePath:d,listFolderComplete:f};l.CloseFile=g;l.RenameFile=[{originalFileInfo:b,newFileInfo:d}];l.CurrentFolder={changeTo:n};k.sendMessage(l,f,this.classifier)},overwriteFileContent:function(a){m.assertIsFile(a);m.assertIsFileInfo(a.fileInfo);
this.isFileOpen(a.fileInfo)&&this.closeFile(a.fileInfo);var c=[];c.push({file:a});k.sendMessage({UpdateFile:0===p.getArrayLength(c)?[{}]:c},void 0,this.classifier)},_setFileRenameState:function(a,c){},deleteFile:function(a){var c={};m.assertIsFileInfo(a);m.canDelete(a)&&(this.isFileOpen(a)&&this._doCloseFile(a,!1),c.DeleteFile={path:m.pathFromFileInfo(a)},m.pathFromFileInfo(this.currentWorkingFolder)===m.pathFromFileInfo(a)?c.CurrentFolder={changeTo:".."}:c.ListFolder=this._createListFolderRequest(),
k.sendMessage(c,void 0,this.classifier))},moveFile:function(a,c){var b=[];m.isFileInfo(c)&&c.isDirectory&&(a.forEach(function(a){b.push({srcPath:m.pathFromFileInfo(a),destPath:m.pathFromFileInfo(c)})},this),this.saveOpenFiles(),k.sendMessage({MoveFile:0===p.getArrayLength(b)?[{}]:b},void 0,this.classifier))},openFile:function(a,c){m.assertIsFileInfo(a);this._showIfOpen(a,c)||k.sendMessage({OpenFile:{path:m.pathFromFileInfo(a)}},{showVersionHistory:c},this.classifier)},closeFile:function(a){this._doCloseFile(a,
!0)},_doCloseFile:function(a,c){var b=this._getOpenFile(a);h.assert(b,"MOTW.FileDataService: cannot close '"+m.pathFromFileInfo(a)+"' because it is not open.");var d=c&&this.isFileModified(b),b=this._prepareFileForClose(b);this.openedFilesDataStore.remove(m.pathFromFileInfo(b.fileInfo));this._sendFileCloseMessage(b,d)},_sendFileCloseMessage:function(a,c){k.sendMessage({CloseFile:{file:a,updateFile:c}},void 0,this.classifier)},_prepareFileForClose:function(a){this.onFileClose(a.fileInfo);return a=
m.remoteFile(a)},isFileOpen:function(a){return this._getOpenFile(a)},setFileModified:function(a){h.assert(this.isFileOpen(a.fileInfo),"MOTW.FileDataService: cannot mark '"+m.pathFromFileInfo(a.fileInfo)+"' modified because it is not open.");h.assert(!a.fileInfo.filePermissions||a.fileInfo.filePermissions.canWrite,"MOTW.FileDataService: cannot mark '"+m.pathFromFileInfo(a.fileInfo)+"' modified because it is read-only");this._setModifiedDate(a,new Date,!1)},setFileClean:function(a){this._setModifiedDate(a,
void 0,!0)},isFileModified:function(a){return!!this._getModifiedDate(a)},saveOpenFiles:function(a){var c={},b=this._createUpdateFileRequest(c);0<b.length?(c.postSaveWork=a,k.sendMessage({UpdateFile:b},c,this.classifier)):a&&a()},doesOpenModifiedFileExist:function(){var a,c=this.openedFilesDataStore.query();for(a=0;a<c.length;a+=1)if(this.isFileModified(c[a]))return!0;return!1},doesMFileExistInOpenFolders:function(a,c){if(!this.fileStore)return!1;var b=!1,d=m.getFullyQualifiedMatlabName({location:c||
"",name:a});this.fileStore.fetch({query:{name:a},onItem:function(a){b=b||d===m.getFullyQualifiedMatlabName(a)}});return b},doesFileExistAtLocation:function(a,c){var b=!1,d=null;c=m.normalizeLocation(c);d=c+a;if(m.isUserSharedDirectoryPath(d)||m.isUserPublishedDirectoryPath(d))return!0;null!==d&&this.fileStore.fetch({query:{path:d},onComplete:function(a){0<a.length&&(b=!0)}});return b},doesFolderExistAtLocation:function(a,c){return this.doesFileExistAtLocation(a,c)},doesFileExistInCurrentDirectory:function(a){return!this.currentWorkingFolder||
!this.fileStore?!1:this.doesFileExistAtLocation(a,this.currentWorkingFolder.path)},doesFolderExistInCurrentDirectory:function(a){return this.doesFileExistInCurrentDirectory(a)},folderOpened:function(a){this.fileStore.isItem(a)&&a.isDirectory&&this.fileStore.setValue(a,"opened",!0)},folderClosed:function(a){var c=this,b;this.fileStore.isItem(a)&&a.isDirectory&&(this.fileStore.unsetAttribute(a,"opened"),this.fileStore.setValue(a,this.fileStore._loadedPropName,!1),this.fileStore.fetch({query:{location:m.normalizeLocation(a.path)},
onComplete:function(a){b=a}}),b.forEach(function(a){c.fileStore.deleteItem(a)}))},openedFolders:function(){var a=[];this.fileStore.fetch({query:{isDirectory:!0,opened:!0},onComplete:function(c){c&&0<c.length&&(a=c)}});return a},onCurrentFolderChange:function(a){},onMoveFault:function(){},onFileOpen:function(a,c){},onFileClose:function(a){},onFileClosed:function(a){},onFileShow:function(a,c){},onFileModificationChange:function(a,c){},_loadFolder:function(a){a.item&&a.onItem&&this.listFolder(a.item,
a)},_handleListFolderResponse:function(a,c){var d,h;a.forEach(function(a){if(a.messageFaults&&0<a.messageFaults.length)if(h=a.folder,a.messageFaults[0].faultCode===l.FILE_SERVICE_IO_ERROR_CODE&&h&&this.isFileOpen(h))this._doCloseFile(h,!1);else{if(this.folderExists(h))this.onListFolderMessageFault(a,"ListFolder")}else a.folder.isDirectory?(this.fileStore.syncFolder(a.folder,a.folderContents),this.fileStore.fetch({query:{path:m.pathFromFileInfo(a.folder)},onItem:function(a){d=a}}),c&&c.onItem&&c.onItem.call(c.scope?
c.scope:b.global,d?d:a.folder)):this._getOpenFile(a.folder)&&a.folder.deleted&&this._doCloseFile(a.folder,!1)},this);var e=this;this.currentWorkingFolder&&this.fileStore.fetch({query:{path:m.pathFromFileInfo(e.currentWorkingFolder)},onItem:function(a){e.fileStore.setValue(a,"isCurrentFolder",!0);e.currentWorkingFolder=a}});c&&c.listFolderComplete&&c.listFolderComplete.resolve(c)},_handleCreateFileResponse:function(a,c){a.forEach(function(a){var b=this;if(a.messageFaults&&0<a.messageFaults.length)this.onFileMessageFault(a,
"Create");else{var d=m.pathFromFileInfo(a.fileInfo);this.fileStore.fetch({query:{path:d},onComplete:function(d){var h=b.fileStore;d[0]?h.updateItem(a.fileInfo):h.newItem(a.fileInfo);if(!a.fileInfo.isDirectory&&(d=c.file))d.fileInfo=a.fileInfo,b.openedFilesDataStore.put(dojo.mixin(d,{modifiedDate:null,savePending:!1,id:m.pathFromFileInfo(d.fileInfo)})),b.onFileOpen(d,!1)}})}},this)},_handleRenameFileResponse:function(a,c){a.forEach(function(a){if(a.messageFaults&&0<a.messageFaults.length)this._setFileRenameState(c.originalFileInfo,
!1),this.onFileMessageFault(a,"Rename");else{var b=this;e.when(c.listFolderComplete,function(a){var c=m.fileInfoFromPath(a.newFilePath);c.path=a.newFilePath;b._onFileRename(a.originalFileInfo,c);return a})}},this)},_onFileRename:function(a,c){h.log("_onFileRenamed called for"+c.path)},_handleDeleteFileResponse:function(a){a.forEach(function(a){this.fileStore.deleteItem(a.fileInfo)},this)},_handleOpenFileResponse:function(a,c){var b=c&&c.showVersionHistory;a.forEach(function(a){if(a.messageFaults&&
0<a.messageFaults.length)this.onFileMessageFault(a,"Open");else this._showIfOpen(a.file.fileInfo,b)||(this.openedFilesDataStore.put(dojo.mixin(a.file,{modifiedDate:null,savePending:!1,id:m.pathFromFileInfo(a.file.fileInfo)})),this.onFileOpen(a.file,b))},this)},_showIfOpen:function(a,c){var b=this._getOpenFile(a);if(b)this.onFileShow(b,c);return void 0!==b},_handleCloseFileResponse:function(a,c){this.onFileClosed(a[0].fileInfo);h.log("File closed:"+a[0].fileInfo.name)},_handleUpdateFileResponse:function(a,
c){a.forEach(function(a){var b=this._getOpenFile(a.fileInfo);b&&(a=c.ModifiedDates[m.pathFromFileInfo(a.fileInfo)],void 0!==this._getModifiedDate(b)&&a.valueOf()===this._getModifiedDate(b).valueOf()&&this._setModifiedDate(b,void 0,!0),c.postSaveWork&&c.postSaveWork(),b=m.pathFromFileInfo(b.fileInfo),this.openedFilesDataStore.get(b).savePending=!1)},this)},_handleMoveFileResponse:function(a,c){a[0]&&a[0].fault&&(this.onMoveFileMessageFault(a[0].fault.faultCode,"Move"),this.onMoveFault())},_handleFileError:function(a){h.error("Error received in FileDataService");
h.dir(a)},_createListFolderRequest:function(){var a=[];this.openedFolders().forEach(function(c){a.push({path:c.path})});this.openedFilesDataStore.query().forEach(function(c){a.push({path:m.pathFromFileInfo(c.fileInfo)})},this);return a},_createUpdateFileRequest:function(a){var c=[];a.ModifiedDates={};var b=this;this.openedFilesDataStore.query().forEach(function(d){if(b.isFileModified(d)&&!d.savePending){var h=m.remoteFile(d);c.push({file:h});d.savePending=!0;b.openedFilesDataStore.put(d);a.ModifiedDates[m.pathFromFileInfo(h.fileInfo)]=
b._getModifiedDate(h)}});return 0===p.getArrayLength(c)?[]:c},_createCloseAllFilesRequest:function(){var a=[];this.openedFilesDataStore.query().forEach(function(c){var b=this.isFileModified(c)&&!c.savePending;a.push({file:m.remoteFile(c),updateFile:b});this._setModifiedDate(c,void 0,!0);this.onFileClose(c.fileInfo)},this);this.openedFilesDataStore.setData([]);return a},_getOpenFile:function(a){m.assertIsFileInfo(a);return this.openedFilesDataStore.get(m.pathFromFileInfo(a))},_getModifiedDate:function(a){if(a=
this.openedFilesDataStore.get(m.pathFromFileInfo(a.fileInfo)))return a.modifiedDate},_setModifiedDate:function(a,c,b){var d=this.openedFilesDataStore.get(m.pathFromFileInfo(a.fileInfo));d&&(d.modifiedDate=c,this.onFileModificationChange(a.fileInfo,b))},onFileMessageFault:function(a,c){},onMoveFileMessageFault:function(a,c){},addFilter:function(a){this.fileStore.addFilter(a)},removeFilter:function(){this.fileStore.removeFilter()},onListFolderMessageFault:function(a,c){},folderExists:function(a){a=
m.pathFromFileInfo(a);var c=!0;this.fileStore.fetch({query:{path:a},onComplete:function(a){0===a.length&&(c=!1)}});return c}})})},"filechooser-ui/FileDataStore":function(){define("dojo/_base/declare dojo/_base/lang dojo/data/util/filter dojo/data/util/simpleFetch mw-log/Log mw-filename-utils/FileNameUtil".split(" "),function(g,f,e,d,b,a){g=g([],{_storeRefPropName:"_S",_loadedPropName:"_loaded",_filePathPropName:"path",_rootId:"ROOT",_rootPath:"/",constructor:function(c){this.fileUtils=a;this.files=
{};this._filesByPath={};f.mixin(this,c);this.newItem({location:"/",name:"",isDirectory:!0});this.filter=null},reset:function(){this._removeChildren(this.files[this._rootId])},getFeatures:function(){return{"dojo.data.api.Read":!0,"dojo.data.api.Write":!0,"dojo.data.api.Identity":!0,"dojo.data.api.Notification":!0}},_fetchItems:function(a,b,d){d=[];var f,g,p={},n,q;if(a.query){n=a.queryOptions?a.queryOptions.ignoreCase:!1;for(f in a.query)a.query.hasOwnProperty(f)&&(g=a.query[f],"string"===typeof g?
p[f]=e.patternToRegExp(g,n):g instanceof RegExp&&(p[f]=g));for(q in this._filesByPath)if(this._filesByPath.hasOwnProperty(q)){n=!0;var r=this._filesByPath[q];if(null===r)n=!1;else for(f in a.query)a.query.hasOwnProperty(f)&&(g=a.query[f],this._containsValue(r,f,g,p[f])||(n=!1));n&&this._filterChildren(r,this.filter)&&d.push(r)}}else for(g in this._filesByPath)this._filesByPath.hasOwnProperty(g)&&(f=this._filesByPath[g],null!==f&&this._filterChildren(f,this.filter)&&d.push(f));b(d,a)},containsValue:function(a,
b,d){var f;"string"===typeof d&&(f=e.patternToRegExp(d,!1));return this._containsValue(a,b,d,f)},_containsValue:function(a,b,d,e){return this.getValues(a,b).some(function(a){if(null!==a&&!f.isObject(a)&&e){if(a.toString().match(e))return!0}else if(d===a)return!0})},getValues:function(a,b){this._assertIsItem(a);this._assertIsAttribute(b);var d=[];Array.isArray(a[b])?d=a[b]:a[b]&&(d=[a[b]]);return d.slice(0)},getValue:function(a,b,d){a=this.getValues(a,b);return 0<a.length?a[0]:d},hasAttribute:function(a,
b){this._assertIsItem(a);this._assertIsAttribute(b);return a.hasOwnProperty(b)},getAttributes:function(a){this._assertIsItem(a);var b=[],d;for(d in a)a.hasOwnProperty(d)&&(d!==this._storeRefPropName&&d!==this._loadedPropName&&d!==this._filePathPropName)&&b.push(d);return b},isItemLoaded:function(a){return this.isItem(a)&&a[this._loadedPropName]},isItem:function(a){return a&&a[this._storeRefPropName]===this&&this._filesByPath[a[this._filePathPropName]]===a},loadItem:function(a){},_assertIsItem:function(a){if(!this.isItem(a))throw Error("MOTW.FileDataStore: Invalid argument, item is not in the store.");
},_assertIsAttribute:function(a){if("string"!==typeof a)throw Error("MOTW.FileDataStore: Invalid attribute argument.");},newItem:function(a){return this._addChild(a)},deleteItem:function(a){return this._removeChild(a)},updateItem:function(a){this.fileUtils.assertIsFileInfo(a);var b,d;b=this.fileUtils.createFilePath(a.location,a.name);if(b=this._filesByPath[b]){for(d in a)a.hasOwnProperty(d)&&(!b[d]||b[d]!==a[d])&&this.setValue(b,d,a[d]);b.parent&&(b.parent[this._loadedPropName]=!0);b.isDirectory||
(b[this._loadedPropName]=!0)}return!1},syncFolder:function(a,b){var d=[],e=[],f,g=this.fileUtils.createFilePath(a.location,a.name),n=this._filesByPath[g];n||(n=this._findCreateParent(g+"/hack"));this.updateItem(a);b=Array.isArray(b)?b:[];n[this._loadedPropName]=!0;for(g=0;g<b.length;g+=1)f=this.fileUtils.createFilePath(b[g].location,b[g].name),this._filesByPath[f]?this.updateItem(b[g]):d.push(b[g]);for(g=0;g<d.length;g+=1)this.newItem(d[g]);for(g=0;g<n._allChildren.length;g+=1){d=!0;for(f=0;f<b.length;f+=
1)if(this.fileUtils.pathFromFileInfo(b[f])===n._allChildren[g][this._filePathPropName]){d=!1;break}d&&e.push(n._allChildren[g])}for(g=0;g<e.length;g+=1)this.deleteItem(e[g])},setValue:function(a,b,d){this.setValues(a,b,d)},setValues:function(a,b,d){var e;this._assertIsItem(a);if(!f.isString(b))throw Error("MOTW.FileDataStore: invalid attribute");e=a[b];null===d?delete a[b]:a[b]=d;if(e!==d)this.onSet(a,b,e,d)},unsetAttribute:function(a,b){this.setValues(a,b,null)},_addChild:function(a){var b,d;if(!f.isObject(a)||
f.isFunction(a)||f.isArray(a)||f.isString(a))throw Error("Can only add objects to a data store.");this.fileUtils.assertIsFileInfo(a);d=this.fileUtils.createFilePath(a.location,a.name);b=this._findCreateParent(d);d===this._rootPath?(this._initNewFile(a,b),this.files[this._rootId]=a):(this._initNewFile(a,b),b._allChildren.push(a),b._allChildren.sort(f.hitch(this,this._sortChildren)));this._filesByPath[a[this._filePathPropName]]=a;this._filterChildren(a.parent,this.filter);if(!a.parent||!this.filter||
this.filter(a))this.onNew(a,{item:a.parent});return a},_removeChild:function(a){this.fileUtils.assertIsFileInfo(a);var b,d,e=!1;a=this.fileUtils.pathFromFileInfo(a);var f=this._filesByPath[a];if(f&&null!==f.parent){d=f.parent;for(a=0;a<d._allChildren.length;a+=1)if(d._allChildren[a][this._filePathPropName]===f[this._filePathPropName]){e=!0;this._removeChildren(f);0===a?d._allChildren.splice(0,1):a===d._allChildren.length-1?d._allChildren.splice(a,1):(b=d._allChildren.splice(a+1,d._allChildren.length),
d._allChildren.splice(a,1),d._allChildren=d._allChildren.concat(b));delete this._filesByPath[f[this._filePathPropName]];break}}if(f&&this._filterChildren(f,this.filter))this.onDelete(f);return e},_removeChildren:function(a){this._assertIsItem(a);a._allChildren&&a._allChildren.forEach(function(a){this._removeChildren(a);delete this._filesByPath[a[this._filePathPropName]];if(!this.filter||this.filter(a))this.onDelete(a)},this);a._allChildren=[];a.children=[];return a},_initNewFile:function(a,b){a[this._storeRefPropName]=
this;a.location=this.fileUtils.normalizeLocation(a.location);a[this._filePathPropName]=this.fileUtils.createFilePath(a.location,a.name);a.parent=b;a.isDirectory&&(a._allChildren=[],a.children=[]);a[this._loadedPropName]=!1;a[this._filePathPropName]===this._rootPath&&(a[this._loadedPropName]=!0,a.pathId=this._rootId)},_findCreateParent:function(a){var b=this.fileUtils.getParentPath(a);if(a===this._rootPath)return null;if(b===this._rootPath)return this.files[this._rootId];if(!a||a.length<this._rootPath.length)throw Error("Invalid parent path '"+
a+"'");this._filesByPath[b]?a=this._filesByPath[b]:(a=this.fileUtils.folderInfoFromPath(b),a.opened=!0,a=this._addChild(a));return a},_sortChildren:function(a,b){var d=a[this._filePathPropName].toLocaleLowerCase(),e=b[this._filePathPropName].toLocaleLowerCase();return d<e?-1:e<d?1:0},getIdentity:function(a){this.fileUtils.assertIsFileInfo(a);return a[this._filePathPropName]},onNew:function(a,b){},onDelete:function(a){},onSet:function(a,b,d,e){},addFilter:function(a){this._updateFilter(a)},removeFilter:function(){this._updateFilter(null)},
_updateFilter:function(a){this._filterChildren(this.files[this._rootId],a);this._updateFilterRecursive(this.files[this._rootId],a);this.filter=a},_updateFilterRecursive:function(a,b,d){var e=!this.filter||this.filter(a),f=!b||b(a);if(e&&!f||d)a._allChildren&&a._allChildren.forEach(function(a){this._updateFilterRecursive(a,b,!0)},this),this.onDelete(a);else{if(!e&&f)this.onNew(a,{item:a.parent});a._allChildren&&a._allChildren.forEach(function(a){this._updateFilterRecursive(a,b)},this)}},_filterChildren:function(a,
b){function d(a){this._filterChildren(a,b)}if(a)return b&&b(a)?a._allChildren&&(a.children=a._allChildren.filter(b),a.children.forEach(d,this)):a._allChildren&&(a.children=a._allChildren,a.children.forEach(d,this)),a}});f.extend(g,d);return g})},"MOTW/mgg/components/DTTitleBar":function(){define(["dojo/_base/declare","dojo/dom-construct","dijit/form/Button","./AbstractComponent"],function(g,f,e,d){return g([d],{_renderComponent:function(b){this.inherited(arguments);this.title?this.title.replaceChild(document.createTextNode(b.title),
this.title.firstChild):(this.title=f.create("span",{"class":"title"},this.domNode,"last"),this.title.appendChild(document.createTextNode(b.title)));if(!this.closeButton){this.closeButton=new e({"class":"closeButton",iconClass:"closeIcon"});this.closeButton.placeAt(this.domNode,"last");var a=this;this.connect(this.closeButton,"onClick",function(){a.dataService.registerHandlerService().getHandler("DTTitleBar").handleEvent(a.componentData.id,{type:"close"})})}}})})},"MOTW/mgg/components/IFrame":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/dom-construct","dojo/on","./AbstractComponent"],function(g,f,e,d,b){return g([b],{constructor:function(){this._clickListener=f.hitch(this,this._onIFrameClick);this._reloadListener=f.hitch(this,this._onIFrameReload)},destroyRecursive:function(){this.inherited(arguments)},_renderComponent:function(a){this.inherited(arguments);var c=a.location;if(!this._isConnector()){var b=c.indexOf("/help");-1<b&&(c="//"+location.hostname+c.substr(b))}this.iframe&&location.protocol+c!==this.iframe.src&&
(this.domNode.removeChild(this.iframe),this.iframe=null);this.iframe||(this._retries=0,this.iframe=e.create("iframe"),e.place(this.iframe,this.domNode,"first"),this.iframe.addEventListener("load",this._reloadListener,!0),this.iframe.src=c);this.iframe.width=a.position.width+"px";this.iframe.height=a.position.height+"px"},_addWindowListeners:function(){try{this.iframe.contentWindow&&this.iframe.contentWindow.document?this.iframe.contentWindow.document.addEventListener("click",this._clickListener,!0):
20>this._retries&&(this._retries+=1,setTimeout(f.hitch(this,this._addWindowListeners),500))}catch(a){if(!this._errored)throw this._errored=!0,a;}},_onIFrameReload:function(){this._addWindowListeners()},_onIFrameClick:function(a){},_isConnector:function(){return"31415"===location.port||-1!==location.hostname.indexOf("ah-")||-1!==location.hostname.indexOf("deb6-64")||-1!==location.hostname.indexOf("maci")}})})},"MOTW/mgg/components/Toolstrip":function(){define("dojo/_base/declare dojo/dom-construct dojo/dom-style dijit/registry ./AbstractComponent MW/uiframework/UIBuilderFactory".split(" "),
function(g,f,e,d,b,a){return g([b],{_getToolstripWidget:function(){!this.toolstripWidget&&(this.div&&this.div.firstChild&&d.getEnclosingWidget(this.div.firstChild))&&(this.toolstripWidget=d.getEnclosingWidget(this.div.firstChild));return this.toolstripWidget},_renderComponent:function(c){this.inherited(arguments);var b=this._getStyle(c);if(this.div&&b.width){e.set(this.domNode,"width",b.width);var d=this._getToolstripWidget();d&&d.resize()}!this.div&&(c.toolstrip_host_id&&c.toolstrip_namespace)&&
(this.hostId=c.toolstrip_host_id,this.namespace=c.toolstrip_namespace,d={},d.id=this.hostId,b.width&&(d.width=b.width),this.div=f.create("div",d,this.domNode,"last"),a.getInstance({channel:this.namespace,isMATLABDriven:!0}))},destroyRecursive:function(){if(this.div){try{a.destroyInstance(this.namespace)}catch(c){}this.div=void 0}this.inherited(arguments)},resize:function(){this.inherited(arguments);var a=this._getToolstripWidget();a&&a.resize()}})})},"MOTW/mgg/table/Table":function(){define("dojo/_base/declare dijit/_TemplatedMixin ./_Keyboard ./_TableBase ./_TableHeaders ./_TableHeaderSelection ./_TableSelection ./_TableColumnWidth ./_PropTypeHandler dojo/text!./Table.html".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return g([d,k,b,h,a,c,e,f],{templateString:l,constructor:function(a){a=a||{};this.componentData=a.widgetData}})})},"MOTW/mgg/table/_Keyboard":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/on"],function(g,f,e){return g([],{KEY_CODE_MAP:{46:127,186:59,187:61,188:44,189:45,190:46,191:47,219:91,220:92,221:93},CODE_KEY_CODE_MAP:{Delete:127,Semicolon:59,Equal:61,NumpadEqual:61,Comma:44,Minus:45,Period:46,Slash:47,BracketLeft:91,Backslash:92,BracketRight:93},
postCreate:function(){this.inherited(arguments);this.domNode.setAttribute("tabindex","-999");this.own(e(this.domNode,"keydown",f.hitch(this,"_onKeyDown")));this.own(e(this.domNode,"keyup",f.hitch(this,"_onKeyUp")))},_onKeyDown:function(d){"text"!==d.target.type&&this.peerNode.dispatchPeerEvent("keyDown",this.peerNode,this._makeKeyEvent(d))},_onKeyUp:function(d){"text"!==d.target.type&&this.peerNode.dispatchPeerEvent("keyUp",this.peerNode,this._makeKeyEvent(d))},_makeKeyEvent:function(d){var b=(d.code?
this.CODE_KEY_CODE_MAP[d.code]:this.KEY_CODE_MAP[d.keyCode])||d.keyCode;return{altKey:d.altKey,ctrlKey:d.ctrlKey,shiftKey:d.shiftKey,metaKey:d.metaKey,key:d.key,keyCode:b,keyChar:d.key&&1===d.key.length?d.key:String.fromCharCode(b),timestamp:Date.now()}}})})},"MOTW/mgg/table/_TableBase":function(){define("dojo/_base/declare dojo/_base/event dojo/_base/lang dojo/_base/window dojo/dom-style dojo/dom-class dojo/dom-geometry dojo/on dojo/has dojo/keys dijit/_WidgetBase mw-browser-utils/BrowserUtils ./_ListBase".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){return g([n,m],{scrollbarWidth:0,headerPadding:2,defaultColumnWidth:75,totalColumnWidth:0,paddingViewColumns:4,toleranceViewCols:2,paddingPagedColumns:30,tolerancePagedCols:15,colView:{start:0,end:0},oldColView:{start:0,end:0},pageDataCols:{},constructor:function(a){this.scrollbarWidth=p.getScrollbarWidth();this.defaultProperties=e.delegate(this.defaultProperties,{columns:[],showCellBorders:!0})},postCreate:function(){this.inherited(arguments);this.own(h(this.dataScrollerNode,
"change",e.hitch(this,"_onDataChange")));this.own(h(this.dataScrollerNode,"keydown",e.hitch(this,"_onCommit")))},setColumnWidth:function(a,c){if(0<=a&&a<this.columns.length&&10<c){var b=e.clone(this.columns);b[a].width=c;this.peerNode.setProperty("columns",b)}},scrollToColumn:function(a){a=Math.max(0,Math.min(a,this.dataModel.getColumnCount()));var b=(this.columns[a]?this.columns[a].width:this.defaultColumnWidth)/2,d;for(d=0;d<a;d+=1)b+=this.columns[d]?this.columns[d].width:this.defaultColumnWidth;
a=c.position(this.dataScrollerNode).w/2;this.dataScrollerNode.scrollLeft=Math.max(0,b-a)},scrollToCell:function(a,c){this.scrollToRow(a);this.scrollToColumn(c)},getColumnSelector:function(a){return"#"+this.id+" .dataBody .cell:nth-child("+(a-this.colView.start+2)+")"},getCellSelector:function(a,c){return this.getRowSelector(a)+" .cell:nth-child("+(c-this.colView.start+2)+")"},_onColumnsSet:function(){this.totalColumnWidth=0;var a;for(a=0;a<this.columns.length;a+=1)this.totalColumnWidth+=this.columns[a]&&
this.columns[a].width||this.defaultColumnWidth;this._renderViewData(!0)},_onShowCellBordersSet:function(){a.toggle(this.domNode,"showCellBorders",this.showCellBorders)},_onDataScroll:function(){this.inherited(arguments)},_onDataChange:function(a){var c=this._getCellFromNode(a.target);if(!(0>c.row||0>c.column)){var b=c.node,d=c.row,c=c.column,h=this.oldViewData[d-this.rowView.start][c-this.colView.start],e=this._getCellType(this.columns[c]);this.cellTypes[e.type].getCellValue&&(a=this.cellTypes[e.type].getCellValue(b.firstChild,
a.target,e,h),void 0!==a&&this.dataModel.changeData(d,c,[[a]]))}},_onCommit:function(a){(k("ie")||k("trident"))&&a.keyCode===l.ENTER&&this._onDataChange(a)},_renderViewData:function(a){if(this.dataModel&&this.position){this._updatePagedData();if(!a&&this.dataModel===this.oldDataModel&&!this.rowView.changed&&!this.colView.changed)return;this._onViewRangeUpdated();var c=this.rowView.start-this.dataModel.getCurrentStartRow();a=this.rowView.end-this.dataModel.getCurrentStartRow();for(var b=this.colView.start-
this.dataModel.getCurrentStartCol(),d=this.colView.end-this.dataModel.getCurrentStartCol(),h=this.dataModel.getPartialData(),e=[];c<a;c+=1)e.push(h[c].slice(b,d));var f=this;this._incrementalUpdateNode({node:this.dataNode,data:e,oldData:this.oldViewData,start:this.rowView.start,end:this.rowView.end,oldStart:this.oldRowView.start,oldEnd:this.oldRowView.end,update:function(a,c,b){f._updateRow(a,c,b,f.colView.start,f.colView.end,f.oldColView.start,f.oldColView.end)},create:function(a){return f._renderRow(a,
f.colView.start,f.colView.end)}});this.oldRowView=this.rowView;this.oldColView=this.colView;this.oldViewData=e;this.oldDataModel=this.dataModel}this._updateDataStyles()},_renderRow:function(a,c,b){var d=document.createElement("div");d.setAttribute("class","row");var h=document.createElement("div");h.setAttribute("class","cell spacer leftSpacer");d.appendChild(h);h=b-c;for(b=0;b<h;b+=1)d.appendChild(this._renderCell(this.columns[b+c],a[b]));a=document.createElement("div");a.setAttribute("class","cell spacer rightSpacer");
d.appendChild(a);return d},_updateRow:function(a,c,b,d,h,e,f){var k=this;this._incrementalUpdateNode({node:a,data:c,oldData:b,start:d,end:h,oldStart:e,oldEnd:f,update:function(a,c,b,d){k._updateCell(a,k.columns[d],c,b)},create:function(a,c){return k._renderCell(k.columns[c],a)}})},_getCellFromNode:function(a){for(var c=null,b=-1,d=-1;a.getAttribute&&"cell"!==a.getAttribute("class")&&a!==this.dataScrollerNode;)a=a.parentNode;if(a.getAttribute&&"cell"===a.getAttribute("class")){c=a;for(d=this.colView.start-
1;a.previousElementSibling;)d+=1,a=a.previousElementSibling;a=a.parentNode;for(b=this.rowView.start-1;a.previousElementSibling;)b+=1,a=a.previousElementSibling}return{node:c,row:b,column:d}},_onViewRangeUpdated:function(a,c,b,d){var h;for(h=this.leftSpaceWidth=0;h<this.colView.start;h+=1)this.leftSpaceWidth+=this.columns[h]&&this.columns[h].width||this.defaultColumnWidth;this.inherited(arguments)},_updatePagedData:function(){var a=this._convertPxToCols(0,this._getScrollLeft()),c=this._convertPxToCols(a,
this.position.width);this.colView=this._updateArrayBounds(a,a+c,this.dataModel.getCurrentStartCol(),this.dataModel.getCurrentEndCol(),this.paddingViewColumns,this.toleranceViewCols,this.oldColView);this.pagedDataCols=this._updateArrayBounds(a,a+c,0,this.dataModel.getColumnCount(),this.paddingPagedColumns,this.tolerancePagedCols,this.oldPagedDataCols);this.inherited(arguments)},_getScrollLeft:function(){return this.dataScrollerNode.scrollLeft},_updateDataStyles:function(){this.inherited(arguments);
this.dataModel&&(this.rowHeight&&this.position)&&(this._updateScrollerStyles(),this.styleManager.updateStyleRules("spacerLeft",{".row .spacer.leftSpacer":"width: "+this.leftSpaceWidth+"px;"}),this.styleManager.updateStyleRules("dataWidth",{".spacer.dataWidth":"width: "+this.totalColumnWidth+"px;"}))},_updateColumnStyles:function(){var a=this.columns.slice(this.colView.start,this.colView.end),c,b={},d;for(c=0;c<a.length;c+=1)d=this._getCellType(a[c]),d=this._getColumnStyles(d),d+="width: "+(a[c]&&
a[c].width||this.defaultColumnWidth)+"px;",b[".dataColumn .cell:nth-child("+(c+2)+")"]=d;this.styleManager.updateStyleRules("columns",b)},_updateScrollerStyles:function(){var c=this.dataModel.getRowCount()*this.rowHeight>=this.position.height,b=this.totalColumnWidth>=this.position.width;a.toggle(this.domNode,"hideVerticalScroll",!c);a.toggle(this.domNode,"hideHorizontalScroll",!b)},_convertPxToCols:function(a,c){var b,d=0;for(b=a;b<this.dataModel.getColumnCount();b+=1)if(d+=this.columns[b]&&this.columns[b].width||
this.defaultColumnWidth,c<=d)return b-a;return b}})})},"MOTW/mgg/table/_ListBase":function(){define("dojo/_base/declare dojo/_base/event dojo/_base/lang dojo/_base/window dojo/dom-style dojo/dom-class dojo/dom-geometry dojo/on dijit/_WidgetBase mw-browser-utils/BrowserUtils mw-style-utils/StyleUtils ./tableCellRenderers".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p){return g([k],{peerNode:null,defaultProperties:{renderer:{type:"default"},rowHeight:18,dataModel:null,visibility:!0},position:{width:0,
height:0},paddingViewRows:10,toleranceViewRows:5,paddingPagedRows:80,tolerancePagedRows:40,pagedDataUpdateDelay:100,leftSpaceWidth:0,viewData:[],oldViewData:[],rowView:{start:0,end:0},oldRowView:{start:0,end:0},pagedDataRows:{start:0,end:0,changed:!1},pagedDataCols:{start:0,end:1,changed:!1},cellTypes:p,constructor:function(a){a=a||{};this.peerNode=a.peerNode;a.id="mgg_"+a.peerNode.getId();this.styleManager=new m.StyleManager("#"+a.id);this.own(this.styleManager)},postCreate:function(){this.inherited(arguments);
this.domNode.id=this.id;l.setClassName(this.domNode,{type:this.peerNode.getType(),name:this.peerNode.getProperty("name")});e.mixin(this,this.defaultProperties);var a=e.delegate(this.defaultProperties,this.peerNode.getProperties()),c;for(c in a)"function"!==typeof a[c]&&this._onPropertySet({target:this.peerNode,data:{key:c,oldValue:null,newValue:a[c]}});this.peerNode.addEventListener("propertySet",this._onPropertySet,this);this.own(h(this.dataScrollerNode,"scroll",e.hitch(this,"_onDataScroll")))},
startup:function(){this.inherited(arguments);this.position||(this.position=c.position(this.domNode),this._renderViewData(!0))},resize:function(){this._noAutoSizing||(this.position=c.position(this.domNode),this._renderViewData(!0))},destroyRecursive:function(){this.peerNode.removeEventListener("propertySet",this._onPropertySet,this);this.inherited(arguments)},scrollToRow:function(a){a=Math.max(0,Math.min(a,this.dataModel.getRowCount()));var b=c.position(this.dataScrollerNode).h/2;this.dataScrollerNode.scrollTop=
Math.max(0,(a+0.5)*this.rowHeight-b)},getRowSelector:function(a){return"#"+this.id+" .dataBody .row:nth-child("+(a-this.rowView.start+2)+")"},_onPropertySet:function(a){var c=a.data.key;this[c]=a.data.newValue;c="_on"+(c.charAt(0).toUpperCase()+c.substring(1,c.length))+"Set";if(this[c]&&void 0!==a.data.newValue&&null!==a.data.newValue)this[c](a.data.newValue,a.data.oldValue)},_onPositionSet:function(a){b.set(this.domNode,{position:"absolute",left:a.x+"px",top:a.y+"px",width:a.width+"px",height:a.height+
"px"});this._noAutoSizing=!0;this._updateDataStyles()},_onBackgroundSet:function(){b.set(this.domNode,{backgroundColor:"rgb("+this.background.join(", ")+")"})},_onBorderTypeSet:function(){this._updateBorderStyles()},_onBorderWidthSet:function(){this._updateBorderStyles()},_onBorderColorSet:function(){this._updateBorderStyles()},_updateBorderStyles:function(){if("LineBorder"===this.borderType){var a={};if(this.borderColor){var c=this.borderColor.map(function(a){return Math.floor(255*a)});a.borderColor=
"rgb("+c.join(",")+")"}this.borderWidth&&(a.borderWidth=this.borderWidth+"px",a.borderStyle="solid");b.set(this.domNode,a)}},_onVisibilitySet:function(){b.set(this.domNode,{display:this.visibility?"":"none"})},_onRendererSet:function(){this._renderViewData(!0)},_onRowHeightSet:function(){this.rowHeight&&12>this.rowHeight&&(this.rowHeight=12);this._updateDataStyles()},_onDataModelSet:function(){!this.oldPagedDataRows&&this.dataModel&&(this.oldPagedDataRows={start:this.dataModel.getCurrentStartRow(),
end:this.dataModel.getCurrentEndRow()});!this.oldPagedDataCols&&this.dataModel&&(this.oldPagedDataCols={start:this.dataModel.getCurrentStartCol(),end:this.dataModel.getCurrentEndCol()});this._renderViewData(!0)},_onDataScroll:function(){this._renderViewData()},_renderViewData:function(a){if(this.dataModel&&this.position){this._updatePagedData();if(!a&&this.dataModel===this.oldDataModel&&!this.rowView.changed)return;this._onViewRangeUpdated();a=this.dataModel.getPartialData().slice(this.rowView.start-
this.dataModel.getCurrentStartRow(),this.rowView.end-this.dataModel.getCurrentStartRow());var c=this;this._incrementalUpdateNode({node:this.dataNode,data:a,oldData:this.oldViewData,start:this.rowView.start,end:this.rowView.end,oldStart:this.oldRowView.start,oldEnd:this.oldRowView.end,update:function(a,b,d){c._updateCell(a,c,b,d)},create:function(a){a=c._renderCell(c,a);a.setAttribute("class","row cell");return a}});this.oldRowView=this.rowView;this.oldViewData=a;this.oldDataModel=this.dataModel}this._updateDataStyles()},
_renderCell:function(a,c){var b=document.createElement("div");b.setAttribute("class","cell");var d=this._getCellType(a),h=this.cellTypes[d.type].create(d,c);b.appendChild(h);this.cellTypes[d.type].startup&&this.cellTypes[d.type].startup(h,a,c,b);return b},_updateCell:function(a,c,b,d){var h=this._getCellType(c),e;if(this.cellTypes[h.type].update){var f=a.firstChild;(e=this.cellTypes[h.type].update(f,h,b))&&e!==f&&a.replaceChild(e,f)}else e=this.cellTypes[h.type].create(h,b),e!==a.firstChild&&a.replaceChild(e,
a.firstChild);this.cellTypes[h.type].startup&&this.cellTypes[h.type].startup(e,c,b,d)},_getCellType:function(a){var c;a&&a.renderer&&"label"===a.renderer.type&&(!a.editor||"text"!==a.editor.type)?c=a.renderer:a&&a.renderer&&a.editor&&a.renderer.type===a.editor.type?c=a.renderer:a&&a.renderer&&"cell"===a.renderer.type?c=a.renderer:a&&a.editor&&a.editor.type&&"default"!==a.editor.type&&this.cellTypes[a.editor.type]?c=a.editor:a&&a.renderer&&a.renderer.type&&this.cellTypes[a.renderer.type]?(c=e.clone(a.renderer),
c.enabled=a.editable&&c.enabled):c={type:"default"};return c},_getCellFromNode:function(a){for(var c,b=-1;(!a.getAttribute("class")||0>a.getAttribute("class").indexOf("cell"))&&a!==this.dataScrollerNode;)a=a.parentNode;if(a.getAttribute("class")&&0<=a.getAttribute("class").indexOf("cell")){c=a;for(b=this.rowView.start-1;a.previousElementSibling;)b+=1,a=a.previousElementSibling}return{node:c,row:b}},_onViewRangeUpdated:function(){},_updatePagedData:function(){var a=Math.floor(this._getScrollTop()/
this.rowHeight),c=Math.floor(this.position.height/this.rowHeight);this.rowView=this._updateArrayBounds(a,a+c,this.dataModel.getCurrentStartRow(),this.dataModel.getCurrentEndRow(),this.paddingViewRows,this.toleranceViewRows,this.oldRowView);this.pagedDataRows=this._updateArrayBounds(a,a+c,0,this.dataModel.getRowCount(),this.paddingPagedRows,this.tolerancePagedRows,{start:this.dataModel.getCurrentStartRow(),end:this.dataModel.getCurrentEndRow()});this._updateLoadingIndicator();this._doPagedDataUpdate()},
_getScrollTop:function(){return this.dataScrollerNode.scrollTop},_updateLoadingIndicator:function(){var c=(this.pagedDataRows.changed||this.pagedDataCols.changed)&&(this.pagedDataRows.start!==this.dataModel.getCurrentStartRow()||this.pagedDataRows.end!==this.dataModel.getCurrentEndRow()||this.pagedDataCols.start!==this.dataModel.getCurrentStartCol()||this.pagedDataCols.end!==this.dataModel.getCurrentEndCol());a.toggle(this.domNode,"dataLoading",c)},_doPagedDataUpdate:function(){if((this.pagedDataRows.changed||
this.pagedDataCols.changed)&&!this._requestUpdateTimeout){var a=this,c=function(){a.oldPagedDataRows=a.pagedDataRows;a.oldPagedDataCols=a.pagedDataCols;a._requestUpdateTimeout=null;a.dataModel.updatePartialData(a.pagedDataRows.start,a.pagedDataRows.end,a.pagedDataCols.start,a.pagedDataCols.end)};0===this.pagedDataUpdateDelay?c():this._requestUpdateTimeout=setTimeout(c,this.pagedDataUpdateDelay)}},_updateArrayBounds:function(a,c,b,d,h,e,f){a=Math.max(a-h,b);c=Math.max(a,Math.min(c+h,d));b=a===b&&a!==
f.start||c===d&&c!==f.end||Math.abs(a-f.start)>e||Math.abs(c-f.end)>e;return{start:b?a:f.start,end:b?c:f.end,changed:b}},_updateDataStyles:function(){this.dataModel&&this.rowHeight&&(this.styleManager.updateStyleRules("spacerTop",{".body .spacer.topSpacer":"height: "+this.rowView.start*this.rowHeight+"px;"}),this.styleManager.updateStyleRules("dataHeight",{".spacer.dataHeight":"height: "+this.dataModel.getRowCount()*this.rowHeight+"px;",".row":"height: "+this.rowHeight+"px;"}),this._updateColumnStyles())},
_updateColumnStyles:function(){var a=this._getCellType(this);this.styleManager.updateStyleRules("columns",{".dataColumn .cell":this._getColumnStyles(a)})},_getColumnStyles:function(a){return this.cellTypes[a.type].getColumnStyles?this.cellTypes[a.type].getColumnStyles(a):""},_incrementalUpdateNode:function(a){for(var c,b=a.node.firstElementChild,d=a.start,h=a.oldStart;null!==b.nextElementSibling&&(d<a.end||h<a.oldEnd);)b=b.nextElementSibling,h===d&&h<a.oldEnd&&d<a.end?(a.update(b,a.data[d-a.start],
a.oldData[h-a.oldStart],d),h+=1,d+=1):(d<h||d>=a.oldEnd)&&d<a.end?(c=a.create(a.data[d-a.start],d),a.node.insertBefore(c,b),b=c,d+=1):h<a.oldEnd&&(c=b.previousElementSibling,a.destroy&&a.destroy(b,h),a.node.removeChild(b),b=c,h+=1)}})})},"MOTW/mgg/table/_TableHeaders":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/dom-class","./tableCellRenderers","../utils/HtmlUtils"],function(g,f,e,d,b){return g([],{oldColumnData:[],oldRowData:[],constructor:function(){this.defaultProperties=f.delegate(this.defaultProperties,
{tableHeader:!1,showRowHeaders:!1,rowHeaderWidth:30,rows:[]})},_onDataScroll:function(){this.inherited(arguments);this.columnHeaderScrollerNode.scrollLeft=this.dataScrollerNode.scrollLeft;this.rowHeaderScrollerNode.scrollTop=this.dataScrollerNode.scrollTop},_onTableHeaderSet:function(a){e.toggle(this.domNode,"hideColumnHeaders",!a);this._updateHeaderStyles()},_onRowsSet:function(){this._renderRowHeader()},_onShowRowHeadersSet:function(a){e.toggle(this.domNode,"hideRowHeaders",!a);this._updateHeaderStyles()},
_onRowHeaderWidthSet:function(){this._updateHeaderStyles()},_onRowHeightSet:function(){this.inherited(arguments);this._updateHeaderStyles()},_onViewRangeUpdated:function(){this.inherited(arguments);this._renderRowHeader();this._renderColumnHeader();this._updateHeaderStyles()},_renderColumnHeader:function(){var a=this.columns.slice(this.colView.start,this.colView.end);if(a.length===this.colView.end-this.colView.start){var c=this;this._incrementalUpdateNode({node:this.columnHeaderNode,data:a,oldData:this.oldColumnData,
start:this.colView.start,end:this.colView.end,oldStart:0,oldEnd:this.oldColumnData.length,update:function(a,b){c._updateColumnNode(a,b)},create:function(a){return c._createColumnNode(a)}});this.oldColumnData=a}},_updateColumnNode:function(a,c){var b="";if(void 0===c.resizable||c.resizable)b="cursor: ew-resize;";d["default"].update(a.firstElementChild.firstChild,{},c.label);a.firstElementChild.nextElementSibling.setAttribute("style",b)},_createColumnNode:function(a){var c=document.createElement("div");
c.setAttribute("class","cell");var h=document.createElement("div");h.setAttribute("class","header cell");var e;e=a.label&&0===a.label.toLowerCase().indexOf("\x3chtml\x3e")&&!b.containsLinks(a.label)?d.html.create({},a.label):d["default"].create({},a.label);h.appendChild(e);e="";if(void 0===a.resizable||a.resizable)e="cursor: ew-resize;";a=document.createElement("div");a.setAttribute("class","drag");a.setAttribute("style",e);e=document.createElement("div");e.setAttribute("class","firstHalfOfDrag");
a.appendChild(e);e=document.createElement("div");e.setAttribute("class","dragBorder");a.appendChild(e);e=document.createElement("div");e.setAttribute("class","secondHalfOfDrag");a.appendChild(e);c.appendChild(h);c.appendChild(a);return c},_renderRowHeader:function(){var a=this.rows.slice(this.rowView.start,this.rowView.end);a.length===this.rowView.end-this.rowView.start&&(this._incrementalUpdateNode({node:this.rowHeaderNode,data:a,oldData:this.oldRowData,start:this.rowView.start,end:this.rowView.end,
oldStart:0,oldEnd:this.oldRowData.length,update:function(a,b,d,e){a.firstElementChild.firstChild.nodeValue=void 0===b?e:b},create:function(a,b){var d=document.createElement("div");d.setAttribute("class","row");var e=document.createElement("div");e.setAttribute("class","cell");e.appendChild(document.createTextNode(void 0===a?b:a));d.appendChild(e);return d}}),this.oldRowData=a)},_updateHeaderStyles:function(){if(this.dataModel){var a=this.showRowHeaders?this.rowHeaderWidth:0,c=this._isVerticalScrollBarShown()?
this.scrollbarWidth:0,b=this._isHorizontalScrollBarShown()?this.scrollbarWidth:0,d=this.showRowHeaders?this.headerPadding:0;this.styleManager.updateStyleRules("rowHeader",{".rowHeaderColumn .row":"width: "+a+"px;",".headerWrapper":"padding-right: "+(a+d+c)+"px; margin-right: "+-(a+d+c)+"px;",".dataBodyWrapper":"padding-right: "+(a+d)+"px; margin-right: "+-(a+d)+"px;"});a=this.tableHeader?this.rowHeight+this.headerPadding:0;this.styleManager.updateStyleRules("rows",{".body":"padding-top: "+a+"px;margin-top: "+
-a+"px;",".body .rowHeadersWrapper":"padding-bottom: "+b+"px;"})}},_isVerticalScrollBarShown:function(){var a=this.tableHeader?this.rowHeight:0;return this.dataModel.getRowCount()*this.rowHeight>=this.position.height-a},_isHorizontalScrollBarShown:function(){return this.totalColumnWidth>=this.position.width-(this.showRowHeaders?this.rowHeaderWidth:0)},_updateScrollerStyles:function(){e.toggle(this.domNode,"hideVerticalScroll",!this._isVerticalScrollBarShown());e.toggle(this.domNode,"hideHorizontalScroll",
!this._isHorizontalScrollBarShown())}})})},"MOTW/mgg/table/_TableHeaderSelection":function(){define(["dojo/_base/declare","dojo/_base/event","dojo/_base/lang","dojo/on"],function(g,f,e,d){var b=this;return g([],{postCreate:function(){this.inherited(arguments);this.own(d(this.columnHeaderNode,"mousedown",e.hitch(this,"_onColumnMouseDown")));this.own(d(this.columnHeaderNode,"click",e.hitch(this,"_onHeaderClick")));this.own(d(this.columnHeaderNode,"dblclick",e.hitch(this,"_onColumnDoubleClick")));this.own(d(this.columnHeaderNode,
"contextmenu",e.hitch(this,"_onColumnRightClick")));this.own(d(this.rowHeaderNode,"mousedown",e.hitch(this,"_onRowMouseDown")));this.own(d(this.rowHeaderNode,"click",e.hitch(this,"_onHeaderClick")));this.own(d(this.rowHeaderNode,"dblclick",e.hitch(this,"_onRowDoubleClick")));this.own(d(this.rowHeaderNode,"contextmenu",e.hitch(this,"_onRowRightClick")))},_onRowRightClick:function(a){b.contextMenuPosition={x:a.pageX,y:a.pageY};var c=this._getCellFromNode(a.target);0<=c.row&&0<=c.column&&(f.stop(a),
this.peerNode.dispatchPeerEvent("rowContextMenu",this.peerNode,{row:c.row}))},_onColumnRightClick:function(a){b.contextMenuPosition={x:a.pageX,y:a.pageY};var c=this._getCellFromNode(a.target);0<=c.row&&0<=c.column&&(f.stop(a),this.peerNode.dispatchPeerEvent("columnContextMenu",this.peerNode,{column:c.column}))},_onRowDoubleClick:function(a){var c=this._getCellFromNode(a.target);0<=c.row&&0<=c.column&&(f.stop(a),this.peerNode.dispatchPeerEvent("rowDoubleClick",this.peerNode,{row:c.row}))},_onColumnDoubleClick:function(a){var c=
this._getCellFromNode(a.target);0<=c.row&&0<=c.column&&(f.stop(a),this.peerNode.dispatchPeerEvent("columnDoubleClick",this.peerNode,{column:c.column}))},_onHeaderClick:function(a){a=a.target;if(0<document.getSelection().rangeCount){for(a=document.getSelection().getRangeAt(0).commonAncestorContainer;a.parentNode&&(!a.getAttribute||"cell"!==a.getAttribute("class"));)a=a.parentNode;(!a||!a.getAttribute||"cell"!==a.getAttribute("class"))&&document.getSelection().removeAllRanges()}},_onRowMouseDown:function(a){var c,
b;if(!("column"===this.selectionType||"single"===this.selectionMode)){var d=this._getCellFromNode(a.target);if(!(0>d.row)){var f=d.row,d=[];if("extended"===this.selectionMode&&(a.ctrlKey||a.metaKey||a.shiftKey))d=e.clone(this.peerNode.getProperty("selectedIndices")),0<d.length&&("row"===this.selectionType&&"number"!==typeof d[0]?d=[]:"cell"===this.selectionType&&!e.isArray(d[0])&&(d=[]));if("none"!==this.selectionType&&"none"!==this.selectionMode)if("cell"===this.selectionType)if(a.shiftKey&&0<d.length){a=
d[d.length-1];d=[];for(c=f;c<=a[0];c+=1)for(b=0;b<=this.dataModel.getColumnCount();b+=1)d.push([c,b]);for(c=f;c>=a[0];c-=1)for(b=0;b<=this.dataModel.getColumnCount();b+=1)d.push([c,b])}else if(a.ctrlKey||a.metaKey)if(a=d.filter(function(a){return a[0]!==f}),a.length===d.length)for(c=0;c<this.dataModel.getColumnCount();c+=1)d.push([f,c]);else d=a;else for(c=0;c<this.dataModel.getColumnCount();c+=1)d.push([f,c]);else if(a.shiftKey&&0<d.length){a=d[d.length-1];d=[];for(c=f;c<=a;c+=1)d.push(c);for(c=
f;c>=a;c-=1)d.push(c)}else a.ctrlKey||a.metaKey?(c=d.indexOf(f),0<=c?d.splice(c,1):d.push(f)):d.push(f);this.peerNode.setProperty("selectedIndices",d)}}},_onColumnMouseDown:function(a){var c,b;if(!("row"===this.selectionType||"single"===this.selectionMode)){var d=this._getCellFromNode(a.target);if(!(0>d.column)){var f=d.column,d=[];if("extended"===this.selectionMode&&(a.ctrlKey||a.metaKey||a.shiftKey))d=e.clone(this.peerNode.getProperty("selectedIndices")),0<d.length&&("column"===this.selectionType&&
"number"!==typeof d[0]?d=[]:"cell"===this.selectionType&&!e.isArray(d[0])&&(d=[]));if("none"!==this.selectionType&&"none"!==this.selectionMode)if("cell"===this.selectionType)if(a.shiftKey&&0<d.length){a=d[d.length-1];d=[];for(c=f;c<=a[1];c+=1)for(b=0;b<=this.dataModel.getRowCount();b+=1)d.push([b,c]);for(c=f;c>=a[1];c-=1)for(b=0;b<=this.dataModel.getRowCount();b+=1)d.push([b,c])}else if(a.ctrlKey||a.metaKey)if(a=d.filter(function(a){return a[1]!==f}),a.length===d.length)for(c=0;c<this.dataModel.getRowCount();c+=
1)d.push([c,f]);else d=a;else for(c=0;c<this.dataModel.getRowCount();c+=1)d.push([c,f]);else if(a.shiftKey&&0<d.length){a=d[d.length-1];d=[];for(c=f;c<=a;c+=1)d.push(c);for(c=f;c>=a;c-=1)d.push(c)}else a.ctrlKey||a.metaKey?(c=d.indexOf(f),0<=c?d.splice(c,1):d.push(f)):d.push(f);this.peerNode.setProperty("selectedIndices",d)}}}})})},"MOTW/mgg/table/_TableSelection":function(){define(["dojo/_base/declare","dojo/_base/event","dojo/_base/lang","dojo/on"],function(g,f,e,d){var b=this;return g([],{constructor:function(){this.defaultProperties=
e.delegate(this.defaultProperties,{selectionType:"row",selectionMode:"none",selectedIndices:[]})},postCreate:function(){this.inherited(arguments);this.own(d(this.dataScrollerNode,"mousedown",e.hitch(this,"_onDataMouseDown")));this.own(d(this.dataScrollerNode,"click",e.hitch(this,"_onDataClick")));this.own(d(this.dataScrollerNode,"dblclick",e.hitch(this,"_onDataDoubleClick")));this.own(d(this.dataScrollerNode,"contextmenu",e.hitch(this,"_onRightClick")))},selectCell:function(a,c){var b=e.clone(this.selectedIndices);
switch(this.selectionType){case "cell":b.push([a,c]);break;case "row":b.push(a);break;case "column":b.push(c)}this.peerNode.setProperty("selectedIndices",b)},deselectCell:function(a,c){var b=e.clone(this.selectedIndices);switch(this.selectionType){case "cell":b=b.filter(function(b){return b[0]!==a||b[1]!==c});break;case "row":b=b.filter(function(c){return c!==a});break;case "column":b=b.filter(function(a){return a!==c})}this.peerNode.setProperty("selectedIndices",b)},selectRow:function(a){var c,b=
e.clone(this.selectedIndices);switch(this.selectionType){case "cell":for(c=0;c<this.dataModel.getColumnCount();c+=1)b.push([a,c]);break;case "row":b.push(a)}this.peerNode.setProperty("selectedIndices",b)},deselectRow:function(a){var c=e.clone(this.selectedIndices);switch(this.selectionType){case "cell":c=c.filter(function(c){return c[0]!==a});break;case "row":c=c.filter(function(c){return c!==a})}this.peerNode.setProperty("selectedIndices",c)},selectColumn:function(a){var c,b=e.clone(this.selectedIndices);
switch(this.selectionType){case "cell":for(c=0;c<this.dataModel.getRowCount();c+=1)b.push([c,a]);break;case "column":b.push(a)}this.peerNode.setProperty("selectedIndices",b)},deselectColumn:function(a){var c=e.clone(this.selectedIndices);switch(this.selectionType){case "cell":c=c.filter(function(c){return c[1]!==a});break;case "column":c=c.filter(function(c){return c!==a})}this.peerNode.setProperty("selectedIndices",c)},isCellSelected:function(a,c){switch(this.selectionType){case "cell":return this.selectedIndices.some(function(b){return b[0]===
a&&b[1]===c});case "row":return this.selectedIndices.some(function(c){return c===a});case "column":return this.selectedIndices.some(function(a){return a===c});default:return!1}},isRowSelected:function(a){function c(c){return function(b){return b[0]===a&&b[1]===c}}switch(this.selectionType){case "cell":var b,d=a<this.dataModel.getRowCount();for(b=0;b<this.dataModel.getColumnCount();b+=1)d=d&&this.selectedIndices.some(c(b));return d;case "row":return this.selectedIndices.some(function(c){return c===
a});default:return!1}},isColumnSelected:function(a){function c(c){return function(b){return b[0]===c&&b[1]===a}}switch(this.selectionType){case "cell":var b,d=a<this.dataModel.getColumnCount();for(b=0;b<this.dataModel.getRowCount();b+=1)d=d&&this.selectedIndices.some(c(b));return d;case "row":return this.selectedIndices.some(function(a){return a===b});default:return!1}},_onRightClick:function(a){b.contextMenuPosition={x:a.pageX,y:a.pageY};var c=this._getCellFromNode(a.target);0<=c.row&&0<=c.column?
(f.stop(a),this.peerNode.dispatchPeerEvent("contextMenu",this.peerNode,{row:c.row,column:c.column})):(f.stop(a),this.peerNode.dispatchPeerEvent("contextMenu",this.peerNode,{}))},_onDataDoubleClick:function(a){var c=this._getCellFromNode(a.target);0<=c.row&&(f.stop(a),this.peerNode.dispatchPeerEvent("doubleClick",this.peerNode,{row:c.row,column:c.column}))},_onSelectionTypeSet:function(){this._renderSelection()},_onSelectionModeSet:function(){this._renderSelection()},_onSelectedIndicesSet:function(){this._renderSelection()},
_onViewRangeUpdated:function(){this.inherited(arguments);this._renderSelection()},_onDataClick:function(a){var c=a.target;if(0<document.getSelection().rangeCount){for(c=document.getSelection().getRangeAt(0).commonAncestorContainer;c.parentNode&&(!c.getAttribute||"cell"!==c.getAttribute("class"));)c=c.parentNode;(!c||!c.getAttribute||"cell"!==c.getAttribute("class"))&&document.getSelection().removeAllRanges()}"none"===this.selectionType&&(a=this._getCellFromNode(a.target),0<=a.row&&0<=a.column&&this.peerNode.dispatchPeerEvent("click",
this.peerNode,{row:a.row,column:a.column}))},_onDataMouseDown:function(a){var c,b,d=this._getCellFromNode(a.target);if(!(0>d.row||0>d.column)){var f=d.row,g=d.column,d=[];if("extended"===this.selectionMode&&(a.ctrlKey||a.metaKey||a.shiftKey))d=e.clone(this.selectedIndices),0<d.length&&(("row"===this.selectionType||"column"===this.selectionType)&&"number"!==typeof d[0]?d=[]:"cell"===this.selectionType&&!e.isArray(d[0])&&(d=[]));if("none"!==this.selectionType&&"none"!==this.selectionMode)if("cell"===
this.selectionType)if(a.shiftKey&&0<d.length){a=d[d.length-1];d=[];for(c=f;c<=a[0];c+=1){for(b=g;b<=a[1];b+=1)d.push([c,b]);for(b=g;b>=a[1];b-=1)d.push([c,b])}for(c=f;c>=a[0];c-=1){for(b=g;b<=a[1];b+=1)d.push([c,b]);for(b=g;b>=a[1];b-=1)d.push([c,b])}}else a.ctrlKey||a.metaKey?(a=d.filter(function(a){return a[0]!==f||a[1]!==g}),a.length===d.length?d.push([f,g]):d=a):d.push([f,g]);else if(b="row"===this.selectionType?f:g,a.shiftKey&&0<d.length){a=d[d.length-1];d=[];for(c=b;c<=a;c+=1)d.push(c);for(c=
b;c>=a;c-=1)d.push(c)}else a.ctrlKey||a.metaKey?(c=d.indexOf(b),0<=c?d.splice(c,1):d.push(b)):d.push(b);this.peerNode.setProperty("selectedIndices",d)}},_renderSelection:function(){var a={};"none"!==this.selectionMode&&("row"===this.selectionType?this.selectedIndices.forEach(function(c){c>=this.rowView.start&&c<this.rowView.end&&(a[".dataBody .row:nth-child("+(c-this.rowView.start+2)+")"]="background-color: rgb(173, 206, 255);")},this):"column"===this.selectionType?this.selectedIndices.forEach(function(c){c>=
this.colView.start&&c<this.colView.end&&(a[".dataBody .row .cell:nth-child("+(c-this.colView.start+2)+")"]="background-color: rgb(173, 206, 255);")},this):"cell"===this.selectionType&&this.selectedIndices.forEach(function(c){c[0]>=this.rowView.start&&(c[0]<this.rowView.end&&c[1]>=this.colView.start&&c[1]<this.colView.end)&&(a[".dataBody .row:nth-child("+(c[0]-this.rowView.start+2)+") .cell:nth-child("+(c[1]-this.colView.start+2)+")"]="background-color: rgb(173, 206, 255);")},this));this.styleManager.updateStyleRules("selection",
a)}})})},"MOTW/mgg/table/_TableColumnWidth":function(){define("dojo/_base/declare dojo/_base/event dojo/_base/lang dojo/on dojo/dom-geometry dojo/dom-style".split(" "),function(g,f,e,d,b,a){return g([],{postCreate:function(){this.inherited(arguments);this.own(d(this.columnHeaderNode,"mousedown",e.hitch(this,"_onColumnResizeMouseDown")))},_onColumnResizeMouseDown:function(a){if(a.target.getAttribute&&(-1!==a.target.getAttribute("class").indexOf("drag")||-1!==a.target.getAttribute("class").indexOf("firstHalfOfDrag")||
-1!==a.target.getAttribute("class").indexOf("secondHalfOfDrag")||-1!==a.target.getAttribute("class").indexOf("dragBorder"))){f.stop(a);var h=this._getCellFromNode(a.target).column,k=this.columns[h];if(k&&(void 0===k.resizable||k.resizable))this._tablePos=b.position(this.columnResizerNode.parentNode),this._resizingColumn=h,this._originalResizeWidth=k.width||0,this._minResizeWidth=k.minWidth?k.minWidth:10,this._maxResizeWidth=k.maxWidth?k.maxWidth:1E3,this._splitterNode=a.target,"drag"===a.target.getAttribute("class")&&
(this._splitterNode=a.target.firstChild.nextSibling),"firstHalfOfDrag"===a.target.getAttribute("class")&&(this._splitterNode=a.target.nextSibling),"secondHalfOfDrag"===a.target.getAttribute("class")&&(this._splitterNode=a.target.previousSibling),this._originalSplitterPos=b.position(this._splitterNode),this._updateColumnResizerNode(this._originalSplitterPos.x),this._mouseMoveListener=d(document,"mousemove",e.hitch(this,"_onColumnMouseMove")),this._mouseUpListener=d(document,"mouseup",e.hitch(this,
"_onColumnMouseUp")),document.addEventListener("selectstart",f.stop,!0)}},_onColumnMouseMove:function(a){this._updateColumnResizerNode(a.pageX);f.stop(a)},_onColumnMouseUp:function(c){f.stop(c);c=c.pageX-this._originalSplitterPos.x+this._originalResizeWidth;c=Math.min(Math.max(this._minResizeWidth,c),this._maxResizeWidth);var b=e.clone(this.columns);b[this._resizingColumn].width=c;this.peerNode.setProperty("columns",b);a.set(this.columnResizerNode,{display:"none"});this._mouseMoveListener.remove();
this._mouseUpListener.remove();document.removeEventListener("selectstart",f.stop,!0)},_updateColumnResizerNode:function(c){c=c-this._originalSplitterPos.x+this._originalResizeWidth;c=Math.min(Math.max(this._minResizeWidth,c),this._maxResizeWidth);a.set(this.columnResizerNode,{display:"inherit",left:this._originalSplitterPos.x-this._tablePos.x+c-this._originalResizeWidth+"px"})}})})},"MOTW/mgg/table/_PropTypeHandler":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/on"],function(g,f,
e){return g([],{postCreate:function(){this.inherited(arguments);this.own(e(this.dataScrollerNode,e.selector("button","click"),f.hitch(this,"_onCellButtonClick")))},_onCellButtonClick:function(d){var b=this._getCellFromNode(d.target);0<=b.row&&0<=b.column&&this.peerNode.dispatchPeerEvent("cellEvent",this.peerNode,{cellEventType:"buttonClick",row:b.row,column:b.column,buttonClass:d.target.getAttribute("class")})}})})},"MOTW/mgg/table/List":function(){define("dojo/_base/declare dijit/_TemplatedMixin ./_Keyboard ./_ListBase ./_TableSelection dojo/text!./List.html".split(" "),
function(g,f,e,d,b,a){return g([d,b,e,f],{templateString:a,constructor:function(a){a=a||{};this.componentData=a.widgetData}})})},"MOTW/mgg/buttons/ToggleButton":function(){define("dojo/_base/declare dojo/dom-style dojo/dom-class dojo/dom-construct dijit/form/ToggleButton ./_CheckedButton ./AbstractButton".split(" "),function(g,f,e,d,b,a,c){return g([c,a],{_createButtonWidget:function(a,c){var d;return d=new b({checked:a.selected||!1,name:a.group,label:a.text||"",disabled:!a.enabled,iconClass:"",onChange:function(){c.registerHandlerService().getHandler("ToggleButton").setProperties(a.id,
{selected:!!d.checked})}})}})})},"MOTW/mgg/buttons/_CheckedButton":function(){define(["dojo/_base/declare"],function(g){return g([],{_updateButton:function(f){this.inherited(arguments);this.button.set("checked",!!f.selected)}})})},"MOTW/mgg/buttons/CheckBox":function(){define("dojo/_base/declare dojo/dom-style dojo/dom-construct dojo/has dijit/form/CheckBox mw-style-utils/StyleUtils ./_CheckedButton ./_LabeledButton ./AbstractButton".split(" "),function(g,f,e,d,b,a,c,h,k){return g([k,h,c],{_createOrUpdateIcon:function(){},
_createButtonWidget:function(c,d){var h;h=new b({checked:c.selected||!1,disabled:!c.enabled,name:"checkBox_"+c.id,id:"MW_mgg_checkBox_"+c.id,onChange:function(){d.registerHandlerService().getHandler("CheckBox").setProperties(c.id,{selected:!!h.get("checked")})}});this._styleManager=a.StyleManager("#mgg_"+c.id);this.own(this._styleManager);return h},_updateButton:function(a){this.inherited(arguments);var c={};this.button.label&&(e.destroy(this.button.label),delete this.button.label);if(a.icons&&a.icons.icon instanceof
Image){this.button.label=e.create("label",{"for":this.button.id,"class":"mgg_checkbox_style"},this.button.domNode);c[".dijitCheckBox input"]="display: none;";c[".dijitCheckBox input + label"]="display: inline-block; width: 100% !important; height: 100%; vertical-align: top; background: url("+a.icons.icon.src+");";c[".dijitCheckBox"]="width: "+a.icons.icon.width+"px; height: "+a.icons.icon.height+"px;";if(0===a.icons.icon.width||0===a.icons.icon.height){var b=this;a.icons.icon.onload=function(){b.update()}}a.icons.selected instanceof
Image&&(c[".dijitCheckBox input:checked + label"]="background: url("+a.icons.selected.src+");");f.set(this.button.domNode,{"background-image":"none"})}this._styleManager.updateStyleRules("icon",c)},_getStyle:function(a){var c=this.inherited(arguments);(d("ie")||d("trident")||d("edge"))&&delete c.width;"splitter_control"===a.name&&delete c.pointerEvents;return c}})})},"MOTW/mgg/buttons/_LabeledButton":function(){define(["dojo/_base/declare","dojo/dom-style","dojo/dom-construct","../utils/TextUtils"],
function(g,f,e,d){return g([],{destroyRecursive:function(){this.inherited(arguments)},_createButton:function(b,a){this.inherited(arguments);this._centeringHelper=e.create("span",{"class":"iconCenteringHelper"},this.domNode,"first");this.label=e.create("label",{"for":this.button.id,"class":"mgg_button_label"},this.domNode);this.label.appendChild(document.createTextNode(b.text||""));this._lastLabelText=b.text||"";this.connect(this.label,"onclick",this.button.onClick);var c=d.getTextStyle(b);f.set(this.label,
c)},_updateButton:function(b){this.inherited(arguments);this._lastLabelText!==b.text&&(this.label.replaceChild(document.createTextNode(b.text||""),this.label.firstChild),this._lastLabelText=b.text||"");var a=d.getTextStyle(b);f.set(this.label,a)}})})},"MOTW/mgg/buttons/CheckBoxSplitterButton":function(){define(["dojo/_base/declare","mw-style-utils/StyleUtils","dijit/form/CheckBox","./CheckBox"],function(g,f,e,d){return g([d],{_createButtonWidget:function(b,a){var c;c=new e({checked:b.selected||!1,
disabled:!b.enabled,name:"checkBox_"+b.id,id:"MW_mgg_checkBox_"+b.id,onClick:function(){a.registerHandlerService().getHandler("CheckBoxSplitterButton").handleEvent(b.id,{type:"buttonClicked"})}});this._styleManager=f.StyleManager("#mgg_"+b.id);this.own(this._styleManager);return c}})})},"MOTW/mgg/buttons/RadioButton":function(){define("dojo/_base/declare dojo/dom-style dojo/dom-construct dijit/form/RadioButton ./_CheckedButton ./_LabeledButton ./AbstractButton".split(" "),function(g,f,e,d,b,a,c){return g([c,
a,b],{_createButtonWidget:function(a,c){var b;return b=new d({checked:a.selected||!1,disabled:!a.enabled,name:a.group||void 0,id:"MW_mgg_radio_button_"+a.id,onClick:function(){c.registerHandlerService().getHandler("RadioButton").setProperties(a.id,{selected:b.checked})}})}})})},"MOTW/mgg/buttons/DropdownButton":function(){define(["dojo/_base/declare","dojo/dom-construct","dijit/DropDownMenu","dijit/form/DropDownButton","./AbstractButton"],function(g,f,e,d,b){return g([b],{destroyRecursive:function(){this.button&&
(this.button.dropDown&&this.button.dropDown.destroyRecursive)&&this.button.dropDown.destroyRecursive();this._child&&this._child.destroyRecursive&&this._child.destroyRecursive();this.inherited(arguments)},addChild:function(a){this.button&&(this._child=a,this.button.dropDown=a.popup)},removeChild:function(a){this.button&&(this._child=null,this.button.dropDown=null)},_createButtonWidget:function(a,c){var b={label:a.text,name:a.group,iconClass:"",autoWidth:!1};"DropdownButton"===a.swingType&&(b.onClick=
function(){c.registerHandlerService().getHandler("DropdownButton").handleEvent(a.id,{type:"buttonClicked"})});return new d(b)},_getStyle:function(a){var c=this.inherited(arguments);delete c.backgroundColor;void 0!==a.visibility&&!a.visibility&&(c.display="none");return c}})})},"MOTW/mgg/buttons/ScrollStripButton":function(){define("dojo/_base/declare dojo/dom-style dojo/dom-class dojo/dom-construct dijit/form/Button ./AbstractButton".split(" "),function(g,f,e,d,b,a){return g([a],{_createButtonWidget:function(a,
d){return new b({checked:a.selected||!1,name:a.group,label:a.text||"",disabled:!a.enabled,iconClass:"",onMouseOver:function(){d.registerHandlerService().getHandler("ScrollStripButton").handleEvent(a.id,{type:"mouseEntered"})},onMouseOut:function(){d.registerHandlerService().getHandler("ScrollStripButton").handleEvent(a.id,{type:"mouseExited"})}})},_getStyle:function(a){var b=this.inherited(arguments);delete b.backgroundColor;return b}})})},"MOTW/mgg/MggFeature":function(){define(["dojo/_base/declare",
"MW/motw/feature/Feature","mw-messageservice/MessageService","MOTW/mgg/GUIDataService","MOTW/mgg/GUIManager"],function(g,f,e,d,b){return g([f],{constructor:function(a,c){this.executionService=c.executionService;this.wraService=c.wraService;this.figureService=c.figureService;this.layoutService=c.layoutService},enableFeature:function(){var a=this;if(!this.mggOn){a.messageService=e;if(!a.mggGuiDataService||!a.mggGuiManager)a.mggGuiDataService=new d({figureService:a.figureService}),a.mggGuiManager=new b({guiDataService:a.mggGuiDataService,
layoutService:a.layoutService});a.figureManager.stop();a.figureService.setSkipImages(!0);a.figureService.startFlushTimer=function(){this.flush()};a.messageService.start();var c=a.wraService.getCurrentState();("computeResourceReady"===c||"savingSession"===c||"postLoginTasks"===c)&&a.executionService.executionEval({matlabCode:"mls.internal.feature('graphicsAndGuis', 'on');",callback:function(){a.mggGuiDataService.start()}})}},disableFeature:function(){if(!this.mggOn){var a=this.wraService.getCurrentState();
("computeResourceReady"===a||"postLoginTasks"===a)&&this.executionService.executionEval("mls.internal.feature('graphicsAndGuis', 'off');");this.mggGuiDataService&&this.messageService&&(this.mggGuiDataService.stop(),this.messageService.stop());delete this.figureService.startFlushTimer;this.figureService.setSkipImages(!1);this.figureService.refresh();this.figureManager.start()}}})})},"MOTW/mgg/MggPanesFeature":function(){define(["dojo/_base/declare","MW/motw/feature/Feature","./Root"],function(g,f,
e){return g([f],{enableFeature:function(){e.usePanes=!0},disableFeature:function(){e.usePanes=!1}})})},"MOTW/mgg/MggPopupFeature":function(){define(["dojo/_base/declare","MW/motw/feature/Feature","./Root"],function(g,f,e){return g([f],{enableFeature:function(){e.usePopups=!0},disableFeature:function(){e.usePopups=!1}})})},"MOTW/mgg/MggToggleDockFeature":function(){define(["dojo/_base/declare","MW/motw/feature/Feature","./containers/GUIContainer"],function(g,f,e){return g([f],{enableFeature:function(){e.enableToggleDock=
!0},disableFeature:function(){e.enableToggleDock=!1}})})},"MOTW/mgg/MggLazyLoadFeature":function(){define(["dojo/_base/declare","MW/motw/feature/Feature","./Root"],function(g,f,e){return g([f],{constructor:function(d,b){this.executionService=b.executionService},enableFeature:function(){e.lazyLoadEnabled=!0;this.executionService.executionEval("com.mathworks.matlabserver.jcp.handlers.RootHandler.enableLazyLoad(true);",this.executionService.streamingEval)},disableFeature:function(){e.lazyLoadEnabled=
!1;this.executionService.executionEval("com.mathworks.matlabserver.jcp.handlers.RootHandler.enableLazyLoad(false);",this.executionService.streamingEval)}})})},"MOTW/toolstrip/managers/LegacyFigureControlsManager":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/query dijit/_base/manager MW/uiframework/UIBuilderFactory mw-log/Log".split(" "),function(g,f,e,d,b,a,c){return g(null,{constructor:function(b){b=b||{};c.assert(b.mggGuiDataService,"mggGuiDataService needs to be provided!");
this.mggGuiDataService=b.mggGuiDataService;this.uiBuilder=a.getInstance();this._toolbarMap={};this._menubarMap={};this._aspects=[];this._aspects.push(e.after(this.mggGuiDataService.registerHandlerService().getHandler("root"),"onSelectedChildChanged",f.hitch(this,this.swapMenubarAndToolbars)))},swapMenubarAndToolbars:function(){var a,c;c=this.getCurrentlySelectedGuiContainerId();this.mggGuiDataService.guiDataStore.fetch({query:{id:c},onItem:function(c){a=c}});a&&a.docked&&(this.removeMenubarAndToolbars(),
this.addMenubarAndToolbars())},addMenubarAndToolbars:function(){var a=this.getCurrentlySelectedGuiContainerId(),c,b;a&&(this._menubarMap[a]&&this._menubarMap[a])&&(c=this._getMenubarWrapperWidget(),b=this._getToolbarWrapperWidget(),c&&this._menubarMap[a].forEach(function(a){c.addChild(a)},this),this._toolbarMap[a]&&b&&this._toolbarMap[a].forEach(function(a){b.addChild(a)},this))},removeMenubarAndToolbars:function(){var a=this,c,e;c=this._getMenubarWrapperWidget();e=this._getToolbarWrapperWidget();
c&&c.getChildren().forEach(function(a){c.removeChild(a);a.getChildren().forEach(function(a){this.setHoveringAndActiveStateToFalse(a)},this)},this);e&&e.getChildren().forEach(function(c){e.removeChild(c);d(".dijitButtonNode",c.domNode).forEach(function(c){a.setHoveringAndActiveStateToFalse(b.getEnclosingWidget(c))})},this)},setHoveringAndActiveStateToFalse:function(a){a._set("hovering",!1);a._set("active",!1)},addWidgetToMap:function(a,c){var b=this.getMapForWidget(a);b[c]?b[c].push(a):b[c]=[a]},removeWidgetFromMap:function(a){var c=
this.getMapForWidget(a),b;Object.keys(c).forEach(function(d){b=c[d].indexOf(a);-1<b&&c[d].splice(b,1)})},getMapForWidget:function(a){var c;"ToolBar"===a.componentData.type?c=this._toolbarMap:"MenuBar"===a.componentData.type&&(c=this._menubarMap);return c},getWrapperForWidget:function(a){var c;"ToolBar"===a.componentData.type?c=this._getToolbarWrapperWidget():"MenuBar"===a.componentData.type&&(c=this._getMenubarWrapperWidget());return c},addWidgetToWrapperInToolstrip:function(a){var c,b,d,e=!1;c=this.getMapForWidget(a);
if(b=this.getWrapperForWidget(a)){d=this.findAncestorGuiContainer(a.componentData);var f=b.getChildren();0<f.length&&(e=!c[d.id].some(function(a){return f[0].componentData.id===a.componentData.id},this));e&&f.forEach(function(a){b.removeChild(a)});b.addChild(a);this.swapMenubarAndToolbars()}},findAncestorGuiContainer:function(a){var b,d=a;for(b=0;d&&"GUIContainer"!==d.type&&100>b;b+=1)d=this.mggGuiDataService.guiDataStore.items[d.parentId];100===b&&(d=void 0,c.error("Unable to find parent GUIContainer, max depth reached.",
a));return d},getCurrentlySelectedGuiContainerId:function(){var a;this.mggGuiDataService.guiDataStore.fetch({query:{type:"root"},onItem:function(c){a=c.selectedChild}});return a},_getMenubarWrapperWidget:function(){return this.uiBuilder.widgetByTag("motwToolstrip.figureTab.menuAndToolbars.menubarWrapper")},_getToolbarWrapperWidget:function(){return this.uiBuilder.widgetByTag("motwToolstrip.figureTab.menuAndToolbars.toolbarWrapper")},destroy:function(){this._aspects.forEach(function(a){a.remove()})}})})},
"MOTW/toolstrip/configs/figure/FigureTabGroupConfig":function(){define(["MW/toolstrip/constants/TypeConstants","dojo/i18n!MOTW/l10n/nls/motw"],function(g,f){return{tag:"motwToolstrip.figureTabGroup",type:g.TAB_GROUP,children:[{tag:"motwToolstrip.figureTab",type:g.TAB,mnemonic:"G",title:f.figureTabTitle,global:!1,children:[{tag:"motwToolstrip.figureTab.menuAndToolbars",type:g.SECTION,title:f.menuAndToolbarsSectionTitle,children:[{tag:"motwToolstrip.figureTab.menuAndToolbars.column1",type:g.COLUMN,
children:[{tag:"motwToolstrip.figureTab.menuAndToolbars.menubarWrapper",type:g.MENUBAR_WRAPPER},{tag:"motwToolstrip.figureTab.menuAndToolbars.toolbarWrapper",type:g.TOOLBAR_WRAPPER}]}]}]}]}})},"academyinteractions/modules/academyOverrides/index":function(){define("dojo/Deferred dojo/_base/lang dojo/query MOTW/cmd/CommandWindowModule mw-remote/Remote dijit/layout/ContentPane MOTW/motw/ActionIdConstants MOTW/toolstrip/qab/QABContextualControls MW/uiframework/uicontainer/ChildProperties MOTW/motw/CoreActions MOTW/motw/MotwApp academyinteractions/rtc/AcademyCommandWindowModule".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p){return{initialize:function(a){var d=new g;a.contextManager.register("QuickAccessAction",{appId:"commandWindow",contextId:"global",quickAccessControlTag:h.REDO,actionId:c.REDO_CMD});a.PreferenceSettingsService.on("settingchanged",function(a){"NumericFormat"===a.settingKey&&b.sendMessage({FEval:{"function":"format",arguments:[a.newValue],nargout:0,priority:1}},{},"FormatValue");"NumericDisplay"===a.settingKey&&b.sendMessage({FEval:{"function":"format",arguments:[a.newValue],
nargout:0,priority:1}},{},"DisplayValue");"EightyColumns"===a.settingKey&&b.sendMessage({FEval:{"function":"feature",arguments:["EightyColumns",a.newValue],nargout:0,priority:1}},{},"matrixDisplayValue")});var e=new p({actionService:a.actionService,executionService:a.executionService});l.setService([{commandWindow:e}]);m.commandWindow=e;this._addPanel({commandWindow:e,featureService:a.featureService,uiContainer:a.uiContainer});a.workerReady.then(f.hitch(this,"_start",{commandWindow:e}));d.resolve({exports:{commandWindow:e}});
return d.promise},_start:function(a){e("textarea",a.commandWindow.domNode)[0].focus()},_addPanel:function(b){var d={};d[h.UNDO]=c.UNDO_CMD;d[h.REDO]=c.REDO_CMD;var e=new a({id:"commandWindowWrapper",content:b.commandWindow});e.focus=function(){b.commandWindow.focus()};e.onFocus=function(){return b.commandWindow.onFocus()};e.onBlur=function(){return b.commandWindow.onBlur()};b.commandWindow.wrapper=e;b.uiContainer.addPanel(e,new k({panelId:"commandWindow",title:"Command Window",closable:!1,qabControlToActionMap:d}))}}})},
"MOTW/cmd/CommandWindowModule":function(){define("dijit/_WidgetBase dijit/_FocusMixin dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/_base/declare dojo/text!./view/commandWindow2.html MOTW/cmd/PluginRegistry mw-actiondataservice/ActionDataService MW/rtc/clipboardservice/ClipboardService MW/rtc/RichTextComponent".split(" "),function(g,f,e,d,b,a,c,h,k,l){return b([g,f,e,d],{templateString:a,widgetsInTemplate:!0,constructor:function(a){this._motwActionService=a.actionService;this._executionService=
a.executionService;this._commandWindowInitializer={onInitialize:function(){},onReset:function(){}}},postCreate:function(){this._commandWindowPane=this.cmdEditorWindow.parentNode;this._commandWindowPane.onResize=function(){};this._rtcInstance=this._initializeEditor()},_initializeEditor:function(){var a={};a["cw.initializer"]=this._commandWindowInitializer;a["cw.commandwindowpane"]=this._commandWindowPane;a["rtc.clipboard"]=k.getBrowserSyncedClipboard();a["rtc.executionservice"]=this._executionService;
a["rtc.motwactionservice"]=this._motwActionService;return new l({"class":"rtePaneFixedSize",id:"internal_"+this.id,registry:c.plugins,dependencies:a,features:{fixedSize:!0,enabled:"rtc.code.parenmatch rtc.contextualselection.evaluateselection rtc.contextualselection.openselection rtc.findandreplace rtc.serializers.serialize rtc.richtext rtc.richtext.lists rtc.richtext.hyperlink rtc.richtext.equations rtc.richtext.images rtc.code.syntaxhighlighter rtc.cutcopypaste commandwindow.output commandwindow.prompt cw.core.promptinput cw.core.commandwindowhistory rtc.code.codingui cw.commands.clearcommandwindow cw.commands.homecommand cw.commands.exitmatlab cw.commands.pausematlab cw.commandhistorynavigation cw.commandwindowstatehandler cw.executionhandler cw.gettingstartedbanner cw.keyhandler cw.matlabtokenshandler cw.promptinputhandler cw.view.commandwindowview cw.undoredocontroller cw.wraplines cw.interruptcommandwindow contextmenu rtc.helponselection".split(" "),
disabled:"margin.linenumberdecorator rtc.navigate.replace rtc.code.comment rtc.richtext.matlabjsonmimeconverter rtc.richtext.images.imagemimeconverter rtc.richtext.images.htmlhandler rtc.cutcopypaste.internalserializationgenerator rtc.indent rtc.richtext.latexeditor rtc.richtext.hyperlinkeditor rtc.richtext.equationeditor rtc.richtext.toggleshortcuts".split(" ")}},this.cmdEditorWindow)},startup:function(){this._rtcInstance.startup();this._commandWindowInitializer.onInitialize()},resize:function(){this._rtcInstance.resize();
this._commandWindowPane.onResize()},onBlur:function(){this._rtcInstance.blur()},focus:function(){this._rtcInstance.focus()},blur:function(){this._rtcInstance.blur()},onFocus:function(){this._rtcInstance.focus()},destroy:function(){this._rtcInstance.destroy()}})})},"MOTW/cmd/PluginRegistry":function(){define("MOTW/cmd/commands/ClearCommandWindowProvider MOTW/cmd/commands/HomeCommandProvider MOTW/cmd/commands/CommandWindowExitMatlabProvider MOTW/cmd/commands/PauseHandlerProvider MOTW/cmd/core/history/CommandWindowHistoryProvider MOTW/cmd/core/output/model/OutputNodeContentConverterProvider MOTW/cmd/core/output/coordinateconverter/OutputNodeCoordinateConverterProvider MOTW/cmd/core/output/insertionrules/OutputNodeInsertionRulesProvider MOTW/cmd/core/output/view/OutputNodeLayouterProvider MOTW/cmd/core/prompt/PromptProvider MOTW/cmd/core/promptinput/PromptInputProvider MOTW/cmd/core/prompt/coordinateConverter/PromptNodeCoordinateConverterProvider MOTW/cmd/core/prompt/insertionRules/PromptNodeInsertionRulesProvider MOTW/cmd/plugins/codingui/CodingUITabHandlerProvider MOTW/cmd/plugins/commandhistorynavigation/CommandHistoryNavigationProvider MOTW/cmd/plugins/commandwindowstatehandler/CommandWindowStateHandlerProvider MOTW/cmd/plugins/CmdPlainTextMimeConverterProvider MOTW/cmd/plugins/contextmenu/CWContextMenuModelProvider MOTW/cmd/plugins/evaluateselection/EvaluateSelectionProvider MOTW/cmd/plugins/interrupt/InterruptCommandWindowProvider MOTW/cmd/plugins/PromptlessTextGeneratorProvider MOTW/cmd/plugins/CmdUnicodeStringMimeConverterProvider MOTW/cmd/plugins/executionhandler/ExecutionHandlerProvider MOTW/cmd/plugins/gettingstartedbanner/GettingStartedBannerProvider MOTW/cmd/plugins/keyhandler/CommandWindowKeyHandlerProvider MOTW/cmd/plugins/promptinputhandler/PromptInputHandlerProvider MOTW/cmd/plugins/PromptlessTextGeneratorProvider MOTW/cmd/plugins/service/CodingUIBackendCodeProviderProvider MOTW/cmd/plugins/syntaxhighlighting/MatlabTokensHandlerProvider MOTW/cmd/plugins/undoredo/UndoRedoControllerProvider MOTW/cmd/plugins/wraplines/WrapLinesProvider MOTW/cmd/core/prompt/view/PromptLayouterProvider MOTW/cmd/view/CommandWindowViewProvider".split(" "),
function(){return{plugins:[{id:"cw.commands.clearcommandwindow",path:"MOTW/cmd/commands/ClearCommandWindowProvider"},{id:"cw.commands.homecommand",path:"MOTW/cmd/commands/HomeCommandProvider"},{id:"cw.commands.exitmatlab",path:"MOTW/cmd/commands/CommandWindowExitMatlabProvider"},{id:"cw.commands.pausematlab",path:"MOTW/cmd/commands/PauseHandlerProvider"},{id:"cw.core.commandwindowhistory",path:"MOTW/cmd/core/history/CommandWindowHistoryProvider"},{id:"cw.core.prompt",path:"MOTW/cmd/core/prompt/PromptProvider",
family:"commandwindow.prompt"},{id:"cw.promptcoordinateconverter",path:"MOTW/cmd/core/prompt/coordinateConverter/PromptNodeCoordinateConverterProvider",family:"commandwindow.prompt",subsystem:"rtc.view.coordinateconverter.converter"},{id:"cw.promptinsertionrules",path:"MOTW/cmd/core/prompt/insertionRules/PromptNodeInsertionRulesProvider",family:"commandwindow.prompt",subsystem:"rtc.insertionrule"},{id:"cw.promptlayouter",path:"MOTW/cmd/core/prompt/view/PromptLayouterProvider",family:"commandwindow.prompt",
subsystem:"rtc.view.layoutmanager.layouter"},{id:"cw.core.promptinput",path:"MOTW/cmd/core/promptinput/PromptInputProvider"},{id:"rtc.code.codingui.tabhandler",path:"MOTW/cmd/plugins/codingui/CodingUITabHandlerProvider",family:"rtc.code.codingui"},{id:"cw.commandhistorynavigation",path:"MOTW/cmd/plugins/commandhistorynavigation/CommandHistoryNavigationProvider"},{id:"cw.commandwindowstatehandler",path:"MOTW/cmd/plugins/commandwindowstatehandler/CommandWindowStateHandlerProvider"},{id:"cw.executionhandler",
path:"MOTW/cmd/plugins/executionhandler/ExecutionHandlerProvider"},{id:"cw.gettingstartedbanner",path:"MOTW/cmd/plugins/gettingstartedbanner/GettingStartedBannerProvider"},{id:"cw.keyhandler",path:"MOTW/cmd/plugins/keyhandler/CommandWindowKeyHandlerProvider"},{id:"cw.promptinputhandler",path:"MOTW/cmd/plugins/promptinputhandler/PromptInputHandlerProvider"},{id:"rtc.cutcopypaste.plaintextmimeconverter",family:"rtc.cutcopypaste",path:"MOTW/cmd/plugins/CmdPlainTextMimeConverterProvider",subsystem:"rtc.cutcopypaste.mimeconverters"},
{id:"rtc.cutcopypaste.unicodestringmimeconverter",family:"rtc.cutcopypaste",path:"MOTW/cmd/plugins/CmdUnicodeStringMimeConverterProvider",subsystem:"rtc.cutcopypaste.mimeconverters"},{id:"rtc.cutcopypaste.promptlesstextgenerator",family:"rtc.cutcopypaste",path:"MOTW/cmd/plugins/PromptlessTextGeneratorProvider"},{id:"rtc.code.codingui.codeprovider",path:"MOTW/cmd/plugins/service/CodingUIBackendCodeProviderProvider"},{id:"cw.matlabtokenshandler",path:"MOTW/cmd/plugins/syntaxhighlighting/MatlabTokensHandlerProvider"},
{id:"cw.undoredocontroller",path:"MOTW/cmd/plugins/undoredo/UndoRedoControllerProvider"},{id:"cw.wraplines",path:"MOTW/cmd/plugins/wraplines/WrapLinesProvider"},{id:"cw.view.commandwindowview",path:"MOTW/cmd/view/CommandWindowViewProvider"},{id:"rtc.contextualselection.evaluateselection",path:"MOTW/cmd/plugins/evaluateselection/EvaluateSelectionProvider"},{id:"cw.interruptcommandwindow",path:"MOTW/cmd/plugins/interrupt/InterruptCommandWindowProvider"},{id:"cw.outputnodecontentconverter",path:"MOTW/cmd/core/output/model/OutputNodeContentConverterProvider",
family:"commandwindow.output",subsystem:"rtc.nodes.contentconverter.converter"},{id:"cw.outputnodecoordinateconverter",path:"MOTW/cmd/core/output/coordinateconverter/OutputNodeCoordinateConverterProvider",family:"commandwindow.output",subsystem:"rtc.view.coordinateconverter.converter"},{id:"cw.outputnodeinsertionrules",path:"MOTW/cmd/core/output/insertionrules/OutputNodeInsertionRulesProvider",family:"commandwindow.output",subsystem:"rtc.insertionrule"},{id:"cw.outputnodelayouter",path:"MOTW/cmd/core/output/view/OutputNodeLayouterProvider",
family:"commandwindow.output",subsystem:"rtc.view.layoutmanager.layouter"},{id:"cw.contextmenu.model",path:"MOTW/cmd/plugins/contextmenu/CWContextMenuModelProvider",family:"contextmenu"}]}})},"MOTW/cmd/commands/ClearCommandWindowProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","./ClearCommandWindow"],function(g,f,e,d){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.actionservice",
"cw.initializer","rtc.executionservice","rtc.document","rtc.internaldocument"]}},createInstance:function(b,a,c,h,e){return new d(b,a,c,h,e)}})})},"MW/rtc/core/provider/PluginProvider":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin"],function(g,f){return g(null,{isApplicable:function(){return!0},requires:function(){},createInstance:function(){throw Error("Unimplemented API: createInstance");},destroyInstance:function(e){e&&(e.isInstanceOf&&e.isInstanceOf(f))&&e.destroy()},
priority:function(){return 1}})})},"MOTW/cmd/commands/ClearCommandWindow":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/i18n!MOTW/l10n/nls/cmdWindow MOTW/cmd/CommandWindowActionEnum MW/rtc/abstract/AbstractPlugin".split(" "),function(g,f,e,d,b,a){return g(a,{constructor:function(a,h,k,g,m){this._commandWindowInitializer=h;this._rtcDocument=g;this._internalDocument=m;this._executionService=k;this.own(e.after(h,"onInitialize",f.hitch(this,"_handleCommandWindowInitialization")));
h=[{id:b.CLEAR_COMMAND_WINDOW,text:d.clearCommandWindowLabel,enabled:!0,contextMenuGroup:"Commands",callback:f.hitch(this,"_handleClearCommandWindow")}];a.loadActions(h)},_handleCommandWindowInitialization:function(){this.own(e.after(this._executionService,"onClcExecution",f.hitch(this,"_handleClearCommandWindow")));this.own(e.after(this._internalDocument,"onDocumentReset",f.hitch(this._commandWindowInitializer,"onReset")))},_handleClearCommandWindow:function(){this._rtcDocument.setText("")}})})},
"MOTW/cmd/CommandWindowActionEnum":function(){define([],function(){return{EXECUTE_COMMAND:"cw_execute_command",CLEAR_PROMPT_INPUT:"cw_clear_prompt",PREVIOUS_HISTORY_COMMAND:"cw_previous_history_command",NEXT_HISTORY_COMMAND:"cw_next_history_command",INTERRUPT_COMMAND:"cw_interrupt_command",HOME_NAVIGATION:"home_navigation",CLEAR_COMMAND_WINDOW:"cw_clear_command_window"}})},"MOTW/cmd/commands/HomeCommandProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider",
"./HomeCommand"],function(g,f,e,d){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["cw.initializer","rtc.executionservice","rtc.view","cw.core.promptinput","cw.core.commandwindowhistory"]}},createInstance:function(b,a,c,h,e){return new d(b,a,c,h,e)}})})},"MOTW/cmd/commands/HomeCommand":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-construct dojo/dom-style MW/rtc/abstract/AbstractPlugin".split(" "),function(g,f,e,
d,b,a){return g(a,{_ROOT_NODE_PADDING:5,constructor:function(a,b,d,g,m){this._commandWindowInitializer=a;this._executionService=b;this._rtcView=d;this._commandWindowHistory=m;this._promptInput=g;this._domTarget=d.getDomtarget();this.own(e.after(a,"onInitialize",f.hitch(this,"_handleCommandWindowInitialization")));this._rtcView.setDefaultVerticalPadding(0);this._bottomPadHeight=0},_handleCommandWindowInitialization:function(){this._bottomPad=d.create("div",{className:"CommandWindowBottomPad",style:{height:"0px"}});
d.place(this._bottomPad,this._domTarget,"last");this.own(e.after(this._commandWindowInitializer,"onReset",f.hitch(this,"_handleCommandWindowReset")));this.own(e.after(this._promptInput,"onPromptInputLineChange",f.hitch(this,"_handleBottomPadding")));this.own(e.after(this._executionService,"onHomeExecution",f.hitch(this,"_handleHomeCommand")))},_handleCommandWindowReset:function(){this._bottomPadHeight=0;b.set(this._bottomPad,"height",this._bottomPadHeight+"px")},_handleBottomPadding:function(){0<
this._bottomPadHeight&&(this._bottomPadHeight=Math.max(this._bottomPadHeight-(this._domTarget.scrollHeight-this._prevTargetScrollHeight),0),b.set(this._bottomPad,"height",this._bottomPadHeight+"px"),this._prevTargetScrollHeight=this._domTarget.scrollHeight)},_handleHomeCommand:function(){this._commandWindowHistory.triggerActionOnHistory(f.hitch(this,"_executeHomeCommand"))},_executeHomeCommand:function(){var a=this._promptInput.getPromptInputLineColumn();this._bottomPadHeight=this._domTarget.clientHeight-
this._rtcView.getLineHeight(a.line)-this._ROOT_NODE_PADDING;b.set(this._bottomPad,"height",this._bottomPadHeight+"px");this._rtcView.scrollLineToPercent(a.line,0);this._prevTargetScrollHeight=this._domTarget.scrollHeight}})})},"MOTW/cmd/commands/CommandWindowExitMatlabProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./ExitMatlabByCommandLine"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.executionservice"]}},
createInstance:function(d){return new e(d)}})})},"MOTW/cmd/commands/ExitMatlabByCommandLine":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MOTW/motw/matlabexitservice/MatlabExitServiceFactory"],function(g,f,e,d){return g(null,{constructor:function(b){var a=d.getInstance(b);b.intercept("exit",f.hitch(a,"exitMatlab",!0));b.intercept("quit",f.hitch(a,"exitMatlab",!0))}})})},"MOTW/motw/matlabexitservice/MatlabExitServiceFactory":function(){define(["MOTW/motw/matlabexitservice/MatlabExitService"],
function(g){return{getInstance:function(){this._instance||(this._instance=new g);return this._instance},destroy:function(){this._instance&&(this._instance=null)}}})},"MOTW/motw/matlabexitservice/MatlabExitService":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/connect dojo/dom-construct dojo/on dojo/query dojo/topic dojo/i18n!mw-dialog-utils/l10n/nls/dialog dojo/i18n!../../l10n/nls/motw dijit/registry matlab_preferences/preferencesUI/PreferenceSettingsServiceFactory mw-form/CheckBox MW/uiframework/FeatureDetectionService mw-notifications/Notifications mw-remote/Remote".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r){function s(){c.publish("/MatlabExitService/exitchannel",{});setTimeout(function(){e.publish("/wra/logout")},0)}return g([],{constructor:function(){this._preferenceSettingsService=m.getInstance();this._showExitDialog=null;window.onbeforeunload=f.hitch(this,function(a){if(!0===this._showExitDialog)return""});c.subscribe("/MatlabExitService/exitchannel",f.hitch(this,function(){this._showExitDialog=!1}))},exitMatlab:function(a){n.getFeatureStatus(n.FeatureNames.MATLAB_LOCAL)?
this.callExitWebDesktop(a):this.publishLogout()},callExitWebDesktop:function(a){r.sendMessage({FEval:{"function":"webdesktop.internal.exitWebDesktop",arguments:a?[a]:[],nargout:0,priority:1}},{},"ExitWebDesktop")},publishLogout:function(){if(!0!==this._showExitDialog)s();else{var c=this._preferenceSettingsService,e=k.exitMATLABDialogMessage,f=d.create("div"),g=d.create("div");g.textContent=k.exitMATLABDialogText;var m=new p({text:k.checkBoxMessage,"class":"confirmationDialogCheckBox"});f.appendChild(g);
f.appendChild(d.create("br"));f.appendChild(m.domNode);g=function(){return{icon:"warning",buttonText:[h.ok,h.cancel],defaultAcceptButton:1,defaultCancelButton:2,closeCallback:function(d){1===d.response&&(d=a(".mwConfirmDialog .confirmationDialogCheckBox")[0],l.getEnclosingWidget(d).get("checked")?c.setSetting(["matlab","confirmationdialogs"],"MatlabExitConfirm",!1).then(function(){s()}):s());b.emit(document.body,"restorefocus",{bubbles:!0})}}}();q.displayConfirmDialog(e,f,g)}}})})},"MOTW/cmd/commands/PauseHandlerProvider":function(){define(["dojo/_base/declare",
"dojo/_base/lang","MW/rtc/core/provider/PluginProvider","./PauseHandler"],function(g,f,e,d){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["cw.commandwindowstatehandler","rtc.executionservice","cw.keyhandler"]}},createInstance:function(b,a,c){return new d(b,a,c)},destroyInstance:function(b){b.destroy()}})})},"MOTW/cmd/commands/PauseHandler":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect"],function(g,f,e){return g(null,
{constructor:function(d,b,a){this._commandWindowStateHandler=d;this._commandWindowKeyHandler=a;this._executionService=b;this._isPaused=!1;this._keypressListener=null;this._aspectHandles=[];this._aspectHandles.push(e.after(this._commandWindowStateHandler,"onCommandWindowStateChange",f.hitch(this,"_checkForPauseState"),!0))},_checkForPauseState:function(d){"pause"===d?(this._isPaused=!0,this._keypressListener=this._commandWindowKeyHandler.attachListener("keypress",f.hitch(this,"_handleUnPause"))):this._isPaused&&
this._handleUnPause()},_handleUnPause:function(d){d&&(d.preventDefault(),d.stopPropagation(),this._executionService.publishPauseMessage());this._commandWindowKeyHandler.removeListener(this._keypressListener);this._keypressListener=null;this._isPaused=!1},destroy:function(){this._keypressListener&&(this._commandWindowKeyHandler.removeListener(this._keypressListener),this._keypressListener=null);this._aspectHandles.forEach(function(d){d.remove()})}})})},"MOTW/cmd/core/history/CommandWindowHistoryProvider":function(){define(["dojo/_base/declare",
"dojo/_base/lang","MW/rtc/core/provider/PluginProvider","./CommandWindowHistory"],function(g,f,e,d){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:"cw.initializer rtc.executionservice rtc.cutcopypaste.htmlmimeconverter rtc.internaldocument rtc.document cw.view.commandwindowview".split(" ")}},createInstance:function(b,a,c,h,e,f){return new d(b,a,c,h,e,f)},destroyInstance:function(b){b.destroy()}})})},"MOTW/cmd/core/history/CommandWindowHistory":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/has dojo/i18n!MOTW/l10n/nls/cmdWindow MOTW/cmd/utils/TruncatingBuffer MW/rtc/model/DocumentUtilities MW/rtc/model/events/DocumentEvent MW/rtc/model/NodeUtilities mw-log/Log mw-utils/HtmlUtils ../output/model/OutputNode ../prompt/model/PromptNode".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){return g([],{_MAX_LINES:5E3,_MAX_LINE_LENGTH:25E3,_MAX_CONTAINER_LINES:200,_LINE_BREAK_REGEX:/\r\n|\r|\n/g,constructor:function(a,c,b,h,k,g){this._internalDocument=h;this._rtcDocument=k;this._executionService=c;this._view=g;this._htmlMimeConverter=b;this._aspectHandles=[];this._aspectHandles.push(e.after(a,"onInitialize",f.hitch(this,"_handleCommandWindowInitialization")));this._aspectHandles.push(e.after(a,"onReset",f.hitch(this,"_handleCommandWindowReset")));
if(d("trident")||d("ie")||d("edge"))this._MAX_LINES=1E3;this._initializeHistoryBuffers();this._enqueuedActionMap={}},_handleCommandWindowInitialization:function(){this._insertCommandHistoryPositions();this._aspectHandles.push(e.after(this._executionService.historyStore,"onNew",f.hitch(this,"_handleAddHistory"),!0));this._aspectHandles.push(e.after(this._executionService.historyStore,"onSet",f.hitch(this,"_handleUpdateHistory"),!0));this._updateHistoryFromSession()},_handleCommandWindowReset:function(){this._destroyHistoryPositions();
this._insertCommandHistoryPositions();this._initializeHistoryBuffers()},_updateHistoryFromSession:function(){this._executionService.historyStore.items.forEach(function(a){a.isSessionData=!0;this._handleAddHistory(a)},this)},_initializeHistoryBuffers:function(){this._displayedHistory=new a(this._MAX_LINES,f.hitch(this,"_truncateHistoryItemsCallback"));this._incomingOutputHistory=new a(this._MAX_LINES);this._interval=null},_truncateHistoryItemsCallback:function(a){a=[].concat.apply([],a);var c=this._internalDocument.getLineNumber(a[0]),
b={node:a[a.length-1].nextSibling().startNode(),offset:0},d;try{for(d=0;d<a.length;d++)this._internalDocument.deleteNode(a[d],b);return h.create(c,c+a.length)}catch(e){return l.error("Error when deleting history lines",e),h.create(c,c+d)}},_insertCommandHistoryPositions:function(){this._historyStartPosition=this._rtcDocument.createPositionAtLineColumn(0,0,!0)},_handleAddHistory:function(a){a.visible&&("request"===a.type?this._addInputHistory(a):"response"===a.type&&this._addOutputHistory(a));this._view.scrollToBottom()},
_handleUpdateHistory:function(a,c,b,d){"value"===c&&(a.value=d.replace(b,""),this._handleAddHistory(a))},_addInputHistory:function(a){var c=a.value.split(this._LINE_BREAK_REGEX),b=null,d=!a.isSessionData&&c.length>this._MAX_CONTAINER_LINES,h=[],b=this._convertTextToContainer("code",{text:c.shift(),readOnly:!0,promptString:a.promptString});h.push(b);var e=1;c.forEach(function(a){b=this._convertTextToContainer("code",{text:a,readOnly:!0});e+=1;h.push(b);e===this._MAX_CONTAINER_LINES&&(this._addHistoryElements(h,
e,d),e=0,h=[])},this);0<h.length&&this._addHistoryElements(h,e,d)},_addOutputHistory:function(a){var c=a.isError?"red":null,b=this._truncateIncomingOutputHistoryContent(a.value),d=[],h=0;a=!a.isSessionData;for(var e=Math.ceil(b.length/this._MAX_CONTAINER_LINES),f=1;f<=e;f++)h=b.splice(0,this._MAX_CONTAINER_LINES),d=h.join("\n"),this._containsLinksAndHtml(d)?(d=this._convertHtmlToContainers(d,{readOnly:!0,color:c}),h=d.length):(d=[this._convertTextToContainer("text",{text:d,readOnly:!0,color:c})],
h=h.length),this._addHistoryElements(d,h,a)},_truncateIncomingOutputHistoryContent:function(a){a=a.split(this._LINE_BREAK_REGEX);a.length>this._MAX_LINES&&a.splice(0,a.length-this._MAX_LINES);return a.map(function(a){return a.length>this._MAX_LINE_LENGTH?a.substring(0,this._MAX_LINE_LENGTH)+b.lineTruncatingText:a},this)},_convertHtmlToContainers:function(a,c){a=m.treatHtmlLikeCommandWindow(a);a=a.replace(this._LINE_BREAK_REGEX,"\x3cbr\x3e");return this._htmlMimeConverter.convertFromMimeData(a).map(function(a){a=
this._internalDocument.createNode(a);k.setAttributesForNodes(a.children,c);return a},this)},_convertTextToContainer:function(a,c){var b=this._internalDocument.createContainerForType(a).container,d=null;c.promptString&&(d=new n({text:c.promptString}),b.addChild(d));"text"===a?d=new p(c):(d=this._internalDocument.createNode(b.getDefaultChild()),d=k.setNodeAttributes(d,c));b.readOnly=c.readOnly;b.addChild(d);return b},_addHistoryElements:function(a,c,b){b?this._addToHistoryBuffer(a,c):this._insertHistoryItems(a)},
_addToHistoryBuffer:function(a,c){this._incomingOutputHistory.add(a,c);var b=this._incomingOutputHistory.getKeyAtLastIndex();this._incomingOutputHistory.getValueAtIndexOf(b);this._triggerIntervalForInsertion()},_triggerIntervalForInsertion:function(){this._interval||(this._interval=setInterval(f.hitch(this,function(){var a=this._incomingOutputHistory.getValueAtIndexOf(0);if(a&&0<a.length){var c=this._incomingOutputHistory.getKeyAtIndexOf(0);this._incomingOutputHistory.remove(c);this._insertHistoryItems(a);
if(this._enqueuedActionMap[c])this._enqueuedActionMap[c]()}else this._clearIntervalForTruncation()}),0))},_clearIntervalForTruncation:function(){this._interval&&(clearInterval(this._interval),this._interval=null)},_insertHistoryItems:function(a){var c=0,b=[];a.forEach(function(a){a=a.getText()?a.getText().split(this._LINE_BREAK_REGEX).length:1;c+=a},this);var d=this._displayedHistory.add(a,c),b=b.concat(d);a=this._internalDocument.insertAtPosition(a,this._historyStartPosition);b=b.concat(a.events);
this._internalDocument.emitDocumentEvents(b);this._view.scrollToBottom()},_containsLinksAndHtml:function(a){return!(!a.match(m.STRONG_ESCAPE_REGEXP)&&!a.match(m.HYPERLINK_ESCAPE_REGEXP)&&!a.match(m.HYPERLINK_WITH_PARENTHESIS_ESCAPE_REGEXP))},triggerActionOnHistory:function(a){if(!this._interval||!this._incomingOutputHistory.getKeyAtLastIndex())a();else{var c=this._incomingOutputHistory.getKeyAtLastIndex();this._enqueuedActionMap[c]=a}},_destroyHistoryPositions:function(){this._historyStartPosition&&
(this._rtcDocument.deletePosition(this._historyStartPosition),this._historyStartPosition=null)},destroy:function(){this._destroyHistoryPositions();this._clearIntervalForTruncation();this._aspectHandles.forEach(function(a){a.remove()})}})})},"MOTW/cmd/utils/TruncatingBuffer":function(){define(["dojo/_base/declare","mw-log/Log"],function(g,f){return g(null,{constructor:function(e,d){this._keyValueMap={};this._keyArray=[];this._truncatorCallback=d;this._maxLimit=e;this._lastTruncatedEntryKey=0},add:function(e,
d){var b=this._truncateData(d),a=this.getKeyAtLastIndex()||0,c=a+d;if(c===a)return f.error("The data passed in should have minimum 1 line"),[];this._keyArray.push(c);this._keyValueMap[c]=e;return b},remove:function(e){var d=this._keyArray.indexOf(e);-1<d&&this._keyArray.splice(d,1);delete this._keyValueMap[e]},forEach:function(e){for(var d=0;d<this._keyArray.length;d++){var b=this._keyArray[d];e(this._keyValueMap[b],b,d)}},getKeys:function(){return this._keyArray},get:function(e){return this._keyValueMap[e]},
getValueAtIndexOf:function(e){e=this.getKeyAtIndexOf(e);return this._keyValueMap[e]},getKeyAtIndexOf:function(e){return this._keyArray[e]},getKeyAtLastIndex:function(){return this._keyArray[this._keyArray.length-1]},_truncateData:function(e){for(var d=[],b=this.getKeyAtLastIndex()||0,b=b+e,a=this.getKeyAtIndexOf(0)||0,c=[],h=0;b-a>=this._maxLimit;){c.push(this.get(a));this.remove(a);h+=a-this._lastTruncatedEntryKey;if(1>this.getKeys().length)break;b=this.getKeyAtLastIndex();b+=e;this._lastTruncatedEntryKey=
a;a=this.getKeyAtIndexOf(0)}0<c.length&&this._truncatorCallback&&d.push(this._truncatorCallback(c,h));return d}})})},"MW/rtc/model/DocumentUtilities":function(){define("dojo/_base/lang dojo/string MW/rtc/browsersupport/BrowserSupportUtilities MW/rtc/model/Position MW/rtc/model/Range ./UnicodeCategories".split(" "),function(g,f,e,d,b,a){var c;return c={_LINE_COLUMN_GREATER_THAN_ZERO:"Line and column must be greater than zero",_LINE_MUST_EXIST_IN_DOCUMENT:"Line must be a valid line in the document",
_COLUMN_MUST_EXIST_ON_LINE:"Column must be valid for the specified line",_SELECTION_START_LESS_THAN_END:"Text replacement start position must not be greater than end position",_WORD_SEARCH_PATTERN:/\W/,reverseString:function(a){return a.split("").reverse().join("")},isSingleCharOrSpaces:function(a){return 1>=a.trim().length},assert:function(a,c){if(!a)throw Error(c);},checkLineExists:function(a,c){this.assert(0<c,this._LINE_COLUMN_GREATER_THAN_ZERO+", lineNumber \x3d "+c);this.assert(c<=a.getMaxLineNumber(),
this._LINE_MUST_EXIST_IN_DOCUMENT)},checkLineColumnExists:function(a,c,b){this.checkLineExists(a,c);this.assert(0<b,this._LINE_COLUMN_GREATER_THAN_ZERO+", lineNumber \x3d "+c+", column \x3d "+b);a=a.getLineNode(c-1);this.assert(a,this._LINE_MUST_EXIST_IN_DOCUMENT);this.assert(a.getText,this._LINE_MUST_EXIST_IN_DOCUMENT);a=a.getTextForPositioning().length+1;this.assert(b<=a,this._COLUMN_MUST_EXIST_ON_LINE)},checkLineColumnIsValid:function(a,c,b){if(c>a.getMaxLineNumber())return!1;a=a.getLineNode(c);
if(!a)return!1;a=a.getTextForPositioning().length;return b>a?!1:!0},checkOneDirectionalSelection:function(a,c,b,d){this.assert(a<=b,this._SELECTION_START_LESS_THAN_END);a===b&&this.assert(c<=d,this._SELECTION_START_LESS_THAN_END)},isAtStartOfContainer:function(a,c){var b=a.getNode(),d=c||b.textContainer();return 0===a.getOffset()&&b===d.startNode()},isAtStartOfReadOnlyContainer:function(a){return a.getNode().isReadOnly()&&c.isAtStartOfContainer(a)},isAtEndOfContainer:function(a,c){var b=a.getNode(),
d=a.getOffset(),e=c||b.textContainer();return d===b.maxOffset()&&b===e.endNode()},isAtEndOfReadOnlyContainer:function(a){return a.getNode().isReadOnly()&&c.isAtEndOfContainer(a)},isInLastLine:function(a){a=a.getNode().rootContainer();var c=a.parent.children;return a===c[c.length-1]},isAtEndOfFile:function(a){return c.isInLastLine(a)&&c.isAtEndOfContainer(a)},isTextLevelContainer:function(a){return a.isTextNode()&&a.containsTextNodes()},isInTextLevelContainer:function(a){return a.parent&&c.isTextLevelContainer(a.parent)},
isEdgeOfTextLevelContainer:function(a,b){if(c.isInTextLevelContainer(a)){var d=a.parent;if(0===b&&a===d.firstChild()||b===a.maxOffset()&&a===d.lastChild())return!0}return c.isTextLevelContainer(a)?0===b||b===a.maxOffset():!1},isInWord:function(a){var c=a.getNode(),b=a.getOffset();a="";0===b?((a=c.previousSibling())?(a=a.getTextForPositioning(),a=a.substring(a.length-1)):a=" ",a+=c.getTextForPositioning().substring(0,1)):b===a.length?(a=c.getTextForPositioning(),a=a.substring(a.length-1),a=(c=c.nextSibling())?
a+c.getTextForPositioning().substring(0,1):a+" "):a=c.getTextForPositioning().substring(b-1,b+1);return a.match(/\w\w/)?!0:a.match(/\w\W/)?-1:a.match(/\W\w/)?0:!1},getWordBoundary:function(b,d,e,f){if(d.isOpaqueNode()){var g=d.maxOffset();if(e!==g&&0<b)return{node:d,posInNode:g};if(0!==e&&0>b)return{node:d,posInNode:0};d=0<b?d.nextSibling():d.previousSibling();if(!d)return null;e=0<b?0:d.maxOffset()}var n;0<d.offsetInContainer()?(g=d.rootContainer(),n=d.offsetInContainer()+e):(g=d.textContainer(),
n=e);var q=g.getTextForPositioning(),q=0>b?c.reverseString(q.substring(0,n)):q.substring(n),r=a.unicodeWordCharacters(),s=RegExp("["+(r+"_")+"]+|\\s+|[!\\(\\)\\[\\]\\{\\}\\-\\+\\*,\x3d\\.\\?\\/\\:;%'\"\x26\x3c\x3e\\|\\^]+|"),t=/\s*/,u;u=0<b?s.exec(q):t.exec(q);r=0;u&&0<u.index+u[0].length&&(r=u.index+u[0].length,q=q.substring(r));u=null;0<b?f||(u=t.exec(q)):u=s.exec(q);u&&0<u.index+u[0].length&&(r+=u.index+u[0].length);if(1>r)return null;if(1===r)return{node:g,column:n+b};f=n+b*r;if(0>b&&r<=e||0<
b&&e+r<=d.maxOffset())return{node:d,posInNode:e+b*r};for(n=0<b?r-d.maxOffset()-e:r-e;0<n&&d;){d=0<b?d.nextSibling():d.previousSibling();if(!d)break;if(d.isOpaqueNode())return{node:d,posInNode:0<b?0:1};n=0<b?r-d.maxOffset()-e:r-e;if(0>=n)break}return{node:g,column:f}},getCommonParent:function(a,c){if(a===c)return a;var b=a.depth(),d=c.depth();if(b>d)for(;b>d;)a=a.parent,b-=1;else for(;d>b;)c=c.parent,d-=1;for(;a.parent;)if(a.parent!==c.parent)a=a.parent,c=c.parent;else break;return a.parent},nodesInOrder:function(a,
c){if(a===c)return 0;var b=a.depth(),d=c.depth();if(b>d){for(;b>d;)a=a.parent,b-=1;if(a===c)return-1}else if(d>b){for(;d>b;)c=c.parent,d-=1;if(a===c)return 1}for(;a.parent&&c.parent&&a.parent!==c.parent;)a=a.parent,c=c.parent;return e.indexOf(a.parent.children,a)<e.indexOf(a.parent.children,c)?1:-1},getWritableChunksInRange:function(a,c){for(var b=a.getLineNumber(c[0]),d=b,e=b,f=[],b=0;b<c.length;b++){var e=c[b],g=c[b+1];e.isReadOnly()&&(g&&!g.isReadOnly())&&(d=a.getLineNumber(g));if(!e.isReadOnly()&&
(!g||g.isReadOnly()))e=a.getLineNumber(e),f.push({startLine:d,endLine:e})}return f},getWhitespaceStringOfLength:function(a){return f.rep(" ",a)},getLeadingWhitespace:function(a){return a.match(/^\s*/)[0].length},textLineArray:function(a){return a.split(c.NewLineRegex)},textToContent:function(a,b){var d,e=[],f=c.textLineArray(a),n,q,r;b?(q=b.textContainer().serialize(),b.textContainer().isRootContainer()||(r=b.rootContainer().serialize()),n=b.isTextNode()?b.serialize():b.textContainer().getDefaultChild()):
(n=c.DEFAULT_TEXT_NODE,q=c.DEFAULT_CONTAINER_NODE);for(d=0;d<f.length;d+=1){var s=g.clone(n);s.text=f[d];if(1===f.length)return[s];var t=g.clone(q);t.children=[s];e.push(t)}return r?(d=g.clone(r),d.children=e,[d]):e},DEFAULT_TEXT_NODE:{className:"PlainTextNode",text:""},DEFAULT_CONTAINER_NODE:{className:"LineNode",children:[]},DEFAULT_TAB_STRING:"    ",getWordAtPosition:function(a,c){return this.getStringAtPosition(a,c,this._WORD_SEARCH_PATTERN)},getStringAtPosition:function(a,c,b){if(!c.isValid())return null;
a=this._getLineColumnAtPosition(a,c.getNode(),c.getOffset());c=c.getNode().rootContainer().getTextForPositioning();return this._getStringStartEndPositions(c,a,b)},_getLineColumnAtPosition:function(a,c,b){var d=c.rootContainer();a=a.getLineNumber(d);c=c.offsetInContainer(d)+b;return{line:a,column:c}},_getStringStartEndPositions:function(a,c,b){this.assert(c&&0<=c.column&&c.column<=a.length);var d=c.column,e=this.reverseString(a.substring(0,d)),f=a.substring(d),g=e.search(b);-1===g&&(g=e.length);e=
d-g;b=f.search(b);-1===b&&(b=f.length);d+=b;a=a.substring(e,d);return 0===a.length?null:{text:a,startLineCol:{line:c.line,column:e},endLineCol:{line:c.line,column:d}}},checkOverlapsWithRange:function(a,c,b){var d,e,f,g;return b.some(function(b){d=a.line===b.startLine;e=a.column===b.startColumn;f=c.line===b.endLine;g=c.column===b.endColumn;return d&&f&&(e||g)})},getTextRangeFromLeftToPosition:function(a){var c=a.getNode();if(!c.isTextNode())return null;for(var b=c,e=a.getOffset(),e=c.getText().slice(0,
e),f=c.textContainer(),c=c.prevNode();c&&c.isTextNode()&&c.textContainer()===f;)b=c,e=c.getText()+e,c=c.prevNode();return{startPos:new d(b,0),endPos:a,text:e}},getRangeAndTextOfTargetOnLine:function(a,c,b){b=RegExp(b);a=a.getLineNode(c-1).getTextForPositioning();return(b=b.exec(a))?{start:b.index+1,end:b.index+b[0].length+1,text:b[0]}:null},isInDocument:function(a){return!a||!a.rootContainer()||!a.rootContainer().parent?!1:!0},createFullFileRange:function(a,c){var d=a.createLinePositionInLine(0,!1),
e=c.getMaxLineNumber()-1,e=a.createLinePositionInLine(e,!1);return new b(d,e)},NewLineRegex:/\r\n|\r|\n/}})},"MW/rtc/browsersupport/BrowserSupportUtilities":function(){define(["dojo/_base/array","dojo/has","MW/rtc/browsersupport/PseudoMap","MW/rtc/browsersupport/PseudoSet","MW/rtc/browsersupport/PseudoWeakSet"],function(g,f,e,d,b){var a;a={createMap:function(){return this.isES6MapSupported()?new Map:new e},isES6MapSupported:function(){return void 0!==window.Map},createSet:function(){return this._isES6SetSupported()?
new Set:new d},createWeakSet:function(){return this._isES6WeakSetSupported()?new WeakSet:new b},_isES6SetSupported:function(){return void 0!==window.Set},_isES6WeakSetSupported:function(){return void 0!==window.WeakSet},indexOf:function(a,b){return g.indexOf(a,b)}};52<=f("chrome")&&(a.indexOf=function(a,b){return a.indexOf(b)});return a})},"MW/rtc/browsersupport/PseudoMap":function(){define(["dojo/_base/declare"],function(g){return g(null,{constructor:function(){this._elements=[];this.size=0},set:function(f,
e){var d=this._getElement(f);d?d.value=e:(this._elements.push({key:f,value:e}),this.size+=1);return this},get:function(f){if(f=this._getElement(f))return f.value},has:function(f){return!!this._getElement(f)},clear:function(){this._elements=[];this.size=0},"delete":function(f){f=this._findElement(f);return 0<=f?(this._elements.splice(f,1),this.size-=1,!0):!1},forEach:function(f,e){for(var d,b=0;b<this._elements.length;b++)d=this._elements[b],f.call(e,d.value,d.key,this)},_getElement:function(f){f=
this._findElement(f);return 0<=f?this._elements[f]:null},_getElements:function(){return this._elements},_findElement:function(f){for(var e=0;e<this._elements.length;e++)if(this._elements[e].key===f)return e;return-1}})})},"MW/rtc/browsersupport/PseudoSet":function(){define(["dojo/_base/declare","./PseudoMap"],function(g,f){return g(null,{constructor:function(){this._map=new f;this.size=0},add:function(e){this._map.set(e,e);this.size=this._map.size;return this},has:function(e){return this._map.has(e)},
clear:function(){this.size=0;return this._map.clear()},"delete":function(e){e=this._map.delete(e);this.size=this._map.size;return e},forEach:function(e,d){for(var b,a=this._map._getElements(),c=0;c<a.length;c++)b=a[c],e.call(d,b.value,b.key,this)}})})},"MW/rtc/browsersupport/PseudoWeakSet":function(){define(["dojo/_base/declare","mw-utils/Utils"],function(g,f){return g(null,{constructor:function(){this._propName="__RTCPseudoWeakSet_"+f.generateUuid()},add:function(e){e[this._propName]=!0;return this},
"delete":function(e){return this.has(e)?(delete e[this._propName],!0):!1},has:function(e){return e.hasOwnProperty(this._propName)}})})},"MW/rtc/model/Position":function(){define("dojo/_base/declare dojo/_base/lang MW/rtc/browsersupport/BrowserSupportUtilities MW/rtc/model/PositionUtilities MW/rtc/model/events/nodechange/NodeChangeEventTypes mw-log/Log".split(" "),function(g,f,e,d,b,a){return g(null,{constructor:function(a,b,d){this.node=a||null;this.offset=b||0;this.setRightAligned(d)},destroy:function(){this.isValid()&&
this.isLive()&&d.detachPosition(this.node,this);this.node=null},_ignoreOffset:!1,setIgnoreOffset:function(){this._ignoreOffset=!0},isLinePosition:function(){return this._ignoreOffset},onChange:function(a){},getNode:function(){return this.node},getOffset:function(){return this.offset},setPosition:function(a,b){var e=this.isLive();e&&d.detachPosition(this.node,this);this.node=a;this.offset=b;e&&d.attachPosition(this.node,this)},isAtEdge:function(){return this.isAtLeftEdge()||this.isAtRightEdge()},isAtLeftEdge:function(){return 0===
this.offset},isAtRightEdge:function(){return this.offset===this.node.maxOffset()},setRightAligned:function(a){this.align=a?1:0},isRightAligned:function(){return 1===this.align},isValid:function(){return this.node&&this.node.rootContainer()&&0<=this.offset&&this.offset<=this.node.maxOffset()},isEqualTo:function(a){return a&&this.offset===a.offset&&this.node===a.node},setLive:function(a){this.node&&(!1!==a?this.isLive()||d.attachPosition(this.node,this):d.detachPosition(this.node,this))},isLive:function(){return d.isPositionAttached(this)},
print:function(a){var b=this.node.getText(),b=b.substring(0,this.offset)+"|"+b.substring(this.offset);a&&(this.offset<a-1?b=b.substring(0,a)+"...":(a=Math.floor(a/2),b="..."+b.substring(this.offset-a,this.offset+a)+(this.offset+a<b.length?"":"...")));return b},getLineColumn:function(){return{line:this.getLine(),column:this.getColumn()}},getLine:function(){if(!this.isValid())return-1;var a=this.getNode().rootContainer(),a=this._getLine(a);return 0<=a?a+1:-1},_getLine:function(a){return e.indexOf(a.parent.children,
a)},getColumn:function(){if(!this.isValid())return-1;var a=this.getNode(),b=1;a.offsetInContainer&&(b+=a.offsetInContainer()+this.getOffset());return b},handleNodeChange:function(c){if(this.node&&c.node===this.node){var d;switch(c.type){case b.INSERT_TEXT:d=this._handleInsertTextNodeEvent(c);break;case b.DELETE_TEXT:d=this._handleDeleteTextNodeEvent(c);break;case b.SPLIT_NODE:d=this._handleSplitNodeEvent(c);break;case b.MERGE_NODE:d=this._handleMergeNodeEvent(c);break;case b.DELETE_NODE:d=this._handleDeleteNodeEvent(c);
break;case b.UPDATE_ATTRIBUTES:d=this._handleUpdateAttributesEvent(c)}a.assert(this.isValid(),"Position invalid after handleNodeChange("+c.type+")!");d&&this._notifyChange(c.type,d.nodeHasChanged,d.offsetHasChanged);return this.node}},_handleInsertTextNodeEvent:function(a){var b=!1;a.offset-this.align<this.offset&&(this.offset+=a.length,b=!0);return{nodeHasChanged:!1,offsetHasChanged:b}},_handleDeleteTextNodeEvent:function(a){var b=!1;a.offset<this.offset&&(this.offset=a.offset+a.length>this.offset?
a.offset:this.offset-a.length,b=!0);return{nodeHasChanged:!1,offsetHasChanged:b}},_handleSplitNodeEvent:function(a){var b=!1,d=!1;this._ignoreOffset?b=a.nodeChanged&&!(a.lineStartOrEnd<this.align):a.offset-this.align<this.offset?(this.offset-=a.offset,d=!0,b=!a.nodeChanged):b=a.nodeChanged;b&&(this.node=a.newNode);return{nodeHasChanged:b,offsetHasChanged:d}},_handleMergeNodeEvent:function(c){var b=!1;!this._ignoreOffset&&c.hasOwnProperty("offset")&&(this.offset+=c.offset,b=0<c.offset);a.assert(c.newNode,
"New node missing in Position.handleNodeChange(MERGE_NODE).");this.node=c.newNode&&this._ignoreOffset?c.newNode.rootContainer():c.newNode;return{nodeHasChanged:!0,offsetHasChanged:b}},_handleDeleteNodeEvent:function(c){a.assert(c.newNode,"New node missing in Position.handleNodeChange(DELETE_NODE).");if(this.align&&c.newEndNode)this.node=c.newEndNode,this.offset=c.newEndOffset;else{var b=c.newNode;this.node=b&&b.children&&0<b.children.length?b.children[0]:b;this.offset=c.newOffset}this._ignoreOffset&&
(this.node=this.node.rootContainer(),this.offset=0);return{nodeHasChanged:!0,offsetHasChanged:!1}},_handleUpdateAttributesEvent:function(a){a=a.node.maxOffset();var b=!1;this.offset>a&&(b=!0,this.offset=a);return{nodeHasChanged:!1,offsetHasChanged:b}},handleSiblingNodeChange:function(a,b){var d=!1,e=!1;if(this._ignoreOffset)throw Error("MW.rtc.model.Position.handleSiblingNodeChange does not support Line Positions");if(!b&&this.isAtLeftEdge()&&!this.isRightAligned()){var f=a.newNode.startNode();f&&
(this.node=f,d=!0)}else if(b&&(this.isAtRightEdge()&&this.isRightAligned())&&(f=a.newNode.endNode()))this.node=f,this.offset=this.node.maxOffset(),d=e=!0;this._notifyChange(a.type,d,e);return this.node},_notifyChange:function(a,b,e){if(e||b)a=f.hitch(this,"onChange",{type:a,nodeHasChanged:b,offsetHasChanged:e}),d.queueEvent(a)}})})},"MW/rtc/model/PositionUtilities":function(){define(["MW/rtc/browsersupport/BrowserSupportUtilities","MW/rtc/model/events/nodechange/NodeChangeEventTypes"],function(g,
f){var e;return e={pendingEvents:[],updatePositions:function(d){var b=d.node;if(b)if(d.type===f.INSERT_NODE)e._updatePositionsForInsertNodeEvent(d);else{var a=e.getPositions(b),c=a.length;if(c)for(c-=1;0<=c;c-=1){var h=a[c],k=h.handleNodeChange(d);k?b!==k&&(e.detachPosition(b,h),e.attachPosition(k,h)):e.detachPosition(b,h)}}},_updatePositionsForInsertNodeEvent:function(d){var b=d.newNode.previousSibling(),a=d.newNode.nextSibling(),c=d.newNode.isRootContainer(),h=c&&d.referenceSibling!==b,c=c&&d.referenceSibling!==
a;b&&!h&&e._updateAdjacentPositions(b.endNode(),d,!0);a&&!c&&e._updateAdjacentPositions(a.startNode(),d,!1)},_updateAdjacentPositions:function(d,b,a){var c=e.getPositions(d);if(c.length)for(var h=c.length-1;0<=h;h-=1){var f=c[h],g=f.handleSiblingNodeChange(b,a);d!==g&&(e.detachPosition(d,f),e.attachPosition(g,f))}},queueEvent:function(d){e.pendingEvents.push(d)},firePendingEvents:function(){for(;0<e.pendingEvents.length;){var d=e.pendingEvents;e.pendingEvents=[];for(var b=0;b<d.length;b++)d[b]()}},
attachPosition:function(d,b){d.positionsSet||(d.positionsSet=g.createSet());d.positionsSet.add(b)},detachPosition:function(d,b){d.positionsSet.delete(b)},isPositionAttached:function(d){var b=d.getNode();return b&&b.positionsSet&&b.positionsSet.has(d)},getPositions:function(d){var b=[];(d=d&&d.positionsSet)&&d.forEach(function(a){b.push(a)});return b},isPositionInRange:function(d,b){var a=d.getLineColumn(),c=a.line,a=a.column,h=b.getStartPosition().getLineColumn(),e=h.line,h=h.column,f=b.getEndPosition().getLineColumn(),
g=f.line,f=f.column;return(c>e||c===e&&a>=h)&&(c<g||c===g&&a<=f)},comparePositions:function(d,b){var a=d.getLineColumn(),c=b.getLineColumn();return a.line===c.line?a.column-c.column:a.line-c.line}}})},"MW/rtc/model/events/nodechange/NodeChangeEventTypes":function(){define([],function(){return{DELETE_NODE:"deleteNode",DELETE_TEXT:"deleteText",INSERT_NODE:"insertNode",INSERT_TEXT:"insertText",MERGE_NODE:"mergeNode",SPLIT_NODE:"splitNode",UPDATE_ATTRIBUTES:"updateAttributes"}})},"MW/rtc/model/Range":function(){define(["dojo/_base/declare"],
function(g){return g(null,{_startPosition:null,_endPosition:null,constructor:function(f,e){this._startPosition=f;this._endPosition=e},destroy:function(){this._startPosition.destroy();this._endPosition.destroy()},getStartPosition:function(){return this._startPosition},getEndPosition:function(){return this._endPosition},isEqualTo:function(f){return!!f&&this.constructor===f.constructor&&this._startPosition.isEqualTo(f._startPosition)&&this._endPosition.isEqualTo(f._endPosition)}})})},"MW/rtc/model/UnicodeCategories":function(){define([],
function(){var g;return g={unicodeCategories:{Cn:"\u0378\u0379\u037f-\u0383\u038b\u038d\u03a2\u0528-\u0530\u0557\u0558\u0560\u0588\u058b-\u0590\u05c8-\u05cf\u05eb-\u05ef\u05f5-\u05ff\u0604\u0605\u061c\u061d\u070e\u074b\u074c\u07b2-\u07bf\u07fb-\u07ff\u082e\u082f\u083f\u085c\u085d\u085f-\u08ff\u0978\u0980\u0984\u098d\u098e\u0991\u0992\u09a9\u09b1\u09b3-\u09b5\u09ba\u09bb\u09c5\u09c6\u09c9\u09ca\u09cf-\u09d6\u09d8-\u09db\u09de\u09e4\u09e5\u09fc-\u0a00\u0a04\u0a0b-\u0a0e\u0a11\u0a12\u0a29\u0a31\u0a34\u0a37\u0a3a\u0a3b\u0a3d\u0a43-\u0a46\u0a49\u0a4a\u0a4e-\u0a50\u0a52-\u0a58\u0a5d\u0a5f-\u0a65\u0a76-\u0a80\u0a84\u0a8e\u0a92\u0aa9\u0ab1\u0ab4\u0aba\u0abb\u0ac6\u0aca\u0ace\u0acf\u0ad1-\u0adf\u0ae4\u0ae5\u0af0\u0af2-\u0b00\u0b04\u0b0d\u0b0e\u0b11\u0b12\u0b29\u0b31\u0b34\u0b3a\u0b3b\u0b45\u0b46\u0b49\u0b4a\u0b4e-\u0b55\u0b58-\u0b5b\u0b5e\u0b64\u0b65\u0b78-\u0b81\u0b84\u0b8b-\u0b8d\u0b91\u0b96-\u0b98\u0b9b\u0b9d\u0ba0-\u0ba2\u0ba5-\u0ba7\u0bab-\u0bad\u0bba-\u0bbd\u0bc3-\u0bc5\u0bc9\u0bce\u0bcf\u0bd1-\u0bd6\u0bd8-\u0be5\u0bfb-\u0c00\u0c04\u0c0d\u0c11\u0c29\u0c34\u0c3a-\u0c3c\u0c45\u0c49\u0c4e-\u0c54\u0c57\u0c5a-\u0c5f\u0c64\u0c65\u0c70-\u0c77\u0c80\u0c81\u0c84\u0c8d\u0c91\u0ca9\u0cb4\u0cba\u0cbb\u0cc5\u0cc9\u0cce-\u0cd4\u0cd7-\u0cdd\u0cdf\u0ce4\u0ce5\u0cf0\u0cf3-\u0d01\u0d04\u0d0d\u0d11\u0d3b\u0d3c\u0d45\u0d49\u0d4f-\u0d56\u0d58-\u0d5f\u0d64\u0d65\u0d76-\u0d78\u0d80\u0d81\u0d84\u0d97-\u0d99\u0db2\u0dbc\u0dbe\u0dbf\u0dc7-\u0dc9\u0dcb-\u0dce\u0dd5\u0dd7\u0de0-\u0df1\u0df5-\u0e00\u0e3b-\u0e3e\u0e5c-\u0e80\u0e83\u0e85\u0e86\u0e89\u0e8b\u0e8c\u0e8e-\u0e93\u0e98\u0ea0\u0ea4\u0ea6\u0ea8\u0ea9\u0eac\u0eba\u0ebe\u0ebf\u0ec5\u0ec7\u0ece\u0ecf\u0eda\u0edb\u0ede-\u0eff\u0f48\u0f6d-\u0f70\u0f98\u0fbd\u0fcd\u0fdb-\u0fff\u10c6-\u10cf\u10fd-\u10ff\u1249\u124e\u124f\u1257\u1259\u125e\u125f\u1289\u128e\u128f\u12b1\u12b6\u12b7\u12bf\u12c1\u12c6\u12c7\u12d7\u1311\u1316\u1317\u135b\u135c\u137d-\u137f\u139a-\u139f\u13f5-\u13ff\u169d-\u169f\u16f1-\u16ff\u170d\u1715-\u171f\u1737-\u173f\u1754-\u175f\u176d\u1771\u1774-\u177f\u17de\u17df\u17ea-\u17ef\u17fa-\u17ff\u180f\u181a-\u181f\u1878-\u187f\u18ab-\u18af\u18f6-\u18ff\u191d-\u191f\u192c-\u192f\u193c-\u193f\u1941-\u1943\u196e\u196f\u1975-\u197f\u19ac-\u19af\u19ca-\u19cf\u19db-\u19dd\u1a1c\u1a1d\u1a5f\u1a7d\u1a7e\u1a8a-\u1a8f\u1a9a-\u1a9f\u1aae-\u1aff\u1b4c-\u1b4f\u1b7d-\u1b7f\u1bab-\u1bad\u1bba-\u1bbf\u1bf4-\u1bfb\u1c38-\u1c3a\u1c4a-\u1c4c\u1c80-\u1ccf\u1cf3-\u1cff\u1de7-\u1dfb\u1f16\u1f17\u1f1e\u1f1f\u1f46\u1f47\u1f4e\u1f4f\u1f58\u1f5a\u1f5c\u1f5e\u1f7e\u1f7f\u1fb5\u1fc5\u1fd4\u1fd5\u1fdc\u1ff0\u1ff1\u1ff5\u1fff\u2065-\u2069\u2072\u2073\u208f\u209d-\u209f\u20ba-\u20cf\u20f1-\u20ff\u218a-\u218f\u23f4-\u23ff\u2427-\u243f\u244b-\u245f\u2700\u27cb\u27cd\u2b4d-\u2b4f\u2b5a-\u2bff\u2c2f\u2c5f\u2cf2-\u2cf8\u2d26-\u2d2f\u2d66-\u2d6e\u2d71-\u2d7e\u2d97-\u2d9f\u2da7\u2daf\u2db7\u2dbf\u2dc7\u2dcf\u2dd7\u2ddf\u2e32-\u2e7f\u2e9a\u2ef4-\u2eff\u2fd6-\u2fef\u2ffc-\u2fff\u3040\u3097\u3098\u3100-\u3104\u312e-\u3130\u318f\u31bb-\u31bf\u31e4-\u31ef\u321f\u32ff\u4db6-\u4dbf\u9fcc-\u9fff\ua48d-\ua48f\ua4c7-\ua4cf\ua62c-\ua63f\ua674-\ua67b\ua698-\ua69f\ua6f8-\ua6ff\ua78f\ua792-\ua79f\ua7aa-\ua7f9\ua82c-\ua82f\ua83a-\ua83f\ua878-\ua87f\ua8c5-\ua8cd\ua8da-\ua8df\ua8fc-\ua8ff\ua954-\ua95e\ua97d-\ua97f\ua9ce\ua9da-\ua9dd\ua9e0-\ua9ff\uaa37-\uaa3f\uaa4e\uaa4f\uaa5a\uaa5b\uaa7c-\uaa7f\uaac3-\uaada\uaae0-\uab00\uab07\uab08\uab0f\uab10\uab17-\uab1f\uab27\uab2f-\uabbf\uabee\uabef\uabfa-\uabff\ud7a4-\ud7af\ud7c7-\ud7ca\ud7fc-\ud7ff\ufa2e\ufa2f\ufa6e\ufa6f\ufada-\ufaff\ufb07-\ufb12\ufb18-\ufb1c\ufb37\ufb3d\ufb3f\ufb42\ufb45\ufbc2-\ufbd2\ufd40-\ufd4f\ufd90\ufd91\ufdc8-\ufdef\ufdfe\ufdff\ufe1a-\ufe1f\ufe27-\ufe2f\ufe53\ufe67\ufe6c-\ufe6f\ufe75\ufefd\ufefe\uff00\uffbf-\uffc1\uffc8\uffc9\uffd0\uffd1\uffd8\uffd9\uffdd-\uffdf\uffe7\uffef-\ufff8\ufffe\uffff",
Lu:"A-Z\u00c0-\u00d6\u00d8-\u00de\u0100\u0102\u0104\u0106\u0108\u010a\u010c\u010e\u0110\u0112\u0114\u0116\u0118\u011a\u011c\u011e\u0120\u0122\u0124\u0126\u0128\u012a\u012c\u012e\u0130\u0132\u0134\u0136\u0139\u013b\u013d\u013f\u0141\u0143\u0145\u0147\u014a\u014c\u014e\u0150\u0152\u0154\u0156\u0158\u015a\u015c\u015e\u0160\u0162\u0164\u0166\u0168\u016a\u016c\u016e\u0170\u0172\u0174\u0176\u0178\u0179\u017b\u017d\u0181\u0182\u0184\u0186\u0187\u0189-\u018b\u018e-\u0191\u0193\u0194\u0196-\u0198\u019c\u019d\u019f\u01a0\u01a2\u01a4\u01a6\u01a7\u01a9\u01ac\u01ae\u01af\u01b1-\u01b3\u01b5\u01b7\u01b8\u01bc\u01c4\u01c7\u01ca\u01cd\u01cf\u01d1\u01d3\u01d5\u01d7\u01d9\u01db\u01de\u01e0\u01e2\u01e4\u01e6\u01e8\u01ea\u01ec\u01ee\u01f1\u01f4\u01f6-\u01f8\u01fa\u01fc\u01fe\u0200\u0202\u0204\u0206\u0208\u020a\u020c\u020e\u0210\u0212\u0214\u0216\u0218\u021a\u021c\u021e\u0220\u0222\u0224\u0226\u0228\u022a\u022c\u022e\u0230\u0232\u023a\u023b\u023d\u023e\u0241\u0243-\u0246\u0248\u024a\u024c\u024e\u0370\u0372\u0376\u0386\u0388-\u038a\u038c\u038e\u038f\u0391-\u03a1\u03a3-\u03ab\u03cf\u03d2-\u03d4\u03d8\u03da\u03dc\u03de\u03e0\u03e2\u03e4\u03e6\u03e8\u03ea\u03ec\u03ee\u03f4\u03f7\u03f9\u03fa\u03fd-\u042f\u0460\u0462\u0464\u0466\u0468\u046a\u046c\u046e\u0470\u0472\u0474\u0476\u0478\u047a\u047c\u047e\u0480\u048a\u048c\u048e\u0490\u0492\u0494\u0496\u0498\u049a\u049c\u049e\u04a0\u04a2\u04a4\u04a6\u04a8\u04aa\u04ac\u04ae\u04b0\u04b2\u04b4\u04b6\u04b8\u04ba\u04bc\u04be\u04c0\u04c1\u04c3\u04c5\u04c7\u04c9\u04cb\u04cd\u04d0\u04d2\u04d4\u04d6\u04d8\u04da\u04dc\u04de\u04e0\u04e2\u04e4\u04e6\u04e8\u04ea\u04ec\u04ee\u04f0\u04f2\u04f4\u04f6\u04f8\u04fa\u04fc\u04fe\u0500\u0502\u0504\u0506\u0508\u050a\u050c\u050e\u0510\u0512\u0514\u0516\u0518\u051a\u051c\u051e\u0520\u0522\u0524\u0526\u0531-\u0556\u10a0-\u10c5\u1e00\u1e02\u1e04\u1e06\u1e08\u1e0a\u1e0c\u1e0e\u1e10\u1e12\u1e14\u1e16\u1e18\u1e1a\u1e1c\u1e1e\u1e20\u1e22\u1e24\u1e26\u1e28\u1e2a\u1e2c\u1e2e\u1e30\u1e32\u1e34\u1e36\u1e38\u1e3a\u1e3c\u1e3e\u1e40\u1e42\u1e44\u1e46\u1e48\u1e4a\u1e4c\u1e4e\u1e50\u1e52\u1e54\u1e56\u1e58\u1e5a\u1e5c\u1e5e\u1e60\u1e62\u1e64\u1e66\u1e68\u1e6a\u1e6c\u1e6e\u1e70\u1e72\u1e74\u1e76\u1e78\u1e7a\u1e7c\u1e7e\u1e80\u1e82\u1e84\u1e86\u1e88\u1e8a\u1e8c\u1e8e\u1e90\u1e92\u1e94\u1e9e\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u1eb8\u1eba\u1ebc\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ec8\u1eca\u1ecc\u1ece\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1eda\u1edc\u1ede\u1ee0\u1ee2\u1ee4\u1ee6\u1ee8\u1eea\u1eec\u1eee\u1ef0\u1ef2\u1ef4\u1ef6\u1ef8\u1efa\u1efc\u1efe\u1f08-\u1f0f\u1f18-\u1f1d\u1f28-\u1f2f\u1f38-\u1f3f\u1f48-\u1f4d\u1f59\u1f5b\u1f5d\u1f5f\u1f68-\u1f6f\u1fb8-\u1fbb\u1fc8-\u1fcb\u1fd8-\u1fdb\u1fe8-\u1fec\u1ff8-\u1ffb\u2102\u2107\u210b-\u210d\u2110-\u2112\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u2130-\u2133\u213e\u213f\u2145\u2183\u2c00-\u2c2e\u2c60\u2c62-\u2c64\u2c67\u2c69\u2c6b\u2c6d-\u2c70\u2c72\u2c75\u2c7e-\u2c80\u2c82\u2c84\u2c86\u2c88\u2c8a\u2c8c\u2c8e\u2c90\u2c92\u2c94\u2c96\u2c98\u2c9a\u2c9c\u2c9e\u2ca0\u2ca2\u2ca4\u2ca6\u2ca8\u2caa\u2cac\u2cae\u2cb0\u2cb2\u2cb4\u2cb6\u2cb8\u2cba\u2cbc\u2cbe\u2cc0\u2cc2\u2cc4\u2cc6\u2cc8\u2cca\u2ccc\u2cce\u2cd0\u2cd2\u2cd4\u2cd6\u2cd8\u2cda\u2cdc\u2cde\u2ce0\u2ce2\u2ceb\u2ced\ua640\ua642\ua644\ua646\ua648\ua64a\ua64c\ua64e\ua650\ua652\ua654\ua656\ua658\ua65a\ua65c\ua65e\ua660\ua662\ua664\ua666\ua668\ua66a\ua66c\ua680\ua682\ua684\ua686\ua688\ua68a\ua68c\ua68e\ua690\ua692\ua694\ua696\ua722\ua724\ua726\ua728\ua72a\ua72c\ua72e\ua732\ua734\ua736\ua738\ua73a\ua73c\ua73e\ua740\ua742\ua744\ua746\ua748\ua74a\ua74c\ua74e\ua750\ua752\ua754\ua756\ua758\ua75a\ua75c\ua75e\ua760\ua762\ua764\ua766\ua768\ua76a\ua76c\ua76e\ua779\ua77b\ua77d\ua77e\ua780\ua782\ua784\ua786\ua78b\ua78d\ua790\ua7a0\ua7a2\ua7a4\ua7a6\ua7a8\uff21-\uff3a",
Ll:"a-z\u00aa\u00b5\u00ba\u00df-\u00f6\u00f8-\u00ff\u0101\u0103\u0105\u0107\u0109\u010b\u010d\u010f\u0111\u0113\u0115\u0117\u0119\u011b\u011d\u011f\u0121\u0123\u0125\u0127\u0129\u012b\u012d\u012f\u0131\u0133\u0135\u0137\u0138\u013a\u013c\u013e\u0140\u0142\u0144\u0146\u0148\u0149\u014b\u014d\u014f\u0151\u0153\u0155\u0157\u0159\u015b\u015d\u015f\u0161\u0163\u0165\u0167\u0169\u016b\u016d\u016f\u0171\u0173\u0175\u0177\u017a\u017c\u017e-\u0180\u0183\u0185\u0188\u018c\u018d\u0192\u0195\u0199-\u019b\u019e\u01a1\u01a3\u01a5\u01a8\u01aa\u01ab\u01ad\u01b0\u01b4\u01b6\u01b9\u01ba\u01bd-\u01bf\u01c6\u01c9\u01cc\u01ce\u01d0\u01d2\u01d4\u01d6\u01d8\u01da\u01dc\u01dd\u01df\u01e1\u01e3\u01e5\u01e7\u01e9\u01eb\u01ed\u01ef\u01f0\u01f3\u01f5\u01f9\u01fb\u01fd\u01ff\u0201\u0203\u0205\u0207\u0209\u020b\u020d\u020f\u0211\u0213\u0215\u0217\u0219\u021b\u021d\u021f\u0221\u0223\u0225\u0227\u0229\u022b\u022d\u022f\u0231\u0233-\u0239\u023c\u023f\u0240\u0242\u0247\u0249\u024b\u024d\u024f-\u0293\u0295-\u02af\u0371\u0373\u0377\u037b-\u037d\u0390\u03ac-\u03ce\u03d0\u03d1\u03d5-\u03d7\u03d9\u03db\u03dd\u03df\u03e1\u03e3\u03e5\u03e7\u03e9\u03eb\u03ed\u03ef-\u03f3\u03f5\u03f8\u03fb\u03fc\u0430-\u045f\u0461\u0463\u0465\u0467\u0469\u046b\u046d\u046f\u0471\u0473\u0475\u0477\u0479\u047b\u047d\u047f\u0481\u048b\u048d\u048f\u0491\u0493\u0495\u0497\u0499\u049b\u049d\u049f\u04a1\u04a3\u04a5\u04a7\u04a9\u04ab\u04ad\u04af\u04b1\u04b3\u04b5\u04b7\u04b9\u04bb\u04bd\u04bf\u04c2\u04c4\u04c6\u04c8\u04ca\u04cc\u04ce\u04cf\u04d1\u04d3\u04d5\u04d7\u04d9\u04db\u04dd\u04df\u04e1\u04e3\u04e5\u04e7\u04e9\u04eb\u04ed\u04ef\u04f1\u04f3\u04f5\u04f7\u04f9\u04fb\u04fd\u04ff\u0501\u0503\u0505\u0507\u0509\u050b\u050d\u050f\u0511\u0513\u0515\u0517\u0519\u051b\u051d\u051f\u0521\u0523\u0525\u0527\u0561-\u0587\u1d00-\u1d2b\u1d62-\u1d77\u1d79-\u1d9a\u1e01\u1e03\u1e05\u1e07\u1e09\u1e0b\u1e0d\u1e0f\u1e11\u1e13\u1e15\u1e17\u1e19\u1e1b\u1e1d\u1e1f\u1e21\u1e23\u1e25\u1e27\u1e29\u1e2b\u1e2d\u1e2f\u1e31\u1e33\u1e35\u1e37\u1e39\u1e3b\u1e3d\u1e3f\u1e41\u1e43\u1e45\u1e47\u1e49\u1e4b\u1e4d\u1e4f\u1e51\u1e53\u1e55\u1e57\u1e59\u1e5b\u1e5d\u1e5f\u1e61\u1e63\u1e65\u1e67\u1e69\u1e6b\u1e6d\u1e6f\u1e71\u1e73\u1e75\u1e77\u1e79\u1e7b\u1e7d\u1e7f\u1e81\u1e83\u1e85\u1e87\u1e89\u1e8b\u1e8d\u1e8f\u1e91\u1e93\u1e95-\u1e9d\u1e9f\u1ea1\u1ea3\u1ea5\u1ea7\u1ea9\u1eab\u1ead\u1eaf\u1eb1\u1eb3\u1eb5\u1eb7\u1eb9\u1ebb\u1ebd\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ec9\u1ecb\u1ecd\u1ecf\u1ed1\u1ed3\u1ed5\u1ed7\u1ed9\u1edb\u1edd\u1edf\u1ee1\u1ee3\u1ee5\u1ee7\u1ee9\u1eeb\u1eed\u1eef\u1ef1\u1ef3\u1ef5\u1ef7\u1ef9\u1efb\u1efd\u1eff-\u1f07\u1f10-\u1f15\u1f20-\u1f27\u1f30-\u1f37\u1f40-\u1f45\u1f50-\u1f57\u1f60-\u1f67\u1f70-\u1f7d\u1f80-\u1f87\u1f90-\u1f97\u1fa0-\u1fa7\u1fb0-\u1fb4\u1fb6\u1fb7\u1fbe\u1fc2-\u1fc4\u1fc6\u1fc7\u1fd0-\u1fd3\u1fd6\u1fd7\u1fe0-\u1fe7\u1ff2-\u1ff4\u1ff6\u1ff7\u210a\u210e\u210f\u2113\u212f\u2134\u2139\u213c\u213d\u2146-\u2149\u214e\u2184\u2c30-\u2c5e\u2c61\u2c65\u2c66\u2c68\u2c6a\u2c6c\u2c71\u2c73\u2c74\u2c76-\u2c7c\u2c81\u2c83\u2c85\u2c87\u2c89\u2c8b\u2c8d\u2c8f\u2c91\u2c93\u2c95\u2c97\u2c99\u2c9b\u2c9d\u2c9f\u2ca1\u2ca3\u2ca5\u2ca7\u2ca9\u2cab\u2cad\u2caf\u2cb1\u2cb3\u2cb5\u2cb7\u2cb9\u2cbb\u2cbd\u2cbf\u2cc1\u2cc3\u2cc5\u2cc7\u2cc9\u2ccb\u2ccd\u2ccf\u2cd1\u2cd3\u2cd5\u2cd7\u2cd9\u2cdb\u2cdd\u2cdf\u2ce1\u2ce3\u2ce4\u2cec\u2cee\u2d00-\u2d25\ua641\ua643\ua645\ua647\ua649\ua64b\ua64d\ua64f\ua651\ua653\ua655\ua657\ua659\ua65b\ua65d\ua65f\ua661\ua663\ua665\ua667\ua669\ua66b\ua66d\ua681\ua683\ua685\ua687\ua689\ua68b\ua68d\ua68f\ua691\ua693\ua695\ua697\ua723\ua725\ua727\ua729\ua72b\ua72d\ua72f-\ua731\ua733\ua735\ua737\ua739\ua73b\ua73d\ua73f\ua741\ua743\ua745\ua747\ua749\ua74b\ua74d\ua74f\ua751\ua753\ua755\ua757\ua759\ua75b\ua75d\ua75f\ua761\ua763\ua765\ua767\ua769\ua76b\ua76d\ua76f\ua771-\ua778\ua77a\ua77c\ua77f\ua781\ua783\ua785\ua787\ua78c\ua78e\ua791\ua7a1\ua7a3\ua7a5\ua7a7\ua7a9\ua7fa\ufb00-\ufb06\ufb13-\ufb17\uff41-\uff5a",
Lt:"\u01c5\u01c8\u01cb\u01f2\u1f88-\u1f8f\u1f98-\u1f9f\u1fa8-\u1faf\u1fbc\u1fcc\u1ffc",Lm:"\u02b0-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0374\u037a\u0559\u0640\u06e5\u06e6\u07f4\u07f5\u07fa\u081a\u0824\u0828\u0971\u0e46\u0ec6\u10fc\u17d7\u1843\u1aa7\u1c78-\u1c7d\u1d2c-\u1d61\u1d78\u1d9b-\u1dbf\u2071\u207f\u2090-\u209c\u2c7d\u2d6f\u2e2f\u3005\u3031-\u3035\u303b\u309d\u309e\u30fc-\u30fe\ua015\ua4f8-\ua4fd\ua60c\ua67f\ua717-\ua71f\ua770\ua788\ua9cf\uaa70\uaadd\uff70\uff9e\uff9f",Lo:"\u01bb\u01c0-\u01c3\u0294\u05d0-\u05ea\u05f0-\u05f2\u0620-\u063f\u0641-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u0800-\u0815\u0840-\u0858\u0904-\u0939\u093d\u0950\u0958-\u0961\u0972-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e45\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0edc\u0edd\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10d0-\u10fa\u1100-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17dc\u1820-\u1842\u1844-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bc0-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c77\u1ce9-\u1cec\u1cee-\u1cf1\u2135-\u2138\u2d30-\u2d65\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3006\u303c\u3041-\u3096\u309f\u30a1-\u30fa\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcb\ua000-\ua014\ua016-\ua48c\ua4d0-\ua4f7\ua500-\ua60b\ua610-\ua61f\ua62a\ua62b\ua66e\ua6a0-\ua6e5\ua7fb-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa6f\uaa71-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb\uaadc\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa2d\ufa30-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff66-\uff6f\uff71-\uff9d\uffa0-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc",
Mn:"\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u0900-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962\u0963\u0981\u09bc\u09c1-\u09c4\u09cd\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b62\u0b63\u0b82\u0bc0\u0bcd\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc6\u0ccc\u0ccd\u0ce2\u0ce3\u0d41-\u0d44\u0d4d\u0d62\u0d63\u0dca\u0dd2-\u0dd4\u0dd6\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1be6\u1be8\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfc-\u1dff\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe26",
Nd:"0-9\u0660-\u0669\u06f0-\u06f9\u07c0-\u07c9\u0966-\u096f\u09e6-\u09ef\u0a66-\u0a6f\u0ae6-\u0aef\u0b66-\u0b6f\u0be6-\u0bef\u0c66-\u0c6f\u0ce6-\u0cef\u0d66-\u0d6f\u0e50-\u0e59\u0ed0-\u0ed9\u0f20-\u0f29\u1040-\u1049\u1090-\u1099\u17e0-\u17e9\u1810-\u1819\u1946-\u194f\u19d0-\u19d9\u1a80-\u1a89\u1a90-\u1a99\u1b50-\u1b59\u1bb0-\u1bb9\u1c40-\u1c49\u1c50-\u1c59\ua620-\ua629\ua8d0-\ua8d9\ua900-\ua909\ua9d0-\ua9d9\uaa50-\uaa59\uabf0-\uabf9\uff10-\uff19",Nl:"\u16ee-\u16f0\u2160-\u2182\u2185-\u2188\u3007\u3021-\u3029\u3038-\u303a\ua6e6-\ua6ef",
No:"\u00b2\u00b3\u00b9\u00bc-\u00be\u09f4-\u09f9\u0b72-\u0b77\u0bf0-\u0bf2\u0c78-\u0c7e\u0d70-\u0d75\u0f2a-\u0f33\u1369-\u137c\u17f0-\u17f9\u19da\u2070\u2074-\u2079\u2080-\u2089\u2150-\u215f\u2189\u2460-\u249b\u24ea-\u24ff\u2776-\u2793\u2cfd\u3192-\u3195\u3220-\u3229\u3251-\u325f\u3280-\u3289\u32b1-\u32bf\ua830-\ua835",Sk:"^`\u00a8\u00af\u00b4\u00b8\u02c2-\u02c5\u02d2-\u02df\u02e5-\u02eb\u02ed\u02ef-\u02ff\u0375\u0384\u0385\u1fbd\u1fbf-\u1fc1\u1fcd-\u1fcf\u1fdd-\u1fdf\u1fed-\u1fef\u1ffd\u1ffe\u309b\u309c\ua700-\ua716\ua720\ua721\ua789\ua78a\ufbb2-\ufbc1\uff3e\uff40\uffe3"},
unicodeWordCharacters:function(){return"Lu Ll Lt Lm Lo Mn Nd Nl No Sk".split(" ").reduce(function(f,e){return f+g.unicodeCategories[e]},"")}}})},"MW/rtc/model/events/DocumentEvent":function(){define(["dojo/_base/declare","MW/rtc/model/DocumentEventUtilities","./DocumentEventBase"],function(g,f,e){return{create:function(d,b){f.assertValidLines(d,b,"DocumentEvent");return new e(d,b)}}})},"MW/rtc/model/DocumentEventUtilities":function(){define("dojo/_base/lang MW/rtc/browsersupport/BrowserSupportUtilities mw-log/Log MW/rtc/model/DocumentConstants MW/rtc/model/DocumentUtilities MW/rtc/model/events/DocumentEventBase MW/rtc/model/events/UndoableEvent ./Mutation".split(" "),
function(g,f,e,d,b,a,c,h){return{_INVALID_START_LINE:"Invalid start line provided for ",_INVALID_END_LINE:"Invalid end line provided for ",_EVENT_PAYLOAD_SHOULD_BE_ARRAY:"Event payload should be an array",_EVENT_ARRAY_NON_EMPTY:"Event array should be non-empty",_EVENT_NOT_DOCUMENT_EVENT_BASE:"Event object not an instance of DocumentEventBase",hasEventType:function(a,c){return!a||1>a.length||!c?!1:a.some(function(a){return a&&a.type===c})},getEventsOfType:function(a,c){return!a||1>a.length||!c?[]:
a.filter(function(a){return a&&a.type===c})},isLengthChangingEvent:function(a){a=a.getMutation().getData();return 0!==this._calculateLineChanges(a)},isMultiLineEvent:function(a,c){if(!a||1>a.length||!c)return!1;var b=[];return a.some(function(a){if(!a)return!1;if(a.type===d.INSERT_BREAK_EVENT)return!0;if(a.type!==d.INSERT_TEXT)return!1;if(a.startLine!==a.endLine)return!0;if(0===b.length)return b.push(a.startLine),!1;if(0>b.indexOf(a.startLine))return!0})},getLineNodesFromEvents:function(a,c){if(!a||
1>a.length||!c)return[];var b=[];this._getCoalescedDocumentMutations(a).forEach(function(a){for(var d=a.to[0];d<=a.to[1];d++){var h=c.getLineNode(d);h&&b.push(h)}},this);return b},toLengthChangeEvent:function(a){a=this.getNumberOfLinesChanged(a);return 0===a?null:{type:d.NUMBER_OF_LINES_CHANGED,change:a}},getNumberOfLinesChanged:function(a){a=this._getCoalescedDocumentMutations(a);return 0===a.length?0:this._calculateOverallLineChanges(a)},assertValidEventPayload:function(c){b.assert(Array.isArray(c),
this._EVENT_PAYLOAD_SHOULD_BE_ARRAY);b.assert(0<c.length,this._EVENT_ARRAY_NON_EMPTY);c.forEach(function(c){b.assert(c.isInstanceOf(a),this._EVENT_NOT_DOCUMENT_EVENT_BASE)},this)},assertValidLines:function(a,c,d){b.assert(this._isValidLine(a),this._INVALID_START_LINE+d);b.assert(this._isValidLine(c),this._INVALID_END_LINE+d)},_isValidLine:function(a){return"number"===typeof a&&-1<a},finalLineRangeFromEvents:function(a){a=this._getCoalescedDocumentMutations(a);return 0===a.length?null:{startLine:a[0].to[0],
endLine:a[a.length-1].to[1]}},translateEventsForUndo:function(a){this.assertValidEventPayload(a);return a.map(this._translateEventForUndo,this)},_translateEventForUndo:function(a){return!a.isInstanceOf(c)?a:a.getUndoEvent()},allEventsOfSameType:function(a){e.assert(0!==a.length,"Events input array cannot be empty");var c=a[0].type;return a.every(function(a){return a.type===c})},getCoalescedDocumentMutations:function(a){return this._getCoalescedDocumentMutations(a).map(function(a){return h.create(a.from[0],
a.from[1],a.to[0],a.to[1])})},_getCoalescedDocumentMutations:function(a){return!a?[]:this._getRawMutations(a).reduce(this._reduceMutation.bind(this),[])},_getRawMutations:function(a){return a.map(function(a){return a.getMutation().getData()},this)},_reduceMutation:function(a,c){var b=this._partitionOverlappingMutations(a,c),d=b.notOverlapping,b=this._getMergedMutation(b.overlapping,c);d.push(b);d.sort(function(a,c){return a.from[0]-c.from[0]});var h=this._calculateLineChanges(c);return this._accountForNumberOfLinesChanging(d,
b,h)},_getMergedMutation:function(a,c){return 0!==a.length?this._mergeOverlappingMutations(a,c):c},_mergeOverlappingMutations:function(a,c){var b={from:[-1,-1],to:[-1,-1]},d=a[0],h=a[a.length-1];b.from[0]=c.from[0]<d.to[0]?d.from[0]-(d.to[0]-c.from[0]):d.from[0];b.from[1]=c.from[1]>h.to[1]?h.from[1]+(c.from[1]-h.to[1]):h.from[1];b.to[0]=Math.min(d.to[0],c.to[0]);d=this._calculateLineChanges(c);b.to[1]=Math.max(h.to[1]+d,c.to[1]);return b},_calculateLineChanges:function(a){return a.to[1]-a.to[0]-(a.from[1]-
a.from[0])},_calculateOverallLineChanges:function(a){if(0===a.length)return 0;var c=a[0];a=a[a.length-1];return a.to[1]-c.to[0]-(a.from[1]-c.from[0])},_accountForNumberOfLinesChanging:function(a,c,b){c=a.indexOf(c);return this._shiftMutationsBelow(b,c+1,a)},_shiftMutationsBelow:function(a,c,b){if(0==a)return b;b.slice(c).forEach(function(c){c.to[0]+=a;c.to[1]+=a});return b},_partitionOverlappingMutations:function(a,c){var b=[],d=[];a.forEach(function(a){this._isRangeOverlapping(a.to,c.from)?b.push(a):
d.push(a)},this);return{overlapping:b,notOverlapping:d}},_isRangeOverlapping:function(a,c){return a[0]<=c[0]&&a[1]>=c[0]||c[0]<=a[0]&&c[1]>=a[0]}}})},"MW/rtc/model/DocumentConstants":function(){define([],function(){return{INSERT_TEXT:"insertText",INSERT_BREAK_EVENT:"insertBreak",DELETION_EVENT:"deleteSelection",FORMAT_CHANGE_EVENT:"formatChange",NUMBER_OF_LINES_CHANGED:"numberOfLinesChanged",READONLY_STATE_CHANGE_EVENT:"readOnlyStateChange",FORWARD_DELETE:1,BACKWARD_DELETE:-1}})},"MW/rtc/model/events/DocumentEventBase":function(){define(["dojo/_base/declare",
"MW/rtc/model/Mutation"],function(g,f){return g(null,{constructor:function(e,d){this.startLine=e;this.endLine=d},getMutation:function(){return f.createFromEvent(this,f.MUTATION_TYPE.INPLACE)},destroy:function(){this.endLine=this.startLine=-1}})})},"MW/rtc/model/Mutation":function(){define(["dojo/_base/declare"],function(g){var f=g([],{constructor:function(e,d,b,a){this._mutation={from:[e,d],to:[b,a]}},getToRange:function(){return{start:this._mutation.to[0],end:this._mutation.to[1]}},getFromRange:function(){return{start:this._mutation.from[0],
end:this._mutation.from[1]}},getData:function(){return this._mutation},destroy:function(){}});return{MUTATION_TYPE:{INSERTION:"insertion",DELETION:"deletion",INPLACE:"inplace"},createFromEvent:function(e,d){switch(d){case this.MUTATION_TYPE.INSERTION:return this.create(e.startLine,e.startLine,e.startLine,e.endLine);case this.MUTATION_TYPE.DELETION:return this.create(e.startLine,e.endLine,e.startLine,e.startLine);default:return this.create(e.startLine,e.endLine,e.startLine,e.endLine)}},create:function(e,
d,b,a){return f(e,d,b,a)}}})},"MW/rtc/model/events/UndoableEvent":function(){define(["dojo/_base/declare","./DocumentEventBase"],function(g,f){return g(f,{getUndoEvent:function(){throw Error("Unimplemented API: MW.rtc.model.events.UndoableEvent.getUndoEvent");}})})},"MW/rtc/model/NodeUtilities":function(){define(["dojo/_base/array","MW/rtc/browsersupport/BrowserSupportUtilities","MW/rtc/nodes/Node"],function(g,f,e){return{getStyleAttributesFromRange:function(d,b){var a={};this.leafNodesInRangeIterator(d,
b,function(c){c=c.getStyleAttributes();for(var b in c)c.hasOwnProperty(b)&&(a.hasOwnProperty(b)?a[b]!==c[b]&&(a[b]=void 0):a[b]=c[b])});return a},getLineage:function(d){for(var b=[];d;)b.unshift(d),d=d.parent;return b},getLineageReverse:function(d){return this.getLineage(d).reverse()},getCommonAncestors:function(d,b){for(var a=this.getLineage(d),c=this.getLineage(b),h=0;h<a.length;h+=1)if(a[h]!==c[h])return a.slice(0,h);return a},getParagraphNodesInRange:function(d,b,a){d=d.rootContainer();b=b.rootContainer();
var c=[];this.siblingNodesInRangeIterator(d,b,function(b){(!a||b instanceof a)&&c.push(b)});return c},getNodesInRange:function(d,b){var a=[];this.leafNodesInRangeIterator(d,b,function(c){a.push(c)});return a},getParagraphNodesInRangeAsSet:function(d,b){d=d.rootContainer();b=b.rootContainer();var a=f.createSet();this.siblingNodesInRangeIterator(d,b,function(c){a.add(c)});return a},getParagraphFormat:function(d){var b=d.startNode.rootContainer();d=d.endNode.rootContainer();var a=b.containerType();if(d.containerType()!==
a)return"none";this.siblingNodesInRangeIterator(b,d,function(c){if(c.isTextContainerNode()&&c.containerType()!==a)return a="none",!0});return a},getLineNumberForNode:function(d,b){return b.getLineNumber(d.rootContainer())},getContainersOfNodeType:function(d,b){var a=[];b.root.children.forEach(function(c){this.isInType(c,d)&&a.push(c)},this);return a},getFullRange:function(d,b){d.isTextContainerNode()&&(d=d.startNode());b.isTextContainerNode()&&(b=b.endNode());var a=b.maxOffset();return{start:{node:d,
offset:0},end:{node:b,offset:a}}},searchNodeById:function(d,b){var a;if(b.uid===d)return b;var c;if(b.children)for(c=0;c<b.children.length&&!(a=this.searchNodeById(d,b.children[c]));c+=1);return a},isContinuousFormat:function(d){return"none"!==this.getParagraphFormat(d)},isInType:function(d,b){return!d?!1:d.isInstanceOf(b)?!0:d.parent?this.isInType(d.parent,b):!1},getClosestAncestorOfType:function(d,b){return!d?null:d.isInstanceOf(b)?d:d.parent?this.getClosestAncestorOfType(d.parent,b):null},isRangeNodeType:function(d,
b,a){b=b.rootContainer();if(!(b instanceof a))return!1;var c=!0;d=d.rootContainer();this.siblingNodesInRangeIterator(d,b,function(b){if(!(b instanceof a))return c=!1,!0});return c},isNodeTypeInRange:function(d,b,a){b=b.rootContainer();if(b instanceof a)return!0;var c=!1;d=d.rootContainer();this.siblingNodesInRangeIterator(d,b,function(b){if(b instanceof a)return c=!0});return c},isFreestandingOpaque:function(d){if(d.getText().trim()!==d.textContainer().getText().trim())return!1;var b=d.textContainer(),
a,c;for(a=0;a<b.children.length;a+=1)if(c=b.children[a],c.containsTextNodes()||!c.isTextNode()&&c.className!==d.className)return!1;return!0},isNode:function(d,b){b=b||e;return d&&d.isInstanceOf(b)},forAllDescendants:function(d,b){d.forEach(function(a){b(a);a.children&&this.forAllDescendants(a.children,b)},this)},siblingNodesInRangeIterator:function(d,b,a){this._assert(d&&b,"Start node or end node not provided");this._assert(d.parent===b.parent,"Start node and end node should be in the same layer");
if(d===b)return!!a(d);for(var c=d.parent.children,h=f.indexOf(c,d);d;){if(a(d))return!0;if(d===b)break;h+=1;d=c[h]}return!1},textContainerNodesInRangeIterator:function(d,b,a){var c=null;this.leafNodesInRangeIterator(d,b,function(b){b=b.textContainer();if(b===c)return!1;if(a(b))return!0;c=b})},leafNodesInRangeIterator:function(d,b,a){this._assert(d&&b,"Start node or end node not provided");var c=d.rootContainer(),h=b.rootContainer();return!c||!h?this._leafNodesInRangeIterator(d,b,a):this.siblingNodesInRangeIterator(c,
h,function(e){if(e.children&&0<e.children.length){var f=d,g=b;e===c&&e!==h?g=c.endNode():e!==c&&e===h?f=h.startNode():c!==h&&(f=e.startNode(),g=e.endNode());return this._leafNodesInRangeIterator(f,g,a)}}.bind(this))},_leafNodesInRangeIterator:function(d,b,a){for(;d;){if(a(d))return!0;if(d===b)break;d=d.nextNode()}return!1},setNodeAttributes:function(d,b){for(var a in b)d.hasOwnProperty(a)&&(d[a]=b[a]);return d},setAttributesForNodes:function(d,b){d.forEach(function(a){return this.setNodeAttributes(a,
b)},this)},prevNode:function(d){return d?d.prevNode():null},nextNode:function(d){return d?d.nextNode():null},prevContainer:function(d){return d?d.rootContainer().previousSibling():null},nextContainer:function(d){return d?d.rootContainer().nextSibling():null},_assert:function(d,b){if(!d)throw Error(b);}}})},"MW/rtc/nodes/Node":function(){define("dojo/_base/declare mw-log/Log MW/rtc/browsersupport/BrowserSupportUtilities MW/rtc/model/Position MW/rtc/plugins/view/layoutmanager/rules/BaseGroupingRule mw-utils/Utils".split(" "),
function(g,f,e,d,b,a){return g(null,{constructor:function(){this.box=this.parent=null;this.readOnly=!1;this.uid=a.generateUuid();this.groupingType=b().groupingType},className:"Node",isRootNode:function(){return!1},isRootContainer:function(){return this.parent&&this.parent.isRootNode()},rootContainer:function(){for(var a=this,b=null;a.parent;)if(b=a,a=a.parent,a.isRootNode())return b;return null},isTextContainerNode:function(){return!1},isOpaqueNode:function(){return!1},isTextNode:function(){return!1},
textContainer:function(){for(var a=this;!a.isTextContainerNode();)if(a.parent)a=a.parent;else break;return a},isEmpty:function(){var a;if(this.children)for(a=0;a<this.children.length;a+=1)if(!this.children[a].isEmpty())return!1;return!0},containsTextNodes:function(){return!1},isReadOnly:function(){for(var a=this.readOnly,b=this;!a;)if(b.parent)b=b.parent,a=b.readOnly;else break;return a},isSameTypeAs:function(a){return this.className===a.className},updateAttributes:function(a){var b,d={};for(b in a)a.hasOwnProperty(b)&&
(d[b]=this[b],this[b]=a[b]);return d},deleteNode:function(){if(this.parent){var a=e.indexOf(this.parent.children,this);this.parent.removeChild(a)}},serialize:function(a){var b={className:this.className};this._serializeAttributes(b);if(a)return b;this.children&&(b.children=this.children.map(function(a){return a.serialize()}));return b},_serializeAttributes:function(a){},nextSibling:function(){var a=this.parent;if(!a)return null;var a=a.children,b=e.indexOf(a,this);return-1===b?null:a[b+1]||null},previousSibling:function(){var a=
this.parent;if(!a)return null;var a=a.children,b=e.indexOf(a,this);return-1===b?null:a[b-1]||null},nextNode:function(){var a=this.nextSibling();return a&&a.startNode()?a.startNode():this.parent?this.parent.nextNode():null},prevNode:function(){var a=this.previousSibling();return a&&a.endNode()?a.endNode():this.parent?this.parent.prevNode():null},depth:function(){return this.parent?this.parent.depth()+1:0},getTop:function(){return this.box?this.box.offsetTop:0},defaultHeight:18,getHeight:function(){if(this.box){var a=
this.box.offsetHeight;return 0<a?a:this.defaultHeight}return 0},getLeft:function(){return this.box?this.box.offsetLeft:0},getWidth:function(){return this.box?this.box.offsetWidth:0},getRight:function(a){a=a||this.getLeft();return this.box?a+this.getWidth():0},getBottom:function(a){a=a||this.getTop();return this.box?a+this.getHeight():0},getPositionFromOffset:function(a){f.assert(0<=a&&a<=this.maxOffset(),"Invalid offset");return new d(this,a)},startPosition:function(){return this.getPositionFromOffset(0)},
endPosition:function(){return this.getPositionFromOffset(this.maxOffset())},getEquivalentChildPositions:function(a){f.error("Unimplemented API: MW.rtc.nodes.Node.getEquivalentChildPositions");return[]},isSplittable:function(a){f.error("Unimplemented API: MW.rtc.nodes.Node.isSplittable");return!1},resetUniqueAttributes:function(){}})})},"MW/rtc/plugins/view/layoutmanager/rules/BaseGroupingRule":function(){define(["dojo/_base/declare","MW/rtc/plugins/view/layoutmanager/abstract/BaseRule"],function(g,
f){return g(f,{groupingType:"base",constructor:function(){},getOperationsForLayout:function(e,d,b){if(this._isApplicable(d))return{nodeToPlace:e}},getOperationsForRemove:function(e,d){if(this._isApplicable(e))return{nodeToRemove:this._getDomNode(e)}},_canMergeBlocks:function(e,d){return!1},_canGroupTogether:function(e,d){return!1},_isApplicable:function(e){return e&&e.box&&e.groupingType===this.groupingType},getRefDomNode:function(e,d,b){return!this._isApplicable(d)?null:this.inherited(arguments)},
_hasToRedrawNeighboringBlocks:function(e){return!1},_getNodesToRedraw:function(e,d){for(var b=[],a=e,c=d?"unshift":"push",h=d?"previousSibling":"nextSibling";a&&this._canGroupTogether(e,a);){if(this._getDomNode(a))b[c](a);a=a[h]()}return b},priority:function(){return 0}})})},"MW/rtc/plugins/view/layoutmanager/abstract/BaseRule":function(){define(["dojo/_base/declare","dojo/dom-class","MW/rtc/abstract/AbstractPlugin","MW/rtc/model/DocumentUtilities","MW/rtc/plugins/view/layoutmanager/LayoutConstants"],
function(g,f,e,d,b){return g(e,{constructor:function(){},getOperationsForLayout:function(a,c,b,d){return null},getOperationsForRemove:function(a,c){return null},getOperationsForRefresh:function(a){return null},getOperationsForResize:function(){return null},reset:function(){},getRefDomNode:function(a,c,b){var d=this._getRefPosition(a,c);if(!d)return null;b=this._getDomNode(c);d={domNode:b,position:d,base:!0};b&&this._isParentDetached(b)&&(d=this._getRefDomNodeForDetachedParent(a,c,d)||d);return d},
_getRefPosition:function(a,c){var b=this._getDomNode(c);return!b||!b.parentElement?null:1===d.nodesInOrder(a,c)?"before":"after"},_isParentDetached:function(a){return(a=(a=a.parentElement)&&a.rteNode)&&!a.isRootNode()&&!a.rootContainer()},_getRefDomNodeForDetachedParent:function(a,c,b){var d,e;c=a.parent;"before"===b.position&&a===c.firstChild()?(d=this._getDomNode(c),e="first"):"after"===b.position&&a===c.lastChild()&&(d=this._getDomNode(c),e="last");return d?{domNode:d,position:e,base:!0}:null},
_isApplicable:function(a){return!0},_getDomNode:function(a){if(a=a.box){var c=a.parentElement;return c&&f.contains(c,b.LINENODE_WRAPPER_CLASS)?c:a}},priority:function(){throw Error("Unimplemented API: MW.rtc.plugins.view.layoutmanager.BaseRule.priority");}})})},"MW/rtc/plugins/view/layoutmanager/LayoutConstants":function(){define([],function(){return{LINENODE_WRAPPER_CLASS:"inlineWrapper",ROOTNODE_CLASS:"rootNode",RIGHT_MARGIN_WIDTH:32}})},"MOTW/cmd/core/output/model/OutputNode":function(){define(["dojo/_base/declare",
"MW/rtc/nodes/leaf/TextProportionalFontNode"],function(g,f){return g([f],{_styleAttributes:["color"],className:"OutputNode",constructor:function(e){this.readOnly=!0}})})},"MW/rtc/nodes/leaf/TextProportionalFontNode":function(){define(["dojo/_base/declare","MW/rtc/nodes/leaf/TextNode"],function(g,f){return g(f,{className:"TextProportionalFontNode",parentTop:function(){return 0},parentLeft:function(){return 0},insertText:function(e,d){void 0===d&&(d=this.text.length);0>d&&(d=this.text.length+d);this.text=
this.text.substring(0,d)+e+this.text.substring(d)},deleteText:function(e,d){e=e||0;void 0===d&&(d=this.text.length);0>e&&(e+=d);this.text=this.text.substring(0,e)+this.text.substring(d)},replaceText:function(e,d,b){d=d||0;void 0===b&&(b=this.text.length);this.deleteText(d,b);this.insertText(e,d)}})})},"MW/rtc/nodes/leaf/TextNode":function(){define("dojo/_base/declare dojo/_base/array dojo/dom-class dojo/dom-style MW/rtc/nodes/LeafNode mw-utils/Utils".split(" "),function(g,f,e,d,b,a){return g(b,{constructor:function(a){this.text=
a.text||"";this.color=a.color||null;a.readOnly&&(this.readOnly=a.readOnly)},className:"TextNode",maxOffset:function(){return this.text.length},isEmpty:function(){return null===this.text||""===this.text},_styleAttributes:["color"],hasStyleAttribute:function(a){return 0<=this._styleAttributes.indexOf(a)},getStyleAttribute:function(a){return this[a]},getStyleAttributes:function(){var a={},b;for(b=0;b<this._styleAttributes.length;b+=1){var d=this._styleAttributes[b];a[d]=this.getStyleAttribute(d)}return a},
setStyleAttributes:function(a){for(var b in a)a.hasOwnProperty(b)&&this.setStyleAttribute(b,a[b])},setStyleAttribute:function(a,b){this.hasStyleAttribute(a)&&(this[a]=b)},compareStyleAttributes:function(a){var b;for(b=0;b<this._styleAttributes.length;b+=1){var d=this._styleAttributes[b];if(this[d]!==a[d]&&(this[d]||a[d]))return!1}return!0},addClass:function(c){this.cssClass||(this.cssClass="");this.cssClass=a.unionOfWordSets(this.cssClass,c,!0)},removeClass:function(c){this.cssClass&&(this.cssClass=
a.differenceOfWordSets(this.cssClass,c,!0),0===this.cssClass.length&&delete this.cssClass)},_serializeAttributes:function(a){a.text=this.text;void 0!==this.color&&null!==this.color&&(a.color=this.color);void 0!==this.cssClass&&null!==this.cssClass&&(a.cssClass=this.cssClass)},isSplittable:function(a){return 0===a||a===this.maxOffset()?!1:!0}})})},"MW/rtc/nodes/LeafNode":function(){define(["dojo/_base/declare","MW/rtc/nodes/Node"],function(g,f){return g(f,{constructor:function(){},className:"LeafNode",
text:"",getText:function(){return this.text},getCodeText:function(){return""},getPlainText:function(e,d){return this.getText().slice(e,d)},getTextForPositioning:function(){return this.text},isTextNode:function(){return!0},canHaveCursorAtStart:function(){for(var e=this;e&&!e.isTextContainerNode();)e=e.parent;return e.startNode()===this},maxOffset:function(){return 0},isEmpty:function(){return 0===this.maxOffset},startNode:function(){return this},endNode:function(){return this},atParagraphStart:function(){return 0===
this.posInNode&&this.textContainer()&&this.textContainer().startNode()===this.node},offsetInContainer:function(e){e=e||this.rootContainer();return e._childOffset(this)},lineBorderOffset:function(e,d){var b;b=0<e?this.maxOffset():0;return this.getPositionFromOffset(b)},movePositionRight:function(e){e=e.getOffset();if(e<this.maxOffset())return this.getPositionFromOffset(e+1);e=this.nextNode();return!e||!e.canHaveCursorAtStart()&&e.isEmpty()&&(e=e.nextNode(),!e)?null:e.canHaveCursorAtStart()?e.startPosition():
e.movePositionRight(e.startPosition())},movePositionLeft:function(e){e=e.getOffset();if(1<e)return this.getPositionFromOffset(e-1);if(1===e)return this.canHaveCursorAtStart()?this.startPosition():(e=this.prevNode())?e.getPositionFromOffset(e.maxOffset()):null;e=this.prevNode();return!e?null:this.canHaveCursorAtStart()?e.endPosition():e.movePositionLeft(e.endPosition())},isSplittable:function(e){return!1}})})},"MOTW/cmd/core/prompt/model/PromptNode":function(){define(["dojo/_base/declare","MW/rtc/nodes/leaf/TextProportionalFontNode"],
function(g,f){return g([f],{constructor:function(e){this.readOnly=!0;this.active=e.active||!1},className:"PromptNode",getCodeText:function(){return Array(this.getText().length+1).join(" ")},isTextNode:function(){return!1}})})},"MOTW/cmd/core/output/model/OutputNodeContentConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./OutputNodeContentConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},
"MOTW/cmd/core/output/model/OutputNodeContentConverter":function(){define(["dojo/_base/declare","MW/rtc/nodes/contentconverter/base/LeafNodeContentConverter","./OutputNode"],function(g,f,e){return g(f,{getApplicableNodeClass:function(){return e}})})},"MW/rtc/nodes/contentconverter/base/LeafNodeContentConverter":function(){define(["dojo/_base/declare","mw-log/Log","MW/rtc/nodes/LeafNode","./NodeContentConverter"],function(g,f,e,d){return g(d,{getApplicableNodeClass:function(){return e},unpack:function(b){return new (this.getApplicableNodeClass())(b)}})})},
"MW/rtc/nodes/contentconverter/base/NodeContentConverter":function(){define(["dojo/_base/declare","mw-log/Log","MW/rtc/nodes/Node","./AbstractContentConverter"],function(g,f,e,d){return g(d,{getApplicableNodeClass:function(){return e},pack:function(b){b.serialize()},unpack:function(b){f.error("Unimplemented: unpack")}})})},"MW/rtc/nodes/contentconverter/base/AbstractContentConverter":function(){define(["dojo/_base/declare","mw-log/Log","MW/rtc/abstract/AbstractRecursiveConverter"],function(g,f,e){return g(e,
{pack:function(d){f.error("Unimplemented: pack")},unpack:function(d){f.error("Unimplemented: unpack")}})})},"MW/rtc/abstract/AbstractRecursiveConverter":function(){define(["dojo/_base/declare","./AbstractConverter"],function(g,f){return g(f,{_mainConverter:null,setMainConverter:function(e){this._mainConverter=e}})})},"MW/rtc/abstract/AbstractConverter":function(){define(["dojo/_base/declare"],function(g){return g(null,{getApplicableNodeClass:function(){throw Error("Unimplemented: getApplicableNodeClass");
}})})},"MOTW/cmd/core/output/coordinateconverter/OutputNodeCoordinateConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./OutputNodeCoordinateConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.view.rangeconverter.converter.plaintext","rtc.view.viewmodel"]}},createInstance:function(d,b){return new e(d,b)}})})},"MOTW/cmd/core/output/coordinateconverter/OutputNodeCoordinateConverter":function(){define(["dojo/_base/declare",
"dojo/has","MOTW/cmd/core/output/model/OutputNode","MW/rtc/view/coordinateconverter/CoordinateConverterUtilities","MW/rtc/view/coordinateconverter/base/TextCoordinateConverter"],function(g,f,e,d,b){return g(b,{constructor:function(a,c){this._rangeConverter=a;this._viewModel=c},getApplicableNodeClass:function(){return e},_getOffsetFromCoordinate:function(a,c){var b=this.inherited(arguments),d=b.indexMap,e=b.offset;if(0===b.offset)return b;!b.isRightAligned&&d[e]&&"\n"===d[e].textNode.textContent.charAt(e)&&
(e+=1);return{offset:e,isRightAligned:b.isRightAligned}},_selectedRectFromRange:function(a,c){var b=a.getClientRects();return 0===b.length?null:"\n"===a.toString()&&(void 0===c||c)?b[b.length-1]:this.inherited(arguments)},isRightAligned:function(a){var c=a.getNode(),b=a.getOffset(),d=this.inherited(arguments);return 0===b?d:d||"\n"===c.getTextForPositioning().charAt(b)}})})},"MW/rtc/view/coordinateconverter/CoordinateConverterUtilities":function(){define([],function(){return{convertFromClientToOffset:function(g,
f){var e=this._getDifferenceBetweenOffsetAndClient(f);return{x:g.x-e.x,y:g.y-e.y}},convertFromOffsetToClient:function(g,f){var e=this._getDifferenceBetweenOffsetAndClient(f);return{x:g.x+e.x,y:g.y+e.y}},_getDifferenceBetweenOffsetAndClient:function(g){var f=g.getDomTargetBoundingClientRect();g=g.getDomTargetDomNode();return{x:f.left-g.scrollLeft,y:f.top-g.scrollTop}},getProjectedCoordinate:function(g,f){var e=g.x,d=g.y;this.isCoordinateXWithinRect(g,f)||(e>f.right?e=f.right:e<f.left&&(e=f.left));
this.isCoordinateYWithinRect(g,f)||(d<f.top?d=f.top:d>f.bottom&&(d=f.bottom));return{x:e,y:d}},getOffsetRectFromDomNode:function(g){var f=g.offsetLeft,e=g.offsetTop,d=g.offsetWidth;g=g.offsetHeight;return{left:f,right:f+d,top:e,bottom:e+g,width:d,height:g}},isCoordinateWithinRect:function(g,f){return f&&this.isCoordinateXWithinRect(g,f)&&this.isCoordinateYWithinRect(g,f)},isCoordinateWithinRects:function(g,f){return f.some(function(e){return this.isCoordinateWithinRect(g,e)},this)},isCoordinateXWithinRect:function(g,
f){return g.x>=f.left&&g.x<=f.right},isCoordinateYWithinRect:function(g,f){return g.y>=f.top&&g.y<=f.bottom},isCoordinateAboveOrLeftOfRect:function(g,f){return this.isCoordinateAboveRect(g,f)||this.isCoordinateYWithinRect(g,f)&&this.isCoordinateLeftOfRect(g,f)},isCoordinateBelowOrRightOfRect:function(g,f){return this.isCoordinateBelowRect(g,f)||this.isCoordinateYWithinRect(g,f)&&this.isCoordinateRightOfRect(g,f)},isCoordinateAboveRect:function(g,f){return g.y<f.top},isCoordinateBelowRect:function(g,
f){return g.y>f.bottom},isCoordinateLeftOfRect:function(g,f){return g.x<f.left},isCoordinateRightOfRect:function(g,f){return g.x>f.right},isCoordinateAtRightHalfOfRect:function(g,f){return g.x>f.left+f.width/2},getClosestXDistanceToRect:function(g,f){return Math.min(Math.abs(f.left-g.x),Math.abs(f.right-g.x))},getClosestYDistanceToRect:function(g,f){return Math.min(Math.abs(f.top-g.y),Math.abs(f.bottom-g.y))},getClientRectsArray:function(g){return 0===g.length?[]:Object.keys(g).map(function(f){return g[f]})},
getClientRectsByRange:function(g){var f=[];g.forEach(function(e){e=e.getClientRects();e=this.getClientRectsArray(e);f=f.concat(e)},this);return f}}})},"MW/rtc/view/coordinateconverter/base/TextCoordinateConverter":function(){define("dojo/_base/declare dojo/has mw-log/Log MW/rtc/model/Position MW/rtc/view/ViewUtilities ../CoordinateConverterUtilities ./BaseCoordinateConverter".split(" "),function(g,f,e,d,b,a,c){return g(c,{getPositionFromCoordinate:function(c,b){var e=this._getClientRects(b);if(!a.isCoordinateWithinRects(c,
e))return null;e=this.getDomNode(b);return(e=this._getOffsetFromCoordinate(e,c))?new d(b,e.offset,e.isRightAligned):null},_getClientRects:function(c){var b=[];c=this.getDomNode(c);if(!c)return b;c.textContent?(b=this._rangeConverter.getNodeContentsRange(c),b=a.getClientRectsByRange(b)):(c=this._rangeConverter.getNodeRange(c))&&(b=a.getClientRectsByRange([c]));return b},_getSubClientRects:function(a){return this.getClientRects(a)},_getOffsetFromCoordinate:function(c,b){var d=this._rangeConverter.createIndexMap(c),
e=d.length;if(!e)return{offset:0};for(var f=0,g=e-1,e=0,q;f<=g;)if(e=Math.floor((f+g)/2),q=this._getRectAt(c,e,d),a.isCoordinateAboveOrLeftOfRect(b,q))g=e-1;else if(a.isCoordinateBelowOrRightOfRect(b,q))f=e+1;else break;f>g&&(b.x>q.right&&b.y<q.top?e=g:b.x<q.left&&b.y>q.bottom&&(e=f),q=this._getRectAt(c,e,d)||q);a.isCoordinateAtRightHalfOfRect(b,q)&&(e+=1);f=!1;(g=this._getRectAt(c,e,d))&&g.top>q.top&&(f=!0);return{offset:e,isRightAligned:f,indexMap:d}},_getRectAt:function(a,c,b){return(a=this._rangeConverter.getCharRange(a,
c,!1,b))?this._selectedRectFromRange(a):null},_selectedRectFromRange:function(a,c){var b=a.getClientRects();if(0===b.length)return null;var d=b[0];if(f("ie")||f("trident")||f("edge"))return d;var e=0;this._isWebkitVersion(538.1)&&(e=1);for(var g=0;g<b.length;g+=1)if(b[g].width>e){d=b[g];break}return d},_isWebkitVersion:function(a){return!f("chrome")&&f("webkit")===a},getCoordinateFromPosition:function(a){var c=a.getOffset();if(0>c)return null;var b=a.getNode(),b=this.getDomNode(b);if(!b||!b.children)return null;
(a=this.isRightAligned(a))&&(c-=1);c=this._rangeConverter.getCharRange(b,c,a)||this._rangeConverter.getNodeRange(b);return!c?null:this._getCoordinateFromRange(c,a)},isRightAligned:function(a){var c=a.getNode(),b=a.getOffset();return 0===b?!1:a.isRightAligned()||b===c.maxOffset()},_getCoordinateFromRange:function(a,c){return f("ie")||f("trident")||f("edge")?this._getCoordinateFromRangeByExplosion(a,c):this._getCoordinateFromRangeByRects(a,c)},_getCoordinateFromRangeByExplosion:function(c,b){var d=
this._selectedRectFromRange(c,b);if(null===d)return d;var e=document.createElement("span");c.insertNode(e);var f=e.getBoundingClientRect(),f=a.convertFromClientToOffset({x:f.left,y:f.top},this._viewModel),d={x:f.x,y:f.y,height:e.offsetHeight,width:d.width,pageX:b?d.right:d.left};this._removeAndMergeSiblingTextNodes(e);return d},_removeAndMergeSiblingTextNodes:function(a){var c=a.previousSibling,b=a.nextSibling,d=a.parentNode;d.removeChild(a);this._canMergeTextNodes(c,b)&&(c.nodeValue+=b.nodeValue,
d.removeChild(b))},_canMergeTextNodes:function(a,c){return b.isDomTextNode(a)&&b.isDomTextNode(c)},_getCoordinateFromRangeByRects:function(c,b){var d=this._selectedRectFromRange(c,b);if(null===d)return d;var e=a.convertFromClientToOffset({x:d.left,y:d.top},this._viewModel);return{x:e.x,y:e.y,height:d.height,width:d.width,pageX:b?d.right:d.left}}})})},"MW/rtc/view/ViewUtilities":function(){define([],function(){return{assert:function(g,f){if(!g)throw Error(f);},isDescendant:function(g,f){for(var e=
g.parentNode;e;){if(e===f)return!0;e=e.parentNode}return!1},isDomTextNode:function(g){return g&&g.nodeType===Node.TEXT_NODE},hasViewOnlyText:function(g){return g.box.textContent!==g.getText()},getVerticalDimensionsBetweenPositions:function(g,f,e){g=this.getTopOfPositionLine(g,e);f=this.getBottomOfPositionLine(f,e);return{top:g,bottom:f,height:f-g}},getTopOfPositionLine:function(g,f){var e=g.getNode().rootContainer();if(this.isRootContainerVisible(e))return f.getNodeTop(e,!0);if(d=this.getVisibleRootContainerAbove(e))return f.getNodeBottom(d,
!0);var d=this.getVisibleRootContainerBelow(e);return d?f.getNodeTop(d,!0):0},getBottomOfPositionLine:function(g,f){var e=g.getNode().rootContainer();if(this.isRootContainerVisible(e))return f.getNodeBottom(e,!0);if(d=this.getVisibleRootContainerBelow(e))return f.getNodeTop(d,!0);var d=this.getVisibleRootContainerAbove(e);return d?f.getNodeBottom(d,!0):0},isRootContainerVisible:function(g){return null!==g.box},getVisibleRootContainerAbove:function(g){for(g=g.previousSibling();g;){if(this.isRootContainerVisible(g))return g;
g=g.previousSibling()}return null},getVisibleRootContainerBelow:function(g){for(g=g.nextSibling();g;){if(this.isRootContainerVisible(g))return g;g=g.nextSibling()}return null},getLineage:function(g){var f=[];for(g=this.getDomNode(g);g;){var e=g.rteNode;if(e){if(e.isRootNode())break;f.unshift(e)}g=g.parentNode}return f},getZeroBasedVisibleLineNumbers:function(g){return g.getVisibleLineNumbers().map(function(f){return f-1})},getDomNode:function(g){return g.box}}})},"MW/rtc/view/coordinateconverter/base/BaseCoordinateConverter":function(){define(["dojo/_base/declare",
"MW/rtc/model/Position","../CoordinateConverterUtilities","./AbstractCoordinateConverter"],function(g,f,e,d){return g(d,{constructor:function(){},getPositionFromCoordinate:function(b,a){return new f(a,0)},getCoordinateFromPosition:function(b){return null},getDomNode:function(b){return b.box},_getClientRects:function(b){var a=this.getDomNode(b);b=[];if(a&&(a=a.getBoundingClientRect(),0<a.width||0<a.height))b=[a];return b},getClosestRect:function(b,a,c){b=this._getSubClientRects(b,a,c);if(0===b.length)return null;
c={x:a.x,y:a.y};var d=this._getVerticalRangeOfRects(b);a.y<d.top?c.y=d.top:a.y>d.bottom&&(c.y=d.bottom);return this._upwardSearchClosestRect(c,b,d)||this._downwardSearchClosestRect(c,b,d)},_getSubClientRects:function(b,a,c){b=b.children.map(c);return Array.prototype.concat.apply([],b)},_upwardSearchClosestRect:function(b,a,c){for(var d=b.y;d>=c.top;d-=1){var e=this._getClosestRect({x:b.x,y:d},a);if(e)return e}return null},_downwardSearchClosestRect:function(b,a,c){for(var d=b.y+1;d<=c.bottom;d+=1){var e=
this._getClosestRect({x:b.x,y:d},a);if(e)return e}return null},_getVerticalRangeOfRects:function(b){var a={},c=Infinity,d=-Infinity;b.forEach(function(b){b.top<c&&(c=a.top=b.top);b.bottom>d&&(d=a.bottom=b.bottom)},this);return a},_getClosestRect:function(b,a){var c,d=[];a.some(function(a){if(e.isCoordinateWithinRect(b,a))return c=a,!0;e.isCoordinateYWithinRect(b,a)&&d.push(a)},this);if(c)return c;if(0===d.length)return null;var f=Infinity,g=-Infinity;d.forEach(function(a){a.top<f&&(f=a.top);a.bottom>
g&&(g=a.bottom)},this);var m=a.filter(function(a){if(a.top>=f&&a.top<g||a.bottom>f&&a.bottom<=g||a.top>=f&&a.bottom<=g||a.top<=f&&a.bottom>=g)return!0},this),p=Infinity;m.some(function(a){if(e.isCoordinateXWithinRect(b,a))return c=a,!0;var d=e.getClosestXDistanceToRect(b,a);d<p&&(c=a,p=d)},this);return c}})})},"MW/rtc/view/coordinateconverter/base/AbstractCoordinateConverter":function(){define(["dojo/_base/declare","mw-log/Log","MW/rtc/abstract/AbstractConverter"],function(g,f,e){return g(e,{getPositionFromCoordinate:function(d,
b){f.error("Unimplemented: getPositionFromCoordinate")},getCoordinateFromPosition:function(d){f.error("Unimplemented: getCoordinateFromPosition")},getDelegatedPositionForCoordinate:function(d){},getDomNode:function(d){f.error("Unimplemented: getDomNode")},getClientRects:function(d){var b=this._getClientRects(d);b.forEach(function(a){a.associatedNode=d},this);return b},_getClientRects:function(d){return[]},getClosestRect:function(d,b,a){f.error("Unimplemented: getClosestRect")}})})},"MOTW/cmd/core/output/insertionrules/OutputNodeInsertionRulesProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./OutputNodeInsertionRules"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},"MOTW/cmd/core/output/insertionrules/OutputNodeInsertionRules":function(){define(["dojo/_base/declare","MOTW/cmd/core/output/model/OutputNode","MW/rtc/plugins/insertionrules/BaseInsertionRules","MW/rtc/plugins/richtext/nodes/inner/RichTextContainerNode"],function(g,f,e,d){return g([e],
{_compatibleParents:[d],constructor:function(){},getApplicableNodeClass:function(){return f},getTopLevelInsertionInstruction:function(b,a,c,d,e){return{insertInRoot:{insertionPosition:e}}}})})},"MW/rtc/plugins/insertionrules/BaseInsertionRules":function(){define(["dojo/_base/declare","./receivinginstructions/InsertIfCompatibleInstruction"],function(g,f){return g(null,{constructor:function(){},destroy:function(){},getApplicableNodeClass:function(){throw Error("Unimplemented API: MW.rtc.insertionrules.getApplicableNodeClass");
},_compatibleParents:[],canInsertInContainer:function(e){return this._compatibleParents.some(function(d){return e.isInstanceOf(d)})},getReceivingInstruction:function(e){return new f},getTopLevelInsertionInstruction:function(e,d,b,a,c){throw Error("Unimplemented API: MW.rtc.insertionrules.getTopLevelInsertionInstruction");}})})},"MW/rtc/plugins/insertionrules/receivinginstructions/InsertIfCompatibleInstruction":function(){define(["dojo/_base/declare","MW/rtc/plugins/insertionrules/BaseInsertionInstruction",
"MW/rtc/plugins/insertionrules/InsertionRuleConstants"],function(g,f,e){return g([f],{constructor:function(){this._type=e.RECEIVING_INSTRUCTION.INSERT_IF_COMPATIBLE}})})},"MW/rtc/plugins/insertionrules/BaseInsertionInstruction":function(){define(["dojo/_base/declare"],function(g){return g(null,{constructor:function(){this._type=null},getType:function(){if(null===this._type)throw Error("Instruction type not defined: MW.rtc.insertionrules.BaseInsertionInstruction");return this._type}})})},"MW/rtc/plugins/insertionrules/InsertionRuleConstants":function(){define([],
function(){return{RECEIVING_INSTRUCTION:{CONTINUE_UP:"continue_up",CONTINUE_AT_POSITION:"continue_at_position",INSERT_IF_COMPATIBLE:"insert_if_compatible"},RELATION:{BEFORE:0,AFTER:1,AT:2}}})},"MW/rtc/plugins/richtext/nodes/inner/RichTextContainerNode":function(){define(["dojo/_base/declare","MW/rtc/nodes/InnerNode"],function(g,f){return g([f],{constructor:function(e){},className:"RichTextContainerNode",getDefaultChild:function(){return{className:"RichTextNode",text:""}}})})},"MW/rtc/nodes/InnerNode":function(){define(["dojo/_base/declare",
"MW/rtc/browsersupport/BrowserSupportUtilities","MW/rtc/model/Position","MW/rtc/nodes/Node","mw-log/Log"],function(g,f,e,d,b){return g(d,{constructor:function(a){this.children=a;this.children.forEach(function(a){a.parent=this},this)},className:"InnerNode",getDefaultChild:function(){b.error("getDefaultChild() has to be overloaded in "+this.className+".")},_childOffset:function(a){var c=this.startNode();if(c){if(a===c)return 0;for(var b=0,d=c.textContainer();c!==a;){b+=c.maxOffset();c=c.nextNode();
if(!c)break;c.textContainer()!==d&&c.textContainer()!==d.textContainer()&&(b+=this.CHILD_TEXT_SEPARATOR.length);d=c.textContainer()}return b}return 0},firstChild:function(){if(0<this.children.length)return this.children[0];b.assert("InnerNode must have at least one child")},lastChild:function(){if(0<this.children.length)return this.children[this.children.length-1];b.assert("InnerNode must have at least one child")},addChild:function(a,c){a&&(1===arguments.length&&(c=this.children.length),a.parent=
this,this.children.splice(c,0,a))},replaceChild:function(a,c){a&&(a.parent=this,this.children.splice(c,1,a))},removeChild:function(a){var c=f.indexOf(this.children,a);a.parent=null;this.children.splice(c,1)},empty:function(){var a=this.children.length,c;for(c=0;c<a;c+=1)this.children[c].parent=null;this.children=[]},startNode:function(){return 0<this.children.length?this.children[0].startNode():null},endNode:function(){return 0<this.children.length?this.children[this.children.length-1].endNode():
null},CHILD_TEXT_SEPARATOR:"",getText:function(){return this._getTextRepresentation(function(a){return a.getText()})},getTextForPositioning:function(){return this._getTextRepresentation(function(a){return a.getTextForPositioning()})},getCodeText:function(){return""},getCodeTextOfChildren:function(){return this._getTextRepresentation(function(a){return a.getCodeText()})},_getTextRepresentation:function(a){for(var c="",b=this.children.length,d=0;d<b;d+=1)c+=a(this.children[d]),d<b-1&&(c+=this.CHILD_TEXT_SEPARATOR);
return c},maxOffset:function(){var a=0;if(this.children&&0<this.children.length){var c=this.CHILD_TEXT_SEPARATOR.length;this.children.forEach(function(b,d){a+=b.maxOffset()+(0<d?c:0)})}return a},childrenAreContainers:!1,getPositionFromOffset:function(a){if(!(this.children&&0<this.children.length))return null;for(var c=this.startNode(),b=this.endNode(),d=c.textContainer();a>c.maxOffset();){if(c===b)return c.endPosition();a-=c.maxOffset();c=c.nextNode();c.textContainer()!==d&&c.textContainer()!==d.textContainer()&&
(a-=c.rootContainer().CHILD_TEXT_SEPARATOR.length);d=c.textContainer()}return c.getPositionFromOffset(a)},startPosition:function(){return this.startNode()&&this.startNode().startPosition()},endPosition:function(){return this.endNode()&&this.endNode().endPosition()},getEquivalentChildPositions:function(a){for(var c,b,d=[],f=b=0,g=0;g<this.children.length;g++)c=this.children[g],b=f,f+=c.maxOffset(),0<g&&(b+=this.CHILD_TEXT_SEPARATOR.length,f+=this.CHILD_TEXT_SEPARATOR.length),b<=a&&a<=f&&(b=a-b,d.push(new e(c,
b)));return d},resetUniqueAttributes:function(){this.inherited(arguments);delete this.anchorId},isSplittable:function(a){if(0===a||a===this.maxOffset())return!1;a=this.getEquivalentChildPositions(a)[0];return a.isAtEdge()?!0:a.getNode().isSplittable(a.getOffset())}})})},"MOTW/cmd/core/output/view/OutputNodeLayouterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./OutputNodeLayouter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.view.decoration.viewmodel"]}},
createInstance:function(d){return new e(d)},destroyInstance:function(d){d.destroy()}})})},"MOTW/cmd/core/output/view/OutputNodeLayouter":function(){define(["dojo/_base/declare","MOTW/cmd/core/output/model/OutputNode","MW/rtc/plugins/richtext/view/RichTextLayouter"],function(g,f,e){return g(e,{constructor:function(d){this._decorationViewModel=d},getApplicableNodeClass:function(){return f}})})},"MW/rtc/plugins/richtext/view/RichTextLayouter":function(){define(["dojo/_base/declare","MW/rtc/plugins/view/layoutmanager/layouters/PlainTextLayouter",
"../nodes/leaf/RichTextNode"],function(g,f,e){return g(f,{constructor:function(d){this._decorationViewModel=d},getApplicableNodeClass:function(){return e},_getStyle:function(d){var b="";d.color&&(b=d.color.hasOwnProperty("r")&&d.color.hasOwnProperty("g")&&d.color.hasOwnProperty("b")?b+("color: rgb("+d.color.r+","+d.color.g+","+d.color.b+");"):b+("color: "+d.color+";"));d.bold&&(b+="font-weight: bold;");d.italic&&(b+="font-style: italic;");d.underline&&(b+="text-decoration: underline;");d.monospace&&
(b+='font-family: Menlo, Monaco, Consolas, "Courier New", monospace;');d.size&&(b+="font-size: "+d.size+";");d.font&&(b+="font-family: "+d.font+";");return b}})})},"MW/rtc/plugins/view/layoutmanager/layouters/PlainTextLayouter":function(){define(["dojo/_base/declare","dojo/dom-construct","MW/rtc/nodes/leaf/PlainTextNode","MW/rtc/plugins/view/layoutmanager/abstract/AbstractLayouter","MW/rtc/view/decoration/DecorationUtilities"],function(g,f,e,d,b){return g(d,{_TEXT_OUTER_CSS:"textBox",_TEXT_INNER_CSS:"textWrapper",
constructor:function(a){this._decorationViewModel=a},getApplicableNodeClass:function(){return e},layout:function(a,c){var b=a.layoutInto(c,"span",{"class":this._TEXT_OUTER_CSS});b.hasChildNodes()||this._render(a,c,b);return b},refresh:function(a,c,b,d){this._render(a,c,d);return d},_render:function(a,c,d){var e=c.getText(),g=this._decorationViewModel.getDecoration(c),m=f.create("span",this._getAttributes(c)),e=b.createViewForTextNode(e,g,m);d.appendChild(e);g.forEach(function(b){b.domNodes.forEach(function(b,
e){c===b.rtcPosition.getNode()&&a.insertDomNode(e,b.rtcPosition,b.domPlacement,d)},this)},this)},_getAttributes:function(a){var c={},b=this._getClass(a);b&&(c["class"]=b);(a=this._getStyle(a))&&(c.style=a);return c},_getClass:function(a){var c=this._TEXT_INNER_CSS;a.cssClass&&(c+=" "+a.cssClass);return c},_getStyle:function(a){return""}})})},"MW/rtc/nodes/leaf/PlainTextNode":function(){define(["dojo/_base/declare","MW/rtc/nodes/leaf/TextProportionalFontNode"],function(g,f){return g(f,{className:"PlainTextNode",
getCodeText:function(){return this.getText()}})})},"MW/rtc/plugins/view/layoutmanager/abstract/AbstractLayouter":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin","mw-log/Log"],function(g,f,e){return g(f,{getApplicableNodeClass:function(){e.error("Unimplemented API: MW.rtc.view.layoutmanager.layouter.getApplicableNodeClass")},canLayoutIndividually:function(d){return!0},layout:function(d,b){e.error("Unimplemented API: MW.rtc.view.layoutmanager.layouter.layout")},refresh:function(d,
b,a,c){return a},place:function(d,b){},destroy:function(){}})})},"MW/rtc/view/decoration/DecorationUtilities":function(){define(["dojo/dom-construct","dojo/_base/lang","MW/rtc/model/CodeUtilities","MW/rtc/view/ViewUtilities","MW/rtc/view/decoration/viewmodel/DecorationRangeDescriptor"],function(g,f,e,d,b){return{PLACEMENT:{BEFORE:0,AFTER:1,BETWEEN:2},_FULL_LINE_LAYER_CSS:"decorationLayer",createViewForTextNode:function(a,c,b){var d=document.createDocumentFragment();if(!a)return d.appendChild(b),d;
var e=0,f=0;c.forEach(function(c){e=c.start;this._createViewAndAppend(a,f,e,b,d);f=c.end;var g=this._createViewAndAppend(a,e,f,b,d);g&&this._applyDecoration(g,c)},this);this._createViewAndAppend(a,f,a.length,b,d);return d},_createViewAndAppend:function(a,c,b,d,e){var f=null;b>c&&(f=d.cloneNode(!1),f.textContent=a.substring(c,b),e.appendChild(f));return f},_applyDecoration:function(a,c){var b=c.styles,d;for(d in b)b.hasOwnProperty(d)&&(a.style[d]=b[d]);var b=c.classes,e;for(e in b)b.hasOwnProperty(e)&&
a.classList.add(e)},createNewLayerForDecorator:function(a,c,d){var e=g.create("div",{"class":this._FULL_LINE_LAYER_CSS}),f=a.getLayerCssClass();f&&e.classList.add(f);a=c.getDescriptorsForLayerDecorator(a);if(!a)return e;c=d.getDocumentDimension().width;e.style.width=c+"px";a.forEach(function(a){a instanceof b?this._addRangeDomNodeIntoLayer(a,e,d,f):this._addDomNodeIntoLayer(a,e)},this);this._setLayerToFullWidth(e,d);return e},_addRangeDomNodeIntoLayer:function(a,c,b,e){var l=a.getRange().getStartPosition();
b=d.getVerticalDimensionsBetweenPositions(l,l,b);b={top:b.top+"px",height:b.bottom-b.top+"px"};f.mixin(b,a.getStyles());var m=this._FULL_LINE_LAYER_CSS;e&&(m=e);g.create("div",{style:b,"class":a.getClassName(),"data-testid":m+"_"+l.getLine()},c)},_setLayerToFullWidth:function(a,c){var b=c.getDocumentDimension().width;a.style.width=b+"px"},_addDomNodeIntoLayer:function(a,c){g.create("div",{style:a.getStyles(),"class":a.getClassName()},c)},decorateAllCodeLines:function(a,c,b){for(var d=b.getMaxLineNumber(),
f=0;f<d;f+=1){var g=b.getLineNode(f);e.isCodeContainer(g)&&a(f,b.getRangeForLine(f+1))}c.applyChanges()}}})},"MW/rtc/model/CodeUtilities":function(){define(["MW/rtc/model/NodeUtilities","MW/rtc/nodes/inner/LineNode"],function(g,f){return{isCodeContainer:function(e,d){if(!e)return!1;if(d)return e.isInstanceOf(f)&&"code"===e.containerType();var b=g.getClosestAncestorOfType(e,f);return b?"code"===b.containerType():!1},extractFunctionName:function(e){var d="";0<=e.indexOf("\x3d")&&(d=e.split("\x3d")[1]);
0<=e.indexOf("(")&&(d=d?d.split("(")[0]:e.split("(")[0]);var b=/(\s\w+)/g;return(e=d?d.match(b):e.match(b))?e[0]:d},isNonExecutableCodeContainer:function(e){return!e?!1:(e=g.getClosestAncestorOfType(e,f))?"code"!==e.containerType():!1},isCodeRange:function(e,d){return g.isRangeNodeType(e,d,f)},isCodeInRange:function(e,d){return g.isNodeTypeInRange(e,d,f)},getCodeLineNodes:function(e){return g.getContainersOfNodeType(f,e)},getAbsoluteCodeOffsetFromPosition:function(e,d){g._assert(this.isCodeContainer(d.getNode()),
"Invalid node.  Node must be a code line.");var b=this.getCodeLineNodes(e),a=this.getCodeLineNumberFromPosition(e,d)-1,c=0;b.some(function(b,e){if(e===a)return c+=d.getOffset(),!0;c+=b.getText().length;c+=1});return c},getCodeLineNumberFromPosition:function(e,d){var b;b=d.getNode();g._assert(this.isCodeContainer(b),"Invalid node.  Node must be a code line.");b=this.getCodeLineNodes(e).indexOf(b)+1;return 0<b?b:-1},getCodeNodesInNodeRange:function(e,d){return g.getParagraphNodesInRange(e,d).filter(function(b){return this.isCodeContainer(b,
!0)},this)},getCodePositionsInNodeRange:function(e,d,b){return this.getCodeNodesInNodeRange(d,b).map(function(a){return e.createLinePosition(a,!1)},this)},getMATLABStringFromCodeText:function(e){e=e.replace(/'/g,"''");return"['"+e.split("\n").join("' 10 '")+"']"}}})},"MW/rtc/nodes/inner/LineNode":function(){define(["dojo/_base/declare","MW/rtc/nodes/InnerNode","MW/rtc/plugins/view/layoutmanager/rules/ContiguousGroupingRule"],function(g,f,e){return g([f],{constructor:function(d,b){this.groupingType=
e().groupingType;b&&b.anchorId&&(this.anchorId=b.anchorId)},className:"LineNode",groupingName:"CodeBlock",containerType:function(){return"code"},getDefaultChild:function(){return{className:"PlainTextNode",text:""}},isTextContainerNode:function(){return!0},containsTextNodes:function(){return!0},getCodeText:function(){return this.getCodeTextOfChildren()},_serializeAttributes:function(d){this.anchorId&&(d.anchorId=this.anchorId)}})})},"MW/rtc/plugins/view/layoutmanager/rules/ContiguousGroupingRule":function(){define("dojo/_base/declare dojo/dom-class dojo/dom-construct MW/rtc/plugins/view/layoutmanager/LayoutUtilities MW/rtc/plugins/view/layoutmanager/rules/BaseGroupingRule MW/rtc/view/ViewUtilities".split(" "),
function(g,f,e,d,b,a){return g(b,{groupingType:"contiguous",_BLOCK_SUFFIX:"Block",_BLOCK_CLASS:"contiguous",constructor:function(a){this._domTarget=a},getOperationsForLayout:function(a,d,f,g){var m={};m.nodeToPlace=a;if(this._isApplicable(d)){var p=this._getSiblingBlockReference(d,f);if(p)return m.nodeToPlaceRefNode=p.domNode,m.nodeToPlaceRefPos=p.position,m;p=this._createBlock(d);e.place(a,p);m.nodeToPlace=p}if(this._domTarget.contains(f)&&d.isRootContainer()&&(d.groupingType===b().groupingType||
d.groupingType===this.groupingType))a=d.previousSibling(),d=d.nextSibling(),f=this._getBlock(a),p=this._getBlock(d),this._needsToRedrawBlocks(f,p,g)&&(g=this._getNodesToRedraw(a,!0),d=this._getNodesToRedraw(d,!1),m.prevBlock=this._getBlockByNodes(g),m.nextBlock=this._getBlockByNodes(d));return m},_needsToRedrawBlocks:function(a,b,e){return a||b||e&&d.isUpdateOperation(e)&&e.node.groupingType!==this.groupingType?!0:!1},_getSiblingBlockReference:function(a,b){var d={currentNode:a,iterator:"previousSibling"},
e={currentNode:a,iterator:"nextSibling"};do{if((d=d&&this._stepSearchForSiblingBlockReference(a,d))&&d.domNode)return{domNode:d.domNode,position:"after"};if((e=e&&this._stepSearchForSiblingBlockReference(a,e))&&e.domNode)return{domNode:e.domNode,position:"before"};if(!this._domTarget.contains(b))break}while(d||e);return null},_stepSearchForSiblingBlockReference:function(a,b){var d=b.currentNode[b.iterator]();if(!d||d.groupingType!==this.groupingType&&d.box&&d.box.parentElement)return null;var e=this._getBlock(d);
e&&(e.parentElement&&f.contains(e,this._getBlockClass(a)))&&(b.domNode=this._getDomNode(d));b.currentNode=d;return b},_getBlockByNodes:function(a){var b;if(a&&a.length){b=a.map(this._getDomNode,this);var d=b.map(function(a){return a.parentNode}).filter(this._isBlockElement,this);b={container:this._createBlock(a[0]),oldBlockDomNodes:d,childDomNodes:b,childNodes:a}}return b},getOperationsForRemove:function(a,b){return this._isApplicable(a)?this._removeNodeAndBlock(a):this._mergeSiblingBlocks(a)},_removeNodeAndBlock:function(a){var b=
this._getDomNode(a);a={nodeToMerge:[]};a.nodeToRemove=b;var d;if((d=b.parentElement)&&this._isBlockElement(d)&&1===d.childElementCount)a.nodeToRemove=d,b=d.previousElementSibling,d=d.nextElementSibling,this._canMergeBlocks(b,d)&&a.nodeToMerge.push([b,d]);return a},_mergeSiblingBlocks:function(a){var b=this._getDomNode(a);a={nodeToMerge:[]};a.nodeToRemove=b;var d=b.previousElementSibling,b=b.nextElementSibling;d&&(b&&d.childElementCount&&b.childElementCount&&this._canMergeBlocks(d.lastChild,b.firstChild))&&
a.nodeToMerge.push([d.lastChild,b.firstChild]);this._canMergeBlocks(d,b)&&a.nodeToMerge.push([d,b]);return a},getRefDomNode:function(a,b,d){if(!this._isApplicable(b))return null;d=this._getRefPosition(a,b);if(!d)return null;var e=this._getDomNode(b);this._canGroupTogether(a,b)&&(a.nextSibling()===b||a.previousSibling()===b)?b=e:(b=this._getRefDomNodeFromParentElement(b,e),d=this._getRefPositionForParentOfTarget(d,b,a,e));return{domNode:b,position:d}},_getRefDomNodeFromParentElement:function(c,b){for(var d=
a.getLineage(c),e=d.length-1;0<=e;e-=1){var f=this._getBlock(d[e]);if(f)return f}return b.parentElement},_getRefPositionForParentOfTarget:function(a,b,d,e){if(b.firstChild===b.lastChild)return a;"before"===a&&this._shouldPlaceAfterRefDomNode(b,d,e)?a="after":"after"===a&&this._shouldPlaceBeforeRefDomNode(b,d,e)&&(a="before");return a},_shouldPlaceAfterRefDomNode:function(a,b,d){if(d===a.firstChild)return!1;b=this._getNodesToRedraw(b.nextSibling(),!1);if(0===b.length)return!1;b=b[b.length-1];if(this._getDomNode(b)===
a.lastChild)return!0;b=b.nextSibling();return!b||this._getDomNode(b)===a.nextElementSibling?!0:!1},_shouldPlaceBeforeRefDomNode:function(a,b,d){if(d===a.lastChild)return!1;b=b.previousSibling();var e=this._getNodesToRedraw(b,!0);if(0===e.length||d.parentElement!==a||!this._getBlock(b)&&1<e.length)return!1;d=e[0];if(this._getDomNode(d)===a.firstChild)return!0;b=d.previousSibling();return!b||this._getDomNode(b)===a.previousElementSibling?!0:!1},_getBlock:function(a){if(a){var b=this._getDomNode(a);
return(b=b&&b.parentElement)&&f.contains(b,this._getBlockClass(a))?b:null}},_createBlock:function(a){return e.create("div",{"class":this._getBlockClass(a)+" "+this._BLOCK_CLASS})},_getBlockClass:function(a){return a.groupingName?a.groupingName:a.className+this._BLOCK_SUFFIX},_isBlockElement:function(a){return!!a&&f.contains(a,this._BLOCK_CLASS)},_canMergeBlocks:function(a,b){if(!a||!b||!a.className||!b.className)return!1;var d=a.className.split(" "),e=b.className.split(" ");return d[0]===e[0]&&d[1]===
e[1]&&d[1]===this.groupingType},_canGroupTogether:function(a,b){return a.groupingType===this.groupingType&&a.groupingType===b.groupingType&&this._getBlockClass(a)===this._getBlockClass(b)},priority:function(){return 1}})})},"MW/rtc/plugins/view/layoutmanager/LayoutUtilities":function(){define(["MW/rtc/model/events/nodechange/NodeChangeEventTypes"],function(g){return{OPERATION:{LAYOUT:"layout",UPDATE:"update",REMOVE:"remove"},getLayoutOperationsFromNodeChangeEvent:function(f){var e=[];switch(f.type){case g.INSERT_NODE:e=
this._handleInsertNode(f);break;case g.DELETE_NODE:e=this._handleDeleteNode(f);break;case g.UPDATE_ATTRIBUTES:case g.INSERT_TEXT:case g.DELETE_TEXT:e=this._handleUpdateNode(f);break;case g.MERGE_NODE:e=this._handleMergeNode(f);break;case g.SPLIT_NODE:e=this._handleSplitNode(f)}return e},_handleInsertNode:function(f){return[this._createLayoutOperation(f.newNode)]},_handleDeleteNode:function(f){return[this._createRemoveOperation(f.node)]},_handleUpdateNode:function(f){return[this._createUpdateOperation(f.node)]},
_handleMergeNode:function(f){var e=[];f.node!==f.newNode&&(e.push(this._createRemoveOperation(f.node)),e.push(this._createUpdateOperation(f.newNode)));return e},_handleSplitNode:function(f){var e=[];f.node!==f.newNode&&(f.node.box?e.push(this._createUpdateOperation(f.node)):e.push(this._createLayoutOperation(f.node)),f.newNode&&e.push(this._createLayoutOperation(f.newNode)));return e},_createLayoutOperation:function(f){return{type:this.OPERATION.LAYOUT,node:f}},_createUpdateOperation:function(f){return{type:this.OPERATION.UPDATE,
node:f}},_createRemoveOperation:function(f){return{type:this.OPERATION.REMOVE,node:f}},isLayoutOperation:function(f){return f.type===this.OPERATION.LAYOUT},isUpdateOperation:function(f){return f.type===this.OPERATION.UPDATE},isRemoveOperation:function(f){return f.type===this.OPERATION.REMOVE},isInModel:function(f){return!!f.rootContainer()},isInView:function(f,e){return f.box&&e.contains(f.box)}}})},"MW/rtc/view/decoration/viewmodel/DecorationRangeDescriptor":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/browsersupport/BrowserSupportUtilities MW/rtc/model/Range MW/rtc/view/decoration/viewmodel/DecorationAtomicDescriptor".split(" "),
function(g,f,e,d,b,a){return g(a,{constructor:function(a){this._range=new b(a.startPosition,a.endPosition);this._aspectHandles=[];this._setupDescriptorMap(a.descriptorSettings)},_setupDescriptorMap:function(c){this._descriptorMap=d.createMap();c&&c.forEach(function(c){var b=c.decorator;c=new a(c.settings);this._descriptorMap.set(b,c)},this)},addClass:function(a,b){this._getOrCreateAtomicDescriptor(b).addClass(a);this._recalculateDecoration()},setStyle:function(a,b,d){this._getOrCreateAtomicDescriptor(d).setStyle(a,
b);this._recalculateDecoration()},addDomNode:function(a,b,d,e){this._getOrCreateAtomicDescriptor(e).addDomNode(a,b,d);this._recalculateDecoration()},removeClass:function(a,b){var d=this.getAtomicDescriptor(b);if(!d)return!1;d.removeClass(a);this._recalculateDecoration();return!0},removeStyle:function(a,b){var d=this.getAtomicDescriptor(b);if(!d)return!1;d.removeStyle(a);this._recalculateDecoration();return!0},removeDomNode:function(a,b){var d=this.getAtomicDescriptor(b);if(!d)return!1;d.removeDomNode(a);
this._recalculateDecoration();return!0},clear:function(a){if(!this._descriptorMap["delete"](a))return!1;this._recalculateDecoration();return!0},_getOrCreateAtomicDescriptor:function(c){var b=this.getAtomicDescriptor(c);if(b)return b;b=new a;this._descriptorMap.set(c,b);return b},getAtomicDescriptor:function(a){return this._descriptorMap.get(a)},_recalculateDecoration:function(){var a=this._getSortedAtomicDescriptors(),b={},e={},g=d.createMap();a.forEach(function(a){var c=a.getStyles(),d=a.getClasses();
a=a.getDomNodes();f.mixin(b,c);f.mixin(e,d);a.forEach(function(a,c){g.set(c,a)},this)},this);this._styles=b;this._classes=e;this._domNodes=g},_getSortedAtomicDescriptors:function(){var a=[];this._descriptorMap.forEach(function(b,d){a.push({decorator:d,descriptor:b})},this);return a.sort(function(a,c){return a.decorator.priority()-c.decorator.priority()}).map(function(a){return a.descriptor})},merge:function(a){this.adjust(a.getEndOffset())},adjust:function(a){if(0>a)throw Error("Invalid target offset");
this._range.getEndPosition().setPosition(this.getStartNode(),a)},canMerge:function(a){return this._range.getEndPosition().isEqualTo(a.getRange().getStartPosition())&&this._hasSameDecoratorsWith(a)&&this.inherited(arguments)},_hasSameDecoratorsWith:function(a){var b=a.getDescriptorMap();if(this._descriptorMap.size!==b.size)return!1;var d=!0;this._descriptorMap.forEach(function(a,c){b.has(c)||(d=!1)},this);return d},cloneSettings:function(){var a=this.inherited(arguments),b=[];this._descriptorMap.forEach(function(a,
c){b.push({decorator:c,settings:a.cloneSettings()})},this);a.descriptorSettings=b;return a},getRange:function(){return this._range},getStartNode:function(){return this._range.getStartPosition().getNode()},getStartOffset:function(){return this._range.getStartPosition().getOffset()},getEndNode:function(){return this._range.getEndPosition().getNode()},getEndOffset:function(){return this._range.getEndPosition().getOffset()},getDescriptorMap:function(){return this._descriptorMap},addChangeListener:function(a){this._aspectHandles.push(e.after(this._range.getStartPosition(),
"onChange",a,!0));this._aspectHandles.push(e.after(this._range.getEndPosition(),"onChange",a,!0))},destroy:function(){this._range.getStartPosition().setLive(!1);this._range.getEndPosition().setLive(!1);this._aspectHandles.forEach(function(a){a.remove()},this);this._aspectHandles=[]}})})},"MW/rtc/view/decoration/viewmodel/DecorationAtomicDescriptor":function(){define(["dojo/_base/declare","MW/rtc/browsersupport/BrowserSupportUtilities"],function(g,f){return g(null,{constructor:function(e){e=e||{};
this._styles=e.styles||{};this._classes=e.classes||{};this._domNodes=e.domNodes||f.createMap()},getClasses:function(){return this._classes},getClassName:function(){return Object.keys(this._classes).join(" ")},addClass:function(e){this._classes[e]=!0},removeClass:function(e){delete this._classes[e]},getStyles:function(){return this._styles},setStyle:function(e,d){this._styles[e]=d},removeStyle:function(e){delete this._styles[e]},getDomNodes:function(){return this._domNodes},addDomNode:function(e,d,
b){this._domNodes.set(e,{rtcPosition:d,domPlacement:b})},removeDomNode:function(e){this._domNodes.delete(e)},hasDecoration:function(){return 0<Object.keys(this.getStyles()).length||0<Object.keys(this.getClasses()).length||0<this._domNodes.size},classesEqualTo:function(e){return Object.keys(this._classes).length!==e.length?!1:!e.some(function(d){return!this._classes[d]},this)},canMerge:function(e){return this._objectMatch(this._styles,e.getStyles())&&this._objectMatch(this._classes,e.getClasses())&&
this._mapMatch(this._domNodes,e.getDomNodes())},cloneSettings:function(){return{styles:JSON.parse(JSON.stringify(this._styles)),classes:JSON.parse(JSON.stringify(this._classes))}},_objectMatch:function(e,d){var b=Object.keys(e),a=Object.keys(d);return b.length!==a.length?!1:!b.some(function(a){return e[a]!==d[a]},this)},_mapMatch:function(e,d){if(e.size!==d.size)return!1;var b=!0;e.forEach(function(a,c){d.has(c)||(b=!1);d.get(c)!==a&&(b=!1)},this);return b}})})},"MW/rtc/plugins/richtext/nodes/leaf/RichTextNode":function(){define(["dojo/_base/declare",
"MW/rtc/nodes/leaf/TextProportionalFontNode"],function(g,f){return g([f],{constructor:function(e){this.font=e.font||null;this.size=e.size||null;this.bold=void 0!==e.bold?e.bold:null;this.italic=void 0!==e.italic?e.italic:null;this.monospace=void 0!==e.monospace?e.monospace:null;this.underline=void 0!==e.underline?e.underline:null},className:"RichTextNode",_styleAttributes:"font size bold italic monospace underline color".split(" "),_serializeAttributes:function(e){e.text=this.text;void 0!==this.font&&
null!==this.font&&(e.font=this.font);void 0!==this.size&&null!==this.size&&(e.size=this.size);void 0!==this.bold&&null!==this.bold&&(e.bold=this.bold);void 0!==this.italic&&null!==this.italic&&(e.italic=this.italic);void 0!==this.underline&&null!==this.underline&&(e.underline=this.underline);void 0!==this.monospace&&null!==this.monospace&&(e.monospace=this.monospace);void 0!==this.color&&null!==this.color&&(e.color=this.color)},movePositionRight:function(e){if(e.isRightAligned()&&0<e.getOffset()){var d=
this.getPositionFromOffset(e.getOffset()-1);return this.inherited(arguments,[d])}return this.inherited(arguments)}})})},"MOTW/cmd/core/prompt/PromptProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./Prompt"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["cw.initializer","cw.commandwindowstatehandler","rtc.internaldocument","rtc.document","rtc.view"]}},createInstance:function(d,b,a,c,h){return new e(d,b,a,c,h)},destroyInstance:function(d){d.destroy()}})})},
"MOTW/cmd/core/prompt/Prompt":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MOTW/cmd/core/prompt/model/PromptNode MOTW/cmd/core/prompt/PromptUtils MW/rtc/model/NodeUtilities MW/rtc/model/events/DocumentEvent mw-log/Log".split(" "),function(g,f,e,d,b,a,c,h){return g(null,{constructor:function(a,c,d,h,g){this._internalDocument=d;this._rtcDocument=h;this._rtcView=g;this._prompt=b.DEFAULT_PROMPT;this._commandWindowStateHandler=c;this._aspectHandles=[];this._aspectHandles.push(e.after(a,
"onInitialize",f.hitch(this,"_handleCommandWindowInitialization")));this._aspectHandles.push(e.after(a,"onReset",f.hitch(this,"_handleCommandWindowReset")))},_handleCommandWindowInitialization:function(){var a=this._commandWindowStateHandler.getCommandWindowState();this.setCurrentPrompt(b.getPromptFromExecutionState(a));this.insertPrompt();this._aspectHandles.push(e.after(this._commandWindowStateHandler,"onCommandWindowStateChange",f.hitch(this,"_setAndUpdatePrompt"),!0))},_handleCommandWindowReset:function(){this.destroyPrompt();
this.insertPrompt()},insertPrompt:function(){this._promptNode=new d({text:this._prompt.trim(),active:!0});var a=this._rtcDocument.createPositionAtLineColumn(0,0);a.getNode().rootContainer();this._rtcDocument.insertTextAtCurrentPosition(" ");this._internalDocument.insertAtPosition(this._promptNode,a);var b=a.getLineColumn(),b=c.create(b.line-1,b.line-1);this._internalDocument.emitDocumentEvents([b]);this._rtcDocument.deletePosition(a)},_setAndUpdatePrompt:function(a){this.setCurrentPrompt(b.getPromptFromExecutionState(a));
this.updatePrompt()},setCurrentPrompt:function(a){h.assert(void 0!==a,"A value should be passed in to set the prompt");this._prompt=a},updatePrompt:function(){this._promptNode.replaceText(this._prompt.trim());this._rtcView.layoutNode(this._promptNode);var b=a.getLineNumberForNode(this._promptNode,this._internalDocument),b=c.create(b,b);this._internalDocument.emitDocumentEvents([b])},destroyPrompt:function(){this._promptNode=null},destroy:function(){this.destroyPrompt();this._aspectHandles.forEach(function(a){a.remove()})}})})},
"MOTW/cmd/core/prompt/PromptUtils":function(){define(["dojo/i18n!MOTW/l10n/nls/cmdPrompts"],function(g){return{DEFAULT_PROMPT:"\x3e\x3e ",TYPEAHEAD_PROMPT:"\n",NULL_PROMPT:"",KEYBOARD_PROMPT:g.keyboardPrompt,SIMEVENTS_DEBUG_PROMPT:g.simEventsDebugPrompt,SF_EML_DEBUG_PROMPT:g.sfEmlDebugPrompt,FAULT_STRING:g.faultString,_getExecutionStatePromptStrings:function(){return{busy:this.NULL_PROMPT,pause:this.NULL_PROMPT,ready:this.DEFAULT_PROMPT,debug:this.KEYBOARD_PROMPT,keyboard:this.KEYBOARD_PROMPT,completingBlock:"",
input:""}},_getAllPromptStrings:function(){return[this.DEFAULT_PROMPT,this.KEYBOARD_PROMPT,this.SIMEVENTS_DEBUG_PROMPT,this.SF_EML_DEBUG_PROMPT,this.FAULT_STRING]},_removePromptFromString:function(f){for(var e=this._getAllPromptStrings(),d=0;d<e.length;d++)if(f.substring(0,e[d].length)===e[d])return f.substring(e[d].length);return f},stripPrompts:function(f){f=f.split(/\r\n|\n|\r/);f=f.map(this._removePromptFromString,this);return f.join("\n")},getPromptFromExecutionState:function(f){return this._getExecutionStatePromptStrings()[f]}}})},
"MOTW/cmd/core/promptinput/PromptInputProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","./PromptInput"],function(g,f,e,d){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:"cw.initializer cw.commandwindowstatehandler rtc.cursor rtc.executionservice rtc.document rtc.focusservice".split(" ")}},createInstance:function(b,a,c,h,e,f){return new d(b,a,c,h,e,f)},destroyInstance:function(b){b.destroy()}})})},
"MOTW/cmd/core/promptinput/PromptInput":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/model/Position MW/rtc/model/PositionUtilities MW/rtc/model/Range MW/rtc/model/Selection".split(" "),function(g,f,e,d,b,a,c){return g([],{constructor:function(a,c,b,d,g,n){this._rtcDocument=g;this._cursor=b;this._rtcFocusService=n;this._aspectHandles=[];this._aspectHandles.push(e.after(d,"onTypoCorrection",f.hitch(this,"_handleTypoCorrection"),!0));this._aspectHandles.push(e.after(c,"onCommandWindowBusy",
f.hitch(this,"_commandWindowBusyHandler")));this._aspectHandles.push(e.after(c,"onCommandWindowReady",f.hitch(this,"_commandWindowReadyHandler")));this._aspectHandles.push(e.after(a,"onInitialize",f.hitch(this,"_handleCommandWindowInitialization")));this._aspectHandles.push(e.after(a,"onReset",f.hitch(this,"_handleCommandWindowReset")));this._commandWindowStateHandler=c},_handleCommandWindowInitialization:function(){this._insertPromptInput();"busy"===this._commandWindowStateHandler.getCommandWindowState()?
this._commandWindowBusyHandler():this._commandWindowReadyHandler()},_handleCommandWindowReset:function(){this._destroyPromptInput();this._insertPromptInput()},_commandWindowBusyHandler:function(){this._cursor.hide()},_commandWindowReadyHandler:function(){this._rtcFocusService.hasFocus()&&(this.moveToPromptInputEnd(),this._cursor.show())},_insertPromptInput:function(){var a=this._rtcDocument.getEndOfDocumentLineColumn(),a=this._rtcDocument.createPositionAtLineColumn(a.line-1,a.column-1),c=a.getNode();
this._promptInputStartPosition=this._rtcDocument.createPosition(c,1);this._promptInputPositionListener=e.after(this._promptInputStartPosition,"onChange",f.hitch(this,function(a){var c=this._promptInputStartPosition.getNode().rootContainer().endPosition().getLineColumn().column,b=this._cursor.getLineColumn(),d=this.getPromptInputLineColumn(),c=b.column>=d.column&&b.column<c;a.lineHasChanged&&c?this._cursor.setLineColumn(d.line,b.column):(a.columnHasChanged||a.lineHasChanged)&&this.moveToPromptInputEnd();
if(a.lineHasChanged)this.onPromptInputLineChange()}),!0);this._cursor.movePosition(this._cursor.END);this._rtcDocument.deletePosition(a)},getPromptInput:function(){var c=this._rtcDocument.getEndOfDocumentLineColumn(),c=this._rtcDocument.createPositionAtLineColumn(c.line-1,c.column-1),b=new a(this._promptInputStartPosition,c),b=this._rtcDocument.getCodeTextForRange(b);c.destroy();return b},_deletePromptText:function(){var a=this._rtcDocument.getEndOfDocumentLineColumn(),c=this._promptInputStartPosition.getLineColumn();
this._rtcDocument.deleteText(c.line,c.column,a.line,a.column)},setPromptInput:function(a){this._deletePromptText();var c=this.getPromptInputLineColumn();this._rtcDocument.insertText(a,c.line,c.column);this._cursor.movePosition(this._cursor.END)},clearPromptInput:function(){this._deletePromptText();this.onPromptInputClear()},onPromptInputClear:function(){},updateCursorToPromptInput:function(){var a=this._cursor.position,d=this._cursor.position;if(this._cursor.hasSelection())var e=this._cursor.getSelection(),
a=e.getStartPosition(),d=e.getEndPosition();var f=0>b.comparePositions(a,this._promptInputStartPosition),g=0>b.comparePositions(d,this._promptInputStartPosition);if(f&&g)a=this._rtcDocument.getEndOfDocumentLineColumn(),a=this._rtcDocument.createPositionAtLineColumn(a.line-1,a.column-1),this._cursor.setPosition(a.getNode(),a.getOffset(),!0),this._cursor.collapseSelection(),a.destroy();else if(f&&!g||!f&&g)a=f?this._promptInputStartPosition:a,d=g?this._promptInputStartPosition:d,this._cursor.collapseSelection(),
0===b.comparePositions(a,d)?this._cursor.setPosition(a.getNode(),a.getOffset(),!0):(a=new c(a,d,e.isReversed(),e.fileEndSelected()),this._cursor.setSelection(a))},_handleTypoCorrection:function(a){this.setPromptInput(a)},_destroyPromptInput:function(){this._promptInputStartPosition&&(this._promptInputPositionListener.remove(),this._rtcDocument.deletePosition(this._promptInputStartPosition),this._promptInputStartPosition=null)},isCursorOnPromptInput:function(){var a=this._cursor.getLineColumn(),c=
this.getPromptInputLineColumn();return a.line===c.line?0:a.line>c.line?1:-1},moveToPromptInputEnd:function(){this._cursor.collapseSelection();this._cursor.movePosition(this._cursor.END)},moveToPromptInputStart:function(){this._cursor.collapseSelection();this._cursor.setPosition(this._promptInputStartPosition.getNode(),this._promptInputStartPosition.getOffset(),!0)},getPromptInputLineColumn:function(){return this._promptInputStartPosition.getLineColumn()},onPromptInputLineChange:function(){},destroy:function(){this._aspectHandles.forEach(function(a){a.remove()})}})})},
"MW/rtc/model/Selection":function(){define(["dojo/_base/declare","./Range"],function(g,f){return g(f,{_isReversed:!1,_fileEndSelected:!1,constructor:function(e,d,b,a){this._isReversed=b;this._fileEndSelected=a},isReversed:function(){return this._isReversed},fileEndSelected:function(){return this._fileEndSelected},isEqualTo:function(e){return this.inherited(arguments)&&this._isReversed===e._isReversed&&this._fileEndSelected===e._fileEndSelected}})})},"MOTW/cmd/core/prompt/coordinateConverter/PromptNodeCoordinateConverterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./PromptNodeCoordinateConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.view.rangeconverter.converter.plaintext","rtc.view.viewmodel"]}},createInstance:function(d,b){return new e(d,b)}})})},"MOTW/cmd/core/prompt/coordinateConverter/PromptNodeCoordinateConverter":function(){define(["dojo/_base/declare","MOTW/cmd/core/prompt/model/PromptNode","MW/rtc/model/Position","MW/rtc/view/coordinateconverter/base/TextCoordinateConverter"],
function(g,f,e,d){return g(d,{constructor:function(b,a){this._rangeConverter=b;this._viewModel=a},getApplicableNodeClass:function(){return f}})})},"MOTW/cmd/core/prompt/insertionRules/PromptNodeInsertionRulesProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./PromptNodeInsertionRules"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},"MOTW/cmd/core/prompt/insertionRules/PromptNodeInsertionRules":function(){define(["dojo/_base/declare",
"mw-log/Log","MOTW/cmd/core/prompt/model/PromptNode","MW/rtc/nodes/inner/LineNode","MW/rtc/plugins/insertionrules/BaseInsertionRules"],function(g,f,e,d,b){return g([b],{_compatibleParents:[d],constructor:function(){},destroy:function(){},getApplicableNodeClass:function(){return e},getTopLevelInsertionInstruction:function(a,c,b,d,e){f.Error("The prompt node should have been inserted into a LineNode.")}})})},"MOTW/cmd/plugins/codingui/CodingUITabHandlerProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./CodingUITabHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document"]}},createInstance:function(d){return new e(d)},priority:function(){return 2}})})},"MOTW/cmd/plugins/codingui/CodingUITabHandler":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin"],function(g,f){return g(f,{constructor:function(e){this._document=e},doDefaultTab:function(){this._document.insertTab()}})})},"MOTW/cmd/plugins/commandhistorynavigation/CommandHistoryNavigationProvider":function(){define(["dojo/_base/declare",
"dojo/_base/lang","MW/rtc/core/provider/PluginProvider","./CommandHistoryNavigation"],function(g,f,e,d){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.actionservice","rtc.executionservice","cw.core.promptinput"]}},createInstance:function(b,a,c){return new d(b,a,c)},destroyInstance:function(b){b.destroy()}})})},"MOTW/cmd/plugins/commandhistorynavigation/CommandHistoryNavigation":function(){define(["dojo/_base/array","dojo/_base/declare",
"dojo/_base/lang","dojo/aspect","MOTW/cmd/CommandWindowActionEnum"],function(g,f,e,d,b){return f(null,{constructor:function(a,c,h){this._executionService=c;this._promptInput=h;this._currentHistoryItemNumber=0;this._requestHistory=[];this._lastUpdatedItem=null;c=[{id:b.PREVIOUS_HISTORY_COMMAND,key:"up",enabled:!0,callback:e.hitch(this,"_retrievePreviousHistoryCommand")},{id:b.NEXT_HISTORY_COMMAND,key:"down",enabled:!0,callback:e.hitch(this,"_retrieveNextHistoryCommand")}];a.loadActions(c);this._aspectHandle=
d.after(this._promptInput,"onPromptInputClear",e.hitch(this,"_resetHistoryNavigation"))},_resetHistoryNavigation:function(){this._currentHistoryItemNumber=0;this._requestHistory=[];this._lastUpdatedItem=null},_retrievePreviousHistoryCommand:function(){if(this._shouldCursorNavigate())return 0===this._promptInput.isCursorOnPromptInput();var a=this._promptInput.getPromptInput();this._lastUpdatedItem!==a&&this._resetHistoryNavigation();this._currentHistoryItemNumber+=1;1===this._currentHistoryItemNumber?
(this.originalCommand=a,this._executionService.historyStore.fetch({query:{type:"request",value:this.originalCommand+"*",historyVisible:!0},onComplete:e.hitch(this,this._updateCurrentHistoryItem)})):this._updateCurrentHistoryItem();return!0},_retrieveNextHistoryCommand:function(){if(this._shouldCursorNavigate())return!1;this._lastUpdatedItem!==this._promptInput.getPromptInput()&&this._resetHistoryNavigation();0<this._currentHistoryItemNumber&&(this._currentHistoryItemNumber-=1,0===this._currentHistoryItemNumber?
(this._promptInput.setPromptInput(this.originalCommand.trim()),this._lastUpdatedItem=this.originalCommand.trim()):this._updateCurrentHistoryItem());return!0},_updateCurrentHistoryItem:function(a){a&&(this._requestHistory=a=g.filter(a,function(c,b){return 0<c.value.length&&(0===b||e.trim(a[b-1].value)!==e.trim(c.value))}));if(this._currentHistoryItemNumber<=this._requestHistory.length){var c=e.trim(this._requestHistory[this._requestHistory.length-this._currentHistoryItemNumber].value);this._promptInput.setPromptInput(c);
this._lastUpdatedItem=c}else this._currentHistoryItemNumber=this._requestHistory.length},_checkIfMultilineInput:function(){return 1<this._promptInput.getPromptInput().split("\n").length},_shouldCursorNavigate:function(){return this._checkIfMultilineInput()&&-1<this._promptInput.isCursorOnPromptInput()},destroy:function(){this._aspectHandle.remove()}})})},"MOTW/cmd/plugins/commandwindowstatehandler/CommandWindowStateHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"./CommandWindowStateHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["cw.initializer","rtc.executionservice","cw.commandwindowpane"]}},createInstance:function(d,b,a){return new e(d,b,a)},destroyInstance:function(d){d.destroy()}})})},"MOTW/cmd/plugins/commandwindowstatehandler/CommandWindowStateHandler":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","dojo/dom-attr"],function(g,f,e,d){return g([],{_COMMAND_WINDOW_STATE_TEST_TAG:"data-commandwindowstatus",
constructor:function(b,a,c){this._commandWindowInitializer=b;this._executionService=a;this._currentState=null;this._aspectHandles=[];this._commandWindowPane=c;this._aspectHandles.push(e.after(b,"onInitialize",f.hitch(this,"_handleCommandWindowInitialization")))},_handleCommandWindowInitialization:function(){this._aspectHandles.push(e.after(this._executionService,"onExecutionStateChange",f.hitch(this,"_handleExecutionStateChange"),!0));this._aspectHandles.push(e.after(this,"onCommandWindowStateChange",
f.hitch(this,"_handleReadyBusyStates"),!0));this._currentState=this._executionService.executionState;this._updateDataTestId(this._currentState)},_handleExecutionStateChange:function(b){this._currentState!==b&&(this.onCommandWindowStateChange(b),this._currentState=b,this._updateDataTestId(this._currentState))},onCommandWindowStateChange:function(b){},_handleReadyBusyStates:function(b){if(b===this._executionService.EXECUTION_STATES.BUSY)this.onCommandWindowBusy(b);else this.onCommandWindowReady(b)},
onCommandWindowBusy:function(b){},onCommandWindowReady:function(b){},setCommandWindowState:function(b){this._handleExecutionStateChange(b)},getCommandWindowState:function(){return this._currentState},_updateDataTestId:function(b){d.set(this._commandWindowPane,this._COMMAND_WINDOW_STATE_TEST_TAG,b)},destroy:function(){this._aspectHandles.forEach(function(b){b.remove()});this._aspectHandles=[]}})})},"MOTW/cmd/plugins/CmdPlainTextMimeConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"MOTW/cmd/plugins/CmdPlainTextMimeConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cursor"]}},createInstance:function(d){return new e(d)},priority:function(){return 2}})})},"MOTW/cmd/plugins/CmdPlainTextMimeConverter":function(){define(["dojo/_base/declare","MW/rtc/model/DocumentUtilities","MW/rtc/plugins/cutcopypaste/MIMETypes","MW/rtc/plugins/cutcopypaste/mime/MimeConverter","MOTW/cmd/core/prompt/PromptUtils"],function(g,f,e,d,b){return g(d,{constructor:function(a){this._cursor=
a},getType:function(){return e.TEXT},convertFromMimeData:function(a){a=b.stripPrompts(a);return f.textToContent(a,this._cursor.getNode())},priority:function(){return 70}})})},"MW/rtc/plugins/cutcopypaste/MIMETypes":function(){define([],function(){return{COPY_FOR_COMMAND_WINDOW:"application/x-java-serialized-object",HTML:"text/html",RTF:"text/rtf",IMAGE:"image/x-java-image",IMAGE_LIST:"application/liveeditor_internal_imagelist",MATLAB_RICHTEXT:"application/matlab_json",MATHML:"application/mathml+xml",
MATHML_PRESENTATION:"application/mathml-presentation+xml",TEXT:"text/plain",UNICODE_STRING:"Unicode String",PROMPTLESS_STRING:"application/x-matlab-promptless-string"}})},"MW/rtc/plugins/cutcopypaste/mime/MimeConverter":function(){define(["dojo/_base/declare"],function(g){return g(null,{getType:function(){throw Error("Unimplemented API: getType");},convertFromMimeData:function(f){throw Error("Unimplemented API: convert");},priority:function(){throw Error("Unimplemented API: priority");}})})},"MOTW/cmd/plugins/contextmenu/CWContextMenuModelProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./CWContextMenuModel"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{createInstance:["cw.initializer","rtc.actionservice","rtc.contextmenu.model"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MOTW/cmd/plugins/contextmenu/CWContextMenuModel":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/i18n!MOTW/l10n/nls/cmdWindow MW/rtc/abstract/AbstractPlugin MW/rtc/RichTextComponentFeatureEnum".split(" "),
function(g,f,e,d,b,a){return g(b,{_DEFAULT_CONTEXT_MENU_GROUP:"Default",_COPY_PASTE_GROUP:"copyPaste",_SELECT_ALL_ACTION:"rtc_select_all",constructor:function(a,b,d){this._actionService=b;this._baseContextMenuModel=d;this.own(e.after(a,"onInitialize",f.hitch(this,"_handleCommandWindowInitialization")))},_handleCommandWindowInitialization:function(){this._baseContextMenuModel.hideGroup(this._COPY_PASTE_GROUP);this._setContextMenuGroup(a.FIND_STRING.FIND_ACTION,this._DEFAULT_CONTEXT_MENU_GROUP,d.findLabel);
this._setContextMenuGroup(this._SELECT_ALL_ACTION,this._DEFAULT_CONTEXT_MENU_GROUP,d.selectAllLabel)},_setContextMenuGroup:function(a,b,d){this._actionService.updateAction(a,{contextMenuGroup:b,text:d})}})})},"MW/rtc/RichTextComponentFeatureEnum":function(){define([],function(){return{TAB_COMPLETION:{TAB_COMPLETE_ACTION:"codecompletion.popup"},SYNTAX_HIGHLIGHTING:"rtc_syntax_highlighting",CODE_ANALYZER:"rtc_code_analyzer",SECTIONS:{INSERT_SECTION_ACTION:"rtc_insert_section",RUN_SECTION_ACTION:"rtc_evaluate_section",
NEXT_SECTION_ACTION:"rtc_next_section",PREVIOUS_SECTION_ACTION:"rtc_previous_section"},FIND_STRING:{FIND_ACTION:"rtc_find_dialog",FIND_NEXT_ACTION:"rtc_find_dialog_find_next_key",FIND_PREVIOUS_ACTION:"rtc_find_dialog_find_previous_key",FIND_SELECTION_ACTION:"rtc_find_dialog_find_selection_key",REPLACE_ACTION:"rtc_replace_dialog"},GOTO_LINE:{GOTO_ACTION:"rtc_goTo_dialog"},INDENT_ON_NEWLINE:"rtc_indent_on_newline",SMART_TAB:"rtc_smart_tab",PAREN_MATCH:"rtc_paren_match",GUTTER_LINE_NUMBER:"rtc_gutter_line_number",
MATLAB_BREAKPOINT_MARGIN:{CLEAR_ALL_BREAKPOINTS_ACTION:"rtc_clear_all_breakpoints",TOGGLE_BREAKPOINT_ACTION:"rtc_toggle_breakpoint",TOGGLE_ENABLE_BREAKPOINT_ACTION:"rtc_toggle_enable_breakpoint"},CONTEXT_MENU:"rtc_context_menu",AUTO_INDENT:"rtc_auto_indent",EVALUATE_SELECTION:{EVALUATE_SELECTION_ACTION:"rtc_evaluate_selection"},OPEN_SELECTION:{OPEN_SELECTION_ACTION:"rtc_open_selection"},COMMENT:{COMMENT_ACTION:"rtc_comment",UNCOMMENT_ACTION:"rtc_uncomment"},INDENT:{INDENT_ACTION:"rtc_indent",OUTDENT_ACTION:"rtc_unindent"},
FORMAT_CODE:{SMART_INDENT_ACTION:"rtc_smart_indent"},FUNCTION_HINTS:{FUNCTION_HINTS_ACTION:"rtc_function_hints"},UNDO_REDO:{UNDO_ACTION:"rtc_undo",REDO_ACTION:"rtc_redo",CLEAR_ACTION:"rtc_clear_undo"},CUT_COPY_PASTE:{CUT_ACTION:"rtc_cut",COPY_ACTION:"rtc_copy",PASTE_ACTION:"rtc_paste"},VARIABLE_HIGHLIGHTING:"rtc_variable_highlighting",RICH_TEXT:{TOGGLE_BOLD_ACTION:"rtc_toggle_bold",TOGGLE_ITALIC_ACTION:"rtc_toggle_italic",TOGGLE_UNDERLINE_ACTION:"rtc_toggle_underline",TOGGLE_MONOSPACE_ACTION:"rtc_toggle_monospace",
PARAGRAPH_FORMAT_CODE_ACTION:"rtc_paraformat_code",PARAGRAPH_FORMAT_TEXT_ACTION:"rtc_paraformat_text",PARAGRAPH_FORMAT_HEADING_ACTION:"rtc_paraformat_heading",PARAGRAPH_FORMAT_HEADING1_ACTION:"rtc_paraformat_heading",PARAGRAPH_FORMAT_HEADING2_ACTION:"rtc_paraformat_heading2",PARAGRAPH_FORMAT_HEADING3_ACTION:"rtc_paraformat_heading3",PARAGRAPH_FORMAT_TITLE_ACTION:"rtc_paraformat_title",TOGGLE_CODE_AND_TEXT_ACTION:"rtc_toggle_code_and_text",ALIGNMENT_LEFT_ACTION:"rtc_align_left",ALIGNMENT_CENTER_ACTION:"rtc_align_center",
ALIGNMENT_RIGHT_ACTION:"rtc_align_right"},LISTS:{ORDERED_LIST_ACTION:"rtc_ordered_list",UNORDERED_LIST_ACTION:"rtc_unordered_list"},HYPERLINK:{HYPERLINK_ACTION:"rtc_hyperlink",HYPERLINK_SERVICE_BACKWARD_ACTION:"rtc_hyperlink_service_backward",HYPERLINK_SERVICE_FORWARD_ACTION:"rtc_hyperlink_service_forward"},EQUATIONS:{LATEX_EDITOR_ACTION:"rtc_equation",WYSIWYG_EDITOR_ACTION:"rtc_equation_editor"},IMAGES:{IMAGE_ACTION:"rtc_image"},TABLE_OF_CONTENTS:{TABLE_OF_CONTENTS_ACTION:"rtc_table_of_contents"},
CODE_EXAMPLE:{DEFAULT_ACTION:"rtc_codeexample",MATLAB_ACTION:"rtc_codeexample_matlab",PLAIN_ACTION:"rtc_codeexample_plain"},CODINGUI:"rtc_code_codingui"}})},"MOTW/cmd/plugins/evaluateselection/EvaluateSelectionProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","./EvaluateSelection"],function(g,f,e,d){return g(e,{requires:function(){return{createInstance:["rtc.document","rtc.cursor","rtc.eventhandler","rtc.actionservice","rtc.executionservice"]}},
createInstance:function(b,a,c,h,e){return new d(b,a,c,h,e)},priority:function(){return 2}})})},"MOTW/cmd/plugins/evaluateselection/EvaluateSelection":function(){define(["dojo/_base/declare","dojo/i18n!MOTW/l10n/nls/actions","MW/rtc/plugins/language/matlab/contextualselection/EvaluateSelection","MW/rtc/RichTextComponentFeatureEnum"],function(g,f,e,d){return g(e,{constructor:function(b,a,c,h,e){h.updateAction(d.EVALUATE_SELECTION.EVALUATE_SELECTION_ACTION,{text:f.evaluateSelectionLabel})},getSelection:function(){var b=
"";this._cursor.hasSelection()&&(b=this._cursor.selectedText());return b}})})},"MW/rtc/plugins/language/matlab/contextualselection/EvaluateSelection":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/i18n!l10n/nls/actions MW/rtc/abstract/AbstractPlugin MW/rtc/RichTextComponentFeatureEnum".split(" "),function(g,f,e,d,b,a){return g(b,{constructor:function(c,b,k,g,m){this._document=c;this._cursor=b;this._actionService=g;this._executionService=m;this.own(e.after(this._cursor,"onChange",
f.hitch(this,this._updateActionState)));this.own(e.after(k,"onMouseDown",f.hitch(this,this._updateActionState)));c=[{id:a.EVALUATE_SELECTION.EVALUATE_SELECTION_ACTION,key:"f9",shortcut:d.evaluateSelectionShortcut,platformKey:{mac:"shift_f7"},enabled:!1,contextMenuGroup:"Selections",text:d.evaluateSelectionLabel,callback:f.hitch(this,"_evaluateSelectionCallback")}];this._actionService.loadActions(c)},_evaluateSelectionCallback:function(){if(this._actionService.getAction(a.EVALUATE_SELECTION.EVALUATE_SELECTION_ACTION).enabled)return this.evaluateSelection()},
evaluateSelection:function(){var a=this.getSelection();this._executionService&&a&&(this._executionService.streamingEval?this._executionService.authoringEval(a,this._executionService.streamingEval):this._executionService.authoringEval(a))},getSelection:function(){if(!this._cursor.hasSelection())return"";var a=this._cursor.getSelectionLineColumn();return a.start.line===a.end.line?this._cursor.selectedText():this._document.getCodeTextForRange(this._cursor.getSelection())},_updateActionState:function(){var c=
this._cursor.hasSelection();this._actionService.updateAction(a.EVALUATE_SELECTION.EVALUATE_SELECTION_ACTION,{enabled:c})}})})},"MOTW/cmd/plugins/interrupt/InterruptCommandWindowProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","./InterruptCommandWindow"],function(g,f,e,d){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.actionservice","rtc.executionservice"]}},createInstance:function(b,
a){return new d(b,a)}})})},"MOTW/cmd/plugins/interrupt/InterruptCommandWindow":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MOTW/cmd/CommandWindowActionEnum"],function(g,f,e,d){return g(null,{constructor:function(b,a){this._executionService=a;var c=[{id:d.INTERRUPT_COMMAND,enabled:!0,key:"ctrl_c",platformKey:{mac:"meta_."},callback:f.hitch(this,"_handleInterruptCommandWindow")}];b.loadActions(c)},_handleInterruptCommandWindow:function(){this._executionService.interrupt()}})})},
"MOTW/cmd/plugins/PromptlessTextGeneratorProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./PromptlessTextGenerator"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cutcopypaste.converter","rtc.cursor"]}},createInstance:function(d,b){return new e(d,b)}})})},"MOTW/cmd/plugins/PromptlessTextGenerator":function(){define("dojo/_base/declare dojo/_base/lang MW/rtc/model/io/PlainTextGeneratorVisitor MW/rtc/model/SelectionTreeWalker MW/rtc/nodes/inner/RootNode MW/rtc/plugins/cutcopypaste/MIMETypes MOTW/cmd/core/prompt/PromptUtils".split(" "),
function(g,f,e,d,b,a,c){return g(null,{constructor:function(a){a.registerNodeConverter(b,f.hitch(this,"_convertToText"))},_convertToText:function(b){var f=new e;(new d(f)).traverseSelection(b);b=f.getText();b=c.stripPrompts(b);return[{flavor:a.PROMPTLESS_STRING,content:b}]}})})},"MW/rtc/model/io/PlainTextGeneratorVisitor":function(){define(["dojo/_base/declare","MW/rtc/model/io/NodeVisitorInterface"],function(g,f){return g(f,{constructor:function(){this._text=""},traverseSibling:function(e){e.parent&&
e.parent.CHILD_TEXT_SEPARATOR&&(this._text+=e.parent.CHILD_TEXT_SEPARATOR)},visitLeafNode:function(e,d,b){this._text+=e.getPlainText(d,b)},getText:function(){return this._text}})})},"MW/rtc/model/io/NodeVisitorInterface":function(){define(["dojo/_base/declare"],function(g){return g(null,{constructor:function(){},enterInnerNode:function(f){},traverseSibling:function(f){},leaveInnerNode:function(f){},visitLeafNode:function(f,e,d){}})})},"MW/rtc/model/SelectionTreeWalker":function(){define(["dojo/_base/declare",
"MW/rtc/model/TreeWalker"],function(g,f){return g(f,{traverseSelection:function(e){this._range=e;this._buildCommonAncestors();if(e.fileEndSelected()){for(var d=this._commonAncestors[this._commonAncestors.length-1];d&&!d.isRootNode()&&!d.isRootContainer();)this._commonAncestors.pop(),d=this._commonAncestors[this._commonAncestors.length-1];d.isRootNode()||this._commonAncestors.pop()}this._doTreeWalk();e.fileEndSelected()&&(e=this._range.getEndPosition().getNode().rootContainer(),e.childrenAreContainers||
(this._visitor.traverseSibling(e),this._enterNode(e),this._leaveNode(e)))}})})},"MW/rtc/model/TreeWalker":function(){define(["dojo/_base/declare","MW/rtc/model/NodeUtilities","MW/rtc/model/RangeUtilities","MW/rtc/nodes/InnerNode","MW/rtc/nodes/LeafNode"],function(g,f,e,d,b){return g(null,{constructor:function(a){this._visitor=a;this._enteredNodes=this._commonAncestors=this._range=null},traverseRange:function(a,c){this._range=a;this._buildCommonAncestors(c);this._doTreeWalk()},_buildCommonAncestors:function(a){this._commonAncestors=
f.getCommonAncestors(this._range.getStartPosition().getNode(),this._range.getEndPosition().getNode());if(a||!e.rangeIsInsideOneTextContainer(this._range))this._commonAncestors=this._commonAncestors.slice(0,1)},_doTreeWalk:function(){var a=this._range.getStartPosition().getNode(),c=!1;this._enteredNodes=[];for(this._enterAncestors(a);a;){c=this._enterNode(a);if(a===this._range.getEndPosition().getNode()){this._leaveRemainingNodes();break}if(!c&&a.firstChild&&a.firstChild())a=a.firstChild();else{for(;!a.nextSibling()&&
!a.isRootNode();)this._leaveNode(a),a=a.parent;this._leaveNode(a);(a=a.nextSibling())&&this._visitor.traverseSibling(a)}}},_enterAncestors:function(a){if((a=a.parent)&&0>this._commonAncestors.indexOf(a))this._enterAncestors(a),this._enterNode(a)},_leaveRemainingNodes:function(){for(;0<this._enteredNodes.length;)this._leaveNode(this._enteredNodes[0])},_enterNode:function(a){if(a.isInstanceOf(d))return this._enteredNodes.unshift(a),this._visitor.enterInnerNode(a);if(a.isInstanceOf(b)){var c=0,h,e=!1;
a===this._range.getStartPosition().getNode()&&(e=!0,c=this._range.getStartPosition().getOffset());a===this._range.getEndPosition().getNode()?(e=!0,h=this._range.getEndPosition().getOffset()):h=a.maxOffset();(!e||c!==h)&&this._visitor.visitLeafNode(a,c,h)}},_leaveNode:function(a){a.isInstanceOf(d)&&(this._enteredNodes.shift(),this._visitor.leaveInnerNode(a))}})})},"MW/rtc/model/RangeUtilities":function(){define(["mw-log/Log","./NodeUtilities","./Position","./PositionUtilities","./Range"],function(g,
f,e,d,b){return{rangeIsInsideOneNode:function(a){return a.getStartPosition().getNode()===a.getEndPosition().getNode()},rangeIsInsideOneTextContainer:function(a){return a.getStartPosition().getNode().textContainer()===a.getEndPosition().getNode().textContainer()},nodesInRange:function(a){var c=a.getStartPosition().getNode();a=a.getEndPosition().getNode();return f.getNodesInRange(c,a)},paragraphNodesInRange:function(a){var c=a.getStartPosition().getNode();a=a.getEndPosition().getNode();return f.getParagraphNodesInRange(c,
a)},isRangeReadOnly:function(a){var c=a.getStartPosition().getNode();a=a.getEndPosition().getNode();var b=!1;f.leafNodesInRangeIterator(c,a,function(a){if(a.isReadOnly())return b=!0});return b},_hasTrailingLineBreak:function(a){var c=a.getStartPosition();a=a.getEndPosition();return 0===d.comparePositions(c,a)?!1:1===a.getLineColumn().column},trimTrailingLineBreak:function(a){var c=a,d=a.getStartPosition(),f=a.getEndPosition();this._hasTrailingLineBreak(a)&&(a=f.getNode().rootContainer().previousSibling().endNode(),
f=new e(a,a.maxOffset()),c=new b(d,f));return c},rangeIsInsideOneRootContainer:function(a){return a.getStartPosition().getNode().rootContainer()===a.getEndPosition().getNode().rootContainer()},trimRange:function(a){return!this.rangeIsInsideOneTextContainer(a)?a:this.trimRangeForNodes(a)},trimRangeForNodes:function(a){if(this.rangeIsInsideOneNode(a))return a;a=this._trimStartPosition(a);return this._trimEndPosition(a)},_trimStartPosition:function(a){var c=a.getStartPosition(),d=c.getOffset();if(0===
d||d!==c.getNode().maxOffset())return a;c=c.getNode();c=c.parent.containsTextNodes()?c.nextNode():c.nextSibling();if(!c)return a;c=c.containsTextNodes()?c.startNode():c;return c===a.getEndPosition().getNode()&&0===a.getEndPosition().getOffset()?a:new b(new e(c,0),a.getEndPosition())},_trimEndPosition:function(a){var c=a.getEndPosition();if(0!==c.getOffset())return a;c=c.getNode();c=c.parent.containsTextNodes()?c.prevNode():c.previousSibling();if(!c)return a;c=c.containsTextNodes()?c.endNode():c;return new b(a.getStartPosition(),
new e(c,c.maxOffset()))},expandRangeToFullLines:function(a){var c=a.getStartPosition().getNode();a=a.getEndPosition().getNode();return new b(c.rootContainer().startPosition(),a.rootContainer().endPosition())},isNodeTypeInRange:function(a,c){var b=this._getStartEndNodes(a),d=!1;f.leafNodesInRangeIterator(b.startNode,b.endNode,function(a){if(a instanceof c)return d=!0}.bind(this));return d},isParagraphNodeInRange:function(a,c){var b=c.getStartPosition().getNode().rootContainer(),d=c.getEndPosition().getNode().rootContainer(),
e=!1;f.siblingNodesInRangeIterator(b,d,function(c){if(c===a)return e=!0});return e},getNodesInRangeOfNodeType:function(a,c){var b=this._getStartEndNodes(a),d=[];f.leafNodesInRangeIterator(b.startNode,b.endNode,function(a){a instanceof c&&d.push(a)}.bind(this));return d},_getStartEndNodes:function(a){var c=a.getStartPosition(),b=c.getNode(),e=a.getEndPosition();a=e.getNode();0<d.comparePositions(c,e)?c=a:(c=b,b=a);return{startNode:c,endNode:b}},rangeIterator:function(a,c){var b=a.getStartPosition().getNode(),
d=a.getStartPosition().getOffset(),e=a.getEndPosition().getNode(),g=a.getEndPosition().getOffset();if(b===e)return!!c(b,d,g);if(d=c(b,d,b.maxOffset()))return!0;b=b.nextNode();return b!==e&&(d=e.prevNode(),d=f.leafNodesInRangeIterator(b,d,function(a){return c(a,0,a.maxOffset())}.bind(this)))?!0:!!c(e,0,g)},equivalent:function(a,c){return 0===d.comparePositions(a.getStartPosition(),c.getStartPosition())&&0===d.comparePositions(a.getEndPosition(),c.getEndPosition())},isRangeContainedInRange:function(a,
c){var b=c.getStartPosition(),e=c.getEndPosition(),f=a.getStartPosition(),g=a.getEndPosition(),b=0>=d.comparePositions(b,f),e=0<=d.comparePositions(e,g);return b&&e},getTextForRange:function(a,c){var b=this.nodesInRange(a),d="",e=-1,f=b.splice(0,1)[0];if(!c||f.isTextNode())d=f.getText().slice(a.getStartPosition().getOffset()),e=0;b.forEach(function(a,b){if(!c||a.isTextNode())a.rootContainer()!==a.prevNode().rootContainer()&&(d+="\n"),d+=a.getText(),e=b+1});var f=a.getEndPosition().getNode().maxOffset(),
g=a.getEndPosition().getOffset();e===b.length&&g<f&&(d=d.slice(0,g-f));return d}}})},"MW/rtc/nodes/inner/RootNode":function(){define(["dojo/_base/declare","MW/rtc/nodes/InnerNode"],function(g,f){return g([f],{constructor:function(e){},className:"RootNode",isRootNode:function(){return!0},CHILD_TEXT_SEPARATOR:"\n",getCodeText:function(){return this.getCodeTextOfChildren()}})})},"MOTW/cmd/plugins/CmdUnicodeStringMimeConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"MOTW/cmd/plugins/CmdUnicodeStringMimeConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cursor"]}},createInstance:function(d){return new e(d)},priority:function(){return 2}})})},"MOTW/cmd/plugins/CmdUnicodeStringMimeConverter":function(){define(["dojo/_base/declare","MW/rtc/plugins/cutcopypaste/MIMETypes","MOTW/cmd/plugins/CmdPlainTextMimeConverter"],function(g,f,e){return g(e,{getType:function(){return f.UNICODE_STRING},priority:function(){return 71}})})},"MOTW/cmd/plugins/executionhandler/ExecutionHandlerProvider":function(){define(["dojo/_base/declare",
"dojo/_base/lang","MW/rtc/core/provider/PluginProvider","./ExecutionHandler"],function(g,f,e,d){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.actionservice","cw.commandwindowstatehandler","rtc.cursor","rtc.executionservice","cw.core.promptinput"]}},createInstance:function(b,a,c,h,e){return new d(b,a,c,h,e)}})})},"MOTW/cmd/plugins/executionhandler/ExecutionHandler":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect",
"MOTW/cmd/CommandWindowActionEnum","MOTW/cmd/core/prompt/PromptUtils"],function(g,f,e,d,b){return g([],{constructor:function(a,c,b,e,g){this._cursor=b;this._executionService=e;this._promptInput=g;this._commandWindowStateHandler=c;c=[{id:d.EXECUTE_COMMAND,key:"enter",enabled:!0,callback:f.hitch(this,"_executeCommand")}];a.loadActions(c)},_executeCommand:function(){var a="";this._cursor.hasSelection()?a=this._cursor.selectedText():(a=this._promptInput.getPromptInput(),this._promptInput.clearPromptInput());
this._promptInput.moveToPromptInputEnd();this._executionService.authoringEval(a,this._executionService.streamingEval);return!0}})})},"MOTW/cmd/plugins/gettingstartedbanner/GettingStartedBannerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MOTW/cmd/plugins/gettingstartedbanner/GettingStartedBanner"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["cw.initializer","cw.commandwindowpane","rtc.featureinterface","rtc.hyperlinkservice","rtc.domnode"]}},
createInstance:function(d,b,a,c,h){return new e(d,b,a,c,h)}})})},"MOTW/cmd/plugins/gettingstartedbanner/GettingStartedBanner":function(){define("dojo/_base/declare dojo/_base/event dojo/_base/lang dojo/aspect dojo/query dojo/i18n!MOTW/l10n/nls/cmdWindow matlab_preferences/preferencesUI/PreferenceSettingsServiceFactory MW/rtc/abstract/AbstractPlugin MW/rtc/plugins/view/banner/Banner".split(" "),function(g,f,e,d,b,a,c,h,k){return g(h,{_GETTING_STARTED_DOC_ID:"matlab_getting_started",_GETTING_STARTED_SELECTOR_STRING:"#gettingStartedBannerHyperLink",
constructor:function(a,b,h,f,k){this._commandWindowInitializer=a;this._commandWindowPane=b;this._featureInterface=h;this._hyperlinkService=f;this._rtcDomNode=k;this._preferenceSettingsService=c.getInstance();this._aspectHandles=[];this._preferenceSettingsService.on("settingchanged",e.hitch(this,function(a){"GettingStarted"===a.settingKey&&this._handleSettingsUpdated(a.newValue)}));this.own(d.after(this._commandWindowInitializer,"onInitialize",e.hitch(this,"_queryPreferencesOnStartup")))},_createBanner:function(){this._banner=
new k({bannerText:a.gettingStartedText,closable:!0,parent:this._rtcDomNode.parentNode,position:"first",resizer:this._featureInterface.resize,sibling:this._rtcDomNode});this._aspectHandles.push(d.after(this._commandWindowPane,"onResize",e.hitch(this,"_resize")));this._aspectHandles.push(d.after(this._banner,"closeBanner",e.hitch(this,"_disablePreference")));this._attachOnClickCallbackToHyperlink(this._GETTING_STARTED_DOC_ID,this._GETTING_STARTED_SELECTOR_STRING)},_resize:function(){this._banner.resize()},
_queryPreferencesOnStartup:function(){this._preferenceSettingsService.getSetting(["matlab","commandwindow"],"GettingStarted").then(e.hitch(this,function(a){this._handleSettingsUpdated(a.value)}))},_disablePreference:function(){this._preferenceSettingsService.setSetting(["matlab","commandwindow"],"GettingStarted",!1)},_handleSettingsUpdated:function(a){a&&!this._banner?this._createBanner():!a&&this._banner&&this._removeBanner()},_attachOnClickCallbackToHyperlink:function(a,c){var d=b(c)[0];d&&(d.onclick=
e.hitch(this,function(c){this._onHyperlinkClick(a);f.stop(c)}))},_onHyperlinkClick:function(a){this._hyperlinkService.openUrl("matlab:helpview(fullfile(docroot,'matlab','helptargets.map'), '"+a+"')")},_removeBanner:function(){this._aspectHandles.forEach(function(a){a.remove()});this._aspectHandles=[];this._banner.closeBanner();this._banner=null},destroy:function(){this._banner&&this._removeBanner()}})})},"MW/rtc/plugins/view/banner/Banner":function(){define("dojo/_base/declare dojo/_base/lang dojo/query dojo/on dojo/dom-style dojo/dom-class dojo/dom-construct dijit/_WidgetBase dijit/_TemplatedMixin dijit/form/Button dojo/text!./view/BannerTemplate.html MW/uiframework/FocusManager".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p){return g([h,k],{templateString:m,postCreate:function(){this.currentBannerHeight=0;this._createButtons();this._setBannerText();this._setIcon();this._placeBanner();this._setFocusBehavior()},_placeBanner:function(){if(this.params.parent){if("first"===this.params.position)a.add(this.domNode,"top");else if("last"===this.params.position)a.add(this.domNode,"bottom");else{c.place(this.domNode,this.params.parent);return}c.place(this.domNode,this.params.parent,this.params.position);
this.resize()}},resize:function(){var a=this.domNode.offsetHeight;this.currentBannerHeight!==a&&("first"===this.params.position?b.set(this.params.sibling,{top:a+"px",height:"calc(100% - "+a+"px)",position:"relative"}):"last"===this.params.position&&b.set(this.params.sibling,{height:"calc(100% - "+a+"px)",position:"relative"}),this.currentBannerHeight=a,this._alertResize())},_createButtons:function(){this.params.closable||b.set(this.closeButtonNode,"visibility","hidden");var a=this.params.buttons;
a&&a.forEach(function(a){var b=c.create("div",{className:"bannerButton"}),d=new l({label:a.text});d.on("click",f.hitch(this,function(){d.set("disabled","true");a.callback()}));d.placeAt(b);this.buttonsContainer.appendChild(b)},this)},_setIcon:function(){this.params.iconType&&"error"===this.params.iconType&&a.add(this.iconNode,"errorIcon")},_setBannerText:function(){this.bannerTextNode.innerHTML=this.params.bannerText},_alertResize:function(){this.params.resizer()},_setFocusBehavior:function(){p.refuseFocus(this.domNode)},
closeBanner:function(){c.destroy(this.id);b.set(this.domNode,"top","0px");"first"===this.params.position?a.remove(this.domNode,"top"):"last"===this.params.position&&a.remove(this.domNode,"bottom");this.resize()}})})},"MOTW/cmd/plugins/keyhandler/CommandWindowKeyHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./CommandWindowKeyHandler"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["cw.commandwindowpane",
"cw.core.promptinput"]}},createInstance:function(d,b){return new e(d,b)},destroyInstance:function(d){d.destroy()}})})},"MOTW/cmd/plugins/keyhandler/CommandWindowKeyHandler":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/has","dojo/keys","mw-log/Log"],function(g,f,e,d,b){return g(null,{constructor:function(a,c){this._targetNode=a;this._promptInput=c;this._eventHandlerList=[];var b=f.hitch(this,"_handleKeyDown");this.attachListener("keydown",b)},attachListener:function(a,c){var b={event:a,
handler:c};this._targetNode.addEventListener(b.event,b.handler,!0);this._eventHandlerList.push(b);return b},removeListener:function(a){-1<this._eventHandlerList.indexOf(a)?(this._targetNode.removeEventListener(a.event,a.handler,!0),this._eventHandlerList.splice(this._eventHandlerList.indexOf(a),1)):b.error("RemoveListener Failed: Event Listener does not exist")},_handleKeyDown:function(a){if(this._willEventUnaffectCursor(a))return!1;this._promptInput.updateCursorToPromptInput();return!1},_willEventUnaffectCursor:function(a){return this._checkCopyShortcuts(a)||
13<=a.keyCode&&20>=a.keyCode||224===a.keyCode||91===a.keyCode||93===a.keyCode||33<=a.keyCode&&37>=a.keyCode||a.keyCode===d.RIGHT_ARROW||a.keyCode===d.INSERT||112<=a.keyCode&&123>=a.keyCode||(a.ctrlKey||a.metaKey)&&86!==a.keyCode||a.shiftKey&&(a.keyCode===d.UP_ARROW||a.keyCode===d.DOWN_ARROW)},_checkCopyShortcuts:function(a){return e("mac")?a.metaKey&&67===a.keyCode:a.ctrlKey&&67===a.keyCode||a.shiftKey&&a.keyCode===d.INSERT},destroy:function(){this._eventHandlerList.forEach(this.removeListener,this)}})})},
"MOTW/cmd/plugins/promptinputhandler/PromptInputHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./PromptInputHandler"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.actionservice","cw.core.promptinput","rtc.keyhandler"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MOTW/cmd/plugins/promptinputhandler/PromptInputHandler":function(){define(["dojo/_base/declare",
"dojo/_base/lang","MOTW/cmd/CommandWindowActionEnum"],function(g,f,e){return g(null,{constructor:function(d,b,a){this._promptInput=b;this._rtcKeyHandler=a;b=[{id:e.CLEAR_PROMPT_INPUT,key:"escape",enabled:!0,callback:f.hitch(this,"_clearPromptInput")},{id:e.HOME_NAVIGATION,key:"home",platformKey:{mac:"ctrl_a"},enabled:!0,callback:f.hitch(this,"_moveToPromptStartIfApplicable")}];d.loadActions(b);this._addOtherKeyBindings()},_clearPromptInput:function(){this._promptInput.clearPromptInput();return!0},
_moveToPromptStartIfApplicable:function(){return 0===this._promptInput.isCursorOnPromptInput()?(this._promptInput.moveToPromptInputStart(),!0):!1},_addOtherKeyBindings:function(){this._rtcKeyHandler.addBinding({platformKey:{mac:"meta_left"},action:e.HOME_NAVIGATION})}})})},"MOTW/cmd/plugins/service/CodingUIBackendCodeProviderProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./CodingUIBackendCodeProvider"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["cw.core.promptinput",
"rtc.document"]}},createInstance:function(d,b){return new e(d,b)},priority:function(){return 2}})})},"MOTW/cmd/plugins/service/CodingUIBackendCodeProvider":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin","MW/rtc/EditorUtilities"],function(g,f,e){return g(f,{constructor:function(d,b){this._promptInput=d;this._document=b},getCode:function(){return this._promptInput.getPromptInput()},getAbsolutePositionInCode:function(d){var b=this._document.getCodeText(),a=this._promptInput.getPromptInputLineColumn(),
a=e.getOffsetFromLine(b,a.line-1)[0]+a.column-1;return e.getOffsetFromLine(b,d.line-1)[0]+d.column-1-a}})})},"MW/rtc/EditorUtilities":function(){define([],function(){return{getLineColumnFromOffset:function(g,f){"string"===typeof g&&(g=g.split("\n"));var e=0,d;for(d=0;d<g.length;d+=1){if(e+g[d].length>=f)return{line:d,column:f-e};e=e+g[d].length+1}return{line:0,column:0}},getOffsetFromLine:function(g,f){"string"===typeof g&&(g=g.split("\n"));var e=0,d;for(d=0;d<g.length;d+=1){if(f===d)return[e,g[d].length];
e=e+g[d].length+1}return[e,0]},getRangeOfCodeToFormat:function(g,f){var e=g.split("\n"),d=this.getOffsetFromLine(e,f.line),b={cursor:d[0]};e[f.line]&&(b.cursor+=f.column);f.anchor&&f.anchor.hasOwnProperty("line")&&f.anchor.hasOwnProperty("column")?(e=this.getOffsetFromLine(e,f.anchor.line),d[0]<e[0]?(b.start=d[0],b.end=e[0]+e[1]):(b.start=e[0],b.end=d[0]+d[1])):(b.start=0,b.end=g.length,b.cursorLine=f.line);return b},getWhiteSpaces:function(g){var f="",e;for(e=0;e<g;e+=1)f+=" ";return f}}})},"MOTW/cmd/plugins/syntaxhighlighting/MatlabTokensHandlerProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./MatlabTokensHandler"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["matlab.tokens","cw.core.promptinput","cw.commandwindowstatehandler","rtc.executionservice"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)},destroyInstance:function(d){d.destroy()}})})},"MOTW/cmd/plugins/syntaxhighlighting/MatlabTokensHandler":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect"],
function(g,f,e){return g([],{constructor:function(d,b,a,c){this._matlabTokensPlugin=d;this._promptInput=b;this._commandWindowStateHandler=a;this._executionService=c;this._aspectHandle=e.after(this._commandWindowStateHandler,"onCommandWindowReady",f.hitch(this,"_resetTokenizer"),!0)},_resetTokenizer:function(d){d!==this._executionService.EXECUTION_STATES.COMPLETING_BLOCK&&(d=this._promptInput.getPromptInputLineColumn(),this._matlabTokensPlugin.resetTokenStateForLine(d.line-1))},destroy:function(){this._aspectHandle.remove()}})})},
"MOTW/cmd/plugins/undoredo/UndoRedoControllerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./UndoRedoController"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["cw.initializer","rtc.undoredo.controller","cw.commandwindowstatehandler","rtc.motwactionservice","rtc.actionservice"]}},createInstance:function(d,b,a,c,h){return new e(d,b,a,c,h)},destroyInstance:function(d){d.destroy()}})})},
"MOTW/cmd/plugins/undoredo/UndoRedoController":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MOTW/motw/ActionIdConstants","MW/rtc/RichTextComponentFeatureEnum"],function(g,f,e,d,b){return g(null,{constructor:function(a,c,b,d,g){this._rtcUndoRedoController=c;this._motwActionService=d;this._rtcActionService=g;this._aspectHandles=[];this._aspectHandles.push(e.after(b,"onCommandWindowStateChange",f.hitch(this,"_handleClearUndoRedoStack")));this._aspectHandles.push(e.after(a,
"onReset",f.hitch(this,"_handleClearUndoRedoStack")));this._aspectHandles.push(e.after(c,"onUndoRedoStackUpdated",f.hitch(this,"_handleUndoRedoStackUpdate"),!0));this._updateMotwUndoRedoActions()},_updateMotwUndoRedoActions:function(){this._motwActionService.updateAction(d.UNDO_CMD,{callback:f.hitch(this._rtcActionService,"executeAction",b.UNDO_REDO.UNDO_ACTION)});this._motwActionService.updateAction(d.REDO_CMD,{callback:f.hitch(this._rtcActionService,"executeAction",b.UNDO_REDO.REDO_ACTION)})},_handleClearUndoRedoStack:function(){this._rtcUndoRedoController.clear()},
_handleUndoRedoStackUpdate:function(a){this._motwActionService.updateAction(d.UNDO_CMD,{enabled:a.isUndoable});this._motwActionService.updateAction(d.REDO_CMD,{enabled:a.isRedoable})},destroy:function(){this._aspectHandles.forEach(function(a){a.remove()})}})})},"MOTW/cmd/plugins/wraplines/WrapLinesProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MOTW/cmd/plugins/wraplines/WrapLines"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.view"]}},
createInstance:function(d){return new e(d)}})})},"MOTW/cmd/plugins/wraplines/WrapLines":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/dom-class","matlab_preferences/preferencesUI/PreferenceSettingsServiceFactory","MW/rtc/abstract/AbstractPlugin"],function(g,f,e,d,b){return g(b,{constructor:function(a){this._view=a;this._preferenceSettingsService=d.getInstance();this._preferenceSettingsService.on("settingchanged",f.hitch(this,function(a){"WrapLines"===a.settingKey&&this._handleSettingsUpdated(a.newValue)}));
this._preferenceSettingsService.getSetting(["matlab","commandwindow"],"WrapLines").then(f.hitch(this,function(a){this._handleSettingsUpdated(a.value)}))},_handleSettingsUpdated:function(a){a?this._enableWrapLines():this._disableWrapLines()},_enableWrapLines:function(){e.add(this._view.getDomtarget(),"wrappable")},_disableWrapLines:function(){e.remove(this._view.getDomtarget(),"wrappable")}})})},"MOTW/cmd/core/prompt/view/PromptLayouterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"./PromptLayouter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},"MOTW/cmd/core/prompt/view/PromptLayouter":function(){define(["dojo/_base/declare","MOTW/cmd/core/prompt/model/PromptNode","MW/rtc/plugins/view/layoutmanager/abstract/AbstractLayouter"],function(g,f,e){return g(e,{constructor:function(){},getApplicableNodeClass:function(){return f},layout:function(d,b){var a={"class":"promptNode"+
(b.active?" active":"")};a.textContent=b.text;return d.layoutInto(b,"span",a)}})})},"MOTW/cmd/view/CommandWindowViewProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MOTW/cmd/view/CommandWindowView","MW/rtc/core/provider/PluginProvider"],function(g,f,e,d){return g(d,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["cw.commandwindowpane","rtc.document","rtc.view"]}},createInstance:function(b,a,c){return new e(b,a,c)}})})},"MOTW/cmd/view/CommandWindowView":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin"],function(g,f,e,d){return g(d,{constructor:function(b,a,c){this._view=c;this._rtcDocument=a;this.own(e.after(b,"onResize",f.hitch(this,"scrollToBottom")))},scrollToBottom:function(){var b=this._rtcDocument.getEndOfDocumentLineColumn();this._view.scrollLineColumnIntoView(b.line,b.column)}})})},"MW/rtc/clipboardservice/ClipboardService":function(){define(["mw-messageservice/MessageService","MW/rtc/clipboardservice/InternalClipboard","MW/rtc/clipboardservice/ConnectorClipboard",
"MW/rtc/clipboardservice/BrowserSyncedClipboard"],function(g,f,e,d){return{_internalClipboard:null,_browserSyncedClipboard:null,getInternalClipboard:function(){this._internalClipboard||(this._internalClipboard=new f);return this._internalClipboard},getConnectorClipboard:function(){return new e(g)},getBrowserSyncedClipboard:function(){this._browserSyncedClipboard||(this._browserSyncedClipboard=new d);return this._browserSyncedClipboard},createClipboard:function(){return new f}}})},"MW/rtc/clipboardservice/InternalClipboard":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/Deferred","MW/rtc/clipboardservice/Clipboard"],function(g,f,e,d){return g(d,{constructor:function(){this._clipboardData={}},setClipboardData:function(b){var a=new e,c=this.getAllFlavors();try{b&&(this._clipboardData={},b.forEach(function(a){this._setData(a.flavor,a.content)},this)),a.resolve(),this.onClipboardDataChange(c,this.getAllFlavors())}catch(d){this._clipboardData={},a.reject()}return a.promise},_setData:function(b,a){return b&&a?(this._clipboardData[b]=a,!0):!1},getClipboardData:function(b){var a=
{},c=new e;b.forEach(f.hitch(this,function(c){a[c]=this._clipboardData[c]}));c.resolve(a);return c.promise},clearClipboardData:function(){var b=this.getAllFlavors();this._clipboardData={};this.onClipboardDataChange(b,this.getAllFlavors())},getAllFlavors:function(){var b=[];this._clipboardData&&(b=Object.keys(this._clipboardData));return b}})})},"MW/rtc/clipboardservice/Clipboard":function(){define(["dojo/_base/declare"],function(g){return g(null,{setClipboardData:function(f){throw Error("Unimplemented method : setClipboardData");
},getClipboardData:function(){throw Error("Unimplemented method : getClipboardData");},clearClipboardData:function(){throw Error("Unimplemented method : clearClipboard");},getAllFlavors:function(){throw Error("Unimplemented method : getAllFlavors");},onClipboardDataChange:function(f,e){}})})},"MW/rtc/clipboardservice/ConnectorClipboard":function(){define("dojo/_base/declare dojo/_base/lang dojo/has dojo/Deferred MW/rtc/clipboardservice/Clipboard MW/rtc/clipboardservice/ClipboardMessageServiceChannels mw-utils/Utils".split(" "),
function(g,f,e,d,b,a,c){return g(b,{REQUEST_ID:"requestId",RESPONSE_ID:"responseId",CONTENTS:"contents",SUCCESS_FLAG:"success",DUMMY_FLAVOR:"dummyFlavor",constructor:function(a){this._getDataPromise={};this._setDataPromise={};this._listOfAvaialableFlavors=[];this._messageService=a;this.installListeners()},installListeners:function(){this._messageService.subscribe(a.RECEIVE_AVAILABLE_DATA_FLAVORS,"_handleAvailableDataFlavors",this);this._messageService.publish(a.REQUEST_AVAILABLE_DATA_FLAVORS,{});
this._messageService.subscribe(a.GET_CLIPBOARD_DATA_RESPONSE,"_handleGetClipboardData",this);this._messageService.subscribe(a.SET_CLIPBOARD_DATA_RESPONSE,"_handleSetClipboardDataResponse",this)},setClipboardData:function(b){var e=new d,f=c.generateUuid();this._setDataPromise[f]=e;this._messageService.publish(a.SET_CLIPBOARD_DATA_REQUEST,{requestId:f,contents:b});return e.promise},_handleSetClipboardDataResponse:function(a){var c=a.data;a=c[this.SUCCESS_FLAG];(c=this._setDataPromise[c[this.RESPONSE_ID]])&&
(a?c.resolve():c.reject())},getClipboardData:function(b){var e=new d,f=c.generateUuid();this._getDataPromise[f]=e;this._messageService.publish(a.GET_CLIPBOARD_DATA_REQUEST,{requestId:f,flavors:b});return e.promise},_handleGetClipboardData:function(a){var c=a.data;a=c[this.CONTENTS];var c=c[this.RESPONSE_ID],b=this._getDataPromise[c];b&&(delete this._getDataPromise[c],a?b.resolve(a):b.reject(" [Clipboard Error] The data could not be retrieved "))},clearClipboardData:function(){var a=this.getAllFlavors();
this._listOfAvaialableFlavors=[];this.onClipboardDataChange(a,[])},getAllFlavors:function(){!e("windows")&&0===this._listOfAvaialableFlavors.length&&(this._listOfAvaialableFlavors=[this.DUMMY_FLAVOR]);return this._listOfAvaialableFlavors},_handleAvailableDataFlavors:function(a){var c=this.getAllFlavors();this._listOfAvaialableFlavors=a.data;this.onClipboardDataChange(c,this.getAllFlavors())}})})},"MW/rtc/clipboardservice/ClipboardMessageServiceChannels":function(){define([],function(){return{SET_CLIPBOARD_DATA_REQUEST:"/clipboardservice/setClipboardDataRequest",
GET_CLIPBOARD_DATA_REQUEST:"/clipboardservice/getClipboardDataRequest",REQUEST_AVAILABLE_DATA_FLAVORS:"/clipboardservice/requestAvailableDataFlavors",SET_CLIPBOARD_DATA_RESPONSE:"/clipboardservice/setClipboardDataResponse",GET_CLIPBOARD_DATA_RESPONSE:"/clipboardservice/getClipboardDataResponse",RECEIVE_AVAILABLE_DATA_FLAVORS:"/clipboardservice/sendAvailableDataFlavors"}})},"MW/rtc/clipboardservice/BrowserSyncedClipboard":function(){define("dojo/_base/declare dojo/_base/lang dojo/Deferred mw-log/Log MW/rtc/clipboardservice/Clipboard MW/rtc/plugins/cutcopypaste/MIMETypes".split(" "),
function(g,f,e,d,b,a){return g(b,{DUMMY_FLAVOR:"dummyFlavor",IE_TEXT_FLAVOR:"text",constructor:function(){this._availableFlavors=[];this._setDataPromise=this._getDataPromise=null},getCopyPasteHandlers:function(){return{cut:f.hitch(this,this._copyHandler),copy:f.hitch(this,this._copyHandler),paste:f.hitch(this,this._pasteHandler)}},setClipboardData:function(a){var b=new e;this._setDataPromise={object:b,data:a};return b.promise},_copyHandler:function(c){c.preventDefault();if(null!==this._setDataPromise){var b=
this._setDataPromise.data,e=[];if(c.clipboardData&&c.clipboardData.setData)b.forEach(function(a){try{c.clipboardData.setData(a.flavor,a.content),e.push(a.flavor)}catch(b){d.warn("Custom flavors could not be copied")}});else if(window.clipboardData){d.warn(!1,"Non-plaintext flavors could not be copied");var f=this.IE_TEXT_FLAVOR;b.forEach(function(c){c.flavor===a.TEXT&&window.clipboardData.setData(f,c.content)})}this._availableFlavors=e;this._setDataPromise.object.resolve();this._setDataPromise=null}},
getClipboardData:function(a){var b=new e;this._getDataPromise={object:b,data:a};return b.promise},_pasteHandler:function(a){a.preventDefault();var b={};if(a.clipboardData&&a.clipboardData.getData&&a.clipboardData.types)for(var e=a.clipboardData.types,f=this._getDataPromise.data,g=0;g<e.length;g+=1){var p=e[g];-1<f.indexOf(p)&&(b[p]=a.clipboardData.getData(p))}else window.clipboardData&&(d.warn(a.clipboardData&&a.clipboardData.getData,"Non-plaintext flavors could not be accessed"),b={"text/plain":window.clipboardData.getData(this.IE_TEXT_FLAVOR)});
this._availableFlavors=Object.keys(b);this._getDataPromise.object.resolve(b)},clearClipboardData:function(){this._availableFlavors=[]},getAllFlavors:function(){return 0==this._availableFlavors.length?[this.DUMMY_FLAVOR]:this._availableFlavors}})})},"MW/rtc/RichTextComponent":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/connect dojo/_base/lang dojo/aspect dojo/dom-construct dojo/dom-style dojo/dom-attr dojo/dom-class dojo/has dojo/keys dojo/on dojo/dom-geometry dijit/layout/ContentPane dijit/layout/_LayoutWidget dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!./templates/rtePane.html MW/rtc/core/registry/PluginRegistry MW/rtc/core/PluginResolver mw-actiondataservice/ActionDataService MW/rtc/keyBindingUtils MW/rtc/view/ViewEventUtilities MW/rtc/HasExtensions MW/layout/BorderContainer mw-mixins/property/VisualFamilyMixin".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x,y,B,D,E,F){return g([r,s,t,F],{templateString:u,widgetsInTemplate:!0,baseClass:"rtePane mwRichTextComponent",visualFamily:"default",constructor:function(a){a=a||{};this.dependencies=a.dependencies||{};this.registry=a.registry||[];var c=this.dependencies["rtc.backingstore"],c=c&&c.getStorageData?c.getStorageData():"";this.initialDocumentText=a.initialDocumentText||c;this.readOnly=a.readOnly;this.clientKeyBindings=a.keyBindings||[];this.clipboard=a.clipboard;
this.localActionService=a.actionDataService||new x;a.actionDataService||(this._createdLocalActionDataService=!0);this.features=a.features||{};this._enabledPlugins=this.features.enabled||[];this._disabledPlugins=this.features.disabled||[];this._updateEnabledPlugins(this._enabledPlugins);this.started=!1;this._syncTimer=null},postCreate:function(){this.scrollPane=a.create("div",{"class":"scrollPane mwRichTextComponentDocument dijitInline mwDoNotApplyCustomScrollbarCSS",tabindex:0});h.set(this.scrollPane,
"data-testid","rtc_scrollPane");this.features.fixedSize&&(this.borderContainer=new E({},this.rteWindow));this._loadPlugins();this.own(b.after(this._internalDocument,"onDocumentChanged",d.hitch(this,"documentChanged"),!0));this.features.fixedSize&&(this.view.paddingLeft=4);this.own(b.after(this.cursor,"onChange",d.hitch(this,"onCursorChanged")));this.own(b.after(this._undoRedoController,"onUndoRedoStackUpdated",d.hitch(this,"undoRedoStackUpdated"),!0));this.keyHandler=this._pluginResolver.getDependency("rtc.keyhandler");
this._loadActionsAndKeyBindings();this._focusService=this._pluginResolver.getDependency("rtc.focusservice");this._initializeDocument();l("ff")&&this._focusService.setFocus();this.features.fixedSize||(this.scrollPane.style.paddingRight="2px",this.scrollPane.style.overflow="visible")},startup:function(){if(!this.started){this.started=!0;this.borderContainer?(this._initializeBorderContainer(),this.own(b.after(this.borderContainer,"layout",d.hitch(this.view,"onResize")))):a.place(this.scrollPane,this.rteWindow);
if(0<=this._enabledPlugins.indexOf("margin.linenumber"))this.onEnableLineGutter();this.cursor.initialize()}this.view.onLayoutChange()},_initializeBorderContainer:function(){this.borderContainer.startup();this.borderContainer.design="sidebar";this._scrollPaneContentPane=this._scrollPaneContentPane||this._createContentPaneWrapper(this.scrollPane,"overflow: hidden");this.borderContainer.addWithProperties(this._scrollPaneContentPane,{isResizable:!0,isProportional:!0,region:"center"})},destroy:function(){this._featureInterface.onClose();
this._syncTimer&&clearTimeout(this._syncTimer);this._pluginResolver.destroy();this._createdLocalActionDataService&&this.localActionService.destroy();this.borderContainer&&this.borderContainer.destroyRecursive();this.inherited(arguments)},_onClose:function(){},_loadActionsAndKeyBindings:function(){this.keyHandler.addBindings(this.clientKeyBindings);y.addLabelsForActionService(this.localActionService)},showEditor:function(){c.set(this.scrollPane,"left","auto")},hideEditor:function(){c.set(this.scrollPane,
"left","-10000px")},onEnableLineGutter:function(){this.addLeftMargin();this._featureInterface.onEnableLineGutter()},_createContentPaneWrapper:function(a,c){var b=new q({style:c});b.set("content",a);return b},addLeftMargin:function(){if(this.borderContainer&&!this._gutterContentPane){var a="overflow: hidden; width: "+this.marginProvider.getWidth()+"px";this._gutterContentPane=this._gutterContentPane||this._createContentPaneWrapper(this.marginProvider.marginContainer,a);this.borderContainer.addWithProperties(this._gutterContentPane,
{isProportional:!0,region:"left",layoutOrder:1})}},hideCursor:function(){this.cursor.hide()},showCursor:function(){this.cursor.show()},setCursorToEnd:function(){this.cursor.movePosition(this.cursor.END)},_initializeDocument:function(){this.initialDocumentText?this._internalDocument.openTextDocument(this.initialDocumentText,this.readOnly):this._internalDocument.newDocument(this.readOnly)},getActionDataService:function(){return this.localActionService},getCursor:function(){return this.cursor},getDocument:function(){return this.document},
getView:function(){return this.view},isEditable:function(){return!this._internalDocument.isReadOnly()},getLanguage:function(){return null},getUndoRedoStates:function(){return{isUndoable:this._undoRedoController.canUndo(),isRedoable:this._undoRedoController.canRedo()}},undoRedoStackUpdated:function(a){},undo:function(){this._undoRedoController.undo()},redo:function(){this._undoRedoController.redo()},addDocumentChangeListener:function(a){this.own(b.after(this._internalDocument,"onDocumentChanged",a,
!0))},getId:function(){return this.id},getMatlabCellModeText:function(){return""},focus:function(){this._focusService.setFocus()},blur:function(){this._focusService.setBlur()},resize:function(){this.borderContainer&&(this._updateDimensionsOfBorderContainer(),this.borderContainer.resize());this.view.onResize()},_updateDimensionsOfBorderContainer:function(){var a=this.marginProvider?this.marginProvider.getWidth():0;this.borderContainer.setFreeDimension("left",a)},setCursorInView:function(a,c,b){!a.rteNode&&
a.parentNode.rteNode&&(a=a.parentNode);b?this.cursor.fixAnchor():this.cursor.releaseAnchor();this.cursor.setPosition(this._internalDocument.textNode(a.rteNode,c),c,!1)},documentChanged:function(a){},hasSelection:function(){return this.cursor.hasSelection()},getText:function(){return this.document.getText()},setActive:function(){this._featureInterface.onActivated()},_onActivated:function(){},onCursorChanged:function(){if(this.cursor.isHidden())return!1;this.keyHandler.prepareKeyCapture(this.cursor.hasSelection())},
resetEditor:function(a,c){var b=c&&c.readOnly,d=c&&c.silentUpdate,h=c?c.cursorOffset:null;(!c||!c.preserveUndoStack)&&this._undoRedoController.clear();this.cursor.hide();this._internalDocument.newDocument(b);a?!1===d?(this._internalDocument.openTextDocument("",b),this.cursor.movePosition(this.cursor.START),this.document.insertTextAtCurrentPosition(a)):this._internalDocument.openTextDocument(a,b):this._internalDocument.newDocument(b);null!==a&&h?this.cursor.setPosition(h):this.cursor.movePosition(this.cursor.START);
this.cursor.show();0<this._enabledPlugins.indexOf("margin.linenumber")&&this.marginProvider.update()},selectAll:function(){this.cursor.selectAll()},getFeatureInterface:function(){this._featureInterface||(this._featureInterface={onClose:d.hitch(this,"_onClose"),onActivated:d.hitch(this,"_onActivated"),resize:d.hitch(this,"resize"),onEnableLineGutter:function(){}});return this._featureInterface},_loadPlugins:function(){var a=this._getDefaultDependencies(),c=v.plugins.concat(this.registry);this._pluginResolver=
new w(c,this._enabledPlugins,this._disabledPlugins,a,this.dependencies);this._loadFeatures()},_getDefaultDependencies:function(){var a={"rtc.actionservice":this.localActionService,"rtc.bordercontainer":this.borderContainer,"rtc.domnode":this.domNode,"rtc.fixedsize":this.features.fixedSize,"rtc.fileendselectable":this.features.fileEndSelectable,"rtc.scrollpane":this.scrollPane,"rtc.featureinterface":this.getFeatureInterface()};this.clipboard&&(a["rtc.clipboard"]=this.clipboard);return a},_loadFeatures:function(){this._pluginResolver.resolve();
this.marginProvider=this._pluginResolver.getDependency("rtc.margin");this.own(b.after(this.marginProvider,"onResize",d.hitch(this,"_handleMarginResize")));this._internalDocument=this._pluginResolver.getDependency("rtc.internaldocument");this.document=this._pluginResolver.getDependency("rtc.document");this.cursor=this._pluginResolver.getDependency("rtc.cursor");this.view=this._pluginResolver.getDependency("rtc.view");this._undoRedoController=this._pluginResolver.getDependency("rtc.undoredo.controller")},
_handleMarginResize:function(){this.borderContainer&&this._updateDimensionsOfBorderContainer();this.view.onLayoutChange()},_updateEnabledPlugins:function(a){a.push("rtc.margin");a.push("rtc.eventhandler");a.push("rtc.serializers");0>this._disabledPlugins.indexOf("document")&&a.push("document");0>this._disabledPlugins.indexOf("cursor")&&a.push("cursor");0>this._disabledPlugins.indexOf("rtc.clipboard")&&a.push("rtc.clipboard");0>this._disabledPlugins.indexOf("rtc.code.comment")&&a.push("rtc.code.comment");
0>this._disabledPlugins.indexOf("rtc.divcaret")&&a.push("rtc.divcaret");0>this._disabledPlugins.indexOf("rtc.undoredo.action")&&a.push("rtc.undoredo.action");0>this._disabledPlugins.indexOf("rtc.undoredo.cursor")&&a.push("rtc.undoredo.cursor");0>this._disabledPlugins.indexOf("rtc.tooltip")&&a.push("rtc.tooltip");0>this._disabledPlugins.indexOf("rtc.imeinput")&&a.push("rtc.imeinput");0>this._disabledPlugins.indexOf("rtc.divselection")&&a.push("rtc.divselection");0>this._disabledPlugins.indexOf("rtc.plaintextmimeconverter")&&
a.push("rtc.plaintextmimeconverter");0>this._disabledPlugins.indexOf("rtc.plaintextmimeincodeconverter")&&a.push("rtc.plaintextmimeincodeconverter");0>this._disabledPlugins.indexOf("rtc.unicodestringmimeconverter")&&a.push("rtc.unicodestringmimeconverter");0>this._disabledPlugins.indexOf("rtc.plaintextmimegeneratorprovider")&&a.push("rtc.plaintextmimegeneratorprovider");0>this._disabledPlugins.indexOf("rtc.plugins.cursorgripper")&&a.push("rtc.plugins.cursorgripper");0>this._disabledPlugins.indexOf("rtc.plugins.device.ios.virtualkeyboardshortcutbar")&&
a.push("rtc.plugins.device.ios.virtualkeyboardshortcutbar")}})})},"MW/rtc/core/registry/PluginRegistry":function(){define("MW/rtc/clipboardservice/ClipboardProvider MW/rtc/cursor/CursorActionsProvider MW/rtc/cursor/CursorNavigatorProvider MW/rtc/cursor/CursorProvider MW/rtc/cursor/CursorViewProvider MW/rtc/cursor/CursorControllerProvider MW/rtc/datamodel/DefaultBackingStoreProvider MW/rtc/execution/BreakpointlessEvalServiceProvider MW/rtc/execution/ExecutionServiceProvider MW/rtc/model/DocumentActionsProvider MW/rtc/model/DocumentProvider MW/rtc/model/InternalDocumentProvider MW/rtc/nodes/contentconverter/ContentConverterPluginProvider MW/rtc/nodes/contentconverter/inner/LineNodeContentConverterProvider MW/rtc/nodes/contentconverter/inner/RootNodeContentConverterProvider MW/rtc/nodes/contentconverter/leaf/PlainTextNodeContentConverterProvider MW/rtc/nodes/nodeconversionrules/InnerNodeConversionRulesProvider MW/rtc/nodes/nodeconversionrules/NodeConversionRulesProvider MW/rtc/events/KeyHandlerProvider MW/rtc/hyperlinkservice/HyperlinkServiceProvider MW/rtc/plugins/internalhyperlinkservice/InternalHyperlinkServiceProvider MW/rtc/model/io/serializers/providers/containers/TableOfContentsContainerSerializerProvider MW/rtc/model/io/serializers/providers/containers/TableOfContentsHeadingSerializerProvider MW/rtc/model/io/serializers/providers/containers/TableOfContentsListSerializerProvider MW/rtc/plugins/internalhyperlinkservice/AnchorProvider MW/rtc/plugins/tableofcontents/TableOfContentsProvider MW/rtc/plugins/tableofcontents/TableOfContentsContainerInsertionRulesProvider MW/rtc/plugins/tableofcontents/TableOfContentsHeadingNodeConversionRulesProvider MW/rtc/plugins/tableofcontents/TableOfContentsListConversionRulesProvider MW/rtc/plugins/tableofcontents/export/TableOfContentsContainer2HTMLProvider MW/rtc/plugins/tableofcontents/view/TableOfContentsLayouterProvider MW/rtc/plugins/tableofcontents/view/TableOfContentsHeadingNodeLayouterProvider MW/rtc/plugins/tableofcontents/view/TableOfContentsContainerLayouterProvider MW/rtc/plugins/tableofcontents/model/TableOfContentsContainerContentConverterProvider MW/rtc/plugins/tableofcontents/model/TableOfContentsHeadingNodeContentConverterProvider MW/rtc/plugins/tableofcontents/model/TableOfContentsListContentConverterProvider MW/rtc/plugins/tableofcontents/view/TableOfContentsListCoordinateConverterProvider MW/rtc/plugins/tableofcontents/view/TableOfContentsContainerCoordinateConverterProvider MW/rtc/plugins/tableofcontents/view/TableOfContentsHeadingNodeCoordinateConverterProvider MW/rtc/margin/TraditionalLineNumberDecoratorProvider MW/rtc/margin/settings/LineNumberPreferenceProvider MW/rtc/model/io/SerializersProvider MW/rtc/model/io/serializers/providers/containers/CodeContainerSerializerProvider MW/rtc/model/io/serializers/providers/containers/ContainerSerializerProvider MW/rtc/model/io/serializers/providers/containers/HeadingContainerSerializerProvider MW/rtc/model/io/serializers/providers/containers/HyperlinkContainerSerializerProvider MW/rtc/model/io/serializers/providers/containers/ListContainerSerializerProvider MW/rtc/model/io/serializers/providers/containers/ListItemContainerSerializerProvider MW/rtc/model/io/serializers/providers/containers/LiveAppLineContainerSerializerProvider MW/rtc/model/io/serializers/providers/containers/RichTextContainerSerializerProvider MW/rtc/model/io/serializers/providers/containers/SectionBreakContainerSerializerProvider MW/rtc/model/io/serializers/providers/nodes/EquationSerializerProvider MW/rtc/model/io/serializers/providers/nodes/ImageSerializerProvider MW/rtc/model/io/serializers/providers/nodes/LiveControlSerializerProvider MW/rtc/model/io/serializers/providers/nodes/PlainTextSerializerProvider MW/rtc/model/io/serializers/providers/nodes/RichTextSerializerProvider MW/rtc/nodes/insertionrules/LineNodeInsertionRulesProvider MW/rtc/nodes/insertionrules/LiveControlNodeInsertionRulesProvider MW/rtc/nodes/insertionrules/OpaqueNodeInsertionRulesProvider MW/rtc/nodes/insertionrules/PlainTextNodeInsertionRulesProvider MW/rtc/plugins/blockmatching/BlockMatchingPluginProvider MW/rtc/plugins/breakpoint/matlab/executablelines/ExecutableLineDecoratorProvider MW/rtc/plugins/breakpoint/matlab/TraditionalBreakpointStylerProvider MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointContextMenuModelFactoryProvider MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointDataModelProvider MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointFactoryProvider MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointDecoratorProvider MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointActionsProvider MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointDataServiceProvider MW/rtc/plugins/breakpoint/matlab/TraditionalBreakpointDirtyServiceProvider MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointMarginProvider MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointPromiseManagerProvider MW/rtc/plugins/breakpoint/matlab/temporary/TemporaryBreakpointManagerProvider MW/rtc/plugins/breakpoint/DummyBreakpointMarginProvider MW/rtc/plugins/buttonfactory/ButtonFactoryProvider MW/rtc/plugins/caseconverter/CaseConverterProvider MW/rtc/plugins/code/CodeTextServiceProvider MW/rtc/plugins/code/ExecutableLineServiceProvider MW/rtc/plugins/contextmenu/DojoContextMenuGeneratorProvider MW/rtc/plugins/contextmenu/ContextMenuProvider MW/rtc/plugins/contextmenu/DocumentContextMenuModelProvider MW/rtc/plugins/currentlinehighlight/CurrentLineHighlightPreferenceProvider MW/rtc/plugins/currentlinehighlight/CurrentLineHighlightProvider MW/rtc/plugins/cursorgripper/CursorGripperProvider MW/rtc/plugins/cutcopypaste/CutCopyPasteProvider MW/rtc/plugins/cutcopypaste/ClipboardConverterProvider MW/rtc/plugins/cutcopypaste/DefaultMIMEConverterProvider MW/rtc/plugins/cutcopypaste/mime/PlainTextMimeConverterProvider MW/rtc/plugins/cutcopypaste/mime/PlainTextMimeInCodeConverterProvider MW/rtc/plugins/cutcopypaste/mime/CodeExampleMimeInCodeConverterProvider MW/rtc/plugins/cutcopypaste/mime/CodeMimeInCodeExampleConverterProvider MW/rtc/plugins/cutcopypaste/mime/UnicodeStringMimeConverterProvider MW/rtc/plugins/cutcopypaste/mime/PromptlessTextMimeConverterProvider MW/rtc/plugins/cutcopypaste/PlainTextMimeGeneratorProvider MW/rtc/plugins/cutcopypaste/HTMLGeneratorProvider MW/rtc/plugins/cutcopypaste/InternalSerializationGeneratorProvider MW/rtc/plugins/cutcopypaste/PlainTextNodeConverterProvider MW/rtc/plugins/cutcopypaste/RTFGeneratorProvider MW/rtc/plugins/datatip/DataTipProvider MW/rtc/plugins/draganddrop/DragAndDropProvider MW/rtc/plugins/draganddrop/DragAndDropNotifierProvider MW/rtc/plugins/debug/breadcrumbstack/BreadcrumbStackProvider MW/rtc/plugins/debug/executionarrow/ExecutionArrowDecoratorProvider MW/rtc/plugins/debug/executionlines/ExecutionLinesPluginProvider MW/rtc/plugins/debug/DatatipPluginProvider MW/rtc/plugins/debug/DebuggerManagerProvider MW/rtc/plugins/debug/DebugLineAutoScrollPluginProvider MW/rtc/plugins/debug/DebugLineFocusPluginProvider MW/rtc/plugins/debug/DebugStackModelProvider MW/rtc/plugins/debug/DocumentDebugServicesProvider MW/rtc/plugins/debug/DocumentLoadedServiceProvider MW/rtc/plugins/debug/RunToLineServiceProvider MW/rtc/plugins/debug/DocumentDirtyDebugServiceProvider MW/rtc/plugins/debug/contextualbuttons/ContextualButtonFactoryProvider MW/rtc/plugins/debug/contextualbuttons/runtohere/RunToHereViewModelProvider MW/rtc/plugins/debug/contextualbuttons/runtohere/RunToHereViewProvider MW/rtc/plugins/debug/contextualbuttons/runtohere/hoverservice/RunToHereCodeHoverServiceProvider MW/rtc/plugins/debug/contextualbuttons/stepin/FunctionCallsiteFactoryProvider MW/rtc/plugins/debug/contextualbuttons/stepin/StepInManagerProvider MW/rtc/plugins/debug/contextualbuttons/stepin/StepInViewProvider MW/rtc/plugins/device/ios/VirtualKeyboardShortcutBarProvider MW/rtc/plugins/editordataservice/EditorDataServiceProvider MW/rtc/plugins/editordataservice/EditorDataServiceManagerProvider MW/rtc/plugins/embeddedoutputs/EmbeddedOutputsDBQuitSaveReadyProvider MW/rtc/plugins/embeddedoutputs/EvalTextCacheProvider MW/rtc/plugins/embeddedoutputs/ClearOutputsCacheProvider MW/rtc/plugins/embeddedoutputs/CurrentOutputServiceProvider MW/rtc/plugins/embeddedoutputs/EmbeddedOutputsProvider MW/rtc/plugins/embeddedoutputs/ExecutionRequestFactoryProvider MW/rtc/plugins/embeddedoutputs/OutputHandlerProvider MW/rtc/plugins/embeddedoutputs/LineNumberTrackerProvider MW/rtc/plugins/embeddedoutputs/LineContinuationTrackerProvider MW/rtc/plugins/embeddedoutputs/StateHandlerProvider MW/rtc/plugins/embeddedoutputs/SyntaxErrorHandlerProvider MW/rtc/plugins/embeddedoutputs/OutputRemoverProvider MW/rtc/plugins/embeddedoutputs/CopyOutputsProvider MW/rtc/plugins/embeddedoutputs/ExecutionManagerProvider MW/rtc/plugins/embeddedoutputs/ExecutionDataManagerProvider MW/rtc/plugins/embeddedoutputs/view/inline/InlineViewProvider MW/rtc/plugins/embeddedoutputs/view/onright/OnrightViewProvider MW/rtc/plugins/embeddedoutputs/loadinterceptors/DeferredLoadInterceptorProvider MW/rtc/plugins/embeddedoutputs/loadinterceptors/EmbeddedOutputsLoadInterceptorManagerProvider MW/rtc/plugins/embeddedoutputs/model/EmbeddedOutputsModelProvider MW/rtc/plugins/embeddedoutputs/model/SplitterPositionModelProvider MW/rtc/plugins/embeddedoutputs/outputhandlers/error/ErrorOutputHandlerProvider MW/rtc/plugins/embeddedoutputs/codegen/CodeGenFactoryProvider MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseText2HTMLProvider MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureOutputHandlerProvider MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureConnectionManagerProvider MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/export/Figure2HTMLProvider MW/rtc/plugins/embeddedoutputs/outputhandlers/matrix/MatrixOutputHandlerProvider MW/rtc/plugins/embeddedoutputs/outputhandlers/matrix/export/MatrixElement2HTMLProvider MW/rtc/plugins/embeddedoutputs/outputhandlers/symbolic/SymbolicOutputHandlerProvider MW/rtc/plugins/embeddedoutputs/outputhandlers/symbolic/export/Symbolic2HTMLProvider MW/rtc/plugins/embeddedoutputs/outputhandlers/text/TextOutputHandlerProvider MW/rtc/plugins/embeddedoutputs/outputhandlers/variable/VariableOutputHandlerProvider MW/rtc/plugins/embeddedoutputs/outputhandlers/variable/export/VariableElement2HTMLProvider MW/rtc/plugins/embeddedoutputs/outputhandlers/variablestring/VariableStringOutputHandlerProvider MW/rtc/plugins/embeddedoutputs/outputhandlers/warning/WarningOutputHandlerProvider MW/rtc/plugins/embeddedoutputs/view/EmbeddedOutputsAlertProvider MW/rtc/plugins/embeddedoutputs/view/HitLineIndicatorProvider MW/rtc/plugins/embeddedoutputs/ExecutionManagerViewServiceProvider MW/rtc/plugins/embeddedoutputs/triggers/TriggersProvider MW/rtc/plugins/embeddedoutputs/triggers/InterruptActionProvider MW/rtc/plugins/export/ExportNotifierProvider MW/rtc/plugins/folding/FoldingActionsProvider MW/rtc/plugins/folding/FoldingControllerProvider MW/rtc/plugins/folding/FoldingModelProvider MW/rtc/plugins/export/html/HTMLExporterProvider MW/rtc/plugins/export/html/LineNode2HTMLProvider MW/rtc/plugins/export/html/OutputParagraph2HTMLProvider MW/rtc/plugins/export/html/PlainTextNode2HTMLProvider MW/rtc/plugins/folding/view/FoldingMarginProvider MW/rtc/plugins/folding/view/FoldingDecoratorProvider MW/rtc/plugins/folding/view/FoldingEllipsesManagerProvider MW/rtc/plugins/language/matlab/executablecode/ExecutableCodeServiceProvider MW/rtc/plugins/language/matlab/executablecode/executablecodeconverter/ExecutableCodeConverterProvider MW/rtc/plugins/language/matlab/executablecode/executablecodeconverter/RootNodeExecutableCodeConverterProvider MW/rtc/plugins/language/matlab/executablecode/executablecodeconverter/LineNodeExecutableCodeConverterProvider MW/rtc/plugins/language/matlab/executablecode/executablecodeconverter/PlainTextNodeExecutableCodeConverterProvider MW/rtc/plugins/language/matlab/folding/MatlabCodeFoldingProvider MW/rtc/plugins/language/matlab/syntax/mtree/MTreeRangeFactoryProvider MW/rtc/plugins/language/matlab/syntax/mtree/MTreeServiceProvider MW/rtc/plugins/language/matlab/syntax/mtree/codeblocks/MTreeCodeBlockServicesProvider MW/rtc/plugins/language/matlab/syntax/mtree/codeblocks/MTreeCodeBlockStructureProvider MW/rtc/plugins/language/matlab/syntaxhighlighter/ServerSideSyntaxHighlighterProvider MW/rtc/plugins/equations/equationcontroller/EquationControllerProvider MW/rtc/plugins/equations/equationcontroller/nodes/EquationNodeContentConverterProvider MW/rtc/plugins/equations/equationcontroller/view/EquationCoordinateConverterProvider MW/rtc/plugins/equations/equationcontroller/view/EquationLayouterProvider MW/rtc/plugins/equations/equationeditor/EquationEditorProvider MW/rtc/plugins/equations/equationeditor/MathMLMimeConverterProvider MW/rtc/plugins/equations/export/Equation2HTMLProvider MW/rtc/plugins/equations/latexeditor/LaTeXEditorProvider MW/rtc/plugins/events/EventHandlerProvider MW/rtc/plugins/execution/ExecutionActionsProvider MW/rtc/plugins/execution/ControlCServiceProvider MW/rtc/plugins/execution/BusyIdleServicesProvider MW/rtc/plugins/execution/margin/DecoratableExecutionMarginProvider MW/rtc/plugins/find/FindProvider MW/rtc/plugins/find/ReplaceProvider MW/rtc/plugins/formatcode/FormatCodePluginProvider MW/rtc/plugins/goto/GotoProvider MW/rtc/plugins/goto/GotoSectionServiceProvider MW/rtc/plugins/htmlmime/HTMLMimeConverterProvider MW/rtc/plugins/hyperlink/HyperlinkProvider MW/rtc/plugins/hyperlink/HyperlinkEditorProvider MW/rtc/plugins/hyperlink/HTMLHyperlinkElementHandlerProvider MW/rtc/plugins/hyperlink/HyperlinkMIMEConverterProvider MW/rtc/plugins/hyperlink/HyperlinkTooltipProvider MW/rtc/plugins/hyperlink/export/Hyperlink2HTMLProvider MW/rtc/plugins/hyperlink/model/HyperlinkNodeContentConverterProvider MW/rtc/plugins/hyperlink/view/HyperlinkCoordinateConverterProvider MW/rtc/plugins/hyperlink/view/HyperlinkLayouterProvider MW/rtc/plugins/images/HTMLImageElementHandlerProvider MW/rtc/plugins/images/ImagesProvider MW/rtc/plugins/images/ImageMimeConverterProvider MW/rtc/plugins/images/ImageNodeConverterProvider MW/rtc/plugins/images/InsertImageProvider MW/rtc/plugins/images/InlineResizeImageProvider MW/rtc/plugins/images/export/Image2HTMLProvider MW/rtc/plugins/images/model/ImageNodeContentConverterProvider MW/rtc/plugins/images/view/ImageCoordinateConverterProvider MW/rtc/plugins/images/view/ImageLayouterProvider MW/rtc/plugins/imeinput/IMEInputProvider MW/rtc/plugins/indentation/IndentationProvider MW/rtc/plugins/indentutilities/IndentUtilitiesProvider MW/rtc/plugins/hyperlink/HyperlinkInsertionRulesProvider MW/rtc/plugins/insertionrules/InsertionRuleServiceProvider MW/rtc/plugins/lists/model/ListParagraphContentConverterProvider MW/rtc/plugins/lists/model/ListItemContentConverterProvider MW/rtc/plugins/lists/ListParagraphInsertionRulesProvider MW/rtc/plugins/lists/ListItemInsertionRulesProvider MW/rtc/plugins/codeexample/export/CodeExampleBlock2HTMLProvider MW/rtc/plugins/codeexample/model/CodeExampleBlockNodeContentConverterProvider MW/rtc/plugins/codeexample/model/CodeExampleLineNodeContentConverterProvider MW/rtc/plugins/codeexample/view/CodeExampleBlockLayouterProvider MW/rtc/plugins/codeexample/view/CodeExampleLineLayouterProvider MW/rtc/plugins/codeexample/view/CodeExampleBlockCoordinateConverterProvider MW/rtc/plugins/codeexample/CodeExampleBlockInsertionRulesProvider MW/rtc/plugins/codeexample/CodeExampleLineInsertionRulesProvider MW/rtc/model/io/serializers/providers/containers/CodeExampleBlockContainerSerializerProvider MW/rtc/model/io/serializers/providers/containers/CodeExampleLineContainerSerializerProvider MW/rtc/plugins/codeexample/CodeExampleBlockKeyHandlerProvider MW/rtc/plugins/codeexample/CodeExampleProvider MW/rtc/plugins/codeexample/syntaxhighlighter/matlab/SyntaxHighlighterProvider MW/rtc/plugins/resizer/ResizerProvider MW/rtc/plugins/richtext/RichTextNodeInsertionRulesProvider MW/rtc/plugins/richtext/RichTextParagraphInsertionRulesProvider MW/rtc/plugins/richtext/view/HeadingLayouterProvider MW/rtc/plugins/richtext/view/RichTextLayouterProvider MW/rtc/plugins/richtext/view/RichTextParagraphLayouterProvider MW/rtc/plugins/richtext/nodes/inner/RichTextParagraphNodeContentConverterProvider MW/rtc/plugins/richtext/nodes/inner/HeadingNodeContentConverterProvider MW/rtc/plugins/richtext/nodes/leaf/RichTextNodeContentConverterProvider MW/rtc/plugins/save/SaveReadyManagerProvider MW/rtc/plugins/sectionbreak/SectionBreakInsertionRulesProvider MW/rtc/plugins/undoredo/UndoRedoControllerProvider MW/rtc/plugins/undoredo/EditBlockControllerProvider MW/rtc/plugins/undoredo/UndoRedoActionProvider MW/rtc/plugins/undoredo/UndoRedoCursorProvider MW/rtc/plugins/language/matlab/alert/AlertControllerProvider MW/rtc/plugins/language/matlab/alert/AlertModelProvider MW/rtc/plugins/language/matlab/alert/AlertViewProvider MW/rtc/plugins/language/matlab/alert/AlertWidgetFactoryProvider MW/rtc/plugins/language/matlab/diagnosticmessage/DiagnosticMessageFormatterProvider MW/rtc/plugins/language/matlab/autoindent/AutoIndentProvider MW/rtc/plugins/language/matlab/autoindent/preferences/AutoIndentPreferenceProvider MW/rtc/plugins/language/matlab/code/CodeChangeServiceProvider MW/rtc/plugins/language/matlab/codecontent/CodeContentProvider MW/rtc/plugins/language/matlab/codeanalyzer/model/CodeAnalyzerModelProvider MW/rtc/plugins/language/matlab/codeanalyzer/preferences/CodeAnalyzerPreferencesProvider MW/rtc/plugins/language/matlab/codeanalyzer/tooltip/CodeAnalyzerTooltipProvider MW/rtc/plugins/language/matlab/codeanalyzer/view/CodeAnalyzerViewProvider MW/rtc/plugins/language/matlab/codeanalyzer/CodeAnalyzerPluginProvider MW/rtc/plugins/language/matlab/codeanalyzer/CodeAnalyzerAutoFixProvider MW/rtc/plugins/language/matlab/codeanalyzer/messagebar/AlertMessageLayerProvider MW/rtc/plugins/language/matlab/codeanalyzer/messagebar/CodeAnalyzerMessageLayerProvider MW/rtc/plugins/language/matlab/codingui/CodingUIActionHandlerProvider MW/rtc/plugins/language/matlab/codingui/CodingUIContextManagerProvider MW/rtc/plugins/language/matlab/codingui/CodingUIProvider MW/rtc/plugins/language/matlab/codingui/CodingUIRequestHandlerProvider MW/rtc/plugins/language/matlab/codingui/CodingUITabHandlerProvider MW/rtc/plugins/language/matlab/codingui/CodingUIViewEventBusProvider MW/rtc/plugins/language/matlab/codingui/preferences/CodingUIPreferenceProvider MW/rtc/plugins/language/matlab/codingui/view/CodingUIViewProvider MW/rtc/plugins/language/matlab/contextualselection/ContextualSelectionUtilityProvider MW/rtc/plugins/language/matlab/contextualselection/EvaluateSelectionProvider MW/rtc/plugins/language/matlab/contextualselection/HelpOnSelectionProvider MW/rtc/plugins/language/matlab/contextualselection/HelpServiceProvider MW/rtc/plugins/language/matlab/contextualselection/OpenSelectionProvider MW/rtc/plugins/language/matlab/commentCode/CommentCodeProvider MW/rtc/plugins/language/matlab/filetype/FileTypeProvider MW/rtc/plugins/language/matlab/functionhints/FunctionHintsProvider MW/rtc/plugins/language/matlab/syntax/functions/FunctionServiceProvider MW/rtc/plugins/functionnotifier/FunctionArgumentNotifierProvider MW/rtc/plugins/functionnotifier/LocalFunctionNotifierProvider MW/rtc/plugins/functionnotifier/AllFunctionNotifierProvider MW/rtc/plugins/functionnotifier/TopLevelFunctionNotifierProvider MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppBackendServiceProvider MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppCodeManagerProvider MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppControllerProvider MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppCursorHandlerProvider MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppDocumentHandlerProvider MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppEditorKeyHandlerProvider MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppExecutionManagerProvider MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppFocusManagerProvider MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppUIFigureHandlerProvider MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppViewModelProvider MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppWidgetKeyHandlerProvider MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppInlineNodeContentConverterProvider MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppInlineNodeInsertionRulesProvider MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppLineNodeContentConverterProvider MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppLineNodeConversionRulesProvider MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppLineNodeInsertionRulesProvider MW/rtc/plugins/language/matlab/codingui/liveapps/view/LiveAppInlineNodeCoordinateConverterProvider MW/rtc/plugins/language/matlab/codingui/liveapps/view/LiveAppInlineNodeLayouterProvider MW/rtc/plugins/language/matlab/codingui/liveapps/view/LiveAppLineNodeCoordinateConverterProvider MW/rtc/plugins/language/matlab/codingui/liveapps/view/LiveAppLineNodeLayouterProvider MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlActionHandlerProvider MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlContextManagerProvider MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlContextMenuProvider MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlExecutionProvider MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlInsertionProvider MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlToolstripActionsProvider MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlWidgetHandlerProvider MW/rtc/plugins/language/matlab/codingui/livecontrols/export/LiveControl2HTMLProvider MW/rtc/plugins/language/matlab/codingui/livecontrols/nodes/LiveControlNodeContentConverterProvider MW/rtc/plugins/language/matlab/codingui/livecontrols/nodes/LiveControlNodeExecutableCodeConverterProvider MW/rtc/plugins/language/matlab/codingui/livecontrols/view/converters/LiveControlCoordinateConverterProvider MW/rtc/plugins/language/matlab/codingui/livecontrols/view/LiveControlViewModelProvider MW/rtc/plugins/language/matlab/codingui/livecontrols/view/LiveControlLayouterProvider MW/rtc/plugins/language/matlab/functions/LocalFunctionsProvider MW/rtc/plugins/language/matlab/functions/LocalFunctionsSectionAttributeContributorProvider MW/rtc/plugins/language/matlab/functions/TopLevelFunctionProvider MW/rtc/plugins/language/matlab/functions/TopLevelFunctionSectionAttributeContributorProvider MW/rtc/plugins/language/matlab/section/SectionPluginProvider MW/rtc/plugins/language/matlab/sections/CodeRegionSectionContributorProvider MW/rtc/plugins/language/matlab/sections/CurrentSectionViewProvider MW/rtc/plugins/language/matlab/sections/InsertSectionProvider MW/rtc/plugins/language/matlab/sections/NavigateSectionProvider MW/rtc/plugins/language/matlab/sections/SectionBreakSectionContributorProvider MW/rtc/plugins/language/matlab/sections/SectionModelProvider MW/rtc/plugins/language/matlab/sections/SectionContainerUtilityProvider MW/rtc/plugins/language/matlab/sections/StaleSectionModelProvider MW/rtc/plugins/language/matlab/tokenizer/MatlabTokensPluginProvider MW/rtc/plugins/language/matlab/nonlocalvariablehighlighting/NonlocalVariableHighlightingProvider MW/rtc/plugins/language/matlab/variablehighlighting/messagebar/VariableHighlightMessageLayerProvider MW/rtc/plugins/language/matlab/variablehighlighting/view/VariableHighlightViewProvider MW/rtc/plugins/language/matlab/variablehighlighting/VariableHighlightProvider MW/rtc/plugins/language/matlab/variablerenaming/VariableRenamingControllerProvider MW/rtc/plugins/language/matlab/variablerenaming/VariableRenamingModelProvider MW/rtc/plugins/language/matlab/variablerenaming/VariableRenamingModelUtilityProvider MW/rtc/plugins/language/matlab/variablerenaming/view/VariableRenamingViewProvider MW/rtc/plugins/language/matlab/variableservice/VariableServiceProvider MW/rtc/plugins/lists/ListsProvider MW/rtc/plugins/lists/HTMLListElementHandlerProvider MW/rtc/plugins/lists/HTMLWordStyleListHandlerProvider MW/rtc/plugins/lists/export/ListParagraph2HTMLProvider MW/rtc/plugins/lists/export/ListItem2HTMLProvider MW/rtc/plugins/lists/view/ListParagraphCoordinateConverterProvider MW/rtc/plugins/lists/view/ListItemLayouterProvider MW/rtc/plugins/lists/view/ListParagraphLayouterProvider MW/rtc/plugins/smoothscrolling/SmoothScrollingPluginProvider MW/rtc/plugins/margin/TraditionalLineNumberMarginProvider MW/rtc/plugins/margin/EmptyWithSectionBreaksMarginProvider MW/rtc/plugins/margin/MarginContainerProvider MW/rtc/plugins/margin/RightMarginButtonProvider MW/rtc/plugins/margin/RightMarginContainerProvider MW/rtc/plugins/margin/SeverityStatusButtonProvider MW/rtc/plugins/messagebar/MessageBarModelProvider MW/rtc/plugins/messagebar/MessageBarServiceProvider MW/rtc/plugins/messagebar/MessageBarViewProvider MW/rtc/plugins/nodeconversionrules/NodeConversionRulesServiceProvider MW/rtc/plugins/offscreennotification/OffscreenNotificationProvider MW/rtc/plugins/richtext/RichTextProvider MW/rtc/plugins/richtext/CodeTextToggleShortcutsProvider MW/rtc/plugins/richtext/MatlabJSONMimeConverterProvider MW/rtc/plugins/richtext/HTMLRichTextElementHandlerProvider MW/rtc/plugins/richtext/export/RichTextParagraphNode2HTMLProvider MW/rtc/plugins/richtext/export/HeadingNode2HTMLProvider MW/rtc/plugins/richtext/export/RichTextNode2HTMLProvider MW/rtc/plugins/richtext/view/RichTextCoordinateConverterProvider MW/rtc/plugins/richtext/view/RichTextRangeConverterProvider MW/rtc/plugins/saveaspdf/SaveAsPDFProvider MW/rtc/plugins/saveaspdf/document/BaseDocumentWriterProvider MW/rtc/plugins/saveaspdf/document/EquationWriterProvider MW/rtc/plugins/saveaspdf/document/HyperlinkWriterProvider MW/rtc/plugins/saveaspdf/document/ImageWriterProvider MW/rtc/plugins/saveaspdf/document/LiveControlWriterProvider MW/rtc/plugins/saveaspdf/document/ListWriterProvider MW/rtc/plugins/saveaspdf/document/ParagraphWriterProvider MW/rtc/plugins/saveaspdf/document/TableOfContentWriterProvider MW/rtc/plugins/saveaspdf/outputs/FigureWriterProvider MW/rtc/plugins/saveaspdf/outputs/MatrixWriterProvider MW/rtc/plugins/saveaspdf/outputs/TableWriterProvider MW/rtc/plugins/saveaspdf/outputs/OutputWriterProvider MW/rtc/plugins/saveaspdf/outputs/SymEquationWriterProvider MW/rtc/plugins/saveaspdf/outputs/TextWriterProvider MW/rtc/plugins/saveaspdf/outputs/VariableWriterProvider MW/rtc/plugins/service/CodingUIBackendCodeProviderProvider MW/rtc/plugins/service/CodingUIBackendServiceProvider MW/rtc/plugins/service/FocusServiceProvider MW/rtc/plugins/service/LineNumberServiceProvider MW/rtc/plugins/service/OutputHandlerServiceProvider MW/rtc/plugins/service/TooltipServiceProvider MW/rtc/plugins/settings/RtcSettingServiceProvider MW/rtc/plugins/shadowtext/ShadowTextServiceProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/AutoWrapCommentSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/SplitCommentSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/RoundParenInsertSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/RoundParenDeleteSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/SquareParenInsertSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/SquareParenDeleteSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/CurlyParenInsertSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/CurlyParenDeleteSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/SingleQuoteInsertSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/SingleQuoteDeleteSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/DoubleQuoteInsertSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/DoubleQuoteDeleteSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/RoundParenOverwritingSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/CurlyParenOverwritingSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/SquareParenOverwritingSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/SingleQuoteOverwritingSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/DoubleQuoteOverwritingSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/SplitDoubleQuoteStringSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/SplitSingleQuoteStringSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndClassDefBlockSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndEnumerationBlockSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndEventsBlockSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndForBlockSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndFunctionBlockSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndIfBlockSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndMethodsBlockSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndParforBlockSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndPropertiesBlockSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndSpmdBlockSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndSwitchBlockSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndTryBlockSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndWhileBlockSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/markdown/paragraph/MarkdownBulletedListSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/markdown/paragraph/MarkdownHeadingSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/markdown/paragraph/MarkdownNumberedListSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/markdown/paragraph/MarkdownTitleSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownBold2SmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownBoldSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownHyperlinkLabelUrlSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownHyperlinkUrlTagSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownItalic2SmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownItalicBold2SmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownItalicBoldSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownItalicSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownMonospaceSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/matlab/MatlabMonospaceSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/matlab/MatlabSectionBreakHeadingSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/matlab/MatlabSectionBreakSeparatorSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/symbol/SymbolTrademarkCopyrightSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/HyperlinkSmartFormatterProvider MW/rtc/plugins/smartformatting/formatter/MarkupEquationSmartFormatterProvider MW/rtc/plugins/smartformatting/BackspaceUndoHandlerProvider MW/rtc/plugins/smartformatting/SmartFormattingProvider MW/rtc/plugins/smarttab/SmartTabProvider MW/rtc/plugins/statusactionbar/decorators/SectionsDecoratorProvider MW/rtc/plugins/statusactionbar/decorators/StaleSectionsDecoratorProvider MW/rtc/plugins/statusactionbar/decorators/StaleSectionsBackgroundDecoratorProvider MW/rtc/plugins/statusactionbar/evaluation/StatusActionBarEvaluationProvider MW/rtc/plugins/statusactionbar/decorators/SectionBreakLineMarginDecoratorProvider MW/rtc/plugins/statusactionbar/SectionDecoratorUtilitiesProvider MW/rtc/plugins/statusactionbar/SectionRangeMarginExpansionHandlerProvider MW/rtc/plugins/statusbar/StatusBarRequestHandlerProvider MW/rtc/plugins/sections/SectionsRequestHandlerProvider MW/rtc/plugins/functions/FunctionsRequestHandlerProvider MW/rtc/plugins/sectionbreak/SectionBreakProvider MW/rtc/plugins/sectionbreak/SectionBreakNodeConversionRulesProvider MW/rtc/plugins/sectionbreak/model/SectionBreakNodeContentConverterProvider MW/rtc/plugins/sectionbreak/view/SectionBreakCoordinateConverterProvider MW/rtc/plugins/sectionbreak/view/SectionBreakLayouterProvider MW/rtc/plugins/tabcompletion/CompletionHandlerProvider MW/rtc/plugins/tabcompletion/TabCompletionProvider MW/rtc/plugins/templates/TemplateServiceProvider MW/rtc/plugins/text/parenmatch/ParenMatchingPluginProvider MW/rtc/plugins/language/matlab/syntaxhighlighter/MatlabSyntaxHighlighterProvider MW/rtc/plugins/language/matlab/syntaxhighlighter/preferences/MatlabSyntaxHighlighterPreferencesProvider MW/rtc/plugins/textnodeservice/TextNodeServiceProvider MW/rtc/plugins/tooltip/TooltipPluginContainerProvider MW/rtc/plugins/typocorrection/TypoSuggestionFeatureProvider MW/rtc/plugins/typocorrection/handler/TypoSuggestionHandlerFactoryProvider MW/rtc/plugins/view/divcaret/DivCaretPluginProvider MW/rtc/plugins/view/divselection/DivSelectionPluginProvider MW/rtc/plugins/view/layoutmanager/LayoutManagerProvider MW/rtc/plugins/view/layoutmanager/LayoutParagraphHostingModelProvider MW/rtc/plugins/view/layoutmanager/layouters/LineLayouterProvider MW/rtc/plugins/view/layoutmanager/layouters/PlainTextLayouterProvider MW/rtc/plugins/view/layoutmanager/layouters/RootLayouterProvider MW/rtc/plugins/view/layoutmanager/rules/BaseGroupingRuleProvider MW/rtc/plugins/view/layoutmanager/rules/ContainmentGroupingRuleProvider MW/rtc/plugins/view/layoutmanager/rules/ContiguousGroupingRuleProvider MW/rtc/plugins/view/layoutmanager/rules/DefaultRuleProvider MW/rtc/plugins/view/layoutmanager/rules/ExpandableRuleProvider MW/rtc/plugins/view/layoutmanager/rules/OutputRuleProvider MW/rtc/plugins/view/layoutmanager/rules/ParagraphHostingRuleProvider MW/rtc/plugins/view/layoutmanager/rules/WrappableRuleProvider MW/rtc/plugins/view/movehiddenkeycapture/MoveHiddenKeyCaptureProvider MW/rtc/preferences/PreferencesServiceProvider MW/rtc/view/PerformanceTestHelper MW/rtc/view/RTCPerformanceTestHelper MW/rtc/view/ViewModelProvider MW/rtc/view/ViewLinesTestHelper MW/rtc/view/ViewSectionsTestHelper MW/rtc/view/ViewportOpenedServiceProvider MW/rtc/view/ViewProvider MW/rtc/view/VisibilityNotifierProvider MW/rtc/view/coordinateconverter/PlainTextCoordinateConverterProvider MW/rtc/view/coordinateconverter/RootCoordinateConverterProvider MW/rtc/view/coordinateconverter/CoordinateConverterProvider MW/rtc/view/decoration/DecorationProvider MW/rtc/view/decoration/LayerDecoratorMarginDecoratorProvider MW/rtc/view/decoration/viewmodel/DecorationDescriptorsStoreProvider MW/rtc/view/decoration/viewmodel/DecorationLayerViewModelProvider MW/rtc/view/decoration/viewmodel/DecorationViewModelProvider MW/rtc/view/hidden/HiddenNodeModelProvider MW/rtc/view/hidden/HiddenNodeServiceProvider MW/rtc/view/rangeconverter/PlainTextRangeConverterProvider MW/rtc/view/rangeconverter/RangeConverterProvider".split(" "),
function(){return{plugins:[{id:"rtc.embeddedoutputs.hitlineindicator",path:"MW/rtc/plugins/embeddedoutputs/view/HitLineIndicatorProvider"},{id:"matlab.tokens",path:"MW/rtc/plugins/language/matlab/tokenizer/MatlabTokensPluginProvider"},{id:"debug.margin.matlab.breakpoint",path:"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointDecoratorProvider"},{id:"debug.breakpoint.temporary",path:"MW/rtc/plugins/breakpoint/matlab/temporary/TemporaryBreakpointManagerProvider"},{id:"debug.breakpoint.promise",path:"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointPromiseManagerProvider"},
{id:"debug.breakpointmodel",path:"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointDataModelProvider"},{id:"debug.breakpointfactory",path:"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointFactoryProvider"},{id:"debug.breakpointactions",path:"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointActionsProvider",family:"debugging"},{id:"debug.breakpoint.dataservice",path:"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointDataServiceProvider",family:"debugging"},{id:"debug.breakpointdirtyservice",path:"MW/rtc/plugins/breakpoint/matlab/TraditionalBreakpointDirtyServiceProvider",
family:"debugging"},{id:"debug.margin.matlab.breakpointstyler",path:"MW/rtc/plugins/breakpoint/matlab/TraditionalBreakpointStylerProvider"},{id:"debug.contextmenumodelfactory",path:"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointContextMenuModelFactoryProvider"},{id:"rtc.debug.breadcrumbstackbanner",path:"MW/rtc/plugins/debug/breadcrumbstack/BreadcrumbStackProvider"},{id:"debug.margin.executionarrow",path:"MW/rtc/plugins/debug/executionarrow/ExecutionArrowDecoratorProvider",subsystem:"rtc.left.margin"},
{id:"debug.executionlines",path:"MW/rtc/plugins/debug/executionlines/ExecutionLinesPluginProvider"},{id:"margin.debug",path:"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointMarginProvider",subsystem:"rtc.left.margin",family:"debugging",label:"MATLAB Breakpoint Margin",description:"The Left Margin contribution of the MATLAB Breakpoint Margin for  creating and viewing MATLAB Breakpoints."},{id:"margin.debug",path:"MW/rtc/plugins/breakpoint/DummyBreakpointMarginProvider",subsystem:"rtc.left.margin"},
{id:"margin.linenumber",path:"MW/rtc/plugins/margin/TraditionalLineNumberMarginProvider",subsystem:"rtc.left.margin"},{id:"rtc.code.parenmatch",path:"MW/rtc/plugins/text/parenmatch/ParenMatchingPluginProvider"},{id:"rtc.code.syntaxhighlighter",path:"MW/rtc/plugins/language/matlab/syntaxhighlighter/MatlabSyntaxHighlighterProvider",family:"syntaxhighlighter"},{id:"rtc.code.syntaxhighlighterpreferences",path:"MW/rtc/plugins/language/matlab/syntaxhighlighter/preferences/MatlabSyntaxHighlighterPreferencesProvider",
family:"syntaxhighlighter"},{id:"rtc.code.serversidesyntaxhighlighter",path:"MW/rtc/plugins/language/matlab/syntaxhighlighter/ServerSideSyntaxHighlighterProvider"},{id:"rtc.code.formatcode",path:"MW/rtc/plugins/formatcode/FormatCodePluginProvider"},{id:"rtc.code.codeanalyzermodel",path:"MW/rtc/plugins/language/matlab/codeanalyzer/model/CodeAnalyzerModelProvider",family:"codeanalyzer"},{id:"rtc.code.codeanalyzerpreferences",path:"MW/rtc/plugins/language/matlab/codeanalyzer/preferences/CodeAnalyzerPreferencesProvider"},
{id:"rtc.code.codeanalyzerautofix",path:"MW/rtc/plugins/language/matlab/codeanalyzer/CodeAnalyzerAutoFixProvider",family:"codeanalyzer"},{id:"rtc.code.alertmessagelayer",path:"MW/rtc/plugins/language/matlab/codeanalyzer/messagebar/AlertMessageLayerProvider",subsystem:"messagebarlayer"},{id:"rtc.code.codeanalyzermessagelayer",path:"MW/rtc/plugins/language/matlab/codeanalyzer/messagebar/CodeAnalyzerMessageLayerProvider",family:"codeanalyzer",subsystem:"messagebarlayer"},{id:"rtc.code.codeanalyzerview",
path:"MW/rtc/plugins/language/matlab/codeanalyzer/view/CodeAnalyzerViewProvider",family:"codeanalyzer"},{id:"rtc.code.codeanalyzer",path:"MW/rtc/plugins/language/matlab/codeanalyzer/CodeAnalyzerPluginProvider",family:"codeanalyzer"},{id:"rtc.functionservice",path:"MW/rtc/plugins/language/matlab/syntax/functions/FunctionServiceProvider"},{id:"rtc.functionargumentnotifier",path:"MW/rtc/plugins/functionnotifier/FunctionArgumentNotifierProvider"},{id:"rtc.allfunctionnotifier",path:"MW/rtc/plugins/functionnotifier/AllFunctionNotifierProvider"},
{id:"rtc.localfunctionnotifier",path:"MW/rtc/plugins/functionnotifier/LocalFunctionNotifierProvider"},{id:"rtc.toplevelfunctionnotifier",path:"MW/rtc/plugins/functionnotifier/TopLevelFunctionNotifierProvider"},{id:"rtc.code.functionhints",path:"MW/rtc/plugins/language/matlab/functionhints/FunctionHintsProvider"},{id:"rtc.code.datatip",path:"MW/rtc/plugins/datatip/DataTipProvider",subsystem:"hoverabletooltip"},{id:"rtc.liveapps.backend",path:"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppBackendServiceProvider",
family:"rtc.liveapps"},{id:"rtc.liveapps.codemanager",path:"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppCodeManagerProvider",family:"rtc.liveapps"},{id:"rtc.liveapps.cursorhandler",path:"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppCursorHandlerProvider",family:"rtc.liveapps"},{id:"rtc.liveapps.controller",path:"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppControllerProvider",family:"rtc.liveapps"},{id:"rtc.liveapps.documenthandler",path:"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppDocumentHandlerProvider",
family:"rtc.liveapps"},{id:"rtc.liveapps.editorkeyhandler",path:"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppEditorKeyHandlerProvider",family:"rtc.liveapps"},{id:"rtc.liveapps.executionmanager",path:"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppExecutionManagerProvider",family:"rtc.liveapps"},{id:"rtc.liveapps.focusmanager",path:"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppFocusManagerProvider",family:"rtc.liveapps"},{id:"rtc.liveapps.uifigurehandler",path:"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppUIFigureHandlerProvider",
family:"rtc.liveapps"},{id:"rtc.liveapps.viewmodel",path:"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppViewModelProvider",family:"rtc.liveapps"},{id:"rtc.liveapps.widgetkeyhandler",path:"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppWidgetKeyHandlerProvider",family:"rtc.liveapps"},{id:"rtc.liveapps.nodes.inlinenode.contentconverter",path:"MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppInlineNodeContentConverterProvider",family:"rtc.liveapps",subsystem:"rtc.nodes.contentconverter.converter"},
{id:"rtc.liveapps.nodes.inlinenode.insertionrules",path:"MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppInlineNodeInsertionRulesProvider",family:"rtc.liveapps",subsystem:"rtc.insertionrule"},{id:"rtc.liveapps.nodes.linenode.contentconverter",path:"MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppLineNodeContentConverterProvider",family:"rtc.liveapps",subsystem:"rtc.nodes.contentconverter.converter"},{id:"rtc.liveapps.nodes.linenode.nodeconversionrules",path:"MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppLineNodeConversionRulesProvider",
family:"rtc.liveapps",subsystem:"rtc.nodeconversionrule"},{id:"rtc.liveapps.nodes.linenode.insertionrules",path:"MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppLineNodeInsertionRulesProvider",family:"rtc.liveapps",subsystem:"rtc.insertionrule"},{id:"rtc.liveapps.view.inlinenode.coordinateconverter",path:"MW/rtc/plugins/language/matlab/codingui/liveapps/view/LiveAppInlineNodeCoordinateConverterProvider",family:"rtc.liveapps",subsystem:"rtc.view.coordinateconverter.converter"},{id:"rtc.liveapps.view.inlinenode.layouter",
path:"MW/rtc/plugins/language/matlab/codingui/liveapps/view/LiveAppInlineNodeLayouterProvider",family:"rtc.liveapps",subsystem:"rtc.view.layoutmanager.layouter"},{id:"rtc.liveapps.view.linenode.coordinateconverter",path:"MW/rtc/plugins/language/matlab/codingui/liveapps/view/LiveAppLineNodeCoordinateConverterProvider",family:"rtc.liveapps",subsystem:"rtc.view.coordinateconverter.converter"},{id:"rtc.liveapps.view.linenode.layouter",path:"MW/rtc/plugins/language/matlab/codingui/liveapps/view/LiveAppLineNodeLayouterProvider",
family:"rtc.liveapps",subsystem:"rtc.view.layoutmanager.layouter"},{id:"rtc.livecontrols.actionhandler",path:"MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlActionHandlerProvider",family:"rtc.livecontrols"},{id:"rtc.livecontrols.contextmanager",path:"MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlContextManagerProvider",family:"rtc.livecontrols"},{id:"rtc.livecontrols.contextmenu",path:"MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlContextMenuProvider",
family:"rtc.livecontrols"},{id:"rtc.livecontrols.execution",path:"MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlExecutionProvider",family:"rtc.livecontrols"},{id:"rtc.livecontrols.insertion",path:"MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlInsertionProvider",family:"rtc.livecontrols"},{id:"rtc.livecontrols.toolstrip",path:"MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlToolstripActionsProvider",family:"rtc.livecontrols"},{id:"rtc.livecontrols.widgethandler",
path:"MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlWidgetHandlerProvider",family:"rtc.livecontrols"},{id:"rtc.livecontrols.contentconverter",path:"MW/rtc/plugins/language/matlab/codingui/livecontrols/nodes/LiveControlNodeContentConverterProvider",family:"rtc.livecontrols",subsystem:"rtc.nodes.contentconverter.converter"},{id:"rtc.livecontrols.executablecodeconverter",path:"MW/rtc/plugins/language/matlab/codingui/livecontrols/nodes/LiveControlNodeExecutableCodeConverterProvider",
family:"rtc.livecontrols",subsystem:"rtc.document.executablecode.executablecodeconverter.converter"},{id:"rtc.livecontrols.coordinateconverter",path:"MW/rtc/plugins/language/matlab/codingui/livecontrols/view/converters/LiveControlCoordinateConverterProvider",family:"rtc.livecontrols",subsystem:"rtc.view.coordinateconverter.converter"},{id:"rtc.livecontrols.viewmodel",path:"MW/rtc/plugins/language/matlab/codingui/livecontrols/view/LiveControlViewModelProvider",family:"rtc.livecontrols"},{id:"rtc.livecontrols.layouter",
path:"MW/rtc/plugins/language/matlab/codingui/livecontrols/view/LiveControlLayouterProvider",family:"rtc.livecontrols",subsystem:"rtc.view.layoutmanager.layouter"},{id:"rtc.livecontrols.insertionrule",path:"MW/rtc/nodes/insertionrules/LiveControlNodeInsertionRulesProvider",family:"rtc.livecontrols",subsystem:"rtc.insertionrule"},{id:"rtc.code.localfunctions.controller",path:"MW/rtc/plugins/language/matlab/functions/LocalFunctionsProvider",family:"rtc.code.localfunctions"},{id:"rtc.code.sections.attribute.localfunctions",
path:"MW/rtc/plugins/language/matlab/functions/LocalFunctionsSectionAttributeContributorProvider",family:"rtc.code.localfunctions"},{id:"rtc.code.functions.controller",path:"MW/rtc/plugins/language/matlab/functions/TopLevelFunctionProvider",family:"rtc.code.localfunctions"},{id:"rtc.code.sections.attribute.toplevelfunction",path:"MW/rtc/plugins/language/matlab/functions/TopLevelFunctionSectionAttributeContributorProvider",family:"rtc.code.localfunctions"},{id:"matlab.folding",path:"MW/rtc/plugins/language/matlab/folding/MatlabCodeFoldingProvider",
family:"folding"},{id:"matlab.code.mtree.rangefactory",path:"MW/rtc/plugins/language/matlab/syntax/mtree/MTreeRangeFactoryProvider"},{id:"matlab.code.mtree",path:"MW/rtc/plugins/language/matlab/syntax/mtree/MTreeServiceProvider"},{id:"matlab.code.mtree.codeblocks",path:"MW/rtc/plugins/language/matlab/syntax/mtree/codeblocks/MTreeCodeBlockServicesProvider"},{id:"matlab.code.mtree.codeblocks.structure",path:"MW/rtc/plugins/language/matlab/syntax/mtree/codeblocks/MTreeCodeBlockStructureProvider"},{id:"matlab.code.variables.nonlocalhighlighting",
path:"MW/rtc/plugins/language/matlab/nonlocalvariablehighlighting/NonlocalVariableHighlightingProvider",family:"matlab.code.variables.highlighting"},{id:"matlab.code.variablehighlightingmessagelayer",path:"MW/rtc/plugins/language/matlab/variablehighlighting/messagebar/VariableHighlightMessageLayerProvider",subsystem:"messagebarlayer"},{id:"matlab.code.variablehighlightview",path:"MW/rtc/plugins/language/matlab/variablehighlighting/view/VariableHighlightViewProvider",family:"matlab.code.variables.highlighting"},
{id:"matlab.code.variables.plugin",path:"MW/rtc/plugins/language/matlab/variablehighlighting/VariableHighlightProvider",family:"matlab.code.variables.highlighting"},{id:"matlab.code.variables.rename.controller",path:"MW/rtc/plugins/language/matlab/variablerenaming/VariableRenamingControllerProvider",family:"matlab.code.variables.rename"},{id:"matlab.code.variables.rename.model",path:"MW/rtc/plugins/language/matlab/variablerenaming/VariableRenamingModelProvider",family:"matlab.code.variables.rename"},
{id:"matlab.code.variables.rename.utility",path:"MW/rtc/plugins/language/matlab/variablerenaming/VariableRenamingModelUtilityProvider",family:"matlab.code.variables.rename"},{id:"matlab.code.variables.rename.view",path:"MW/rtc/plugins/language/matlab/variablerenaming/view/VariableRenamingViewProvider",family:"matlab.code.variables.rename"},{id:"matlab.code.variables.service",path:"MW/rtc/plugins/language/matlab/variableservice/VariableServiceProvider"},{id:"rtc.backingstore",path:"MW/rtc/datamodel/DefaultBackingStoreProvider"},
{id:"matlab.tabcompletion",path:"MW/rtc/plugins/tabcompletion/TabCompletionProvider"},{id:"matlab.tabcompletion.completionhandler",path:"MW/rtc/plugins/tabcompletion/CompletionHandlerProvider"},{id:"matlab.templateservice",path:"MW/rtc/plugins/templates/TemplateServiceProvider"},{id:"rtc.contextualselection.utility",path:"MW/rtc/plugins/language/matlab/contextualselection/ContextualSelectionUtilityProvider"},{id:"rtc.contextualselection.evaluateselection",path:"MW/rtc/plugins/language/matlab/contextualselection/EvaluateSelectionProvider"},
{id:"rtc.helponselection",path:"MW/rtc/plugins/language/matlab/contextualselection/HelpOnSelectionProvider"},{id:"rtc.helpservice",path:"MW/rtc/plugins/language/matlab/contextualselection/HelpServiceProvider"},{id:"rtc.navigate.find",path:"MW/rtc/plugins/find/FindProvider",family:"rtc.findandreplace"},{id:"rtc.navigate.replace",path:"MW/rtc/plugins/find/ReplaceProvider",family:"rtc.findandreplace"},{id:"rtc.navigate.goto",path:"MW/rtc/plugins/goto/GotoProvider",family:"rtc.navigate.goto"},{id:"rtc.navigate.goto.sectionservice",
path:"MW/rtc/plugins/goto/GotoSectionServiceProvider",family:"rtc.navigate.goto"},{id:"rtc.contextualselection.openselection",path:"MW/rtc/plugins/language/matlab/contextualselection/OpenSelectionProvider"},{id:"rtc.code.sections",path:"MW/rtc/plugins/language/matlab/section/SectionPluginProvider"},{id:"debug.control",path:"MW/rtc/plugins/debug/DebuggerManagerProvider",family:"debugging"},{id:"debug.lineautoscroll",path:"MW/rtc/plugins/debug/DebugLineAutoScrollPluginProvider",family:"debugging"},
{id:"debug.linefocus",path:"MW/rtc/plugins/debug/DebugLineFocusPluginProvider",family:"debugging"},{id:"debug.stack.model",path:"MW/rtc/plugins/debug/DebugStackModelProvider",family:"debugging"},{id:"debug.documentdebugservices",path:"MW/rtc/plugins/debug/DocumentDebugServicesProvider",family:"debugging"},{id:"debug.runtolineservice",path:"MW/rtc/plugins/debug/RunToLineServiceProvider"},{id:"debug.documentdirtyservice",path:"MW/rtc/plugins/debug/DocumentDirtyDebugServiceProvider"},{id:"debug.contextualbuttons.buttonfactory",
path:"MW/rtc/plugins/debug/contextualbuttons/ContextualButtonFactoryProvider",family:"executioncontrols"},{id:"debug.contextualbuttons.runtohere.viewmodel",path:"MW/rtc/plugins/debug/contextualbuttons/runtohere/RunToHereViewModelProvider",family:"executioncontrols"},{id:"debug.contextualbuttons.runtohere.view",path:"MW/rtc/plugins/debug/contextualbuttons/runtohere/RunToHereViewProvider",family:"executioncontrols"},{id:"debug.contextualbuttons.runtohere.hoverservice",path:"MW/rtc/plugins/debug/contextualbuttons/runtohere/hoverservice/RunToHereCodeHoverServiceProvider"},
{id:"debug.contextualbuttons.stepin.functioncallsitefactory",path:"MW/rtc/plugins/debug/contextualbuttons/stepin/FunctionCallsiteFactoryProvider",family:"executioncontrols"},{id:"debug.contextualbuttons.stepin.manager",path:"MW/rtc/plugins/debug/contextualbuttons/stepin/StepInManagerProvider",family:"executioncontrols"},{id:"debug.contextualbuttons.stepin.view",path:"MW/rtc/plugins/debug/contextualbuttons/stepin/StepInViewProvider",family:"executioncontrols"},{id:"debug.datatips",path:"MW/rtc/plugins/debug/DatatipPluginProvider",
subsystem:"hoverabletooltip",family:"debugging"},{id:"rtc.code.codeanalyzer.tooltip",path:"MW/rtc/plugins/language/matlab/codeanalyzer/tooltip/CodeAnalyzerTooltipProvider",subsystem:"hoverabletooltip",family:"codeanalyzer"},{id:"rtc.tooltip",path:"MW/rtc/plugins/tooltip/TooltipPluginContainerProvider"},{id:"matlab.executable.line",path:"MW/rtc/plugins/breakpoint/matlab/executablelines/ExecutableLineDecoratorProvider",subsystem:"rtc.left.margin"},{id:"rtc.internaldocument",path:"MW/rtc/model/InternalDocumentProvider"},
{id:"rtc.linenumberservice",path:"MW/rtc/plugins/service/LineNumberServiceProvider"},{id:"rtc.linenumberpreference",path:"MW/rtc/margin/settings/LineNumberPreferenceProvider"},{id:"rtc.buttonfactory",path:"MW/rtc/plugins/buttonfactoryButtonFactoryProvider"},{id:"rtc.code.codetextservice",path:"MW/rtc/plugins/code/CodeTextServiceProvider"},{id:"rtc.code.executablelines",path:"MW/rtc/plugins/code/ExecutableLineServiceProvider"},{id:"rtc.nodes.contentconverter",path:"MW/rtc/nodes/contentconverter/ContentConverterPluginProvider"},
{id:"rtc.nodes.contentconverter.rootnodeconverter",path:"MW/rtc/nodes/contentconverter/inner/RootNodeContentConverterProvider",subsystem:"rtc.nodes.contentconverter.converter",requiredForSubsystem:!0},{id:"rtc.nodes.contentconverter.linenodeconverter",path:"MW/rtc/nodes/contentconverter/inner/LineNodeContentConverterProvider",subsystem:"rtc.nodes.contentconverter.converter",requiredForSubsystem:!0},{id:"rtc.nodes.contentconverter.plaintextnodeconverter",path:"MW/rtc/nodes/contentconverter/leaf/PlainTextNodeContentConverterProvider",
subsystem:"rtc.nodes.contentconverter.converter",requiredForSubsystem:!0},{id:"rtc.insertionruleservice",path:"MW/rtc/plugins/insertionrules/InsertionRuleServiceProvider"},{id:"rtc.insertionrules.linenode",path:"MW/rtc/nodes/insertionrules/LineNodeInsertionRulesProvider",subsystem:"rtc.insertionrule",requiredForSubsystem:!0},{id:"rtc.insertionrules.plaintextnode",path:"MW/rtc/nodes/insertionrules/PlainTextNodeInsertionRulesProvider",subsystem:"rtc.insertionrule",requiredForSubsystem:!0},{id:"rtc.insertionrules.opaque",
path:"MW/rtc/nodes/insertionrules/OpaqueNodeInsertionRulesProvider",subsystem:"rtc.insertionrule",requiredForSubsystem:!0},{id:"rtc.nodeconversionrulesservice",path:"MW/rtc/plugins/nodeconversionrules/NodeConversionRulesServiceProvider"},{id:"rtc.nodeconversionrules.node",path:"MW/rtc/nodes/nodeconversionrules/NodeConversionRulesProvider",subsystem:"rtc.nodeconversionrule",requiredForSubsystem:!0},{id:"rtc.nodeconversionrules.innernode",path:"MW/rtc/nodes/nodeconversionrules/InnerNodeConversionRulesProvider",
subsystem:"rtc.nodeconversionrule",requiredForSubsystem:!0},{id:"rtc.textnodeservice",path:"MW/rtc/plugins/textnodeservice/TextNodeServiceProvider"},{id:"rtc.actions.document",path:"MW/rtc/model/DocumentActionsProvider",family:"document"},{id:"rtc.document",path:"MW/rtc/model/DocumentProvider",family:"document"},{id:"rtc.actions.cursor",path:"MW/rtc/cursor/CursorActionsProvider",family:"cursor"},{id:"rtc.cursor",path:"MW/rtc/cursor/CursorProvider",family:"cursor"},{id:"rtc.cursor.view",path:"MW/rtc/cursor/CursorViewProvider"},
{id:"rtc.cursorcontroller",path:"MW/rtc/cursor/CursorControllerProvider",family:"cursor"},{id:"rtc.cursor.navigator",path:"MW/rtc/cursor/CursorNavigatorProvider"},{id:"rtc.indentutilities",path:"MW/rtc/plugins/indentutilities/IndentUtilitiesProvider"},{id:"rtc.indent",path:"MW/rtc/plugins/indentation/IndentationProvider"},{id:"rtc.clipboard",path:"MW/rtc/clipboardservice/ClipboardProvider"},{id:"rtc.cutcopypaste",family:"rtc.cutcopypaste",path:"MW/rtc/plugins/cutcopypaste/CutCopyPasteProvider"},{id:"rtc.code.codingui.actionhandler",
path:"MW/rtc/plugins/language/matlab/codingui/CodingUIActionHandlerProvider",family:"rtc.code.codingui"},{id:"rtc.code.codingui.plugin",path:"MW/rtc/plugins/language/matlab/codingui/CodingUIProvider",family:"rtc.code.codingui"},{id:"rtc.code.codingui.contextmanager",path:"MW/rtc/plugins/language/matlab/codingui/CodingUIContextManagerProvider",family:"rtc.code.codingui"},{id:"rtc.code.codingui.requesthandler",path:"MW/rtc/plugins/language/matlab/codingui/CodingUIRequestHandlerProvider",family:"rtc.code.codingui"},
{id:"rtc.code.codingui.tabhandler",path:"MW/rtc/plugins/language/matlab/codingui/CodingUITabHandlerProvider",family:"rtc.code.codingui"},{id:"rtc.code.codingui.eventbus",path:"MW/rtc/plugins/language/matlab/codingui/CodingUIViewEventBusProvider",family:"rtc.code.codingui"},{id:"rtc.code.codingui.preference",path:"MW/rtc/plugins/language/matlab/codingui/preferences/CodingUIPreferenceProvider",family:"rtc.code.codingui"},{id:"rtc.code.codingui.view",path:"MW/rtc/plugins/language/matlab/codingui/view/CodingUIViewProvider",
family:"rtc.code.codingui"},{id:"rtc.cutcopypaste.converter",family:"rtc.cutcopypaste",path:"MW/rtc/plugins/cutcopypaste/ClipboardConverterProvider"},{id:"rtc.cutcopypaste.defaultmimeconverterprovider",family:"rtc.cutcopypaste",path:"MW/rtc/plugins/cutcopypaste/DefaultMIMEConverterProvider"},{id:"rtc.plaintextmimeconverter",path:"MW/rtc/plugins/cutcopypaste/mime/PlainTextMimeConverterProvider",subsystem:"rtc.cutcopypaste.mimeconverters"},{id:"rtc.plaintextmimeincodeconverter",path:"MW/rtc/plugins/cutcopypaste/mime/PlainTextMimeInCodeConverterProvider",
subsystem:"rtc.cutcopypaste.mimeconverters"},{id:"rtc.unicodestringmimeconverter",path:"MW/rtc/plugins/cutcopypaste/mime/UnicodeStringMimeConverterProvider",subsystem:"rtc.cutcopypaste.mimeconverters"},{id:"rtc.cutcopypaste.promptlesstextmimeconverter",family:"rtc.cutcopypaste",path:"MW/rtc/plugins/cutcopypaste/mime/PromptlessTextMimeConverterProvider",subsystem:"rtc.cutcopypaste.mimeconverters"},{id:"rtc.cutcopypaste.htmlmimeconverter",path:"MW/rtc/plugins/htmlmime/HTMLMimeConverterProvider",family:"rtc.cutcopypaste",
subsystem:"rtc.cutcopypaste.mimeconverters"},{id:"rtc.plaintextmimegeneratorprovider",path:"MW/rtc/plugins/cutcopypaste/PlainTextMimeGeneratorProvider"},{id:"rtc.cutcopypaste.htmlgenerator",family:"rtc.cutcopypaste",path:"MW/rtc/plugins/cutcopypaste/HTMLGeneratorProvider"},{id:"rtc.cutcopypaste.plaintextnodeconverter",family:"rtc.cutcopypaste",path:"MW/rtc/plugins/cutcopypaste/PlainTextNodeConverterProvider"},{id:"rtc.cutcopypaste.rtfgenerator",family:"rtc.cutcopypaste",path:"MW/rtc/plugins/cutcopypaste/RTFGeneratorProvider"},
{id:"rtc.cutcopypaste.internalserializationgenerator",family:"rtc.cutcopypaste",path:"MW/rtc/plugins/cutcopypaste/InternalSerializationGeneratorProvider"},{id:"rtc.draganddrop",path:"MW/rtc/plugins/draganddrop/DragAndDropProvider",family:"draganddrop"},{id:"rtc.draganddropnotifier",path:"MW/rtc/plugins/draganddrop/DragAndDropNotifierProvider",family:"draganddrop"},{id:"rtc.alert.controller",path:"MW/rtc/plugins/language/matlab/alert/AlertControllerProvider",family:"rtc.alert"},{id:"rtc.alert.model",
path:"MW/rtc/plugins/language/matlab/alert/AlertModelProvider",family:"rtc.alert"},{id:"rtc.alert.widgetfactory",path:"MW/rtc/plugins/language/matlab/alert/AlertWidgetFactoryProvider",family:"rtc.alert"},{id:"rtc.visual.alert",path:"MW/rtc/plugins/language/matlab/alert/AlertViewProvider",family:"rtc.alert"},{id:"rtc.diagnosticmessage",path:"MW/rtc/plugins/language/matlab/diagnosticmessage/DiagnosticMessageFormatterProvider"},{id:"rtc.code.matlabfiletype",path:"MW/rtc/plugins/language/matlab/filetype/FileTypeProvider"},
{id:"rtc.code.codecontent",path:"MW/rtc/plugins/language/matlab/codecontent/CodeContentProvider"},{id:"rtc.code.autoindent",path:"MW/rtc/plugins/language/matlab/autoindent/AutoIndentProvider"},{id:"rtc.code.autoindentpreference",path:"MW/rtc/plugins/language/matlab/autoindent/preferences/AutoIndentPreferenceProvider"},{id:"rtc.richtext.lists",family:"rtc.richtext.lists",path:"MW/rtc/plugins/lists/ListsProvider"},{id:"rtc.richtext.lists.htmllisthandler",family:"rtc.richtext.lists",path:"MW/rtc/plugins/lists/HTMLListElementHandlerProvider"},
{id:"rtc.richtext.lists.htmlwordstylelist",family:"rtc.richtext.lists",path:"MW/rtc/plugins/lists/HTMLWordStyleListHandlerProvider"},{id:"rtc.richtext.list.coordinateconverter",path:"MW/rtc/plugins/lists/view/ListParagraphCoordinateConverterProvider",family:"rtc.richtext.lists",subsystem:"rtc.view.coordinateconverter.converter"},{id:"rtc.richtext.list.listparagraph.contentconverter",path:"MW/rtc/plugins/lists/model/ListParagraphContentConverterProvider",family:"rtc.richtext.lists",subsystem:"rtc.nodes.contentconverter.converter"},
{id:"rtc.richtext.list.listparagraph.insertionrules",path:"MW/rtc/plugins/lists/ListParagraphInsertionRulesProvider",family:"rtc.richtext.lists",subsystem:"rtc.insertionrule"},{id:"rtc.richtext.list.listparagraph.layouter",path:"MW/rtc/plugins/lists/view/ListParagraphLayouterProvider",family:"rtc.richtext.lists",subsystem:"rtc.view.layoutmanager.layouter"},{id:"rtc.richtext.list.listitem.contentconverter",path:"MW/rtc/plugins/lists/model/ListItemContentConverterProvider",family:"rtc.richtext.lists",
subsystem:"rtc.nodes.contentconverter.converter"},{id:"rtc.richtext.list.listitem.insertionrules",path:"MW/rtc/plugins/lists/ListItemInsertionRulesProvider",family:"rtc.richtext.lists",subsystem:"rtc.insertionrule"},{id:"rtc.richtext.list.listitem.layouter",path:"MW/rtc/plugins/lists/view/ListItemLayouterProvider",family:"rtc.richtext.lists",subsystem:"rtc.view.layoutmanager.layouter"},{id:"rtc.richtext.codeexample",family:"rtc.richtext.codeexample",path:"MW/rtc/plugins/codeexample/CodeExampleProvider"},
{id:"rtc.richtext.codeexample.block.contentconverter",path:"MW/rtc/plugins/codeexample/model/CodeExampleBlockNodeContentConverterProvider",family:"rtc.richtext.codeexample",subsystem:"rtc.nodes.contentconverter.converter"},{id:"rtc.richtext.codeexample.block.layouter",path:"MW/rtc/plugins/codeexample/view/CodeExampleBlockLayouterProvider",family:"rtc.richtext.codeexample",subsystem:"rtc.view.layoutmanager.layouter"},{id:"rtc.richtext.codeexample.coordinateconverter",path:"MW/rtc/plugins/codeexample/view/CodeExampleBlockCoordinateConverterProvider",
family:"rtc.richtext.codeexample",subsystem:"rtc.view.coordinateconverter.converter"},{id:"rtc.richtext.codeexample.block.insertionrules",path:"MW/rtc/plugins/codeexample/CodeExampleBlockInsertionRulesProvider",family:"rtc.richtext.codeexample",subsystem:"rtc.insertionrule"},{id:"rtc.richtext.codeexample.line.contentconverter",path:"MW/rtc/plugins/codeexample/model/CodeExampleLineNodeContentConverterProvider",family:"rtc.richtext.codeexample",subsystem:"rtc.nodes.contentconverter.converter"},{id:"rtc.richtext.codeexample.line.layouter",
path:"MW/rtc/plugins/codeexample/view/CodeExampleLineLayouterProvider",family:"rtc.richtext.codeexample",subsystem:"rtc.view.layoutmanager.layouter"},{id:"rtc.richtext.codeexample.line.insertionrules",path:"MW/rtc/plugins/codeexample/CodeExampleLineInsertionRulesProvider",family:"rtc.richtext.codeexample",subsystem:"rtc.insertionrule"},{id:"rtc.richtext.codeexample.matlab.syntaxhighlighter",path:"MW/rtc/plugins/codeexample/syntaxhighlighter/matlab/SyntaxHighlighterProvider",family:"rtc.richtext.codeexample"},
{id:"rtc.serializers.containers.codeexample.blockcontainer",path:"MW/rtc/model/io/serializers/providers/containers/CodeExampleBlockContainerSerializerProvider",subsystem:"rtc.serializer",family:"rtc.richtext.codeexample"},{id:"rtc.serializers.containers.codeexample.linecontainer",path:"MW/rtc/model/io/serializers/providers/containers/CodeExampleLineContainerSerializerProvider",subsystem:"rtc.serializer",family:"rtc.richtext.codeexample"},{id:"rtc.richtext.codeexample.block.keyhandler",path:"MW/rtc/plugins/codeexample/CodeExampleBlockKeyHandlerProvider",
family:"rtc.richtext.codeexample"},{id:"rtc.codeexamplemimeincodeconverter",path:"MW/rtc/plugins/cutcopypaste/mime/CodeExampleMimeInCodeConverterProvider",subsystem:"rtc.cutcopypaste.mimeconverters",family:"rtc.richtext.codeexample"},{id:"rtc.codemimeincodeexampleconverter",path:"MW/rtc/plugins/cutcopypaste/mime/CodeMimeInCodeExampleConverterProvider",subsystem:"rtc.cutcopypaste.mimeconverters",family:"rtc.richtext.codeexample"},{id:"rtc.richtext.hyperlink",family:"rtc.richtext.hyperlink",path:"MW/rtc/plugins/hyperlink/HyperlinkProvider"},
{id:"rtc.richtext.hyperlinkeditor",family:"rtc.richtext.hyperlink",path:"MW/rtc/plugins/hyperlink/HyperlinkEditorProvider"},{id:"rtc.richtext.hyperlink.htmlhyperlinkhandler",family:"rtc.richtext.hyperlink",path:"MW/rtc/plugins/hyperlink/HTMLHyperlinkElementHandlerProvider"},{id:"rtc.richtext.hyperlink.mimeconverter",family:"rtc.richtext.hyperlink",path:"MW/rtc/plugins/hyperlink/HyperlinkMIMEConverterProvider"},{id:"rtc.richtext.hyperlink.tooltip",family:"rtc.richtext.hyperlink",path:"MW/rtc/plugins/hyperlink/HyperlinkTooltipProvider"},
{id:"rtc.richtext.hyperlink.coordinateconverter",path:"MW/rtc/plugins/hyperlink/view/HyperlinkCoordinateConverterProvider",family:"rtc.richtext.hyperlink",subsystem:"rtc.view.coordinateconverter.converter"},{id:"rtc.richtext.hyperlink.contentconverter",path:"MW/rtc/plugins/hyperlink/model/HyperlinkNodeContentConverterProvider",family:"rtc.richtext.hyperlink",subsystem:"rtc.nodes.contentconverter.converter"},{id:"rtc.richtext.hyperlink.insertionrules",path:"MW/rtc/plugins/hyperlink/HyperlinkInsertionRulesProvider",
family:"rtc.richtext.hyperlink",subsystem:"rtc.insertionrule"},{id:"rtc.richtext.hyperlink.layouter",path:"MW/rtc/plugins/hyperlink/view/HyperlinkLayouterProvider",family:"rtc.richtext.hyperlink",subsystem:"rtc.view.layoutmanager.layouter"},{id:"rtc.richtext.equationcontroller",family:"rtc.richtext.equations",path:"MW/rtc/plugins/equations/equationcontroller/EquationControllerProvider"},{id:"rtc.richtext.equationeditor",family:"rtc.richtext.equations",path:"MW/rtc/plugins/equations/equationeditor/EquationEditorProvider"},
{id:"rtc.richtext.mathmlconverter",family:"rtc.richtext.equations",path:"MW/rtc/plugins/equations/equationeditor/MathMLMimeConverterProvider"},{id:"rtc.richtext.latexeditor",family:"rtc.richtext.equations",path:"MW/rtc/plugins/equations/latexeditor/LaTeXEditorProvider"},{id:"rtc.richtext.equations.contentconverter",path:"MW/rtc/plugins/equations/equationcontroller/nodes/EquationNodeContentConverterProvider",family:"rtc.richtext.equations",subsystem:"rtc.nodes.contentconverter.converter"},{id:"rtc.richtext.equations.coordinateconverter",
path:"MW/rtc/plugins/equations/equationcontroller/view/EquationCoordinateConverterProvider",family:"rtc.richtext.equations",subsystem:"rtc.view.coordinateconverter.converter"},{id:"rtc.richtext.equations.layouter",path:"MW/rtc/plugins/equations/equationcontroller/view/EquationLayouterProvider",family:"rtc.richtext.equations",subsystem:"rtc.view.layoutmanager.layouter"},{id:"rtc.richtext",path:"MW/rtc/plugins/richtext/RichTextProvider",family:"rtc.richtext"},{id:"rtc.richtext.toggleshortcuts",path:"MW/rtc/plugins/richtext/CodeTextToggleShortcutsProvider",
family:"rtc.richtext"},{id:"rtc.richtext.matlabjsonmimeconverter",path:"MW/rtc/plugins/richtext/MatlabJSONMimeConverterProvider",family:"rtc.richtext",subsystem:"rtc.cutcopypaste.mimeconverters"},{id:"rtc.richtext.htmlhandler",path:"MW/rtc/plugins/richtext/HTMLRichTextElementHandlerProvider",family:"rtc.richtext"},{id:"rtc.richtext.coordinateconverter",path:"MW/rtc/plugins/richtext/view/RichTextCoordinateConverterProvider",family:"rtc.richtext",subsystem:"rtc.view.coordinateconverter.converter"},
{id:"rtc.richtext.rangeconverter",path:"MW/rtc/plugins/richtext/view/RichTextRangeConverterProvider",family:"rtc.richtext",subsystem:"rtc.view.rangeconverter.converter"},{id:"rtc.richtext.richtextparagraph.contentconverter",path:"MW/rtc/plugins/richtext/nodes/inner/RichTextParagraphNodeContentConverterProvider",family:"rtc.richtext",subsystem:"rtc.nodes.contentconverter.converter"},{id:"rtc.richtext.richtextparagraph.insertionrules",path:"MW/rtc/plugins/richtext/RichTextParagraphInsertionRulesProvider",
family:"rtc.richtext",subsystem:"rtc.insertionrule"},{id:"rtc.richtext.richtextparagraph.layouter",path:"MW/rtc/plugins/richtext/view/RichTextParagraphLayouterProvider",family:"rtc.richtext",subsystem:"rtc.view.layoutmanager.layouter"},{id:"rtc.richtext.heading.contentconverter",path:"MW/rtc/plugins/richtext/nodes/inner/HeadingNodeContentConverterProvider",family:"rtc.richtext",subsystem:"rtc.nodes.contentconverter.converter"},{id:"rtc.richtext.heading.layouter",path:"MW/rtc/plugins/richtext/view/HeadingLayouterProvider",
family:"rtc.richtext",subsystem:"rtc.view.layoutmanager.layouter"},{id:"rtc.richtext.richtextnode.contentconverter",path:"MW/rtc/plugins/richtext/nodes/leaf/RichTextNodeContentConverterProvider",family:"rtc.richtext",subsystem:"rtc.nodes.contentconverter.converter"},{id:"rtc.richtext.richtextnode.insertionrules",path:"MW/rtc/plugins/richtext/RichTextNodeInsertionRulesProvider",family:"rtc.richtext",subsystem:"rtc.insertionrule"},{id:"rtc.richtext.richtextnode.layouter",path:"MW/rtc/plugins/richtext/view/RichTextLayouterProvider",
family:"rtc.richtext",subsystem:"rtc.view.layoutmanager.layouter"},{id:"rtc.code.codingui.codeprovider",path:"MW/rtc/plugins/service/CodingUIBackendCodeProviderProvider"},{id:"rtc.code.codingui.backendservice",path:"MW/rtc/plugins/service/CodingUIBackendServiceProvider"},{id:"rtc.focusservice",path:"MW/rtc/plugins/service/FocusServiceProvider"},{id:"rtc.outputhandlerservice",path:"MW/rtc/plugins/service/OutputHandlerServiceProvider"},{id:"rtc.tooltipservice",path:"MW/rtc/plugins/service/TooltipServiceProvider"},
{id:"rtc.settings.service",path:"MW/rtc/plugins/settings/RtcSettingServiceProvider"},{id:"rtc.richtext.images.htmlhandler",path:"MW/rtc/plugins/images/HTMLImageElementHandlerProvider",family:"rtc.richtext.images"},{id:"rtc.richtext.images",path:"MW/rtc/plugins/images/ImagesProvider",family:"rtc.richtext.images"},{id:"rtc.richtext.images.imagemimeconverter",path:"MW/rtc/plugins/images/ImageMimeConverterProvider",family:"rtc.richtext.images",subsystem:"rtc.cutcopypaste.mimeconverters"},{id:"rtc.richtext.images.imagenodeconverter",
family:"rtc.richtext.images",path:"MW/rtc/plugins/images/ImageNodeConverterProvider"},{id:"rtc.richtext.images.contentconverter",path:"MW/rtc/plugins/images/model/ImageNodeContentConverterProvider",family:"rtc.richtext.images",subsystem:"rtc.nodes.contentconverter.converter"},{id:"rtc.richtext.images.coordinateconverter",path:"MW/rtc/plugins/images/view/ImageCoordinateConverterProvider",family:"rtc.richtext.images",subsystem:"rtc.view.coordinateconverter.converter"},{id:"rtc.richtext.images.layouter",
path:"MW/rtc/plugins/images/view/ImageLayouterProvider",family:"rtc.richtext.images",subsystem:"rtc.view.layoutmanager.layouter"},{id:"rtc.richtext.insertimage",path:"MW/rtc/plugins/images/InsertImageProvider"},{id:"rtc.richtext.resizeimage",path:"MW/rtc/plugins/images/InlineResizeImageProvider"},{id:"rtc.richtext.resizer",path:"MW/rtc/plugins/resizer/ResizerProvider"},{id:"rtc.export.html",path:"MW/rtc/plugins/export/html/HTMLExporterProvider",family:"rtc.richtext"},{id:"rtc.export.html.linenode",
path:"MW/rtc/plugins/export/html/LineNode2HTMLProvider",subsystem:"rtc.export.htmlwriters",family:"embeddedoutputs"},{id:"rtc.export.html.paragraphnode",path:"MW/rtc/plugins/richtext/export/RichTextParagraphNode2HTMLProvider",subsystem:"rtc.export.htmlwriters",family:"rtc.richtext"},{id:"rtc.export.html.headingnode",path:"MW/rtc/plugins/richtext/export/HeadingNode2HTMLProvider",subsystem:"rtc.export.htmlwriters",family:"rtc.richtext"},{id:"rtc.export.html.plaintextnode",path:"MW/rtc/plugins/export/html/PlainTextNode2HTMLProvider",
subsystem:"rtc.export.htmlwriters",family:"rtc.richtext"},{id:"rtc.export.html.richtextnode",path:"MW/rtc/plugins/richtext/export/RichTextNode2HTMLProvider",subsystem:"rtc.export.htmlwriters",family:"rtc.richtext"},{id:"rtc.export.html.equation",path:"MW/rtc/plugins/equations/export/Equation2HTMLProvider",subsystem:"rtc.export.htmlwriters",family:"rtc.richtext.equations"},{id:"rtc.export.html.image",path:"MW/rtc/plugins/images/export/Image2HTMLProvider",subsystem:"rtc.export.htmlwriters",family:"rtc.richtext.images"},
{id:"rtc.export.html.hyperlink",path:"MW/rtc/plugins/hyperlink/export/Hyperlink2HTMLProvider",subsystem:"rtc.export.htmlwriters",family:"rtc.richtext.hyperlink"},{id:"rtc.export.html.codeexampleblock",path:"MW/rtc/plugins/codeexample/export/CodeExampleBlock2HTMLProvider",subsystem:"rtc.export.htmlwriters",family:"rtc.richtext"},{id:"rtc.export.html.tableofcontentscontainer",path:"MW/rtc/plugins/tableofcontents/export/TableOfContentsContainer2HTMLProvider",subsystem:"rtc.export.htmlwriters",family:"rtc.richtext.tableofcontents"},
{id:"rtc.export.html.listparagraph",path:"MW/rtc/plugins/lists/export/ListParagraph2HTMLProvider",subsystem:"rtc.export.htmlwriters",family:"rtc.richtext.lists"},{id:"rtc.export.html.listitem",path:"MW/rtc/plugins/lists/export/ListItem2HTMLProvider",subsystem:"rtc.export.htmlwriters",family:"rtc.richtext.lists"},{id:"rtc.export.html.livecontrol",path:"MW/rtc/plugins/language/matlab/codingui/livecontrols/export/LiveControl2HTMLProvider",subsystem:"rtc.export.htmlwriters",family:"rtc.livecontrols"},
{id:"rtc.export.output.html.outputparagraph",path:"MW/rtc/plugins/export/html/OutputParagraph2HTMLProvider",subsystem:"rtc.export.htmloutputwriters",family:"embeddedoutputs"},{id:"rtc.export.output.html.basetext",path:"MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseText2HTMLProvider",subsystem:"rtc.export.htmloutputwriters",family:"embeddedoutputs"},{id:"rtc.export.output.html.figure",path:"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/export/Figure2HTMLProvider",subsystem:"rtc.export.htmloutputwriters",
family:"embeddedoutputs"},{id:"rtc.export.output.html.matrix",path:"MW/rtc/plugins/embeddedoutputs/outputhandlers/matrix/export/MatrixElement2HTMLProvider",subsystem:"rtc.export.htmloutputwriters",family:"embeddedoutputs"},{id:"rtc.export.output.html.symbolic",path:"MW/rtc/plugins/embeddedoutputs/outputhandlers/symbolic/export/Symbolic2HTMLProvider",subsystem:"rtc.export.htmloutputwriters",family:"embeddedoutputs"},{id:"rtc.export.output.html.variableelement",path:"MW/rtc/plugins/embeddedoutputs/outputhandlers/variable/export/VariableElement2HTMLProvider",
subsystem:"rtc.export.htmloutputwriters",family:"embeddedoutputs"},{id:"rtc.export.pdf",path:"MW/rtc/plugins/saveaspdf/SaveAsPDFProvider"},{id:"rtc.richtext.export.pdf.basedocumentwriter",path:"MW/rtc/plugins/saveaspdf/document/BaseDocumentWriterProvider",subsystem:"rtc.pdfwriters",family:"rtc.richtext"},{id:"rtc.richtext.export.pdf.equationwriter",path:"MW/rtc/plugins/saveaspdf/document/EquationWriterProvider",subsystem:"rtc.pdfwriters",family:"rtc.richtext.equations"},{id:"rtc.richtext.export.pdf.hyperlinkwriter",
path:"MW/rtc/plugins/saveaspdf/document/HyperlinkWriterProvider",subsystem:"rtc.pdfwriters",family:"rtc.richtext.hyperlink"},{id:"rtc.richtext.export.pdf.imagewriter",path:"MW/rtc/plugins/saveaspdf/document/ImageWriterProvider",subsystem:"rtc.pdfwriters",family:"rtc.richtext.images"},{id:"rtc.richtext.export.pdf.livecontrolwriter",path:"MW/rtc/plugins/saveaspdf/document/LiveControlWriterProvider",subsystem:"rtc.pdfwriters",family:"rtc.livecontrols"},{id:"rtc.richtext.export.pdf.listwriter",path:"MW/rtc/plugins/saveaspdf/document/ListWriterProvider",
subsystem:"rtc.pdfwriters",family:"rtc.richtext.lists"},{id:"rtc.richtext.export.pdf.paragraphwriter",path:"MW/rtc/plugins/saveaspdf/document/ParagraphWriterProvider",subsystem:"rtc.pdfwriters",family:"rtc.richtext"},{id:"rtc.richtext.export.pdf.tableofcontentswriter",path:"MW/rtc/plugins/saveaspdf/document/TableOfContentWriterProvider",subsystem:"rtc.pdfwriters",family:"rtc.richtext.tableofcontents"},{id:"rtc.richtext.export.pdf.figurewriter",path:"MW/rtc/plugins/saveaspdf/outputs/FigureWriterProvider",
subsystem:"rtc.pdfwriters",family:"embeddedoutputs"},{id:"rtc.richtext.export.pdf.matrixwriter",path:"MW/rtc/plugins/saveaspdf/outputs/MatrixWriterProvider",subsystem:"rtc.pdfwriters",family:"embeddedoutputs"},{id:"rtc.richtext.export.pdf.tablewriter",path:"MW/rtc/plugins/saveaspdf/outputs/TableWriterProvider",subsystem:"rtc.pdfwriters",family:"embeddedoutputs"},{id:"rtc.richtext.export.pdf.outputwriter",path:"MW/rtc/plugins/saveaspdf/outputs/OutputWriterProvider",subsystem:"rtc.pdfwriters",family:"embeddedoutputs"},
{id:"rtc.richtext.export.pdf.symequationwriter",path:"MW/rtc/plugins/saveaspdf/outputs/SymEquationWriterProvider",subsystem:"rtc.pdfwriters",family:"embeddedoutputs"},{id:"rtc.richtext.export.pdf.textwriter",path:"MW/rtc/plugins/saveaspdf/outputs/TextWriterProvider",subsystem:"rtc.pdfwriters",family:"embeddedoutputs"},{id:"rtc.richtext.export.pdf.variablewriter",path:"MW/rtc/plugins/saveaspdf/outputs/VariableWriterProvider",subsystem:"rtc.pdfwriters",family:"embeddedoutputs"},{id:"rtc.shadowtextservice",
path:"MW/rtc/plugins/shadowtext/ShadowTextServiceProvider"},{id:"rtc.smartformatting.formatter.automaticcoding.autowrapcomment",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/AutoWrapCommentSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.splitcomment",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SplitCommentSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},
{id:"rtc.smartformatting.formatter.automaticcoding.roundpareninsert",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/RoundParenInsertSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.roundparendelete",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/RoundParenDeleteSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.squarepareninsert",
path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SquareParenInsertSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.squareparendelete",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SquareParenDeleteSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.curlypareninsert",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/CurlyParenInsertSmartFormatterProvider",
subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.curlyparendelete",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/CurlyParenDeleteSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.singlequoteinsert",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SingleQuoteInsertSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},
{id:"rtc.smartformatting.formatter.automaticcoding.singlequotedelete",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SingleQuoteDeleteSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.doublequoteinsert",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/DoubleQuoteInsertSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.doublequotedelete",
path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/DoubleQuoteDeleteSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.roundparenoverwrite",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/RoundParenOverwritingSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.curlyparenoverwrite",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/CurlyParenOverwritingSmartFormatterProvider",
subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.squareparenoverwrite",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SquareParenOverwritingSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.singlequoteoverwrite",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SingleQuoteOverwritingSmartFormatterProvider",subsystem:"rtc.smartformatter",
family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.doublequoteoverwrite",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/DoubleQuoteOverwritingSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.splitdoublequotestring",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SplitDoubleQuoteStringSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},
{id:"rtc.smartformatting.formatter.automaticcoding.splitsinglequotestring",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SplitSingleQuoteStringSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.endclassdefblock",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndClassDefBlockSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.endenumerationblock",
path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndEnumerationBlockSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.endeventsblock",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndEventsBlockSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.endforblock",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndForBlockSmartFormatterProvider",
subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.endfunctionblock",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndFunctionBlockSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.endifblock",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndIfBlockSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},
{id:"rtc.smartformatting.formatter.automaticcoding.endmethodsblock",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndMethodsBlockSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.endparforblock",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndParforBlockSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.endpropertiesblock",
path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndPropertiesBlockSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.endspmdblock",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndSpmdBlockSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.endswitchblock",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndSwitchBlockSmartFormatterProvider",
subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.endtryblock",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndTryBlockSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.automaticcoding.endwhileblock",path:"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndWhileBlockSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.markdown.bulletedlist",
path:"MW/rtc/plugins/smartformatting/formatter/markdown/paragraph/MarkdownBulletedListSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.markdown.heading",path:"MW/rtc/plugins/smartformatting/formatter/markdown/paragraph/MarkdownHeadingSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.markdown.numberedlist",path:"MW/rtc/plugins/smartformatting/formatter/markdown/paragraph/MarkdownNumberedListSmartFormatterProvider",
subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.markdown.title",path:"MW/rtc/plugins/smartformatting/formatter/markdown/paragraph/MarkdownTitleSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.markdown.bold2",path:"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownBold2SmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.markdown.bold",
path:"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownBoldSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.markdown.hyperlink.labelurl",path:"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownHyperlinkLabelUrlSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.markdown.hyperlink.urltag",path:"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownHyperlinkUrlTagSmartFormatterProvider",
subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.markdown.italic2",path:"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownItalic2SmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.markdown.italicbold2",path:"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownItalicBold2SmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.markdown.italicbold",
path:"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownItalicBoldSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.markdown.italic",path:"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownItalicSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.markdown.monospace",path:"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownMonospaceSmartFormatterProvider",
subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.matlab.monospace",path:"MW/rtc/plugins/smartformatting/formatter/matlab/MatlabMonospaceSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.matlab.sectionbreak.heading",path:"MW/rtc/plugins/smartformatting/formatter/matlab/MatlabSectionBreakHeadingSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.matlab.sectionbreak.separator",
path:"MW/rtc/plugins/smartformatting/formatter/matlab/MatlabSectionBreakSeparatorSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.symbol.trademarkcopyright",path:"MW/rtc/plugins/smartformatting/formatter/symbol/SymbolTrademarkCopyrightSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.hyperlink",path:"MW/rtc/plugins/smartformatting/formatter/HyperlinkSmartFormatterProvider",
subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.formatter.markup.equation",path:"MW/rtc/plugins/smartformatting/formatter/MarkupEquationSmartFormatterProvider",subsystem:"rtc.smartformatter",family:"smartformatting"},{id:"rtc.smartformatting.backspaceundohandler",path:"MW/rtc/plugins/smartformatting/BackspaceUndoHandlerProvider"},{id:"rtc.smartformatting",path:"MW/rtc/plugins/smartformatting/SmartFormattingProvider",family:"smartformatting"},{id:"rtc.smarttab",path:"MW/rtc/plugins/smarttab/SmartTabProvider"},
{id:"rtc.code.codechange",path:"MW/rtc/plugins/language/matlab/code/CodeChangeServiceProvider"},{id:"rtc.serializers.containers.codecontainer",path:"MW/rtc/model/io/serializers/providers/containers/CodeContainerSerializerProvider",subsystem:"rtc.serializer",family:"rtc.serializers.serialize"},{id:"rtc.serializers.containers.container",path:"MW/rtc/model/io/serializers/providers/containers/ContainerSerializerProvider"},{id:"rtc.serializers.containers.headingcontainer",path:"MW/rtc/model/io/serializers/providers/containers/HeadingContainerSerializerProvider",
subsystem:"rtc.serializer",family:"rtc.richtext"},{id:"rtc.serializers.containers.hyperlinkcontainer",path:"MW/rtc/model/io/serializers/providers/containers/HyperlinkContainerSerializerProvider",subsystem:"rtc.serializer",family:"rtc.richtext.hyperlink"},{id:"rtc.serializers.containers.listcontainer",path:"MW/rtc/model/io/serializers/providers/containers/ListContainerSerializerProvider",subsystem:"rtc.serializer",family:"rtc.richtext.lists"},{id:"rtc.serializers.containers.listitemcontainer",path:"MW/rtc/model/io/serializers/providers/containers/ListItemContainerSerializerProvider",
subsystem:"rtc.serializer",family:"rtc.richtext.lists"},{id:"rtc.serializers.containers.liveapplinecontainer",path:"MW/rtc/model/io/serializers/providers/containers/LiveAppLineContainerSerializerProvider",subsystem:"rtc.serializer",family:"rtc.liveapps"},{id:"rtc.serializers.containers.richtextcontainer",path:"MW/rtc/model/io/serializers/providers/containers/RichTextContainerSerializerProvider",subsystem:"rtc.serializer",family:"rtc.richtext"},{id:"rtc.serializers.containers.sectionbreakcontainer",
path:"MW/rtc/model/io/serializers/providers/containers/SectionBreakContainerSerializerProvider",subsystem:"rtc.serializer",family:"rtc.sectionbreak"},{id:"rtc.serializers.nodes.equation",path:"MW/rtc/model/io/serializers/providers/nodes/EquationSerializerProvider",subsystem:"rtc.serializer",family:"rtc.richtext.equations"},{id:"rtc.serializers.nodes.image",path:"MW/rtc/model/io/serializers/providers/nodes/ImageSerializerProvider",subsystem:"rtc.serializer",family:"rtc.richtext.images"},{id:"rtc.serializers.nodes.livecontrol",
path:"MW/rtc/model/io/serializers/providers/nodes/LiveControlSerializerProvider",subsystem:"rtc.serializer",family:"rtc.livecontrols"},{id:"rtc.serializers.nodes.plaintext",path:"MW/rtc/model/io/serializers/providers/nodes/PlainTextSerializerProvider",subsystem:"rtc.serializer",family:"rtc.serializers.serialize"},{id:"rtc.serializers.nodes.richtext",path:"MW/rtc/model/io/serializers/providers/nodes/RichTextSerializerProvider",subsystem:"rtc.serializer",family:"rtc.richtext"},{id:"rtc.serializers",
path:"MW/rtc/model/io/SerializersProvider"},{id:"rtc.view.decoration",path:"MW/rtc/view/decoration/DecorationProvider"},{id:"rtc.view.decoration.margindecorator",path:"MW/rtc/view/decoration/LayerDecoratorMarginDecoratorProvider"},{id:"rtc.view.decoration.viewmodel",path:"MW/rtc/view/decoration/viewmodel/DecorationViewModelProvider"},{id:"rtc.view.decoration.layerviewmodel",path:"MW/rtc/view/decoration/viewmodel/DecorationLayerViewModelProvider"},{id:"rtc.view.decoration.descriptorsstore",path:"MW/rtc/view/decoration/viewmodel/DecorationDescriptorsStoreProvider"},
{id:"rtc.view.hidden.hiddennodemodel",path:"MW/rtc/view/hidden/HiddenNodeModelProvider"},{id:"rtc.view.hidden.hiddennodeservice",path:"MW/rtc/view/hidden/HiddenNodeServiceProvider"},{id:"rtc.view.layoutmanager",path:"MW/rtc/plugins/view/layoutmanager/LayoutManagerProvider"},{id:"rtc.view.layoutmanager.paragraphhostingmodel",path:"MW/rtc/plugins/view/layoutmanager/LayoutParagraphHostingModelProvider"},{id:"rtc.view.layoutmanager.rules.default",path:"MW/rtc/plugins/view/layoutmanager/rules/DefaultRuleProvider",
subsystem:"rtc.view.layoutmanager.rule",family:"layoutrules"},{id:"rtc.view.layoutmanager.rules.containmentgrouping",path:"MW/rtc/plugins/view/layoutmanager/rules/ContainmentGroupingRuleProvider",subsystem:"rtc.view.layoutmanager.rule",family:"layoutrules"},{id:"rtc.view.layoutmanager.rules.contiguousgrouping",path:"MW/rtc/plugins/view/layoutmanager/rules/ContiguousGroupingRuleProvider",subsystem:"rtc.view.layoutmanager.rule",family:"layoutrules"},{id:"rtc.view.layoutmanager.rules.basegrouping",path:"MW/rtc/plugins/view/layoutmanager/rules/BaseGroupingRuleProvider",
subsystem:"rtc.view.layoutmanager.rule",family:"layoutrules"},{id:"rtc.view.layoutmanager.rules.wrappable",path:"MW/rtc/plugins/view/layoutmanager/rules/WrappableRuleProvider",subsystem:"rtc.view.layoutmanager.rule",family:"layoutrules"},{id:"rtc.view.layoutmanager.rules.output",path:"MW/rtc/plugins/view/layoutmanager/rules/OutputRuleProvider",subsystem:"rtc.view.layoutmanager.rule",family:"layoutrules"},{id:"rtc.view.layoutmanager.rules.paragraphhosting",path:"MW/rtc/plugins/view/layoutmanager/rules/ParagraphHostingRuleProvider",
subsystem:"rtc.view.layoutmanager.rule",family:"layoutrules"},{id:"rtc.view.layoutmanager.rules.expandable",path:"MW/rtc/plugins/view/layoutmanager/rules/ExpandableRuleProvider",subsystem:"rtc.view.layoutmanager.rule",family:"layoutrules"},{id:"rtc.view.layoutmanager.layouters.line",path:"MW/rtc/plugins/view/layoutmanager/layouters/LineLayouterProvider",subsystem:"rtc.view.layoutmanager.layouter",requiredForSubsystem:!0},{id:"rtc.view.layoutmanager.layouters.plaintext",path:"MW/rtc/plugins/view/layoutmanager/layouters/PlainTextLayouterProvider",
subsystem:"rtc.view.layoutmanager.layouter",requiredForSubsystem:!0},{id:"rtc.view.layoutmanager.layouters.root",path:"MW/rtc/plugins/view/layoutmanager/layouters/RootLayouterProvider",subsystem:"rtc.view.layoutmanager.layouter",requiredForSubsystem:!0},{id:"rtc.view.smoothscrolling",path:"MW/rtc/plugins/smoothscrolling/SmoothScrollingPluginProvider"},{id:"rtc.view.testhelper.performance",path:"MW/rtc/view/PerformanceTestHelper",family:"testerhelpers"},{id:"rtc.view.testhelper.rtcperformance",path:"MW/rtc/view/RTCPerformanceTestHelper",
family:"testerhelpers"},{id:"rtc.view.testhelper.lines",path:"MW/rtc/view/ViewLinesTestHelper",family:"testerhelpers"},{id:"rtc.view.testhelper.sections",path:"MW/rtc/view/ViewSectionsTestHelper",family:"testerhelpers"},{id:"rtc.view.viewportopenedservice",path:"MW/rtc/view/ViewportOpenedServiceProvider"},{id:"rtc.view",path:"MW/rtc/view/ViewProvider"},{id:"rtc.view.viewmodel",path:"MW/rtc/view/ViewModelProvider"},{id:"rtc.view.visibility",path:"MW/rtc/view/VisibilityNotifierProvider"},{id:"rtc.preferences.service",
path:"MW/rtc/preferences/PreferencesServiceProvider"},{id:"margin.linenumberdecorator",path:"MW/rtc/margin/TraditionalLineNumberDecoratorProvider"},{id:"rtc.divcaret",path:"MW/rtc/plugins/view/divcaret/DivCaretPluginProvider"},{id:"rtc.divselection",path:"MW/rtc/plugins/view/divselection/DivSelectionPluginProvider"},{id:"rtc.code.comment",path:"MW/rtc/plugins/language/matlab/commentCode/CommentCodeProvider"},{id:"rtc.hyperlinkservice",path:"MW/rtc/hyperlinkservice/HyperlinkServiceProvider"},{id:"rtc.internalhyperlinkservice",
path:"MW/rtc/plugins/internalhyperlinkservice/InternalHyperlinkServiceProvider"},{id:"rtc.richtext.anchor",path:"MW/rtc/plugins/internalhyperlinkservice/AnchorProvider"},{id:"rtc.richtext.tableofcontents",family:"rtc.richtext.tableofcontents",path:"MW/rtc/plugins/tableofcontents/TableOfContentsProvider"},{id:"rtc.richtext.tableofcontents.layouter",path:"MW/rtc/plugins/tableofcontents/view/TableOfContentsLayouterProvider",family:"rtc.richtext.tableofcontents",subsystem:"rtc.view.layoutmanager.layouter"},
{id:"rtc.richtext.tableofcontentsheading.layouter",path:"MW/rtc/plugins/tableofcontents/view/TableOfContentsHeadingNodeLayouterProvider",family:"rtc.richtext.tableofcontents",subsystem:"rtc.view.layoutmanager.layouter"},{id:"rtc.richtext.tableofcontentscontainer.layouter",path:"MW/rtc/plugins/tableofcontents/view/TableOfContentsContainerLayouterProvider",family:"rtc.richtext.tableofcontents",subsystem:"rtc.view.layoutmanager.layouter"},{id:"rtc.richtext.tableofcontents.insertionrules",path:"MW/rtc/plugins/tableofcontents/TableOfContentsContainerInsertionRulesProvider",
family:"rtc.richtext.tableofcontents",subsystem:"rtc.insertionrule"},{id:"rtc.richtext.tableofcontentscontainer.contentconverter",path:"MW/rtc/plugins/tableofcontents/model/TableOfContentsContainerContentConverterProvider",family:"rtc.richtext.tableofcontents",subsystem:"rtc.nodes.contentconverter.converter"},{id:"rtc.richtext.tableofcontentsheading.contentconverter",path:"MW/rtc/plugins/tableofcontents/model/TableOfContentsHeadingNodeContentConverterProvider",family:"rtc.richtext.tableofcontents",
subsystem:"rtc.nodes.contentconverter.converter"},{id:"rtc.richtext.tableofcontentsheading.nodeconversionrules",path:"MW/rtc/plugins/tableofcontents/TableOfContentsHeadingNodeConversionRulesProvider",family:"rtc.richtext.tableofcontents",subsystem:"rtc.nodeconversionrule"},{id:"rtc.richtext.tableofcontentslist.nodeconversionrules",path:"MW/rtc/plugins/tableofcontents/TableOfContentsListConversionRulesProvider",family:"rtc.richtext.tableofcontents",subsystem:"rtc.nodeconversionrule"},{id:"rtc.richtext.tableofcontents.contentconverter",
path:"MW/rtc/plugins/tableofcontents/model/TableOfContentsListContentConverterProvider",family:"rtc.richtext.tableofcontents",subsystem:"rtc.nodes.contentconverter.converter"},{id:"rtc.serializers.containers.tableofcontentscontainer",path:"MW/rtc/model/io/serializers/providers/containers/TableOfContentsContainerSerializerProvider",family:"rtc.richtext.tableofcontents",subsystem:"rtc.serializer"},{id:"rtc.serializers.containers.tableofcontentsheading",path:"MW/rtc/model/io/serializers/providers/containers/TableOfContentsHeadingSerializerProvider",
family:"rtc.richtext.tableofcontents",subsystem:"rtc.serializer"},{id:"rtc.serializers.containers.tableofcontentslist",path:"MW/rtc/model/io/serializers/providers/containers/TableOfContentsListSerializerProvider",family:"rtc.richtext.tableofcontents",subsystem:"rtc.serializer"},{id:"rtc.richtext.tableofcontents.coordinateconverter.heading",path:"MW/rtc/plugins/tableofcontents/view/TableOfContentsHeadingNodeCoordinateConverterProvider",family:"rtc.richtext.tableofcontents",subsystem:"rtc.view.coordinateconverter.converter"},
{id:"rtc.richtext.tableofcontents.coordinateconverter.list",path:"MW/rtc/plugins/tableofcontents/view/TableOfContentsListCoordinateConverterProvider",family:"rtc.richtext.tableofcontents",subsystem:"rtc.view.coordinateconverter.converter"},{id:"rtc.richtext.tableofcontents.coordinateconverter.container",path:"MW/rtc/plugins/tableofcontents/view/TableOfContentsContainerCoordinateConverterProvider",family:"rtc.richtext.tableofcontents",subsystem:"rtc.view.coordinateconverter.converter"},{id:"rtc.code.sections.model",
path:"MW/rtc/plugins/language/matlab/sections/SectionModelProvider",family:"sections"},{id:"rtc.code.sections.view.containerutility",path:"MW/rtc/plugins/language/matlab/sections/SectionContainerUtilityProvider"},{id:"rtc.code.sections.view.currentsection",path:"MW/rtc/plugins/language/matlab/sections/CurrentSectionViewProvider"},{id:"rtc.code.sections.navigate",path:"MW/rtc/plugins/language/matlab/sections/NavigateSectionProvider"},{id:"rtc.code.sections.insert",path:"MW/rtc/plugins/language/matlab/sections/InsertSectionProvider"},
{id:"rtc.code.sections.contributor.coderegion",path:"MW/rtc/plugins/language/matlab/sections/CodeRegionSectionContributorProvider"},{id:"rtc.code.sections.stale.model",path:"MW/rtc/plugins/language/matlab/sections/StaleSectionModelProvider",family:"sections"},{id:"rtc.margin",path:"MW/rtc/plugins/margin/MarginContainerProvider"},{id:"rtc.margin.button",path:"MW/rtc/plugins/margin/RightMarginButtonProvider"},{id:"rtc.messagebar.rightmargincontainer",path:"MW/rtc/plugins/margin/RightMarginContainerProvider",
family:"messagebar"},{id:"rtc.margin.severitystatusbutton",path:"MW/rtc/plugins/margin/SeverityStatusButtonProvider"},{id:"rtc.messagebar.model",path:"MW/rtc/plugins/messagebar/MessageBarModelProvider",family:"messagebar"},{id:"rtc.messagebar.service",path:"MW/rtc/plugins/messagebar/MessageBarServiceProvider",family:"messagebar"},{id:"rtc.messagebar.view",path:"MW/rtc/plugins/messagebar/MessageBarViewProvider",family:"messagebar"},{id:"margin.statusactionbar.sectionsdecorator",path:"MW/rtc/plugins/statusactionbar/decorators/SectionsDecoratorProvider"},
{id:"margin.statusactionbar.stalesectionsdecorator",path:"MW/rtc/plugins/statusactionbar/decorators/StaleSectionsDecoratorProvider"},{id:"margin.statusactionbar.stalesectionsbackgrounddecorator",path:"MW/rtc/plugins/statusactionbar/decorators/StaleSectionsBackgroundDecoratorProvider"},{id:"margin.statusactionbar.evaluation",path:"MW/rtc/plugins/statusactionbar/evaluation/StatusActionBarEvaluationProvider"},{id:"rtc.embeddedoutputs",path:"MW/rtc/plugins/embeddedoutputs/EmbeddedOutputsProvider",family:"embeddedoutputs"},
{id:"rtc.embeddedoutputs.executionrequestfactory",path:"MW/rtc/plugins/embeddedoutputs/ExecutionRequestFactoryProvider",family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.outputhandler",path:"MW/rtc/plugins/embeddedoutputs/OutputHandlerProvider",family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.saveready",path:"MW/rtc/plugins/embeddedoutputs/EmbeddedOutputsDBQuitSaveReadyProvider",family:"embeddedoutputs",subsystem:"rtc.saveready"},{id:"rtc.embeddedoutputs.linenumbertracker",path:"MW/rtc/plugins/embeddedoutputs/LineNumberTrackerProvider",
family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.linecontinuationtracker",path:"MW/rtc/plugins/embeddedoutputs/LineContinuationTrackerProvider",family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.statehandler",path:"MW/rtc/plugins/embeddedoutputs/StateHandlerProvider",family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.syntaxerrors",path:"MW/rtc/plugins/embeddedoutputs/SyntaxErrorHandlerProvider",family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.outputremover",path:"MW/rtc/plugins/embeddedoutputs/OutputRemoverProvider",
family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.loadinterceptors.manager",path:"MW/rtc/plugins/embeddedoutputs/loadinterceptors/EmbeddedOutputsLoadInterceptorManagerProvider",family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.loadinterceptors.deferredloader",path:"MW/rtc/plugins/embeddedoutputs/loadinterceptors/DeferredLoadInterceptorProvider",family:"embeddedoutputs",subsystem:"rtc.embeddedoutputs.loadinterceptors"},{id:"rtc.embeddedoutputs.model",path:"MW/rtc/plugins/embeddedoutputs/model/EmbeddedOutputsModelProvider",
family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.alert",path:"MW/rtc/plugins/embeddedoutputs/view/EmbeddedOutputsAlertProvider",family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.viewservice",path:"MW/rtc/plugins/embeddedoutputs/ExecutionManagerViewServiceProvider",family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.triggers",path:"MW/rtc/plugins/embeddedoutputs/triggers/TriggersProvider",family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.interruptaction",path:"MW/rtc/plugins/embeddedoutputs/triggers/InterruptActionProvider",
family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.copyoutputs",path:"MW/rtc/plugins/embeddedoutputs/CopyOutputsProvider",family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.executionmanager",path:"MW/rtc/plugins/embeddedoutputs/ExecutionManagerProvider",family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.evaltextcache",path:"MW/rtc/plugins/embeddedoutputs/EvalTextCacheProvider",family:"executioncontrols"},{id:"rtc.embeddedoutputs.clearoutputscache",path:"MW/rtc/plugins/embeddedoutputs/ClearOutputsCacheProvider",
family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.currentoutputservice",path:"MW/rtc/plugins/embeddedoutputs/CurrentOutputServiceProvider",family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.figureoutputhandler",path:"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureOutputHandlerProvider",family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.figureconnectionmanager",path:"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureConnectionManagerProvider",family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.codegen",
path:"MW/rtc/plugins/embeddedoutputs/codegen/CodeGenFactoryProvider",family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.matrixoutputhandler",path:"MW/rtc/plugins/embeddedoutputs/outputhandlers/matrix/MatrixOutputHandlerProvider",family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.variableoutputhandler",path:"MW/rtc/plugins/embeddedoutputs/outputhandlers/variable/VariableOutputHandlerProvider",family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.variablestringoutputhandler",path:"MW/rtc/plugins/embeddedoutputs/outputhandlers/variablestring/VariableStringOutputHandlerProvider",
family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.symbolicoutputhandler",path:"MW/rtc/plugins/embeddedoutputs/outputhandlers/symbolic/SymbolicOutputHandlerProvider",family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.textoutputhandler",path:"MW/rtc/plugins/embeddedoutputs/outputhandlers/text/TextOutputHandlerProvider",family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.warningoutputhandler",path:"MW/rtc/plugins/embeddedoutputs/outputhandlers/warning/WarningOutputHandlerProvider",family:"embeddedoutputs"},
{id:"rtc.embeddedoutputs.erroroutputhandler",path:"MW/rtc/plugins/embeddedoutputs/outputhandlers/error/ErrorOutputHandlerProvider",family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.executiondatamanager",path:"MW/rtc/plugins/embeddedoutputs/ExecutionDataManagerProvider",family:"embeddedoutputs"},{id:"rtc.embeddedoutputs.view.onright",path:"MW/rtc/plugins/embeddedoutputs/view/onright/OnrightViewProvider",family:"embeddedoutputs",subsystem:"embeddedoutputsviews",requiredForSubsystem:!0},{id:"rtc.embeddedoutputs.view.inline",
path:"MW/rtc/plugins/embeddedoutputs/view/inline/InlineViewProvider",family:"embeddedoutputs",subsystem:"embeddedoutputsviews",requiredForSubsystem:!0},{id:"rtc.exportnotifier",path:"MW/rtc/plugins/export/ExportNotifierProvider"},{id:"rtc.folding.foldingactions",path:"MW/rtc/plugins/folding/FoldingActionsProvider",family:"folding"},{id:"rtc.folding.foldingcontroller",path:"MW/rtc/plugins/folding/FoldingControllerProvider"},{id:"rtc.folding.foldingmodel",path:"MW/rtc/plugins/folding/FoldingModelProvider"},
{id:"rtc.folding.margin",path:"MW/rtc/plugins/folding/view/FoldingMarginProvider",family:"folding",subsystem:"rtc.left.margin"},{id:"rtc.folding.margin.decorator",path:"MW/rtc/plugins/folding/view/FoldingDecoratorProvider"},{id:"rtc.folding.ellipses",path:"MW/rtc/plugins/folding/view/FoldingEllipsesManagerProvider",family:"folding"},{id:"rtc.document.executablecode.executablecodeservice",path:"MW/rtc/plugins/language/matlab/executablecode/ExecutableCodeServiceProvider",family:"embeddedoutputs"},{id:"rtc.document.executablecode.executablecodeconverter",
path:"MW/rtc/plugins/language/matlab/executablecode/executablecodeconverter/ExecutableCodeConverterProvider",family:"embeddedoutputs"},{id:"rtc.document.executablecode.executablecodeconverter.rootnodeconverter",path:"MW/rtc/plugins/language/matlab/executablecode/executablecodeconverter/RootNodeExecutableCodeConverterProvider",family:"embeddedoutputs",subsystem:"rtc.document.executablecode.executablecodeconverter.converter"},{id:"rtc.document.executablecode.executablecodeconverter.linenodeconverter",
path:"MW/rtc/plugins/language/matlab/executablecode/executablecodeconverter/LineNodeExecutableCodeConverterProvider",family:"embeddedoutputs",subsystem:"rtc.document.executablecode.executablecodeconverter.converter"},{id:"rtc.document.executablecode.executablecodeconverter.plaintextnodeconverter",path:"MW/rtc/plugins/language/matlab/executablecode/executablecodeconverter/PlainTextNodeExecutableCodeConverterProvider",family:"embeddedoutputs",subsystem:"rtc.document.executablecode.executablecodeconverter.converter"},
{id:"rtc.typocorrection",path:"MW/rtc/plugins/typocorrection/TypoSuggestionFeatureProvider",family:"typocorrection"},{id:"rtc.typocorrection.typocorrectionhandlerfactory",path:"MW/rtc/plugins/typocorrection/handler/TypoSuggestionHandlerFactoryProvider",family:"typocorrection"},{id:"rtc.eventhandler",path:"MW/rtc/plugins/events/EventHandlerProvider"},{id:"rtc.keyhandler",path:"MW/rtc/events/KeyHandlerProvider"},{id:"rtc.contextmenu",path:"MW/rtc/plugins/contextmenu/ContextMenuProvider",family:"contextmenu"},
{id:"rtc.contextmenu.generator",path:"MW/rtc/plugins/contextmenu/DojoContextMenuGeneratorProvider",family:"contextmenu"},{id:"rtc.contextmenu.model",path:"MW/rtc/plugins/contextmenu/DocumentContextMenuModelProvider",family:"contextmenu"},{id:"rtc.currentlinehighlight",path:"MW/rtc/plugins/currentlinehighlight/CurrentLineHighlightProvider",family:"currentlinehighlight"},{id:"rtc.currentlinehighlight.preference",path:"MW/rtc/plugins/currentlinehighlight/CurrentLineHighlightPreferenceProvider",family:"currentlinehighlight"},
{id:"rtc.code.sections.sectionbreak",path:"MW/rtc/plugins/sectionbreak/SectionBreakProvider",family:"rtc.sectionbreak"},{id:"rtc.code.sections.sectionbreak.nodeconversionrules",path:"MW/rtc/plugins/sectionbreak/SectionBreakNodeConversionRulesProvider",family:"rtc.sectionbreak",subsystem:"rtc.nodeconversionrule"},{id:"rtc.code.sections.sectionbreak.contentconverter",path:"MW/rtc/plugins/sectionbreak/model/SectionBreakNodeContentConverterProvider",family:"rtc.sectionbreak",subsystem:"rtc.nodes.contentconverter.converter"},
{id:"rtc.code.sections.sectionbreak.coordinateconverter",path:"MW/rtc/plugins/sectionbreak/view/SectionBreakCoordinateConverterProvider",family:"rtc.sectionbreak",subsystem:"rtc.view.coordinateconverter.converter"},{id:"rtc.code.sections.sectionbreak.insertionrules",path:"MW/rtc/plugins/sectionbreak/SectionBreakInsertionRulesProvider",family:"rtc.sectionbreak",subsystem:"rtc.insertionrule"},{id:"rtc.code.sections.sectionbreak.layouter",path:"MW/rtc/plugins/sectionbreak/view/SectionBreakLayouterProvider",
family:"rtc.sectionbreak",subsystem:"rtc.view.layoutmanager.layouter"},{id:"rtc.code.sections.contributor.sectionbreak",path:"MW/rtc/plugins/language/matlab/sections/SectionBreakSectionContributorProvider"},{id:"rtc.imeinput",path:"MW/rtc/plugins/imeinput/IMEInputProvider"},{id:"rtc.view.movehiddenkeycapture",path:"MW/rtc/plugins/view/movehiddenkeycapture/MoveHiddenKeyCaptureProvider"},{id:"rtc.editordataservice",path:"MW/rtc/plugins/editordataservice/EditorDataServiceProvider"},{id:"rtc.editordataservicemanager",
path:"MW/rtc/plugins/editordataservice/EditorDataServiceManagerProvider"},{id:"rtc.undoredo.editblock",family:"undoredo",path:"MW/rtc/plugins/undoredo/EditBlockControllerProvider"},{id:"rtc.undoredo.controller",family:"undoredo",path:"MW/rtc/plugins/undoredo/UndoRedoControllerProvider"},{id:"rtc.undoredo.action",family:"undoredo",path:"MW/rtc/plugins/undoredo/UndoRedoActionProvider"},{id:"rtc.undoredo.cursor",family:"undoredo",path:"MW/rtc/plugins/undoredo/UndoRedoCursorProvider"},{id:"rtc.view.coordinateconverter.converter.plaintext",
path:"MW/rtc/view/coordinateconverter/PlainTextCoordinateConverterProvider",subsystem:"rtc.view.coordinateconverter.converter",requiredForSubsystem:!0},{id:"rtc.view.coordinateconverter.converter.root",path:"MW/rtc/view/coordinateconverter/RootCoordinateConverterProvider",subsystem:"rtc.view.coordinateconverter.converter",requiredForSubsystem:!0},{id:"rtc.view.coordinateconverter",path:"MW/rtc/view/coordinateconverter/CoordinateConverterProvider"},{id:"rtc.view.rangeconverter.converter.plaintext",
path:"MW/rtc/view/rangeconverter/PlainTextRangeConverterProvider",subsystem:"rtc.view.rangeconverter.converter",requiredForSubsystem:!0},{id:"rtc.view.rangeconverter",path:"MW/rtc/view/rangeconverter/RangeConverterProvider"},{id:"rtc.plugins.cursorgripper",path:"MW/rtc/plugins/cursorgripper/CursorGripperProvider"},{id:"rtc.plugins.device.ios.virtualkeyboardshortcutbar",path:"MW/rtc/plugins/device/ios/VirtualKeyboardShortcutBarProvider"},{id:"rtc.executionservice",path:"MW/rtc/execution/ExecutionServiceProvider"},
{id:"rtc.breakpointlessevalservice",path:"MW/rtc/execution/BreakpointlessEvalServiceProvider"},{id:"rtc.embeddedoutputs.splitterpositionmodel",path:"MW/rtc/plugins/embeddedoutputs/model/SplitterPositionModelProvider",family:"embeddedoutputs"},{id:"rtc.execution.actions",path:"MW/rtc/plugins/execution/ExecutionActionsProvider"},{id:"rtc.execution.controlc",path:"MW/rtc/plugins/execution/ControlCServiceProvider"},{id:"matlab.services.busyidle",path:"MW/rtc/plugins/execution/BusyIdleServicesProvider"},
{id:"rtc.margin.execution",path:"MW/rtc/plugins/execution/margin/DecoratableExecutionMarginProvider",subsystem:"rtc.left.margin"},{id:"margin.execution.sectionsdecorator.utilities",path:"MW/rtc/plugins/statusactionbar/SectionDecoratorUtilitiesProvider"},{id:"rtc.service.documentloaded",path:"MW/rtc/plugins/debug/DocumentLoadedServiceProvider"},{id:"rtc.caseconverter",path:"MW/rtc/plugins/caseconverter/CaseConverterProvider"},{id:"rtc.statusbar",path:"MW/rtc/plugins/statusbar/StatusBarRequestHandlerProvider"},
{id:"rtc.dataservice.sections",path:"MW/rtc/plugins/sections/SectionsRequestHandlerProvider"},{id:"rtc.dataservice.functions",path:"MW/rtc/plugins/functions/FunctionsRequestHandlerProvider"},{id:"rtc.saveready.manager",path:"MW/rtc/plugins/save/SaveReadyManagerProvider"},{id:"rtc.margin.sectionexpander",path:"MW/rtc/plugins/statusactionbar/SectionRangeMarginExpansionHandlerProvider"},{id:"rtc.margin.sectionbreak",path:"MW/rtc/plugins/statusactionbar/decorators/SectionBreakLineMarginDecoratorProvider"},
{id:"rtc.margin.empty",path:"MW/rtc/plugins/margin/EmptyWithSectionBreaksMarginProvider",subsystem:"rtc.left.margin"},{id:"rtc.offscreennotification",path:"MW/rtc/plugins/offscreennotification/OffscreenNotificationProvider"},{id:"rtc.blockmatching",path:"MW/rtc/plugins/blockmatching/BlockMatchingPluginProvider"}]}})},"MW/rtc/clipboardservice/ClipboardProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/clipboardservice/ClipboardService","MW/rtc/core/provider/PluginProvider"],
function(g,f,e,d){return g(d,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:[]}},createInstance:function(){return e.getInternalClipboard()}})})},"MW/rtc/cursor/CursorActionsProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/cursor/CursorActions"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.actionservice","rtc.keyhandler","rtc.cursorcontroller"]}},
createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/cursor/CursorActions":function(){define(["dojo/_base/declare","dojo/_base/lang"],function(g,f){return g(null,{constructor:function(e,d,b){e.loadActions(this._getActions(b));d.addBindings(this._getAdditionalKeyBindings())},_getActions:function(e){return[{id:"rtc_move_left",enabled:!0,key:"left",callback:f.hitch(e,"movePosition",e.LEFT)},{id:"rtc_move_right",enabled:!0,key:"right",callback:f.hitch(e,"movePosition",e.RIGHT)},{id:"rtc_move_up",
enabled:!0,key:"up",callback:f.hitch(e,"movePosition",e.UP)},{id:"rtc_move_down",enabled:!0,key:"down",callback:f.hitch(e,"movePosition",e.DOWN)},{id:"rtc_move_word_left",enabled:!0,key:"ctrl_left",platformKey:{mac:"alt_left"},callback:f.hitch(e,"movePosition",e.WORD_LEFT)},{id:"rtc_move_word_right",enabled:!0,key:"ctrl_right",platformKey:{mac:"alt_right"},callback:f.hitch(e,"movePosition",e.WORD_RIGHT)},{id:"rtc_move_line_end",enabled:!0,key:"end",platformKey:{mac:"meta_right"},callback:f.hitch(e,
"movePosition",e.LINE_END)},{id:"rtc_move_line_start",enabled:!0,key:"home",platformKey:{mac:"meta_left"},callback:f.hitch(e,"movePosition",e.LINE_START)},{id:"rtc_move_start",enabled:!0,key:"ctrl_home",platformKey:{mac:"home"},callback:f.hitch(e,"movePosition",e.START)},{id:"rtc_move_end",enabled:!0,key:"ctrl_end",platformKey:{mac:"end"},callback:f.hitch(e,"movePosition",e.END)},{id:"rtc_select_left",enabled:!0,key:"shift_left",callback:f.hitch(e,"movePosition",e.LEFT,e.KEEP_ANCHOR)},{id:"rtc_select_right",
enabled:!0,key:"shift_right",callback:f.hitch(e,"movePosition",e.RIGHT,e.KEEP_ANCHOR)},{id:"rtc_select_up",enabled:!0,key:"shift_up",callback:f.hitch(e,"movePosition",e.UP,e.KEEP_ANCHOR)},{id:"rtc_select_down",enabled:!0,key:"shift_down",callback:f.hitch(e,"movePosition",e.DOWN,e.KEEP_ANCHOR)},{id:"rtc_select_word_left",enabled:!0,key:"ctrl_shift_left",platformKey:{mac:"alt_shift_left"},callback:f.hitch(e,"movePosition",e.WORD_LEFT,e.KEEP_ANCHOR)},{id:"rtc_select_word_right",enabled:!0,key:"ctrl_shift_right",
platformKey:{mac:"alt_shift_right"},callback:f.hitch(e,"movePosition",e.WORD_RIGHT,e.KEEP_ANCHOR)},{id:"rtc_select_line_start",enabled:!0,key:"shift_home",platformKey:{mac:"meta_shift_left"},callback:f.hitch(e,"movePosition",e.LINE_START,e.KEEP_ANCHOR)},{id:"rtc_select_line_end",enabled:!0,key:"shift_end",platformKey:{mac:"meta_shift_right"},callback:f.hitch(e,"movePosition",e.LINE_END,e.KEEP_ANCHOR)},{id:"rtc_select_start",enabled:!0,key:"ctrl_shift_home",platformKey:{mac:"alt_shift_home"},callback:f.hitch(e,
"movePosition",e.START,e.KEEP_ANCHOR)},{id:"rtc_select_end",enabled:!0,key:"ctrl_shift_end",platformKey:{mac:"alt_shift_end"},callback:f.hitch(e,"movePosition",e.END,e.KEEP_ANCHOR)},{id:"rtc_move_page_up",enabled:!0,key:"pageup",callback:f.hitch(e,"movePosition",e.PAGE_UP)},{id:"rtc_move_page_down",enabled:!0,key:"pagedown",callback:f.hitch(e,"movePosition",e.PAGE_DOWN)},{id:"rtc_select_page_up",enabled:!0,key:"shift_pageup",callback:f.hitch(e,"movePosition",e.PAGE_UP,e.KEEP_ANCHOR)},{id:"rtc_select_page_down",
enabled:!0,key:"shift_pagedown",callback:f.hitch(e,"movePosition",e.PAGE_DOWN,e.KEEP_ANCHOR)},{id:"rtc_select_all",key:"ctrl_a",platformKey:{mac:"meta_a"},enabled:!0,callback:f.hitch(e,"selectAll")},{id:"rtc_clear_selection",enabled:!0,key:"escape",callback:f.hitch(e,"clearSelection")}]},_getAdditionalKeyBindings:function(){return[{platformKey:{mac:"ctrl_b"},action:"rtc_move_left"},{platformKey:{mac:"ctrl_f"},action:"rtc_move_right"},{platformKey:{mac:"ctrl_p"},action:"rtc_move_up"},{platformKey:{mac:"ctrl_n"},
action:"rtc_move_down"},{platformKey:{mac:"ctrl_a"},action:"rtc_move_line_start"},{platformKey:{mac:"ctrl_e"},action:"rtc_move_line_end"},{platformKey:{mac:"meta_up"},action:"rtc_move_start"},{platformKey:{mac:"meta_down"},action:"rtc_move_end"},{platformKey:{mac:"meta_shift_up"},action:"rtc_select_start"},{platformKey:{mac:"shift_home"},action:"rtc_select_start"},{platformKey:{mac:"meta_shift_down"},action:"rtc_select_end"},{platformKey:{mac:"shift_end"},action:"rtc_select_end"}]}})})},"MW/rtc/cursor/CursorNavigatorProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/cursor/CursorNavigator"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.view","rtc.view.hidden.hiddennodemodel"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/cursor/CursorNavigator":function(){define("dojo/_base/declare MW/rtc/abstract/AbstractPlugin MW/rtc/model/CodeUtilities MW/rtc/model/DocumentUtilities MW/rtc/model/Position MW/rtc/model/PositionUtilities".split(" "),
function(g,f,e,d,b,a){return g(f,{constructor:function(a,b){this._view=a;this._hiddenNodeModel=b},moveLineStart:function(a,b){var d=a.getNode();if(!0!==b&&e.isCodeContainer(d)){var f=d.rootContainer(),g=f.getText().search(/\S|$/);if(0<g&&d.offsetInContainer()+a.getOffset()!==g)return f.getPositionFromOffset(g)}d=d.textContainer();return d.wrappable?(d=this._view.getCoordinateForPosition(a),this._view.getPositionFromCoordinate({x:0,y:d.y+d.height/2})):d.startPosition()},moveLineEnd:function(a){var b=
a.getNode().textContainer();return b.wrappable?(a=this._view.getCoordinateForPosition(a),b=this._view.getDomTargetPosition(),this._view.getPositionFromCoordinate({x:b.scrollWidth,y:a.y+a.height/2})):b.endPosition()},moveLeft:function(a){var d=a.getNode().movePositionLeft(a);if(!a.isAtEdge())return d;for(;d;){a=d.getNode();if(!this._hiddenNodeModel.isHidden(a))break;d=a.movePositionLeft(new b(a,0))}return d},moveRight:function(a){var d=a.getNode().movePositionRight(a);if(!a.isAtEdge())return d;for(;d;){a=
d.getNode();if(!this._hiddenNodeModel.isHidden(a))break;d=a.movePositionRight(new b(a,a.maxOffset()))}return d},moveUp:function(a,b){var d=this._view.getCoordinateForPosition(a).y-1;return this._findPosition(a,b,d,0)},moveDown:function(a,b){var d=this._view.getCoordinateForPosition(a),e=this._view.getDocumentDimension();return this._findPosition(a,b,d.y+d.height,e.height)},_findPosition:function(c,b,d,e){var f=d<=e?1:-1;for(d*=f;d<=e*f;d+=1){var g=this._view.getPositionFromCoordinate({x:b,y:Math.abs(d)});
if(g&&0!==a.comparePositions(g,c))return g}return null}})})},"MW/rtc/cursor/CursorProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/cursor/Cursor"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.internaldocument","rtc.view","rtc.fileendselectable","rtc.cursor.navigator"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/cursor/Cursor":function(){define("dojo/_base/declare dojo/_base/lang dojo/Deferred dojo/aspect dojo/mouse MW/rtc/abstract/AbstractPlugin MW/rtc/model/DocumentUtilities MW/rtc/model/Position MW/rtc/model/PositionUtilities MW/rtc/model/Range MW/rtc/model/RangeUtilities MW/rtc/model/Selection MW/rtc/model/SelectionUtilities mw-log/Log".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q){return g(a,{_MISSING_SELECTION_ERROR:"Expected a selection when using this API.",NONE:0,LEFT:1,RIGHT:2,UP:3,DOWN:4,START:5,END:6,LINE_START:7,LINE_START_POS1:8,LINE_END:9,WORD_LEFT:10,WORD_RIGHT:11,WORD_RIGHT_EXCL:12,PAGE_UP:13,PAGE_DOWN:14,KEEP_ANCHOR:15,KEYBOARD_SELECT:16,MOUSE_SELECT:20,MOUSE_DSELECT:21,MOUSE_TSELECT:22,DELETE:23,EVENT_OUTSIDE:24,DOUBLE_CLICK_TIME:400,constructor:function(a,c,b,e){this._internalDocument=a;this._view=c;this._cursorNavigator=
e;this.position=new h;this.anchor=new h;this._offsetInLine=null;this._pageYOffset={dir:this.NONE,offset:-1};this._preservedSelection={};this._fileEndSelected=b?!1:null;this._selectionAutoScrollTimer=this._currentAction=null;this._initialized=this._pendingChangeEvent=this._suspendChangeEvent=this._scrollLater=!1;this.own(d.after(this._internalDocument,"onDocumentReset",f.hitch(this,"_reInitializeCursor")))},initialize:function(){this._initialized||this._reInitializeCursor()},_reInitializeCursor:function(){this.movePosition(this.START);
this.position.setLive(!0);this._positionChangeListener||(this._positionChangeListener=d.after(this.position,"onChange",f.hitch(this,"_onPositionChange")),this.own(this._positionChangeListener));this._clearCurrentAction();this._initialized=!0},onChange:function(){},onUpdate:function(a,c){if(!a){if(this.isHidden()){this._scrollLater=!0;return}this._scrollLater=!1}if(this.position.isValid()&&!1!==c&&(this._positionHasChanged||this._selectionHasChanged||c)){if(this._suspendChangeEvent)this._pendingChangeEvent=
!0;else this.onChange();this._selectionHasChanged=this._positionHasChanged=!1}},suspendChangeEvent:function(){this._suspendChangeEvent=!0},activateChangeEvent:function(a){this._suspendChangeEvent=!1;if(this._pendingChangeEvent&&!a)this.onChange();this._pendingChangeEvent=!1},_onPositionChange:function(){this._positionHasChanged=!0},hide:function(){this._clearCurrentAction();this._hidden=!0;this.onUpdate(!0)},show:function(a,c){a=a||!this._scrollLater;this._hidden&&(this._hidden=!1,this._clearCurrentAction(),
this.onUpdate(a,c))},adjustSelection:function(a,c){if(!a.isLocal&&(!0===c||a.startNode.textContainer()===a.endNode.textContainer())){var b;if(0<a.startPos&&a.startPos===a.startNode.maxOffset()&&(b=c||a.startNode.parent.containsTextNodes()?a.startNode.nextNode():a.startNode.nextSibling()))if(b.containsTextNodes()&&(b=b.startNode()),0<a.endPos||b!==a.endNode)a.startNode=b,a.startPos=0;if(0===a.endPos&&!this._fileEndSelected&&(b=c||a.endNode.parent.containsTextNodes()?a.endNode.prevNode():a.endNode.previousSibling()))b.containsTextNodes()&&
(b=b.endNode()),a.endNode=b,a.endPos=b.maxOffset();a.isLocal=a.startNode===a.endNode}a.startPosition=new h(a.startNode,a.startPos);a.endPosition=new h(a.endNode,a.endPos);return a},collapseSelection:function(){this.hasSelection()&&(this.releaseAnchor(),this.onUpdate(!0))},fixAnchor:function(a){if(!0===a||!this.anchor.getNode())this.anchor.setPosition(this.getNode(),this.getOffset()),this.anchor.setLive(!0)},hideSelection:function(){this._hideSelection=!0;this.onUpdate()},internalCollapseSelection:function(a){if(this.hasSelection()){var c=
!this.isReversed();(c&&a===this.LEFT||!c&&a===this.RIGHT)&&this._setPosition(this.anchor)}this.releaseAnchor()},onDoubleClick:function(){this.selectWordUnderCursor()},onTripleClick:function(){this.selectLine(-1,!0)},releaseAnchor:function(){if(this.anchor.node){this.anchor.setLive(!1);var a=this.anchor.node!==this.position.node||this.anchor.offset!==this.position.offset;this._selectionHasChanged=this._selectionHasChanged||a}this.anchor.node=null;this.anchor.offset=0;null!==this._fileEndSelected&&
(this._fileEndSelected&&(this._selectionHasChanged=!0),this._fileEndSelected=!1)},selectAll:function(){var a=this._internalDocument.startNode(),c=this._internalDocument.endNode();if(a&&c){if(null===this._fileEndSelected&&a===c&&a.isEmpty())return!1;this.hasSelection()&&this.internalCollapseSelection(!1);this.setPosition(a,0);this.fixAnchor();null!==this._fileEndSelected&&(this._fileEndSelected||(this._selectionHasChanged=!0),this._fileEndSelected=!0);this.setPosition(c,c.maxOffset(),!0);return!0}return!1},
selectLine:function(a,c){this.suspendChangeEvent();0<a&&this.setLineColumn(a,1);this.movePosition(this.LINE_START_POS1);c?(this._offsetInLine=0,this.movePosition(this.DOWN,this.KEEP_ANCHOR)):this.movePosition(this.LINE_END,this.KEEP_ANCHOR);this.activateChangeEvent()},selectWordUnderCursor:function(){this.suspendChangeEvent();var a=this.getOffset(),b=this.getNode().getText();null!==this._fileEndSelected&&0===a&&c.isAtEndOfFile(this.position)?(this._fileEndSelected||(this._selectionHasChanged=!0),
this._fileEndSelected=!0):(0!==b.trim().length||!this.getNode().isTextNode())&&this._selectWordUnderCursor();this.activateChangeEvent()},setSelection:function(a){var c=a.getStartPosition(),b=a.getEndPosition();if(a.isReversed())var d=c,c=b,b=d;this.setPosition(c.getNode(),c.getOffset(),!1);this.fixAnchor(!0);this._setFileEndSelected(a.fileEndSelected());this.setPosition(b.getNode(),b.getOffset(),!1)},setSelectionFromCoordinates:function(a){var c=this._view.getLineColumnFromCoordinate(a.startCoords);
a=this._view.getLineColumnFromCoordinate(a.endCoords);this.setSelectionLineColumn(c.line,c.column,a.line,a.column)},setSelectionInfo:function(a){this._setSelection({startNode:a.startNode,startOffset:{posInNode:a.startPos},endNode:a.endNode,endOffset:{posInNode:a.endPos},fileEndSelected:a.fileEndSelected})},setSelectionLineColumn:function(a,b,d,h){c.checkLineColumnExists(this._internalDocument,a,b);c.checkLineColumnExists(this._internalDocument,d,h);this._setSelection({startNode:this._internalDocument.root,
startOffset:{line:a-1,column:b-1},endNode:this._internalDocument.root,endOffset:{line:d-1,column:h-1}})},showSelection:function(){this._hideSelection=!1;this.onUpdate()},_isAtNextWord:function(){var a=this.getOffset(),c=this.getNode().getText(),b=0===a,d=this.getNode().previousSibling(),h=this.getNode().isOpaqueNode(),e=this.getNode().textContainer(),f=e.getText(),a=0===c.length?0:a,a=this.getNode().offsetInContainer(e)+a,e=f.substring(a-1,a).match(/\s/),f=f.substring(a,a+1).match(/\S/);return b&&
(!d||h)||!b&&e&&f},_releaseAnchorIfNoSelection:function(){this.hasAnchor()&&this.position.isEqualTo(this.anchor)&&!this._fileEndSelected&&this.releaseAnchor()},_selectWordUnderCursor:function(){this._isAtNextWord()&&this.movePosition(this.WORD_RIGHT);this.movePosition(this.WORD_LEFT);this.movePosition(this.WORD_RIGHT_EXCL,this.KEEP_ANCHOR)},_setAnchor:function(a){q.assert(a.getNode&&a.isLive,"Cursor._setAnchor called without Position!");this.anchor.setPosition(a.getNode(),a.getOffset())},_setFileEndSelected:function(a){null!==
this._fileEndSelected&&(this._selectionHasChanged=this._selectionHasChanged||this._fileEndSelected!==a,this._fileEndSelected=a)},_setSelection:function(a){this.setPosition(a.startNode,a.startOffset,!1);this.fixAnchor(!0);a.hasOwnProperty("fileEndSelected")&&this._setFileEndSelected(a.fileEndSelected);this.setPosition(a.endNode,a.endOffset,!1)},_updateGroupedSelectionBasedOnCurrentPosition:function(a,b){var d,h,e=a.start,f=a.end,k=!1;d=c.nodesInOrder(this.getNode(),a.start.getNode());h=0<d||0===d&&
this.getOffset()<a.start.getOffset();d=c.nodesInOrder(a.end.getNode(),this.getNode());d=0<d||0===d&&this.getOffset()>a.end.getOffset();h?(b?this.movePosition(this.WORD_LEFT,!0):this.movePosition(this.LINE_START_POS1,!0),k=!0,e=this.position):d&&(b?this.movePosition(this.WORD_RIGHT_EXCL,!0):(this.movePosition(this.LINE_END,!0),this.movePosition(this.RIGHT,!0)),f=this.position);this._setAnchor(k?f:e);this._setPosition(k?e:f)},_updateFileEndSelection:function(a){if(null!==this._fileEndSelected){var b=
!1;c.isAtEndOfFile(this.position)&&(b=this.getNode().getBottom()-this._view.getScrollTop(),b=a>b);this._selectionHasChanged=this._selectionHasChanged||this._fileEndSelected!==b;this._fileEndSelected=b}},autoScroll:function(a,c){this._offsetInLine=this._view.getCoordinateForPosition(this.position).x;0>a.y?this.movePosition(this.UP,c):0<a.y&&this.movePosition(this.DOWN,c)},movePosition:function(a,b,d){var h=!1,e;if(d&&1<d){for(e=1;e<=d;e+=1)h=this.movePosition(a,b)||h;return h}if(0===d)return h;d=!1;
b===this.KEEP_ANCHOR||!0===b?this.fixAnchor():this.hasAnchor()&&(this.internalCollapseSelection(a),h=d=!0);e=null;var f=!1,k=!1;switch(a){case this.START:e=this._internalDocument.startNode().startPosition();break;case this.END:e=this._internalDocument.endNode().endPosition();break;case this.PAGE_UP:e=this._movePage(a,b);k=!0;break;case this.PAGE_DOWN:e=this._movePage(a,b);k=!0;break;default:f=!0}if((a===this.UP||a===this.DOWN)&&null===this._offsetInLine)this._offsetInLine=this._view.getCoordinateForPosition(this.position).x;
if(f)switch(a){case this.LEFT:d||(e=this.hasAnchor()&&c.isAtEndOfFile(this.position)&&this._fileEndSelected?this.position:this._cursorNavigator.moveLeft(this.position));break;case this.RIGHT:d||(e=this._cursorNavigator.moveRight(this.position));break;case this.UP:e=this._cursorNavigator.moveUp(this.position,this._offsetInLine);break;case this.DOWN:e=this._cursorNavigator.moveDown(this.position,this._offsetInLine);break;case this.LINE_START:e=this._cursorNavigator.moveLineStart(this.position);break;
case this.LINE_START_POS1:e=this._cursorNavigator.moveLineStart(this.position,!0);break;case this.LINE_END:e=this._cursorNavigator.moveLineEnd(this.position);break;case this.WORD_LEFT:h=this._moveWord(-1,b);break;case this.WORD_RIGHT:h=this._moveWord(1,b);break;case this.WORD_RIGHT_EXCL:h=this._moveWord(1,b,!0)}e?(this._setFileEndSelected(!1),this._setPosition(e),h=!0):null!==this._fileEndSelected&&this.hasAnchor()&&c.isAtEndOfFile(this.position)?((a===this.RIGHT||a===this.DOWN)&&this._setFileEndSelected(!0),
h=!0):a===this.DOWN&&b===this.KEEP_ANCHOR&&(e=this._cursorNavigator.moveLineEnd(this.position),this._setFileEndSelected(!0),this._setPosition(e),this._offsetInLine=null,h=!0);null===this._selectionAutoScrollTimer&&(this.position.isEqualTo(this.anchor)&&!this._fileEndSelected)&&this.releaseAnchor();if(!0===h)this.onUpdate(k);if(a!==this._pageYOffset.dir||a!==this.PAGE_UP&&a!==this.PAGE_DOWN)this._pageYOffset.dir=this.NONE,this._pageYOffset.offset=-1,a!==this.UP&&a!==this.DOWN&&(this._offsetInLine=
null);return h},setCursorToCoordinates:function(a,c){var b=this._view.getPositionFromCoordinate(a);this._setPosition(b);this.onUpdate(!c)},setCursorToEvent:function(a){a=this._view.fixEvent(a);if(a=this._view.getPositionFromEvent(a))a=a.getLineColumn(),this.setLineColumn(a.line,a.column)},setCursorToRange:function(a,c){var b=a.getStartPosition().getLineColumn();if(a.getStartPosition().isEqualTo(a.getEndPosition()))this.setLineColumn(b.line,b.column,c);else{var d=a.getEndPosition().getLineColumn();
this.setSelectionLineColumn(b.line,b.column,d.line,d.column)}},setLineColumn:function(a,b,d){c.checkLineColumnExists(this._internalDocument,a,b);this.setPosition(this._internalDocument.root,{line:a-1,column:b-1,anchor:{}},d)},setPosition:function(a,c,b){if(1===arguments.length)if(a&&a.isTextNode)c={posInNode:0};else if(a&&"object"===typeof a)a.getNode&&a.getOffset?(c=a.getOffset(),a=a.getNode()):(c=a,a=this._internalDocument.root);else return!1;"number"===typeof c&&(c={posInNode:c});var d=this._suspendChangeEvent;
this._suspendChangeEvent=!0;var h=null;if(c.hasOwnProperty("line")||c.hasOwnProperty("column")){h=null;if(c.anchor){var e=c.anchor;this.releaseAnchor();e.hasOwnProperty("line")&&e.hasOwnProperty("column")?this.setPosition(e.node,{line:e.line,column:e.column})&&this.fixAnchor(!0):e.node&&this.setPosition(e.node,{posInNode:e.posInNode||0})&&this.fixAnchor(!0)}c.hasOwnProperty("line")?h=this._internalDocument.getLineNode(c.line,a):a&&(h=a.rootContainer());if(!h)return this._suspendChangeEvent=d,!1;e=
0;c.hasOwnProperty("column")&&(e=c.column);h=h.getPositionFromOffset(e)}else{if(!a)return this._suspendChangeEvent=d,!1;h=a.getPositionFromOffset(c.posInNode)}h&&this._setPosition(h);null!==this._fileEndSelected&&(c.fileEndSelected&&c.anchor)&&(this._fileEndSelected||(this._selectionHasChanged=!0),this._fileEndSelected=!0);this._suspendChangeEvent=d;this._offsetInLine=null;this.onUpdate(!b);return!0},_moveWord:function(a,b,d){var h=this.getNode(),e=this.getOffset();return a===this.WORD_LEFT&&0===
e&&!h.previousSibling()?this.movePosition(this.LEFT,b):a===this.WORD_RIGHT&&e>=h.maxOffset()&&!h.nextSibling()?this.movePosition(this.RIGHT,b):(d=c.getWordBoundary(a,h,e,d))?this.setPosition(d.node,d):this.movePosition(0<a?this.RIGHT:this.LEFT,b)},_movePage:function(a){this.isInVisualBounds(0,100)||this._view.scrollPositionIntoView(this.position);var c=this._view.getCoordinateForPosition(this.position),b=this._view.getDomTargetPosition(),d=b.scrollHeight,b=(a===this.PAGE_UP?-1:1)*b.clientHeight;null===
this._offsetInLine&&(this._offsetInLine=c.x);this._pageYOffset.dir=a;0>this._pageYOffset.offset&&(this._pageYOffset.offset=c.y);this._pageYOffset.offset+=b;this._pageYOffset.offset=Math.min(Math.max(0,this._pageYOffset.offset),d);a=this._view.getPositionFromCoordinate({x:this._offsetInLine,y:this._pageYOffset.offset});c=this._view.getCoordinateForPosition(a).y-c.y;this._view.offsetScrollTop(c);return a},_setNode:function(a){this.position.getNode()&&this.position.setLive(!1);this.position.node=a;this.position.setLive(!0)},
_setPosition:function(a){q.assert(a.getNode&&a.isLive,"Cursor._setPosition called without Position!");if(this.position.getNode()!==a.getNode()||this.position.getOffset()!==a.getOffset()||this.position.isRightAligned()!==a.isRightAligned())this._positionHasChanged=!0;this._setNode(a.getNode());this.position.offset=a.getOffset();this.position.setRightAligned(a.isRightAligned())},_startAutoScroll:function(a,c){var b=this;this._selectionAutoScrollTimer=setInterval(function(){b.autoScroll(a,c)},20)},_stopAutoScroll:function(){this._selectionAutoScrollTimer&&
(clearTimeout(this._selectionAutoScrollTimer),this._selectionAutoScrollTimer=null)},charAtCursor:function(a){if(!this.getNode())return null;var c="";if(this.hasSelection())return this.anchor.getNode()===this.getNode()&&(c=this.selectedText()),1===c.length?c:"";c=this.getNode().getTextForPositioning();a=-1===a?-1:0;var b=this.getOffset();if(-1===a&&0<b||b<c.length)return c.substring(b+a,b+a+1);if(c=-1===a?this.getNode().previousSibling():this.getNode().nextSibling())if(c=c.getTextForPositioning())return-1===
a?c.substring(c.length-1):c.substring(0,1);return null},expandCursorPos:function(a){var c=a.line,b=a.column;a.anchor&&("number"===typeof a.anchor.line&&(c=a.anchor.line),"number"===typeof a.anchor.column&&(b=a.anchor.column));a.isReversed=!1;c&&c>a.line&&(isReversed=!0);!a.isReversed&&c===a.line&&(a.isReversed=b>a.column);a.isNull=c===a.line&&b===a.column;a.isReversed?(a.startLine=a.line,a.startColumn=a.column,a.endLine=c,a.endColumn=b):(a.startLine=c,a.startColumn=b,a.endLine=a.line,a.endColumn=
a.column);return a},getCursorAsLiveRange:function(){var a,c;this.hasSelection()?(a=new h(this.anchor.getNode(),this.anchor.getOffset(),!0),c=new h(this.position.getNode(),this.position.getOffset(),!0)):c=a=new h(this.position.getNode(),this.position.getOffset(),!0);a.setLive();c.setLive();return new l(a,c)},getCursorCoordinates:function(){return this._view.getCoordinateForPosition(this.position)},getCoordinatesOfSelection:function(){var a=this.getSelectionLineColumn(),c=a.start,a=a.end,c=this._view.getCoordinateForLineColumn(c.line,
c.column),a=this._view.getCoordinateForLineColumn(a.line,a.column);return{startCoords:c,endCoords:a}},getLineColumn:function(){var a=this.getPosition();return{line:a.line+1,column:a.column+1}},getNode:function(){return this.position.getNode()},getOffset:function(){return this.position.getOffset()},getCursorPosition:function(){return this.position},getPosition:function(){var a=this.getNode();if(!a)return null;var c=a.rootContainer();q.assert(c,"Cursor.getPosition() called on node without container!");
var b={};b.line=this._internalDocument.getLineNumber(c);b.posInNode=this.getOffset();b.column=a.offsetInContainer()+b.posInNode;a={};if(this.hasSelection()&&(c=this.anchor.getNode().rootContainer()))a.posInNode=this.anchor.getOffset(),a.line=this._internalDocument.getLineNumber(c),a.column=this.anchor.getNode().offsetInContainer()+a.posInNode;b.anchor=a;null!==this._fileEndSelected&&(b.fileEndSelected=this._fileEndSelected);return b},getSelection:function(){if(!this.hasSelection())return null;var a,
c;this.anchor.getNode()?(a=this.anchor.getNode(),c=this.anchor.getOffset()):(a=this.getNode(),c=this.getOffset());var b=this.getNode(),d=this.getOffset(),e=this.isReversed(),f=!!this._fileEndSelected;a=new h(a,c);b=new h(b,d);e&&(d=a,a=b,b=d);e=new p(a,b,e,f);return n.trimSelection(e)},getSelectionLineColumn:function(){c.assert(this.hasSelection(),this._MISSING_SELECTION_ERROR);var a=this.getPosition().anchor,b=this.getPosition();return{start:{line:a.line+1,column:a.column+1},end:{line:b.line+1,column:b.column+
1}}},getSelectionStartContainer:function(){return this.getSelectionStartNode().rootContainer()},getSelectionStartNode:function(){return this.hasSelection()&&!this.isReversed()?this.anchor.getNode():this.getNode()},getSelectionEndContainer:function(){return this.getSelectionEndNode().rootContainer()},getSelectionEndNode:function(){return this.hasSelection()&&this.isReversed()?this.anchor.getNode():this.getNode()},hasAnchor:function(){return this.anchor.isValid()},hasSelection:function(){return this._fileEndSelected?
!0:this.anchor.isValid()?this.anchor.getNode()!==this.getNode()||this.anchor.getOffset()!==this.getOffset():!1},isHidden:function(){return this._hidden},isSelectionHidden:function(){return this._hideSelection},isCursorReadOnly:function(){if(this.hasSelection()){var a=n.trimTrailingLineBreak(this.getSelection());return m.isRangeReadOnly(a)}return(a=this.position.getNode())&&a.isReadOnly()},isEventInSelection:function(a){return this._isEventInSelectionRange(a)},isInRange:function(a,c){if(!this.hasSelection())return!0;
var b=this.getPosition().anchor.line,d=this.getPosition().anchor.column,d=d>=a.column&&d<=c.column;return b>=a.line&&b<=c.line&&d?!0:!1},isInNodeRange:function(a,c){var b=this._internalDocument.getLineNumber(a),d=this._internalDocument.getLineNumber(c),h=c.maxOffset();return this.isInRange({line:b,column:0},{line:d,column:h})},isInVisualBounds:function(a,b){c.assert(a<b,"top must be less than bottom");var d=this.getLineColumn().line;if(!this._view.isLineInView(d))return!1;d=this._view.getLinePercentScrolled(d);
return d>=a&&d<=b},isPositionInSelectionRange:function(a){var c=this.getSelection(),c=c||new l(this.position,this.position);return k.isPositionInRange(a,c)},isFileEndSelected:function(){return this._fileEndSelected},isReversed:function(){return!this.hasSelection()?!1:this.getNode()===this.anchor.getNode()?this.getOffset()<this.anchor.getOffset():0>c.nodesInOrder(this.anchor.getNode(),this.getNode())},selectedText:function(){if(!this.hasSelection())return"";var a=this.anchor.getNode(),c=this.anchor.getOffset(),
b=this.getNode(),d=this.getOffset();this.isReversed()&&(b=a,d=c,a=this.getNode(),c=this.getOffset());return this._internalDocument.getTextInRange(a,c,b,d)},selectionInfo:function(a){q.assert(void 0===a,"The autoAdjustSelection parameter has been removed from Cursor.selectionInfo().");if(this.hasSelection())return a=this.getSelection(),{startNode:a.getStartPosition().getNode(),startPos:a.getStartPosition().getOffset(),endNode:a.getEndPosition().getNode(),endPos:a.getEndPosition().getOffset(),isReversed:a.isReversed(),
isLocal:m.rangeIsInsideOneNode(a),isInTextContainer:m.rangeIsInsideOneTextContainer(a),isInRootContainer:m.rangeIsInsideOneRootContainer(a),fileEndSelected:a.fileEndSelected(),isNull:!1,startPosition:a.getStartPosition(),endPosition:a.getEndPosition()};a={};var b;a.endNode=this.getNode();a.endPos=this.getOffset();if(0===a.endPos&&(b=a.endNode.previousSibling())&&!c.isTextLevelContainer(b))a.endNode=b,a.endPos=b.maxOffset();a.startNode=a.endNode;a.startPos=a.endPos;a.isNull=!0;a.isLocal=!0;a.isInTextContainer=
!0;a.isInRootContainer=!0;a.isReversed=!1;null!==this._fileEndSelected&&(a.fileEndSelected=this._fileEndSelected);a.fileEndSelected&&(a.isLocal=!1);a.startPosition=new h(a.startNode,a.startPos);a.endPosition=new h(a.endNode,a.endPos);return a},selectionInfo2cursorPos:function(a){var c={},b=!a.isNull&&!a.isReversed?a.endNode:a.startNode,d=!a.isNull&&!a.isReversed?a.endPos:a.startPos;c.line=this._internalDocument.getLineNumber(b.rootContainer());c.column=b.offsetInContainer()+d;c.posInNode=d;c.anchor=
{};a.isNull||(b=a.isReversed?a.endNode:a.startNode,d=a.isReversed?a.endPos:a.startPos,c.anchor.line=a.isLocal?c.line:this._internalDocument.getLineNumber(b.rootContainer()),c.anchor.column=b.offsetInContainer()+d,c.anchor.posInNode=d);null!==this._fileEndSelected&&(c.fileEndSelected=a.fileEndSelected);return c},cursorPos2selectionInfo:function(a){var b={isLocal:!1,isNull:!1,isReversed:!1};null!==this._fileEndSelected&&(b.fileEndSelected=a.fileEndSelected);var d=this._internalDocument.getLineNode(a.line),
d=d.getPositionFromOffset(a.column);b.endNode=d.getNode();b.endPos=d.getOffset();a.anchor&&a.anchor.hasOwnProperty("line")&&a.anchor.hasOwnProperty("column")?(d=this._internalDocument.getLineNode(a.anchor.line),d=d.getPositionFromOffset(a.anchor.column),b.startNode=d.getNode(),b.startPos=d.getOffset()):(b.startNode=d.getNode(),b.startPos=a.column,b.isLocal=!0,b.isNull=!0);a=c.nodesInOrder(b.startNode,b.endNode);0>a?(a=b.startNode,b.startNode=b.endNode,b.endNode=a,d=b.startPos,b.startPos=b.endPos,
b.endPos=d,b.isReversed=!0):0===a&&(b.isLocal=!0,b.startPos===b.endPos&&(b.isNull=!0),b.startPos>b.endPos&&(d=b.startPos,b.startPos=b.endPos,b.endPos=d,b.isReversed=!0));b.startPosition=new h(b.startNode,b.startPos);b.endPosition=new h(b.endNode,b.endPos);return b},_isEventInSelectionRange:function(a){if(!this.hasSelection())return!1;a=this._view.fixEvent(a);if(this._view.isFixedEventOutside(a))return!1;a=this._view.getPositionFromEvent(a);return!a?!1:this.isPositionInSelectionRange(a)},_snapshotSelection:function(){return{start:new h(this.anchor.getNode(),
this.anchor.getOffset()),end:new h(this.getNode(),this.getOffset())}},externalMouseDown:function(){this._clearCurrentAction()},resetAction:function(){this._clearCurrentAction()},startDragAction:function(){var a=this,c=this._startNewAction();f.mixin(c,{onUp:function(b){if(!c.isFulfilled()&&(a.hasAnchor()||a._fileEndSelected)&&b&&a.isPositionInSelectionRange(b))a.releaseAnchor(),a._setPosition(b),a.onUpdate()}});return c},startGroupedSelectionAction:function(a,c,b,d){var h=this,e=this._startNewAction();
f.mixin(e,{_preservedSelection:null,onMove:function(a,c,b){e.isFulfilled()||(h._modifyPositionBasedOnMoveEvent(a,c,b),h._updateGroupedSelectionBasedOnCurrentPosition(e._preservedSelection,d),h.onUpdate())}});e.promise.always(f.hitch(this,function(){this._releaseAnchorIfNoSelection();this._stopAutoScroll();this.onUpdate()}));h._modifyPositionBasedOnDownEvent(a,c,b);if(d)h.onDoubleClick();else h.onTripleClick();e._preservedSelection=h._snapshotSelection();return e},startSecondarySelectionAction:function(a,
c,b){var d=this._startNewAction();this._modifyPositionBasedOnSecondaryDownEvent(a,c,b);this.onUpdate();return d},startSelectionAction:function(a,c,b){var d=this,h=this._startNewAction();f.mixin(h,{onMove:function(a,c,b){h.isFulfilled()||(d._modifyPositionBasedOnMoveEvent(a,c,b),d.onUpdate())}});h.promise.always(f.hitch(this,function(){this._releaseAnchorIfNoSelection();this._stopAutoScroll()}));d._modifyPositionBasedOnDownEvent(a,c,b);d.onUpdate();return h},_clearCurrentAction:function(){this._currentAction&&
!this._currentAction.isFulfilled()&&this._currentAction.cancel()},_modifyPositionBasedOnDownEvent:function(a,c,b){var d=(this.hasAnchor()||this._fileEndSelected)&&!c;a?(!this.hasAnchor()&&c&&this.fixAnchor(),this._setPosition(a),d&&this.releaseAnchor(),this.hasAnchor()||this.fixAnchor(),this._offsetInLine=null,this._pageYOffset.dir=this.NONE,this._pageYOffset.offset=-1,c&&this._updateFileEndSelection(b)):d&&this.releaseAnchor()},_modifyPositionBasedOnMoveEvent:function(a,c,b){a&&(this._stopAutoScroll(),
this.hasAnchor()&&(c&&this._startAutoScroll(c,!0),this._setPosition(a),this._updateFileEndSelection(b)))},_modifyPositionBasedOnSecondaryDownEvent:function(a,c,b){if(a){var d=(this.hasAnchor()||this._fileEndSelected)&&!c;!this.hasAnchor()&&c&&this.fixAnchor();this.isPositionInSelectionRange(a)||(this._setPosition(a),d&&this.releaseAnchor());c&&this._updateFileEndSelection(b);this.onUpdate()}},_setCurrentAction:function(a){this._clearCurrentAction();this._currentAction=a;this._currentAction.promise.always(f.hitch(this,
function(){this._currentAction=null}))},_startNewAction:function(){var a=new e;this._setCurrentAction(a);return a}})})},"MW/rtc/model/SelectionUtilities":function(){define(["MW/rtc/model/DocumentUtilities","./RangeUtilities","./Selection"],function(g,f,e){return{trimSelection:function(d){var b=f.trimRange(d),a=d.fileEndSelected()?d.getEndPosition():b.getEndPosition();return new e(b.getStartPosition(),a,d.isReversed(),d.fileEndSelected())},trimSelectionForMultipleContainer:function(d){var b=f.trimRangeForNodes(d),
a=d.fileEndSelected()?d.getEndPosition():b.getEndPosition();return new e(b.getStartPosition(),a,d.isReversed(),d.fileEndSelected())},trimTrailingLineBreak:function(d){var b=f.trimTrailingLineBreak(d);b.isEqualTo(d)||(b=new e(b.getStartPosition(),b.getEndPosition(),d.isReversed,!1));return b},isInSelection:function(d,b){if(!b)return!1;for(var a=b.getEndPosition().getNode().rootContainer();a;){if(a instanceof d)return a;if(a===b.getStartPosition().getNode().rootContainer())return!1;a=a.prevNode().rootContainer()}},
isInFullSelection:function(d,b,a){if(!d.getSelection())return!1;d=d.selectionInfo();var c=b.getLineNumber(a)+1,h=b.getLineNumber(d.startNode.rootContainer())+1;b=b.getLineNumber(d.endNode.rootContainer())+1;return c<b&&c>h?!0:c===b&&c>h&&g.isAtEndOfContainer(d.endPosition,a)?!0:c<b&&c===h&&g.isAtStartOfContainer(d.startPosition,a)?!0:g.isAtEndOfContainer(d.endPosition,a)&&g.isAtStartOfContainer(d.startPosition,a)?!0:!1},checkFullSelection:function(d,b,a){var c=d.selectionInfo();g.isAtEndOfContainer(c.endPosition,
b)&&g.isAtStartOfContainer(c.startPosition,b)&&this.setContainerSelection(d,a,b)},updateSelectionForContainer:function(d,b,a,c){c=d.selectionInfo();d=d.adjustSelection(d.selectionInfo(),!0);g.isAtStartOfContainer(c.startPosition,b)&&g.isAtEndOfContainer(d.endPosition,b)&&a.updateContainerFullSelection()},updateSelectionForParagraph:function(d,b,a,c){d=d.selectionInfo();g.isAtStartOfContainer(d.startPosition,b)&&g.isAtStartOfContainer(d.endPosition,b.nextSibling())&&a.updateContainerFullSelection()},
setContainerSelection:function(d,b,a){b=b.getLineNumber(a)+1;d.selectionInfo();d.suspendChangeEvent();d.collapseSelection();g.isAtEndOfContainer(d.position,a)?d.setSelectionLineColumn(b,1,b+1,1):d.setSelectionLineColumn(b+1,1,b,1);d.activateChangeEvent()}}})},"MW/rtc/cursor/CursorViewProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/cursor/CursorView"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],
createInstance:["rtc.cursor","rtc.view","rtc.cursorcontroller"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/cursor/CursorView":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin","MW/rtc/view/ViewEventUtilities"],function(g,f,e,d,b){return g(d,{constructor:function(a,c,b){this._cursor=a;this._view=c;this._cursorController=b;this.own(e.before(a,"onUpdate",f.hitch(this,"_handleCursorUpdate"),!0));this.own(e.after(a,"onChange",
f.hitch(this,"_handleCursorChange")));this.own(e.after(c,"onViewUpdated",f.hitch(this,"_handleViewUpdated"),!0));this.own(e.after(b,"onUpdate",f.hitch(this,"_handleCursorUpdate",!0)));this._changeScheduled=this._updateScheduled=this._scrollScheduled=!1},_handleCursorUpdate:function(a){var c=this._view.isLayoutPending();if(!a)if(c)this._scrollScheduled=!0;else this.onScrollCursorIntoView();if(c)this._updateScheduled=!0;else this.onUpdate()},_handleCursorChange:function(){if(this._view.isLayoutPending())this._changeScheduled=
!0;else this.onChange()},_handleViewUpdated:function(a){if(this._cursor.position.isValid()){this._scrollScheduled&&(this._scrollScheduled=!1,this.onScrollCursorIntoView());if(this._updateScheduled||this._needsUpdateFromViewEvents(a))this._updateScheduled=!1,this.onUpdate();this._changeScheduled&&(this._changeScheduled=!1,this.onChange())}},_needsUpdateFromViewEvents:function(a){return b.hasSizingEvent(a)||b.hasLayoutEvent(a)||b.hasRenderEvent(a)},onScrollCursorIntoView:function(){},onUpdate:function(){},
onChange:function(){}})})},"MW/rtc/view/ViewEventUtilities":function(){define(["MW/rtc/model/DocumentConstants","MW/rtc/model/DocumentEventUtilities"],function(g,f){return{EVENTS:{scrollTop:1,scrollLeft:2,scrollHeight:3,scrollWidth:4,clientHeight:5,clientWidth:6,offsetHeight:7,offsetWidth:8,layoutChange:9,renderUpdate:10},SOURCES:{documentChange:1},_DOCUMENT_EVENTS_TO_PATCH:[g.FORMAT_CHANGE_EVENT],createEvent:function(e,d){return{type:e,source:d}},hasScrollEvent:function(e){this._assertValidEvents(e);
return e.some(function(d){return d.type===this.EVENTS.scrollTop||d.type===this.EVENTS.scrollLeft},this)},hasVerticalScrollEvent:function(e){this._assertValidEvents(e);return e.some(function(d){return d.type===this.EVENTS.scrollTop},this)},isOnlyHorizontalEvents:function(e){this._assertValidEvents(e);return e.every(function(d){return d.type===this.EVENTS.scrollWidth||d.type===this.EVENTS.clientWidth||d.type===this.EVENTS.offsetWidth||d.type===this.EVENTS.scrollLeft},this)},isOnlyScrollHeightChange:function(e){this._assertValidEvents(e);
return e.every(function(d){return d.type===this.EVENTS.scrollHeight},this)},isOnlyClientOrOffsetHeightChange:function(e){this._assertValidEvents(e);return e.some(function(d){return d.type===this.EVENTS.clientHeight||d.type===this.EVENTS.offsetHeight},this)},hasSizingEvent:function(e){this._assertValidEvents(e);return e.some(function(d){return d.type===this.EVENTS.scrollHeight||d.type===this.EVENTS.scrollWidth||d.type===this.EVENTS.clientHeight||d.type===this.EVENTS.clientWidth||d.type===this.EVENTS.offsetHeight||
d.type===this.EVENTS.offsetWidth},this)},hasHeightEvent:function(e){this._assertValidEvents(e);return e.some(function(d){return d.type===this.EVENTS.clientHeight||d.type===this.EVENTS.offsetHeight||d.type===this.EVENTS.scrollHeight},this)},hasOffsetHeightEvent:function(e){this._assertValidEvents(e);return e.some(function(d){return d.type===this.EVENTS.offsetHeight},this)},hasWidthEvent:function(e){this._assertValidEvents(e);return e.some(function(d){return d.type===this.EVENTS.clientWidth||d.type===
this.EVENTS.offsetWidth||d.type===this.EVENTS.scrollWidth},this)},hasLayoutEvent:function(e){this._assertValidEvents(e);return e.some(function(d){return d.type===this.EVENTS.layoutChange},this)},hasRenderEvent:function(e){this._assertValidEvents(e);return e.some(function(d){return d.type===this.EVENTS.renderUpdate},this)},hasDocumentChangeSource:function(e){this._assertValidEvents(e);return e.some(function(d){return d.source===this.SOURCES.documentChange},this)},isLayoutChangeEventToPatch:function(e,
d){return f.isMultiLineEvent(e,d)||this._hasDocumentEventToPatch(e)},_assertValidEvents:function(e){if(!(e&&0<e.length))throw Error("View events payload cannot be empty");},_hasDocumentEventToPatch:function(e){return this._DOCUMENT_EVENTS_TO_PATCH.some(function(d){return f.hasEventType(e,d)})}}})},"MW/rtc/cursor/CursorControllerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/cursor/CursorController"],function(g,f,e){return g(f,{requires:function(){return{isApplicable:[],
createInstance:"rtc.internaldocument rtc.view rtc.fileendselectable rtc.cursor rtc.actionservice rtc.columnselection.enabled rtc.cursor.navigator".split(" ")}},createInstance:function(d,b,a,c,h,f,g){return new e(d,b,a,c,h,f,g)}})})},"MW/rtc/cursor/CursorController":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/Deferred MW/rtc/abstract/AbstractPlugin MW/rtc/browsersupport/BrowserSupportUtilities MW/rtc/cursor/ColumnSelectionDisabledActions MW/rtc/cursor/Cursor MW/rtc/cursor/CursorUtilities MW/rtc/model/CodeUtilities MW/rtc/model/Position MW/rtc/model/Selection".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p){return g(b,{LEFT:1,RIGHT:2,UP:3,DOWN:4,START:5,END:6,LINE_START:7,LINE_END:9,WORD_LEFT:10,WORD_RIGHT:11,PAGE_UP:13,PAGE_DOWN:14,KEEP_ANCHOR:15,constructor:function(a,c,b,d,h,f,k){this._internalDocument=a;this._view=c;this._fileEndSelectable=b;this._cursor=d;this._actionService=h;this._columnSelectionEnabled=f;this._cursorNavigator=k;this._currentAction=null;this._suspended=0;this._hidden=!1;this._initializeController();this._initializeOriginalCursor();this._actionServiceListener=
this._statesToReenable=null;this.own(e.before(this._internalDocument,"onDocumentReset",this._reset.bind(this)))},_reset:function(){this._removeExtraCursors()},holdCursors:function(){this._heldCursors?this._holdCount++:(this._holdCount=1,this._heldCursors=[],this._getCursorIDs().forEach(function(a){this._heldCursors[a]=this._cursors[a].getCursorAsLiveRange()},this))},resetCursors:function(a){if(!this._heldCursors||1<this._holdCount)this._holdCount--;else if(this._backupCursors&&(this._cursors=this._backupCursors,
this._backupCursors=null,this._cursorListeners=this._backupListeners,this._backupListeners=null),this._getCursorIDs().forEach(function(c){var b=this._heldCursors[c];!a&&this._cursors[c]&&this._cursors[c].setCursorToRange(b);b.destroy()},this),this._heldCursors=null,0===this._suspended)this.onUpdate()},scrollIntoView:function(){1===this._getCursorIDs().length&&(this._cursor.suspendChangeEvent(),this._cursor.onUpdate(!1),this._cursor.activateChangeEvent(!0))},setTemporaryLineColumn:function(a,c,b){this._backupCursors=
this._cursors;this._backupListeners=this._cursorListeners;this._cursorListeners=[this._cursorListeners[0]];this._cursors={};this._cursors[0]=this._cursor;this._cursor.setLineColumn(a,c,b)},setTemporarySelectionLineColumn:function(a,c,b,d){this._backupCursors=this._cursors;this._backupListeners=this._cursorListeners;this._cursorListeners=[this._cursorListeners[0]];this._cursors={};this._cursors[0]=this._cursor;this._cursor.setSelectionLineColumn(a,c,b,d)},selectLine:function(a,c){this._removeExtraCursors();
this._cursor.selectLine(a,c)},isEventInSelection:function(a){return this.getCursors().some(function(c){return c.isEventInSelection(a)})},areCursorsReadOnly:function(){return this.getCursors().reduce(function(a,c){return a||c.isCursorReadOnly()},!1)},reinitializeCursors:function(){this.suspendUpdates();this._removeExtraCursors();this._cursor.movePosition(this._cursor.START,!1,!1);this.activateUpdates();if(0===this._suspended)this.onUpdate()},selectedText:function(){var a="";this.getCursors(!0).forEach(function(c){a=
a+c.selectedText()+"\n"});return a.substring(0,a.length-1)},getCursors:function(a){var c=this._getCursorIDs().map(function(a){return this._cursors[a]},this);a&&c.sort(f.hitch(k,k.cursorSortFunc));return c},getCursorsWithoutSelection:function(){return this.getCursors(!0).filter(function(a){return!a.hasSelection()})},getPositions:function(a){return this.getCursors(a).map(function(a){return a.hasSelection()?a.getSelection():a.getPosition()})},setPositions:function(a){this.suspendUpdates();this._ensureCorrectNumberOfCursorsAvailable(a.length);
var c=this.getCursors();a.forEach(function(a,b){var d=c[b];a.isInstanceOf&&a.isInstanceOf(p)?d.setSelection(a):(d.collapseSelection(),d.setPosition(a))},this);this.activateUpdates();if(0===this._suspended)this.onUpdate()},hasSelection:function(){return this.getCursors().some(function(a){return a.hasSelection()},this)},getSelection:function(){return!this.hasSelection()?null:this.getCursors().map(function(a){if(a.hasSelection())return a.getSelection();a=new m(a.getNode(),a.getOffset());return new p(a,
a)})},setSelection:function(a){this.suspendUpdates();this.clearSelection();a.forEach(function(a,c){(0===c?this._cursor:this._getCursor(this._addCursor(1,1))).setSelection(a)},this);this.activateUpdates();if(0===this._suspended)this.onUpdate()},getSelectionLineColumn:function(){return this._getCursorsWithSelection().map(function(a){return a.getSelectionLineColumn()})},movePosition:function(a,c,b){this.suspendUpdates();(a===this.PAGE_UP||a===this.PAGE_DOWN)&&this._removeExtraCursors();this._forEachCursor(function(d){if(!this._disallowCursorMovement(a,
d))if(this.hasMultipleCursors()&&(a===this.UP||a===this.DOWN)){var h=d.getLineColumn().line,e=this._getLineNumberForNextCodeLine(h,a);if(-1!==e)for(;h!==e;)d.movePosition(a,c),h=d.getLineColumn().line}else d.movePosition(a,c,b)});this.activateUpdates();if(0===this._suspended)this.onUpdate()},onUpdate:function(a,c){this.hasMultipleCursors()&&(this._mergeCursors(),this._checkForAndClearCursorsFromRichText());this._handleActions();a&&this.scrollIntoView();c&&this.getCursors().forEach(function(a){a.onChange()})},
setCursorToEvent:function(a){this.suspendUpdates();this.clearSelection();this._cursor.setCursorToEvent(a);this.activateUpdates();if(0===this._suspended)this.onUpdate()},clearSelection:function(){if(this.hasSelection()&&(this.suspendUpdates(),this._removeExtraCursors(),this._cursor.collapseSelection(),this.activateUpdates(),0===this._suspended))this.onUpdate()},selectAll:function(){this.suspendUpdates();this._removeExtraCursors();this._cursor.selectAll();this.activateUpdates();if(0===this._suspended)this.onUpdate()},
positionsAreValid:function(){return this.getCursors().every(function(a){return a.position.isValid()})},show:function(a,c){if(this._hidden&&(this._hidden=!1,this.suspendUpdates(),this._forEachCursor(function(b){b.show(a,c)}),this.activateUpdates(),0===this._suspended))this.onUpdate()},hide:function(){if(!this._hidden&&(this._hidden=!0,this.suspendUpdates(),this._forEachCursor(function(a){a.hide()}),this.activateUpdates(),0===this._suspended))this.onUpdate()},isPositionInSelectionRange:function(a){return this.getCursors().some(function(c){return c.isPositionInSelectionRange(a)})},
getScrollIntoViewPosition:function(){return this._cursor.position},suspendUpdates:function(){this._suspended++;this._forEachCursor(function(a){a.suspendChangeEvent()})},activateUpdates:function(){this._suspended--;if(!(0<this._suspended)&&(this._forEachCursor(function(a){a.activateChangeEvent()}),this._queuedUpdate)){var a=this._queuedUpdate.scroll,c=this._queuedUpdate.change;this._queuedUpdate=null;this.onUpdate(a,c)}},emitUpdate:function(a,c){if(0<this._suspended)this._queuedUpdate?(this._queuedUpdate.scroll=
this._queuedUpdate.scroll||a,this._queuedUpdate.change=this._queuedUpdate.change||c):this._queuedUpdate={scroll:a,change:c};else this.onUpdate(a,c)},_checkForAndClearCursorsFromRichText:function(){this.suspendUpdates();var a=this._getRemovableCursorIDs().filter(function(a){var c=this._getCursor(a);return!this._isCursorInCodeOnly(c)?(this._removeCursor(a),!1):!0},this);if(0!==a.length&&!this._isCursorInCodeOnly(this._cursor)){var c=this._getCursor(a[0]);this._setCursorToCursor(this._cursor,c);this._removeCursor(a[0])}this.activateUpdates()},
_isCursorInCodeOnly:function(a){var c;a.hasSelection()?(c=a.getSelection(),a=c.getStartPosition(),c=c.getEndPosition()):c=a=a.getCursorPosition();a=l.isCodeContainer(a.getNode(),!1);c=l.isCodeContainer(c.getNode(),!1);return a&&c},_setCursorToCursor:function(a,c){c.hasSelection()?a.setSelection(c.getSelection()):a.setPosition(c.getCursorPosition())},_ensureCorrectNumberOfCursorsAvailable:function(a){var c=this._getCursorIDs(),b=a-c.length;if(0<b)for(a=0;a<b;a+=1)this._addCursor(1,1);else 0>b&&c.slice(a).forEach(function(a){this._removeCursor(a)},
this)},_getLineNumberForNextCodeLine:function(a,c){for(var b=a-1+(c===this.UP?-1:1),d=this._internalDocument.getMaxLineNumber();0<=b&&b<=d;){if(l.isCodeContainer(this._internalDocument.getLineNode(b)))return b+1;b+=c===this.UP?-1:1}return-1},_getRemovableCursorIDs:function(a){a=a||this._getCursorIDs();-1<a.indexOf("0")&&a.splice(a.indexOf("0"),1);return a},_handleActions:function(){1<this._getCursorIDs().length?this._actionServiceListener||this._disableActions():this._actionServiceListener&&this._reenableActions()},
_disableActions:function(){this._statesToReenable=a.createMap();c.actionsToReEnable.forEach(function(a){var c=this._actionService.getAction(a);c&&this._statesToReenable.set(a,c.enabled)},this);c.actions.forEach(function(a){this._actionService.updateAction(a,{enabled:!1})},this);this._actionServiceListener=e.before(this._actionService,"updateAction",f.hitch(this,"_handleActionUpdate"),!0);this.own(this._actionServiceListener)},_reenableActions:function(){this._actionServiceListener.remove();this._actionServiceListener=
null;this._statesToReenable.forEach(function(a,c){var b=this._actionService.getAction(c);b&&a!==b.enabled&&this._actionService.updateAction(c,{enabled:a})},this);this._statesToReenable.clear();this._statesToReenable=null},_handleActionUpdate:function(a,b,d){this._statesToReenable.has(a)&&b.hasOwnProperty("enabled")&&this._statesToReenable.set(a,b.enabled);-1<c.actions.indexOf(a)&&(b.enabled=!1);return[a,b,d]},_getCursor:function(a){return this._cursors[a]},_getCursorsWithSelection:function(){return this.getCursors().filter(function(a){return a.hasSelection()})},
_disallowCursorMovement:function(a,c){var b=1<this._getCursorIDs().length,d=c.getLineColumn(),h=1===d.column,e=a===this.LEFT||a===this.WORD_LEFT,f=this._internalDocument.getLineNode(d.line-1).maxOffset()+1,d=d.column===f,f=a===this.RIGHT||a===this.WORD_RIGHT;return b&&(h&&e||d&&f)},_getCursorIDs:function(){return Object.keys(this._cursors)},_initializeOriginalCursor:function(){var a=this._getNextCursorID();this._cursors[a]=this._cursor;this._addListeners(this._cursor,a)},_addCursor:function(a,c){var b=
this._getNextCursorID(),d=this._createCursorAtLineColumn(a,c);this._cursors[b]=d;this._addListeners(d,b);if(0===this._suspended)this.onUpdate();return b},_removeCursor:function(a){if(!this._cursors[a])return!1;this._cursorListeners[a].forEach(function(a){a.remove()},this);delete this._cursorListeners[a];this._cursors[a]!==this._cursor&&this._cursors[a].destroy();delete this._cursors[a];if(0===this._suspended)this.onUpdate();return!0},_removeExtraCursors:function(){if(1!==this._getCursorIDs().length&&
(this.suspendUpdates(),this._getRemovableCursorIDs().forEach(this._removeCursor,this),this.activateUpdates(),0===this._suspended))this.onUpdate()},_addListeners:function(a,c){var b=e.after(a,"onUpdate",f.hitch(this,function(){if(0===this._suspended)this.onUpdate()}));this.own(b);this._cursorListeners[c]=[b]},_createCursorAtLineColumn:function(a,c){var b=new h(this._internalDocument,this._view,this._fileEndSelectable,this._cursorNavigator);0!==this._suspended&&b.suspendChangeEvent();b.setLineColumn(a,
c);return b},_forEachCursor:function(a){this.getCursors().forEach(a,this)},_getNextCursorID:function(){return this._cursorID++},_initializeController:function(){this._cursors={};this._cursorListeners={};this._cursorID=0},_mergeCursors:function(){this.suspendUpdates();var a=this._getCursorsToMerge().reduce(f.hitch(this,function(a,c){return this._mergeCursorSet(c)||a}),!1);this.activateUpdates();if(a&&0===this._suspended)this.onUpdate()},_getCursorsToMerge:function(){var a=[];this._getCursorIDs().forEach(function(c){var b=
this._getCursor(c),d=this._getLineColPair(b),h=b.isFileEndSelected();a.some(function(a){if(this._cursorMergeableWithSet(d,a))return a.push({id:c,lineColPair:d,fileEndSelected:h}),!0},this)||a.push([{id:c,lineColPair:d,fileEndSelected:h}])},this);return a},_cursorMergeableWithSet:function(a,c){return c.some(function(c){return this._lineColInRange(a.start,c.lineColPair)||this._lineColInRange(c.lineColPair.start,a)||this._lineColInRange(a.end,c.lineColPair)||this._lineColInRange(c.lineColPair.end,a)},
this)},_lineColInRange:function(a,c){var b=a.line,d=a.column,h=c.start.line,e=c.start.column,f=c.end.line,k=c.end.column,g=(b<f||b===f&&d<=k)&&(b>h||b===h&&d>=e);return b===h&&d===e||b===f&&d===k||b>h&&b<f||g},_mergeCursorSet:function(a){if(1===a.length)return!1;var c=this._getRangeFromCursors(a),b=this._getMergedCursorFromCursorIDs(a.map(function(a){return a.id}));if(c.start.line===c.end.line&&c.start.column===c.end.column)b.setLineColumn(c.start.line,c.start.column);else{var d=this._internalDocument.getPositionForLineColumn(c.start.line,
c.start.column),c=this._internalDocument.getPositionForLineColumn(c.end.line,c.end.column);a=new p(d,c,!1,this._isFileEndSelectedInCursorSet(a));b.setSelection(a)}return!0},_getRangeFromCursors:function(a){var c={line:Number.POSITIVE_INFINITY,column:Number.POSITIVE_INFINITY},b={line:Number.NEGATIVE_INFINITY,column:Number.NEGATIVE_INFINITY},d;a.forEach(function(a){d=a.lineColPair;if(d.start.line<c.line||d.start.line===c.line&&d.start.column<c.column)c=d.start;if(d.end.line>b.line||d.end.line===b.line&&
d.end.column>b.column)b=d.end});return{start:c,end:b}},_getMergedCursorFromCursorIDs:function(a){var c;0>a.indexOf("0")?c=this._getCursor(this._addCursor(1,1)):(this._cursor.releaseAnchor(),c=this._cursor);this._getRemovableCursorIDs(a).forEach(this._removeCursor,this);return c},_isFileEndSelectedInCursorSet:function(a){return a.some(function(a){return a.fileEndSelected})},_getLineColPair:function(a){if(a.hasSelection())return this._normalizeSelection(a.getSelectionLineColumn());a=a.getLineColumn();
return{start:a,end:a}},_normalizeSelection:function(a){return a.start.line<a.end.line?a:a.start.line>a.end.line||a.start.column>a.end.column?{start:a.end,end:a.start}:a},startDragAction:function(){var a=this._startNewAction();f.mixin(a,{onUp:f.hitch(this,function(c){if(!a.isFulfilled()&&(this.hasSelection()||this._cursor._fileEndSelected)&&c&&this.isPositionInSelectionRange(c))this._removeExtraCursors(),this._cursor.releaseAnchor(),this._cursor._setPosition(c),this._cursor.onUpdate()})});return a},
startSelectionAction:function(a,c,b){this._removeExtraCursors();var d=this._startNewAction();f.mixin(d,{onMove:f.hitch(this,function(a,c,b){d.isFulfilled()||(this._cursor._modifyPositionBasedOnMoveEvent(a,c,b),this._cursor.onUpdate())})});d.promise.always(f.hitch(this,function(){this._releaseAnchorIfNoSelection();this._stopAutoScroll()}));this._cursor._modifyPositionBasedOnDownEvent(a,c,b);this._cursor.onUpdate();return d},startBlockSelectionAction:function(a,c,b,d){if(!this._columnSelectionEnabled)return this.startSelectionAction(a,
c,b);this._removeExtraCursors();var h=this._startNewAction(),e=a.getLineColumn().line;f.mixin(h,{onMove:f.hitch(this,function(a,c,b,f){if(!h.isFulfilled()){this.suspendUpdates();this._removeExtraCursors();a=a.getLineColumn().line;b=Math.min(a,e);a=Math.max(a,e);for(c=this._getFirstCodeLineInRange(b,a);b<=a;b+=1)if(l.isCodeContainer(this._internalDocument.getLineNode(b-1))){var k=this._view.getCoordinateForLineColumn(b,1).y,g=this._view.getPositionFromCoordinate({x:d,y:k}).getLineColumn().column,k=
this._view.getPositionFromCoordinate({x:f,y:k}).getLineColumn().column,m;b===c?(this._cursor.releaseAnchor(),m=this._cursor):m=this._getCursor(this._addCursor(1,1));g===k?m.setLineColumn(b,g):m.setSelectionLineColumn(b,g,b,k)}this.activateUpdates();if(0===this._suspended)this.onUpdate()}})});h.promise.always(f.hitch(this,function(){this._stopAutoScroll();if(0===this._suspended)this.onUpdate()}));this._cursor._modifyPositionBasedOnDownEvent(a,!1,b);if(0===this._suspended)this.onUpdate();return h},
_getFirstCodeLineInRange:function(a,c){var b=this._internalDocument.getLineNode(a-1),d=this._internalDocument.getLineNode(c-1),b=l.getCodeNodesInNodeRange(b,d);return 0===b.length?-1:this._internalDocument.getLineNumber(b[0])+1},startGroupedSelectionAction:function(a,c,b,d){this.clearSelection();return this._cursor.startGroupedSelectionAction(a,c,b,d)},startSecondarySelectionAction:function(a,c,b){1<this._getCursorIDs().length&&!this.isPositionInSelectionRange(a)&&this.clearSelection();return 1===
this._getCursorIDs().length?this._cursor.startSecondarySelectionAction(a,c,b):this._startNewAction()},isActionInProgress:function(){return null!==this._currentAction},_startNewAction:function(){var a=new d;this._setCurrentAction(a);return a},_stopAutoScroll:function(){this._forEachCursor(function(a){a._stopAutoScroll()})},_releaseAnchorIfNoSelection:function(){this._forEachCursor(function(a){a.hasAnchor()&&a.position.isEqualTo(a.anchor)&&!a._fileEndSelected&&a.releaseAnchor()})},_setCurrentAction:function(a){this._clearCurrentAction();
this._currentAction=a;this._currentAction.promise.always(f.hitch(this,function(){this._currentAction=null}))},_clearCurrentAction:function(){this._currentAction&&!this._currentAction.isFulfilled()&&this._currentAction.cancel()},hasMultipleCursors:function(){return 1<this.getCursors().length},hasMultiplePendingCursors:function(){return this.hasMultipleCursors()||this._heldCursors&&1<this._heldCursors.length}})})},"MW/rtc/cursor/ColumnSelectionDisabledActions":function(){define(["dojo/aspect","MW/rtc/RichTextComponentFeatureEnum"],
function(g,f){return{actions:[f.CODE_EXAMPLE.DEFAULT_ACTION,f.CODE_EXAMPLE.MATLAB_ACTION,f.CODE_EXAMPLE.PLAIN_ACTION,f.COMMENT.COMMENT_ACTION,f.COMMENT.UNCOMMENT_ACTION,f.EQUATIONS.LATEX_EDITOR_ACTION,f.EQUATIONS.WYSIWYG_EDITOR_ACTION,f.EVALUATE_SELECTION.EVALUATE_SELECTION_ACTION,f.FIND_STRING.FIND_ACTION,f.FIND_STRING.FIND_NEXT_ACTION,f.FIND_STRING.FIND_PREVIOUS_ACTION,f.FIND_STRING.FIND_SELECTION_ACTION,f.FIND_STRING.REPLACE_ACTION,f.FORMAT_CODE.SMART_INDENT_ACTION,f.FUNCTION_HINTS.FUNCTION_HINTS_ACTION,
f.GOTO_LINE.GOTO_ACTION,f.HYPERLINK.HYPERLINK_ACTION,f.IMAGES.IMAGE_ACTION,f.INDENT.INDENT_ACTION,f.INDENT.OUTDENT_ACTION,f.MATLAB_BREAKPOINT_MARGIN.TOGGLE_BREAKPOINT_ACTION,f.MATLAB_BREAKPOINT_MARGIN.TOGGLE_ENABLE_BREAKPOINT_ACTION,f.OPEN_SELECTION.OPEN_SELECTION_ACTION,f.PAREN_MATCH,f.RICH_TEXT.TOGGLE_CODE_AND_TEXT_ACTION,f.SECTIONS.INSERT_SECTION_ACTION,f.SMART_TAB,f.TAB_COMPLETION.TAB_COMPLETE_ACTION,f.TABLE_OF_CONTENTS.TABLE_OF_CONTENTS_ACTION,f.VARIABLE_HIGHLIGHTING,"help_on_selection","rtc_configure_live_control",
"rtc_format_code_tab","rtc_general_hyperlink","rtc_insert_code","rtc_insert_combo_box","rtc_insert_sectionbreak","rtc_insert_slider","rtc_insert_text"],actionsToReEnable:[f.CODE_EXAMPLE.DEFAULT_ACTION,f.CODE_EXAMPLE.MATLAB_ACTION,f.CODE_EXAMPLE.PLAIN_ACTION,f.COMMENT.COMMENT_ACTION,f.COMMENT.UNCOMMENT_ACTION,f.EQUATIONS.LATEX_EDITOR_ACTION,f.EQUATIONS.WYSIWYG_EDITOR_ACTION,f.FIND_STRING.FIND_ACTION,f.FIND_STRING.FIND_NEXT_ACTION,f.FIND_STRING.FIND_PREVIOUS_ACTION,f.FIND_STRING.FIND_SELECTION_ACTION,
f.FIND_STRING.REPLACE_ACTION,f.FORMAT_CODE.SMART_INDENT_ACTION,f.GOTO_LINE.GOTO_ACTION,f.HYPERLINK.HYPERLINK_ACTION,f.IMAGES.IMAGE_ACTION,f.INDENT.INDENT_ACTION,f.INDENT.OUTDENT_ACTION,f.MATLAB_BREAKPOINT_MARGIN.TOGGLE_BREAKPOINT_ACTION,f.MATLAB_BREAKPOINT_MARGIN.TOGGLE_ENABLE_BREAKPOINT_ACTION,f.OPEN_SELECTION.OPEN_SELECTION_ACTION,f.RICH_TEXT.TOGGLE_CODE_AND_TEXT_ACTION,f.SMART_TAB,f.TAB_COMPLETION.TAB_COMPLETE_ACTION,f.TABLE_OF_CONTENTS.TABLE_OF_CONTENTS_ACTION,"help_on_selection","rtc_format_code_tab",
"rtc_insert_code","rtc_insert_text","rtc_insert_sectionbreak"]}})},"MW/rtc/cursor/CursorUtilities":function(){define(["MW/rtc/model/PositionUtilities"],function(g){return{cursorSortFunc:function(f,e){return this._firstCursorBeforeSecond(f,e)?-1:this._firstCursorBeforeSecond(e,f)?1:0},_firstCursorBeforeSecond:function(f,e){var d=f.getLineColumn(),b=e.getLineColumn();return d.line<b.line?!0:d.line>b.line?!1:d.column<b.column?!0:!1},getCursorAtEdgeOfRange:function(f,e){var d=null;f.some(function(b){var a=
b.getCursorPosition();if(0===g.comparePositions(a,e.getStartPosition())||0===g.comparePositions(a,e.getEndPosition()))return d=b,!0});return d}}})},"MW/rtc/datamodel/DefaultBackingStoreProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/datamodel/InMemoryBackingStore","MW/rtc/core/provider/PluginProvider"],function(g,f,e,d){return g(d,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:[]}},createInstance:function(){return new e}})})},
"MW/rtc/datamodel/InMemoryBackingStore":function(){define(["dojo/_base/declare","MW/rtc/datamodel/BackingStore","mw-utils/Utils"],function(g,f,e){return g(f,{constructor:function(){this.uniqueId=e.generateUuid()},getUniqueId:function(){return this.uniqueId}})})},"MW/rtc/datamodel/BackingStore":function(){define(["dojo/_base/declare"],function(g){return g(null,{getStorageData:function(){return""},getUniqueId:function(){throw Error("Unimplemented API: MW.rtc.datamodel.AbstractBackingStore.getUniqueId");
}})})},"MW/rtc/execution/BreakpointlessEvalServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/execution/BreakpointlessEvalService"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.editordataservice"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/execution/BreakpointlessEvalService":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin","mw-messageservice/MessageService","mw-utils/Utils"],
function(g,f,e,d){return g([f],{BREAKPOINTLESS_EVAL_REQUEST:"/debug/breakpointlessEval/",BREAKPOINTLESS_EVAL_FEATURE_ID:"matlab.debug.breakpointlesseval",constructor:function(b,a){this._uniqueId=d.generateUuid();this._messageService=a||e;b.request(this.BREAKPOINTLESS_EVAL_FEATURE_ID,{uniqueId:this._uniqueId}).then(function(){},function(){})},noBreakpointEval:function(b){e.publish(this.BREAKPOINTLESS_EVAL_REQUEST+this._uniqueId,{code:b})}})})},"MW/rtc/execution/ExecutionServiceProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/execution/MatlabExecutionDataService"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},destroyInstance:function(d){}})})},"MW/rtc/execution/MatlabExecutionDataService":function(){define(["dojo/_base/declare","dojo/_base/lang","mw-log/Log","mw-messageservice/MessageService"],function(g,f,e,d){return g([],{constructor:function(b){this._messageService=b||d;this.streamingEval=!1},authoringEval:function(b){this._messageService.publish("/editor/executionservice/authoringEval",
b)},executionEval:function(b){this._messageService.publish("/editor/executionservice/executionEval",b)},isMessageServiceRunning:function(){return this._messageService.isRunning()}})})},"MW/rtc/model/DocumentActionsProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/model/DocumentActions"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.document","rtc.actionservice","rtc.keyhandler"]}},
createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/model/DocumentActions":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/model/DocumentConstants"],function(g,f,e){return g(null,{constructor:function(d,b,a){b.loadActions(this._getActions(d));a.addBindings(this._getAdditionalKeyBindings())},_getActions:function(d){return[{id:"rtc_insert_break",enabled:!0,key:"enter",callback:f.hitch(d,"insertBreak")},{id:"rtc_tab",enabled:!0,key:"tab",callback:f.hitch(d,"insertTab")},
{id:"rtc_delete_backward",enabled:!0,key:"backspace",callback:f.hitch(d,"deleteTextAtCurrentPosition",e.BACKWARD_DELETE)},{id:"rtc_delete_forward",enabled:!0,key:"delete",callback:f.hitch(d,"deleteTextAtCurrentPosition",e.FORWARD_DELETE)},{id:"rtc_delete_previous_word",enabled:!0,key:"ctrl_backspace",platformKey:{mac:"alt_backspace"},callback:f.hitch(d,"deleteWord",-1)},{id:"rtc_delete_next_word",enabled:!0,key:"ctrl_delete",platformKey:{mac:"alt_delete"},callback:f.hitch(d,"deleteWord",1)}]},_getAdditionalKeyBindings:function(){return[{key:"shift_backspace",
action:"rtc_delete_backward"},{key:"shift_enter",action:"rtc_insert_break"}]}})})},"MW/rtc/model/DocumentProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/model/Document"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:"rtc.cursorcontroller rtc.internaldocument rtc.undoredo.editblock rtc.textnodeservice rtc.code.codetextservice rtc.linenumberservice".split(" ")}},createInstance:function(d,
b,a,c,h,f){return new e(d,b,a,c,h,f)}})})},"MW/rtc/model/Document":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/aspect mw-log/Log MW/rtc/abstract/AbstractPlugin MW/rtc/browsersupport/BrowserSupportUtilities MW/rtc/model/ActivePosition MW/rtc/model/CodeUtilities MW/rtc/model/CodeTextGeneratorVisitor MW/rtc/model/DocumentConstants MW/rtc/model/DocumentEventUtilities MW/rtc/model/DocumentUtilities MW/rtc/model/NodeUtilities MW/rtc/model/PositionUtilities MW/rtc/model/Range MW/rtc/model/RangeUtilities MW/rtc/model/SelectionUtilities MW/rtc/model/TreeWalker MW/rtc/model/events/DocumentEvent MW/rtc/model/events/InsertTextEvent MW/rtc/model/events/ReadOnlyChangeEvent MW/rtc/model/events/NumberOfLinesChangedEvent MW/rtc/plugins/undoredo/EditBlockConstants".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x,y,B,D){return g(a,{constructor:function(a,b,h,f,k,g){this._cursorController=a;this._internalDocument=b;this._editBlockController=h;this._textNodeService=f;this._codeTextService=k;this._lineNumberService=g;this._positions=c.createSet();this.own(d.after(this._internalDocument,"onNodeChange",r.updatePositions,!0));this.own(d.after(this._internalDocument,"onDocumentChanged",e.hitch(this,"_handleDocumentChanged"),!0))},onChange:function(){},onPreInsertText:function(a){},
_handleDocumentChanged:function(a){this._updatePositionsAndEmitChangeEvents();r.firePendingEvents();this._emitTranslatedDocumentChangeEvents(a)},_updatePositionsAndEmitChangeEvents:function(){this._positions.forEach(function(a){a.updateLineColumn()},this)},_emitTranslatedDocumentChangeEvents:function(a){a=a||[];var c=[],b=p.toLengthChangeEvent(a);null!==b&&c.push(b);b=p.getEventsOfType(a,m.READONLY_STATE_CHANGE_EVENT);c=c.concat(b);a=p.finalLineRangeFromEvents(a);c.push(w.create(a.startLine,a.endLine));
this.onChange(c)},_emitOnChange:function(a){this._internalDocument.emitDocumentEvents(a)},startBlockEdit:function(a){this._cursorController.suspendUpdates();a=this.startEdit(a);this._internalDocument.startBlockEdit(a);return a},endBlockEdit:function(a){this.endEdit();this._internalDocument.endBlockEdit(a);this._cursorController.activateUpdates()},startEdit:function(a){return this._editBlockController.startEdit(a)},endEdit:function(){this._editBlockController.endEdit()},undoable:function(a,c){try{return a(this.startEdit(c))}finally{this.endEdit()}},
insertText:function(a,c,b){if(this._documentAndLineReadOnly(c))return!1;this._cursorController.holdCursors();a=this._insertTextRespectingReplacement(a,c,b,!1);this._cursorController.resetCursors();return a},insertTextAtCurrentPosition:function(a){if(this._documentAndCursorReadOnly())return!1;var c=this.startBlockEdit(D.TYPING_TEXT),b=!1;this._cursorController.getCursors().forEach(function(c){var d=this._deleteSelectionBeforeInsertText(c),h=c.getLineColumn(),e=c.getCursorAsLiveRange();b=this._insertTextRespectingReplacement(a,
h.line,h.column,d)||b;c.setCursorToRange(e);e.destroy()},this);this.endBlockEdit(c);this._cursorController.emitUpdate(!0);return b},insertBreak:function(){var a=this.startBlockEdit(),c=!1;this._cursorController.getCursors().forEach(function(b){if(b=this._insertBreak(b)){a.appendRedoEvents([B.create(b.startLine,b.endLine,1)]);a.appendUndoEvents([B.create(b.startLine,b.endLine,-1)]);var d=b?[].concat(b):null;this._emitOnChange(d)}c=c||!!b},this);this.endBlockEdit(a);this._cursorController.emitUpdate();
return c},insertBreakAt:function(a,c){this._cursorController.holdCursors();this._cursorController.setTemporaryLineColumn(a,c,!0);var b=this.insertBreak();this._cursorController.resetCursors();return b},insertTab:function(){this.insertTextAtCurrentPosition(n.DEFAULT_TAB_STRING);return!0},insertContent:function(a,c,b){if(this.isReadOnly())return!1;var d=this.startEdit();a=this._internalDocument.insertContent(a,c);a.newPosition&&(b.setPosition(a.newPosition),b.onUpdate(!1,!0));b=a.event;if(0===b.length)return this.endEdit(),
!1;d.appendRedoEvents(b);d.appendUndoEvents(p.translateEventsForUndo(b));this.endEdit();this._emitOnChange(b);return!0},insertContentAtCurrentPosition:function(a){if(0===a.length)return!1;var c=this.startBlockEdit(),b=!1,d=this._cursorController.getCursors(!0);1===d.length||1===a.length?d.forEach(function(c){this._deleteSelectionBeforeInsertText(c);b=this.insertContent(a,c.position,c)||b},this):d.length<=a.length?d.forEach(function(c,d){this._deleteSelectionBeforeInsertText(c);b=this.insertContent([a[d]],
c.position,c)||b},this):a.forEach(function(a,c){this._deleteSelectionBeforeInsertText(d[c]);b=this.insertContent([a],d[c].position,d[c])||b},this);this.endBlockEdit(c);this._cursorController.emitUpdate();return b},_insertBreak:function(a){if(a.hasSelection()){var c=this._deleteText(null,a);if(!1===c)return!1;c=c?[].concat(c):null;this._emitOnChange(c)}var b,c=null;b=a.position;var d=a.getNode(),h=d.rootContainer(),e=n.isAtStartOfContainer(b,h),f=n.isAtEndOfContainer(b,h),k="\n"===h.CHILD_TEXT_SEPARATOR;
if((e||f)&&!k&&!h.isEmpty()){h=this._internalDocument.cloneNodeWithoutChildren(h);k=this._textNodeService.createTextNodeForContainer("",h);d=d.getStyleAttributes();k.updateAttributes(d);h.addChild(k);b=this._internalDocument.insertAtPosition(h,b);if(b.insertionNotAllowed)return!1;f?c=b.insertedRange.getStartPosition():e&&(c=b.insertedRange.getEndPosition());b=b.events[0]}else{c=a.getNode();e=a.getOffset();d.isTextNode()||(c=this._textNodeService.createTextNodeForPosition("",b),b=this._internalDocument.insertAtPosition(c,
b),b=b.insertedRange.getEndPosition(),c=b.getNode(),e=b.getOffset());b=this._internalDocument.insertBreakInTextNode(c,e);if(!b||!b.newNode)return!1;c=b.newNode.startPosition();b=b.event}c&&a.setPosition(c);a.onUpdate(!1,!0);return b},_insertText:function(a,c,b){var d=this.onPreInsertText(a);return d||0<=a.search(n.NewLineRegex)?this._insertMultilineText(a,c,d):this._insertPlainText(a,c,b)},_insertTextRespectingReplacement:function(a,c,b,d){var h=this.startEdit();c=this._internalDocument.getPositionForLineColumn(c,
b);a=this._insertText(a,c,d);if(!a)return this.endEdit(),!1;h.appendUndoEvents(a.event);h.appendRedoEvents(a.event);this.endEdit();this._emitOnChange(a.event);return!0},_insertMultilineText:function(a,c,b){var d={};b||(b=n.textToContent(a,c.getNode()));a=this._internalDocument.insertContent(b,c);d.newPosition=a.newPosition;d.event=a.event?[].concat(a.event):null;return d},_insertPlainText:function(a,c,b){var d={};a=this._textNodeService.createTextNodeForPosition(a,c);c=b?this._internalDocument.insertDuringReplace(a,
c):this._internalDocument.insertAtPosition(a,c);if(c.insertionNotAllowed)return!1;d.newPosition=c.insertedRange.getEndPosition();d.event=c.events;return d},deleteText:function(a,c,b,d){n.checkOneDirectionalSelection(a,c,b,d);this._cursorController.suspendUpdates();this._cursorController.holdCursors();this._cursorController.setTemporarySelectionLineColumn(a,c,b,d);this.deleteTextAtCurrentPosition();this._cursorController.resetCursors();this._cursorController.activateUpdates()},deleteTextAtCurrentPosition:function(a){var c=
this.startBlockEdit(),b=!1;this._cursorController.getCursors().forEach(function(c){(c=this._deleteText(a,c))&&this._emitOnChange([].concat(c));b=b||!!c},this);this.endBlockEdit(c);this._cursorController.emitUpdate();return b},onDirectedDeletion:function(a,c){},onPreDeletion:function(a){},deleteWord:function(a){if(this._documentAndCursorReadOnly())return!0;var c=this.startBlockEdit();c.preventMerge();this._cursorController.holdCursors();this._cursorController.getCursors().forEach(function(c){c.releaseAnchor();
0<a?c.movePosition(c.WORD_RIGHT,!0):c.movePosition(c.WORD_LEFT,!0)},this);this.deleteTextAtCurrentPosition(a);this._cursorController.resetCursors();this.endBlockEdit(c)},_deleteText:function(a,c){if(this.onPreDeletion(a)||!this.prepareCursorSelectionForEditing(c))return!1;var b=this.startEdit(),d=c.selectionInfo(),h=e.mixin({},d),f,k,g,l,m;if(!c.hasSelection()){if(c.getNode().isReadOnly()||!a)return this.endEdit(),!1;g=c.charAtCursor(a);if(0>a){f=c.getNode().movePositionLeft(c.position);if(!f)return this.endEdit(),
!1;k=f}else if(k=c.position,f=c.getNode().movePositionRight(c.position),!f)return this.endEdit(),!1;if(f.getNode().isReadOnly()||d.startPos===f.getOffset()&&d.startNode===f.getNode())return this.endEdit(),!1;d.isReversed=1===a;1===a?(d.endNode=f.getNode(),d.endPos=f.getOffset()):(d.startNode=f.getNode(),d.startPos=f.getOffset());d.isLocal=d.startNode===d.endNode;d.isNull=!1;c.adjustSelection(d)}if(this.onDirectedDeletion(a,d))this.endEdit();else{d.isLocal&&(n.isEdgeOfTextLevelContainer(d.startNode,
d.startPos)&&n.isEdgeOfTextLevelContainer(d.endNode,d.endPos))&&!n.isTextLevelContainer(d.startNode)&&(d.startNode=d.startNode.parent,d.endNode=d.endNode.parent,d.endPos=d.endNode.maxOffset(),d.isLocal=!1);c.hasSelection()&&(g=c.selectedText(),c.internalCollapseSelection(c.LEFT),k=c.position,l=this.createPosition(d.startNode,d.startPos),m=this.createPosition(d.endNode,d.endPos,!0));f=k.getLineColumn();b.setType(h.isNull?g?0>a?D.BACKSPACE:D.DELETE:"":D.DELETE_SELECTION);k=this._internalDocument.deleteSelection(d);
l&&(this.deletePosition(l),this.deletePosition(m));c.setLineColumn(f.line,f.column,!0);if(!(d.startNode===c.getNode()&&d.startPos===c.getOffset())||0>a)c.onUpdate(!1,!0);b.appendRedoEvents([k]);b.appendUndoEvents([x.create(k.startLine,k.endLine,h.startPosition,g)]);this.endEdit();return k}},replaceText:function(a,c,b,d,h){n.checkOneDirectionalSelection(c,b,d,h);if(!this.isReadOnly()){var e=this.startBlockEdit();this.deleteText(c,b,d,h);this.insertText(a,c,b);this.endBlockEdit(e)}},_deleteSelectionBeforeInsertText:function(a){if(a.hasSelection()){a=
this._deleteText(null,a);if(!a)return!1;this._emitOnChange([a]);return!0}return!1},getEndOfDocumentLineColumn:function(){var a=this.getLinePropertiesArray();return{line:a.length,column:a[a.length-1].content.length+1}},getLinePropertiesArray:function(){var a=this.getNumberOfLines(),c=[],b;for(b=0;b<a;b+=1){var d=this._internalDocument.getLineNode(b),d={content:d.getText(),readOnly:this.isReadOnly()||d.isReadOnly()};c.push(d)}return c},getLineText:function(a){n.checkLineExists(this._internalDocument,
a);return(a=this._internalDocument.getLineNode(a-1))?a.getText():""},getLineLength:function(a){return this.getLineText(a).length},getNumberOfLines:function(){return this._internalDocument.getMaxLineNumber()},getState:function(){return this._internalDocument.getState()},getText:function(){var a=this._internalDocument.root;return a&&a.getText?a.getText():""},getTextCharacters:function(a,c,d){b.assert(0<=a,"lineNumber should be a positive integer");b.assert(0<=c,"startColumn should be a positive integer");
b.assert(0<d,"length should be a positive integer");a=this.getLineText(a+1);var h="";a&&c+d<=a.length&&(h=a.substr(c,d));return h},isReadOnly:function(){return this._internalDocument.isReadOnly()},getCodeText:function(){return this._codeTextService.getCodeText()},getCodeTextForRange:function(a){var c=new l;(new v(c)).traverseRange(a);return c.getText()},isLineCode:function(a){a=this._internalDocument.getLineNode(a-1);return k.isCodeContainer(a)},_documentAndCursorReadOnly:function(){return this.isReadOnly()||
this._cursorController.areCursorsReadOnly()},_documentAndLineReadOnly:function(a){a=this._internalDocument.getLineNode(a-1).isReadOnly();return this._internalDocument.isReadOnly()||a},prepareCursorSelectionForEditing:function(a){if(this.isReadOnly())return!1;if(!a.hasSelection())return!a.isCursorReadOnly();var c=a.getSelection();if(!t.isRangeReadOnly(c))return!0;c=u.trimTrailingLineBreak(c);if(t.isRangeReadOnly(c))return!1;a.setSelection(c);return!0},setReadOnly:function(a){this.isReadOnly()!==a&&
(this._internalDocument.setReadOnly(a),this._cursorController.emitUpdate())},setReadOnlyLine:function(a,c){n.checkLineExists(this._internalDocument,a);this._internalDocument.setReadOnlyLine(a-1,c)&&this._emitOnChange([y.create(a-1,a-1)])},setReadOnlyLines:function(a){var c=this.startBlockEdit(D.AUTO);a.forEach(function(a){this.setReadOnlyLine(a,!0)},this);this.endBlockEdit(c)},setText:function(a){this._internalDocument.isReadOnly()||(this._internalDocument.openTextDocument(a,!1),this._cursorController.reinitializeCursors(),
a=this._internalDocument.getMaxLineNumber()-1,this._internalDocument.emitDocumentEvents([w.create(0,a)]))},createPosition:function(a,c,b){a=new h(a,c,b,this._lineNumberService);this._configurePosition(a);return a},_configurePosition:function(a){this._positions.add(a);var c=d.after(a,"destroy",function(){this._positions.delete(a);c.remove()}.bind(this))},deletePosition:function(a){a.destroy()},createPositionAtLineColumn:function(a,c,b){var d=this._internalDocument.getLineNode(a);n.assert(d,"Line "+
a+" does not exist.");d=d.getPositionFromOffset(c);n.assert(d,"Offset "+c+" does not exist in line "+a+".");return this.createPosition(d.getNode(),d.getOffset(),b)},createLinePosition:function(a,c){var b=a.rootContainer(),b=new h(b,0,c,this._lineNumberService);b.setIgnoreOffset();this._configurePosition(b);return b},getPositionsInNodeRange:function(a,c){return q.getParagraphNodesInRange(a,c).map(function(a){return this.createLinePosition(a,!1)},this)},createLinePositionInLine:function(a,c){var b=
this._internalDocument.getLineNode(a);n.assert(b,"Line "+a+" does not exist.");return this.createLinePosition(b,c)}})})},"MW/rtc/model/ActivePosition":function(){define(["dojo/_base/declare","MW/rtc/model/Position"],function(g,f){return g(f,{constructor:function(e,d,b,a){this._lineLookupService=a;this.setLive(!0);this.updateLineColumn()},_getLine:function(e){return this._lineLookupService.getLineNumber(e)},setPosition:function(e,d){this.inherited(arguments);this.updateLineColumn()},updateLineColumn:function(){var e=
this.getLineColumn(),d=e.line-1!==this.line,b=e.column-1!==this.column;if(d||b)this.line=e.line-1,this.column=e.column-1,this.onChange({lineHasChanged:d,columnHasChanged:b})}})})},"MW/rtc/model/CodeTextGeneratorVisitor":function(){define(["dojo/_base/declare","MW/rtc/model/io/PlainTextGeneratorVisitor"],function(g,f){return g(f,{visitLeafNode:function(e,d,b){this._text+=e.getCodeText().slice(d,b)}})})},"MW/rtc/model/events/InsertTextEvent":function(){define("dojo/_base/declare MW/rtc/model/DocumentConstants MW/rtc/model/DocumentEventUtilities MW/rtc/model/Mutation ./DeletionEvent ./UndoableEvent".split(" "),
function(g,f,e,d,b,a){var c=g(a,{constructor:function(a,c,b,d){this.type=f.INSERT_TEXT;this.position=b;this.length=(this.text=d)?d.length:0},getMutation:function(){return d.createFromEvent(this,d.MUTATION_TYPE.INSERTION)},destroy:function(){},getUndoEvent:function(){return b.create(this.startLine,this.endLine,this.position.getLineColumn().column)}});return{create:function(a,b,d,g){e.assertValidLines(a,b,f.INSERT_TEXT);return new c(a,b,d,g)}}})},"MW/rtc/model/events/DeletionEvent":function(){define("dojo/_base/declare MW/rtc/model/DocumentConstants MW/rtc/model/DocumentEventUtilities MW/rtc/model/Mutation ./UndoableEvent ./NumberOfLinesChangedEvent".split(" "),
function(g,f,e,d,b,a){var c=g(b,{constructor:function(a,c,b){this.type=f.DELETION_EVENT;this.endColumn=b},getMutation:function(){return d.createFromEvent(this,d.MUTATION_TYPE.DELETION)},getUndoEvent:function(){return a.create(this.startLine,this.endLine,1)},destroy:function(){}});return{create:function(a,b,d){e.assertValidLines(a,b,f.DELETION_EVENT);return new c(a,b,d)}}})},"MW/rtc/model/events/NumberOfLinesChangedEvent":function(){define(["dojo/_base/declare","MW/rtc/model/DocumentConstants","MW/rtc/model/DocumentEventUtilities",
"MW/rtc/model/Mutation","./UndoableEvent"],function(g,f,e,d,b){var a=g(b,{constructor:function(a,b,d){this.type=f.NUMBER_OF_LINES_CHANGED;this.direction=d},getMutation:function(){return d.createFromEvent(this,this._getMutationType())},_getMutationType:function(){return 0<this.direction?d.MUTATION_TYPE.INSERTION:0>this.direction?d.MUTATION_TYPE.DELETION:d.MUTATION_TYPE.INPLACE},getUndoEvent:function(){return new a(this.startLine,this.endLine,-this.direction)},destroy:function(){}});return{create:function(c,
b,d){e.assertValidLines(c,b,f.NUMBER_OF_LINES_CHANGED);return new a(c,b,d)}}})},"MW/rtc/model/events/ReadOnlyChangeEvent":function(){define(["dojo/_base/declare","MW/rtc/model/DocumentConstants","MW/rtc/model/DocumentEventUtilities","MW/rtc/model/Mutation","./UndoableEvent"],function(g,f,e,d,b){var a=g(b,{constructor:function(a,b){this.type=f.READONLY_STATE_CHANGE_EVENT;this.startLine=a;this.endLine=b},getMutation:function(){return d.createFromEvent(this,d.MUTATION_TYPE.INPLACE)},getUndoEvent:function(){return a(this.startLine,
this.endLine)},destroy:function(){}});return{create:function(c,b){e.assertValidLines(c,b,f.READONLY_STATE_CHANGE_EVENT);return new a(c,b)}}})},"MW/rtc/plugins/undoredo/EditBlockConstants":function(){define([],function(){return{TYPING_TEXT:"TypingText",INDENT:"Indent",UNINDENT:"Unindent",DELETE:"ForwardDelete",BACKSPACE:"Backspace",DELETE_SELECTION:"DeleteSelection",AUTO:"_Auto"}})},"MW/rtc/model/InternalDocumentProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"MW/rtc/model/InternalDocument"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.undoredo.editblock","rtc.textnodeservice","rtc.insertionruleservice","rtc.nodes.contentconverter"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/model/InternalDocument":function(){define("dojo/_base/declare dojo/_base/lang dojo/json mw-log/Log MW/rtc/browsersupport/BrowserSupportUtilities MW/rtc/model/CodeUtilities MW/rtc/model/DocumentConstants MW/rtc/model/DocumentUtilities MW/rtc/model/DocumentEventUtilities MW/rtc/model/events/DeletionEvent MW/rtc/model/events/InsertBreakEvent MW/rtc/model/events/InsertTextEvent MW/rtc/model/events/nodechange/DeleteNodeEvent MW/rtc/model/events/nodechange/DeleteTextNodeEvent MW/rtc/model/events/nodechange/InsertNodeEvent MW/rtc/model/events/nodechange/InsertTextNodeEvent MW/rtc/model/events/nodechange/MergeNodeEvent MW/rtc/model/events/nodechange/SplitNodeEvent MW/rtc/model/events/nodechange/UpdateAttributesNodeEvent MW/rtc/model/NodeUtilities MW/rtc/model/Position MW/rtc/model/PositionUtilities MW/rtc/model/Range MW/rtc/model/RangeUtilities MW/rtc/nodes/InnerNode MW/rtc/nodes/OpaqueNode MW/rtc/nodes/inner/RootNode MW/rtc/nodes/inner/LineNode MW/rtc/plugins/undoredo/commands/InsertChildrenCommand MW/rtc/plugins/undoredo/commands/NodeChangeEventCommand MW/rtc/plugins/undoredo/commands/RemoveChildrenCommand MW/rtc/plugins/undoredo/commands/ReplaceTextCommand MW/rtc/plugins/undoredo/commands/UpdateAttributesCommand".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x,y,B,D,E,F,I,L,C,M,G,N,P){return g(null,{MAX_NODE_TEXT_LENGTH:1E4,constructor:function(a,c,b,d){this._editBlockController=a;this._textNodeService=c;this._insertionRuleService=b;this._contentConverter=d;this.root=new I([]);this._documentState=0;this._blockEditsStack=[];this._pendingDocumentEvents=[];this.registerFormatTemplates([{name:"code",method:function(){var a={};a.container=new L([]);return a}}])},onPreDocumentChanged:function(a){},onDocumentChanged:function(a){k.assertValidEventPayload(a);
this._documentState+=1},insertAtPosition:function(a,c){return this._insertAtPositionRespectingReplacement(a,c,!1)},insertDuringReplace:function(a,c){return this._insertAtPositionRespectingReplacement(a,c,!0)},_insertAtPositionRespectingReplacement:function(a,c,b){Array.isArray(a)||(a=[a]);if(0===a.length)throw Error("rtc.model.InternalDocument._insertAtPositionRespectingReplacement: Expected at least one node to insert.");a=this._insertNodesAtPosition(a,c,b);c=[];b=null;a.insertedRange&&(b=this._mergeTextNodesInRange(a.insertedRange),
c=this._buildEventList(b,a.insertedContainerAtEndOfContainer,a.insertedRootContainers,a.containerWasSplit));return{insertionNotAllowed:a.insertionNotAllowed,events:c,insertedRange:b}},_insertNodesAtPosition:function(a,c,b){var d=!1,h=c,e=[],f=null,k=null,g=c=null,l=!1,m=!1;a.forEach(function(c,n){var p=this._insertNodeAtPosition(c,h,b);e=e.concat(p.insertedRootContainers);l=p.insertedContainerAtEndOfContainer;d=d||p.insertionNotAllowed;m=m||p.containerWasSplit;g=p.lastInsertedNode;if(!d){f=f||p.insertedRange.getStartPosition();
p=p.insertedRange.getEndPosition();if(!k||0>y.comparePositions(k,p))k=p;h=(p=a[n+1])&&p.isInstanceOf(E)?k:g.endPosition()}},this);f&&(c=new B(f,k));return{insertionNotAllowed:d,insertedRange:c,insertedRootContainers:e,insertedContainerAtEndOfContainer:l,containerWasSplit:m,lastInsertedNode:g}},_insertNodeAtPosition:function(a,c,b){return this._doesReadOnlyBlockInsertion(c)?{insertedRootContainers:[],insertedRange:null,insertionNotAllowed:!0,lastInsertedNode:null}:(b=this._findInsertionPositionWithinContainer(a,
c,b))?this._insertNodeInCompatiblePosition(a,b):this._insertUsingRule(a,c)},_doesReadOnlyBlockInsertion:function(a){d.assert(!a.getNode().isRootNode(),"This function does not support root");var c=a;for(a=c.getNode();c.isAtEdge()&&!a.isRootContainer();)c=this._createEquivalentPositionInContainer(c,a.parent),a=a.parent;var c=a.isRootContainer()&&c.isAtRightEdge(),b=a.nextSibling();return c&&b&&b.startNode()&&!b.startNode().isReadOnly()?!1:a.isReadOnly()},_findInsertionPositionWithinContainer:function(a,
c,b){var d=c,h=c.getNode();c.getOffset();for(c=this._insertionRuleService.getRulesForNode(a);h;){var e=this._insertionRuleService.getRulesForNode(h),f=c.canInsertInContainer(h),e=e.getReceivingInstruction(d,a);if(b&&f)return d;var k=this._insertionRuleService.RECEIVING_INSTRUCTION;if(this._insertionRuleService.isInstructionOfType(e,k.CONTINUE_AT_POSITION))d=e.getPosition();else{if(this._insertionRuleService.isInstructionOfType(e,k.INSERT_IF_COMPATIBLE)&&f)return d;if(this._insertionRuleService.isInstructionOfType(e,
k.CONTINUE_UP)||this._insertionRuleService.isInstructionOfType(e,k.INSERT_IF_COMPATIBLE)){if(h.isRootContainer())break;d=this._createEquivalentPositionInContainer(d,h.parent)}else throw Error("rtc.model.InternalDocument._findInsertionPositionWithinContainer: Invalid instruction: "+e.getType());}d.getOffset();h=d.getNode()}return null},_insertNodeInCompatiblePosition:function(a,c){var b=c.getNode().getEquivalentChildPositions(c.getOffset())[0];d.assert(b,"MW.rtc.model.InternalDocument: Expected a valid insertion position");
if(!b.isAtEdge()){d.assert(b.getNode().isSplittable(b.getOffset()),"MW.rtc.model.InternalDocument: Insertion was requested at a non-splittable position");var h=this._splitForInsertion(b).firstPart,b=new x(h,h.maxOffset())}b.isAtLeftEdge()&&!b.isAtRightEdge()?this._insertNodeWithEvent(a,b.getNode(),"before"):this._insertNodeWithEvent(a,b.getNode(),"after");var h=a.startPosition(),e=a.endPosition(),b=b.getNode().parent.CHILD_TEXT_SEPARATOR,f=e.getNode().nextNode();0<b.length&&f&&(e=f.startPosition());
b=a.nextSibling();f=a.previousSibling();b&&(b.isEmpty()&&b.isTextNode())&&this.deleteNode(b,{node:a,offset:a.maxOffset()});f&&(f.isEmpty()&&f.isTextNode())&&this.deleteNode(f,{node:a,offset:0});return{insertedRootContainers:[],insertedRange:new B(h,e),insertionNotAllowed:!1,insertedContainerAtEndOfContainer:!1,lastInsertedNode:a}},_insertUsingRule:function(a,c){var b,h,e,f,k,g,l=[];b=c.getNode().isRootContainer()?c:this._createEquivalentPositionInContainer(c);k=b.getNode();f=k.previousSibling();k=
k.nextSibling();var m=this._findNextBreakablePosition(b);k=this._insertionRuleService.getRulesForNode(a).getTopLevelInsertionInstruction(b,f,k,a,m);var n=m=!1;if(k)if(k.insertInRoot){var p,q=k.insertInRoot.insertionPosition||b;f=k.insertInRoot.containerConstructor?new k.insertInRoot.containerConstructor([a]):a;p=k.insertInRoot.relationToPosition;if(k.insertInRoot.siblingConstructor)for(var r=new k.insertInRoot.siblingConstructor([]),s=r;s.getDefaultChild&&s.getDefaultChild();){var w=this.createNode(s.getDefaultChild());
s.addChild(w);s=w}if(p===this._insertionRuleService.RELATION.AFTER){if(k.insertInRoot.siblingConstructor){h=this._insertContainerInRoot(r,b.getNode(),"after");var t=h.getEndPosition(),l=[r];g=r}else g=f;h=this._insertContainerInRoot(f,b.getNode(),"after");m=!0;e=!1;l.unshift(f);n=!1}if(p===this._insertionRuleService.RELATION.BEFORE){if(k.insertInRoot.siblingConstructor){h=this._insertContainerInRoot(r,b.getNode(),"before");var u=h.getStartPosition(),l=[r]}h=this._insertContainerInRoot(f,b.getNode(),
"before");l.push(f);n=m=e=!1;g=f}if(p===this._insertionRuleService.RELATION.AT||k.insertInRoot.insertionPosition)b=this._insertRootContainerInCompatiblePosition(f,q),h=b.insertedRange,m=b.insertedContainerAtEndOfContainer,e=b.insertionNotAllowed,l=b.insertedRootContainers,n=b.containerWasSplit,g=f;e?(d.error("MW.rtc.InternalDocument: Insertion not allowed."),g=h=null):(u=u||h.getStartPosition(),t=t||h.getEndPosition(),h=new B(u,t))}else k.insertAlternateNodes&&(b=this._insertNodesAtPosition(k.insertAlternateNodes,
b),l=b.insertedRootContainers,h=b.insertedRange,m=b.insertedContainerAtEndOfContainer,e=!1,g=b.lastInsertedNode);else d.error("MW.rtc.InternalDocument: No insertion instructions found"),l=[],h=null,e=!0,g=null;return{insertedRootContainers:l,insertedRange:h,insertionNotAllowed:e,insertedContainerAtEndOfContainer:m,containerWasSplit:n,lastInsertedNode:g}},_insertRootContainerInCompatiblePosition:function(a,c){var b,h,e=!1;h=c.getOffset();var f=!1;a.children.forEach(this._ensureMaxTextLength,this);
if(c.isAtLeftEdge())h=this._insertContainerInRoot(a,c.getNode(),"before");else if(c.isAtRightEdge())h=this._insertContainerInRoot(a,c.getNode(),"after"),f=!0;else if(c.getNode().isSplittable(h)){for(e=c.getNode().getEquivalentChildPositions(c.getOffset())[0];e.getNode().children&&0<e.getNode().children.length;)e=e.getNode().getEquivalentChildPositions(e.getOffset())[0];e=this._splitContainerAtPosition(e).first;h=e.endPosition();b=new x(e,e.maxOffset());e=!0;b=this._insertContainerInRoot(a,b.getNode(),
"after");h=new B(h,b.getEndPosition())}else return d.error("MW.rtc.model.InternalDocument: Insertion was requested at a non-splittable position"),{insertedRootContainers:[],insertedRange:null,insertionNotAllowed:!0,insertedContainerAtEndOfContainer:!1,containerWasSplit:!1,lastInsertedNode:null};return{insertedRootContainers:[a],insertedRange:h,insertionNotAllowed:!1,insertedContainerAtEndOfContainer:f,containerWasSplit:e,lastInsertedNode:a}},_insertContainerInRoot:function(a,c,b){a.children.forEach(this._ensureMaxTextLength,
this);this._insertNodeWithEvent(a,c,b);c=a.startPosition();a=(b=a.nextSibling())?b.startPosition():a.endPosition();return new B(c,a)},_findNextBreakablePosition:function(a){var c=a.getNode(),b=a.getOffset();if(!a.isAtEdge())for(;b<c.maxOffset()&&!c.isSplittable(b);)b++;return new x(c,b)},_createEquivalentPositionInContainer:function(a,c){var b=a.getNode();c=c||b.rootContainer();b=b.offsetInContainer(c)+a.getOffset();return new x(c,b)},_insertNode:function(a,c,b){var d=this._convertRelationToIndex(c,
b);b=d.parentNode;var d=d.index,h=n.create(a,c,0);c=r.create(a.parent,a,c);this._insertChildren(b,[a],d);c=new M(this,h,c);this._executeCommand(c);return a},_insertNodeWithEvent:function(a,c,b){var d=this._convertRelationToIndex(c,b),h=d.parentNode,d=d.index;if(h.isRootNode()&&h.children.length){var e=d-1,f=0;d===h.children.length&&(f=h.lastChild().maxOffset());0===d&&(e=0);e=m.create(e,e+1,f,1);this.onPreDocumentChanged(e)}this._insertChildren(h,[a],d);this._notifyInsertNode(a,c,b)},_convertRelationToIndex:function(a,
c){var d,h;"first"===c?(h=a,d=0):"last"===c?(h=a,d=h.children.length):"before"===c?(h=a.parent,d=b.indexOf(h.children,a)):"after"===c&&(h=a.parent,d=b.indexOf(h.children,a)+1);return{parentNode:h,index:d}},deleteNode:function(a,c){if(!c){var b=a.previousSibling(),h=a.nextSibling();c={node:null,offset:0};if(b)c.node=b,c.offset=b.maxOffset();else if(h)c.node=h;else{var e=this._insertDefaultTextNode(a,"after");c.node=e.getNode()}}e=a.parent;d.assert(e,"deleteNode called without parent");this._notifyDeleteNode(a,
c);this._notifyDeleteChildren(a,c);var f=e.children.indexOf(a),e=new G(this,e,f,1);this._executeCommand(e);return{previousSibling:b,nextSibling:h}},removeChildren:function(a,c,b){a=new G(this,a,c,b);return this._executeCommand(a)},_insertChildren:function(a,c,b){a=new C(this,a,c,b);this._executeCommand(a)},updateTextInNode:function(a,c,b,d){this._insertTextInNode(a,c,b);c=c.length;this._deleteTextInNode(a,c+b,c+d)},_insertTextInNode:function(a,c,b){var d=q.create(a,b,c.length),d=new M(this,d);this._executeCommand(d);
d=new N(this,a,b,0,c);this._executeCommand(d);a=s.create(a,b,c.length);d=new M(this,null,a);this._executeCommand(d)},deleteText:function(a,c,b){a.isTextNode()&&this._deleteTextInNode(a,c,b)},_deleteTextInNode:function(a,c,b){c=c||0;void 0===b&&(b=a.getText().length);if(0!==b-c){var d=s.create(a,c,b-c),d=new M(this,d);this._executeCommand(d);d=new N(this,a,c,b-c,"");this._executeCommand(d);a=q.create(a,c,b-c);d=new M(this,null,a);this._executeCommand(d)}},changeNodeAttributes:function(a,c){var b;b=
new P(this,a,c);this._executeCommand(b);b=v.create(a);b=new M(this,b,b);this._executeCommand(b)},setReadOnlyLine:function(a,c){var b=this.getLineNode(a);if(b.isReadOnly()===c)return!1;b.readOnly=c;this.onNodeChange(v.create(b));return!0},_executeCommand:function(a){if(!this._editBlockController||!this._editBlockController.getActiveBlock)return a.execute();var c=this._editBlockController.getActiveBlock();return!c?(d.assert("No block active"),a.execute()):c.pushAndExecuteCommand(a)},getNodeById:function(a){return w.searchNodeById(a,
this.root)},startBlockEdit:function(a){a=a||{};this._blockEditsStack.push(a);return a},endBlockEdit:function(a){d.assert(a===this._blockEditsStack[this._blockEditsStack.length-1],"InternalDocument: Start and End block edits' blocks do not match.");this._blockEditsStack.pop();0===this._blockEditsStack.length&&this._emitPendingEvents()},emitDocumentEvents:function(a){this._pendingDocumentEvents=this._pendingDocumentEvents.concat(a);0===this._blockEditsStack.length&&this._emitPendingEvents()},_emitPendingEvents:function(){var a=
this._pendingDocumentEvents;0<a.length&&(this._pendingDocumentEvents=[],this.onDocumentChanged(a))},onDocumentReset:function(){this._documentState+=1},readOnlyChanged:function(a){},onNodeChange:function(a){},newDocument:function(a){this.openTextDocument("",a)},openTextDocument:function(a,c){this._setTextInDocument(a,c);this.onDocumentReset()},_setTextInDocument:function(a,c){this.root=new I([]);var b=[""];a&&(b=h.textLineArray(a));var d;for(d=0;d<b.length;d+=1){var e=h.DEFAULT_TEXT_NODE;e.text=b[d];
var f=h.DEFAULT_CONTAINER_NODE;f.children=[e];e=this.createNode(f);this._insertNode(e,this.root,"last");this._ensureMaxTextLength(e.startNode())}this.setReadOnly(c)},formatTemplates:{},registerFormatTemplates:function(a){var c;for(c=0;c<a.length;c+=1)this.formatTemplates[a[c].name]=a[c].method},createContainerForType:function(a){a=this.formatTemplates[a];return!a?null:a()},serialize:function(a){a=a||this.root;return a.serialize()},deserialize:function(a){this.root=this._deserializeNode(a);this.onDocumentReset()},
_deserializeNode:function(a){return this._contentConverter.unpack(a)},getState:function(){return this._documentState},getTextInRange:function(a,c,b,d){if(a===b)return a.getText().substring(c,d);var h=b.rootContainer(),e=a.rootContainer();if(e===h)return e.getText().substring(a.offsetInContainer()+c,b.offsetInContainer()+d);var f=this.root.CHILD_TEXT_SEPARATOR;a=e.getText().substring(a.offsetInContainer()+c)+f;for(e=e.nextSibling();e&&e!==h;)a+=e.getText(),(e=e.nextSibling())&&(a+=f);return a+h.getText().substring(0,
b.offsetInContainer()+d)},deleteTextRange:function(a,c,b){if(a.isReadOnly())return 0;a=a.startNode();for(var d=a.getText().length,h=a,e=0;0<b&&a;)d=a.getText().length,d<=b?(b-=d,a=a.nextSibling()):(h=a,e=b,b=0);if(!a)return 0;b=c;var f,k;e+b<=d?(f=a,k=e+b):(b-=d-e,a=a.nextSibling());if(!f)for(;0<b&&a;)d=a.getText().length,d<b?(b-=d,a=a.nextSibling()):(f=a,k=b,b=0);if(!f)return 0;f={startPosition:new x(h,e),endPosition:new x(f,k),startNode:h,endNode:f,startPos:e,endPos:k,isLocal:!0,fileEndSelected:!1};
f=this.deleteSelection(f);this.emitDocumentEvents([f]);return c},isReadOnly:function(){return this.root&&this.root.readOnly},setReadOnly:function(a,c){this.root&&this.root.readOnly!==a&&(a=void 0===a?!1:a,this.root.readOnly=a,(void 0===c?0:c)||this.readOnlyChanged(a))},startNode:function(){return this.root.startNode()},endNode:function(){return this.root.endNode()},getChild:function(a,c){c=c||this.root;return 0<=a&&c.children&&c.children.length>=a?c.children[a]:null},_getChildIndex:function(a,c){c=
c||this.root;return b.indexOf(c.children,a)},getLineNode:function(a,c){return this.getChild(a,c)},getLineNumber:function(a,c){return this._getChildIndex(a,c)},getMaxLineNumber:function(a){return(a=a||this.root)&&a.children&&a.children.length},getPositionForLineColumn:function(a,c){var b=this.getLineNode(a-1);h.assert(b,"Caret requested for invalid line!");return b.getPositionFromOffset(c-1)},getRangeForLineColumn:function(a,c,b,d){a=this.getPositionForLineColumn(a,c);b=this.getPositionForLineColumn(b,
d);b=new B(a,b);return D.trimRange(b)},getRangeForLine:function(a){a=this.getLineNode(a-1);return new B(a.startPosition(),a.endPosition())},getFullRange:function(){return new B(this.root.startPosition(),this.root.endPosition())},_getOrCreateEditablePosition:function(a,c){h.isEdgeOfTextLevelContainer(a,c)&&!a.containsTextNodes()&&(c+=a.offsetInContainer(a.parent),a=a.parent);if(a.isTextNode()&&!a.isReadOnly()&&!h.isTextLevelContainer(a))return new x(a,c);if(a.textContainer().isReadOnly())return new x;
var b=0<c?a.nextSibling():a.previousSibling();return b?!b.isTextNode()||b.isReadOnly()||h.isTextLevelContainer(b)?this._insertDefaultTextNode(a,0<c?"after":"before"):new x(b,0<c?0:b.maxOffset()):this._insertDefaultTextNode(a,0<c?"after":"before")},_insertDefaultTextNode:function(a,c){var b=this.createNode(a.textContainer().getDefaultChild());this._insertNode(b,a,c);return new x(b,0)},insertBreakInTextNode:function(a,c){var b=this._getOrCreateEditablePosition(a,c);a=b.getNode();c=b.getOffset();if(!a)return null;
b=a.textContainer();if(b.isReadOnly())return null;var d=this.getLineNumber(b.rootContainer()),h=d;b.isRootContainer()&&(h+=1);var e=a.offsetInContainer()+c,d=m.create(d,h,e,1);this.onPreDocumentChanged(d);h=!(0===c&&!a.previousSibling());b=this._splitContainerInNode(b,a,c,!0,h);h=b.startNode();h.nextSibling()&&h.isEmpty()&&this.mergeTextNodeWithSibling(h.nextSibling());d.line=this.getLineNumber(b.rootContainer());return{newNode:b,event:d}},_ensureMaxTextLength:function(a,c){c=c||0;var b=null;if(a.isTextNode())for(var d=
a.getText();d.length>this.MAX_NODE_TEXT_LENGTH;){if(a.containsTextNodes()){for(d=a.children.length-1;0<=d;d-=1)this._ensureMaxTextLength(a.children[d]);break}a=this._splitTextNodeAt(a,this.MAX_NODE_TEXT_LENGTH);c<this.MAX_NODE_TEXT_LENGTH?b||(b=a):c-=this.MAX_NODE_TEXT_LENGTH;a=a.nextSibling();d=a.getText()}return new x(b||a,c)},deleteSelection:function(a){h.assert(a,"Selection should never be null at this point.");var c=this.getLineNumber(a.startNode.rootContainer()),b=this.getLineNumber(a.endNode.rootContainer()),
d=a.endNode.offsetInContainer()+a.endPos,c=l.create(c,b,d);this.onPreDocumentChanged(c);b=a.startNode;b===a.endNode?b.isTextNode()&&!b.containsTextNodes()?this._deleteRangeInNodeAndMerge(b,a.startPos,a.endPos):0===a.startPos&&a.endPos===b.maxOffset()&&this.deleteNodeAndMerge(b):this._deleteRangeBeyondNodeAndMerge(a);return c},_deleteRangeBeyondNodeAndMerge:function(a){var c=a.startNode,b=a.endNode,d=a.endNode.rootContainer().previousSibling()===a.startNode.rootContainer(),e=h.isAtEndOfContainer(a.startPosition,
a.startNode.rootContainer()),f=h.isAtStartOfContainer(a.endPosition,a.endNode.rootContainer());if(!e||!f||!d)a=this._splitAtSelection(a,!0),c=a.startNode.prevNode(),b=a.endNode.nextNode(),d={node:c,offset:c.maxOffset(),endNode:b,endOffset:0},this.deleteRange(a.startNode,a.endNode,d);a=!c.textContainer().isRootContainer();d=new x(b,0);c.rootContainer()!==b.rootContainer()&&(this._canMergeContainerWithSibling(b.rootContainer())?d=this._mergeContainerWithSibling(b.rootContainer()):b.rootContainer().isEmpty()&&
this.deleteNode(b.rootContainer(),{node:c,offset:c.maxOffset()}));c.rootContainer()&&(a&&c.textContainer()!==b.textContainer()&&this._canMergeContainerWithSibling(b.textContainer())&&(d=this._mergeContainerWithSibling(b.textContainer())),c.textContainer()===d.getNode().textContainer()&&(this.mergeTextNodeWithSibling(c,!0),this.mergeTextNodeWithSibling(b),c.isEmpty()&&(a=c.nextSibling())&&this.mergeTextNodeWithSibling(a),h.isInTextLevelContainer(c)&&this.mergeTextNodeWithSibling(c.parent,!0),h.isInTextLevelContainer(b)&&
this.mergeTextNodeWithSibling(b.parent)))},_deleteRangeInNodeAndMerge:function(a,c,b){var d=a.previousSibling(),h=a.nextSibling();if(0===c&&b===a.maxOffset()&&(d||h))return this.deleteNodeAndMerge(a);this.deleteText(a,c,b)},deleteNodeAndMerge:function(a){a=this.deleteNode(a);a.previousSibling&&a.nextSibling&&this.mergeTextNodeWithSibling(a.nextSibling)},deleteRange:function(a,c,b){if(!c||c===a)this.deleteNode(a,b);else{var d=a?a.textContainer():c.textContainer();a=a||d.children[0];var h=c.textContainer();
d===h&&a.parent===c.parent?(this._deleteRangeInContainer(d,a,c,b),0===d.children.length&&this.deleteNode(d,b)):(d=this.splitContainerAtNode(a.rootContainer(),a,!0,!0),h=this.splitContainerAtNode(c.rootContainer(),c,!1,!0),this._deleteRangeInContainer(this.root,d,h,b))}},_deleteRangeInContainer:function(a,c,b,d){if(!c&&!b)this._emptyNode(a,d);else if(a=c||a.children[0],a===b)this.deleteNode(a,d);else for(c=null;a;){c=a.nextSibling();this.deleteNode(a,d);if(c===b){this.deleteNode(c,d);break}a=c}},createNode:function(a,
c){c=c||{};"string"===typeof a&&(c.className=a,a=c);return this._deserializeNode(a)},cloneNode:function(a,c){return this._deserializeNode(this.serialize(a))},cloneNodeWithoutChildren:function(a){a=this.serialize(a);a.children&&0<a.children.length&&(a.children=[]);a=this._deserializeNode(a);a.resetUniqueAttributes();return a},_notifyInsertNode:function(a,c,b){h.assert(a,"Inserted node does not exist.");var d=a.parent;b="after"===b?{node:c.endNode(),offset:c.endNode().maxOffset()}:{node:c.startNode(),
offset:0};this._generateUndoEventsForInsertNode(a,b);a=r.create(d,a,c);a=new M(this,null,a);this._executeCommand(a)},_generateUndoEventsForInsertNode:function(a,c){var b=n.create(a,c.node,c.offset,c.endNode,c.endOffset),b=new M(this,b,null);this._executeCommand(b);a.children&&a.children.forEach(function(a){this._generateUndoEventsForInsertNode(a,c)},this)},_notifyDeleteNode:function(a,c){h.assert(a,"Node for deletion does not exist.");c=c||{node:null,offset:0};var b=n.create(a,c.node,c.offset,c.endNode,
c.endOffset),d=r.create(a.parent,a),b=new M(this,d,b);this._executeCommand(b)},_notifyDeleteChildren:function(a,c){var b=a.children;if(b&&0<b.length){var d;for(d=0;d<b.length;d+=1)this._notifyDeleteNode(b[d],c),this._notifyDeleteChildren(b[d],c)}},_emptyNode:function(a,c){this._notifyDeleteChildren(a,c);a.empty()},_insertContainerRange:function(a,c){var b=c.getLineColumn().line-1,d=c.node.rootContainer(),h="after",e,f,k=!0,g=!1;if(d.isEmpty())e=d,k=!1;else if(c.node===d.startNode()&&0===c.offset)h=
"before",f=new x(c.node,c.offset),k=!1,g=!0;else if(c.node!==d.endNode()||c.offset!==c.node.maxOffset())this._splitContainerInNode(d,c.node,c.offset),h="before",f=new x(d.startNode(),0),g=!0;var l,n;for(l=0;l<a.length;l+=1){n=this._deserializeNode(a[l]);var q=this._convertRelationToIndex(d,h);this._insertChildren(q.parentNode,[n],q.index);n.isTextContainerNode()&&(n.children.length?n.children.forEach(function(a){a.isTextContainerNode()&&!a.children.length&&this._insertDefaultTextNode(a,"first")},
this):this._insertDefaultTextNode(n,"first"));n.children&&n.children.forEach(this._ensureMaxTextLength,this);this._notifyInsertNode(n,d,h);k&&(0===l&&n.previousSibling()&&this._canSpliceContainers(n,n.previousSibling()))&&(f=this._mergeContainerWithSibling(n),n.parent||(n=f.node.rootContainer()));d=n.parent?n:f.node.rootContainer();h="after"}f=n.endNode();f=new x(f,f.maxOffset());(d=n.nextSibling())&&g&&(f=n.isEmpty()||this._canSpliceContainers(n,d)?this._mergeContainerWithSibling(d):new x(d.startNode(),
0));e&&this.deleteNode(e,{node:n.startNode(),offset:0});e=this.getLineNumber(f.getNode().rootContainer());for(g=[];b<=e;b+=1)n=this.getLineNode(b),d=n.getText(),g.push(p.create(b,b,new x(n,0),d)),b!==e&&g.push(m.create(b,b+1,d.length,1));return{newPosition:f,event:g}},_insertNodeRange:function(c,b){var d=a.isCodeContainer(b.node)||a.isNonExecutableCodeContainer(b.node),e=c.map(function(a){a=this._deserializeNode(a);if(d){var c=this._insertionRuleService.getRulesForNode(a),e=b.getNode().rootContainer();
if(c.canInsertInContainer(e))return a;c=h.DEFAULT_TEXT_NODE;c.text=a.getText().replace(/[\r\n]+$/," ");a=this.createNode(c)}return a},this),e=e.filter(function(a){return!a.isEmpty()});if(0===e.length)return{newPosition:b,event:[]};e=this.insertAtPosition(e,b);return{newPosition:e.insertedRange.getEndPosition(),event:e.events}},insertContent:function(a,c){d.assert(0<a.length);var b=this._deserializeNode(a[0]);return b.isTextContainerNode()?1===a.length&&!b.childrenAreContainers?this._insertNodeRange(a[0].children,
c):this._insertContainerRange(a,c):this._insertNodeRange(a,c)},_splitTextNodeAt:function(a,c,b,d,h,e){var f,k,g;if(!d&&(0===c||c>=a.maxOffset()))return a;d=this.cloneNode(a,h);b?(d.deleteText(c),h="before",k=0,g=c):(d.deleteText(0,c),h="after",k=c,g=a.text.length-c);f=t.create(d,a,k);f=new M(this,f,null);this._executeCommand(f);f=s.create(a,k,g);f=new M(this,f,null);this._executeCommand(f);f=new N(this,a,k,g,"");this._executeCommand(f);h=this._convertRelationToIndex(a,h);this._insertChildren(h.parentNode,
[d],h.index);c=u.create(a,c,d,b,e);f=new M(this,null,c);this._executeCommand(f);return a},_splitNodeAt:function(a,c,b,d,e){if(a.isTextNode()&&!h.isTextLevelContainer(a))return this._splitTextNodeAt(a,c,b,d,!1,e);if(a.isOpaqueNode()){if(!d||d&&a.isReadOnly())return a;e=a.textContainer().getDefaultChild();if(!e)return a;var f=this.createNode(e);0===c?(e=a.previousSibling(),d=a,e||(this._insertNodeAtPosition(f,new x(a,c)),e=f)):(e=a,d=a.nextSibling(),d||(this._insertNodeAtPosition(f,new x(a,c)),d=f));
return b?d:e}if(!a.children||0===c&&b||c>=a.children.length||!b&&c===a.children.length-1)return a;d=this.cloneNodeWithoutChildren(a);b?(d.children=this.removeChildren(a,0,c),this._insertNode(d,a,"before")):(d.children=this.removeChildren(a,c+1,a.children.length-c-1),this._insertNode(d,a,"after"));b=t.create(d,a,c);c=u.create(a,c,d,!0,e);c=new M(this,b,c);this._executeCommand(c);return a},_splitContainerAtPosition:function(a){var c=a.getNode().rootContainer(),b=a.getLineColumn(),d=1===b.column||b.column===
c.maxOffset()+1,h=d?-1:0,e=0===a.getOffset(),f=a.getOffset()===a.getNode().maxOffset();e||f?this.splitContainerAtNode(c,a.getNode(),e,d,h):a.getNode().isInstanceOf(F)?this.splitContainerAtNode(c,a.getNode(),!1,!0,h):this._splitContainerInNode(c,a.getNode(),a.getOffset());return{first:this.getLineNode(b.line-1),second:this.getLineNode(b.line)}},splitContainerAtNode:function(a,c,b,d,h){b&&!c.previousSibling()?c=this._splitNodeAt(c,0,!0,d,h):!b&&!c.nextSibling()&&(c=this._splitNodeAt(c,c.maxOffset(),
!1,d,h));for(d=!0;d;){var e=c.parent;if(e.isRootContainer()||e===a)d=!1;c=this.getLineNumber(c,e);c=this._splitNodeAt(e,c,b,!1,h)}return c},_splitContainerInNode:function(a,c,b,d,e){var f=!1,k=0;if(0<b&&b>=c.maxOffset()){var g=c.nextSibling();g?(c=g,b=0):(f=!0,k=1)}else 0===b&&!c.previousSibling()&&(0===c.maxOffset()&&c.nextSibling()?c=c.nextSibling():(f=!0,k=-1));g=!c.isOpaqueNode();if(!h.isTextLevelContainer(c)&&h.isEdgeOfTextLevelContainer(c,b)){var l=c.parent.previousSibling();0===b&&0<c.maxOffset()&&
l?(h.isTextLevelContainer(l)||(c=c.parent.previousSibling(),b=c.maxOffset()),g=!1):0<b&&c.parent.nextSibling()&&(c=c.parent.nextSibling(),b=0,g=!1)}g&&(c=this._splitTextNodeAt(c,b,!0,f,e,k));b=c.parent;for(c=this._getChildIndex(c,b);b;){c=this._splitNodeAt(b,c,!0,!1,k);if(b===a||!b.parent)break;b=b.parent;c=this._getChildIndex(c,b)}return d?b:b.previousSibling()},_splitAtSelection:function(a,c){var b=a.startNode,d=a.endNode,b=c&&(0===a.endPos&&!d.previousSibling()||a.endPos===d.maxOffset()&&!d.nextSibling());
!b&&(0===a.endPos&&d.previousSibling())&&(d=d.previousSibling(),a.endPos=d.maxOffset());var d=this._splitNodeAt(d,a.endPos,!1,b),h=a.startPos===a.startNode.maxOffset();a.isLocal?(c=c&&(!d.previousSibling()||!d.nextSibling()),d=b=this._splitNodeAt(d,a.startPos,!0,c)):(b=a.startNode,c=c&&(!b.previousSibling()||!b.nextSibling()),b=this._splitNodeAt(b,a.startPos,!0,c));a.startNode=b;h&&!c?(b=b.nextSibling())?(a.startNode=b,a.startPos=0):a.startPosAtEnd=!0:a.startPos=0;a.endNode=d;0<a.endPos?a.endPos=
d.maxOffset():a.endPosAtStart=!0;return a},_splitForInsertion:function(a){var c=a.getNode(),b=a.getOffset();if(a.isAtLeftEdge())return{firstPart:c.previousSibling(),secondPart:c};if(a.isAtRightEdge())return{firstPart:c,secondPart:c.nextSibling()};if(c.isTextNode()&&!h.isTextLevelContainer(c))return a=this._splitTextNodeAt(c,b,!1,!1,!1,!1),{firstPart:a,secondPart:a.nextSibling()};a=c.getEquivalentChildPositions(b)[0];b=(a=this._splitForInsertion(a).firstPart)?this._getChildIndex(a,c):0;a=this.cloneNodeWithoutChildren(c);
a.children=this.removeChildren(c,b+1,c.children.length-b-1);this._insertNode(a,c,"after");b=u.create(c,b,a,!0,!1);b=new M(this,null,b);this._executeCommand(b);return{firstPart:c,secondPart:a}},mergeTextNodeWithSibling:function(a,c){var b=c?a.nextSibling():a.previousSibling(),d=c?a.maxOffset():0;return!b||b.isEmpty()&&(this.deleteNode(b,{node:a,offset:d}),b=c?a.nextSibling():a.previousSibling(),!b)?new x(a,d):!a.isTextNode()||h.isTextLevelContainer(a)||b.className!==a.className||a.readOnly||b.readOnly?
new x(a,d):0===a.getText().length?this._mergeEmptyTextNodeWithSibling(a,c):!0===a.compareStyleAttributes(b)?this._mergeTextNodeWithSibling(a,c):new x(a,d)},_mergeEmptyTextNodeWithSibling:function(a,c){var b=c?a.nextSibling():a.previousSibling(),d=c?a.maxOffset():0;this.changeNodeAttributes(a,{cssClass:null});if(1<a.parent.children.length){this._insertTextInNode(a,b.text,0);this.changeNodeAttributes(a,b.getStyleAttributes());this.onNodeChange(t.create(b,a,0));var h=c?0:a.maxOffset();this.deleteNode(b,
{node:a,offset:h})}return new x(a,d)},_mergeTextNodesInRange:function(a){var c;c=a.getStartPosition().getNode();var b=a.getEndPosition().getNode(),d=c.rootContainer(),h=b.rootContainer(),e=a.getStartPosition().getLineColumn().column-1;a=a.getEndPosition().getLineColumn().column-1;for(var f=c;f;){c=this.mergeTextNodeWithSibling(f);this._ensureMaxTextLength(f);if(f===b){this.mergeTextNodeWithSibling(f,!0);this._ensureMaxTextLength(f);break}f=c.getNode().nextNode()}b=d.getPositionFromOffset(e);h=h.getPositionFromOffset(a);
return new B(b,h)},_mergeTextNodeWithSibling:function(a,c){var b,d,h,e,f=c?a.nextSibling():a.previousSibling(),k=c?a.maxOffset():0;e=a.getText();d=f.getText();if(e.length+d.length>=this.MAX_NODE_TEXT_LENGTH)return new x(a,k);c?(b=new N(this,a,a.text.length,0,d),this._executeCommand(b),b=!1,e=h=e.length):(b=new N(this,a,0,0,d),this._executeCommand(b),h=t.create(a,a,d.length),b=new M(this,null,h),this._executeCommand(b),b=!0,h=0,k=e=d.length);h=t.create(f,a,h);d=u.create(a,e,f,b,void 0);b=new M(this,
d,h);this._executeCommand(b);d=this._getChildIndex(f,f.parent);this.removeChildren(f.parent,d,1);return new x(a,k)},_mergeContainerWithSibling:function(a,c){var b,d;c?(b=a.nextSibling(),d=new x(a.endNode(),a.endNode().maxOffset())):(b=a.previousSibling(),d=new x(a.startNode(),0));if(!b)return d;if(b.isEmpty()){if(a.isEmpty())return d=new x(b.startNode(),0),this.deleteNode(a,d),d;d=c?new x(a.endNode(),a.endNode().maxOffset()):new x(a.startNode(),0);this.deleteNode(b,d)}else{var h=this.containerType(b.textContainer());
if(h!==this.containerType(a)&&(a=this.convertParagraph(h,a),h!==this.containerType(a)))return d;d=c?this.spliceContainers(a,b):this.spliceContainers(b,a)}return d},spliceContainers:function(a,c){var b,d=this.removeChildren(c);b=a.children.length;this._insertChildren(a,d,b);var h=a.children[0<b?b-1:0];w.forAllDescendants(d,f.hitch(this,function(a){a=new M(this,{node:a,newNode:h,offset:0});this._executeCommand(a)}));var d=u.create(a,b,c),e=t.create(c,a,void 0),d=new M(this,d,e);this._executeCommand(d);
this.deleteNode(c,{node:a,offset:0});return this.mergeTextNodeWithSibling(a.children[b])},_canMergeContainerWithSibling:function(a,c){if(a.isReadOnly())return!1;var b=c?a.nextSibling():a.previousSibling();return!b||b.isReadOnly()?!1:a.className===b.className?a.canMergeContainerWithSibling?a.canMergeContainerWithSibling(a,b):!0:b.isEmpty()||a.isEmpty()||a.isTextContainerNode()&&b.isTextContainerNode()?!0:!1},_canSpliceContainers:function(a,c){return a.isReadOnly()||c.isReadOnly()?!1:c.isEmpty()&&!a.childrenAreContainers?
!0:a.className===c.className?a._canSpliceContainers?a._canSpliceContainers(a,c):!0:!1},containerType:function(a){var c="none";a&&a.containerType&&(c=a.containerType());return c},convertParagraph:function(c,b){if(this.containerType(b)===c||!b.isTextContainerNode())return b;var d=null,h=null;if(h=this.createContainerForType(c))d=h.container,h=h.textContainer||d;else return b;if(b.firstChild().isTextContainerNode())return b;if(a.isCodeContainer(b)||a.isCodeContainer(h)){var e=this._textNodeService.createTextNodeForContainer(b.getText().replace(/(\r\n|\n|\r)/gm,
" "),h);h.addChild(e);this._insertNode(d,b,"before");this.deleteNode(b,{node:e,offset:0});this._ensureMaxTextLength(e);return d}this._insertNode(d,b,"before");this.spliceContainers(h,b);return d},createContiguousRange:function(a,c,b){a={startNode:a.getNode(),startPos:a.getOffset(),endNode:c.getNode(),endPos:c.getOffset(),isLocal:a.getNode()===c.getNode()};b=this._splitAtSelection(a,b);return{startNode:b.startNode,endNode:b.endNode}},_buildEventList:function(a,c,b,d){var h=[],e=[],f=[],k=a.getStartPosition(),
g=k.getNode().rootContainer();a=a.getEndPosition();var l=a.getNode().rootContainer(),n=k.getLineColumn().line===a.getLineColumn().line,q=g===b[0],r=l===b[b.length-1];if(n&&0===b.length)return b=this._createTextInsertionEventsForRange(k,a),0===b.length&&(h=this.getLineNumber(k.getNode().rootContainer()),b.push(p.create(h,h,k,""))),b;q||(h=this._createTextInsertionEventsForRange(k,g.endPosition()));r||(f=this._createTextInsertionEventsForRange(l.startPosition(),a));d&&(d=k.getLineColumn().line-1,k=
k.getLineColumn().column-1,e.push(m.create(d,d+1,k,1)));b.forEach(function(a){var b=this.getLineNumber(a),d,h;c?(d=b-1,h=a.previousSibling().maxOffset()):(d=b,h=a.maxOffset());var f=a.startPosition();a=a.endPosition();b=f.getLine()!==b||a.getLine()!==b?[]:this._createTextInsertionEventsForRange(f,a);c||(e=e.concat(b));e.push(m.create(d,d+1,h,1));c&&(e=e.concat(b))},this);return b=h.concat(e).concat(f)},_createTextInsertionEventsForRange:function(a,c){for(var b=[],d=!a.isAtLeftEdge(),h=!c.isAtRightEdge(),
e,f,k=a.getNode(),g=c.getNode().nextNode(),l;k&&k!==g;){l=this.getLineNumber(k.rootContainer());e=k.getText();f=0;h&&k===c.getNode()&&(f=0,e=e.substr(0,c.getOffset()));d&&k===a.getNode()&&(f=a.getOffset(),e=e.substr(f));if(0<e.length||k.isOpaqueNode())f=new x(k,f),b.push(p.create(l,l,f,e));k=k.nextNode()}return b}})})},"MW/rtc/model/events/InsertBreakEvent":function(){define("dojo/_base/declare MW/rtc/model/DocumentConstants MW/rtc/model/DocumentEventUtilities MW/rtc/model/Mutation ./UndoableEvent ./NumberOfLinesChangedEvent".split(" "),
function(g,f,e,d,b,a){var c=g(b,{constructor:function(a,c,b,d){this.type=f.INSERT_BREAK_EVENT;this.line=a;this.column=b;this.numberOfLines=d},getMutation:function(){return d.createFromEvent(this,d.MUTATION_TYPE.INSERTION)},destroy:function(){},getUndoEvent:function(){return a.create(this.startLine,this.endLine,-1)}});return{create:function(a,b,d,g){e.assertValidLines(a,b,f.INSERT_BREAK_EVENT);return new c(a,b,d,g)}}})},"MW/rtc/model/events/nodechange/DeleteNodeEvent":function(){define(["dojo/_base/declare",
"./NodeChangeEventBase","./NodeChangeEventTypes"],function(g,f,e){var d=g(f,{constructor:function(b,a,c,d,f){this.type=e.DELETE_NODE;this.node=b;this.newNode=a;this.newOffset=c;this.newEndNode=d;this.newEndOffset=f},destroy:function(){}});return{create:function(b,a,c,h,e){return new d(b,a,c,h,e)}}})},"MW/rtc/model/events/nodechange/NodeChangeEventBase":function(){define(["dojo/_base/declare"],function(g){return g(null,{constructor:function(f){this.node=f},destroy:function(){}})})},"MW/rtc/model/events/nodechange/DeleteTextNodeEvent":function(){define(["dojo/_base/declare",
"./NodeChangeEventBase","./NodeChangeEventTypes"],function(g,f,e){var d=g(f,{constructor:function(b,a,c){this.type=e.DELETE_TEXT;this.node=b;this.offset=a;this.length=c},destroy:function(){}});return{create:function(b,a,c){return new d(b,a,c)}}})},"MW/rtc/model/events/nodechange/InsertNodeEvent":function(){define(["dojo/_base/declare","./NodeChangeEventBase","./NodeChangeEventTypes"],function(g,f,e){var d=g(f,{constructor:function(b,a,c){this.type=e.INSERT_NODE;this.node=b;this.newNode=a;this.referenceSibling=
c},destroy:function(){}});return{create:function(b,a,c){return new d(b,a,c)}}})},"MW/rtc/model/events/nodechange/InsertTextNodeEvent":function(){define(["dojo/_base/declare","./NodeChangeEventBase","./NodeChangeEventTypes"],function(g,f,e){var d=g(f,{constructor:function(b,a,c){this.type=e.INSERT_TEXT;this.node=b;this.offset=a;this.length=c},destroy:function(){}});return{create:function(b,a,c){return new d(b,a,c)}}})},"MW/rtc/model/events/nodechange/MergeNodeEvent":function(){define(["dojo/_base/declare",
"./NodeChangeEventBase","./NodeChangeEventTypes"],function(g,f,e){var d=g(f,{constructor:function(b,a,c){this.type=e.MERGE_NODE;this.node=b;this.newNode=a;this.offset=c},destroy:function(){}});return{create:function(b,a,c){return new d(b,a,c)}}})},"MW/rtc/model/events/nodechange/SplitNodeEvent":function(){define(["dojo/_base/declare","./NodeChangeEventBase","./NodeChangeEventTypes"],function(g,f,e){var d=g(f,{constructor:function(b,a,c,d,f){this.type=e.SPLIT_NODE;this.node=b;this.offset=a;this.newNode=
c;this.nodeChanged=d;this.lineStartOrEnd=f},destroy:function(){}});return{create:function(b,a,c,h,e){return new d(b,a,c,h,e)}}})},"MW/rtc/model/events/nodechange/UpdateAttributesNodeEvent":function(){define(["dojo/_base/declare","./NodeChangeEventBase","./NodeChangeEventTypes"],function(g,f,e){var d=g(f,{constructor:function(b){this.type=e.UPDATE_ATTRIBUTES;this.node=b},destroy:function(){}});return{create:function(b){return new d(b)}}})},"MW/rtc/nodes/OpaqueNode":function(){define(["dojo/_base/declare",
"MW/rtc/nodes/LeafNode"],function(g,f){return g([f],{constructor:function(){},className:"OpaqueNode",text:"",getTextForPositioning:function(){var e,d="";for(e=0;e<this.maxOffset();e+=1)d+="\ufffc";return d},isTextNode:function(){return!1},isOpaqueNode:function(){return!0},maxOffset:function(){return 1},insertText:function(e){},deleteText:function(e,d){},getStyleAttributes:function(){return{}},canSpliceContainers:function(e,d){return!1},canMergeContainerWithSibling:function(e,d){return!1},_serializeAttributes:function(e){e.text=
this.getText()}})})},"MW/rtc/plugins/undoredo/commands/InsertChildrenCommand":function(){define(["dojo/_base/declare","mw-log/Log","MW/rtc/plugins/undoredo/commands/CommandInterface"],function(g,f,e){return g(e,{constructor:function(d,b,a,c){this._model=d;this._targetNode=b;this._children=a;this._offset=c},execute:function(){var d=this._offset;this._children.forEach(function(b,a){this._targetNode.children.splice(d+a,0,b);b.parent=this._targetNode;b.children&&b.children.forEach(function(a){a.parent||
(a.parent=b)})},this)},unexecute:function(){this._targetNode.children.splice(this._offset,this._children.length);this._children.forEach(function(d){d.parent=null},this)}})})},"MW/rtc/plugins/undoredo/commands/CommandInterface":function(){define(["dojo/_base/declare","mw-log/Log"],function(g,f){return g(null,{_NODE_IN_MODEL_ERROR:"Node must be in the model.",constructor:function(){},execute:function(){f.assert("Subclasses must override execute.")},unexecute:function(){f.assert("Subclasses must override unexecute.")}})})},
"MW/rtc/plugins/undoredo/commands/NodeChangeEventCommand":function(){define(["dojo/_base/declare","mw-log/Log","MW/rtc/model/DocumentConstants","MW/rtc/plugins/undoredo/commands/CommandInterface"],function(g,f,e,d){return g(d,{constructor:function(b,a,c){this._model=b;this._undoEvent=a;this._redoEvent=c},execute:function(){if(this._redoEvent)this._model.onNodeChange(this._redoEvent)},unexecute:function(){if(this._undoEvent)this._model.onNodeChange(this._undoEvent)}})})},"MW/rtc/plugins/undoredo/commands/RemoveChildrenCommand":function(){define(["dojo/_base/declare",
"mw-log/Log","MW/rtc/plugins/undoredo/commands/CommandInterface"],function(g,f,e){return g(e,{constructor:function(d,b,a,c){this._model=d;this._targetNode=b;this._offset=a||0;this._count=c;this._removedNodes=[]},execute:function(){this._removedNodes=this._targetNode.children.splice(this._offset,0<this._count?this._count:this._targetNode.children.length);this._removedNodes.forEach(function(d){d.parent=null},this);return this._removedNodes},unexecute:function(){var d=this._offset;this._removedNodes.forEach(function(b,
a){this._targetNode.children.splice(d+a,0,b);b.parent=this._targetNode},this)}})})},"MW/rtc/plugins/undoredo/commands/ReplaceTextCommand":function(){define(["dojo/_base/declare","mw-log/Log","MW/rtc/plugins/undoredo/commands/CommandInterface"],function(g,f,e){return g(e,{constructor:function(d,b,a,c,h){this._model=d;this._targetNode=b;this._offset=a;this._length=c;this._text=h;this._replacement=""},execute:function(){this._replacement=this._targetNode.text.substr(this._offset,this._length);this._setText(this._targetNode,
this._text,this._length)},unexecute:function(){this._setText(this._targetNode,this._replacement,this._text.length)},_setText:function(d,b,a){d.text=d.text.substr(0,this._offset)+b+d.text.substr(this._offset+a)}})})},"MW/rtc/plugins/undoredo/commands/UpdateAttributesCommand":function(){define(["dojo/_base/declare","mw-log/Log","MW/rtc/plugins/undoredo/commands/CommandInterface"],function(g,f,e){return g(e,{constructor:function(d,b,a){this._model=d;this._targetNode=b;this._newAttributes=a;this._oldAttributes=
{}},execute:function(){this._oldAttributes=this._targetNode.updateAttributes(this._newAttributes)},unexecute:function(d){this._targetNode.updateAttributes(this._oldAttributes)}})})},"MW/rtc/nodes/contentconverter/ContentConverterPluginProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./ContentConverterPlugin"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.nodes.contentconverter.converter"]}},createInstance:function(d){return new e(d)}})})},
"MW/rtc/nodes/contentconverter/ContentConverterPlugin":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractRecursiveConverterPlugin"],function(g,f){return g(f,{_classNameToConstructor:null,constructor:function(e){this._initializeRecursiveConverter(e);this._classNameToConstructor={};e.forEach(function(d){d=d.getApplicableNodeClass();this._classNameToConstructor[d.prototype.className]=d},this)},pack:function(e){return this._getConverter(e).pack(e)},unpack:function(e){return this._getConverterByConstructor(this._classNameToConstructor[e.className]).unpack(e)}})})},
"MW/rtc/abstract/AbstractRecursiveConverterPlugin":function(){define(["dojo/_base/declare","./AbstractConverterPlugin"],function(g,f){return g(f,{_initializeRecursiveConverter:function(e){this._createConverterMap(e);this._setAsMainConverter(e)},_setAsMainConverter:function(e){e.forEach(function(d){d.setMainConverter(this)},this)}})})},"MW/rtc/abstract/AbstractConverterPlugin":function(){define(["dojo/_base/declare","MW/rtc/core/NodeMap"],function(g,f){return g(null,{_createConverterMap:function(e){this._nodeMap=
new f(e)},_getConverter:function(e){return this._nodeMap.get(e)},_getConverterByConstructor:function(e){return this._nodeMap.getByConstructor(e)}})})},"MW/rtc/core/NodeMap":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/browsersupport/BrowserSupportUtilities","MW/rtc/browsersupport/PseudoMap","mw-log/Log"],function(g,f,e,d,b){return g(null,{_USE_ES6_MAP:!1,constructor:function(a){this._map=this._USE_ES6_MAP?e.createMap():new d;a.forEach(this.register,this)},register:function(a){this._register(a,
!1)},registerOverwrite:function(a){this._register(a,!0)},_register:function(a,c){b.assert(a.getApplicableNodeClass,"MW/rtc/core/NodeMap: Must implement getApplicableNodeClass method");var d=a.getApplicableNodeClass(),e=d.prototype.className;b.assert(c||!this._map.has(d),"MW/rtc/core/NodeMap: Can only have one mapping for "+e+"; Overwriting");this._map.set(d,a)},forEach:function(a,c){this._map.forEach(a,c)},get:function(a){return this.getByConstructor(a.constructor)},getByConstructor:function(a){for(var c=
null;a&&!c;)c=this._map.get(a),a=a.superclass?a.superclass.constructor:null;return c}})})},"MW/rtc/nodes/contentconverter/inner/LineNodeContentConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LineNodeContentConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/nodes/contentconverter/inner/LineNodeContentConverter":function(){define(["dojo/_base/declare","MW/rtc/nodes/inner/LineNode",
"../base/InnerNodeContentConverter"],function(g,f,e){return g(e,{getApplicableNodeClass:function(){return f}})})},"MW/rtc/nodes/contentconverter/base/InnerNodeContentConverter":function(){define(["dojo/_base/declare","mw-log/Log","MW/rtc/nodes/InnerNode","./NodeContentConverter"],function(g,f,e,d){return g(d,{getApplicableNodeClass:function(){return e},unpack:function(b){var a=this._unpackChildren(b.children);return new (this.getApplicableNodeClass())(a,b)},_unpackChildren:function(b){return!b?(f.warn("InnerNodeContentConverter: children array was falsy, treating as empty"),
[]):b.map(function(a){return this._mainConverter.unpack(a)},this)}})})},"MW/rtc/nodes/contentconverter/inner/RootNodeContentConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./RootNodeContentConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/nodes/contentconverter/inner/RootNodeContentConverter":function(){define(["dojo/_base/declare","MW/rtc/nodes/inner/RootNode",
"../base/InnerNodeContentConverter"],function(g,f,e){return g(e,{getApplicableNodeClass:function(){return f}})})},"MW/rtc/nodes/contentconverter/leaf/PlainTextNodeContentConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./PlainTextNodeContentConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/nodes/contentconverter/leaf/PlainTextNodeContentConverter":function(){define(["dojo/_base/declare",
"MW/rtc/nodes/leaf/PlainTextNode","../base/LeafNodeContentConverter"],function(g,f,e){return g(e,{getApplicableNodeClass:function(){return f}})})},"MW/rtc/nodes/nodeconversionrules/InnerNodeConversionRulesProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./InnerNodeConversionRules"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/nodes/nodeconversionrules/InnerNodeConversionRules":function(){define(["dojo/_base/declare",
"MW/rtc/nodes/InnerNode","./base/AbstractNodeConversionRules"],function(g,f,e){return g(e,{constructor:function(){},getApplicableNodeClass:function(){return f},isConvertibleTo:function(d){return d.prototype.isInstanceOf(f)},isConvertibleFrom:function(d){return d.isInstanceOf(f)}})})},"MW/rtc/nodes/nodeconversionrules/base/AbstractNodeConversionRules":function(){define(["dojo/_base/declare","mw-log/Log","MW/rtc/abstract/AbstractRecursiveConverter"],function(g,f,e){return g(e,{getApplicableNodeClass:function(){f.error("Unimplemented: getApplicableNodeClass")},
isConvertibleTo:function(d){f.error("Unimplemented: isConvertibleTo")},isConvertibleFrom:function(d){f.error("Unimplemented: isConvertibleFrom")}})})},"MW/rtc/nodes/nodeconversionrules/NodeConversionRulesProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./NodeConversionRules"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/nodes/nodeconversionrules/NodeConversionRules":function(){define(["dojo/_base/declare",
"MW/rtc/nodes/Node","./base/AbstractNodeConversionRules"],function(g,f,e){return g(e,{constructor:function(){},getApplicableNodeClass:function(){return f},isConvertibleTo:function(d){return!1},isConvertibleFrom:function(d){return!1}})})},"MW/rtc/events/KeyHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/events/KeyHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document","rtc.actionservice","rtc.domnode"]}},
createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/events/KeyHandler":function(){define("dojo/_base/array dojo/_base/connect dojo/_base/declare dojo/_base/event dojo/_base/lang dojo/aspect dojo/dom-construct dojo/dom-class dojo/has dojo/keys dojo/on mw-log/Log".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p){return e(null,{constructor:function(d,e,g){this._document=d;this._actionService=e;this._browserCutCopyPasteRequired=!1;this.keyMap={};this.dojoKeyNames=this._makeDojoKeyNameMap();this.keyCapture=
c.create("textarea",{"class":"keyCapture",value:"",autocapitalize:"off",autocomplete:"off",autocorrect:"off",spellcheck:!1});d=this.keyCapture.style;k("webkit")?d.borderColor="#FFFFFF":(d.border="none",d.borderWidth="0px");k("ios")&&h.add(this.keyCapture,"ios");(k("trident")||k("ie")||k("edge"))&&h.add(this.keyCapture,"ie");this._handlers=[];this._handlers.push(f.connect(this.keyCapture,"onkeypress",b.hitch(this,"onKeyPress")));this._handlers.push(m(this.keyCapture,"input",b.hitch(this,"handleInput")));
this._handlers.push(m(this.keyCapture,"focus",b.hitch(this,"onFocus")));this._handlers.push(m(this.keyCapture,"blur",b.hitch(this,"onBlur")));this._handleChromeMacOnKeyPress();this._handleFFWindowsOnKeyPress();this._handleChromeIEOnKeyPress();this.setDefaultInputHandler();this._addBindingsFromActionService();this._handlers.push(a.after(this._actionService,"addAction",b.hitch(this,"_handleAddAction"),!0));this._handlers.push(a.before(this._actionService,"removeAction",b.hitch(this,"_handleRemoveAction")));
this._handlers.push(a.after(this._actionService,"onActionChange",b.hitch(this,"_handleOnActionChange"),!0));this.place(g)},destroy:function(){this._handlers.forEach(function(a){a.remove()});this._handlers=[]},_handleChromeMacOnKeyPress:function(){k("mac")&&k("chrome")&&this._handlers.push(f.connect(this.keyCapture,"onkeydown",b.hitch(this,"onKeyDown")))},_handleFFWindowsOnKeyPress:function(){k("windows")&&k("ff")&&this._handlers.push(m(this.keyCapture,"keydown",b.hitch(this,"_keyPressSupportForCtrl")))},
_handleChromeIEOnKeyPress:function(){!k("mac")&&!k("ff")&&this._handlers.push(m(this.keyCapture,"keydown",b.hitch(this,"_keyPressSupportForChromeIE")))},_keyPressSupportForChromeIE:function(a){if(!this._inputHandlerIsInInteraction()){if(a.altKey||k("chrome")&&a.ctrlKey&&a.shiftKey){var c=!0;switch(a.keyCode){case 13:a.charOrCode=a.keyCode;break;default:c=!1}}c&&(this.onKeyPress(a),a.preventDefault())}},_keyPressSupportForCtrl:function(a){if(!this._inputHandlerIsInInteraction()&&a.ctrlKey){var c=!0;
switch(a.keyCode){case 35:case 36:a.charOrCode=a.keyCode;break;default:c=!1}c&&(this.onKeyPress(a),a.preventDefault())}},place:function(a){c.place(this.keyCapture,a)},prepareKeyCapture:function(a){this._inputHandlerIsInInteraction()||(a?(this.keyCapture.value="##",this._selectKeyCaptureContent()):(this.keyCapture.value="",window.setTimeout(b.hitch(this,function(){this.hasFocus()&&this._selectKeyCaptureContent()}),0)))},hasFocus:function(){return document.activeElement===this.keyCapture},blur:function(){this.keyCapture.blur()},
focus:function(){this.keyCapture.focus()},onFocus:function(a){k("ie")&&this._selectKeyCaptureContent()},enableBrowserCopyPaste:function(a){this._browserCutCopyPasteRequired=!0;var c=this;Object.keys(a).forEach(function(b){c.listenTo(b,a[b])})},listenTo:function(a,c){this._handlers.push(m(this.keyCapture,a,c))},onBlur:function(a){},_selectKeyCaptureContent:function(){if(this.keyCapture.setSelectionRange)try{this.keyCapture.setSelectionRange(0,this.keyCapture.value.length),this.hasFocus()||this.focus()}catch(a){}else try{this.keyCapture.select()}catch(c){}},
_caretPosInTextarea:function(){return this.keyCapture.value.length},setInputHandler:function(a){this._inputHandler=a},setDefaultInputHandler:function(){this.setInputHandler(this._inputHandlerText)},_inputHandlerIsInInteraction:function(){return this._inputHandler!==this._inputHandlerText},_inputHandlerText:function(a){this.keyCapture.value="";this._document.insertTextAtCurrentPosition(a)},handleInput:function(a){a=this.keyCapture.value;"##"===a.slice(0,2)?a=a.slice(2):"##"===a.slice(1)&&(a=a.slice(0,
1));a&&this._inputHandler(a,this._caretPosInTextarea())},_checkForBrowserCcpShortcuts:function(a){if(k("mac"))switch(a){case "meta_x":case "meta_c":case "meta_v":return this._browserCutCopyPasteRequired;default:return!1}switch(a){case "ctrl_x":case "shift_delete":case "ctrl_c":case "ctrl_insert":case "ctrl_v":case "shift_insert":return this._browserCutCopyPasteRequired;default:return!1}},_handleKeyBindingEvent:function(a,c,b){c=this._checkForBrowserCcpShortcuts(b)&&this._browserCutCopyPasteRequired?
1:c;switch(c){case 0:d.stop(a);break;case 1:break;case 2:a.preventDefault();break;default:p.error("Key event is not handled")}},onKeyPress:function(a){if(!this._inputHandlerIsInInteraction()){var c=this._keyEventID(a),b=this.keyMap[c];if(b&&0<b.length){this._handleKeyBindingEvent(a,0,c);a.target!==this.keyCapture&&this.focus();for(a=0;a<b.length;a+=1)if(!0===b[a]())return}this.setInputHandler(this._inputHandlerText)}},onKeyDown:function(a){if(!this._inputHandlerIsInInteraction()&&a.metaKey&&!a.ctrlKey){var c=
!0;switch(a.keyCode){case 37:case 39:case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 79:case 82:case 83:case 84:case 85:case 86:case 88:case 90:a.charOrCode=String.fromCharCode(a.keyCode).toLowerCase();break;case 13:case 190:case 191:case 219:case 221:case 220:a.charOrCode=a.keyCode;break;case 226:a.charOrCode=191;break;default:c=!1}c&&(this.onKeyPress(a),c=this._keyEventID(a),this._handleKeyBindingEvent(a,2,c))}},_resolvePlatformKey:function(a,
c){var b;if(c)for(b in c)if(c.hasOwnProperty(b)&&k(b))return c[b];return a},addBindings:function(a){g.forEach(a,function(a){this.addBinding(a)},this)},_addBindingsFromActionService:function(){this._actionService.getAllActions().forEach(function(a){(a.key||a.platformKey)&&this.addBinding(a)},this)},_handleAddAction:function(a){(a.key||a.platformKey)&&this.addBinding(a)},_handleRemoveAction:function(a){if((a=this._actionService.getAction(a))&&a.callback&&a.key){var c=this._resolvePlatformKey(a.key,
a.platformKey);c&&this.keyMap[c]&&this._removeKeyCallbackEntry(c,a.callback)}},_removeKeyCallbackEntry:function(a,c){var b=this.keyMap[a].indexOf(c);0<=b&&this.keyMap[a].splice(b,1)},_handleOnActionChange:function(a){var c=this._actionService.getAction(a.id);if("key"===a.key||"platformKey"===a.key)this.keyMap[a.oldValue]&&this._removeKeyCallbackEntry(a.oldValue,c.callback),this.addBinding(c);else if("callback"===a.key){var b=this._resolvePlatformKey(c.key,c.platformKey);b&&this.keyMap[b]&&(this._removeKeyCallbackEntry(b,
a.oldValue),this.keyMap[b].push(c.callback))}},addBinding:function(a){var c=this._resolvePlatformKey(a.key,a.platformKey);if(c){var b=this.keyMap[c]||[],d=a.callback;if(!d)var h=a.action,e=a.args,f=this._actionService,d=function(){var a=f.getAction(h),c=!1;a.enabled&&(c=a.callback.apply(a,e));return c};b.push(d);this.keyMap[c]=b}},removeBindings:function(a){this.keyMap[a]=[]},_keyEventID:function(a){var c=a.charOrCode,b=a.ctrlKey||a.metaKey||a.altKey;if("string"===typeof c&&!b)return c;k("mac")&&
k("matlab")&&(b=a.metaKey,a.metaKey=a.ctrlKey,a.ctrlKey=b);var b=a.ctrlKey?"ctrl_":"",d=a.metaKey?"meta_":"",h=a.altKey?"alt_":"";a=a.shiftKey?"shift_":"";c=this._keyName(c);a&&(c=c.toLowerCase());return b+d+h+a+c},_keyName:function(a){return"string"===typeof a?a:this.dojoKeyNames[a]||"unknown"},_makeDojoKeyNameMap:function(){var a=[];a[l.BACKSPACE]="backspace";a[l.DELETE]="delete";a[l.INSERT]="insert";a[l.ENTER]="enter";a[10]="enter";a[l.SHIFT]="shift";a[l.TAB]="tab";a[l.LEFT_ARROW]="left";a[l.RIGHT_ARROW]=
"right";a[l.UP_ARROW]="up";a[l.DOWN_ARROW]="down";a[l.PAGE_UP]="pageup";a[l.PAGE_DOWN]="pagedown";a[l.HOME]="home";a[l.END]="end";a[l.ESCAPE]="escape";a[l.F1]="f1";a[l.F3]="f3";a[l.F5]="f5";a[l.F7]="f7";a[l.F9]="f9";a[l.F10]="f10";a[l.F11]="f11";a[l.F12]="f12";a[190]=".";a[191]="/";a[219]="[";a[221]="]";a[220]="\\";return a}})})},"MW/rtc/hyperlinkservice/HyperlinkServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/hyperlinkservice/HyperlinkService","MW/rtc/core/provider/PluginProvider"],
function(g,f,e){var d=null,b=0;return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.executionservice"]}},createInstance:function(a){null===d&&(d=new f(a));b+=1;return d},destroyInstance:function(){b-=1;1>b&&(d.destroy(),d=null)}})})},"MW/rtc/hyperlinkservice/HyperlinkService":function(){define(["dojo/on","dojo/mouse","dojo/_base/declare","dojo/_base/lang","mw-log/Log"],function(g,f,e,d,b){return e(null,{_MATLAB_PROTOCOL:"matlab:",_SCHEME_REG_EXPRESSION:"^(http|https|ftp)://$",
constructor:function(a){this._executionService=a;this._hyperlinkhandler=this._attachHandlerForAllHyperlinks()},_isMatlabUrl:function(a){return a.substring(0,7)===this._MATLAB_PROTOCOL},_openUrlWithExecutionService:function(a){a=a.replace(/'/g,"''");a="web('"+a+"')";return this._executionService.streamingEval?(this._executionService.executionEval(a,this._executionService.streamingEval),!0):this._executionService.isMessageServiceRunning&&this._executionService.isMessageServiceRunning()?(this._executionService.executionEval(a),
!0):!1},_handleHyperlink:function(a,c){if(f.isMiddle(c)||f.isRight(c))c.stopPropagation(),c.preventDefault();else{var b=c.selectorTarget||c.srcElement||c.originalTarget;"A"===b.tagName&&a.call(this,b.getAttribute("href"))&&(c.stopPropagation(),c.preventDefault())}},_addEventListener:function(a,c){return g(a,".rteWindow a:click, .rteWindow a:auxclick, .rtcTooltip a:click, .rtcTooltip a:auxclick",d.hitch(this,"_handleHyperlink",c),!0)},_addEventListenerForScope:function(a,c){return g(a,"click",d.hitch(this,
"_handleHyperlink",c),!0)},openUrl:function(a){!this._openUrlWithExecutionService(a)&&-1===a.search(RegExp(this._SCHEME_REG_EXPRESSION,"i"))&&window.open(a,"_blank");return!0},_attachHandlerForAllHyperlinks:function(){return this._addEventListener(document,this.openUrl)},destroy:function(){this._hyperlinkhandler&&this._hyperlinkhandler.destroy&&this._hyperlinkhandler.destroy()}})})},"MW/rtc/plugins/internalhyperlinkservice/InternalHyperlinkServiceProvider":function(){define(["dojo/_base/declare",
"./InternalHyperlinkService","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:"rtc.hyperlinkservice rtc.domnode rtc.internaldocument rtc.cursor rtc.view rtc.actionservice".split(" ")}},createInstance:function(d,b,a,c,h,e){return new f(b,a,c,h,e,d)}})})},"MW/rtc/plugins/internalhyperlinkservice/InternalHyperlinkService":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/model/DocumentUtilities",
"MW/rtc/plugins/hyperlink/model/HyperlinkUtilities","MW/rtc/RichTextComponentFeatureEnum"],function(g,f,e,d,b){return g(null,{constructor:function(a,c,b,d,e,f){this._internalDocument=c;this._cursor=b;this._view=d;this._rtcDomNode=a;this._hyperlinkService=f;this._backwardStack=[];this._forwardStack=[];this._currentNode;e.loadActions(this._actions())},_actions:function(){return[{id:b.HYPERLINK.HYPERLINK_SERVICE_BACKWARD_ACTION,key:"alt_left",platformKey:{mac:"ctrl_alt_left"},enabled:!0,callback:f.hitch(this,
this._prefBookmark)},{id:b.HYPERLINK.HYPERLINK_SERVICE_FORWARD_ACTION,key:"alt_right",platformKey:{mac:"ctrl_alt_right"},enabled:!0,callback:f.hitch(this,this._nextBookmark)}]},_nextBookmark:function(){var a=this._forwardStack.pop();e.isInDocument(a)&&a!==this._currentNode&&(this._backwardStack.push(this._currentNode),this._cursor.setPosition(a.lastChild(),0,!0),0<a.maxOffset()&&this._view.scrollNodeToPercent(a.rootContainer(),0),this._currentNode=a)},_prefBookmark:function(){var a=this._backwardStack.pop();
e.isInDocument(a)&&a!==this._currentNode&&(this._forwardStack.push(this._currentNode),this._cursor.setPosition(a.lastChild(),0,!0),0<a.maxOffset()&&this._view.scrollNodeToPercent(a.rootContainer(),0),this._currentNode=a)},_isInternalUrl:function(a){return 0===a.indexOf(d.INTERNAL)},_openInternalHyperlink:function(a){if(a=d.getNodeForInternalUrl(this._internalDocument.root,a))this._currentNode=this._cursor.getNode().textContainer(),this._backwardStack.push(this._currentNode),this._forwardStack=[],
this._cursor.setPosition(a,0),this._view.scrollNodeToPercent(a.rootContainer(),0),this._currentNode=a;return!0},openUrl:function(a){return this._isInternalUrl(a)?this._openInternalHyperlink(a):this._hyperlinkService.openUrl(a)}})})},"MW/rtc/plugins/hyperlink/model/HyperlinkUtilities":function(){define(["MW/rtc/model/CodeUtilities"],function(g){return{INTERNAL:"internal:",URL_EXPRESSION:"(((\\S+):\\/\\/|(\\S+):(?!\\/)+|#)(\\S+).*)|(\\S+\\.\\S+)",_nextContainer:function(f){if(f.isTextContainerNode()||
f.isRootContainer()){var e=f.firstChild();return e&&e.isTextContainerNode()||(e=f.nextSibling())?e:f.parent.isRootNode()?null:(f=f.parent.nextSibling())?f:null}},getNodeForInternalUrl:function(f,e){if(0===e.indexOf(this.INTERNAL))for(var d=e.substring(this.INTERNAL.length),b=f.children[0];b;){if(b.anchorId&&b.anchorId===d)return b;b=this._nextContainer(b)}return null},getPossibleTarget:function(f){if(g.isCodeContainer(f))for(var e=f.previousSibling();g.isCodeContainer(e);)f=e,e=f.previousSibling();
return f},isHyperlinkValid:function(f){return f&&f.match(this.URL_EXPRESSION)?!0:!1}}})},"MW/rtc/model/io/serializers/providers/containers/TableOfContentsContainerSerializerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/model/io/serializers/containers/TableOfContentsContainerSerializer"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/model/io/serializers/containers/TableOfContentsContainerSerializer":function(){define(["dojo/_base/declare",
"dojo/_base/lang","MW/rtc/model/io/XmlUtils","MW/rtc/model/io/DocumentTag","MW/rtc/model/io/serializers/containers/ContainerSerializer"],function(g,f,e,d,b){return g(b,{_INTRODUCED_VERSION:"R2018a",write:function(a,c,b){var f=document.createElement(this.getNodeType()),g=e.createXMLElement(d.SDT_TAG),m=e.createXMLElement(d.SDT_PROPERTY_TAG),m=e.createSdtPartGalleryPropertyElement(m,this.getXMLType());g.appendChild(m);var p=e.createXMLElement(d.SDT_CONTENT_TAG);g.appendChild(p);a[0].anchorId&&(m=e.createBookmarkStart(d.BOOKMARK_PREFIX+
a[0].anchorId,a[0].anchorId),g.appendChild(m));a[0].children&&a[0].children.forEach(function(a){a=b.getSerializer(a.className).write(a,c,b);p.appendChild(a)},this);a[0].anchorId&&(a=e.createBookmarkEnd(a[0].anchorId),g.appendChild(a));f.appendChild(g);a=e.createTextParagraph("");g=e.createAlternateContent(this._INTRODUCED_VERSION,g,a);f.appendChild(g);return f},read:function(a,c,b){var k=!0,g={className:this.getNodeType(),children:[]},m;2<a.childNodes.length?(m=Array.prototype.slice.call(a.childNodes).reduce(f.partial(this._reduceByNodeType,
b),[]),m=m.map(function(a){return this._combineParagraphs(a)},this)):m=a.childNodes;for(var p=0;p<m.length;p++){var n=m[p].getElementsByTagNameNS(d.NAMESPACE_URL,d.PARAGRAPH_STYLE_TAG_NAME)[0],q=b.getSerializer(e.getClassName(n)),r={};q&&(r=q.read(m[p],c,b),r.readObject.className=e.getClassName(n),g.children.push(r.readObject),r.readStatus||(k=!1));if((n=e.getBookmarkStart(a.parentNode))&&n.id)g.anchorId=n.id}return{readObject:[g],readStatus:k}},_reduceByNodeType:function(a,c,b){a.getSerializer(e.getAttribute(b));
(a=c[c.length-1])&&e.getAttribute(a[0])===e.getAttribute(b)?a.push(b):c.push([b]);return c},_combineParagraphs:function(a){for(var c=a[0],b=1;b<a.length;b++){for(var d=c.lastElementChild;d.lastElementChild;)d=d.lastElementChild;for(d.textContent+="\n";1<a[b].children.length;)c.appendChild(a[b].children[1])}return c},getXMLType:function(){return"Table of Contents"},getNodeType:function(){return"TableOfContentsContainer"}})})},"MW/rtc/model/io/XmlUtils":function(){define(["MW/rtc/model/io/DocumentTag",
"MW/rtc/plugins/saveaspdf/utils/XSLConstants"],function(g,f){return{createDocument:function(e){var d;document.implementation&&document.implementation.createDocument&&(d=e===g.ROOT_TAG_NAME?document.implementation.createDocument(g.NAMESPACE_URL,g.NAMESPACE_TAG+":"+g.ROOT_TAG_NAME,null):document.implementation.createDocument(null,e,null));return d},createAlternateContent:function(e,d,b){var a=this.createAlternateContentXMLElementNS(g.MCNAMESPACE_TAG,g.ALTERNATECONTENT_TAG),c=this.createAlternateContentXMLElementNS(g.MCNAMESPACE_TAG,
g.CHOICE_TAG);c.setAttribute(g.REQUIRES_ATTRIBUTE_NAME,e);c.appendChild(d);a.appendChild(c);e=this.createAlternateContentXMLElementNS(g.MCNAMESPACE_TAG,g.FALLBACK_TAG);b&&e.appendChild(b);a.appendChild(e);return a},createAlternateContentXMLElementNS:function(e,d){return document.createElementNS(g.MARKUP_COMPATIBILITY_NAMESPACE,e+":"+d)},createXMLElement:function(e){e=!e?g.PARAGRAPH_TAG_NAME:e;e=g.NAMESPACE_TAG+":"+e;return document.createElementNS(g.NAMESPACE_URL,e)},createXMLElementNS:function(e,
d){e=e||g.NAMESPACE_TAG;d=!d?g.PARAGRAPH_TAG_NAME:d;return document.createElementNS(g.NAMESPACE_URL,e+":"+d)},createBookmarkStart:function(e,d){var b=this.createXMLElement(g.BOOKMARK_START_TAG_NAME);b.setAttributeNS(g.NAMESPACE_URL,g.NAMESPACE_TAG+":"+g.NAME_TAG,e);b.setAttributeNS(g.NAMESPACE_URL,g.NAMESPACE_TAG+":"+g.TYPE_ID_TAG,d);return b},createBookmarkEnd:function(e){var d=this.createXMLElement(g.BOOKMARK_END_TAG_NAME);d.setAttributeNS(g.NAMESPACE_URL,g.NAMESPACE_TAG+":"+g.TYPE_ID_TAG,e);return d},
createParagraphProperty:function(e){var d=this.createXMLElement(g.PARAGRAPH_PROPERTY_TAG_NAME),b=this.createXMLElement(g.PARAGRAPH_STYLE_TAG_NAME);b.setAttributeNS(g.NAMESPACE_URL,g.NAMESPACE_TAG+":"+g.PROPERTY_TAG,e);d.appendChild(b);return d},addParagraphProperty:function(e,d,b){d=this.createXMLElement(d);d.setAttributeNS(g.NAMESPACE_URL,g.NAMESPACE_TAG+":"+g.PROPERTY_TAG,b);e.appendChild(d);return e},createListType:function(e){var d=this.createXMLElement(g.NUMBER_PROPERTY_TAG),b=this.createXMLElement(g.NUMBER_ID_TAG);
b.setAttributeNS(g.NAMESPACE_URL,g.NAMESPACE_TAG+":"+g.PROPERTY_TAG,e);d.appendChild(b);return d},createTextParagraph:function(e){e=e||"";var d=this.createXMLElement(),b=this.createParagraphProperty(g.TEXT_FORMAT_VALUE);d.appendChild(b);b=this.createXMLElement(g.RUN_OF_TEXT_TAG_NAME);d.appendChild(b);var a=this.createXMLElement(g.TEXT_TAG_NAME);e=document.createTextNode(e);a.appendChild(e);b.appendChild(a);return d},createHyperLinkTag:function(e,d){var b=this.createXMLElement(g.HYPERLINK_TAG);b.setAttributeNS(g.NAMESPACE_URL,
g.NAMESPACE_TAG+":"+d,e);return b},createCustomXMLTag:function(e){var d=this.createXMLElement(g.CUSTOM_XML_TAG);d.setAttributeNS(g.NAMESPACE_URL,g.NAMESPACE_TAG+":"+g.CUSTOM_ELEMENT_TAG,e);return d},createCustomXMLProperty:function(e,d){var b=this.createXMLElement(g.CUSTOM_XML_PROPERTY),a=this.createXMLElement(g.CUSTOM_XML_ATTRIBUTE);a.setAttributeNS(g.NAMESPACE_URL,g.NAMESPACE_TAG+":"+g.NAME_TAG,e);a.setAttributeNS(g.NAMESPACE_URL,g.NAMESPACE_TAG+":"+g.CUSTOM_XML_VALUE_TAG,d);b.appendChild(a);return b},
createCustomXMLAttribute:function(e,d){var b=this.createXMLElement(g.CUSTOM_XML_ATTRIBUTE);b.setAttributeNS(g.NAMESPACE_URL,g.NAMESPACE_TAG+":"+g.NAME_TAG,e);b.setAttributeNS(g.NAMESPACE_URL,g.NAMESPACE_TAG+":"+g.CUSTOM_XML_VALUE_TAG,d);return b},getBookmarkStart:function(e){e=e.getElementsByTagNameNS(g.NAMESPACE_URL,g.BOOKMARK_START_TAG_NAME);if(e[0]&&e[0].attributes[0]){var d={};d.name=e[0].getAttributeNS(g.NAMESPACE_URL,g.NAME_TAG);d.id=e[0].getAttributeNS(g.NAMESPACE_URL,g.TYPE_ID_TAG);return d}},
getBookmarkEnd:function(e){e=e.getElementsByTagNameNS(g.NAMESPACE_URL,g.BOOKMARK_END_TAG_NAME);if(e[0]&&e[0].attributes[0])return e[0].attributes[0].nodeValue},getListType:function(e){return e.getElementsByTagNameNS(g.NAMESPACE_URL,g.NUMBER_PROPERTY_TAG)[0].getElementsByTagNameNS(g.NAMESPACE_URL,g.NUMBER_ID_TAG)[0].attributes[0].nodeValue},getParagraphProperty:function(e,d){var b=e.getElementsByTagNameNS(g.NAMESPACE_URL,d);return b&&b[0]&&b[0].attributes&&b[0].attributes[0]?b[0].attributes[0].nodeValue:
""},getAttribute:function(e){var d=e.getElementsByTagNameNS(g.NAMESPACE_URL,g.PARAGRAPH_PROPERTY_TAG_NAME);return d&&d[0]?(d=d[0].getElementsByTagNameNS(g.NAMESPACE_URL,g.PARAGRAPH_STYLE_TAG_NAME),d[0]?d[0].attributes[0].nodeValue:this.hasSectionBreak(e)?"sectionbreak":!1):!1},createSdtAliasPropertyElement:function(e,d){var b=this.createXMLElement(g.ALIAS_TAG);b.setAttributeNS(g.NAMESPACE_URL,g.NAMESPACE_TAG+":"+g.PROPERTY_TAG,d);e.appendChild(b);return e},createSdtPartGalleryPropertyElement:function(e,
d){var b=this.createXMLElement(g.DOC_PART_OBJ),a=this.createXMLElement(g.DOC_PART_GALLERY);b.appendChild(a);a.setAttributeNS(g.NAMESPACE_URL,g.NAMESPACE_TAG+":"+g.PROPERTY_TAG,d);e.appendChild(b);return e},getSdtAttribute:function(e){if(e=e.getElementsByTagNameNS(g.NAMESPACE_URL,g.SDT_PROPERTY_TAG))for(var d=0;d<e.length;d++){var b=e[d].getElementsByTagNameNS(g.NAMESPACE_URL,g.ALIAS_TAG);if(b&&b[0]&&b[0].attributes&&0<b[0].attributes.length||e[d].getElementsByTagNameNS(g.NAMESPACE_URL,g.DOC_PART_OBJ)&&
(b=e[d].getElementsByTagNameNS(g.NAMESPACE_URL,g.DOC_PART_GALLERY))&&b[0]&&b[0].attributes&&0<b[0].attributes.length)return b[0].attributes[0].nodeValue}return null},hasHyperLink:function(e){return e.hasAttributeNS(g.NAMESPACE_URL,g.DOC_LOCATION)||e.hasAttributeNS(g.NAMESPACE_URL,g.ANCHOR)},hasEquation:function(e){if(e=e.attributes[0])return"equation"===e.textContent},hasImage:function(e){if(e=e.attributes[0])return"image"===e.textContent},hasLiveControl:function(e){if(e=e.attributes[0])return"livecontrol"===
e.textContent},hasToCHeading:function(e){if(e.attributes&&e.attributes[0])return"TOCHeading"===e.attributes[0].textContent},hasToCItems:function(e){if(e.attributes&&e.attributes[0])return"TOC1"===e.attributes[0].textContent},hasSectionBreak:function(e){return 1===e.getElementsByTagNameNS(g.NAMESPACE_URL,g.SECTION_PROPERTY_TAG_NAME).length},getClassName:function(e){if(this.hasHyperLink(e))return"HyperlinkNode";if(this.hasEquation(e))return"EquationNode";if(this.hasText(e))return"RichTextNode";if(this.hasImage(e))return"ImageNode";
if(this.hasLiveControl(e))return"LiveControlNode";if(this.hasSectionBreak(e))return"SectionBreak";if(this.hasToCHeading(e))return"TableOfContentsHeadingNode";if(this.hasToCItems(e))return"TableOfContentsList"},hasText:function(e){return 0===e.getElementsByTagNameNS(g.NAMESPACE_URL,g.TEXT_TAG_NAME).length?!1:!0},getKeyFromValue:function(e,d){for(var b in e)if(e.hasOwnProperty(b))if("[object Array]"===Object.prototype.toString.call(e[b].type)){if(-1!==e[b].type.indexOf(d))return b}else if(e[b].type===
d||e[b]===d)return b},getURLExtension:function(e){var d="";e.match(/^(http|https):\/\//)&&(d=e.split(".").pop().split(/\#|\?/)[0].trim());return d},getImageExtension:function(e){var d=this.getURLExtension(e);d||(d=e.split(";")[0].split("/")[1]);return d},getTextFromRun:function(e){e=e.getElementsByTagNameNS(g.NAMESPACE_URL,g.TEXT_TAG_NAME);var d="";if(0===e.length)return d;for(var b=0;b<e[0].childNodes.length;b++)d+=e[0].childNodes[b].nodeValue;return d},isCode:function(e){return-1<e.className.indexOf(f.LINENODE_CLASS)},
serializeToFormattedString:function(e){e=(new window.XMLSerializer).serializeToString(e);return g.XML_HEADER+e}}})},"MW/rtc/model/io/DocumentTag":function(){define([],function(){return{XML_HEADER:'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e',NAMESPACE_URL:"http://schemas.openxmlformats.org/wordprocessingml/2006/main",RELATIONSHIP_TYPE:"http://schemas.mathworks.com/matlab/code/2013/relationships/document",IMAGE_RELATIONSHIP_TYPE:"http://schemas.mathworks.com/matlab/code/2013/relationships/image",
MATHML_RELATIONSHIP_TYPE:"http://www.w3.org/TR/MathML2/",DOCUMENT_TARGET:"/matlab/document.xml",DOCUMENT_CONTENT_TYPE:"application/vnd.mathworks.matlab.code.document+xml",NAMESPACE_TAG:"w",SCHEMA_TAG:"xmlns",ROOT_TAG_NAME:"document",BODY_TAG_NAME:"body",TYPE_TAG:"Type",TYPE_ID_TAG:"id",NUMBER_TAG:"num",NUMBER_PROPERTY_TAG:"numPr",NUMBER_ID_TAG:"numId",PARAGRAPH_TAG_NAME:"p",PARAGRAPH_PROPERTY_TAG_NAME:"pPr",PROPERTY_TAG:"val",PARAGRAPH_STYLE_TAG_NAME:"pStyle",JUSTIFCATION_TAG_NAME:"jc",RUN_OF_TEXT_TAG_NAME:"r",
RUN_OF_TEXT_PROPERTY_TAG_NAME:"rPr",BOOKMARK_PREFIX:"MW_",BOOKMARK_START_TAG_NAME:"bookmarkStart",BOOKMARK_END_TAG_NAME:"bookmarkEnd",TEXT_TAG_NAME:"t",BOLD_TAG_NAME:"b",ITALIC_TAG_NAME:"i",UNDERLINE_TAG_NAME:"u",RUN_OF_FONT:"rFonts",FONT_TYPE_TAG:"cs",MONOSPACE_TAG:"monospace",CODE_FORMAT_VALUE:"code",TEXT_FORMAT_VALUE:"text",TITLE_FORMAT_VALUE:"title",HEADING_FORMAT_VALUE:"heading",HEADING2_FORMAT_VALUE:"heading2",HEADING3_FORMAT_VALUE:"heading3",LIST_FORMAT_VALUE:"ListParagraph",UNORDERED_LIST_VALUE:"1",
ORDERED_LIST_VALUE:"2",RELATIONSHIP_ID_TAG_NAME:"relationshipId",HEIGHT_ATTRIBUTE_NAME:"height",WIDTH_ATTRIBUTE_NAME:"width",SECTION_PROPERTY_TAG_NAME:"sectPr",HYPERLINK_FORMAT_VALUE:"hyperlink",HYPERLINK_ID:"r:id",HYPERLINK_TAG:"hyperlink",DOC_LOCATION:"docLocation",ANCHOR:"anchor",CUSTOM_XML_TAG:"customXml",CUSTOM_ELEMENT_TAG:"element",NAME_TAG:"name",EQUATION_ELEMENT:"equation",CUSTOM_XML_PROPERTY:"customXmlPr",CUSTOM_XML_ATTRIBUTE:"attr",CUSTOM_XML_VALUE_TAG:"val",EQUATION_DISPLAY_STYLE:"displayStyle",
MCNAMESPACE_TAG:"mc",ALTERNATECONTENT_TAG:"AlternateContent",CHOICE_TAG:"Choice",REQUIRES_ATTRIBUTE_NAME:"Requires",FALLBACK_TAG:"Fallback",LIVE_CONTROL_CONTEXT_ATTRIBUTE_NAME:"context",LIVE_CONTROL_START_OFFSET_LINE_ATTRIBUTE_NAME:"startOffsetLine",LIVE_CONTROL_START_COLUMN_ATTRIBUTE_NAME:"startColumn",LIVE_CONTROL_END_OFFSET_LINE_ATTRIBUTE_NAME:"endOffsetLine",LIVE_CONTROL_END_COLUMN_ATTRIBUTE_NAME:"endColumn",LIVE_CONTROL_TEXT_ATTRIBUTE_NAME:"text",SDT_TAG:"sdt",SDT_CONTENT_TAG:"sdtContent",SDT_PROPERTY_TAG:"sdtPr",
DOC_PART_OBJ:"docPartObj",DOC_PART_GALLERY:"docPartGallery",ALIAS_TAG:"alias",MARKUP_COMPATIBILITY_NAMESPACE:"http://schemas.openxmlformats.org/markup-compatibility/2006"}})},"MW/rtc/plugins/saveaspdf/utils/XSLConstants":function(){define({UNORDERED_LIST:"unordered",ORDERED_LIST:"ordered",PARAGRAPH:"paragraph",LIST:"list",MATRIX:"matrix",VARIABLES:"variables",VARIABLE_STRING:"variablestring",INTERACTIVE_VARIABLE:"interactivevariable",FIGURES:"figures",TEXT:"text",WARNING_ERROR:"warningerror",BASE_DOCUMENT:"basedocument",
HYPERLINK:"hyperlink",IMAGE:"image",LIVE_CONTROL:"livecontrol",EQUATION:"equation",TABLEOFCONTENT:"tableOfContent",SYMEQUATION:"symequation",OUTPUT:"output",BASE_FONT:"Arial,MingLiU,STSong,MS Mincho,AppleGothic,Malgun Gothic,Noto Sans CJK,Droid Sans Fallback,Arial Unicode MS",SQUARE_LIST_LABEL:"\u2022",NBSP:"\u00a0",LINENODE_CLASS:"lineNode",INLINE_WRAPPER_CLASS:"inlineWrapper",TITLE_CLASS:"heading-1",HEADING1_CLASS:"heading-2",HEADING2_CLASS:"heading-3",HEADING3_CLASS:"heading-4",PARAGRAPH_CLASS:"paragraphNode",
LIST_CLASS:"RTClistNode",CODE_EXAMPLE_CLASS:"CodeExampleLine",HYPERLINK_CLASS:"hyperlinkNode",IMAGE_CLASS:"imageNode",LIVE_CONTROL_CLASS:"liveControlOuterNode",EQUATIONNODE_CLASS:"equationNode",TABLEOFCONTENT_CLASS:"ToC",OUTPUT_CLASS:"outputParagraph",MATRIX_CLASS:"embeddedOutputsMatrixElement",INTERACTIVE_MATRIX_CLASS:"embeddedOutputsVariableMatrixElement",VARIABLES_CLASS:"embeddedOutputsVariableElement",VARIABLE_STRING_CLASS:"embeddedOutputsVariableStringElement",FIGURES_CLASS:"embeddedOutputsFigure",
SYMEQUATION_CLASS:"embeddedOutputsSymbolicElement",SECTIONBREAK_CLASS:"sectionBreak",SECTIONBLOCK_CLASS:"SectionBlock",TEXT_CLASS:"embeddedOutputsTextElement",WARNING_CLASS:"embeddedOutputsWarningElement",ERROR_CLASS:"embeddedOutputsErrorElement",UNORDERED_LIST_NODENAME:"UL",ORDERED_LIST_NODENAME:"OL",BLOCK_CLASS_SUFFIX:"Block",TABLE:"table",TABLE_HEADER:"table-header",TABLE_COLUMN:"table-column",TABLE_ROW:"table-row",TABLE_DATA:"table-data",INTERACTIVE_VARIABLE_CLASS:"embeddedOutputsVariableTableElement",
EQUATION_CLASS:"MathEquation",INTERNAL_LINK_PREFIX:"internal:",DOTS:"dots",POINT_UNIT:"pt",REGEX_FOR_PX:/px/g,FONT_SCALING_FACTOR:0.75,AVAILABLE_WIDTH:525,ELLIPSIS_WIDTH:32,CHAR_WIDTH:7.22})},"MW/rtc/model/io/serializers/containers/ContainerSerializer":function(){define(["dojo/_base/declare","dojo/_base/lang","mw-utils/Utils","MW/rtc/model/io/XmlUtils","MW/rtc/model/io/serializers/Serializable"],function(g,f,e,d,b){return g(b,{read:function(a,c,b){var d=!0,e=[],f;Array.isArray(a)?a.forEach(function(a){f=
this._readParagraph(a,c,b);e.push(f.readObject)},this):(f=this._readParagraph(a,c,b),e=f.readObject);d=d&&f.readStatus;return{readObject:e,readStatus:d}},_readParagraph:function(a,c,b){for(var e=!0,f={className:this.getNodeType(),children:[]},g=0;g<a.childNodes.length;g++){var p=b.getSerializer(d.getClassName(a.childNodes[g])),n={};if(p&&(n=p.read(a.childNodes[g],c,b),f.children.push(n.readObject),n.readStatus||(e=!1),(p=d.getBookmarkStart(a))&&p.id))f.anchorId=p.id}return{readObject:f,readStatus:e}},
mustMerge:function(){return!1}})})},"MW/rtc/model/io/serializers/Serializable":function(){define(["dojo/_base/declare"],function(g){return g(null,{write:function(f,e){throw Error("Unimplemented Write Method in the handler for node type: "+this.getNodeType());},read:function(f,e){throw Error("Unimplemented Read Method in the handler for node type: "+this.getNodeType());},getXMLType:function(){throw Error("Unimplemented getXMLType Method: handler.getXMLType()");},getNodeType:function(){throw Error("Unimplemented getNodeType Method: handler.getNodeType()");
}})})},"MW/rtc/model/io/serializers/providers/containers/TableOfContentsHeadingSerializerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/model/io/serializers/containers/TableOfContentsHeadingSerializer"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/model/io/serializers/containers/TableOfContentsHeadingSerializer":function(){define(["dojo/_base/declare","dojo/_base/lang",
"MW/rtc/model/io/XmlUtils","MW/rtc/model/io/serializers/containers/RichTextContainerSerializer"],function(g,f,e,d){return g(d,{write:function(b,a,c){return this._writeParagraph(b,a,c)},read:function(b,a,c){return this._readParagraph(b,a,c)},getNodeType:function(){return"TableOfContentsHeadingNode"},getXMLType:function(){return"TOCHeading"}})})},"MW/rtc/model/io/serializers/containers/RichTextContainerSerializer":function(){define("dojo/_base/declare dojo/_base/lang mw-utils/Utils MW/rtc/model/io/DocumentTag MW/rtc/model/io/XmlUtils MW/rtc/model/io/serializers/containers/ContainerSerializer mw-log/Log".split(" "),
function(g,f,e,d,b,a,c){return g(a,{_ALIGN_CENTER:"center",_ALIGN_LEFT:"left",_RICH_TEXT_CLASS:"RichTextNode",write:function(a,c,b){var d=document.createElement(this.getXMLType());if(Array.isArray(a)){var e=this;a.forEach(function(a){e._createAndAppendParagraph(a,d,c,b)},this)}else this._createAndAppendParagraph(a,d);return d},_createAndAppendParagraph:function(a,c,b,d){(a=this._writeParagraph(a,b,d))&&c.appendChild(a)},_writeParagraph:function(a,e,f){var g=b.createXMLElement(),p=b.createParagraphProperty(this.getXMLType()),
p=b.addParagraphProperty(p,d.JUSTIFCATION_TAG_NAME,a.align);g.appendChild(p);a.anchorId&&(p=b.createBookmarkStart(d.BOOKMARK_PREFIX+a.anchorId,a.anchorId),g.appendChild(p));var n=!1;a.children.forEach(function(a){var b=f.getSerializer(a.className);b?g.appendChild(b.write(a,e,f)):(n=!0,c.assert(n,!0,"Unrecognized node type:"+a.className))},this);a.anchorId&&(a=b.createBookmarkEnd(a.anchorId),g.appendChild(a));n&&1===g.children.length&&(g=null);return g},read:function(a,c,e){var f=b.getParagraphProperty(a[0],
d.JUSTIFCATION_TAG_NAME),g=this.inherited(arguments);this._createAlignment(a,g.readObject,f,e);return g},_createAlignment:function(a,c,b,d){c.forEach(function(c){b?c.align=b:this._shouldBeCentered(a,c,d)?c.align=this._ALIGN_CENTER:c.align=this._ALIGN_LEFT},this)},_shouldBeCentered:function(a,c,b){a=!1;for(var d=c.children[0]?c.children[0].className:"",e=0;e<c.children.length;e+=1){var f=c.children[e],g=b.getSerializer(c.children[e].className).AUTO_CENTER_CLASS?!0:!1;if(f.className!==this._RICH_TEXT_CLASS&&
d!==f.className&&d!==this._RICH_TEXT_CLASS)return!1;if(g)a=g;else if(f.text&&0<f.text.trim().length)return!1}return a},getXMLType:function(){return"text"},getNodeType:function(){return"RichTextParagraphNode"},mustMerge:function(a,c){return b.getParagraphProperty(a,d.JUSTIFCATION_TAG_NAME)===b.getParagraphProperty(c,d.JUSTIFCATION_TAG_NAME)}})})},"MW/rtc/model/io/serializers/providers/containers/TableOfContentsListSerializerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"MW/rtc/model/io/serializers/containers/TableOfContentsListSerializer"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/model/io/serializers/containers/TableOfContentsListSerializer":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/model/io/XmlUtils","MW/rtc/model/io/serializers/containers/RichTextContainerSerializer"],function(g,f,e,d){return g(d,{write:function(b,a,c){return this._writeParagraph(b,a,
c)},read:function(b,a,c){return this._readParagraph(b,a,c)},getNodeType:function(){return"TableOfContentsList"},getXMLType:function(){return"TOC1"}})})},"MW/rtc/plugins/internalhyperlinkservice/AnchorProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./Anchor"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/internalhyperlinkservice/Anchor":function(){define(["dojo/_base/declare",
"MW/rtc/abstract/AbstractPlugin","MW/rtc/plugins/richtext/nodes/inner/HeadingNode","./model/AnchorGenerator"],function(g,f,e,d){return g(f,{_HEADER_PREFIX:"H_",_TITLE_PREFIX:"T_",constructor:function(b){this._internalDocument=b;this._tempAnchorIdRegister={}},createAnchor:function(b,a){var c="";!a&&b.isInstanceOf(e)&&(c=1===b.level?this._TITLE_PREFIX:this._HEADER_PREFIX);for(var h=d.createAnchorId(c);this._tempAnchorIdRegister[h];)h=d.createAnchorId(c);this._tempAnchorIdRegister[h]=b;return b.anchorId=
h},_updateAnchorIdRegister:function(){this._internalDocument.root.children.forEach(function(b){var a=b.anchorId;a&&!this._tempAnchorIdRegister[a]&&(this._tempAnchorIdRegister[a]=b)},this)},createHeadingIds:function(){var b=[];this._internalDocument.root.children.forEach(function(a){a.isInstanceOf(e)&&a.level&&(this.createNodeId(a),b[b.length]=a)},this);return b},createNodeId:function(b){var a=!b.isInstanceOf(e);this._updateAnchorIdRegister();b.anchorId&&!this._tempAnchorIdRegister[b.anchorId]&&(this._tempAnchorIdRegister[b.anchorId]=
b);return this._tempAnchorIdRegister[b.anchorId]===b?b.anchorId:this.createAnchor(b,a)}})})},"MW/rtc/plugins/richtext/nodes/inner/HeadingNode":function(){define(["dojo/_base/declare","MW/rtc/plugins/richtext/HeadingUtilities","MW/rtc/plugins/richtext/nodes/inner/RichTextParagraphNode"],function(g,f,e){return g([e],{constructor:function(d,b){this.level=b&&b.level?b.level:f.getLevelByHeadingFormat(f.getDefaultHeadingFormat())},className:"HeadingNode",containerType:function(){return f.getHeadingFormatByLevel(this.level)},
isSameTypeAs:function(d){return this.className===d.className&&this.level===d.level},canSpliceContainers:function(d,b){return d.level===b.level},isTextContainerNode:function(){return!0},_serializeAttributes:function(d){this.inherited(arguments);d.level=this.level}})})},"MW/rtc/plugins/richtext/HeadingUtilities":function(){define(["MW/rtc/plugins/richtext/ParagraphFormatsEnum"],function(g){return{_NODE_CLASS:"HeadingNode",_headingLevelLookup:{1:{format:g.TITLE,equationHeight:26},2:{format:g.HEADING1,
equationHeight:22},3:{format:g.HEADING2,equationHeight:19},4:{format:g.HEADING3,equationHeight:17}},_defaultFormat:g.HEADING1,_versionedFormats:{R2016a:[g.TITLE,g.HEADING1],R2018b:[g.HEADING2,g.HEADING3]},getDefaultHeadingFormat:function(){return this._defaultFormat},isHeadingNode:function(f){return f.className===this._NODE_CLASS},isFormatHeading:function(f){return!!this.getLevelByHeadingFormat(f)},getLevelByHeadingFormat:function(f){for(var e in this._headingLevelLookup)if(this._headingLevelLookup.hasOwnProperty(e)&&
this._headingLevelLookup[e].format===f)return Number(e)},getHeadingFormatByLevel:function(f){return this._headingLevelLookup[f]?this._headingLevelLookup[f].format:"none"},isFormatIntroducedInVersion:function(f,e){return!!this._versionedFormats[e]&&-1!==this._versionedFormats[e].indexOf(f)},getEquationHeightByLevel:function(f){return this._headingLevelLookup[f]?this._headingLevelLookup[f].equationHeight:0}}})},"MW/rtc/plugins/richtext/ParagraphFormatsEnum":function(){define([],function(){return{NORMAL:"text",
TITLE:"title",HEADING1:"heading",HEADING2:"heading2",HEADING3:"heading3"}})},"MW/rtc/plugins/richtext/nodes/inner/RichTextParagraphNode":function(){define(["dojo/_base/declare","MW/rtc/plugins/richtext/nodes/inner/RichTextContainerNode"],function(g,f){return g([f],{constructor:function(e,d){d&&(this.align=d.align,d.anchorId&&(this.anchorId=d.anchorId));this.align=this.align||"left";this.wrappable=!0},className:"RichTextParagraphNode",containerType:function(){return"text"},isTextContainerNode:function(){return!0},
_serializeAttributes:function(e){e.align=this.align;this.anchorId&&(e.anchorId=this.anchorId)}})})},"MW/rtc/plugins/internalhyperlinkservice/model/AnchorGenerator":function(){define(["mw-utils/Utils"],function(g){return{_createUID:function(){return g.generateUuid()},createAnchorId:function(f){return f+this._createUID()}}})},"MW/rtc/plugins/tableofcontents/TableOfContentsProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/tableofcontents/TableOfContents","MW/rtc/core/provider/PluginProvider"],
function(g,f,e){return g(e,{requires:function(){return{createInstance:"rtc.actionservice rtc.internaldocument rtc.document rtc.cursor rtc.richtext.anchor rtc.undoredo.controller rtc.draganddropnotifier rtc.divselection rtc.cutcopypaste rtc.cutcopypaste.converter rtc.view".split(" ")}},createInstance:function(d,b,a,c,h,e,g,m,p,n,q){return new f(d,b,a,c,h,e,g,m,p,n,q)}})})},"MW/rtc/plugins/tableofcontents/TableOfContents":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect ./model/TableOfContentsList ./model/TableOfContentsContainer ./model/TableOfContentsHeadingNode MW/rtc/abstract/AbstractPlugin MW/rtc/RichTextComponentFeatureEnum MW/rtc/plugins/richtext/nodes/inner/HeadingNode MW/rtc/plugins/undoredo/EditBlockConstants MW/rtc/model/SelectionUtilities ./TableOfContentsCreator ./TableOfContentsUtilities MW/rtc/model/DocumentUtilities MW/rtc/model/DocumentConstants MW/rtc/model/DocumentEventUtilities MW/rtc/model/Range MW/rtc/model/Position MW/rtc/plugins/richtext/nodes/inner/RichTextParagraphNode dojo/i18n!l10n/nls/richtext_actions".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w){return g(c,{_CURSOR_INSIDE_TOC_CSS_TAG:"insideToC",constructor:function(c,b,d,h,k,g,l,m,n,p,q){this._internalDocument=b;this._document=d;this._cursor=h;this._actionService=c;this._anchor=k;this._divSelection=m;this._view=q;this._dirtyToC=!1;c.loadActions(this._actions());this.own(e.before(this._document,"insertContent",f.hitch(this,"_insertContent")));this.own(e.before(l,"onDragOver",f.hitch(this,"_dragOver")));this.own(e.after(this._cursor,"onChange",
f.hitch(this,"_onChange")));this.own(e.after(g,"undo",f.hitch(this,"_onUndoRedo"),!0));this.own(e.after(g,"redo",f.hitch(this,"_onUndoRedo"),!0));this.own(e.after(this._document,"insertContent",f.hitch(this,"_onPasteUpdater")));this.own(e.after(this._document,"onDelete",f.hitch(this,"_updateActions")));this.own(e.after(this._internalDocument,"onDocumentReset",f.hitch(this,"_onDocumentReset"),!0));this.own(e.after(m,"_layout",f.hitch(this,"_checkSelection"),!0));this.own(e.after(this._internalDocument,
"onDocumentChanged",f.hitch(this,"_handleDocumentChanged"),!0));this.own(e.after(this._document,"onPreDeletion",f.hitch(this,"_onDelete"),!0));p.registerPasteHandler(a,f.hitch(this,"_handlePaste"));this._converter=p},createTableOfContents:function(){if(this._actionService.getAction(h.TABLE_OF_CONTENTS.TABLE_OF_CONTENTS_ACTION).enabled&&!this._tableOfContentsContainer){var a=this._anchor.createHeadingIds(),c=this._cursor.getSelection(),b=this._cursor.getPosition(),e;c&&(e=!m.isInSelection(d,c)?c:null);
c=this._document.startEdit();this._tableOfContentsContainer=p.createTableOfContents(a,this._internalDocument,this._cursor,c);this._updateActions();e?this._cursor.setSelection(e):(this._cursor.releaseAnchor(),b.line+=1,this._cursor.setPosition(b));this._document.endEdit();this._cursor.onUpdate()}},_autoUpdate:function(a){if(this._tableOfContentsContainer&&this._tableOfContentsContainer.parent){var c=this._cursor.getNode().rootContainer(),b=this._cursor.selectionInfo(),h=c instanceof d;a||c!==this._lastcursorLineNode&&
this._docWasChanged&&this._lastcursorLineNode&&this._lastcursorLineNode instanceof k&&b.startPosition.isEqualTo(b.endPosition)&&!this._onDrag?(this._lastcursorLineNode=c,this._docWasChanged=!1,h&&(this._cursor.setPosition(c.startPosition()),this._cursor.collapseSelection()),a=this._document.startEdit(l.AUTO),p.updateTableOfContents(this._internalDocument,this._tableOfContentsContainer,this._anchor.createHeadingIds(),this._view,a),this._document.endEdit()):(this._lastcursorLineNode=c,this._onDrag=
!1)}},_handleDocumentChanged:function(a){if(this._tableOfContentsContainer&&a){var c=a[0],c=c||{};c.isUndoRedo||c.startLine===c.endLine&&this._internalDocument.getLineNumber(this._tableOfContentsContainer)===c.endLine?this._docWasChanged=!1:(s.hasEventType(a,r.FORMAT_CHANGE_EVENT)?this._autoUpdate(!0):c.type===r.DELETION_EVENT&&c.startLine!==c.endLine?this._autoUpdate(!0):1<a.length&&(a[0].type===r.DELETION_EVENT&&a[1].type===r.INSERT_TEXT)&&this._autoUpdate(!0),s.hasEventType(a,r.DELETION_EVENT)&&
!this._tableOfContentsContainer.parent&&(this._tableOfContentsContainer=n.findTableOfContentsContainer(this._internalDocument)),this._docWasChanged=!0)}},_onDocumentReset:function(){this._dirtyToC=!0},_onPasteUpdater:function(){this._tableOfContentsContainer=n.findTableOfContentsContainer(this._internalDocument);this._updateActions();this._autoUpdate(!0)},_onUndoRedo:function(){if(this._tableOfContentsContainer=n.findTableOfContentsContainer(this._internalDocument))m.updateSelectionForContainer(this._cursor,
this._tableOfContentsContainer,this._divSelection,this._internalDocument),this._updateReadOnly();this._updateActions();this._cursor.onUpdate()},_insertContent:function(a,c,b){var d;a.forEach(function(a){"TableOfContentsContainer"===a.className&&(d=a)});var h=d&&this._tableOfContentsContainer;d&&(1===a.length&&2===d.children.length?a[1]=new v([]):2!==d.children.length&&(h=!0));if(h){for(var e=[],h=a.indexOf(d),f=0;f<h;f++)e[f]=a[f];d.children.forEach(function(a){a.className="RichTextParagraphNode";
e[e.length]=a});for(f++;f<a.length;f++)e[e.length]=a[f];a=e}else d&&!this._tableOfContentsContainer&&(this._dirtyToC=!0,n.makeReadOnly(d.children[1],!0));return[a,c,b]},_handlePaste:function(a,c,b){a=this._converter.convertContentFromSource(b);this._document.insertTextAtCurrentPosition(n.getTextFromJSON(a));return!0},_dragOver:function(a){a.target.parentElement.rteNode&&a.target.parentElement.rteNode.rootContainer()instanceof b&&(a.dataTransfer.dropEffect="none",a.dataTransfer.effectAllowed="none");
this._onDrag=!0},_actions:function(){return[{id:h.TABLE_OF_CONTENTS.TABLE_OF_CONTENTS_ACTION,key:"ctrl_alt_c",platformKey:{mac:"meta_alt_c"},enabled:!1,callback:f.hitch(this,"createTableOfContents")},{id:"rtc_general_table_of_contents_linebreak",enabled:!0,key:"enter",callback:f.hitch(this,"_handleLineBreak")},{id:"rtc_general_table_of_contents_shift_linebreak",enabled:!0,key:"shift_enter",callback:f.hitch(this,"_handleLineBreak")}]},_updateActions:function(){this._actionService.updateAction(h.TABLE_OF_CONTENTS.TABLE_OF_CONTENTS_ACTION,
{enabled:!this._isReadOnly()&&this._canCreateTableOfContents()})},_handleLineBreak:function(){var a=this._cursor.getNode().rootContainer();if(a instanceof b){if(q.isAtStartOfContainer(this._cursor.position,a)){var c=this._document.startEdit(),d=this._internalDocument.createContainerForType("text").container,h=this._internalDocument.createNode(d.getDefaultChild());d.addChild(h);d=this._internalDocument.insertAtPosition(d,new u(a,0));this._internalDocument.emitDocumentEvents(d.events);this._cursor.setPosition(a);
c.appendRedoEvents(d.events);c.appendUndoEvents(d.events);this._document.endEdit();this._cursor.onUpdate();return!0}this._cursor.setPosition(a.nextSibling());return!0}return!1},_onChange:function(){this._dirtyToC&&(this._tableOfContentsContainer=n.findTableOfContentsContainer(this._internalDocument),this._dirtyToC=!1);this._autoUpdate();this._styleOnCursor();this._updateActions();this._tableOfContentsContainer&&(m.checkFullSelection(this._cursor,this._tableOfContentsContainer,this._internalDocument),
this._updateReadOnly())},_updateReadOnly:function(){var a=this._isReadOnlySet;m.isInFullSelection(this._cursor,this._internalDocument,this._tableOfContentsContainer)?(n.makeReadOnly(this._tableOfContentsContainer.lastChild(),!1),this._isReadOnlySet=!1,this._actionService.updateAction(h.CUT_COPY_PASTE.CUT_ACTION,{enabled:!0}),this._actionService.updateAction(h.CUT_COPY_PASTE.PASTE_ACTION,{enabled:!0}),this._tableOfContentsContainer.childrenAreContainers=!0):this._isReadOnlySet||(this._isReadOnlySet=
!0,n.makeReadOnly(this._tableOfContentsContainer.lastChild(),!0),this._tableOfContentsContainer.childrenAreContainers=!1);if(a!==this._isReadOnlySet)this._cursor.onChange()},_styleOnCursor:function(){if(this._tableOfContentsContainer){var a=this._cursor.getSelection(),a=(a=m.isInSelection(b,a))?a:this._cursor.getNode().rootContainer(),c=this._internalDocument.getLineNumber(this._tableOfContentsContainer);a instanceof b?this._view.applyClassToLine(c,this._CURSOR_INSIDE_TOC_CSS_TAG):this._view.removeClassFromLine(c,
this._CURSOR_INSIDE_TOC_CSS_TAG)}},_onDelete:function(a){if(this._internalDocument.isReadOnly())return!0;a=n.deleteToC(this._cursor,this._document,this._internalDocument,this._tableOfContentsContainer,a);a.dirty&&(this._dirtyToC=!0,this._tableOfContentsContainer=void 0,this._updateActions());if(a.done)return!0},_checkSelection:function(){this._tableOfContentsContainer&&(m.updateSelectionForContainer(this._cursor,this._tableOfContentsContainer,this._divSelection,this._internalDocument),m.updateSelectionForParagraph(this._cursor,
this._tableOfContentsContainer.firstChild(),this._divSelection,this._internalDocument),m.updateSelectionForParagraph(this._cursor,this._tableOfContentsContainer.lastChild(),this._divSelection,this._internalDocument))},_isReadOnly:function(){return this._internalDocument&&this._internalDocument.isReadOnly()||this._cursor&&this._cursor.isCursorReadOnly()?!0:!1},_canCreateTableOfContents:function(){return!(this._tableOfContentsContainer&&this._tableOfContentsContainer.parent)}})})},"MW/rtc/plugins/tableofcontents/model/TableOfContentsList":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/richtext/nodes/inner/RichTextParagraphNode"],function(g,f){return g([f],{className:"TableOfContentsList",isAutoGenerated:!0,constructor:function(e,d){this.wrappable=!1},isTextContainerNode:function(){return!0},isReadOnly:function(){return!0},containerType:function(){return"toc"},offsetInContainer:function(e){var d,b=0;e=e||this.textContainer();for(var a=0;a<e.children.length;a++){d=e.children[a];if(this===d)return b;b=b+d.maxOffset()+e.CHILD_TEXT_SEPARATOR.length}return 0}})})},"MW/rtc/plugins/tableofcontents/model/TableOfContentsContainer":function(){define(["dojo/_base/declare",
"MW/rtc/nodes/InnerNode"],function(g,f){return g([f],{className:"TableOfContentsContainer",constructor:function(e,d){this.isUnique=this.wrappable=!0;d&&d.anchorId&&(this.anchorId=d.anchorId)},CHILD_TEXT_SEPARATOR:"\n",getDefaultChild:function(){return null},isTextContainerNode:function(){return!0},isReadOnly:function(){return!1},isSplittable:function(e){return!1},containerType:function(){return"toc"},_serializeAttributes:function(e){this.anchorId&&(e.anchorId=this.anchorId)}})})},"MW/rtc/plugins/tableofcontents/model/TableOfContentsHeadingNode":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/richtext/nodes/inner/RichTextParagraphNode"],function(g,f){return g([f],{constructor:function(e,d){d=d||{};d.align&&(this.align=d.align);this.wrappable=!1},className:"TableOfContentsHeadingNode",containerType:function(){return"ToCHeading"},canSpliceContainers:function(e,d){return!0},isTextContainerNode:function(){return!0},offsetInContainer:function(e){var d,b=0;e=e||this.textContainer();for(var a=0;a<e.children.length;a++){d=e.children[a];if(this===d)return b;b=b+d.maxOffset()+e.CHILD_TEXT_SEPARATOR.length}return 0},
isSplittable:function(e){return!1},canMergeContainerWithSibling:function(e,d){return!0},_serializeAttributes:function(e){this.align&&(e.align=this.align);this.anchorId&&(e.anchorId=this.anchorId)}})})},"MW/rtc/plugins/tableofcontents/TableOfContentsCreator":function(){define("MW/rtc/model/CodeUtilities MW/rtc/model/Position MW/rtc/plugins/richtext/nodes/leaf/RichTextNode MW/rtc/plugins/hyperlink/model/HyperlinkNode MW/rtc/model/events/DeletionEvent ./model/TableOfContentsList ./model/TableOfContentsContainer ./model/TableOfContentsHeadingNode dojo/i18n!l10n/nls/richtext_actions".split(" "),
function(g,f,e,d,b,a,c,h,k){return{_COLON:":",_HYPERLINK_TAG:"internal",_LINE_BREAK:"\n",_SPACE4:"    ",createTableOfContents:function(b,d,h,e){var f=new c([]);h=this._getInsertPosition(h);this._createTableOfContentsHeading(f);var k=new a([]);b=this._stripEmptyHeadingsOut(b);this._createItems(b).forEach(function(a){k.addChild(a)});f.addChild(k);b=d.insertAtPosition(f,h);d.emitDocumentEvents(b.events);e.appendUndoEvents(b.events);e.appendRedoEvents(b.events);return f},updateTableOfContents:function(a,
c,d,h,e){var f=c.lastChild();h=f.children.length;d=this._stripEmptyHeadingsOut(d);var k=[];this._createItems(d).forEach(function(c){c=a.insertAtPosition(c,f.endPosition());k=k.concat(c.events)});a.emitDocumentEvents(k);c=a.getLineNumber(c);for(d=0;d<h;d++)a.deleteNode(f.firstChild());c=[b.create(c,c)];a.emitDocumentEvents(c)},_createItems:function(a){for(var c=a.length,b=this._insertTitle(a),h=[],f=this._getAvailableDepth(a,b),k=0;k<c;k++)if(1!==a[k].level||b){var g=new d([],{hyperlink:this._HYPERLINK_TAG+
this._COLON+a[k].anchorId,readOnly:!0}),t=this._getSpacing(a[k].level,f);""!==t&&(t=new e({text:t,readOnly:!0}),h.push(t));t=new e({text:k!==c-1?a[k].getText()+this._LINE_BREAK:a[k].getText(),readOnly:!0});g.addChild(t);h.push(g)}0===h.length&&(a=new e([]),a.text=" ",a.readOnly=!0,h.push(a));return h},_stripEmptyHeadingsOut:function(a){return a.filter(function(a){return""!==a.getText()})},_insertTitle:function(a){for(var c=0,b=0;b<a.length;b++)1===a[b].level&&c++;return 1<c?!0:!1},_getAvailableDepth:function(a,
c){var b=[];a.forEach(function(a){-1===b.indexOf(a.level)&&(c&&0<a.level||!c&&1<a.level)&&b.push(a.level)});return b.sort()},_getSpacing:function(a,c){for(var b="",d=0;d<c.indexOf(a);d++)b+=this._SPACE4;return b},_getInsertPosition:function(a){a=a.selectionInfo().startNode;if(!g.isCodeContainer(a))return new f(a,0);for(a=a.textContainer();a;){if(!a.prevNode()||!g.isCodeContainer(a.prevNode()))return new f(a,0);a=a.prevNode().textContainer()}},_createTableOfContentsHeading:function(a){var c=new e({text:k.tableOfContentsHeading,
bold:!0}),c=new h([c]);a.addChild(c)}}})},"MW/rtc/plugins/hyperlink/model/HyperlinkNode":function(){define(["dojo/_base/declare","./HyperlinkUtilities","MW/rtc/nodes/InnerNode","MW/rtc/plugins/richtext/nodes/inner/RichTextContainerNode"],function(g,f,e,d){return g([d],{constructor:function(b,a){this.hyperlink="";a&&(f.isHyperlinkValid(a.hyperlink)?this.hyperlink=a.hyperlink:this.hyperlink="#"+a.hyperlink,a.readOnly&&(this.readOnly=a.readOnly))},className:"HyperlinkNode",isTextNode:function(){return!0},
containsTextNodes:function(){return!0},getPositionFromOffset:function(b){b=this.findChildIndexForPosInNode(b);return this.children[b.n].getPositionFromOffset(b.posInNode)},findChildIndexForPosInNode:function(b){if(this.children){0>b&&(b+=this.getTextForPositioning().length+1);for(var a=0;b>this.children[a].maxOffset()&&this.children[a].nextSibling();)b-=this.children[a].maxOffset(),a+=1;return{n:a,posInNode:b}}return{n:0,posInNode:b}},maxOffset:function(){if(this.children){for(var b=0,a=0;this.children[b];)a+=
this.children[b].maxOffset(),b+=1;return a}return 0},lineBorderOffset:function(b,a){var c;if(this.children){var d=this.findChildIndexForPosInNode(a);c=a-d.posInNode;d=this.children[d.n].lineBorderOffset(b,d.posInNode);c+=d.getOffset();return this.getPositionFromOffset(c)}c=this.offsetInContainer();0<=b&&(c+=this.maxOffset());return this.getPositionFromOffset(c)},offsetInContainer:function(b){return this.children&&this.children[0]?(b=b||this.rootContainer(),b._childOffset(this.children[0])):-1},replaceText:function(b){if(1<
this.children.length){var a;for(a=this.children.length-1;0<a;a-=1)this.removeChild(a)}this.children[0].replaceText(b)},_serializeAttributes:function(b){b.hyperlink=this.hyperlink}})})},"MW/rtc/plugins/tableofcontents/TableOfContentsUtilities":function(){define("dojo/_base/lang MW/rtc/model/DocumentUtilities ./model/TableOfContentsContainer ./model/TableOfContentsHeadingNode MW/rtc/model/events/DeletionEvent MW/rtc/model/events/InsertTextEvent MW/rtc/model/Selection MW/rtc/model/SelectionUtilities MW/rtc/model/Position MW/rtc/plugins/sectionbreak/model/SectionBreakNode".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return{deleteToC:function(a,b,g,q,r){var s=a.getNode().rootContainer(),t=a.getSelection(),u=a.selectionInfo(),v=h.isInSelection(e,t);if(s instanceof e||v){if(u.endNode.textContainer()instanceof d&&u.startNode.textContainer()instanceof d){if(f.isAtEndOfContainer(a.position,a.getNode().textContainer())&&0<r&&!t)if(this.coversFullParagraphs(u,a.getNode().textContainer())){if(0===a.getNode().textContainer().getText().length)return{done:!0,dirty:!1}}else return h.setContainerSelection(a,
g,q),{done:!0,dirty:!1};return{done:!1,dirty:!1}}if(v&&!(u.startNode.rootContainer()===q||u.endNode.rootContainer()===q))return{done:!1,dirty:!0};if(this.coversFullParagraphs(a.adjustSelection(u,!0),q))return this._deleteBlock(a,b,g,q),{done:!0,dirty:!0};if(t&&f.isAtStartOfContainer(t.getStartPosition(),q)&&g.getLineNumber(q)<g.getLineNumber(u.endNode.rootContainer()))return r=q.nextSibling(),r=r.firstChild()?r:r.nextSibling(),r=new k(r.firstChild(),0),this._deleteBlock(a,b,g,q),t=new c(r,t.getEndPosition(),
!1,!1),a.setPosition(t.getEndPosition()),a.setSelection(t),{done:!1,dirty:!0};h.setContainerSelection(a,g,q);return{done:!0,dirty:!1}}return!t&&(s.previousSibling()instanceof e&&f.isAtStartOfContainer(a.position,s)&&0>r||s.nextSibling()instanceof e&&f.isAtEndOfContainer(a.position,s)&&0<r&&!s.isEmpty())?(h.setContainerSelection(a,g,q),{done:!0,dirty:!1}):!t&&0>r&&s.previousSibling()instanceof l&&s.previousSibling().previousSibling()instanceof e&&f.isAtStartOfContainer(a.position,s)?(this._deleteBlock(a,
b,g,s.previousSibling()),{done:!0,dirty:!1}):{done:!1,dirty:!1}},coversFullParagraphs:function(a,c){return f.isAtStartOfContainer(a.startPosition,c)&&f.isAtEndOfContainer(a.endPosition,c)},_deleteBlock:function(c,d,h,e){var f=d.startEdit(),g=new k(e,0),t=e.getText();e.nextSibling()instanceof l&&h.deleteNode(e.nextSibling());c.setPosition(e.nextSibling());c.releaseAnchor();c=h.getLineNumber(e);h.deleteNode(e);e=[b.create(c,c+1)];g=[a.create(c,c+1,g,t)];h.emitDocumentEvents(e);f.appendRedoEvents(e);
f.appendUndoEvents(g);d.endEdit()},findTableOfContentsContainer:function(a){if(a=a.root.children)for(var c=a.length,b=0;b<c;b++)if(a[b]instanceof e)return a[b];return null},makeReadOnly:function(a,c){a&&a.children.forEach(function(a){a.readOnly=c;a.children&&this.makeReadOnly(a,c)},this)},getTextFromJSON:function(a){var c=a.text?a.text:"";a.forEach(function(a){c+=a.text?a.text:"";a.children&&(c+=this.getTextFromJSON(a.children)+" ")},this);return c=c.replace(/[\r\n]+$/," ")}}})},"MW/rtc/plugins/sectionbreak/model/SectionBreakNode":function(){define(["dojo/_base/declare",
"MW/rtc/nodes/InnerNode","MW/rtc/plugins/view/layoutmanager/rules/ContainmentGroupingRule"],function(g,f,e){return g([f],{"-chains-":{constructor:"manual"},constructor:function(){this.inherited(arguments,[[]]);this.groupingType=e().groupingType},className:"SectionBreak",containerType:function(){return""},getDefaultChild:function(){return null},endNode:function(){return this.previousSibling()?this.previousSibling().endNode():null},startNode:function(){return this.nextSibling()?this.nextSibling().startNode():
null},getHeight:function(){return this.box?this.box.offsetHeight:0},getPositionFromOffset:function(d){return this.nextSibling().getPositionFromOffset(d)},startPosition:function(){return this.previousSibling().endPosition()},endPosition:function(){return this.nextSibling().startPosition()}})})},"MW/rtc/plugins/view/layoutmanager/rules/ContainmentGroupingRule":function(){define(["dojo/_base/declare","dojo/dom-class","dojo/dom-construct","MW/rtc/plugins/view/layoutmanager/rules/BaseGroupingRule"],function(g,
f,e,d){return g(d,{groupingType:"containment",_BLOCK_POSTFIX:"Block",_BLOCK_CLASS:"SectionBlock containment",constructor:function(b){this._domTarget=b},getOperationsForLayout:function(b,a,c){return this._isApplicable(a)?this._hasToRedrawNeighboringBlocks(a,c)?this._redrawNeighboringBlocks(b,a):this._drawAroundSiblingBlocks(b,a):this._wrapDomNodeIntoBlock(b,a,c)},_hasToRedrawNeighboringBlocks:function(b,a){if(!this._domTarget.contains(a))return!1;var c=this._getBlock(b.previousSibling()),d=this._getBlock(b.nextSibling());
return this._isBlockElement(c)&&this._isBlockElement(d)&&c.nextElementSibling===d?!1:!0},_redrawNeighboringBlocks:function(b,a){var c={};c.nodeToPlace=b;var d=a.previousSibling(),e=a.nextSibling(),d=this._getNodesToRedraw(d,!0),e=this._getNodesToRedraw(e,!1);if(0===d.length&&0===e.length)return c;c.prevNodes=d;c.nextNodes=e;d=0<d.length&&this._getBlockFromSiblingNodes(d);e=0<e.length&&this._getBlockFromSiblingNodes(e);c.nodeToPlaceRefNode=d||e;c.nodeToPlaceRefPos=d?"after":"before";c.nodesToRemove=
[];d&&c.nodesToRemove.push(d);e&&c.nodesToRemove.push(e);return c},_getBlockFromSiblingNodes:function(b){var a=null;b.some(function(c){if(c=this._getBlock(c))return a=c,!0},this);return a},_drawAroundSiblingBlocks:function(b,a){var c=this._getBlock(a.previousSibling());return c?{nodeToPlace:b,nodeToPlaceRefNode:c,nodeToPlaceRefPos:"after"}:(c=this._getBlock(a.nextSibling()))?{nodeToPlace:b,nodeToPlaceRefNode:c,nodeToPlaceRefPos:"before"}:null},_wrapDomNodeIntoBlock:function(b,a,c){var d={};a.isRootContainer()&&
!this._hasSiblingBlockReference(a,c)&&(a=this._createBlock(),e.place(b,a),d.nodeToPlace=a,d.mergeWithSiblingBlock=!0);return d},_hasSiblingBlockReference:function(b,a){var c={currentNode:b,iterator:"previousSibling"},d={currentNode:b,iterator:"nextSibling"};do{if((c=c&&this._stepSearchForSiblingBlockReference(b,c))&&c.found||(d=d&&this._stepSearchForSiblingBlockReference(b,d))&&d.found)return!0;if(!this._domTarget.contains(a))break}while(c||d);return!1},_stepSearchForSiblingBlockReference:function(b,
a){var c=a.currentNode[a.iterator]();if(!c||c.groupingType===this.groupingType&&c.box&&c.box.parentElement)return null;var d=this._getBlock(c);d&&d.parentElement&&(a.found=!0);a.currentNode=c;return a},getOperationsForRemove:function(b,a){return this._isApplicable(b)?this._removeAndMerge(b):this._removeBlockIfEmpty(b,a)},_removeAndMerge:function(b){b=this._getDomNode(b);var a=this._getSiblingBlocks(b);return{nodeToMerge:a?[a]:null,nodeToRemove:b}},_getSiblingBlocks:function(b){var a=b.previousElementSibling;
b=b.nextElementSibling;return!this._isBlockElement(a)||!this._isBlockElement(b)?null:[a,b]},_removeBlockIfEmpty:function(b,a){var c=this._getBlock(b);return c&&1===c.childElementCount&&this._hasElementInBlock(a,c)?{nodeToRemove:c}:null},_hasElementInBlock:function(b,a){return b.some(function(c){if(c.parentElement===a)return!0},this)},getRefDomNode:function(b,a,c){var d=this._getDomNode(a);return!d||!d.parentElement?null:this._isBlockElement(c)?this._getRefDomNodeForBlockObserver(b,a,d):this._getRefDomNodeForNonBlockObserver(b,
a,d)},_getRefDomNodeForBlockObserver:function(b,a,c){var d,e=this._getBlock(a);e?d=e:this._isApplicable(a)&&(d=c);return d?{domNode:d,position:this._getRefPosition(b,a)}:null},_getRefDomNodeForNonBlockObserver:function(b,a,c){if(!this._isApplicable(a))return null;var d=c.previousElementSibling,e=c.nextElementSibling;if(d||e){var f,g,p=b.nextSibling(),n=b.previousSibling();a===p?this._getBlock(b)?(f=c,g="before"):d&&(g="last",f=this._getBlock(n)||d):a===n&&(this._getBlock(b)?(f=c,g="after"):e&&(g=
"first",f=this._getBlock(p)||e));return f?{domNode:f,position:g}:null}},_createBlock:function(){return e.create("div",{"class":this._getBlockClass()})},_getBlockClass:function(){return this._BLOCK_CLASS},_getBlock:function(b){if(b){for(b=this._getDomNode(b);b;){if(this._isBlockElement(b))return b;b=b.parentElement}return null}},_isBlockElement:function(b){return!!b&&f.contains(b,this._BLOCK_CLASS)},_canMergeBlocks:function(b,a){if(!b||!a)return!1;var c=b.className.split(" "),d=a.className.split(" ");
return b&&a&&c[0]===d[0]},_canGroupTogether:function(b,a){return a.groupingType!==this.groupingType},priority:function(){return 2}})})},"MW/rtc/plugins/tableofcontents/TableOfContentsContainerInsertionRulesProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./TableOfContentsContainerInsertionRules"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/tableofcontents/TableOfContentsContainerInsertionRules":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/insertionrules/BaseInsertionRules","MW/rtc/plugins/insertionrules/InsertionRuleConstants","./model/TableOfContentsContainer"],function(g,f,e,d){return g([f],{_compatibleParents:[],constructor:function(){},destroy:function(){},getApplicableNodeClass:function(){return d},getTopLevelInsertionInstruction:function(b,a,c,d,f){return{insertInRoot:{relationToPosition:e.RELATION.BEFORE}}}})})},"MW/rtc/plugins/tableofcontents/TableOfContentsHeadingNodeConversionRulesProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./TableOfContentsHeadingNodeConversionRules"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/tableofcontents/TableOfContentsHeadingNodeConversionRules":function(){define(["dojo/_base/declare","MW/rtc/nodes/nodeconversionrules/base/AbstractNodeConversionRules","./model/TableOfContentsHeadingNode"],function(g,f,e){return g(f,{constructor:function(){},getApplicableNodeClass:function(){return e},
isConvertibleTo:function(d){return!1},isConvertibleFrom:function(d){return!1}})})},"MW/rtc/plugins/tableofcontents/TableOfContentsListConversionRulesProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./TableOfContentsListConversionRules"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/tableofcontents/TableOfContentsListConversionRules":function(){define(["dojo/_base/declare",
"MW/rtc/nodes/nodeconversionrules/base/AbstractNodeConversionRules","./model/TableOfContentsList"],function(g,f,e){return g(f,{constructor:function(){},getApplicableNodeClass:function(){return e},isConvertibleTo:function(d){return!1},isConvertibleFrom:function(d){return!1}})})},"MW/rtc/plugins/tableofcontents/export/TableOfContentsContainer2HTMLProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/tableofcontents/export/TableOfContentsContainer2HTML"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/tableofcontents/export/TableOfContentsContainer2HTML":function(){define(["dojo/_base/declare","dojo/dom-class","MW/rtc/plugins/export/html/BaseInnerNode2HTML","MW/rtc/plugins/tableofcontents/model/TableOfContentsContainer"],function(g,f,e,d){return g([e],{_STYLES:["margin-bottom","padding-bottom"],constructor:function(){},getApplicableNodeClass:function(){return d}})})},
"MW/rtc/plugins/export/html/BaseInnerNode2HTML":function(){define(["dojo/_base/declare","MW/rtc/plugins/export/NodeExporterInterface"],function(g,f){return g([f],{constructor:function(){},enter:function(e,d,b){b=e.getAttributesForStyle(d,this._STYLES);d.anchorId&&(b+=" id \x3d '"+d.anchorId+"' ");d="\x3c"+this._getTagName(d);b&&(d+=" "+b);e.addToBody(d+"\x3e");return!1},leave:function(e,d,b){e.addToBody("\x3c/"+this._getTagName(d)+"\x3e")},_getTagName:function(e){return"div"}})})},"MW/rtc/plugins/export/NodeExporterInterface":function(){define(["dojo/_base/declare"],
function(g){return g([],{_STYLES:[],constructor:function(){},getApplicableNodeClass:function(){throw Error("Unimplemented: getApplicableNodeClass");},reset:function(){},finalize:function(){},enter:function(f,e,d){return!1},leave:function(f,e,d){},visit:function(f,e,d,b,a){}})})},"MW/rtc/plugins/tableofcontents/view/TableOfContentsLayouterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./TableOfContentsLayouter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},
createInstance:function(){return new e}})})},"MW/rtc/plugins/tableofcontents/view/TableOfContentsLayouter":function(){define(["dojo/_base/declare","dojo/dom-class","MW/rtc/plugins/view/layoutmanager/abstract/AbstractLayouter","../model/TableOfContentsList"],function(g,f,e,d){return g(e,{constructor:function(){},getApplicableNodeClass:function(){return d},layout:function(b,a){return b.layoutInto(a,"div",{"class":"paragraphNode ToCItems"})}})})},"MW/rtc/plugins/tableofcontents/view/TableOfContentsHeadingNodeLayouterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./TableOfContentsHeadingNodeLayouter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/tableofcontents/view/TableOfContentsHeadingNodeLayouter":function(){define(["dojo/_base/declare","dojo/dom-class","MW/rtc/plugins/view/layoutmanager/abstract/AbstractLayouter","../model/TableOfContentsHeadingNode"],function(g,f,e,d){return g(e,{constructor:function(){},getApplicableNodeClass:function(){return d},
layout:function(b,a){return b.layoutInto(a,"div",{"class":"paragraphNode ToCHeading"})}})})},"MW/rtc/plugins/tableofcontents/view/TableOfContentsContainerLayouterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./TableOfContentsContainerLayouter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/tableofcontents/view/TableOfContentsContainerLayouter":function(){define(["dojo/_base/declare",
"dojo/dom-class","MW/rtc/plugins/view/layoutmanager/abstract/AbstractLayouter","../model/TableOfContentsContainer"],function(g,f,e,d){return g(e,{constructor:function(){},getApplicableNodeClass:function(){return d},layout:function(b,a){return b.layoutInto(a,"div",{"class":"ToC"})}})})},"MW/rtc/plugins/tableofcontents/model/TableOfContentsContainerContentConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./TableOfContentsContainerContentConverter"],function(g,
f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/tableofcontents/model/TableOfContentsContainerContentConverter":function(){define(["dojo/_base/declare","MW/rtc/nodes/contentconverter/base/InnerNodeContentConverter","./TableOfContentsContainer"],function(g,f,e){return g(f,{getApplicableNodeClass:function(){return e}})})},"MW/rtc/plugins/tableofcontents/model/TableOfContentsHeadingNodeContentConverterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./TableOfContentsHeadingNodeContentConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/tableofcontents/model/TableOfContentsHeadingNodeContentConverter":function(){define(["dojo/_base/declare","MW/rtc/nodes/contentconverter/base/InnerNodeContentConverter","./TableOfContentsHeadingNode"],function(g,f,e){return g(f,{getApplicableNodeClass:function(){return e}})})},"MW/rtc/plugins/tableofcontents/model/TableOfContentsListContentConverterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./TableOfContentsListContentConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/tableofcontents/model/TableOfContentsListContentConverter":function(){define(["dojo/_base/declare","MW/rtc/nodes/contentconverter/base/InnerNodeContentConverter","./TableOfContentsList"],function(g,f,e){return g(f,{getApplicableNodeClass:function(){return e}})})},"MW/rtc/plugins/tableofcontents/view/TableOfContentsListCoordinateConverterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./TableOfContentsListCoordinateConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/tableofcontents/view/TableOfContentsListCoordinateConverter":function(){define(["dojo/_base/declare","MW/rtc/plugins/tableofcontents/model/TableOfContentsList","MW/rtc/view/coordinateconverter/base/BaseCoordinateConverter"],function(g,f,e){return g(e,{constructor:function(){},getApplicableNodeClass:function(){return f}})})},
"MW/rtc/plugins/tableofcontents/view/TableOfContentsContainerCoordinateConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./TableOfContentsContainerCoordinateConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/tableofcontents/view/TableOfContentsContainerCoordinateConverter":function(){define(["dojo/_base/declare","MW/rtc/plugins/tableofcontents/model/TableOfContentsContainer",
"MW/rtc/view/coordinateconverter/base/VerticalAlignCoordinateConverter"],function(g,f,e){return g(e,{constructor:function(){},getApplicableNodeClass:function(){return f}})})},"MW/rtc/view/coordinateconverter/base/VerticalAlignCoordinateConverter":function(){define(["dojo/_base/declare","../CoordinateConverterUtilities","./BaseCoordinateConverter"],function(g,f,e){return g(e,{_SEARCH_BIDIRECTION:0,_SEARCH_UPWARD:1,_SEARCH_DOWNWARD:2,getClosestRect:function(d,b,a){for(var c=0,e=d.children.length-1;c<=
e;){var k=Math.floor((c+e)/2),g=this._getClosestRectFrom(d,k,a,this._SEARCH_BIDIRECTION);if(!g)return null;if(f.isCoordinateAboveRect(b,g))e=k-1;else if(f.isCoordinateBelowRect(b,g))c=k+1;else break}c>e&&(e=this._getClosestRectFrom(d,e,a,this._SEARCH_UPWARD),d=this._getClosestRectFrom(d,c,a,this._SEARCH_DOWNWARD),e&&d&&(g=this._chooseUpOrDownRect(b,e,d)));return g},_chooseUpOrDownRect:function(d,b,a){var c=f.getClosestYDistanceToRect(d,b);d=f.getClosestYDistanceToRect(d,a);return c<d?b:a},_getClosestRectFrom:function(d,
b,a,c){for(var e=0,f=d.children.length;e<f;){if(0<=[this._SEARCH_UPWARD,this._SEARCH_BIDIRECTION].indexOf(c)){var g=this._getRectForChildNode(d,b-e,a);if(g)return g}if(0<=[this._SEARCH_DOWNWARD,this._SEARCH_BIDIRECTION].indexOf(c)&&(g=this._getRectForChildNode(d,b+e,a)))return g;var e=e+1,g=0>b-e,m=b+e>d.children.length-1;if(c===this._SEARCH_UPWARD&&g||c===this._SEARCH_DOWNWARD&&m||c===this._SEARCH_BIDIRECTION&&g&&m)break}return null},_getRectForChildNode:function(d,b,a){return(d=d.children[b])?a(d)[0]:
null}})})},"MW/rtc/plugins/tableofcontents/view/TableOfContentsHeadingNodeCoordinateConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./TableOfContentsHeadingNodeCoordinateConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/tableofcontents/view/TableOfContentsHeadingNodeCoordinateConverter":function(){define(["dojo/_base/declare","../model/TableOfContentsHeadingNode",
"MW/rtc/view/coordinateconverter/base/VerticalAlignCoordinateConverter"],function(g,f,e){return g(e,{constructor:function(){},getApplicableNodeClass:function(){return f}})})},"MW/rtc/margin/TraditionalLineNumberDecoratorProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/margin/TraditionalLineNumberDecorator"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.view","rtc.linenumberservice",
"rtc.cursorcontroller"]}},createInstance:function(d,b,a){return new e(d,b,a,!0,!0)}})})},"MW/rtc/margin/TraditionalLineNumberDecorator":function(){define(["dojo/_base/declare","dojo/dom-class","MW/rtc/margin/LineNumberDecorator"],function(g,f,e){return g(e,{hasLayerForLineNumber:function(d,b){return this.inherited(arguments)&&!b},handleMouseDown:function(d,b){var a=this._view.getCoordinateFromEvent(this._view.fixEvent(d)),a=this._view.getLineColumnFromCoordinate(a);this._cursorController.selectLine(a.line,
!0)},_adjustAlignment:function(){}})})},"MW/rtc/margin/LineNumberDecorator":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-attr dojo/dom-class dojo/dom-construct mw-log/Log MW/rtc/margin/AbstractLineMarginDecorator MW/rtc/margin/MarginUtilities MW/rtc/model/CodeUtilities MW/rtc/view/ViewEventUtilities".split(" "),function(g,f,e,d,b,a,c,h,k,l,m){return g(h,{_CHARACTER_WIDTH:8,_DEFAULT_NUMBER_OF_CHARACTERS_IN_MARGIN:2,_PADDING:8,_DEFAULT_MIN_WIDTH:16,_LINE_NUMBER_HEIGHT:17,
constructor:function(a,c,b,d,h){this._lineNumberService=c;this._view=a;this._cursorController=b;this._showLineNumbers=d;this._minWidth=(this._isCollapsible=h)?0:this._DEFAULT_MIN_WIDTH;this._padding=this._isCollapsible?0:this._PADDING;this.own(e.after(this._view,"onViewUpdated",f.hitch(this,"_updateWidthOnHeightChange"),!0))},hasLayerForLineNumber:function(a,c){return 0<=this._lineNumberService.getCodeLineNumberFromLineNumber(a)&&this._shouldShowLineNumbers()},createDecorationForLineNumber:function(c,
b){var d=this._lineNumberService.getCodeLineNumberFromLineNumber(c),e=a.create("div");e.textContent=d;this._applyStyle(e,c,b);return e},_applyStyle:function(a,c,d){d=[];b.add(a,"gutterNumber");this._adjustAlignment(a,c);d.push("lineNumber");this._addTestTag(a,d,c)},_adjustAlignment:function(a,c){var b=k.getTopForMiddleAlignmentWithLineNumber(this._view,c,this._LINE_NUMBER_HEIGHT);a.style.top=b+"px"},_addTestTag:function(a,c,b){b=c&&0<c.length?b+"_"+c.join("_"):b+"_invalid";d.set(a,"data-testid",b)},
_shouldShowLineNumbers:function(){return this._showLineNumbers},_updateWidthOnHeightChange:function(a){(m.hasHeightEvent(a)||m.hasLayoutEvent(a))&&this._updateWidth()},setShowLineNumber:function(a){this._showLineNumbers!==a&&(this._showLineNumbers=a,this._updateWidth(),this.onUpdate())},getWidth:function(){return Math.max(this._width,this._minWidth)+this._padding},_updateWidth:function(){var a=this._getNumberOfCharactersToPaintMarginAgainst(),a=this._shouldShowLineNumbers()?this._CHARACTER_WIDTH*
a:this._minWidth;this._width!==a&&(this._width=a,this.onWidthChange())},onWidthChange:function(){},_getNumberOfCharactersToPaintMarginAgainst:function(){return Math.max(this._calculateGreatestLineNumberCharacters(),this._DEFAULT_NUMBER_OF_CHARACTERS_IN_MARGIN)},_calculateGreatestLineNumberCharacters:function(){var a=this._lineNumberService.getNumberOfCodeLines();return String(a).length}})})},"MW/rtc/margin/AbstractLineMarginDecorator":function(){define(["dojo/_base/declare","MW/rtc/margin/AbstractMarginDecorator"],
function(g,f){return g(f,{hasLayerForLineNumber:function(e,d){throw Error("Unimplemented API: MW.rtc.margin.AbstractLineMarginDecorator.hasLayerForLineNumber");},createDecorationForLineNumber:function(e,d){throw Error("Unimplemented API: MW.rtc.margin.AbstractLineMarginDecorator.createDecorationForLineNumber");}})})},"MW/rtc/margin/AbstractMarginDecorator":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin"],function(g,f){return g(f,{handleMouseDown:function(e,d){},handleMouseUp:function(e,
d){},handleMouseClick:function(e,d){},handleMouseLeave:function(e,d){},handleMouseMove:function(e,d){},onUpdate:function(){},onWidthChange:function(){},getWidth:function(){throw Error("Unimplemented API: MW.rtc.margin.AbstractMarginDecorator.getWidth");}})})},"MW/rtc/margin/MarginUtilities":function(){define([],function(){return{_getTopForMiddleAlignment:function(g,f){return Math.floor((g-f)/2)},getTopForMiddleAlignmentWithLineNumber:function(g,f,e){g=g.getPreciseLineHeight(f+1);return this._getTopForMiddleAlignment(g,
e)}}})},"MW/rtc/margin/settings/LineNumberPreferenceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/margin/settings/LineNumberPreference"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.settings.service","margin.linenumberdecorator"]}},createInstance:function(d,b){return new e(d,b)},priority:function(){return 2}})})},"MW/rtc/margin/settings/LineNumberPreference":function(){define(["dojo/_base/declare",
"MW/rtc/abstract/AbstractPlugin"],function(g,f){return g(f,{_SHOW_LINE_NUMBER_ID:"matlab.editor.displaysettings.ShowLineNumbers",constructor:function(e,d){this._settingService=e;this._lineNumberDecorator=d;this.own(this._settingService.listenTo(this._SHOW_LINE_NUMBER_ID,this._onPreferencesChanged.bind(this)))},_onPreferencesChanged:function(){this._lineNumberDecorator.setShowLineNumber(this._settingService.get(this._SHOW_LINE_NUMBER_ID,!0))}})})},"MW/rtc/model/io/SerializersProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/model/io/Serializers"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.serializer"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/model/io/Serializers":function(){define(["dojo/_base/declare","dojo/_base/lang"],function(g,f){return g(null,{constructor:function(e){this._serializersArray=e},getSerializer:function(e){var d=null;this._serializersArray.some(function(b){if(b.getXMLType(e)===e||b.getNodeType()===e)d=b},
this);return d}})})},"MW/rtc/model/io/serializers/providers/containers/CodeContainerSerializerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/model/io/serializers/containers/CodeContainerSerializer"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[""]}},createInstance:function(){return new e}})})},"MW/rtc/model/io/serializers/containers/CodeContainerSerializer":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/model/io/DocumentTag",
"MW/rtc/model/io/XmlUtils","MW/rtc/model/io/serializers/containers/ContainerSerializer"],function(g,f,e,d,b){return g(b,{_CHILD_TYPE:"PlainTextNode",constructor:function(){this._nonPlainTextObjects=[]},write:function(a,c,b){c=document.createElement(this.getXMLType());var f=d.createXMLElement(!1),g=d.createParagraphProperty(this.getXMLType());f.appendChild(g);a[0].anchorId&&(g=d.createBookmarkStart(e.BOOKMARK_PREFIX+a[0].anchorId,a[0].anchorId),f.appendChild(g));var m={text:"",className:""};a.forEach(function(a,
c){this._writeCodeAndCacheNonPlainTextObjects(a,m,c)},this);m.text=m.text.slice(0,-1);g=b.getSerializer(this._CHILD_TYPE);f.appendChild(g.write(m));this._writeNonPlainText(b,f);c.appendChild(f);a[0].anchorId&&(a=d.createBookmarkEnd(a[0].anchorId),f.appendChild(a));return c},_writeNonPlainText:function(a,c){this._nonPlainTextObjects.forEach(function(b){var d=a.getSerializer(b.className);c.appendChild(d.write(b))},this);this._nonPlainTextObjects=[]},read:function(a,c,b){var f=[],g=b.getSerializer(this._CHILD_TYPE).read(a);
g.readObject.forEach(function(a){var c={className:this.getNodeType(),children:[]};c.children.push(a);f.push(c)},this);a.forEach(function(a){for(var g=a.getElementsByTagNameNS(e.NAMESPACE_URL,e.CUSTOM_XML_TAG),l=0;l<g.length;l++){var q=d.getClassName(g[l]);f=b.getSerializer(q).read(g[l],c,f)}if((a=d.getBookmarkStart(a))&&a.id)f[0].anchorId=a.id},this);g=g.readStatus;return{readObject:f,readStatus:!0}},_writeCodeAndCacheNonPlainTextObjects:function(a,c,b){a.children.forEach(function(a){c.text+=a.text;
c.className=this._CHILD_TYPE;a.className!==this._CHILD_TYPE&&(a.startOffsetLine=b,a.endOffsetLine=b,this._nonPlainTextObjects.push(a))},this);c.text+="\n"},getXMLType:function(){return"code"},getNodeType:function(){return"LineNode"}})})},"MW/rtc/model/io/serializers/providers/containers/ContainerSerializerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/model/io/serializers/containers/ContainerSerializer"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},
createInstance:function(){return new e}})})},"MW/rtc/model/io/serializers/providers/containers/HeadingContainerSerializerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/model/io/serializers/containers/HeadingContainerSerializer"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/model/io/serializers/containers/HeadingContainerSerializer":function(){define("dojo/_base/declare dojo/_base/lang MW/rtc/model/io/DocumentTag MW/rtc/model/io/serializers/containers/ContainerSerializer MW/rtc/model/io/XmlUtils MW/rtc/plugins/richtext/HeadingUtilities mw-log/Log".split(" "),
function(g,f,e,d,b,a,c){return g(d,{_INTRODUCED_VERSION:"R2018b",write:function(a,c,b){for(var d=document.createElement(this.getXMLType()),e=0;e<a.length;e++){var f=this._writeParagraph(a[e],c,b);f&&d.appendChild(f)}return d},_writeParagraph:function(d,f,g){var m=b.createXMLElement(),p=a.getHeadingFormatByLevel(d.level),n=b.createParagraphProperty(p),n=b.addParagraphProperty(n,e.JUSTIFCATION_TAG_NAME,d.align);a.isFormatIntroducedInVersion(p,this._INTRODUCED_VERSION)&&(p=b.createParagraphProperty(e.HEADING_FORMAT_VALUE),
p=b.addParagraphProperty(p,e.JUSTIFCATION_TAG_NAME,d.align),n=b.createAlternateContent(this._INTRODUCED_VERSION,n,p));m.appendChild(n);d.anchorId&&(n=b.createBookmarkStart(e.BOOKMARK_PREFIX+d.anchorId,d.anchorId),m.appendChild(n));var q=!1;d.children.forEach(function(a){var b=g.getSerializer(a.className);b?m.appendChild(b.write(a,f,g)):(q=!0,c.assert(q,!0,"Unrecognized node type:"+a.className))},this);d.anchorId&&(d=b.createBookmarkEnd(d.anchorId),m.appendChild(d));q&&1===m.children.length&&(m=null);
return m},read:function(c,d,f){var g=this.inherited(arguments);c.forEach(function(c,d){var h=b.getParagraphProperty(c,e.JUSTIFCATION_TAG_NAME);h&&(g.readObject[d].align=h);var h=b.getAttribute(c),f=b.getBookmarkStart(c);f&&f.id&&(g.readObject[d].anchorId=f.id);g.readObject[d].level=a.getLevelByHeadingFormat(h)});return g},getXMLType:function(c){return!a.isFormatHeading(c)?a.getDefaultHeadingFormat():c},getNodeType:function(){return"HeadingNode"},mustMerge:function(a,c){return b.getParagraphProperty(a,
e.JUSTIFCATION_TAG_NAME)===b.getParagraphProperty(c,e.JUSTIFCATION_TAG_NAME)}})})},"MW/rtc/model/io/serializers/providers/containers/HyperlinkContainerSerializerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/model/io/serializers/containers/HyperlinkContainerSerializer"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/model/io/serializers/containers/HyperlinkContainerSerializer":function(){define("dojo/_base/declare dojo/_base/lang mw-utils/Utils MW/rtc/model/io/XmlUtils MW/rtc/model/io/DocumentTag MW/rtc/model/io/serializers/containers/ContainerSerializer".split(" "),
function(g,f,e,d,b,a){return g(a,{write:function(a,e,f){var g=document.createElement(this.getXMLType()),m=0===a.hyperlink.indexOf("internal:")?b.ANCHOR:b.DOC_LOCATION,p=d.createHyperLinkTag(a.hyperlink,m);a.children.forEach(function(a){var c=f.getSerializer(a.className);p.appendChild(c.write(a,e))},this);g.appendChild(p);return g.childNodes[0]},read:function(a){var b=this.inherited(arguments);Array.isArray(a)?a.forEach(function(a,c){b.readObject[c].hyperlink=this._getTarget(a)},this):b.readObject.hyperlink=
this._getTarget(a);return b},_getTarget:function(a){var d=a.getAttributeNS(b.NAMESPACE_URL,b.DOC_LOCATION);d||(d=a.getAttributeNS(b.NAMESPACE_URL,b.ANCHOR));return d},getXMLType:function(){return"hyperlink"},getNodeType:function(){return"HyperlinkNode"}})})},"MW/rtc/model/io/serializers/providers/containers/ListContainerSerializerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/model/io/serializers/containers/ListContainerSerializer"],function(g,f,e){return g(f,
{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/model/io/serializers/containers/ListContainerSerializer":function(){define("dojo/_base/declare dojo/_base/lang MW/rtc/model/io/DocumentTag MW/rtc/model/io/XmlUtils MW/rtc/model/io/serializers/containers/ContainerSerializer MW/rtc/model/io/serializers/containers/ListItemContainerSerializer".split(" "),function(g,f,e,d,b,a){return g(b,{_lookup:{unordered:1,ordered:2},constructor:function(c){this._listItemHandler=
new a(c);this.inherited(arguments)},write:function(a,b,d){var e=document.createElement(this.getXMLType());a.forEach(function(a){this._writeListParagraph(a,e,b,d)},this);return e},read:function(a,b,f){var g=[],m=d.getListType(a[0]),p,n={className:this.getNodeType(),children:[]};a.forEach(function(a){m!==d.getListType(a)&&(g.push(n),n={className:this.getNodeType(),children:[]},m=d.getListType(a));var c=d.getParagraphProperty(a,e.JUSTIFCATION_TAG_NAME);p=this._readListParagraph(n,a,{type:m,align:c},
b,f);if((a=d.getBookmarkStart(a))&&a.id)g.anchorId=a.id},this);g.push(n);return{readObject:g,readStatus:p}},_readListParagraph:function(a,b,e,f,g){b=this._listItemHandler.read(b,f,g);a.type=d.getKeyFromValue(this._lookup,parseInt(e.type,10));b.readObject.align=e.align;a.children.push(b.readObject);return b.readStatus},_writeListParagraph:function(a,b,f,g){var m=this._lookup[a.type];a.children.forEach(function(p,n){var q=d.createXMLElement(),r=d.createParagraphProperty(this.getNodeType());r.appendChild(d.createListType(m));
r=d.addParagraphProperty(r,e.JUSTIFCATION_TAG_NAME,p.align);q.appendChild(r);0===n&&a.anchorId&&(r=d.createBookmarkStart(e.BOOKMARK_PREFIX+a.anchorId,a.anchorId),q.appendChild(r),r=d.createBookmarkEnd(a.anchorId),q.appendChild(r));for(var r=this._listItemHandler.write(p,f,g),s=r.length;0!==s;)q.appendChild(r[0]),s--;b.appendChild(q)},this)},getXMLType:function(){return"ListParagraph"},getNodeType:function(){return"ListParagraph"},mustMerge:function(){return!0}})})},"MW/rtc/model/io/serializers/containers/ListItemContainerSerializer":function(){define(["dojo/_base/declare",
"dojo/_base/lang","MW/rtc/model/io/serializers/containers/ContainerSerializer"],function(g,f,e){return g(e,{write:function(d,b,a){var c=document.createElement(this.getXMLType());d.children.forEach(function(d){var e=a.getSerializer(d.className);c.appendChild(e.write(d,b,a))},this);return c.childNodes},getXMLType:function(){return"ListItem"},getNodeType:function(){return"ListItem"},mustMerge:function(d,b){return!0}})})},"MW/rtc/model/io/serializers/providers/containers/ListItemContainerSerializerProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/model/io/serializers/containers/ListItemContainerSerializer"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/model/io/serializers/providers/containers/LiveAppLineContainerSerializerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/model/io/serializers/containers/LiveAppLineContainerSerializer"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},
createInstance:function(){return new e}})})},"MW/rtc/model/io/serializers/containers/LiveAppLineContainerSerializer":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/model/io/XmlUtils","MW/rtc/model/io/serializers/containers/ContainerSerializer"],function(g,f,e,d){return g(d,{write:function(b,a,c){var d=document.createElement(this.getXMLType());b=this._writeParagraph(b,a,c);d.appendChild(b);return d},_writeParagraph:function(b,a,c){b=e.createXMLElement();var d=e.createParagraphProperty(this.getXMLType());
b.appendChild(d);var d={className:"RichTextNode",text:""},f=c.getSerializer(d.className);b.appendChild(f.write(d,a,c));return b},read:function(b,a,c){},getXMLType:function(){return"text"},getNodeType:function(){return"LiveAppLineNode"}})})},"MW/rtc/model/io/serializers/providers/containers/RichTextContainerSerializerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/model/io/serializers/containers/RichTextContainerSerializer"],function(g,f,e){return g(f,
{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/model/io/serializers/providers/containers/SectionBreakContainerSerializerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/model/io/serializers/containers/SectionBreakContainerSerializer"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/model/io/serializers/containers/SectionBreakContainerSerializer":function(){define(["dojo/_base/declare",
"MW/rtc/model/io/XmlUtils","MW/rtc/model/io/DocumentTag","MW/rtc/model/io/serializers/Serializable"],function(g,f,e,d){return g(d,{write:function(b,a,c){b=f.createXMLElement(this.getXMLType());a=f.createXMLElement();c=f.createXMLElement(e.PARAGRAPH_PROPERTY_TAG_NAME);var d=f.createXMLElement(e.SECTION_PROPERTY_TAG_NAME);c.appendChild(d);a.appendChild(c);b.appendChild(a);return b},read:function(b,a,c){return{readObject:[{children:[],className:this.getNodeType()}],readStatus:!0}},getXMLType:function(){return"sectionbreak"},
getNodeType:function(){return"SectionBreak"}})})},"MW/rtc/model/io/serializers/providers/nodes/EquationSerializerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/model/io/serializers/nodes/EquationSerializer"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/model/io/serializers/nodes/EquationSerializer":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/model/io/XmlUtils",
"MW/rtc/model/io/DocumentTag","MW/rtc/model/io/serializers/Serializable"],function(g,f,e,d,b){return g(b,{_RELATIONSHIP_TARGET:"/mathml/",_PART_NAME:"eqn",_PART_TYPE:"text/xml",_PART_EXTENSION:"mml",AUTO_CENTER_CLASS:!0,write:function(a,c){var b=document.createElement(this.getXMLType()),f=e.createCustomXMLTag(this.getXMLType()),g=e.createXMLElement(d.CUSTOM_XML_PROPERTY),m=e.createCustomXMLAttribute("displayStyle",a.displayStyle);g.appendChild(m);f.appendChild(g);m=a.encoding||"tex";"mathml"===m&&
(m=e.createCustomXMLAttribute("encoding",m),g.appendChild(m),m=this._createRelationship(a,c),g.appendChild(m));g=e.createXMLElement(d.RUN_OF_TEXT_TAG_NAME);m=e.createXMLElement(d.TEXT_TAG_NAME);if(a.texString){var p=document.createTextNode(a.texString);m.appendChild(p)}g.appendChild(m);f.appendChild(g);b.appendChild(f);return b.childNodes[0]},_createRelationship:function(a,c){var b=c.getPartURI(this._RELATIONSHIP_TARGET,this._PART_NAME,this._PART_EXTENSION),f=this._findDuplicates(a,c);f?f=this._getRelationshipIdFromPart(f,
c):(f=this._createPartRelationship(c.getPart(d.DOCUMENT_TARGET),b),this._createPart(b,this._PART_TYPE,c).setContent(a.mathmlString),a.relationshipId=f);return e.createCustomXMLAttribute(d.RELATIONSHIP_ID_TAG_NAME,f)},_findDuplicates:function(a,c){var b=null;c.getParts().forEach(function(c){c.getContent()&&c.getContent()===a.mathmlString&&(b=c)});return b},_getRelationshipIdFromPart:function(a,c){var b=c.getPart(d.DOCUMENT_TARGET).getAllRelationships().getRelationshipCollection(),e;for(e in b)if(b[e].getTarget()===
a.getPartURI())return e},_createPart:function(a,c,b){return b.createPart(a,c)},_createPartRelationship:function(a,c){return a.createRelationship(d.MATHML_RELATIONSHIP_TYPE,c)},_readAttributes:function(a,c,b){a=a.getElementsByTagNameNS(d.NAMESPACE_URL,d.CUSTOM_XML_PROPERTY)[0].getElementsByTagNameNS(d.NAMESPACE_URL,d.CUSTOM_XML_ATTRIBUTE);for(var e=0;e<a.length;e++){var f=a[e].getAttributeNS(d.NAMESPACE_URL,d.NAME_TAG),g=a[e].getAttributeNS(d.NAMESPACE_URL,d.CUSTOM_XML_VALUE_TAG);f===d.RELATIONSHIP_ID_TAG_NAME&&
(f="mathmlString",g=this._readMathMLPart(c,g));b[f]=g}b.encoding=b.encoding||"tex"},_readMathMLPart:function(a,c){var b=a.getPart(d.DOCUMENT_TARGET).getRelationship(c).getTarget();return a.getPart(b).getContent()},read:function(a,c){var b={className:this.getNodeType()};this._readAttributes(a,c,b);var f=a.getElementsByTagNameNS(d.NAMESPACE_URL,d.RUN_OF_TEXT_TAG_NAME),f=e.getTextFromRun(f[0]);b.texString=f;return{readObject:b,readStatus:!0}},getXMLType:function(){return"equation"},getNodeType:function(){return"EquationNode"}})})},
"MW/rtc/model/io/serializers/providers/nodes/ImageSerializerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/model/io/serializers/nodes/ImageSerializer"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[""]}},createInstance:function(){return new e}})})},"MW/rtc/model/io/serializers/nodes/ImageSerializer":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/model/io/XmlUtils","MW/rtc/model/io/DocumentTag","MW/rtc/model/io/serializers/Serializable"],
function(g,f,e,d,b){return g(b,{_RELATIONSHIP_TARGET:"/media/",_PART_NAME:"image",_PART_TYPE:"image",_IMAGE_SOURCE:"imgSrc",AUTO_CENTER_CLASS:!0,write:function(a,c){var b=document.createElement(this.getXMLType()),f=e.createCustomXMLTag(this.getXMLType()),g=e.createXMLElement(d.CUSTOM_XML_PROPERTY),m=e.createCustomXMLAttribute(d.HEIGHT_ATTRIBUTE_NAME,a.height);g.appendChild(m);m=e.createCustomXMLAttribute(d.WIDTH_ATTRIBUTE_NAME,a.width);g.appendChild(m);m=this._createRelationship(a,c);g.appendChild(m);
f.appendChild(g);b.appendChild(f);return b.childNodes[0]},_createRelationship:function(a,c){var b=e.getImageExtension(a.imgSrc),f=c.getPartURI(this._RELATIONSHIP_TARGET,this._PART_NAME,b),g=this._findDuplicates(a,c);g?g=this._getRelationshipIdFromPart(g,c):(g=this._createPartRelationship(c.getPart(d.DOCUMENT_TARGET),f),this._createPart(f,this._PART_TYPE+"/"+b,c).setContent(a.imgSrc),a.relationshipId=g);return e.createCustomXMLAttribute(d.RELATIONSHIP_ID_TAG_NAME,g)},_findDuplicates:function(a,c){var b=
null;c.getParts().forEach(function(c){c.getContent()&&c.getContent()===a.imgSrc&&(b=c)});return b},_getRelationshipIdFromPart:function(a,c){var b=c.getPart(d.DOCUMENT_TARGET).getAllRelationships().getRelationshipCollection(),e;for(e in b)if(b[e].getTarget()===a.getPartURI())return e},_createPart:function(a,c,b){return b.createPart(a,c)},_createPartRelationship:function(a,c){return a.createRelationship(d.IMAGE_RELATIONSHIP_TYPE,c)},read:function(a,c){for(var b={className:this.getNodeType()},e=a.getElementsByTagNameNS(d.NAMESPACE_URL,
d.CUSTOM_XML_PROPERTY)[0].getElementsByTagNameNS(d.NAMESPACE_URL,d.CUSTOM_XML_ATTRIBUTE),f=0;f<e.length;f++){var g=e[f].getAttributeNS(d.NAMESPACE_URL,d.NAME_TAG),p=e[f].getAttributeNS(d.NAMESPACE_URL,d.CUSTOM_XML_VALUE_TAG);g===d.RELATIONSHIP_ID_TAG_NAME&&(g=this._IMAGE_SOURCE,p=this._readImagePart(c,p));b[g]=p}return{readObject:b,readStatus:!0}},_readImagePart:function(a,c){var b=a.getPart(d.DOCUMENT_TARGET).getRelationship(c).getTarget();return a.getPart(b).getContent()},getXMLType:function(){return"image"},
getNodeType:function(){return"ImageNode"}})})},"MW/rtc/model/io/serializers/providers/nodes/LiveControlSerializerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/model/io/serializers/nodes/LiveControlSerializer"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/model/io/serializers/nodes/LiveControlSerializer":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/model/io/XmlUtils",
"MW/rtc/model/io/DocumentTag","MW/rtc/model/io/serializers/Serializable"],function(g,f,e,d,b){return g(b,{_INTRODUCED_VERSION:"R2018a",write:function(a){var c=document.createElement(this.getXMLType()),b=e.createCustomXMLTag(this.getXMLType()),f=e.createXMLElement(d.CUSTOM_XML_PROPERTY),f=this._writeAttributes(f,a);b.appendChild(f);a=e.createAlternateContentXMLElementNS(d.MCNAMESPACE_TAG,d.ALTERNATECONTENT_TAG);var f=e.createAlternateContentXMLElementNS(d.MCNAMESPACE_TAG,d.CHOICE_TAG),g=e.createAlternateContentXMLElementNS(d.MCNAMESPACE_TAG,
d.FALLBACK_TAG);f.setAttribute(d.REQUIRES_ATTRIBUTE_NAME,this._INTRODUCED_VERSION);f.appendChild(b);a.appendChild(f);a.appendChild(g);c.appendChild(a);return c.childNodes[0]},_writeAttributes:function(a,c){a=this._writeAttribute(a,d.LIVE_CONTROL_CONTEXT_ATTRIBUTE_NAME,JSON.stringify(c.context));a=this._writeAttribute(a,d.LIVE_CONTROL_TEXT_ATTRIBUTE_NAME,c.text);a=this._writeAttribute(a,d.LIVE_CONTROL_START_OFFSET_LINE_ATTRIBUTE_NAME,c.startOffsetLine);a=this._writeAttribute(a,d.LIVE_CONTROL_START_COLUMN_ATTRIBUTE_NAME,
c.startColumn);a=this._writeAttribute(a,d.LIVE_CONTROL_END_OFFSET_LINE_ATTRIBUTE_NAME,c.endOffsetLine);return a=this._writeAttribute(a,d.LIVE_CONTROL_END_COLUMN_ATTRIBUTE_NAME,c.endColumn)},_writeAttribute:function(a,c,b){c=e.createCustomXMLAttribute(c,b);a.appendChild(c);return a},read:function(a,c,b){c={className:this.getNodeType()};a=a.getElementsByTagNameNS(d.NAMESPACE_URL,d.CUSTOM_XML_PROPERTY)[0].getElementsByTagNameNS(d.NAMESPACE_URL,d.CUSTOM_XML_ATTRIBUTE);for(var e=0;e<a.length;e++){var f=
a[e].getAttributeNS(d.NAMESPACE_URL,d.NAME_TAG);c[f]=a[e].getAttributeNS(d.NAMESPACE_URL,d.CUSTOM_XML_VALUE_TAG);"context"===f&&(c[f]=JSON.parse(c[f]))}return this._modifyLastPlainTextNode(b,c)},_modifyLastPlainTextNode:function(a,c){for(var b=c.startOffsetLine,d=a[b].children,e=d.length,f=d[e-1].text,g="",n=0;n<e-1;n++)g+=d[n].text;a[b].children.splice(-1,1);e=g.length;d=c.endColumn-e;e=f.substring(0,c.startColumn-e);f=f.substring(d,f.length);a=this._appendPlainTextNodeIfValid(e,a,b);a[b].children.push(c);
return this._appendPlainTextNodeIfValid(f,a,b)},_appendPlainTextNodeIfValid:function(a,c,b){a&&c[b].children.push({text:a,className:"PlainTextNode"});return c},getXMLType:function(){return"livecontrol"},getNodeType:function(){return"LiveControlNode"}})})},"MW/rtc/model/io/serializers/providers/nodes/PlainTextSerializerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/model/io/serializers/nodes/PlainTextSerializer"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},
createInstance:function(){return new e}})})},"MW/rtc/model/io/serializers/nodes/PlainTextSerializer":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/model/io/XmlUtils","MW/rtc/model/io/DocumentTag","MW/rtc/model/io/serializers/Serializable"],function(g,f,e,d,b){return g(b,{write:function(a){var c=e.createXMLElement(d.RUN_OF_TEXT_TAG_NAME),b=e.createXMLElement(d.TEXT_TAG_NAME),f=document.implementation.createDocument(d.NAMESPACE_URL,"textDocument",null);this._hasCDATAEndingSequence(a.text)?
this._modifyTextNodeWithEndingSequence(f,b,a.text):b.appendChild(this._createCDATASection(f,a.text));c.appendChild(b);return c},read:function(a){var c=!0,b=[];a.forEach(function(a){a=this._readCodeParagraph(a);b=a.readObject;c=c&&a.readStatus},this);return{readObject:b,readStatus:c}},_readCodeParagraph:function(a){var c=[];a=a.getElementsByTagNameNS(d.NAMESPACE_URL,d.RUN_OF_TEXT_TAG_NAME);e.getTextFromRun(a[0]).split("\n").forEach(function(a){var b={};b.className=this.getNodeType();b.text=a;c.push(b)},
this);return{readObject:c,readStatus:!0}},_createCDATASection:function(a,c){return a.createCDATASection(c)},_createCDATASectionForEndingCharacter:function(a,c){var b=a.createCDATASection("]]");c.appendChild(b);b=a.createCDATASection("\x3e");c.appendChild(b)},_hasCDATAEndingSequence:function(a){return!!a.match(/]]\x3e/g)},_modifyTextNodeWithEndingSequence:function(a,c,b){for(;b&&-1!==b.indexOf("]]\x3e");){var d=b.indexOf("]]\x3e");if(0!==d){var e=b.slice(0,d);c.appendChild(this._createCDATASection(a,
e))}this._createCDATASectionForEndingCharacter(a,c);b=b.substring(d+3);-1===b.indexOf("]]\x3e")&&""!==b&&c.appendChild(this._createCDATASection(a,b))}},getXMLType:function(){return"PlainTextNode"},getNodeType:function(){return"PlainTextNode"}})})},"MW/rtc/model/io/serializers/providers/nodes/RichTextSerializerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/model/io/serializers/nodes/RichTextSerializer"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},
createInstance:function(){return new e}})})},"MW/rtc/model/io/serializers/nodes/RichTextSerializer":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/model/io/XmlUtils","MW/rtc/model/io/DocumentTag","MW/rtc/model/io/serializers/Serializable"],function(g,f,e,d,b){return g(b,{write:function(a){var c=e.createXMLElement(d.RUN_OF_TEXT_TAG_NAME),b=e.createXMLElement(d.RUN_OF_TEXT_PROPERTY_TAG_NAME),f=!1,g;for(g in a)if(a.hasOwnProperty(g)&&("className"!==g&&"text"!==g)&&(f=!0,a[g])){var m=
this._createRunProperty(g);b.appendChild(m)}g=e.createXMLElement(d.TEXT_TAG_NAME);a=document.createTextNode(a.text);g.appendChild(a);f&&c.appendChild(b);c.appendChild(g);return c},read:function(a){return this._createObjectFromRun(a)},_createObjectFromRun:function(a){var c=!0,b={},d=e.getTextFromRun(a);a=this._getPropertyFromRun(a);0!==a.length&&a.forEach(function(a){"unrecognized"===a?c=!1:b[a]=!0});b.className=this.getNodeType();b.text=d;return{readObject:b,readStatus:c}},_getPropertyFromRun:function(a){var c=
[];a=a.getElementsByTagNameNS(d.NAMESPACE_URL,d.RUN_OF_TEXT_PROPERTY_TAG_NAME);if(0<a.length){var b;for(b=0;b<a[0].childNodes.length;b+=1){var e=a[0].childNodes[b];e.localName===d.BOLD_TAG_NAME?c.push("bold"):e.localName===d.ITALIC_TAG_NAME?c.push("italic"):e.localName===d.UNDERLINE_TAG_NAME?c.push("underline"):e.localName===d.RUN_OF_FONT?e.attributes[0]&&(e.attributes[0].localName===d.FONT_TYPE_TAG&&e.attributes[0].nodeValue===d.MONOSPACE_TAG)&&c.push("monospace"):c.push("unrecognized")}}return c},
_createRunProperty:function(a){switch(a){case "bold":return e.createXMLElement(d.BOLD_TAG_NAME);case "italic":return e.createXMLElement(d.ITALIC_TAG_NAME);case "underline":return e.createXMLElement(d.UNDERLINE_TAG_NAME);case "monospace":return a=e.createXMLElement(d.RUN_OF_FONT),a.setAttributeNS(d.NAMESPACE_URL,d.NAMESPACE_TAG+":"+d.FONT_TYPE_TAG,d.MONOSPACE_TAG),a;default:return e.createXMLElement()}},getXMLType:function(){return"RichTextNode"},getNodeType:function(){return"RichTextNode"}})})},"MW/rtc/nodes/insertionrules/LineNodeInsertionRulesProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./LineNodeInsertionRules"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/nodes/insertionrules/LineNodeInsertionRules":function(){define(["dojo/_base/declare","MW/rtc/nodes/inner/LineNode","MW/rtc/plugins/insertionrules/BaseInsertionRules","MW/rtc/plugins/insertionrules/InsertionRuleConstants"],function(g,f,e,d){return g([e],{_compatibleParents:[],
constructor:function(){},destroy:function(){},getApplicableNodeClass:function(){return f},getTopLevelInsertionInstruction:function(b,a,c,e,f){return f.isAtLeftEdge()?{insertInRoot:{relationToPosition:d.RELATION.BEFORE}}:f.isAtRightEdge()?{insertInRoot:{relationToPosition:d.RELATION.AFTER}}:{insertInRoot:{insertionPosition:f}}}})})},"MW/rtc/nodes/insertionrules/LiveControlNodeInsertionRulesProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LiveControlNodeInsertionRules"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/nodes/insertionrules/LiveControlNodeInsertionRules":function(){define(["dojo/_base/declare","MW/rtc/nodes/inner/LineNode","MW/rtc/plugins/insertionrules/BaseInsertionRules","MW/rtc/plugins/insertionrules/InsertionRuleConstants","MW/rtc/plugins/language/matlab/codingui/livecontrols/nodes/LiveControlNode"],function(g,f,e,d,b){return g([e],{_compatibleParents:[f],constructor:function(){},
destroy:function(){},getApplicableNodeClass:function(){return b},getTopLevelInsertionInstruction:function(a,c,b,e,g){return{insertInRoot:{relationToPosition:d.RELATION.AFTER,containerConstructor:f}}}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/nodes/LiveControlNode":function(){define(["dojo/_base/declare","MW/rtc/nodes/OpaqueNode"],function(g,f){return g([f],{className:"LiveControlNode",constructor:function(e){var d=e.context.data;this.context={data:d,type:e.context.type};e=" ";d&&
(d=d.value,e=void 0!==d&&""!==d?d:e);this.text=e.toString();this.widget=this.intermediateEvalText=null},getCodeText:function(){return this.getText()},getText:function(){return this.text||" "},maxOffset:function(){return this.getText().length},_serializeAttributes:function(e){e.text=this.text;e.context=this.context;e.startColumn=this.startPosition().getLineColumn().column-1;e.endColumn=this.endPosition().getLineColumn().column-1},setContextData:function(e){this.context.data=e},getContextData:function(){return this.context.data},
getContext:function(){return this.context},setWidget:function(e){this.widget=e},getWidget:function(){return this.widget},getType:function(){return this.context.type},movePositionRight:function(e){return 0===e.getOffset()?this.endPosition():this.inherited(arguments)},movePositionLeft:function(e){return e.getOffset()===this.maxOffset()?this.startPosition():this.inherited(arguments)},isContextEqualTo:function(e){var d=this.getContext();return JSON.stringify(d.data)===JSON.stringify(e.data)&&d.type===
e.type}})})},"MW/rtc/nodes/insertionrules/OpaqueNodeInsertionRulesProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./OpaqueNodeInsertionRules"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/nodes/insertionrules/OpaqueNodeInsertionRules":function(){define("dojo/_base/declare mw-log/Log MW/rtc/model/Position MW/rtc/nodes/OpaqueNode MW/rtc/plugins/insertionrules/BaseInsertionRules MW/rtc/plugins/insertionrules/InsertionRuleConstants MW/rtc/plugins/insertionrules/receivinginstructions/ContinueUpInstruction MW/rtc/plugins/insertionrules/receivinginstructions/ContinueAtPositionInstruction MW/rtc/plugins/richtext/nodes/inner/RichTextContainerNode MW/rtc/plugins/richtext/nodes/inner/RichTextParagraphNode".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return g([b],{_compatibleParents:[k],constructor:function(){},destroy:function(){},getApplicableNodeClass:function(){return d},getReceivingInstruction:function(a){if(a.isAtEdge())return new c;a=a.getNode();a=new e(a,a.maxOffset());return new h(a)},getTopLevelInsertionInstruction:function(c,b,d,e,h){return{insertInRoot:{relationToPosition:a.RELATION.AFTER,containerConstructor:l}}}})})},"MW/rtc/plugins/insertionrules/receivinginstructions/ContinueUpInstruction":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/insertionrules/BaseInsertionInstruction","MW/rtc/plugins/insertionrules/InsertionRuleConstants"],function(g,f,e){return g([f],{constructor:function(){this._type=e.RECEIVING_INSTRUCTION.CONTINUE_UP}})})},"MW/rtc/plugins/insertionrules/receivinginstructions/ContinueAtPositionInstruction":function(){define(["dojo/_base/declare","MW/rtc/plugins/insertionrules/BaseInsertionInstruction","MW/rtc/plugins/insertionrules/InsertionRuleConstants"],function(g,f,e){return g([f],{constructor:function(d){if(!d||
!d.isValid())throw Error("MW.rtc.plugins.insertionrules.receivinginstructions.ContinueAtPositionInstruction: Invalid position");this._type=e.RECEIVING_INSTRUCTION.CONTINUE_AT_POSITION;this._position=d},getPosition:function(){return this._position}})})},"MW/rtc/nodes/insertionrules/PlainTextNodeInsertionRulesProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./PlainTextNodeInsertionRules"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},
createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/nodes/insertionrules/PlainTextNodeInsertionRules":function(){define("dojo/_base/declare mw-log/Log MW/rtc/nodes/inner/LineNode MW/rtc/nodes/leaf/PlainTextNode MW/rtc/plugins/insertionrules/BaseInsertionRules MW/rtc/plugins/insertionrules/InsertionRuleConstants".split(" "),function(g,f,e,d,b,a){return g([b],{_compatibleParents:[e],constructor:function(){},destroy:function(){},getApplicableNodeClass:function(){return d},
getTopLevelInsertionInstruction:function(c,b,d,f,g){return{insertInRoot:{relationToPosition:a.RELATION.AT,containerConstructor:e}}}})})},"MW/rtc/plugins/blockmatching/BlockMatchingPluginProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./BlockMatchingPlugin"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.internaldocument rtc.view matlab.tokens rtc.offscreennotification rtc.linenumberservice rtc.actionservice rtc.cursorcontroller".split(" ")}},
createInstance:function(d,b,a,c,h,f,g){return new e(d,b,a,c,h,f,g)}})})},"MW/rtc/plugins/blockmatching/BlockMatchingPlugin":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-construct dojo/on dojo/touch MW/rtc/abstract/AbstractPlugin MW/rtc/model/Range MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenMatcher MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenMatcherRules MW/rtc/plugins/offscreennotification/OffscreenNotificationAlignment MW/rtc/plugins/offscreennotification/OffscreenNotificationUtils MW/rtc/view/ViewEventUtilities ./BlockMatchingUtils".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q){return g(c,{_BLOCK_MATCHING_POPUP:"blockMatchingPopup",_BLOCK_MATCHING_LINE_NUMBER:"blockMatchingPopupLineNumber",_BLOCK_MATCHING_CODE:"blockMatchingPopupCode",_BLOCK_MATCHING_CONTENT:"blockMatchingPopupContent",_BLOCK_MATCHING_ELLIPSES:"blockMatchingPopupEllipses",_BLOCK_MATCHING_LIVE_CONTROL:"blockMatchingLiveControl",_MATCHED_POSITION_HORIZONTAL:{RIGHT:1,RIGHT_SAME_LINE:2,LEFT:3,LEFT_SAME_LINE:4,CENTER:5},_MATCHED_POSITION_VERTICAL:{ABOVE:1,BELOW:2,CENTER:3},
_POPUP_BORDER_WIDTH:1,_POPUP_NUMBER_BORDER_WIDTH:1,_POPUP_NUMBER_PADDING:5,_POPUP_CONTENT_PADDING:5,_POPUP_OFFSET:3,_ELLIPSES:"...",constructor:function(a,c,b,d,h,f,g){this._internalDocument=a;this._view=c;this._cursorController=g;this._offscreenNotification=d;this._lineNumberService=h;this._tokenMatcher=new k(a,b);this._notificationHandles=[];this.own(e.after(c,"onViewUpdated",this._handleViewUpdated.bind(this),!0));this.own(e.after(g,"onUpdate",this._handleUpdate.bind(this)));a=[{id:"rtc_blockmatching_clearnotifications",
key:"escape",enabled:!0,callback:this._removeNotifications.bind(this)}];f.loadActions(a)},_handleViewUpdated:function(a){(n.hasScrollEvent(a)||n.hasSizingEvent(a))&&this._removeNotifications()},_removeNotifications:function(){for(var a=0;a<this._notificationHandles.length;a++){var c=this._notificationHandles[a].id;this._notificationHandles[a].eventHandle.remove();this._offscreenNotification.removeOffscreenNotification(c)}a=0<this._notificationHandles.length;this._notificationHandles=[];return a},
_handleUpdate:function(){this._removeNotifications();this._showNotificationForCursor()},_showNotificationForCursor:function(){var a=this._cursorController.getCursors();if(!(1<a.length||this._cursorController.hasSelection())){var a=a[0].getCursorPosition(),c=this._tokenMatcher.findMatchingTokens(a);if(c)switch(l.getTokenTypeForMatching(c.tokenMatchedFor)){case l.TOKEN_TYPE.START_TOKEN:this._showNotificationForToken(a,c.endToken);break;case l.TOKEN_TYPE.END_TOKEN:this._showNotificationForToken(a,c.startToken);
break;case l.TOKEN_TYPE.MID_TOKEN:this._showNotificationForToken(a,c.startToken),this._showNotificationForToken(a,c.endToken)}}},_showNotificationForToken:function(c,d){if(this._shouldShowNotificationForToken(d)){var e=this._getTokenRange(d.token),h=e.getStartPosition().getLine(),h=this._createNotification(h,c,e),f=this._getNotificationAlignment(c,e);if(f=this._offscreenNotification.displayOffscreenNotificationForDomNode(e,h,f)){var f={id:f,eventHandle:null},k=function(a){this._cursorController.setPositions([a]);
this._view.scrollPositionIntoView(a);this._removeNotifications()}.bind(this,e.getStartPosition());f.eventHandle=b(h,a.press,function(a){a.stopPropagation();k()});this._notificationHandles.push(f)}}},_shouldShowNotificationForToken:function(a){return a&&!a.mismatch},_getTokenRange:function(a){var c=a.getPositionInfo(),b=a.getPositionInfo();b.column+=a.getValue().length;a=this._internalDocument.getPositionForLineColumn(c.line+1,c.column+1);b=this._internalDocument.getPositionForLineColumn(b.line+1,
b.column+1);return new h(a,b)},_createNotification:function(a,c,b){var e=this._getCodeNodeFromLineNum(a),h=this._view.getCharacterWidthForLine(a),f=this._getAvailableWidthInCharacters(h),k=d.create("div",{"class":this._BLOCK_MATCHING_POPUP}),f=this._addLineNumberToNotificationIfNecessary(k,a,f,h);this._truncateNotificationIfNecessary(k,e,b,f,c,a);return k},_getCodeNodeFromLineNum:function(a){a=this._internalDocument.getLineNode(a-1);var c=d.create("div",{"class":this._BLOCK_MATCHING_CODE});a.children.forEach(function(a){var b=
null;a.widget?(b=d.create("div",{"class":this._BLOCK_MATCHING_LIVE_CONTROL}),b.innerHTML=a.getText()):b=a.box.cloneNode(!0);d.place(b,c)},this);return c},_getAvailableWidthInCharacters:function(a){var c=2*(this._POPUP_BORDER_WIDTH+this._POPUP_CONTENT_PADDING)+this._POPUP_OFFSET,b=this._view.getClientWidth();return Math.floor((b-c)/a)},_addLineNumberToNotificationIfNecessary:function(a,c,b,e){if(this._view.isLineInView(c,!0))return b;a=d.create("span",{"class":this._BLOCK_MATCHING_LINE_NUMBER},a);
c=this._lineNumberService.getCodeLineNumberFromLineNumber(c-1);a.innerText=c.toString();return b-Math.ceil((a.innerText.length*e+2*this._POPUP_NUMBER_PADDING+this._POPUP_NUMBER_BORDER_WIDTH)/e)},_truncateNotificationIfNecessary:function(a,c,b,e,h,f){a=d.create("div",{"class":this._BLOCK_MATCHING_CONTENT},a);h=this._getBoundsOfTruncation(h,b,f,c);b=this._getAmountToTruncateAroundRange(c,b,e,h.leftBound,h.rightBound);f=0<b.right;var k=0;0<b.left&&(k=this._addEllipsesToDomNode(a,e,h.leftBound,h.rightBound),
q.removeCharactersFromFrontOfDomNode(c,b.left+k));d.place(c,a);f&&(k=this._addEllipsesToDomNode(a,e,h.leftBound,h.rightBound),q.removeCharactersFromBackOfDomNode(c,b.right+k))},_getBoundsOfTruncation:function(a,c,b,d){var e=a.getLine();a=a.getColumn();var h=c.getStartPosition().getColumn(),f=null,f=e===b&&h>a?Math.min(c.getStartPosition().getColumn(),this._getRightmostVisibleColumnNum(b)):1,k=null,k=e===b&&h<a?Math.max(c.getEndPosition().getColumn(),this._getLeftmostVisibleColumnNum(b)):d.innerText.length+
1;return{leftBound:f,rightBound:k}},_getRightmostVisibleColumnNum:function(a){a=this._view.getCoordinateForLineColumn(a,1);a.x=this._view.getScrollLeft()+this._view.getClientWidth();return this._view.getPositionFromCoordinate(a).getColumn()},_getLeftmostVisibleColumnNum:function(a){a=this._view.getCoordinateForLineColumn(a,1);a.x=this._view.getScrollLeft();a=this._view.getPositionFromCoordinate(a);var c=a.getColumn();return this._view.isPositionInView(a,!0)?c:c+1},_getAmountToTruncateAroundRange:function(a,
c,b,d,e){a=a.innerText.length;d=void 0===d?1:d;e=void 0===e?a+1:e;var h=c.getStartPosition().getColumn();c=c.getEndPosition().getColumn();var f=c-h,k=Math.floor((b-f)/2),g=Math.min(k,h-d);b=b-f-g;e=Math.min(b,e-c);e<b&&g===k&&(g=Math.min(k+(b-e),h-d));return{left:h-g-1,right:a-c-e+1}},_addEllipsesToDomNode:function(a,c,b,e){d.create("span",{"class":this._BLOCK_MATCHING_ELLIPSES},a).innerText=this._ELLIPSES;return Math.max(Math.min(e-b-c+this._ELLIPSES.length,this._ELLIPSES.length),0)},_getNotificationAlignment:function(a,
c){var b=this._getTokenLocation(a,c),d=null,e=null,h=0,f=0,k=0;switch(b.verticalLocation){case this._MATCHED_POSITION_VERTICAL.ABOVE:d=p.VERTICAL_POSITION.TOP;k=this._POPUP_OFFSET;break;case this._MATCHED_POSITION_VERTICAL.BELOW:d=p.VERTICAL_POSITION.BOTTOM;k=-this._POPUP_OFFSET;break;default:d=p.VERTICAL_POSITION.NEAREST}switch(b.horizontalLocation){case this._MATCHED_POSITION_HORIZONTAL.RIGHT_SAME_LINE:e=p.HORIZONTAL_POSITION.RIGHT;h=1;k=this._POPUP_BORDER_WIDTH;f=-this._POPUP_OFFSET;break;case this._MATCHED_POSITION_HORIZONTAL.LEFT_SAME_LINE:e=
p.HORIZONTAL_POSITION.LEFT;h=-1;k=-this._POPUP_BORDER_WIDTH;f=this._POPUP_OFFSET;break;default:e=p.HORIZONTAL_POSITION.LEFT,f=this._POPUP_OFFSET}return new m(e,d,0,0,0,h,f,k)},_getTokenLocation:function(a,c){var b={horizontalLocation:null,verticalLocation:null},d=a.getLine(),e=c.getStartPosition().getLine(),h=this._view.getVisibleLineNumbers(!0);switch(!0){case e<h[0]:b.verticalLocation=this._MATCHED_POSITION_VERTICAL.ABOVE;break;case e>h[h.length-1]:b.verticalLocation=this._MATCHED_POSITION_VERTICAL.BELOW;
break;default:b.verticalLocation=this._MATCHED_POSITION_VERTICAL.CENTER}var d=d===e,e=this._view.getScrollLeft(),h=e+this._view.getClientWidth(),f=this._view.getCoordinateForPosition(c.getStartPosition()).x,k=this._view.getCoordinateForPosition(c.getEndPosition()).x;switch(!0){case d&&k>h:b.horizontalLocation=this._MATCHED_POSITION_HORIZONTAL.RIGHT_SAME_LINE;break;case d&&f<e:b.horizontalLocation=this._MATCHED_POSITION_HORIZONTAL.LEFT_SAME_LINE;break;case k>e:b.horizontalLocation=this._MATCHED_POSITION_HORIZONTAL.RIGHT;
break;case f<e:b.horizontalLocation=this._MATCHED_POSITION_HORIZONTAL.LEFT_SAME_LINE;break;default:b.horizontalLocation=this._MATCHED_POSITION_HORIZONTAL.CENTER}return b},destroy:function(){this.inherited(arguments);this._removeNotifications()}})})},"MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenMatcher":function(){define(["dojo/_base/declare","mw-log/Log","MW/rtc/model/DocumentUtilities","./MatlabTokenConstants","./MatlabTokenMatcherRules"],function(g,f,e,d,b){return g(null,{_SCAN_FORWARD:1,
_SCAN_BACKWARD:2,_SCAN_FORWARD_AND_BACKWARD:3,constructor:function(a,c){this._internalDocument=a;this._matlabTokens=c},findMatchingTokens:function(a){f.assert(a&&a.isValid(),"Invalid position provided");a=this._getTokenAtPosition(a);if(!a||!b.isMatchableToken(a))return null;var c=null;switch(!0){case b.isStartToken(a):c=this._SCAN_FORWARD;break;case b.isEndToken(a):c=this._SCAN_BACKWARD;break;default:c=this._SCAN_FORWARD_AND_BACKWARD}return this._scanForMatches(a,c)},_getTokenAtPosition:function(a){var c=
a.getLine()-1;a=a.getColumn()-1;this._shouldShiftColumn(c,a)&&a--;return this._matlabTokens.getTokenOnLineColumn(c,a)},_shouldShiftColumn:function(a,c){if(this._isLastColumnForLine(a,c)||this._hasNeighboringClosingBracket(a,c))return!0;var d=this._matlabTokens.getTokenOnLineColumn(a,c);return!d?!1:!b.isMatchableToken(d)},_isLastColumnForLine:function(a,c){e.checkLineExists(this._internalDocument,a+1);var b=this._internalDocument.getLineNode(a).getText().length;return c===b},_hasNeighboringClosingBracket:function(a,
c){var d=this._matlabTokens.getTokenOnLineColumn(a,c-1),e=this._matlabTokens.getTokenOnLineColumn(a,c),d=d?b.isClosingBracket(d):!1,e=e?b.isClosingBracket(e):!1;return d||e},_scanForMatches:function(a,c){if(c===this._SCAN_FORWARD_AND_BACKWARD)return this._scanForMatchesBothDirections(a);for(var d=this._getInitialResultsObject(a),e=this._getNextToken(a,c),f=0;e;){switch(b.getTokenTypeForMatching(e)){case b.TOKEN_TYPE.START_TOKEN:if(0===f&&c===this._SCAN_BACKWARD){var g={token:e,mismatch:!b.areMatchingTokens(a,
e)};d.startToken=g;return d}f++;break;case b.TOKEN_TYPE.MID_TOKEN:0===f&&(g={token:e,mismatch:!b.areMatchingTokens(e,a)},c===this._SCAN_FORWARD?d.midTokens.push(g):d.midTokens.unshift(g));break;case b.TOKEN_TYPE.END_TOKEN:if(0===f&&c===this._SCAN_FORWARD)return g={token:e,mismatch:!b.areMatchingTokens(e,a)},d.endToken=g,d;f--}e=this._getNextToken(e,c)}return d},_scanForMatchesBothDirections:function(a){var c=this._scanForMatches(a,this._SCAN_FORWARD),b=this._scanForMatches(a,this._SCAN_BACKWARD);
c.midTokens.shift();var d=b.midTokens.concat(c.midTokens);return{startToken:b.startToken,midTokens:d,endToken:c.endToken,tokenMatchedFor:a}},_getInitialResultsObject:function(a){var c={startToken:null,midTokens:[],endToken:null,tokenMatchedFor:a},d={token:a,mismatch:!1};switch(b.getTokenTypeForMatching(a)){case b.TOKEN_TYPE.START_TOKEN:c.startToken=d;break;case b.TOKEN_TYPE.MID_TOKEN:c.midTokens.push(d);break;case b.TOKEN_TYPE.END_TOKEN:c.endToken=d}return c},_getNextToken:function(a,c){return c===
this._SCAN_FORWARD?this._getNextTokenForward(a):this._matlabTokens.getPreviousTokenOf(a)},_getNextTokenForward:function(a){var c=a.getPositionInfo().line,b=this._internalDocument.getMaxLineNumber()-1;for(a=this._matlabTokens.getNextTokenOf(a);!a;){c++;if(c>b)break;a=this._matlabTokens.getFirstTokenOnLine(c)}return a}})})},"MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenConstants":function(){define([],function(){return{TOKENS:{FUNCTION:1,NESTED:2,IF:3,SWITCH:4,TRY:5,WHILE:6,FOR:7,END:8,ELSE:9,
ELSEIF:10,BREAK:11,RETURN:12,PARFOR:13,GLOBAL:15,PERSISTENT:16,CATCH:20,CONTINUE:21,CASE:22,OTHERWISE:23,CLASSDEF:25,PROPERTIES:28,METHODS:30,EVENTS:31,ENUMERATION:32,SPMD:33,PARSECTION:34,SECTION:35,ID:40,EEND:41,INT:42,FLOAT:43,STRING:44,DUAL:45,BANG:46,QUEST:47,SEMI:50,COMMA:51,LP:52,RP:53,LB:54,RB:55,LC:56,RC:57,FEEND:58,TRANS:60,DOTTRANS:61,NOT:62,AT:63,DOLLAR:64,BACKQUOTE:65,DOUBLEQUOTE:66,SHARP:67,PLUS:70,MINUS:71,MUL:72,DIV:73,LDIV:74,EXP:75,COLON:76,DOT:80,DOTMUL:81,DOTDIV:82,DOTLDIV:83,
DOTEXP:84,AND:85,OR:86,ANDAND:87,OROR:88,LT:89,GT:90,LE:91,GE:92,EQ:93,NE:94,EQUALS:95,CNE:96,EOL:100,SEOL:101,CEOL:102,IEOL:103,COMMENT:105,BLKSTART:106,BLKCOM:107,BLKEND:108,SECTION_TITLE:109,CPAD:109,PRAGMA:110,DOTDOTDOT:111,DOTDOT:112,DEEP_NEST:113,DEEP_STMT:114,WHITE:116,NEGERR:118,SEMERR:119,EOLERR:120,UNTERM:121,BADCHAR:122,DEEP_PAREN:123,FP_ERR:124,RES_ERR:125,DEEP_COM:126,BEGIN_TYPE:127,END_TYPE:128,STRING_LITERAL:129,UNTERM_STRING_LITERAL:130},TOKEN_TO_VALUE:{"0":"NA",1:"function",2:"nested",
3:"if",4:"switch",5:"try",6:"while",7:"for",8:"end",9:"else",10:"elseif",11:"break",12:"return",13:"parfor",14:"NA",15:"global",16:"persistent",17:"NA",18:"NA",19:"NA",20:"catch",21:"continue",22:"case",23:"otherwise",24:"NA",25:"classdef",26:"NA",27:"NA",28:"properties",29:"NA",30:"methods",31:"events",32:"enumeration",33:"spmd",34:"parsection",35:"section",36:"NA",37:"NA",38:"NA",39:"NA",40:"ID",41:"\x3cend\x3e",42:"\x3cint\x3e",43:"\x3cfloat\x3e",44:"\x3cstring\x3e",45:"\x3cdual\x3e",46:"\x3cBANG\x3e",
47:"?",48:"NA",49:"NA",50:";",51:",",52:"(",53:")",54:"[",55:"]",56:"{",57:"}",58:"NA",59:"NA",60:"'",61:".'",62:"~",63:"@",64:"$",65:"`",66:"\\",67:"#",68:"NA",69:"NA",70:"+",71:"-",72:"*",73:"/",74:"\\\\",75:"^",76:":",77:"::",78:"NA",79:"NA",80:".",81:".*",82:"./",83:".\\",84:".^",85:"\x26",86:"|",87:"\x26\x26",88:"||",89:"\x3c",90:"\x3e",91:"\x3c\x3d",92:"\x3e\x3d",93:"\x3d\x3d",94:"~\x3d",95:"\x3d",96:"\x3cCNE\x3e",97:"NA",98:"NA",99:"NA",100:"\x3cEOL\x3e",101:"\x3cSEOL\x3e",102:"\x3cCEOL\x3e",
103:"\x3cIEOL\x3e",104:"NA",105:"\x3ccomment\x3e",106:"\x3cbegin block comment\x3e",107:"\x3cblock comment\x3e",108:"\x3cend block comment\x3e",109:"%%",110:"PRAGMA",111:"...",112:"\x3cDOT DOT\x3e",113:"\x3cDEEP NEST\x3e",114:"\x3cDEEP STMT\x3e",115:"NA",116:"\x3cwhitespace\x3e",117:"NA",118:"\x3cNEG ERROR\x3e",119:"\x3cSEM ERROR\x3e",120:"\x3cEOL ERROR\x3e",121:"\x3cunterm string\x3e",122:"\x3cbadchar\x3e",123:"\x3cDEEP PAREN\x3e",124:"\x3cFP ERROR\x3e",125:"\x3cRES ERROR\x3e",126:"\x3cDEEP COM\x3e",
127:"NA",128:"NA",129:"\x3cstring literal\x3e",130:"\x3cunterm string literal\x3e"},TOKEN_TO_CATEGORY:{"0":339,1:333,2:333,3:333,4:333,5:333,6:333,7:333,8:333,9:333,10:333,11:333,12:333,13:333,14:333,15:333,16:333,17:333,18:333,19:333,20:333,21:333,22:333,23:333,24:333,25:333,26:333,27:333,28:333,29:333,30:333,31:333,32:333,33:333,34:333,35:333,44:44,45:45,46:338,64:122,65:122,66:122,67:122,105:105,106:106,107:107,108:108,109:109,110:110,111:333,121:337,122:122,125:122,129:44,130:337}}})},"MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenMatcherRules":function(){define(["mw-log/Log",
"./MatlabTokenConstants","./MatlabTokenUtilities"],function(g,f,e){return{TOKEN_TYPE:{NON_MATCHABLE_TOKEN:0,START_TOKEN:1,MID_TOKEN:2,END_TOKEN:3},isMatchableToken:function(d){return this.getTokenTypeForMatching(d)!==this.TOKEN_TYPE.NON_MATCHABLE_TOKEN},getTokenTypeForMatching:function(d){switch(!0){case this.isStartToken(d):return this.TOKEN_TYPE.START_TOKEN;case this.isMidToken(d):return this.TOKEN_TYPE.MID_TOKEN;case this.isEndToken(d):return this.TOKEN_TYPE.END_TOKEN;default:return this.TOKEN_TYPE.NON_MATCHABLE_TOKEN}},
isStartToken:function(d){g.assert(d,"Invalid token received");var b=d.getType();return e.isTokenStartOfBlock(d)||b===f.TOKENS.LP||b===f.TOKENS.LB||b===f.TOKENS.LC},isMidToken:function(d){g.assert(d,"Invalid token received");return e.isTokenStartOfMidBlock(d)},isEndToken:function(d){g.assert(d,"Invalid token received");var b=d.getType();return e.isTokenEndOfBlock(d)||b===f.TOKENS.RP||b===f.TOKENS.RB||b===f.TOKENS.RC},isClosingBracket:function(d){g.assert(d,"Invalid token received");return 0<=[f.TOKENS.RP,
f.TOKENS.RB,f.TOKENS.RC].indexOf(d.getType())},areMatchingTokens:function(d,b){g.assert(d,"Expected first parameter to be a valid token, received: "+d);g.assert(b,"Expected second parameter to be a valid token, received: "+b);var a=d.getType(),c=b.getType();c===f.TOKENS.END&&(c=a,a=f.TOKENS.END);switch(a){case f.TOKENS.LP:return c===f.TOKENS.RP;case f.TOKENS.RP:return c===f.TOKENS.LP;case f.TOKENS.LB:return c===f.TOKENS.RB;case f.TOKENS.RB:return c===f.TOKENS.LB;case f.TOKENS.LC:return c===f.TOKENS.RC;
case f.TOKENS.RC:return c===f.TOKENS.LC;case f.TOKENS.IF:return 0<=[f.TOKENS.ELSE,f.TOKENS.ELSEIF].indexOf(c);case f.TOKENS.TRY:return c===f.TOKENS.CATCH;case f.TOKENS.SWITCH:return 0<=[f.TOKENS.CASE,f.TOKENS.OTHERWISE].indexOf(c);case f.TOKENS.ELSEIF:return 0<=[f.TOKENS.IF,f.TOKENS.ELSEIF,f.TOKENS.ELSE].indexOf(c);case f.TOKENS.ELSE:return 0<=[f.TOKENS.IF,f.TOKENS.ELSEIF].indexOf(c);case f.TOKENS.CATCH:return c===f.TOKENS.TRY;case f.TOKENS.CASE:return 0<=[f.TOKENS.SWITCH,f.TOKENS.CASE,f.TOKENS.OTHERWISE].indexOf(c);
case f.TOKENS.OTHERWISE:return 0<=[f.TOKENS.SWITCH,f.TOKENS.CASE].indexOf(c);case f.TOKENS.END:return 0<=[f.TOKENS.FOR,f.TOKENS.WHILE,f.TOKENS.PARFOR,f.TOKENS.SPMD,f.TOKENS.IF,f.TOKENS.TRY,f.TOKENS.SWITCH,f.TOKENS.CLASSDEF,f.TOKENS.METHODS,f.TOKENS.PROPERTIES,f.TOKENS.ENUMERATION,f.TOKENS.EVENTS,f.TOKENS.FUNCTION,f.TOKENS.ELSEIF,f.TOKENS.ELSE,f.TOKENS.CATCH,f.TOKENS.CASE,f.TOKENS.OTHERWISE].indexOf(c)}return!1}}})},"MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities":function(){define(["./MatlabTokenConstants"],
function(g){return{getTokenValueById:function(f){return g.TOKEN_TO_VALUE[f]},getTokenCategoryById:function(f){return g.TOKEN_TO_CATEGORY[f]},getTokenIdByName:function(f){return g.TOKENS[f]},isTokenStartOfBlock:function(f){f=f.getType();return f===g.TOKENS.FOR||f===g.TOKENS.PARFOR||f===g.TOKENS.IF||f===g.TOKENS.WHILE||f===g.TOKENS.TRY||f===g.TOKENS.SWITCH||f===g.TOKENS.FUNCTION||f===g.TOKENS.NESTED||f===g.TOKENS.CLASSDEF||f===g.TOKENS.PROPERTIES||f===g.TOKENS.ENUMERATION||f===g.TOKENS.SPMD||f===g.TOKENS.EVENTS||
f===g.TOKENS.METHODS},isTokenEndOfBlock:function(f){return f.getType()===g.TOKENS.END},isTokenStartOfMidBlock:function(f){f=f.getType();return f===g.TOKENS.ELSE||f===g.TOKENS.ELSEIF||f===g.TOKENS.CATCH||f===g.TOKENS.OTHERWISE||f===g.TOKENS.CASE},isSectionTitleToken:function(f){return f.getType()===g.TOKENS.SECTION_TITLE},isWhitespaceToken:function(f){return f.getType()===g.TOKENS.WHITE},isTokenStartOfBlockIndent:function(f){return this.isTokenStartOfBlock(f)||this.isTokenStartOfMidBlock(f)},isCommentToken:function(f){f=
f.getType();return g.TOKENS.COMMENT===f||g.TOKENS.SECTION_TITLE===f||g.TOKENS.BLKCOM===f||g.TOKENS.BLKSTART===f||g.TOKENS.BLKEND===f||g.TOKENS.PRAGMA===f},isLineCommentToken:function(f){f=f.getType();return g.TOKENS.COMMENT===f},isBlockCommentToken:function(f){f=f.getType();return g.TOKENS.BLKCOM===f||g.TOKENS.BLKSTART===f||g.TOKENS.BLKEND===f},isSectionTitleToken:function(f){f=f.getType();return g.TOKENS.SECTION_TITLE===f},isSwitchToken:function(f){return f.getType()===g.TOKENS.SWITCH},isEndOfLineToken:function(f){return f.getType()===
g.TOKENS.EOL||f.getType()===g.TOKENS.SEOL||f.getType()===g.TOKENS.CEOL||f.getType()===g.TOKENS.IEOL},isFunctionToken:function(f){return f.getType()===g.TOKENS.FUNCTION||f.getType()===g.TOKENS.NESTED},isIndentableFunction:function(f){return f.getType()===g.TOKENS.NESTED},isMatlabStringToken:function(f){f=f.getType();return f===g.TOKENS.STRING||f===g.TOKENS.STRING_LITERAL},isMatlabUntermDoubleQuoteStringToken:function(f){return f.getType()===g.TOKENS.UNTERM_STRING_LITERAL},isMatlabUntermSingleQuoteStringToken:function(f){return f.getType()===
g.TOKENS.UNTERM},doesTokenMarkEndOfTypeSection:function(f){f=f.getType();return f===g.TOKENS.DOTDOTDOT||f===g.TOKENS.COMMENT||f===g.TOKENS.CEOL||f===g.TOKENS.EOL||f===g.TOKENS.IEOL||f===g.TOKENS.SEOL||f===g.TOKENS.END_TYPE},isDotDotDotToken:function(f){return f.getType()===g.TOKENS.DOTDOTDOT},isNestedToken:function(f){return f.getType()===g.TOKENS.NESTED},isBeginTypeToken:function(f){return f.getType()===g.TOKENS.BEGIN_TYPE},getMatchingTokenInLine:function(f,e,d){var b=null;f.some(function(a){var c=
a.getColumn(),h=c+a.getValue().length;if(e>=c&&e<=h&&d>=c&&d<=h)return b=a,!0});return b},getTokensFromLineRange:function(f,e,d,b){for(var a=[];e<=d;e+=1)for(var c=f[e],h=0;h<c.length;h+=1){var k=c[h];(!b||b(k,h,c))&&a.push(k)}return a}}})},"MW/rtc/plugins/offscreennotification/OffscreenNotificationAlignment":function(){define(["dojo/_base/declare","./OffscreenNotificationUtils"],function(g,f){return g(null,{_DEFAULT_HORIZONTAL_ALIGNMENT:f.HORIZONTAL_POSITION.CENTER,_DEFAULT_VERTICAL_ALIGNMENT:f.VERTICAL_POSITION.TOP,
_DEFAULT_CUSTOM_X:0,_DEFAULT_CUSTOM_Y:0,_DEFAULT_COLUMN_OFFSET:0,_DEFAULT_LINE_OFFSET:0,_DEFAULT_X_OFFSET:0,_DEFAULT_Y_OFFSET:0,constructor:function(e,d,b,a,c,h,f,g){this.horizontalAlignment=e||this._DEFAULT_HORIZONTAL_ALIGNMENT;this.verticalAlignment=d||this._DEFAULT_VERTICAL_ALIGNMENT;this.x=b||this._DEFAULT_CUSTOM_X;this.y=a||this._DEFAULT_CUSTOM_Y;this.columnOffset=c||this._DEFAULT_COLUMN_OFFSET;this.lineOffset=h||this._DEFAULT_LINE_OFFSET;this.xOffset=f||this._DEFAULT_X_OFFSET;this.yOffset=g||
this._DEFAULT_Y_OFFSET}})})},"MW/rtc/plugins/offscreennotification/OffscreenNotificationUtils":function(){define([],function(){return{HORIZONTAL_POSITION:{LEFT:1,CENTER:2,RIGHT:3,NEAREST:10,CUSTOM:15},VERTICAL_POSITION:{TOP:1,CENTER:2,BOTTOM:3,NEAREST:10,CUSTOM:15}}})},"MW/rtc/plugins/blockmatching/BlockMatchingUtils":function(){define(["dojo/dom-construct"],function(g){return{removeCharactersFromFrontOfDomNode:function(f,e){if(0<f.childElementCount)for(;0<f.children.length;){var d=f.children[0];
if(d.innerText.length<e)e-=d.innerText.length,g.destroy(d);else{this.removeCharactersFromFrontOfDomNode(d,e);break}}else f.innerText.length>e?f.innerText=f.innerText.substring(e):g.destroy(f)},removeCharactersFromBackOfDomNode:function(f,e){if(0<f.childElementCount)for(var d=f.children.length-1;0<=d;d--){var b=f.children[d];if(b.innerText.length<e)e-=b.innerText.length,g.destroy(b);else{this.removeCharactersFromBackOfDomNode(b,e);break}}else f.innerText.length>e?f.innerText=f.innerText.substring(0,
f.innerText.length-e):g.destroy(f)}}})},"MW/rtc/plugins/breakpoint/matlab/executablelines/ExecutableLineDecoratorProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/plugins/breakpoint/matlab/executablelines/ExecutableLineDecorator","MW/rtc/core/provider/PluginProvider"],function(g,f,e,d){return g(d,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.code.executablelines","rtc.linenumberservice"]}},createInstance:function(b,a){return new e(b,
a)}})})},"MW/rtc/plugins/breakpoint/matlab/executablelines/ExecutableLineDecorator":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-attr dojo/dom-construct dojo/dom-class MW/rtc/margin/AbstractLineMarginDecorator".split(" "),function(g,f,e,d,b,a,c){return g(c,{constructor:function(a,c){this._executableLineService=a;this._lineNumberService=c;this.own(e.after(this._executableLineService,"onUpdate",f.hitch(this,"_handleUpdate")))},hasLayerForLineNumber:function(a,c){var b=
this._lineNumberService.getCodeLineNumberFromLineNumber(a);if(0>b)return!1;b=this._executableLineService.isCodeLineExecutable(b);return!c&&b},createDecorationForLineNumber:function(a,c){var d=this._lineNumberService.getCodeLineNumberFromLineNumber(a),e=b.create("div");this._applyStyle(e,d-1,c);return e},_applyStyle:function(c,b,e){e||(a.add(c,"marginExecutableLine"),d.set(c,"data-testid","executableLine_"+b))},getWidth:function(){return 15},_handleUpdate:function(){this.onUpdate()}})})},"MW/rtc/plugins/breakpoint/matlab/TraditionalBreakpointStylerProvider":function(){define(["dojo/_base/declare",
"dojo/_base/lang","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/breakpoint/matlab/TraditionalBreakpointStyler"],function(g,f,e,d){return g(e,{requires:function(){return{createInstance:["debug.breakpointmodel","debug.breakpointdirtyservice"]}},createInstance:function(b,a){return new d(b,a)}})})},"MW/rtc/plugins/breakpoint/matlab/TraditionalBreakpointStyler":function(){define(["dojo/_base/declare","dojo/dom-construct","dojo/dom-class","dojo/i18n!l10n/nls/breakpoints","MW/rtc/plugins/breakpoint/AbstractBreakpointStyler"],
function(g,f,e,d,b){return g(b,{constructor:function(a,c){},buildTooltipString:function(a){if(this._breakpointDataModel.wasThereAnErrorSyncingBreakpoints())return d.syntaxErrorTooltip;var c="";this._showOutOfSyncBreakpoints()&&(c+="\x3cb\x3e"+d.dirtyFileTooltip+"\x3c/b\x3e\x3cbr\x3e");return c+=a.toString()},allowPartialBreakpoints:function(){return!0},shouldShowBreakpointsErrored:function(){return!0},applyStyle:function(a,c,b){this.inherited(arguments);e.add(a,"traditional");this._addTraditionalTestId(a)},
_addTraditionalTestId:function(a){var c=a.getAttribute("data-testid");a.setAttribute("data-testId",c+"_traditional")},_shouldShowPartialBreakpoint:function(a){return a},_showConditionalBreakpoint:function(a){return a&&a.hasExpression()},_applyDisabledStyle:function(a,c){f.create("div",{"class":"disabledX"},a,"first")}})})},"MW/rtc/plugins/breakpoint/AbstractBreakpointStyler":function(){define(["dojo/dom-class","dojo/_base/declare","MW/rtc/abstract/AbstractPlugin"],function(g,f,e){return f(e,{constructor:function(d,
b){this._breakpointDataModel=d;this._breakpointDirtyService=b},buildTooltipString:function(d){throw Error("Unimplemented API: MW.rtc.plugins.breakpoint.AbstractBreakpointStyler.getTooltipText");},allowPartialBreakpoints:function(){throw Error("Unimplemented API: MW.rtc.plugins.breakpoint.AbstractBreakpointStyler.allowPartialBreakpoints");},shouldShowBreakpointsErrored:function(){throw Error("Unimplemented API: MW.rtc.plugins.breakpoint.AbstractBreakpointStyler.shouldShowBreakpointsErrored");},applyStyle:function(d,
b,a){var c=[];this._shouldShowPartialBreakpoint(a)?(g.add(d,"intermediateBreakpoint"),c.push("intermediateBreakpoint")):(g.add(d,"breakpoint"),c.push("breakpoint"));this._showOutOfSyncBreakpoints()?(g.add(d,"outOfSync"),c.push("outOfSync")):this._showConditionalBreakpoint(b)?(g.add(d,"conditionalBreakpoint"),c.push("conditionalBreakpoint")):(g.add(d,"regularBreakpoint"),c.push("regularBreakpoint"));b&&!b.isEnabled&&(this._applyDisabledStyle(d,"disabled"),c.push("disabled"));this._adjustAlignment(d,
b.zeroBasedLineNumber);this._addTestTag(d,c,b.zeroBasedLineNumber)},_shouldShowPartialBreakpoint:function(d){throw Error("Unimplemented API: MW.rtc.plugins.breakpoint.AbstractBreakpointStyler._shouldShowPartialBreakpoint");},_showOutOfSyncBreakpoints:function(){return this._breakpointDirtyService.areBreakpointsDirty()},_showConditionalBreakpoint:function(d){throw Error("Unimplemented API: MW.rtc.plugins.breakpoint.AbstractBreakpointStyler._showConditionalBreakpoint");},_applyDisabledStyle:function(d){throw Error("Unimplemented API: MW.rtc.plugins.breakpoint.AbstractBreakpointStyler._applyDisabledStyle");
},_adjustAlignment:function(d,b){},_addTestTag:function(d,b,a){a=b&&0<b.length?a+"_"+b.join("_"):a+"_invalid";d.setAttribute("data-testid",a)}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointContextMenuModelFactoryProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointContextMenuModelFactory","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{createInstance:"debug.breakpointmodel rtc.actionservice rtc.internaldocument rtc.backingstore rtc.focusservice rtc.hyperlinkservice rtc.linenumberservice debug.breakpoint.dataservice".split(" ")}},
createInstance:function(d,b,a,c,e,k,g,m){return new f(d,b,a,c,e,k,g,m)}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointContextMenuModelFactory":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin","MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointContextMenuModel"],function(g,f,e){return g(f,{constructor:function(d,b,a,c,e,f,g,m){this._breakpointModel=d;this._actionDataService=b;this._internalDocument=a;this._backingStore=c;this._focusService=e;this._hyperlinkService=f;
this._lineNumberService=g;this._matlabBreakpointDataService=m;this._instance=null},getInstance:function(){this._instance||(this._instance=new e(this._breakpointModel,this._actionDataService,this._backingStore,this._focusService,this._hyperlinkService,this._lineNumberService,this._matlabBreakpointDataService));return this._instance}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointContextMenuModel":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/codeanalyzer/CodeAnalyzerDataService MW/rtc/datamodel/FileBackingStoreUtilities MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointContextMenuActions MW/rtc/plugins/dialog/ConditionalBreakpointDialog MW/rtc/plugins/contextmenu/MarginContextMenuModel dojo/i18n!l10n/nls/actions".split(" "),
function(g,f,e,d,b,a,c,h,k){return g(h,{NO_LINE:-1,constructor:function(c,b,h,g,q,r,s){this._breakpointModel=c;this._actionService=b;this._backingStore=h;this._focusService=g;this._hyperlinkService=q;this._lineNumberService=r;this._matlabBreakpointDataService=s;this._codeAnalyzerService=new d;this._menuLine=this.NO_LINE;this.own(this._matlabBreakpointDataService);this._dialogInstance=null;c=[{id:a.TOGGLE_BREAKPOINT_MENU_ACTION,enabled:!0,text:k.toggleBreakpointLabel,description:k.setBreakpointDescription,
callback:f.hitch(this,"_toggleBreakpointOnLine")},{id:a.TOGGLE_ENABLE_BREAKPOINT_MENU_ACTION,enabled:!0,text:k.enableBreakpointText,description:k.enableBreakpointDescription,callback:f.hitch(this,"_toggleEnableBreakpointOnLine")},{id:a.TOGGLE_CONDITIONAL_BREAKPOINT_MENU_ACTION,enabled:!0,text:k.setConditionalBreakpointText,description:k.setConditionalBreakpointDescription,callback:f.hitch(this,"_createConditionalBreakpointDialog")},{id:a.CLEAR_ALL_BREAKPOINTS_IN_FILE_MENU_ACTION,enabled:!0,text:k.clearAllBreakpointsInFileText,
description:k.clearAllBreakpointsInFileDescription,callback:f.hitch(this,"_clearAllBreakpointsInFile")},{id:a.DISABLE_ALL_BREAKPOINTS_MENU_ACTION,enabled:!0,text:k.disableAllBreakpointsInFileText,description:k.disableAllBreakpointsInFileText,callback:f.hitch(this,"_disableAllBreakpointsInFile")},{id:a.ENABLE_ALL_BREAKPOINTS_MENU_ACTION,enabled:!0,text:k.enableAllBreakpointsInFileText,description:k.enableAllBreakpointsInFileDescription,callback:f.hitch(this,"_enableAllBreakpointsInFile")},{id:a.CLEAR_ALL_BREAKPOINTS_MENU_ACTION,
enabled:!0,text:k.clearAllBreakpointsLabel,description:k.clearAllBreakpointsDescription,callback:f.hitch(this,"_clearAll")}];this._actionService.loadActions(c);this._groupActionsMap={Toggle:[a.TOGGLE_CONDITIONAL_BREAKPOINT_MENU_ACTION,a.TOGGLE_ENABLE_BREAKPOINT_MENU_ACTION,a.TOGGLE_BREAKPOINT_MENU_ACTION],Set:[a.TOGGLE_ENABLE_BREAKPOINT_MENU_ACTION,a.TOGGLE_BREAKPOINT_MENU_ACTION,a.TOGGLE_CONDITIONAL_BREAKPOINT_MENU_ACTION],ToggleAllStatus:[a.ENABLE_ALL_BREAKPOINTS_MENU_ACTION,a.DISABLE_ALL_BREAKPOINTS_MENU_ACTION],
ClearAll:[a.CLEAR_ALL_BREAKPOINTS_MENU_ACTION,a.CLEAR_ALL_BREAKPOINTS_IN_FILE_MENU_ACTION]};this._groupList=["Toggle","ToggleAllStatus","ClearAll"];this._setGroupList=["Set","ToggleAllStatus","ClearAll"];this._dialogInstance=null;this.own(e.after(this._matlabBreakpointDataService,"breakpointsAdded",f.hitch(this,"_handleBreakpointsAdded"),!0));this.own(e.after(this._matlabBreakpointDataService,"breakpointErrored",f.hitch(this,"_handleBreakpointError"),!0))},_updateActionsBasedOnLine:function(){this._breakpointModel.hasBreakpointAtLine(this._menuLine)?
(this._actionService.updateAction(a.TOGGLE_BREAKPOINT_MENU_ACTION,{text:k.clearBreakpointText,description:k.clearBreakpointDescription}),this._actionService.updateAction(a.TOGGLE_CONDITIONAL_BREAKPOINT_MENU_ACTION,{text:k.setModifyConditionalBreakpointText,description:k.setModifyConditionalBreakpointDescription}),this._breakpointModel.hasEnabledBreakpointAtLine(this._menuLine)?this._actionService.updateAction(a.TOGGLE_ENABLE_BREAKPOINT_MENU_ACTION,{text:k.disableBreakpointText,description:k.disableBreakpointDescription}):
this._actionService.updateAction(a.TOGGLE_ENABLE_BREAKPOINT_MENU_ACTION,{text:k.enableBreakpointText,description:k.enableBreakpointDescription})):(this._actionService.updateAction(a.TOGGLE_CONDITIONAL_BREAKPOINT_MENU_ACTION,{text:k.setConditionalBreakpointText,description:k.setConditionalBreakpointDescription}),this._actionService.updateAction(a.TOGGLE_BREAKPOINT_MENU_ACTION,{text:k.setBreakpointText,description:k.setBreakpointDescription}))},_toggleBreakpointOnLine:function(){this._breakpointModel.toggleBreakpoint(this._menuLine);
this._resetMenuLine()},_toggleEnableBreakpointOnLine:function(){this._breakpointModel.toggleEnableState(this._menuLine);this._resetMenuLine()},_clearAllBreakpointsInFile:function(){this._breakpointModel.clearAllBreakpointsInFile();this._resetMenuLine()},_clearAll:function(){this._breakpointModel.clearAllBreakpoints();this._resetMenuLine()},_enableAllBreakpointsInFile:function(){this._breakpointModel.enableAllBreakpointsInFile();this._resetMenuLine()},_disableAllBreakpointsInFile:function(){this._breakpointModel.disableAllBreakpointsInFile();
this._resetMenuLine()},_createConditionalBreakpointDialog:function(){if(this._dialogInstance)return this._dialogInstance;var a=this._menuLine,d=b.getAbsoluteFilePathFromBackingStore(this._backingStore);this._dialogInstance=new c(d,a,f.hitch(this,this._close),this._breakpointModel,this._hyperlinkService,this._codeAnalyzerService);this._resetMenuLine();return this._dialogInstance},_handleBreakpointsAdded:function(){this._dialogInstance&&(this._dialogInstance.close(),this._close())},_handleBreakpointError:function(a){this._dialogInstance&&
this._dialogInstance.delayedSelectTextboxText()},_close:function(){this._focusService.setFocus();this._dialogInstance&&(this._dialogInstance=null)},setMenuLine:function(a){this._menuLine=this._lineNumberService.getCodeLineNumberAtOrBeforeLineNumber(a)-1;this._updateActionsBasedOnLine()},_resetMenuLine:function(){this._menuLine=this.NO_LINE},getGroups:function(){return this._breakpointModel.hasBreakpointAtLine(this._menuLine)?this._groupList:this._setGroupList},getActions:function(a){a=this._groupActionsMap[a];
if(!a)return[];var c=[];a.forEach(function(a){(a=this._getActionInfo(a))&&c.push(a)},this);return c},_getActionInfo:function(a){var c=this._actionService.getAction(a),b=null;if(c){var d=c.text||c.description;if(void 0===d||this._filterActionFromContextMenu(a))return b;b={id:a,label:d,shortcut:c.shortcut,callback:f.hitch(this._actionService,"executeAction",a,{}),enabled:c.enabled}}return b},_filterActionFromContextMenu:function(c){return c===a.TOGGLE_ENABLE_BREAKPOINT_MENU_ACTION&&!this._breakpointModel.hasBreakpointAtLine(this._menuLine)||
c===a.ENABLE_ALL_BREAKPOINTS_MENU_ACTION&&!this._breakpointModel.hasDisabledBreakpointsInFile()||c===a.DISABLE_ALL_BREAKPOINTS_MENU_ACTION&&!this._breakpointModel.hasEnabledBreakpointsInFile()||c===a.CLEAR_ALL_BREAKPOINTS_IN_FILE_MENU_ACTION&&!this._breakpointModel.hasBreakpointsInFile()?!0:!1}})})},"MW/codeanalyzer/CodeAnalyzerDataService":function(){define(["dojo/_base/declare","dojo/_base/array","mw-log/Log","mw-remote/Remote"],function(g,f,e,d){return g(null,{constructor:function(){d.registerResponseHandler("CodeAnalyzerResponse",
this._handleCodeAnalyzerResponse,this);d.registerFaultHandler("CodeAnalyzer",this._handleCodeAnalyzerError,this)},getMessages:function(b,a,c,e){d.sendMessage({CodeAnalyzer:{matlabCode:a,filename:c}},{callback:e,uid:b,matlabCode:a})},_handleCodeAnalyzerResponse:function(b,a){f.forEach(b,function(c){a.callback(c.messages,a.uid,a.matlabCode)},this)},_handleCodeAnalyzerError:function(b){e.assert(!1,"Received the following error: "+b)}})})},"MW/rtc/datamodel/FileBackingStoreUtilities":function(){define(["mw-filename-utils/FileNameUtil",
"MW/rtc/datamodel/FileBackingStore"],function(g,f){return{DEFAULT_FILE_PATH:"untitled.mlx",isPlainCodeFile:function(e){var d;if(d=e instanceof f)e=e.getFileName(),d=g.getFileNameExtension(e),d=g.isMatlabFileName(e)||"mlx"===d.toLowerCase()||"mlapp"===d;return d},getAbsoluteFilePathFromBackingStore:function(e){return e.getAbsoluteFilePath?e.getAbsoluteFilePath():""},hasFileLocation:function(e){return e.file&&e.file.fileInfo.location}}})},"MW/rtc/datamodel/FileBackingStore":function(){define(["dojo/_base/declare",
"MW/rtc/datamodel/BackingStore","mw-filename-utils/FileNameUtil"],function(g,f,e){return g(f,{constructor:function(d){this.uniqueId=this.absoluteFilePath=d;this.file={fileInfo:e.fileInfoFromPath(d)}},_updateFilePath:function(d){this.absoluteFilePath!==d&&(this.uniqueId=this.absoluteFilePath=d,this.file={fileInfo:e.fileInfoFromPath(d)},this.onFilePathUpdated(this.absoluteFilePath))},onFilePathUpdated:function(d){},getAbsoluteFilePath:function(){return this.absoluteFilePath},getFileName:function(){return this.file.fileInfo.name},
getFileLocation:function(){return this.file.fileInfo.location},getUniqueId:function(){return this.uniqueId}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointContextMenuActions":function(){define([],function(){return{TOGGLE_BREAKPOINT_MENU_ACTION:"_rtc_menu_toggle_breakpoint",TOGGLE_ENABLE_BREAKPOINT_MENU_ACTION:"_rtc_menu_toggle_enable_breakpoint",TOGGLE_CONDITIONAL_BREAKPOINT_MENU_ACTION:"_rtc_menu_toggle_conditional_breakpoint",CLEAR_ALL_BREAKPOINTS_IN_FILE_MENU_ACTION:"_rtc_menu_clear_all_breakpoints_in_file",
CLEAR_ALL_BREAKPOINTS_MENU_ACTION:"_rtc_menu_clear_all_breakpoints",DISABLE_ALL_BREAKPOINTS_MENU_ACTION:"_rtc_menu_disable_all_breakpoints_in_file",ENABLE_ALL_BREAKPOINTS_MENU_ACTION:"_rtc_menu_enable_all_breakpoints_in_file"}})},"MW/rtc/plugins/dialog/ConditionalBreakpointDialog":function(){define("dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dijit/_WidgetBase dojo/keys dojo/on dojo/_base/declare dojo/_base/lang dojo/i18n!l10n/nls/conditionalBreakpointDialog dojo/text!./ConditionalBreakpointTemplate.html mw-dialog-utils/DialogUtils MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointInfo".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m){return a([e,g,f],{templateString:k,constructor:function(a,c,b,d,e,h){this._absoluteFilePath=a;this._filePath=this._getTruncated(a);this._zeroIndexedLineNumber=c;this._oneIndexedLineNumber=c+1;this._breakpointModel=d;this._expression=this._getBreakpointExpressionFromModel();this._hyperlinkService=e;this._codeAnalyzerService=h;this._closeCallBack=b;this._conditionalDialogWidget=null},postCreate:function(){this.inherited(arguments);b(this.okButton,"click",c.hitch(this,
"_okCallback"));b(this.cancelButton,"click",c.hitch(this,"_cancelCallback"));b(this.helpButton,"click",c.hitch(this,"_conditionalBreakpointHelpCallback"));this.okButton.set("label",h.okButtonLabel);this.cancelButton.set("label",h.cancelButtonLabel);this.helpButton.set("label",h.helpButtonLabel);this.fileLabel.innerHTML=this._createFileLabel();this.conditionLabel.innerHTML=this._createConditionLabel();this.noteLabel.innerHTML=h.noteLabel;this.conditionInput.set("value",this._expression);b(this.conditionInput,
"onkeydown",c.hitch(this,"onTextKeydown"));var a={dialogClass:"rteConditionalBreakpointModalDialog","data-testid":"rteConditionalBreakpointDialog",closeCallBack:c.hitch(this,"_closeCallBack")};setTimeout(c.hitch(this,function(){this._conditionalDialogWidget=l.displayModalDialog(this,h.title,[],a);this.delayedSelectTextboxText()}),0)},onTextKeydown:function(a){a.keyCode===d.ENTER?this._okCallback():a.keyCode===d.ESCAPE&&this._cancelCallback()},delayedSelectTextboxText:function(){setTimeout(c.hitch(this,
this._fullySelectTextboxText),0)},_fullySelectTextboxText:function(){var a=this._getExpressionTextboxValue().length;0<=a&&this._setCursorPositionAndSelection(0,a)},_setCursorPositionAndSelection:function(a,c){var b=this.conditionInput.textbox;b.createTextRange?(b=b.createTextRange(),b.collapse(),b.moveStart("character",a),b.moveEnd("character",c),b.select()):null!==b.selectionStart&&(b.focus(),b.setSelectionRange(a,c))},_okCallback:function(){var a=c.trim(this._getExpressionTextboxValue());this._breakpointModel.areBreakpointsLive()?
this._setConditionalBreakpoint(a):this._codeAnalyzerService.getMessages("UID1234",a,"filename.m",c.hitch(this,"_handleCodeAnalyzerMessages",a))},_handleCodeAnalyzerMessages:function(a,c){c.some(function(a){return 1<a.severity})?(this.delayedSelectTextboxText(),this._breakpointModel.showErrorDialog("Syntax",c[0].message)):(this._setConditionalBreakpoint(a),this.close())},_cancelCallback:function(){this.close()},close:function(){this._conditionalDialogWidget.close()},_getTruncated:function(a){var c=
a.length,b=a;46<c&&(b=a.substring(0,23),a=a.substring(c-23),b=b+"..."+a);return b},_conditionalBreakpointHelpCallback:function(){this._hyperlinkService.openUrl("matlab:helpview(fullfile(docroot,'matlab','helptargets.map'),'matlab_env_conditional_breakpoints')")},_setConditionalBreakpoint:function(a){a=new m(this._zeroIndexedLineNumber,"",!0,a);this._breakpointModel.setBreakpoint(a)},_getBreakpointExpressionFromModel:function(){var a=this._breakpointModel.getBreakpoint(this._zeroIndexedLineNumber),
c="";a&&(c=a.expression);return c},_createFileLabel:function(){return h.fileLabel.replace(/\$\{0}/g,this._filePath)},_createConditionLabel:function(){return h.conditionLabel.replace(/\$\{0}/g,this._oneIndexedLineNumber)},_getExpressionTextboxValue:function(){return this.conditionInput.get("value")}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointInfo":function(){define(["dojo/_base/declare","dojo/i18n!l10n/nls/breakpoints"],function(g,f){return g(null,{LINE_BREAKPOINT:0,constructor:function(e,
d,b,a,c){this.zeroBasedLineNumber=e;this.fileName=d;this.isEnabled=b;this.expression=a||"";this.anonymousIndex=c||this.LINE_BREAKPOINT},equals:function(e){return this.zeroBasedLineNumber===e.zeroBasedLineNumber&&this.fileName===e.fileName&&this.isEnabled===e.isEnabled&&this.expression===e.expression},hasExpression:function(){return 0!==this.expression.length},isAnonymous:function(){return this.anonymousIndex!==this.LINE_BREAKPOINT},toString:function(){return this._buildLineString()+" "+this._buildEnablementString()+
" "+this._buildExpressionString()},_buildLineString:function(){return f.breakpointDescriptorTooltip.LINE+": "+(this.zeroBasedLineNumber+1)+"."},_buildEnablementString:function(){var e=f.breakpointDescriptorTooltip.STATUS+": ",e=this.isEnabled?e+f.breakpointDescriptorTooltip.ENABLED:e+f.breakpointDescriptorTooltip.DISABLED;return e+"."},_buildExpressionString:function(){var e="";this.hasExpression()&&(e=f.breakpointDescriptorTooltip.CONDITION+": '"+this.expression+"'.");return e}})})},"MW/rtc/plugins/contextmenu/MarginContextMenuModel":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/contextmenu/ContextMenuModel"],function(g,f){return g(f,{setMenuLine:function(e){throw Error("Unimplemented API: setMenuLine");}})})},"MW/rtc/plugins/contextmenu/ContextMenuModel":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin"],function(g,f){return g(f,{getGroups:function(){throw Error("Unimplemented API: getGroups");},getActions:function(e){throw Error("Unimplemented API: getActions");}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointDataModelProvider":function(){define(["dojo/_base/declare",
"dojo/_base/lang","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointDataModel"],function(g,f,e,d){return g(e,{requires:function(){return{createInstance:"rtc.internaldocument rtc.backingstore debug.breakpointfactory rtc.service.documentloaded debug.breakpoint.dataservice debug.breakpointdirtyservice".split(" ")}},createInstance:function(b,a,c,e,f,g){return new d(b,a,c,e,f,g)}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointDataModel":function(){define("dojo/aspect dojo/_base/declare dojo/_base/lang dojo/i18n!l10n/nls/breakpoints mw-dialog-utils/DialogUtils mw-log/Log mw-peermodel/PeerModelManager MW/rtc/datamodel/FileBackingStoreUtilities MW/rtc/model/DocumentConstants MW/rtc/plugins/breakpoint/BreakpointDataModel MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointInfo".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m){return f(l,{CLASS_NOT_ON_PATH_STATUS:"CLASS_NOT_ON_PATH",constructor:function(a,c,b,d,e,h){this._internalDocument=a;this._backingStore=c;this._breakpointFactory=b;this._documentLoadedService=d;this._matlabBreakpointDataService=e;this._matlabBreakpointDirtyService=h;this._breakpoints=[];this._breakpointsLive=!0;this._setupListeners();this._setNotLiveIfFileDoesNotHaveLocation()},_setNotLiveIfFileDoesNotHaveLocation:function(){h.hasFileLocation(this._backingStore)||this.setLive(!1)},
_setupListeners:function(){this.own(g.after(this._matlabBreakpointDataService,"breakpointsAdded",e.hitch(this,"_addBreakpointOnServerResponse"),!0));this.own(g.after(this._matlabBreakpointDataService,"breakpointsRemoved",e.hitch(this,"_removeBreakpointOnServerResponse"),!0));this.own(g.after(this._matlabBreakpointDataService,"breakpointsCleared",e.hitch(this,"_clearBreakpointsServerResponse"),!0));this.own(g.after(this._matlabBreakpointDataService,"breakpointsRefreshedForFile",e.hitch(this,"_handleBreakpointsRefreshed"),
!0));this.own(g.after(this._matlabBreakpointDataService,"breakpointErrored",e.hitch(this,"_handleBreakpointErrored"),!0));this.own(g.after(this._internalDocument,"onDocumentChanged",e.hitch(this,"_handleDocumentChange"),!0));this._backingStore.onFilePathUpdated&&this.own(g.after(this._backingStore,"onFilePathUpdated",e.hitch(this,"_handleFilePathUpdated")))},_handleDocumentChange:function(a){0<this._filterEvents(a).length&&(this._removeDuplicates(),this.setLive(!1))},_handleFilePathUpdated:function(){h.hasFileLocation(this._backingStore)&&
(this.setLive(!0),this._matlabBreakpointDataService.triggerBreakpointsRefresh())},_filterEvents:function(a){return a.filter(function(a){return a.type!==k.READONLY_STATE_CHANGE_EVENT})},_updateBreakpointStore:function(){this._matlabBreakpointDataService.synchronizePeerModel(this.getAllBreakpoints())},getBreakpoint:function(a){a=this._indexOfBreakpoint(a);return 0<=a?this._breakpoints[a].getInfo():null},getAllBreakpoints:function(){return this._breakpoints.map(function(a){return a.getInfo()})},setLive:function(a){this._breakpointsLive!==
a&&(this._breakpointsLive=a,this._updateBreakpointStore(),this.onLiveChanged(this._breakpointsLive))},onLiveChanged:function(a){},areBreakpointsLive:function(){return this._breakpointsLive},onDataModelChange:function(){this._updateBreakpointStore()},toggleBreakpoint:function(c){a.assert(0<=c,"Line number to toggle breakpoint must be \x3e\x3d 0");this.hasBreakpointAtLine(c)?this.clearBreakpoint(c):(c=new m(c,this._getFilePathFromBackingStore(),!0,""),this.setBreakpoint(c))},setBreakpoint:function(a){""===
a.fileName&&(a.fileName=this._getFilePathFromBackingStore());this._setViewOrMatlabBreakpoint(a)},clearBreakpoint:function(a){(a=this._getMatlabBreakpoint(a))&&this._removeViewOrMatlabBreakpoint(a)},clearAllBreakpoints:function(){this._matlabBreakpointDataService.clearAllBreakpoints()},clearAllBreakpointsInFile:function(){this._breakpoints.slice().forEach(this._removeViewOrMatlabBreakpoint,this)},hasBreakpointsInFile:function(){return 0!==this._breakpoints.length},disableAllBreakpointsInFile:function(){this._breakpoints.forEach(function(a){a.isEnabled()&&
this.toggleEnableState(a.getZeroBasedLineNumber())},this)},hasEnabledBreakpointsInFile:function(){return this._breakpoints.some(function(a){return a.isEnabled()},this)},enableAllBreakpointsInFile:function(){this._breakpoints.forEach(function(a){a.isEnabled()||this.toggleEnableState(a.getZeroBasedLineNumber())},this)},hasDisabledBreakpointsInFile:function(){return this._breakpoints.some(function(a){return!a.isEnabled()},this)},toggleEnableState:function(a){var c=this._getMatlabBreakpoint(a);c?(a=new m(a,
this._getFilePathFromBackingStore(),!c.isEnabled(),c.getExpression()),this.setBreakpoint(a)):this.toggleBreakpoint(a);this.onDataModelChange()},hasBreakpointAtLine:function(a){return null!==this._getMatlabBreakpoint(a)},hasEnabledBreakpointAtLine:function(a){a=this._getMatlabBreakpoint(a);return null!==a&&a.isEnabled()},hasDisabledBreakpointAtLine:function(a){a=this._getMatlabBreakpoint(a);return null!==a&&!a.isEnabled()},_getMatlabBreakpoint:function(a){a=this._indexOfBreakpoint(a);return 0<=a?this._breakpoints[a]:
null},_createBreakpoint:function(a,c,b,d,h){a=this._breakpointFactory.create(a,c,b,d,h);this.own(g.after(a,"onLineChanged",e.hitch(this,"_handleBreakpointLineChanged",a)));return a},_handleBreakpointLineChanged:function(a){this._matlabBreakpointDirtyService.breakpointPositionUpdated();if(a.isValid())this.onDataModelChange();else this._doRemoveBreakpoint(a)},_removeViewOrMatlabBreakpoint:function(a){this.areBreakpointsLive()?this._matlabBreakpointDataService.clearBreakpoint(a):this._doRemoveBreakpoint(a)},
_setViewOrMatlabBreakpoint:function(a){this.areBreakpointsLive()?this._matlabBreakpointDataService.setBreakpoint(a):(a=this._createMatlabBreakpointFromBreakpointInfo(a),this._doAddOrUpdateBreakpoint(a))},_addBreakpointOnServerResponse:function(a){a.forEach(function(a){this._documentLoadedService.whenDocumentLoadedWithText(e.hitch(this,function(){var c=this._createMatlabBreakpointFromBreakpointInfo(a);this._doAddOrUpdateBreakpoint(c)}))},this)},_removeBreakpointOnServerResponse:function(a){this.areBreakpointsLive()&&
a.forEach(function(a){a=this._createMatlabBreakpointFromBreakpointInfo(a);this._doRemoveBreakpoint(a)},this)},_createMatlabBreakpointFromBreakpointInfo:function(a){return this._createBreakpoint(a.zeroBasedLineNumber,this._getFilePathFromBackingStore(),a.isEnabled,a.expression,a.anonymousIndex)},_clearBreakpointsServerResponse:function(){this._breakpoints.forEach(function(a){a.destroy()});this._breakpoints=[];this.onDataModelChange()},_handleBreakpointsRefreshed:function(){this._errorSyncingBreakpoints=
!1;this.setLive(!0);this._clearBreakpointsServerResponse();this._matlabBreakpointDataService.triggerBreakpointsRefresh()},wasThereAnErrorSyncingBreakpoints:function(){return this._errorSyncingBreakpoints},_handleBreakpointErrored:function(a){this._errorSyncingBreakpoints=!0;this.setLive(!1);this.showErrorDialog(a.fStatus,a.fErrorMessage)},showErrorDialog:function(a,c){var e=this._buildErrorDialogText(a,c);b.displayModalDialog(e,d.breakpointErrorDialogTitle,[{name:d.breakpointErrorDialogButtonText,
buttonHandler:{handler:"dismiss"},"data-testid":"breakpointErrorDialog_ok_button"}],{"data-testid":"breakpointErrorDialog"})},_buildErrorDialogText:function(a,c){var b;b=a===this.CLASS_NOT_ON_PATH_STATUS?d.breakpointErrorDialogClassPathText:d.breakpointErrorDialogSyntaxText;return b+("\n\n"+c)},_doAddOrUpdateBreakpoint:function(a){this._getMatlabBreakpoint(a.getZeroBasedLineNumber())?this._replaceBreakpoint(a):this._breakpoints.push(a);this.onDataModelChange()},_doRemoveBreakpoint:function(a){var c=
this._indexOfBreakpoint(a.getZeroBasedLineNumber());-1<c&&this._destroyBreakpointAtIndex(c);a.destroy()},_replaceBreakpoint:function(c){var b=this._indexOfBreakpoint(c.getZeroBasedLineNumber());a.assert(-1!==b,"MatlabBreakpointDataModel._replaceBreakpoint is expected to be called only when a breakpoint exists in the model.");this._breakpoints[b].destroy();this._breakpoints[b]=c},_removeDuplicates:function(){var a={},c=this._getLineNumbers();c.reverse().forEach(function(b,d){a[b]&&this._destroyBreakpointAtIndex(c.length-
d-1);a[b]=!0},this)},_getLineNumbers:function(){return this._breakpoints.map(function(a){return a.getZeroBasedLineNumber()})},_destroyBreakpointAtIndex:function(a){this._breakpoints[a].destroy();this._breakpoints.splice(a,1);this.onDataModelChange()},_indexOfBreakpoint:function(a){return this._getLineNumbers().indexOf(a)},_getFilePathFromBackingStore:function(){return h.getAbsoluteFilePathFromBackingStore(this._backingStore)},destroy:function(){this.inherited(arguments);this._breakpoints.forEach(function(a){a.destroy()});
this._breakpoints=[]}})})},"MW/rtc/plugins/breakpoint/BreakpointDataModel":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin"],function(g,f){return g(f,{toggleBreakpoint:function(e){throw Error("Unimplemented API: MW.rtc.plugins.breakpoint.BreakpointDataModel.toggleBreakpoint");},hasBreakpointAtLine:function(e){throw Error("Unimplemented API: MW.rtc.plugins.breakpoint.BreakpointDataModel.hasBreakpointAtLine");},getBreakpoint:function(e){throw Error("Unimplemented API: MW.rtc.plugins.breakpoint.BreakpointDataModel.getBreakpoint");
},setLive:function(e){throw Error("Unimplemented API: MW.rtc.plugins.breakpoint.BreakpointDataModel.setLive");},onDataModelChange:function(){}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointFactoryProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointFactory"],function(g,f,e,d){return g(e,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.linenumberservice",
"rtc.code.codechange"]}},createInstance:function(b,a,c,e){return new d(b,a,c,e)}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointFactory":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin","MW/rtc/plugins/breakpoint/matlab/MatlabBreakpoint"],function(g,f,e){return g(f,{constructor:function(d,b,a,c){this._internalDocument=d;this._document=b;this._lineNumberService=a;this._codeChangeService=c},create:function(d,b,a,c,h){return new e(this._internalDocument,this._document,
this._lineNumberService,this._codeChangeService,d,b,a,c,h)}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpoint":function(){define("dojo/aspect dojo/_base/declare dojo/_base/lang MW/rtc/abstract/AbstractPlugin MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointInfo MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointPositionTracker".split(" "),function(g,f,e,d,b,a){return f(d,{constructor:function(c,d,f,l,m,p,n,q,r){this._breakpointInfo=new b(m,p,n,q,r);this._positionTracker=new a(c,d,f,l,m);this.own(g.after(this._positionTracker,
"onPositionUpdated",e.hitch(this,"_handlePositionUpdated"),!0))},getInfo:function(){return e.clone(this._breakpointInfo)},hasExpression:function(){return this._breakpointInfo.hasExpression()},getExpression:function(){return this._breakpointInfo.expression},getZeroBasedLineNumber:function(){return this._breakpointInfo.zeroBasedLineNumber},getFileName:function(){return this._breakpointInfo.fileName},isEnabled:function(){return this._breakpointInfo.isEnabled},isAnonymous:function(){return this._breakpointInfo.isAnonymous()},
getAnonymousIndex:function(){return this._breakpointInfo.anonymousIndex},toString:function(){return this._breakpointInfo.toString()},isValid:function(){return 0<=this.getZeroBasedLineNumber()},onLineChanged:function(){},_handlePositionUpdated:function(a){this._breakpointInfo.zeroBasedLineNumber!==a&&(this._breakpointInfo.zeroBasedLineNumber=a,this.onLineChanged())},destroy:function(){this.inherited(arguments);this._positionTracker.destroy()}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointPositionTracker":function(){define(["dojo/aspect",
"dojo/_base/declare","dojo/_base/lang","MW/rtc/abstract/AbstractPlugin","MW/rtc/model/CodeUtilities"],function(g,f,e,d,b){return f(d,{constructor:function(a,c,b,d,e){this._internalDocument=a;this._document=c;this._lineNumberService=b;this._codeChangeService=d;this._trackedLinePosition=[];this._trackLine(e)},onPositionUpdated:function(a){},_trackLine:function(a){a=b.getCodeLineNodes(this._internalDocument)[a];a=this._document.createLinePosition(a,!1);this.own(g.after(a,"onChange",e.hitch(this,"_handlePositionMoved")));
this.own(g.after(this._codeChangeService,"onNumberOfCodeLinesChanged",e.hitch(this,"_handleNumberOfCodeLinesChanged")));this._trackedLinePosition=a},_handlePositionMoved:function(){this._updatePosition()},_handleNumberOfCodeLinesChanged:function(){this._updatePosition()},_updatePosition:function(){var a=this._trackedLinePosition.getLineColumn().line-1,a=this._lineNumberService.getCodeLineNumberFromLineNumber(a);if(!a||0>a)this.onPositionUpdated(-1);else this.onPositionUpdated(a-1)},destroy:function(){this.inherited(arguments);
this._trackedLinePosition.destroy()}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointDecoratorProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/datamodel/FileBackingStoreUtilities","MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointDecorator","MW/rtc/core/provider/PluginProvider"],function(g,f,e,d,b){return g(b,{isApplicable:function(a){return e.isPlainCodeFile(a)},requires:function(){return{isApplicable:["rtc.backingstore"],createInstance:["debug.breakpointmodel",
"rtc.linenumberservice","debug.margin.matlab.breakpointstyler","debug.breakpointdirtyservice","debug.breakpoint.temporary"]}},createInstance:function(a,c,b,e,f){return new d(a,c,b,e,f)},priority:function(){return 10}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointDecorator":function(){define("dijit/Tooltip dojo/aspect dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/mouse dojo/_base/declare dojo/_base/lang dojo/i18n!l10n/nls/breakpoints mw-log/Log MW/rtc/margin/AbstractLineMarginDecorator MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointInfo".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){return h(p,{NO_LINE:-1,_TOOLTIP_TIMEOUT:800,_COMMON_BREAKPOINT_CSS:"commonBreakpointStyle",constructor:function(a,c,b,d,e){this._breakpointDataModel=a;this._lineNumberService=c;this._breakpointStyler=b;this._breakpointDirtyService=d;this._temporaryBreakpointManager=e;this.own(f.after(this._breakpointDataModel,"onDataModelChange",k.hitch(this,"_handleDataModelChange")));this.own(f.after(this._breakpointDirtyService,"breakpointDirtyStateChanged",k.hitch(this,"_handleBreakpointDirtyStateChange")));
this._intermediateBreakpointLine=this.NO_LINE;this._tooltipTimer=null},_handleDataModelChange:function(){this._purgePartialBreakpoint();this.onUpdate()},_handleBreakpointDirtyStateChange:function(){this.onUpdate()},_onBreakpointModelLiveChanged:function(){this.onUpdate()},handleMouseDown:function(a,b){this._clearTooltipAndTimer();if(c.isLeft(a)){var d=this._lineNumberService.getCodeLineNumberAtOrBeforeLineNumber(b)-1;this._createPartialBreakpoint(a,d)}},handleMouseUp:function(a,b){this._clearTooltipAndTimer();
if(c.isLeft(a)){var d=this._lineNumberService.getCodeLineNumberAtOrBeforeLineNumber(b)-1;if(this._intermediateBreakpointLine===d){var e=this._breakpointDataModel.getBreakpoint(d);e&&e.hasExpression()&&e.isEnabled?this._toggleEnableState(a,d):this._toggleBreakpoint(a,d)}}},_createPartialBreakpoint:function(a,c){this._intermediateBreakpointLine=c;this.onUpdate()},_purgePartialBreakpoint:function(){this._intermediateBreakpointLine!==this.NO_LINE&&(this._intermediateBreakpointLine=this.NO_LINE)},_toggleBreakpoint:function(a,
c){c!==this.NO_LINE&&this._breakpointDataModel.toggleBreakpoint(c)},_toggleEnableState:function(a,c){c!==this.NO_LINE&&this._breakpointDataModel.toggleEnableState(c)},handleMouseMove:function(a,c){if(!this._lastTooltipShownNode){this._lastTooltipShownNode=a.target;var b=this._lineNumberService.getCodeLineNumberAtOrBeforeLineNumber(c)-1;if(this._breakpointDataModel.wasThereAnErrorSyncingBreakpoints()&&this._breakpointStyler.shouldShowBreakpointsErrored())b=this._breakpointStyler.buildTooltipString(),
g.show(b,this._lastTooltipShownNode,["after"]);else if(this._breakpointDataModel.hasBreakpointAtLine(b)&&this._mouseIsOverBreakpoint(a.target)){var d=this._breakpointDataModel.getBreakpoint(b),e=this._breakpointStyler.buildTooltipString(d);this._tooltipTimer=setTimeout(k.hitch(this,function(a,c,b){c.hasBreakpointAtLine(b)&&g.show(e,a,["below"])},this._lastTooltipShownNode,this._breakpointDataModel,b),this._TOOLTIP_TIMEOUT)}}},_mouseIsOverBreakpoint:function(a){m.assert(a,"Mouse over event target cannot be undefined");
return a.classList.contains(this._COMMON_BREAKPOINT_CSS)},handleMouseLeave:function(){this._clearTooltipAndTimer();this._intermediateBreakpointLine!==this.NO_LINE&&(this._intermediateBreakpointLine=this.NO_LINE,this.onUpdate())},_clearTooltipAndTimer:function(){this._lastTooltipShownNode&&(g.hide(this._lastTooltipShownNode),this._lastTooltipShownNode=void 0);this._tooltipTimer&&(clearTimeout(this._tooltipTimer),this._tooltipTimer=null)},_hasVisibleBreakpointAtLine:function(a){var c=this._breakpointDataModel.hasBreakpointAtLine(a);
this._temporaryBreakpointManager&&(a=this._temporaryBreakpointManager.hasOnlyTemporaryBreakpoint(a),c=c&&!a);return c},_hasPartialBreakpointAtLine:function(a){return this._intermediateBreakpointLine===a&&this._breakpointStyler.allowPartialBreakpoints()},hasLayerForLineNumber:function(a,c){var b=this._lineNumberService.getCodeLineNumberFromLineNumber(a);return 0>b?!1:this._hasVisibleBreakpointAtLine(b-1)||this._hasPartialBreakpointAtLine(b-1)},createDecorationForLineNumber:function(a,c){m.assert(this.hasLayerForLineNumber(a,
c),"Unexpected call to MatlabBreakpointDecorator createDecorationForLineNumber - which hasLayerForLineNumber returns false");var d=this._lineNumberService.getCodeLineNumberFromLineNumber(a),e=b.create("div",{"class":this._COMMON_BREAKPOINT_CSS}),h=this._getBreakpointToDraw(d-1);this._breakpointStyler.applyStyle(e,h,this._hasPartialBreakpointAtLine(d-1));return e},_getBreakpointToDraw:function(a){var c=this._breakpointDataModel.getBreakpoint(a);if(this._temporaryBreakpointManager){var b=this._temporaryBreakpointManager.getBreakpointReplacedByTemporary(a);
b&&(c=b)}!c&&this._hasPartialBreakpointAtLine(a)&&(c=new n(a,"",!0));return c},getWidth:function(){return 17}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointActionsProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointActions"],function(g,f,e,d){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.cursor","rtc.actionservice","debug.breakpointmodel",
"rtc.linenumberservice"]}},createInstance:function(b,a,c,e){return new d(b,a,c,e)}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointActions":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/_base/connect MW/rtc/RichTextComponentFeatureEnum dojo/i18n!l10n/nls/actions".split(" "),function(g,f,e,d,b,a){return g(null,{constructor:function(c,d,e,g){this._cursor=c;this._actionService=d;this._breakpointModel=e;this._lineNumberService=g;c=[{id:b.MATLAB_BREAKPOINT_MARGIN.CLEAR_ALL_BREAKPOINTS_ACTION,
enabled:!0,text:a.clearAllBreakpointsLabel,description:a.clearAllBreakpointsDescription,callback:f.hitch(this,"clearAll")},{id:b.MATLAB_BREAKPOINT_MARGIN.TOGGLE_BREAKPOINT_ACTION,enabled:!0,text:a.toggleBreakpointLabel,description:a.toggleBreakpointDescription,key:"f12",platformKey:{mac:"meta_\\"},callback:f.hitch(this,"_toggleBreakpointCallback")},{id:b.MATLAB_BREAKPOINT_MARGIN.TOGGLE_ENABLE_BREAKPOINT_ACTION,enabled:!0,text:a.toggleEnableBreakpointLabel,description:a.toggleEnableBreakpointDescription,
callback:f.hitch(this,"_toggleEnablementCallback")}];this._actionService.loadActions(c)},clearAll:function(){this._breakpointModel.clearAllBreakpoints()},_toggleBreakpointCallback:function(){if(this._actionService.getAction(b.MATLAB_BREAKPOINT_MARGIN.TOGGLE_BREAKPOINT_ACTION).enabled)return this.toggleBreakpoint()},_toggleEnablementCallback:function(){if(this._actionService.getAction(b.MATLAB_BREAKPOINT_MARGIN.TOGGLE_BREAKPOINT_ACTION).enabled)return this.toggleEnablement()},toggleBreakpoint:function(){var a=
this._getZeroBasedCodeLineNumber();0>a||this._breakpointModel.toggleBreakpoint(a)},toggleEnablement:function(){var a=this._getZeroBasedCodeLineNumber();this._breakpointModel.toggleEnableState(a)},_getZeroBasedCodeLineNumber:function(){var a=this._cursor.getLineColumn().line-1;return this._lineNumberService.getCodeLineNumberAtOrBeforeLineNumber(a)-1}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointDataServiceProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider",
"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointDataService"],function(g,f,e,d){return g(e,{requires:function(){return{createInstance:["rtc.backingstore","debug.breakpointdirtyservice"]}},createInstance:function(b,a){return new d(b,a)}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointDataService":function(){define("dojo/_base/declare dojo/_base/lang mw-log/Log mw-peermodel/PeerModelManager mw-remote/Remote MW/rtc/datamodel/FileBackingStoreUtilities MW/rtc/plugins/breakpoint/MessageServiceFactory MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointInfo MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointDataServiceChannels".split(" "),
function(g,f,e,d,b,a,c,h,k){return g(null,{constructor:function(a,b){this._backingStore=a;this._breakpointDirtyService=b;this.messageService=c.getInstance();this._initializePeerModel();this._initializeListeners();this.triggerBreakpointsRefresh()},_initializePeerModel:function(){this._breakpointsDataStore=d.getInstance("/matlabbreakpointsdatastore");this._breakpointsDataStore.isSyncEnabled()||this._breakpointsDataStore.setSyncEnabled(!0)},_getFilePathFromBackingStore:function(){return a.getAbsoluteFilePathFromBackingStore(this._backingStore)},
triggerBreakpointsRefresh:function(){var a=this._getFilePathFromBackingStore();this.messageService.publish(k.GET_BREAKPOINTS_REQUEST,a)},_initializeListeners:function(){this.messageService.subscribe(k.BREAKPOINT_ADDED,"_breakpointsAddedServerResponse",this);this.messageService.subscribe(k.BREAKPOINT_REMOVED,"_breakpointsRemovedServerResponse",this);this.messageService.subscribe(k.BREAKPOINTS_CLEARED,"_breakpointsClearedServerResponse",this);this.messageService.subscribe(k.BREAKPOINTS_ERRORED,"_handleMatlabBreakpointError",
this);this.messageService.subscribe(k.BREAKPOINTS_FILE_REFRESHED,"_handleMatlabBreakpointsFileRefreshed",this)},_cleanListeners:function(){this.messageService.unsubscribe(k.BREAKPOINT_ADDED,"_breakpointsAddedServerResponse",this);this.messageService.unsubscribe(k.BREAKPOINT_REMOVED,"_breakpointsRemovedServerResponse",this);this.messageService.unsubscribe(k.BREAKPOINTS_CLEARED,"_breakpointsClearedServerResponse",this);this.messageService.unsubscribe(k.BREAKPOINTS_ERRORED,"_handleMatlabBreakpointError",
this);this.messageService.unsubscribe(k.BREAKPOINTS_FILE_REFRESHED,"_handleMatlabBreakpointsFileRefreshed",this)},_breakpointsAddedServerResponse:function(a){this.breakpointsAdded(this._filterBreakpointsByFileName(a.data,this._getFilePathFromBackingStore()))},_filterBreakpointsByFileName:function(a,c){var b=[];a.forEach(function(a){this._areFilesTheSame(c,a.fileName)&&b.push(new h(a.zeroBasedLineNumber,a.fileName,a.isEnabled,a.expression))},this);return b},_areFilesTheSame:function(a,c){return this._convertToLowerCase(a)===
this._convertToLowerCase(c)},_convertToLowerCase:function(a){return(a||"").toLocaleLowerCase()},_breakpointsRemovedServerResponse:function(a){this.breakpointsRemoved(this._filterBreakpointsByFileName(a.data,this._getFilePathFromBackingStore()))},_breakpointsClearedServerResponse:function(){this.breakpointsCleared()},setBreakpoint:function(a){this.messageService.publish(k.BREAKPOINT_ADD_REQUEST,a)},clearBreakpoint:function(a){this.messageService.publish(k.BREAKPOINT_REMOVE_REQUEST,a.getInfo())},clearAllBreakpoints:function(){this.messageService.publish(k.CLEAR_ALL_BREAKPOINTS_REQUEST)},
synchronizePeerModel:function(a){var c=this._breakpointsDataStore.getRoot(),b=this._getFilePathFromBackingStore();c&&b?(a={breakpoints:a,areBreakpointsDirty:this._breakpointDirtyService.areBreakpointsDirty()},c.setProperty(b,a)):this._breakpointsDataStore.hasRoot()||(this._breakpointDataStoreRootSetListener&&this._breakpointsDataStore.removeEventListener("rootSet",this._breakpointDataStoreRootSetListener),this._breakpointDataStoreRootSetListener=function(a){this.synchronizePeerModel(a);this._breakpointsDataStore.removeEventListener("rootSet",
this._breakpointDataStoreRootSetListener)}.bind(this,a),this._breakpointsDataStore.addEventListener("rootSet",this._breakpointDataStoreRootSetListener))},_handleMatlabBreakpointsFileRefreshed:function(a){if((a=a.data)&&this._areFilesTheSame(a.fileName,this._getFilePathFromBackingStore()))this._breakpointDirtyService.breakpointsRefreshed(a.errorOccurred),this.breakpointsRefreshedForFile(a.errorOccurred)},_handleMatlabBreakpointError:function(a){this._areFilesTheSame(a.data.fFile.path,this._getFilePathFromBackingStore())&&
(this._breakpointDirtyService.breakpointsErrored(),this.breakpointErrored(a.data))},destroy:function(){this._cleanListeners()},breakpointsAdded:function(a){},breakpointsRemoved:function(a){},breakpointsRefreshedForFile:function(a){},breakpointsCleared:function(){},breakpointErrored:function(a){}})})},"MW/rtc/plugins/breakpoint/MessageServiceFactory":function(){define(["dojo/_base/lang","MW/rtc/messageservice/MessageServiceFactory"],function(g,f){return new f})},"MW/rtc/messageservice/MessageServiceFactory":function(){define(["dojo/_base/declare",
"mw-messageservice/MessageService"],function(g,f){return g(null,{constructor:function(){this._messageService=f},getInstance:function(){return this._messageService},installInstance:function(e){this._messageService=e},clearCustomMessageServiceInstance:function(){this._messageService=f}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointDataServiceChannels":function(){define([],function(){return{BREAKPOINT_ADD_REQUEST:"/editor/breakpoints/addBreakpointsRequest",BREAKPOINT_REMOVE_REQUEST:"/editor/breakpoints/removeBreakpointsRequest",
GET_BREAKPOINTS_REQUEST:"/editor/breakpoints/getBreakpoints",CLEAR_ALL_BREAKPOINTS_REQUEST:"/editor/breakpoints/clearBreakpoints",BREAKPOINT_ADDED:"/editor/breakpoint/breakpointsAdded",BREAKPOINT_REMOVED:"/editor/breakpoint/breakpointsRemoved",BREAKPOINTS_CLEARED:"/editor/breakpoint/breakpointsCleared",BREAKPOINTS_FILE_REFRESHED:"/editor/breakpoint/breakpointsFileRefreshed",BREAKPOINTS_ERRORED:"/editor/breakpoint/breakpointsErrored"}})},"MW/rtc/plugins/breakpoint/matlab/TraditionalBreakpointDirtyServiceProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/breakpoint/matlab/TraditionalBreakpointDirtyService"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.backingstore"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/breakpoint/matlab/TraditionalBreakpointDirtyService":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/plugins/breakpoint/AbstractBreakpointDirtyService"],function(g,f,e,d){return g(d,
{constructor:function(b,a){this._internalDocument=b;this._backingStore=a;this._areBreakpointsDirty=!1;this.own(e.after(this._internalDocument,"onDocumentChanged",f.hitch(this,"_handleDocumentChanged"),!0))},breakpointsRefreshed:function(b){!b&&this._areBreakpointsDirty&&(this._areBreakpointsDirty=!1,this.breakpointDirtyStateChanged(this._areBreakpointsDirty))},breakpointsErrored:function(){this._areBreakpointsDirty||(this._areBreakpointsDirty=!0,this.breakpointDirtyStateChanged(this._areBreakpointsDirty))},
_handleDocumentChanged:function(b){b=this._filterDocumentEvents(b);!this._areBreakpointsDirty&&0<b.length&&(this._areBreakpointsDirty=!0,this.breakpointDirtyStateChanged(this._areBreakpointsDirty))}})})},"MW/rtc/plugins/breakpoint/AbstractBreakpointDirtyService":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin","MW/rtc/model/DocumentConstants"],function(g,f,e){return g(f,{constructor:function(){this._areBreakpointsDirty=!1},breakpointDirtyStateChanged:function(d){},areBreakpointsDirty:function(){return this._areBreakpointsDirty},
breakpointsRefreshed:function(d){},breakpointsErrored:function(){},breakpointPositionUpdated:function(){},_filterDocumentEvents:function(d){return d.filter(function(b){return b.type!==e.READONLY_STATE_CHANGE_EVENT})}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointMarginProvider":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-attr MW/codeanalyzer/CodeAnalyzerDataService MW/rtc/core/provider/PluginProvider MW/rtc/datamodel/FileBackingStoreUtilities MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointContextMenuModel MW/rtc/margin/DecoratableLineMargin".split(" "),
function(g,f,e,d,b,a,c,h,k){return g(a,{isApplicable:function(a){return c.isPlainCodeFile(a)},requires:function(){return{isApplicable:["rtc.backingstore"],createInstance:"rtc.view rtc.internaldocument rtc.focusservice debug.margin.matlab.breakpoint debug.margin.executionarrow matlab.executable.line rtc.contextmenu.generator debug.contextmenumodelfactory".split(" ")}},createInstance:function(a,c,b,e,h,f,g,t){e=[e,h,f];t=t.getInstance();a=new k(a,c,b,e,1,t,g);a.own(t);d.set(a.getMarginElement(),"data-testid",
"breakpointMargin");return a}})})},"MW/rtc/margin/DecoratableLineMargin":function(){define("dojo/aspect dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/has dojo/mouse dojo/on dojo/_base/declare dojo/_base/lang MW/rtc/margin/DecoratableMargin MW/rtc/view/ViewUtilities".split(" "),function(g,f,e,d,b,a,c,h,k,l,m){return h(l,{_START_DOM_INDEX:1,_PADDING:4,constructor:function(a,c,b,h,f,k,g){this._topPad=d.create("div",{className:"lineNumberTopPad"});e.add(this._gutter,"lineMargin")},update:function(a,
c){var b=this._copyGutter(),e=d.create("div",{className:"lineNumberTopPad"});b.appendChild(e);c||(c=m.getZeroBasedVisibleLineNumbers(this._view));var h=c[0];this._canIncludeOneLineAboveViewport(h)&&(h-=1,c=[h].concat(c));var h=this._internalDocument.getLineNode(h),f=this._view.getNodeTop(h,!0),k=this._START_DOM_INDEX;c.forEach(function(a,d){var e=this._cloneAndUpdateLine(k,a,c[d+1],f);b.appendChild(e);k++},this);this._replaceGutter(b);this._topPad=e;this._normalizeMarginPosition(f);this._updateWidth()},
getHorizontalPadding:function(){return this._PADDING},_normalizeMarginPosition:function(a){var c=this._view.getDomTargetPosition().scrollTop;this._topPad.style.marginBottom=a-c+"px"},_cloneAndUpdateLine:function(a,c,b,d){var h=this._getElementInMargin(a).cloneNode(!1);this._cleanMarginElement(h);var k=!1;f.set(h,"data-testid","gutterLine_"+c);this._decorators.forEach(function(a){a.hasLayerForLineNumber(c,k)&&(a=a.createDecorationForLineNumber(c,k),h.appendChild(a),k=!0)},this);k||e.add(h,"emptyGutterLine");
a=this._getHeightForLine(c,b,d);h.style.height=a+"px";return h},_getElementInMargin:function(a){return!this._gutter.children[a]?d.create("div",{"class":"gutterLine"}):this._gutter.children[a]},_cleanMarginElement:function(a){a.hasChildNodes()&&d.empty(a);e.remove(a,"emptyGutterLine")},_getHeightForLine:function(a,c,b){a=this._internalDocument.getLineNode(a);c=this._internalDocument.getLineNode(c);var d=this._view.getNodeTop(a,!0)-b;return(c?this._view.getNodeTop(c,!0):this._view.getNodeBottom(a))-
b-d},_canIncludeOneLineAboveViewport:function(a){return 0<a?(a=this._internalDocument.getLineNode(a-1),!!m.getDomNode(a)):!1}})})},"MW/rtc/margin/DecoratableMargin":function(){define("dojo/aspect dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/has dojo/mouse dojo/on dojo/_base/declare dojo/_base/lang MW/rtc/margin/MarginPlugin".split(" "),function(g,f,e,d,b,a,c,h,k,l){return h(l,{constructor:function(a,c,b,e,h,f,k){this._view=a;this._internalDocument=c;this._decorators=e;this._priority=h;this._focusService=
b;this._contextMenuModel=f||null;this._contextMenuGenerator=k||null;this._gutter=d.create("div",{className:"plainText margin"});this._mouseListeners=[];this._configureMargin();this._updateWidth();this._contextMenuModel&&this._contextMenuGenerator&&(this._contextMenu=this._contextMenuGenerator.createContextMenu(this._gutter,this._contextMenuModel))&&this.own(this._contextMenu)},priority:function(){return this._priority},getWidth:function(){return this._width},getHorizontalPadding:function(){return 0},
onWidthChange:function(){},getMarginElement:function(){return this._gutter},_configureMargin:function(){this._width=0;this._gutter.style.width=this._width+"px";this._decorators.forEach(function(a){this.own(g.after(a,"onUpdate",k.hitch(this,"update",a)));this.own(g.after(a,"onWidthChange",k.hitch(this,"_updateWidth")))},this);this._configureMouseEvents()},_clearMouseListeners:function(){this._mouseListeners.forEach(function(a){a.remove()});this._mouseListeners=[]},_configureMouseEvents:function(){this._clearMouseListeners();
this._mouseListeners=[c(this._gutter,"mousemove",k.hitch(this,this._handleMouseMove)),c(this._gutter,"mouseout",k.hitch(this,this._handleMouseLeave)),c(this._gutter,"mousedown",k.hitch(this,this._handleMouseDown)),c(this._gutter,"mouseup",k.hitch(this,this._handleMouseUp)),c(this._gutter,"click",k.hitch(this,this._handleMouseClick))];this._mouseListeners.forEach(function(a){this.own(a)},this)},_getLineNumberFromMousePosition:function(a){a=this._view.getCoordinateFromEvent(this._view.fixEvent(a));
return this._view.getLineFromCoordinate(a)-1},_handleMouseLeave:function(a){this._decorators.forEach(function(c){c.handleMouseLeave(a,this._getLineNumberFromMousePosition(a))},this)},_handleMouseMove:function(a){this._decorators.forEach(function(c){c.handleMouseMove(a,this._getLineNumberFromMousePosition(a))},this)},_handleMouseDown:function(a){this._decorators.forEach(function(c){c.handleMouseDown(a,this._getLineNumberFromMousePosition(a))},this);this._contextMenuModel&&this._contextMenuModel.setMenuLine(this._getLineNumberFromMousePosition(a));
b("edge")&&this._focusService.setBlur()},_handleMouseUp:function(c){(!b("edge")&&!b("trident")&&!b("ie")||!a.isRight(c)||!this._contextMenuModel)&&this._decorators.forEach(function(a){a.handleMouseUp(c,this._getLineNumberFromMousePosition(c))},this)},_handleMouseClick:function(a){this._decorators.forEach(function(c){c.handleMouseClick(a,this._getLineNumberFromMousePosition(a))},this)},_updateWidth:function(){var a=0;this._decorators.forEach(function(c){c=c.getWidth();c>a&&(a=c)},this);this._width!==
a&&(this._width=a,this._gutter.style.width=this._width+"px",this.onWidthChange())},_attachContextMenu:function(){this._contextMenu?this._contextMenu.bindDomNode(this._gutter):this._contextMenuGenerator&&this._contextMenuModel&&(this._contextMenu=this._contextMenuGenerator.createContextMenu(this._gutter,this._contextMenuModel))},_detachContextMenu:function(){this._contextMenu&&this._contextMenu.unBindDomNode(this._gutter)},_copyGutter:function(){this._detachContextMenu();return this._gutter.cloneNode(!1)},
_replaceGutter:function(a){this._gutter.parentElement.replaceChild(a,this._gutter);this._gutter=a;this._configureMouseEvents();this._attachContextMenu()}})})},"MW/rtc/margin/MarginPlugin":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin"],function(g,f){return g(f,{priority:function(){throw Error("Unimplemented API: MW.rtc.margin.MarginPlugin.priority");},getWidth:function(){throw Error("Unimplemented API: MW.rtc.margin.MarginPlugin.getWidth");},getMarginElement:function(){throw Error("Unimplemented API: MW.rtc.margin.MarginPlugin.getMarginElement");
},onUpdate:function(){},update:function(e,d){}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointPromiseManagerProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointPromiseManager"],function(g,f,e,d){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["debug.breakpointmodel","rtc.code.executablelines"]}},createInstance:function(b,a){return new d(b,
a)}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointPromiseManager":function(){define(["dojo/aspect","dojo/Deferred","dojo/_base/declare","dojo/_base/lang","MW/rtc/abstract/AbstractPlugin"],function(g,f,e,d,b){return e(b,{constructor:function(a,c){this._breakpointDataModel=a;this._executableLineService=c;this._promise=new f;this.own(g.after(this._breakpointDataModel,"onDataModelChange",d.hitch(this,"_handleDataModelChange")))},_handleDataModelChange:function(){this._promise.resolve();this._promise=
new f},setBreakpoint:function(a){if(!this._isPossibleToSetBreakpoint(a.zeroBasedLineNumber))return this._createRejectedPromise();var c=this._promise;this._breakpointDataModel.setBreakpoint(a);return c},clearBreakpoint:function(a){if(!this._isPossibleToRemoveBreakpoint(a))return this._createRejectedPromise();var c=this._promise;this._breakpointDataModel.clearBreakpoint(a);return c},_isPossibleToSetBreakpoint:function(a){return this._executableLineService.isCodeLineExecutable(a+1)||this._executableLineService.getNextExecutableCodeLine(a+
1)!==this._executableLineService.NO_LINE},_isPossibleToRemoveBreakpoint:function(a){return this._breakpointDataModel.hasBreakpointAtLine(a)},_createRejectedPromise:function(){var a=new f;a.reject();return a}})})},"MW/rtc/plugins/breakpoint/matlab/temporary/TemporaryBreakpointManagerProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/breakpoint/matlab/temporary/TemporaryBreakpointManager","MW/rtc/plugins/debug/DebugServicesFactory"],
function(g,f,e,d,b){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["debug.breakpointmodel","debug.breakpoint.promise","matlab.services.busyidle"]}},createInstance:function(a,c,e){var f=b.getInstance();return new d(a,c,e,f)}})})},"MW/rtc/plugins/breakpoint/matlab/temporary/TemporaryBreakpointManager":function(){define("dojo/aspect dojo/Deferred dojo/_base/declare dojo/_base/lang MW/rtc/abstract/AbstractPlugin MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointInfo".split(" "),
function(g,f,e,d,b,a){return e(b,{constructor:function(a,b,e,f){this._breakpointDataModel=a;this._breakpointPromiseManager=b;this._busyIdleService=e;this._debugServices=f;this._temporaryBreakpoints=[];this.own(g.after(this._debugServices,"onDBStop",d.hitch(this,"_handleDBStop")));this.own(g.after(this._busyIdleService,"onIdleBusyStatusChange",d.hitch(this,"_handleBusyIdleStateChange"),!0))},getBreakpointReplacedByTemporary:function(a){var b=null;this._temporaryBreakpoints.forEach(function(d){d.temporaryBreakpoint.zeroBasedLineNumber===
a&&(b=d.existingBreakpoint)});return b},hasOnlyTemporaryBreakpoint:function(a){var b=!1;this._temporaryBreakpoints.forEach(function(d){d.temporaryBreakpoint.zeroBasedLineNumber===a&&null===d.existingBreakpoint&&(b=!0)});return b},setBreakpoint:function(c){c={existingBreakpoint:null,temporaryBreakpoint:new a(c,"",!0)};this._temporaryBreakpoints.push(c);return this._applyBreakpoint(c)},_applyBreakpoint:function(a){var b=this._breakpointDataModel.getAllBreakpoints();return this._breakpointPromiseManager.setBreakpoint(a.temporaryBreakpoint).then(d.hitch(this,
"_handleTemporaryBreakpointSet",a,b),d.hitch(this,"_handleBreakpointNotSet",a.zeroBasedLineNumber))},_handleTemporaryBreakpointSet:function(a,b){var d=this._findLineWhereBreakpointFell(a.temporaryBreakpoint.zeroBasedLineNumber);a.temporaryBreakpoint.zeroBasedLineNumber=d;d=this._findBreakpointAtLine(b,d);a.existingBreakpoint=d},_handleBreakpointCleared:function(a){this._temporaryBreakpoints=this._temporaryBreakpoints.filter(function(b){return b.temporaryBreakpoint.zeroBasedLineNumber!==a},this)},
_handleDBStop:function(){this._resetBreakpoints()},_handleBusyIdleStateChange:function(a){a||this._resetBreakpoints()},_resetBreakpoints:function(){this._temporaryBreakpoints.forEach(this._resetBreakpoint,this)},_resetBreakpoint:function(a){(a.existingBreakpoint?this._breakpointPromiseManager.setBreakpoint(a.existingBreakpoint):this._breakpointPromiseManager.clearBreakpoint(a.temporaryBreakpoint.zeroBasedLineNumber)).then(d.hitch(this,"_handleBreakpointCleared",a.temporaryBreakpoint.zeroBasedLineNumber),
function(){})},_findLineWhereBreakpointFell:function(a){var b=this._breakpointDataModel.getAllBreakpoints().map(function(a){return a.zeroBasedLineNumber});b.sort(function(a,c){return a-c});var b=b.filter(function(b){return b>=a}),d=-1;0<b.length&&(d=b[0]);return d},_findBreakpointAtLine:function(a,b){var d=null,e=a.map(function(a){return a.zeroBasedLineNumber}).indexOf(b);0<=e&&(d=a[e]);return d},_handleBreakpointNotSet:function(a){this._handleBreakpointCleared(a);return this._createRejectedPromise()},
_createRejectedPromise:function(){var a=new f;a.reject();return a}})})},"MW/rtc/plugins/breakpoint/DummyBreakpointMarginProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/margin/DecoratableLineMargin","MW/rtc/margin/DummyBreakpointDecorator","MW/rtc/core/provider/PluginProvider"],function(g,f,e,d,b){return g(b,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.view","rtc.internaldocument","rtc.focusservice"]}},createInstance:function(a,
c,b){var f=[new d];return new e(a,c,b,f,1,null,null)}})})},"MW/rtc/margin/DummyBreakpointDecorator":function(){define(["dojo/_base/declare","MW/rtc/margin/AbstractLineMarginDecorator"],function(g,f){return g(f,{hasLayerForLineNumber:function(e,d){return!1},createDecorationForLineNumber:function(e,d){},getWidth:function(){return 17}})})},"MW/rtc/plugins/buttonfactory/ButtonFactoryProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/buttonfactory/ButtonFactory"],
function(g,f,e,d){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:[]}},createInstance:function(){return new d}})})},"MW/rtc/plugins/buttonfactory/ButtonFactory":function(){define(["dojo/_base/declare","dojo/dom-construct"],function(g,f){return g(null,{constructor:function(){},createButton:function(e,d,b){return f.create("div",{"class":e.join(" "),innerHTML:d,onclick:b,onmousedown:this._handleMouseDown.bind(this)})},_handleMouseDown:function(e){e.stopPropagation()},
destroy:function(){}})})},"MW/rtc/plugins/caseconverter/CaseConverterProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","./CaseConverter"],function(g,f,e,d){return g(e,{requires:function(){return{createInstance:["rtc.document","rtc.cursorcontroller","rtc.eventhandler","rtc.actionservice","rtc.internaldocument"]}},createInstance:function(b,a,c,e,f){return new d(b,a,c,e,f)}})})},"MW/rtc/plugins/caseconverter/CaseConverter":function(){define("dojo/_base/declare dojo/aspect dojo/i18n!l10n/nls/actions MW/rtc/abstract/AbstractPlugin MW/rtc/model/DocumentUtilities MW/rtc/model/DocumentEventUtilities MW/rtc/model/RangeUtilities MW/rtc/model/PositionUtilities MW/rtc/model/events/DocumentEvent mw-log/Log".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return g(d,{constructor:function(a,c,b,d,h){this._document=a;this._internalDocument=h;this._cursorController=c;this._actionService=d;this.own(f.after(this._cursorController,"onUpdate",this._updateActionState.bind(this)));this.own(f.after(b,"onMouseDown",this._updateActionState.bind(this)));a=[{id:"rtc_changecase",key:"ctrl_shift_a",platformKey:{mac:"meta_shift_a"},enabled:!1,contextMenuGroup:"Default",text:e.changeCaseLabel,callback:this._changeCase.bind(this)}];this._actionService.loadActions(a)},
_changeCase:function(){if(!this._actionService.getAction("rtc_changecase").enabled)return!1;var a=this._cursorController.getSelection(),b=a.map(function(a){return c.getTextForRange(a,!0)}).join("\n");if(1>b.length)return!0;b!==b.toUpperCase()?this._updateSelectedText(a,b.toUpperCase):this._updateSelectedText(a,b.toLowerCase);return!0},_updateSelectedText:function(c,b){var d=this._document.startBlockEdit(),e={startLine:-1,endLine:-1};c.forEach(function(a){this._updateTextWithChangedCase(a,b);e=this._determineStartEndOfFullSelection(a,
e)},this);(0>e.startLine||0>e.endLine)&&l.error("Error in determining the start and end of selection for changing case");var h=[k.create(e.startLine-1,e.endLine-1)];d.appendRedoEvents(h);d.appendUndoEvents(a.translateEventsForUndo(h));this._document.endBlockEdit(d);this._internalDocument.emitDocumentEvents(h);this._cursorController.setSelection(c)},_updateTextWithChangedCase:function(a,b){c.nodesInRange(a).forEach(function(c){if(c.isTextNode()){var d=0,e=c.text.length;c===a.getStartPosition().getNode()&&
(d=a.getStartPosition().getOffset());c===a.getEndPosition().getNode()&&(e=a.getEndPosition().getOffset());this._doOperation(b,c,d,e)}},this)},_doOperation:function(a,c,b,d){var e=c.text.slice(b,d);""!==e.trim()&&(a=a.bind(e)(),this._internalDocument.updateTextInNode(c,a,b,d))},_determineStartEndOfFullSelection:function(a,c){var b=a.getStartPosition(),d=a.getEndPosition();if(0===h.comparePositions(b,d))return c;0>c.startLine&&(c.startLine=b.getLineColumn().line);c.endLine=d.getLineColumn().line;return c},
_updateActionState:function(){var a=this._cursorController.hasSelection()&&!this._cursorController.areCursorsReadOnly();this._actionService.updateAction("rtc_changecase",{enabled:a})}})})},"MW/rtc/plugins/code/CodeTextServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./CodeTextService"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/code/CodeTextService":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractCachedModelQueryService"],function(g,f,e,d){return g(d,{constructor:function(b){this._codeText=""},getCodeText:function(){this._ensureBuilt();return this._codeText},_build:function(){this._codeText=this._internalDocument.root.getCodeText()}})})},"MW/rtc/abstract/AbstractCachedModelQueryService":function(){define(["dojo/_base/declare","dojo/aspect","mw-log/Log","./AbstractPlugin"],function(g,f,e,d){return g(d,{constructor:function(b){this._internalDocument=
b;this._outOfDate=!0;["onDocumentReset","onNodeChange","onDocumentChanged"].forEach(function(a){this.own(f.after(this._internalDocument,a,function(){this._outOfDate=!0}.bind(this)))},this)},_ensureBuilt:function(){this._outOfDate&&(this._build(),this._outOfDate=!1)},_build:function(){e.error("AbstractCachedModelQueryService._build Unimplemented")}})})},"MW/rtc/plugins/code/ExecutableLineServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/code/ExecutableLineService","MW/rtc/core/provider/PluginProvider"],
function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.linenumberservice","matlab.tokens"]}},createInstance:function(d,b){return new f(d,b)}})})},"MW/rtc/plugins/code/ExecutableLineService":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin"],function(g,f,e,d){return g(d,{NO_LINE:-1,constructor:function(b,a){this._lineNumberService=b;this._matlabTokens=a;this._executableLines=
this._matlabTokens.getTokensData().executableLines;this.own(e.after(this._matlabTokens,"onUpdate",f.hitch(this,"_updateTokens"),!0))},isCodeLineExecutable:function(b){b=this._lineNumberService.getLineNumberFromCodeLineNumber(b);return!!this._executableLines[b]},onUpdate:function(){},getFirstExecutableCodeLine:function(){var b=this._executableLines.indexOf(!0);return-1===b?this.NO_LINE:this._lineNumberService.getCodeLineNumberFromLineNumber(b)},getNextExecutableCodeLine:function(b){b=this._lineNumberService.getLineNumberFromCodeLineNumber(b);
b=this._executableLines.indexOf(!0,b+1);return-1===b?this.NO_LINE:this._lineNumberService.getCodeLineNumberFromLineNumber(b)},_updateTokens:function(b){this._executableLines=b.executableLines;this.onUpdate()}})})},"MW/rtc/plugins/contextmenu/DojoContextMenuGeneratorProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/contextmenu/DojoContextMenuGenerator"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],
createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/contextmenu/DojoContextMenuGenerator":function(){define("dijit/Menu dijit/MenuItem dijit/MenuSeparator dojo/_base/declare dojo/dom-class dojo/_base/lang dojo/keys dojo/aspect MW/rtc/plugins/contextmenu/ContextMenuGenerator".split(" "),function(g,f,e,d,b,a,c,h,k){return d(k,{createContextMenu:function(a,c){var d=this,h=g({baseClass:"ww-contextMenu",targetNodeIds:[a],onOpen:function(h){this.domNode.parentNode&&b.add(this.domNode.parentNode,
"layeredNode");var f=this.getChildren();f&&f.forEach(this.removeChild);h=document.elementFromPoint(h.x-1,h.y);d.willOpen(a,h);var k=1,g=c.getGroups().length;c.getGroups().forEach(function(a){a=c.getActions(a);a instanceof Array&&0!=a.length&&(a.forEach(function(a){a=d._createMenuItem(a);this.addChild(a)},this),k<g&&(this.addChild(new e),k+=1))},this);d.onOpen(h)},onClose:function(){d.onClose()}});this._setDataTestId(h,a.hasAttribute("data-testid")?"contextMenu_"+a.getAttribute("data-testid"):"contextMenu_"+
a.className);return h},_createMenuItem:function(a){var c=new f({label:a.label,accelKey:a.shortcut,onClick:a.callback,disabled:!a.enabled});this._setDataTestId(c,"contextMenu_"+a.id);return c},_setDataTestId:function(a,c){a.set("data-testid",c)}})})},"MW/rtc/plugins/contextmenu/ContextMenuGenerator":function(){define(["dojo/_base/declare"],function(g){return g(null,{createContextMenu:function(f,e){throw Error("Unimplemented API: createContextMenu");},willOpen:function(){},onOpen:function(){},onClose:function(){}})})},
"MW/rtc/plugins/contextmenu/ContextMenuProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider"],function(g,f){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.contextmenu.generator","rtc.contextmenu.model","rtc.scrollpane"]}},createInstance:function(e,d,b){return e.createContextMenu(b,d)||{}},destroyInstance:function(e){e.destroy&&e.destroy()}})})},"MW/rtc/plugins/contextmenu/DocumentContextMenuModelProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/contextmenu/DocumentContextMenuModel"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.actionservice"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/contextmenu/DocumentContextMenuModel":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/plugins/contextmenu/ContextMenuModel"],function(g,f,e,d){return g(d,{_GROUP_ORDER:{Autofix:0,
ModeInteraction:1,Selections:2,copyPaste:3,Default:4,Sections:5},constructor:function(b){this._groupActionsMap={};this._invalidGroupList=[];this._actionService=b;this._createDefaultContextMap(this._actionService);this.own(e.after(this._actionService,"addAction",f.hitch(this,"_addAction"),!0));this.own(e.after(this._actionService,"onActionChange",f.hitch(this,"_handleOnActionChange"),!0));this.own(e.after(this._actionService,"removeAction",f.hitch(this,"_removeAction"),!0))},getGroups:function(){var b=
this._getValidGroupActionsMap(),b=Object.keys(b);b.sort(f.hitch(this,function(a,b){return(a in this._GROUP_ORDER?this._GROUP_ORDER[a]:1E3)-(b in this._GROUP_ORDER?this._GROUP_ORDER[b]:1E3)}));var a=[];b.forEach(function(c){0<this.getActions(c).length&&a.push(c)},this);return a},getActions:function(b){b=this._getValidGroupActionsMap()[b];if(!b||b===[])return[];var a=[];b.forEach(function(c){(c=this._getActionInfo(c))&&a.push(c)},this);return a},_getValidGroupActionsMap:function(){var b=f.clone(this._groupActionsMap);
this._invalidGroupList.forEach(function(a){delete b[a]});return b},_addAction:function(b){b.contextMenuGroup&&(this._groupActionsMap[b.contextMenuGroup]||(this._groupActionsMap[b.contextMenuGroup]=[]),this._groupActionsMap[b.contextMenuGroup].push(b.id))},_removeAction:function(b){for(var a in this._groupActionsMap){var c=this._groupActionsMap[a];if(c){var d=c.indexOf(b);-1<d&&c.splice(d,1);0===c.length?delete this._groupActionsMap[a]:this._groupActionsMap[a]=c}}},_handleOnActionChange:function(b){"contextMenuGroup"===
b.key&&(b.oldValue&&this._removeAction(b.id),b.newValue&&this._addAction(this._actionService.getAction(b.id)))},_createDefaultContextMap:function(b){b.getAllActions().forEach(this._addAction,this)},_getActionInfo:function(b){var a=this._actionService.getAction(b),c=null;if(a){var d=a.text||a.description;if(void 0===d)return c;c={id:b,label:d,shortcut:a.shortcut,callback:f.hitch(this._actionService,"executeAction",b,{}),enabled:a.enabled}}return c},hideGroup:function(b){this._invalidGroupList.push(b)}})})},
"MW/rtc/plugins/currentlinehighlight/CurrentLineHighlightPreferenceProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","./CurrentLineHighlightPreference"],function(g,f,e,d){return g(e,{requires:function(){return{isApplicable:[],createInstance:["rtc.currentlinehighlight","rtc.settings.service"]}},createInstance:function(b,a){return new d(b,a)}})})},"MW/rtc/plugins/currentlinehighlight/CurrentLineHighlightPreference":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/aspect","dojo/Deferred","MW/rtc/abstract/AbstractPlugin"],function(g,f,e,d,b){return g(b,{_HIGHLIGHT_PREFERENCE:"matlab.editor.displaysettings.HighlightCurrentLine",_HIGHLIGHT_COLOR_PREFERENCE:"matlab.editor.displaysettings.HighlightCurrentLineColor",_IS_HIGHLIGHT_ON_DEFAULT:!1,constructor:function(a,c){this._currentLineHighlight=a;this._rtcSettingService=c;this._colorsetPromise=new d;var b=this._rtcSettingService.get(this._HIGHLIGHT_PREFERENCE,this._IS_HIGHLIGHT_ON_DEFAULT),
e=this._rtcSettingService.get(this._HIGHLIGHT_COLOR_PREFERENCE,null);this._onHighlightSettingChanged(b);e&&this._onHighlightColorSettingChanged(e);this.own(this._rtcSettingService.listenTo(this._HIGHLIGHT_PREFERENCE,this._onHighlightSettingChanged.bind(this)));this.own(this._rtcSettingService.listenTo(this._HIGHLIGHT_COLOR_PREFERENCE,this._onHighlightColorSettingChanged.bind(this)))},_onHighlightSettingChanged:function(a){this._colorsetPromise.then(function(){a!==this._isHighlightOn&&this._currentLineHighlight.controlLineHighlight(a);
this._isHighlightOn=a}.bind(this),function(a){})},_onHighlightColorSettingChanged:function(a){this._currentLineHighlight.setHighlightColor(a);this._highlightColor=a;this._colorsetPromise.resolve()},destroy:function(){this.inherited(arguments);this._colorsetPromise.reject();this._colorsetPromise=null}})})},"MW/rtc/plugins/currentlinehighlight/CurrentLineHighlightProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","./CurrentLineHighlight"],function(g,
f,e,d){return g(e,{requires:function(){return{isApplicable:[],createInstance:["rtc.document","rtc.cursorcontroller","rtc.cursor.view","rtc.view.decoration"]}},createInstance:function(b,a,c,e){return new d(b,a,c,e)}})})},"MW/rtc/plugins/currentlinehighlight/CurrentLineHighlight":function(){define("dojo/_base/declare dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/model/CodeUtilities MW/rtc/model/Range MW/rtc/plugins/currentlinehighlight/CurrentLineHighlightUtilities mw-log/Log".split(" "),function(g,
f,e,d,b,a,c){return g(e,{CURRENT_LINE_HIGHLIGHT_CSS:"currentlinehighlight",CURRENT_LINE_LAYER_CSS:"currentLineHighlightLayer",_LINE_HIGHLIGHT_OPACITY:1,_LINE_NODE_CSS:"executionLineHighlightLine",constructor:function(a,c,b,d){this._document=a;this._cursorController=c;this._cursorView=b;this._decorator=d.createLayerDecorator(this.CURRENT_LINE_LAYER_CSS,this._LINE_NODE_CSS);this._enabled=!1;this._currentHighlightedRanges=[];this._highlightColor=[];this._highlightListenerHandle=null},controlLineHighlight:function(a){a?
(this._enabled=!0,this._handleAttachHighlightListener()):(this._enabled=!1,this._handleRemoveHighlightListener())},_handleRemoveHighlightListener:function(){this._highlightListenerHandle&&(this._highlightListenerHandle.remove(),this._highlightListenerHandle=null);this._clearCurrentHighlight();this._decorator.applyChanges()},_handleAttachHighlightListener:function(){this._highlightListenerHandle||(this._highlightListenerHandle=f.after(this._cursorView,"onUpdate",function(){this._drawHighlightLine()}.bind(this)),
this.own(this._highlightListenerHandle));this._drawHighlightLine()},setHighlightColor:function(a){3!==a.length?c.assert(3===a.length,"Color array is invalid, need to be defined as 3-element RGB array"):this._checkValidRGBValues(a)?(this._highlightColor=a,this._enabled&&(a=this._findCodeLineCursors(),a=this._getCurrentCursorLines(a),this._drawHighlight(a))):c.assert(this._checkValidRGBValues(a),"Color values are invalid, RGB values need to be integers between 0-255")},_checkValidRGBValues:function(a){var c=
!0;a.forEach(function(a){var b=Number.isInteger(a);if(!b||!(0<=a&&255>=a))c=!1});return c},_drawHighlightLine:function(){if(this._enabled){var a=this._findCodeLineCursors(),a=this._getCurrentCursorLines(a);this._checkIfRedrawing(a)&&this._drawHighlight(a)}},_drawHighlight:function(a){this._clearCurrentHighlight();a.forEach(function(a){a=this._getRangeFromLineNumber(a);d.isCodeContainer(a.getStartPosition().getNode())&&(this._highlightRange(a),this._currentHighlightedRanges.push(a))},this);this._decorator.applyChanges()},
_findCodeLineCursors:function(){return this._cursorController.getCursors().filter(function(a){return d.isCodeContainer(a.getCursorPosition().getNode())})},_getCurrentCursorLines:function(a){var c=[];a.forEach(function(a){a=a.getCursorPosition();c.push(a.getLine()-1)});return c},_checkIfRedrawing:function(a){if(a.length!==this._currentHighlightedRanges.length)return!0;var c=this._currentHighlightedRanges.map(function(a){return a.getStartPosition().getLine()-1}),b=c.every(function(c){return-1!==a.indexOf(c)}),
d=a.every(function(a){return-1!==c.indexOf(a)},this);return!b||!d},_clearCurrentHighlight:function(){this._currentHighlightedRanges.forEach(function(a){this._decorator.clearRange(a)},this);this._currentHighlightedRanges=[]},_getRangeFromLineNumber:function(a){var c=this._document.createPositionAtLineColumn(a,0);a=this._document.createPositionAtLineColumn(a,0,!0);return new b(c,a)},_highlightRange:function(b){c.assert(3===this._highlightColor.length,"The color has to be defined properly before drawing");
var d={"background-color":a.generateRgbaCssString(this._highlightColor[0],this._highlightColor[1],this._highlightColor[2],this._LINE_HIGHLIGHT_OPACITY)};this._decorator.setStyle(b,d);this._decorator.addClass(b,[this.CURRENT_LINE_HIGHLIGHT_CSS])},destroy:function(){this.inherited(arguments);this._handleRemoveHighlightListener()}})})},"MW/rtc/plugins/currentlinehighlight/CurrentLineHighlightUtilities":function(){define([],function(){return{generateRgbaCssString:function(g,f,e,d){return 1===d?"rgb("+
[g,f,e].join(", ")+")":"rgba("+[g,f,e,d].join(", ")+")"}}})},"MW/rtc/plugins/cursorgripper/CursorGripperProvider":function(){define(["dojo/_base/declare","dojo/has","MW/rtc/core/provider/PluginProvider","./CursorGripper"],function(g,f,e,d){return g([e],{requires:function(){return{isApplicable:[],createInstance:["rtc.view","rtc.cursor","rtc.keyhandler","rtc.view.movehiddenkeycapture"]}},isApplicable:function(){return f("ios")},createInstance:function(b,a,c,e){return new d(b,a,c,e)},destroyInstance:function(b){b.destroy()}})})},
"MW/rtc/plugins/cursorgripper/CursorGripper":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom dojo/query dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/aspect dojo/on dojo/touch mw-log/Log ./view/CursorGripperView".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p){return g([],{DEFAULT_RTC_LINE_HEIGHT:18,HIDE_GRIPPER_TIMEOUT:5E3,constructor:function(a,c,b,d){this._view=a;this._keyHandler=b;this._cursor=c;this._moveHiddenKeyCapture=d;this._cursorGripperView=new p(a,c);this._cursorMover=
this._cursorGripperView.getCursorMover();this._anchorMover=this._cursorGripperView.getAnchorMover();this._listeners=[];this._addMoverListeners(this._cursorMover);this._addMoverListeners(this._anchorMover);this._listeners.push(k(this._view.getDomtarget(),l.release,f.hitch(this,"_showMovers")));this._listeners.push(h.after(this._keyHandler,"onKeyPress",f.hitch(this,"_hideMovers")));this._listeners.push(h.after(this._cursor,"hide",f.hitch(this,"_hideMovers")));this._listeners.push(h.after(this._cursor,
"onChange",f.hitch(this,function(){this._moveHiddenKeyCapture.moveHiddenKeyCaptureToCaret(!0);this._cursor.hasSelection()&&!this._cursor.isHidden()&&this._cursorGripperView.showMovers()})));this._listeners.push(h.after(this._view,"onLayoutChange",f.hitch(this,function(a){this._cursorGripperView.updateLayerSizes()})));this._hideMovers();this._startListeningForRtcCursorChanges()},destroy:function(){this._listeners.forEach(function(a){a.remove()});this._stopListeningForRtcCursorChanges();this._cursorGripperView.destroy()},
_addMoverListeners:function(a){var c=this;this._listeners.push(h.after(a,"onMoveStart",function(){c._stopListeningForRtcCursorChanges();c._cursorGripperView.updateLayerSizes()}));this._listeners.push(h.after(a,"onMoveStop",function(){c._startListeningForRtcCursorChanges();c._showMovers();document.activeElement!==c._keyHandler.keyCapture&&c._keyHandler.focus()}));this._listeners.push(h.after(a,"onMove",function(){c._updateRtcCursorBasedOnMovers();c._showMovers()}));this._listeners.push(k(a.node,l.press,
this._stopEvent))},_stopEvent:function(a){a.stopPropagation();a.preventDefault()},_showMovers:function(){var a=this;this._cursorHiderTimeout&&window.clearTimeout(this._cursorHiderTimeout);this._cursorHiderTimeout=window.setTimeout(function(){a._cursorHiderTimeout=null;a._cursor.hasSelection()||a._cursorGripperView.hideMovers()},this.HIDE_GRIPPER_TIMEOUT);a._updateMoversBasedOnRtcCursor();a._cursorGripperView.showMovers()},_hideMovers:function(){this._cursorHiderTimeout&&window.clearTimeout(this._cursorHiderTimeout);
this._cursorHiderTimeout=null;this._cursorGripperView.hideMovers()},_startListeningForRtcCursorChanges:function(){this._stopListeningForRtcCursorChanges();this._cursorListener=h.after(this._cursor,"onChange",f.hitch(this,"_updateMoversBasedOnRtcCursor"));this._updateMoversBasedOnRtcCursor()},_stopListeningForRtcCursorChanges:function(){this._cursorListener&&this._cursorListener.remove()},_updateMoversBasedOnRtcCursor:function(){var a,c,b;try{this._cursor.hasSelection()?(b=this._cursor.getCoordinatesOfSelection(),
a=b.startCoords,c=b.endCoords,a.x-=this._anchorMover.node.offsetWidth/2,c.x-=this._cursorMover.node.offsetWidth/2):(c=this._cursor.getCursorCoordinates(),c.x-=this._cursorMover.node.offsetWidth/2,a=c),this._anchorMover.node.style.left=a.x+"px",this._anchorMover.node.style.top=a.y+this._getEffectiveLineHeight(a)+"px",this._cursorMover.node.style.left=c.x+"px",this._cursorMover.node.style.top=c.y+this._getEffectiveLineHeight(c)+"px"}catch(d){}},_updateRtcCursorBasedOnMovers:function(){var a,c;a={x:this._anchorMover.node.offsetLeft,
y:this._anchorMover.node.offsetTop};c={x:this._cursorMover.node.offsetLeft,y:this._cursorMover.node.offsetTop};a.x+=this._anchorMover.node.offsetWidth/2;a.y-=this._getEffectiveLineHeight(a)/3;c.x+=this._cursorMover.node.offsetWidth/2;c.y-=this._getEffectiveLineHeight(c)/3;this._cursor.setSelectionFromCoordinates({startCoords:a,endCoords:c})},_getEffectiveLineHeight:function(a){a=this._view.getPositionFromCoordinate(a);return(a=this._view.getCoordinateForPosition(a))?a.height:this.DEFAULT_RTC_LINE_HEIGHT}})})},
"MW/rtc/plugins/cursorgripper/view/CursorGripperView":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/dom-class dojo/dom-geometry dojo/aspect ./NoAutoscrollingMover ./RtcConstrainedMoveable".split(" "),function(g,f,e,d,b,a,c,h){return g(null,{STYLES:{LAYER:"cursorGripperLayer",GRIPPER:"cursorGripper"},constructor:function(a,c){this._view=a;this._cursor=c;this._layer=e.create("div",{"class":this.STYLES.LAYER});a.addLayer(this._layer);this._setUpMovers()},destroy:function(){this._cursorMover.destroy();
this._anchorMover.destroy()},_setUpMovers:function(){this._cursorDragger=e.create("div",{"class":this.STYLES.GRIPPER},this._layer);this._anchorDragger=e.create("div",{"class":this.STYLES.GRIPPER},this._layer);var a={mover:c};this._cursorMover=new h(this._cursorDragger,a);this._anchorMover=new h(this._anchorDragger,a)},getCursorMover:function(){return this._cursorMover},getAnchorMover:function(){return this._anchorMover},hideMovers:function(){this._layer.style.visibility="hidden"},showMovers:function(){this._layer.style.visibility=
"visible"},updateLayerSizes:function(){var a=this._view.getDocumentDimension();b.setMarginBox(this._layer,{h:a.height,w:a.width})}})})},"MW/rtc/plugins/cursorgripper/view/NoAutoscrollingMover":function(){define(["dojo/_base/declare","dojo/dnd/Mover"],function(g,f){return g([f],{onMouseMove:function(e){var d=this.marginBox;this.host.onMove(this,{l:d.l+e.pageX,t:d.t+e.pageY},e);e.preventDefault();e.stopPropagation()}})})},"MW/rtc/plugins/cursorgripper/view/RtcConstrainedMoveable":function(){define(["dojo/_base/declare",
"dojo/dom-geometry","dojo/dom-style","dojo/dnd/move"],function(g,f,e,d){return g(d.constrainedMoveable,{area:"content",constructor:function(b,a){var c=a&&a.area;this.constraints=function(){var a=this.node.parentNode,b=e.getComputedStyle(a),d=f.getMarginBox(a,b);if("margin"==c)return d;var g=f.getMarginExtents(a,b);d.l+=g.l;d.t+=g.t;d.w-=g.w;d.h-=g.h;if("border"==c)return d;g=f.getBorderExtents(a,b);d.l+=g.l;d.t+=g.t;d.w-=g.w;d.h-=g.h;if("padding"==c)return d;g=f.getPadExtents(a,b);d.l+=g.l;d.t+=g.t;
d.w-=g.w;d.h-=g.h;d.l-=this.node.offsetWidth;d.w+=this.node.offsetWidth;return d}}})})},"MW/rtc/plugins/cutcopypaste/CutCopyPasteProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/cutcopypaste/CutCopyPaste"],function(g,f,e,d,b){return g(d,{isApplicable:function(){return!0},requires:function(){return{createInstance:"rtc.cursor rtc.document rtc.actionservice rtc.clipboard rtc.cutcopypaste.converter rtc.keyhandler rtc.cursorcontroller".split(" ")}},
createInstance:function(a,c,d,e,f,g,p){return new b(a,c,d,e,f,g,p)},destroyInstance:function(a){a.dispose()}})})},"MW/rtc/plugins/cutcopypaste/CutCopyPaste":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/on dojo/sniff MW/rtc/model/DocumentConstants MW/rtc/plugins/cutcopypaste/CutCopyPasteService MW/rtc/RichTextComponentFeatureEnum dojo/i18n!l10n/nls/actions".split(" "),function(g,f,e,d,b,a,c,h,k){return g(null,{constructor:function(a,c,b,d,g,r,s){this._cursor=a;this._document=
c;this._actionService=b;this._connections=[];this._clipboard=d;this._connections=[];this._converter=g;this._keyHandler=r;this._cursorController=s;"function"===typeof this._clipboard.getCopyPasteHandlers?(a=this._clipboard.getCopyPasteHandlers(),this._keyHandler.enableBrowserCopyPaste(a)):(this._keyHandler.listenTo("copy",this._preventDefault),this._keyHandler.listenTo("cut",this._preventDefault),this._keyHandler.listenTo("paste",this._preventDefault));a=[{id:h.CUT_COPY_PASTE.CUT_ACTION,enabled:!0,
key:"ctrl_x",platformKey:{mac:"meta_x"},contextMenuGroup:"copyPaste",text:k.cutLabel,callback:f.hitch(this,"_cut")},{id:h.CUT_COPY_PASTE.COPY_ACTION,enabled:!0,key:"ctrl_c",platformKey:{mac:"meta_c"},contextMenuGroup:"copyPaste",text:k.copyLabel,callback:f.hitch(this,"_copy")},{id:h.CUT_COPY_PASTE.PASTE_ACTION,enabled:!0,contextMenuGroup:"copyPaste",key:"ctrl_v",platformKey:{mac:"meta_v"},text:k.pasteLabel,callback:f.hitch(this,"_paste")}];this._actionService.loadActions(a);this._connections.push(e.after(this._cursor,
"onChange",f.hitch(this,this._updateActions)));this._connections.push(e.after(this._cursorController,"onUpdate",f.hitch(this,this._updateActions)));this._connections.push(e.after(this._document,"onChange",f.hitch(this,this._updateActionsOnDocumentChange),!0));this._connections.push(e.after(this._clipboard,"onClipboardDataChange",f.hitch(this,this._updateActions)));this._updateActions();this._addOtherKeyBindings()},_preventDefault:function(a){a.preventDefault()},_copy:function(){if(this._actionService.getAction(h.CUT_COPY_PASTE.COPY_ACTION).enabled)return c.copyFromDocument(this._clipboard,
this._converter,this._cursorController),!0},_cut:function(){if(this._actionService.getAction(h.CUT_COPY_PASTE.CUT_ACTION).enabled)return c.cutFromDocument(this._clipboard,this._cursor,this._converter,this._cursorController,this._document),!0},_paste:function(){var a;if(this._actionService.getAction(h.CUT_COPY_PASTE.PASTE_ACTION).enabled)return a=this._converter.getRegisteredMimeTypes(),a=this._clipboard.getClipboardData(a),a.then(f.hitch(this,function(a){var c=function(c){return a[c]};this._cursor.hasSelection()?
this._converter.insertContentInDocumentAtSelection(this._cursor.getSelection(),c):this._converter.insertContentInDocumentAtPosition(this._cursor.position,c)}),function(a){throw Error("[Unsuccessful Paste] "+a);}),!0},_updateActionsOnDocumentChange:function(c){c&&f.isArray(c)&&c.some(function(c){if(c.type===a.READONLY_STATE_CHANGE_EVENT)return this._updateActions(),!0},this)},_updateActions:function(){var a=!this._isClipboardEmpty(),c=!this._document.isReadOnly()&&!this._cursor.isCursorReadOnly(),
b=this._cursorController.hasSelection();this._actionService.updateAction(h.CUT_COPY_PASTE.PASTE_ACTION,{enabled:a&&c});this._actionService.updateAction(h.CUT_COPY_PASTE.CUT_ACTION,{enabled:c&&b});this._actionService.updateAction(h.CUT_COPY_PASTE.COPY_ACTION,{enabled:b})},_isClipboardEmpty:function(){return 0===this._clipboard.getAllFlavors().length},_addOtherKeyBindings:function(){b("mac")||this._keyHandler.addBindings([{key:"shift_delete",action:h.CUT_COPY_PASTE.CUT_ACTION},{key:"ctrl_insert",action:h.CUT_COPY_PASTE.COPY_ACTION},
{key:"shift_insert",action:h.CUT_COPY_PASTE.PASTE_ACTION}])},dispose:function(){this._connections.forEach(function(a){a.remove()})}})})},"MW/rtc/plugins/cutcopypaste/CutCopyPasteService":function(){define(["dojo/_base/lang","dojo/Deferred","mw-log/Log","MW/rtc/plugins/cutcopypaste/MIMETypes"],function(g,f,e,d){return{copyFromDocument:function(b,a,c){if(!c.hasSelection())return!1;a=a.convertToClipboard(c.getSelection());b=b.setClipboardData(a);b.then(function(){},function(){e.assert(!1,"[Unsuccessful Copy] The data could not be copied successfully")});
return b},copyContent:function(b,a){var c=[];c.push({flavor:d.TEXT,content:a.text});c.push({flavor:d.COPY_FOR_COMMAND_WINDOW,content:a.text});a.serializedObject&&c.push({flavor:d.MATLAB_RICHTEXT,content:a.serializedObject});a.html&&c.push({flavor:d.HTML,content:a.html});a.imageList&&c.push({flavor:d.IMAGE_LIST,content:a.imageList});var c=b.setClipboardData(c),h=new f;c.then(g.hitch(this,function(){h.resolve()}),function(){e.assert(!1,"[Unsuccessful Copy] The data could not be copied successfully");
h.reject()});return h},cutFromDocument:function(b,a,c,d,f){if(!this._prepareCursorsForEditing(d,f))return!1;this.copyFromDocument(b,c,d).then(g.hitch(this,function(){d.hasSelection()&&!a.getNode().isReadOnly()&&(!a.anchor.getNode()||!a.anchor.getNode().isReadOnly())&&f.deleteTextAtCurrentPosition()}),function(){e.assert(!1,"[Unsuccessful Cut] Failure in Cut due to unsuccessful copy")})},_prepareCursorsForEditing:function(b,a){var c=!1;b.getCursors().forEach(function(b){c=a.prepareCursorSelectionForEditing(b)||
c});return c}}})},"MW/rtc/plugins/cutcopypaste/ClipboardConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/cutcopypaste/ClipboardConverter"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{createInstance:["rtc.cutcopypaste.mimeconverters"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/cutcopypaste/ClipboardConverter":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/lang dojo/has mw-log/Log MW/rtc/model/NodeUtilities MW/rtc/plugins/cutcopypaste/MIMETypes".split(" "),
function(g,f,e,d,b,a,c){return f(null,{constructor:function(a){this._registeredNodeHandlers=[];this._registeredPasteHandlers=[];this._registeredMimeHandlers=[];a.forEach(function(a){this.registerMimeHandler(a.getType(),e.hitch(a,a.convertFromMimeData),a.priority())},this)},registerMimeHandler:function(a,c,d){b.assert(0<=d&&100>=d,"Priority must be in the range 0..100.");this._registeredMimeHandlers.push({handler:c,mimeType:a,priority:d});this._registeredMimeHandlers=this._registeredMimeHandlers.sort(function(a,
c){return c.priority-a.priority})},getRegisteredMimeTypes:function(){var a=[];this._registeredMimeHandlers.forEach(function(c){"Unicode String"!==c.mimeType&&a.push(c.mimeType)});return a},registerNodeConverter:function(a,c){this._registeredNodeHandlers.push({nodeClass:a,handler:c})},registerPasteHandler:function(a,c){this._registeredPasteHandlers.push({nodeClass:a,handler:c})},insertContentInDocumentAtPosition:function(c,b){var d=a.getLineage(c.getNode());return this._doInsert(d,null,c,b)},insertContentInDocumentAtSelection:function(c,
b){var d=a.getCommonAncestors(c.getStartPosition().getNode(),c.getEndPosition().getNode());return this._doInsert(d,c,null,b)},_doInsert:function(a,c,b,d){return this._getPasteHandlersHelper(a).some(function(a){return a.call(null,c,b,d)},this)},_getPasteHandlersHelper:function(a){for(var c=[],b=a.length-1;0<=b;b-=1)for(var d=a[b];d;)c=this._getPasteHandlersForNode(d,c),d=d.parent;return c},_getPasteHandlersForNode:function(a,c){this._registeredPasteHandlers.forEach(function(b){a.isInstanceOf(b.nodeClass)&&
0>c.indexOf(b.handler)&&c.push(b.handler)});return c},convertToClipboard:function(a){Array.isArray(a)||(a=[a]);a=this._getContentMapForSelectionArray(a);return this._convertContentMapToMIMEData(a)},_getContentMapForSelectionArray:function(a){var b={};a.forEach(function(a){var c=this._getContentMapForSelection(a);Object.keys(c).forEach(function(a){b[a]=this._mergeFlavorContent(a,b[a],c[a])},this)},this);1<a.length&&(a={},a[c.TEXT]=a[c.COPY_FOR_COMMAND_WINDOW]=b[c.TEXT],b=a);return b},_getContentMapForSelection:function(c){return a.getCommonAncestors(c.getStartPosition().getNode(),
c.getEndPosition().getNode()).reduce(e.hitch(this,"_collectContentForNode",c),{})},_mergeFlavorContent:function(a,b,d){if(!b)return d;a===c.TEXT&&(b+="\n"+d);return b},_convertContentMapToMIMEData:function(a){return g.map(Object.keys(a),function(c){return{flavor:c,content:a[c]}})},_collectContentForNode:function(a,c,b){return this._getConverterForNode(b).reduce(e.hitch(this,function(c,b){var d=b.call(null,a);return this._mergeMIMEDataIntoMap(d,c)}),c)},_mergeMIMEDataIntoMap:function(a,c){a.forEach(function(a){"undefined"!==
typeof a.content&&!this._isHtmlOnMac(a.flavor)?c[a.flavor]=a.content:delete c[a.flavor]},this);return c},_isHtmlOnMac:function(a){return d("mac")&&-1!==a.indexOf("html")},_getConverterForNode:function(a){var c=[];this._registeredNodeHandlers.forEach(function(b){a.isInstanceOf(b.nodeClass)&&c.push(b.handler)});return c},convertContentFromSource:function(a){var c;this._registeredMimeHandlers.some(function(b){var d=a(b.mimeType);if(d)return c=b.handler(d)});return c}})})},"MW/rtc/plugins/cutcopypaste/DefaultMIMEConverterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/cutcopypaste/DefaultMIMEConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cutcopypaste.converter","rtc.document"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/cutcopypaste/DefaultMIMEConverter":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/nodes/inner/RootNode"],function(g,f,e){return g(null,{constructor:function(d,b){this._converter=d;this._document=b;d.registerPasteHandler(e,
f.hitch(this,"_convertAndPaste"))},_convertAndPaste:function(d,b,a){(d=this._converter.convertContentFromSource(a))&&this._document.insertContentAtCurrentPosition(d);return!0}})})},"MW/rtc/plugins/cutcopypaste/mime/PlainTextMimeConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/cutcopypaste/mime/PlainTextMimeConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cursor"]}},createInstance:function(d){return new e(d)}})})},
"MW/rtc/plugins/cutcopypaste/mime/PlainTextMimeConverter":function(){define(["dojo/_base/declare","MW/rtc/model/DocumentUtilities","MW/rtc/plugins/cutcopypaste/MIMETypes","MW/rtc/plugins/cutcopypaste/mime/MimeConverter"],function(g,f,e,d){return g(d,{constructor:function(b){this._cursor=b},getType:function(){return e.TEXT},convertFromMimeData:function(b){return f.textToContent(b,this._cursor.getNode())},priority:function(){return 10}})})},"MW/rtc/plugins/cutcopypaste/mime/PlainTextMimeInCodeConverterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/cutcopypaste/mime/PlainTextMimeInCodeConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cursor"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/cutcopypaste/mime/PlainTextMimeInCodeConverter":function(){define(["dojo/_base/declare","MW/rtc/model/CodeUtilities","MW/rtc/plugins/cutcopypaste/mime/PlainTextMimeConverter"],function(g,f,e){return g(e,{constructor:function(d){this._cursor=d},convertFromMimeData:function(d){var b=
this._cursor.selectionInfo();return f.isCodeRange(b.startNode,b.endNode)?this.inherited(arguments):null},priority:function(){return 60}})})},"MW/rtc/plugins/cutcopypaste/mime/CodeExampleMimeInCodeConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/cutcopypaste/mime/CodeExampleMimeInCodeConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cursor","rtc.nodes.contentconverter"]}},createInstance:function(d,
b){return new e(d,b)}})})},"MW/rtc/plugins/cutcopypaste/mime/CodeExampleMimeInCodeConverter":function(){define("dojo/_base/declare MW/rtc/model/CodeUtilities MW/rtc/model/DocumentUtilities MW/rtc/plugins/codeexample/model/CodeExampleBlockNode MW/rtc/plugins/cutcopypaste/MIMETypes MW/rtc/plugins/cutcopypaste/mime/MimeConverter".split(" "),function(g,f,e,d,b,a){return g(a,{constructor:function(a,b){this._cursor=a;this._contentConverter=b},getType:function(){return b.MATLAB_RICHTEXT},convertFromMimeData:function(a){var b=
this._cursor.selectionInfo();if(f.isCodeRange(b.startNode,b.endNode))try{var k=JSON.parse(a);if(1===k.length){var g=this._contentConverter.unpack(k[0]);if(g instanceof d)return e.textToContent(g.getText(),this._cursor.getNode())}}catch(m){}return null},priority:function(){return 100}})})},"MW/rtc/plugins/codeexample/model/CodeExampleBlockNode":function(){define(["dojo/_base/declare","MW/rtc/nodes/InnerNode","MW/rtc/plugins/codeexample/CodeExampleEnum"],function(g,f,e){return g(f,{constructor:function(d,
b){b=b||{};this.type=b.type||e.MATLAB;this._isFocused=this.wrappable=!1;b.anchorId&&(this.anchorId=b.anchorId)},className:"CodeExampleBlockNode",CHILD_TEXT_SEPARATOR:"\n",_FOCUSED_CSS_CLASS:"BlockActive",containerType:function(){return this.type},getDefaultChild:function(){return{className:"CodeExampleLineNode"}},isEmpty:function(){return 1<this.children.length?!1:this.inherited(arguments)},isSameTypeAs:function(d){return this.className===d.className&&this.type===d.type},isTextContainerNode:function(){return!0},
_serializeAttributes:function(d){d.type=this.type;this.anchorId&&(d.anchorId=this.anchorId)},focus:function(){this._isFocused=!0},blur:function(){this._isFocused=!1},isFocused:function(){return this._isFocused},getFocusedCssClass:function(){return this._FOCUSED_CSS_CLASS},childrenAreContainers:!0})})},"MW/rtc/plugins/codeexample/CodeExampleEnum":function(){define([],function(){return{MATLAB:"codeexample_matlab",PLAIN:"codeexample_plain"}})},"MW/rtc/plugins/cutcopypaste/mime/CodeMimeInCodeExampleConverterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/cutcopypaste/mime/CodeMimeInCodeExampleConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cursor","rtc.nodes.contentconverter"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/cutcopypaste/mime/CodeMimeInCodeExampleConverter":function(){define("dojo/_base/declare MW/rtc/model/CodeUtilities MW/rtc/model/DocumentUtilities MW/rtc/plugins/codeexample/model/CodeExampleBlockNode MW/rtc/plugins/cutcopypaste/MIMETypes MW/rtc/plugins/cutcopypaste/mime/MimeConverter".split(" "),
function(g,f,e,d,b,a){return g(a,{_LINE_SEPARATOR:"\n",constructor:function(a,b){this._cursor=a;this._contentConverter=b},getType:function(){return b.MATLAB_RICHTEXT},convertFromMimeData:function(a){var b=this._cursor.selectionInfo();if(b.startNode.rootContainer()instanceof d&&b.startNode.rootContainer()===b.endNode.rootContainer())try{var k=[];if(!JSON.parse(a).some(function(a){a=this._contentConverter.unpack(a);k.push(a.getText());return!f.isCodeContainer(a,!0)},this))return e.textToContent(k.join(this._LINE_SEPARATOR),
this._cursor.getNode())}catch(g){}return null},priority:function(){return 100}})})},"MW/rtc/plugins/cutcopypaste/mime/UnicodeStringMimeConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/cutcopypaste/mime/UnicodeStringMimeConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cursor"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/cutcopypaste/mime/UnicodeStringMimeConverter":function(){define(["dojo/_base/declare",
"MW/rtc/model/DocumentUtilities","MW/rtc/plugins/cutcopypaste/MIMETypes","MW/rtc/plugins/cutcopypaste/mime/PlainTextMimeConverter"],function(g,f,e,d){return g(d,{getType:function(){return e.UNICODE_STRING},priority:function(){return 11}})})},"MW/rtc/plugins/cutcopypaste/mime/PromptlessTextMimeConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/language/matlab/utilities/MatlabPluginUtilities","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/cutcopypaste/mime/PromptlessTextMimeConverter"],
function(g,f,e,d){return g(e,{isApplicable:function(b){return f.isMatlabCodeFileOrBuffer(b)},requires:function(){return{isApplicable:["rtc.backingstore"],createInstance:["rtc.cursor"]}},createInstance:function(b){return new d(b)}})})},"MW/rtc/plugins/language/matlab/utilities/MatlabPluginUtilities":function(){define(["MW/rtc/datamodel/InMemoryBackingStore","MW/rtc/datamodel/FileBackingStoreUtilities"],function(g,f){return{isMatlabCodeFileOrBuffer:function(e){return e instanceof g||f.isPlainCodeFile(e)}}})},
"MW/rtc/plugins/cutcopypaste/mime/PromptlessTextMimeConverter":function(){define(["dojo/_base/declare","MW/rtc/model/DocumentUtilities","MW/rtc/plugins/cutcopypaste/MIMETypes","MW/rtc/plugins/cutcopypaste/mime/MimeConverter"],function(g,f,e,d){return g(d,{constructor:function(b){this._cursor=b},getType:function(){return e.PROMPTLESS_STRING},convertFromMimeData:function(b){return f.textToContent(b,this._cursor.getNode())},priority:function(){return 90}})})},"MW/rtc/plugins/cutcopypaste/PlainTextMimeGeneratorProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/cutcopypaste/PlainTextMimeGenerator"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cutcopypaste.converter","rtc.cursor"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/cutcopypaste/PlainTextMimeGenerator":function(){define("dojo/_base/declare dojo/_base/lang MW/rtc/model/io/PlainTextGeneratorVisitor MW/rtc/model/SelectionTreeWalker MW/rtc/nodes/inner/RootNode MW/rtc/plugins/cutcopypaste/MIMETypes".split(" "),
function(g,f,e,d,b,a){return g(null,{constructor:function(a,d){this._cursor=d;a.registerNodeConverter(b,f.hitch(this,"_convertToText"))},_convertToText:function(c){var b=new e;(new d(b)).traverseSelection(c);c=b.getText();return[{flavor:a.TEXT,content:c},{flavor:a.COPY_FOR_COMMAND_WINDOW,content:c}]}})})},"MW/rtc/plugins/cutcopypaste/HTMLGeneratorProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/cutcopypaste/HTMLGenerator"],function(g,f,e){return g(f,
{requires:function(){return{createInstance:["rtc.cutcopypaste.converter","rtc.clipboardtempdirpath","rtc.internaldocument"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/cutcopypaste/HTMLGenerator":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/nodes/inner/RootNode","MW/rtc/plugins/cutcopypaste/MIMETypes","MW/rtc/plugins/view/exporters/HTMLWriter"],function(g,f,e,d,b){return g(null,{constructor:function(a,c,b){this._clipboardTempDirPath=c;this._internalDocument=
b;a.registerNodeConverter(e,f.hitch(this,"_convertToHTML"))},_convertToHTML:function(a){var c;this._htmlWriter||(this._htmlWriter=new b);c=this._write(a);a=c.htmlStr;c=c.imageList;var e=[];a&&(e.push({flavor:d.HTML,content:a}),c&&c.length&&e.push({flavor:d.IMAGE_LIST,content:c}));return e},_write:function(a){var c={};this._clipboardTempDirPath?(a=this._htmlWriter.writeWithImageList(this._internalDocument,a,this._clipboardTempDirPath),c.htmlStr=a.html,c.imageList=a.images):c.htmlStr=this._htmlWriter.write(this._internalDocument,
a);return c}})})},"MW/rtc/plugins/view/exporters/HTMLWriter":function(){define("dijit/registry dojo/_base/array dojo/_base/declare dojo/dom-class dojo/dom-style MW/rtc/misc/ImageURIUtilities MW/rtc/plugins/equations/equationcontroller/view/EquationViewUtilities dojo/text!MW/rtc/plugins/view/exporters/sectionrules.css MW/rtc/model/io/MDocumentWriter MW/rtc/plugins/view/exporters/ViewBaseWriter MW/rtc/plugins/view/exporters/HTMLOutputUtils mw-html-utils/HtmlUtils".split(" "),function(g,f,e,d,b,a,c,
h,k,l,m,p){return e(l,{DOCTYPE:'\x3c!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"\x3e\n',LOCAL_FILE_PREFIX:"file:///",constructor:function(a){this._tagStack=[]},_reset:function(){this._styles={};this._numOfStyles=0;this._hasOutput=!1;this._pageTitle=null;this.inherited(arguments)},writeWithImageList:function(a,c,b,d){this._imageList=[];this._imageFileDir=b;var e;try{e=this.write(a,c,d)}finally{this._imageFileDir=null}return{html:e,images:this._imageList}},_extendSelectionForNonDocumentNodes:function(a,
c){var b=c?a.previousSibling():a.nextSibling();b&&(c?(this._startNode=b.lastChild()?b.lastChild().box:b.box,this._startPosInNode=this._startNode.length):(this._endNode=b.firstChild()?b.firstChild().box:b.box,this._endPosInNode=0))},_write:function(){this._writeBody();return this._writeOpening()+this._writeMain()+this._writeClosing()},_writeMain:function(){var a=this._writeContent();"clipboard"!==this._target&&(a+=this._writeCode());return a.replace(/(\r\n|\n|\r)/gm,"\x3cbr\x3e")},_writeContent:function(){return'\x3cdiv class \x3d "content"\x3e'+
this._body+"\x3c/div\x3e"},_writeCode:function(){var a="",c=k.write(this._internalDocument);c&&(a+="\n\x3c!-- \n##### SOURCE BEGIN #####\n",a+=c.replace(/--/g,"REPLACE_WITH_DASH_DASH"),a+="\n##### SOURCE END #####\n",a+="--\x3e");return a},_writeOpening:function(){return this.DOCTYPE+"\x3chtml\x3e"+this._writeHeader()+"\x3cbody\x3e"},_writeClosing:function(){return"\x3c/body\x3e\x3c/html\x3e"},_writeHeader:function(){var a;a='\x3chead\x3e\x3cmeta http-equiv\x3d"Content-Type" content\x3d"text/html; charset\x3dutf-8"\x3e\x3cmeta name\x3d"generator" content\x3d"MATLAB R2018b"\x3e';
a+='\x3cmeta http-equiv\x3d"X-UA-Compatible" content\x3d"IE\x3dedge,IE\x3d9,chrome\x3d1"\x3e';"clipboard"!==this._target&&(a+="\x3ctitle\x3e",a+=this._pageTitle||"Untitled",a+="\x3c/title\x3e");a+=this._writeStyles();return a+="\x3c/head\x3e"},_writeStyles:function(){var a,c,d,e,k,g;g='\x3cstyle type\x3d"text/css"\x3e\n* {margin: 0; padding: 0;}\n';a=b.getComputedStyle(this._internalDocument.root.box);c=f.filter(this._inheritedStyles,function(){return!0});d="";for(e=e=0;e<c.length;e+=1)d+=c[e]+": "+
a[c[e]]+"; ";g=g+("body {"+d+"}\n")+"h1, h2 {font-weight: normal;}\n";"clipboard"!==this._target&&(g+=".content { padding: 30px; }\n",g+="\n");for(k in this._styles)this._styles.hasOwnProperty(k)&&(g+="."+k+" { "+this._styles[k]+" }\n");g+="\n";g+=h.replace(/\n/g,"").replace(/}/g,"}\n").replace(/.rtePane /g,"");this._hasOutput&&(g+=m.writeOutputStyles());return g+="\x3c/style\x3e"},_getStyleClass:function(a){for(var c=b.getComputedStyle(a),e=b.getComputedStyle(a.parentNode),h=f.filter(this._inheritedStyles,
function(a){return c[a]!==e[a]}),k="",g=0,l,g=0;g<h.length;g+=1)l=c[h[g]],"text-decoration"===h[g]&&(l=-1<l.indexOf("underline")?"underline":"none"),k+=h[g]+": "+l+"; ";if("clipboard"===this._target){c.marginLeft&&(h=parseInt(c.marginLeft,10),0<h&&4!==h?k+="margin-left:"+c.marginLeft+"; ":d.contains(a,"lineNode")&&(k+="margin-left: 1em; "));for(g=1;g<this._nonInheritedStyles.length;g+=1)0<parseInt(c[this._nonInheritedStyles[g]],10)&&(k+=this._nonInheritedStyles[g]+": "+c[this._nonInheritedStyles[g]]+
"; ")}else for(g=0;g<this._nonInheritedStyles.length;g+=1)k+=this._nonInheritedStyles[g]+": "+c[this._nonInheritedStyles[g]]+"; ";var m,p;for(p in this._styles)this._styles[p]===k&&(m=p);m||(m="S"+this._numOfStyles,this._numOfStyles+=1,this._styles[m]=k);return m},_openTag:function(a,c,b){this._body+="\x3c"+a+(b||"")+"\x3e";this._tagStack.unshift({tag:a,node:c})},_startNodeElement:function(c){var b=this._getStyleClass(c),e="";if(d.contains(c,"SectionBlock")||d.contains(c,"CodeBlock")||d.contains(c,
"inlineWrapper"))return this._openTag("div",c," class \x3d '"+c.className+"'"),!1;d.contains(c,"lineNode")&&"clipboard"!==this._target&&(e+=" lineNode",d.contains(c,"sectionStart")&&(e+=" sectionStart"),d.contains(c,"sectionEnd")&&(e+=" sectionEnd"));d.contains(c,"codeexample_matlab")?e+=" preformatted-matlab":d.contains(c,"codeexample_plain")&&(e+=" preformatted-plain");b=' class \x3d "'+b+e+'"';if(d.contains(c,"outputParagraph"))return this._hasOutput=!0,c=m.processOutput(c,this._embeddedOutputsView),
this._saveImagesToDisk()&&(c=a.convertDataURIsInNode(c,this._imageFileDir,this._imageList)),this._body+=c.outerHTML,!0;if(d.contains(c,"heading-1"))this._pageTitle||(this._pageTitle=this._getNodeText(c)),this._openTag("h1",c,b);else if(d.contains(c,"heading-2"))this._openTag("h2",c,b);else{if(d.contains(c,"textBox"))return this._openTag("span",c,b),this._writeTextNode(c),!0;if(d.contains(c,"equationNode"))return this._body+=this._writeEquationNode(c),!0;if(d.contains(c,"liveControlOuterNode"))return this._body+=
this._writeLiveControlNode(c),!0;if("div"===c.localName)this._openTag("div",c,b);else if("a"===c.localName)this._openTag("a",c,' href \x3d "'+this._normalizeUrl(p.escapeHtml(c.href))+'"');else if("img"===c.localName)if(b=this._processDataURI(c.src))this._openTag("img",c,' src\x3d"'+b+'" width\x3d"'+c.clientWidth+'" height\x3d"'+c.clientHeight+'"');else return this._body+=c.outerHTML,!0;else this._openTag(c.localName,c,b)}return!1},_endNodeElement:function(a){this._tagStack.length&&this._tagStack[0].node===
a&&(this._body+="\x3c/"+this._tagStack[0].tag+"\x3e",this._tagStack.shift())},_writeChildNodeForTextNode:function(a,c){var b=this._getAttributes(c);a=a.replace(/\&/g,"\x26amp;").replace(/</g,"\x26lt;").replace(/>/g,"\x26gt;");this._body+="\x3cspan"+b+"\x3e"+a+"\x3c/span\x3e"},_getAttributes:function(a){var c=this._getStyleClass(a);a=a.parentElement&&a.parentElement.rteNode?a.parentElement.rteNode.textContainer():null;var b="";a&&a.anchorId&&(b=' id\x3d"'+a.anchorId+'" ');return' class\x3d"'+c+'"'+
b},_writeEquationNode:function(a){a=c.exportDomnodeToImageURL(a,2);if(a.simpleEquation)return c.simpleEquationToHTML(a.simpleEquation);var b=this._processDataURI(a.dataURL);b||(b=a.dataURL);a='\x3cspan style\x3d"vertical-align:'+Math.round(a.verticalAlign)+'px"\x3e\x3cimg src\x3d"'+b+'" width\x3d"'+a.width/2+'" height\x3d"'+a.height/2+'" /\x3e';return a+"\x3c/span\x3e"},_writeLiveControlNode:function(a){return a.getElementsByClassName("liveControlTextView")[0].innerHTML},_saveImagesToDisk:function(){return this._imageFileDir&&
this._imageList},_processDataURI:function(c){if(this._saveImagesToDisk())return a.pushImageAndGetPathFromURI(c,this._imageFileDir,this._imageList)},_normalizeUrl:function(a){0===a.indexOf("internal:")&&(a=a.replace("internal:","#"));return a.replace(/"/g,"\x26quot;")}})})},"MW/rtc/misc/ImageURIUtilities":function(){define(["dojo/query","dojo/has","mw-log/Log"],function(g,f,e){return{_IMAGEFILE_PREFIX:"image",splitImageDataURI:function(d){if((d=/data:image\/(\w+);base64,(.*)/.exec(d))&&3===d.length)return{format:d[1],
data:d[2]}},pushImageAndGetPathFromURI:function(d,b,a){if(d=this.splitImageDataURI(d))return b=b+"/"+this._IMAGEFILE_PREFIX+Date.now()+a.length+"."+d.format,a.push({path:b,data:d.data}),"file:///"+b},convertDataURIsInNode:function(d,b,a){var c=d,e=g("img",d);0<e.length&&(c=d.cloneNode(!0),e=g("img",c),e.forEach(function(c){var d=this.pushImageAndGetPathFromURI(c.src,b,a);d&&c.setAttribute("src",d)},this));return c},getHexBinaryFromURI:function(d){if(f("ie"))return e.assert("getHexBinaryFromURI should not be used on IE"),
"";var b="";d=this.splitImageDataURI(d);if(!d)return"";for(var a=atob(d.data.replace(/[ \r\n]+$/,"")),c=0,h="",c=0;c<a.length;c+=1)h=a.charCodeAt(c).toString(16),1===h.length&&(h="0"+h),b+=h;return{format:d.format,hexData:b}}}})},"MW/rtc/plugins/equations/equationcontroller/view/EquationViewUtilities":function(){define("dojo/Deferred dojo/dom-class dojo/dom-construct dojo/dom-style dojo/query mw-html-utils/HtmlUtils MW/equations/EquationRenderer".split(" "),function(g,f,e,d,b,a,c){function h(a,d,
e){if(!a)return null;var h;f.contains(a,"MathEquation")?h=a:(a=b(".MathEquation",a),0<a.length&&(h=a[0]));if(h)return c.exportDomnodeToImageURL(h,d,"gif",e)}return{exportDomnodeToImageURLPromise:function(a,b,d){return c.renderedEquationPromise(a).then(function(a){return h(a,b,d)})},exportDomnodeToImageURL:h,simpleEquationToHTML:function(a){var c=d.getComputedStyle(a);return e.create("span",{style:{fontFamily:c.fontFamily,fontStyle:c.fontStyle,fontWeight:c.fontWeight},textContent:a.textContent}).outerHTML}}})},
"MW/rtc/model/io/MDocumentWriter":function(){define(["dojo/_base/lang","mw-log/Log","MW/rtc/model/CodeUtilities"],function(g,f,e){return{write:function(d){this._IN_CODE_BLOCK=0;this._IN_TITLE=1;this._IN_PARAGRAPH=2;this._BOLD_DELIMITER="*";this._ITALIC_DELIMITER="_";this._MONOSPACE_DELIMITER="|";this._ORDERED_LIST_DELIMITER="# ";this._UNORDERED_LIST_DELIMITER="* ";this._EQUATION_INLINE_DELIMITER="$";this._EQUATION_DISPLAY_DELIMITER="$$";this._HYPERLINK_START_DELIMITER="\x3c";this._HYPERLINK_END_DELIMITER=
"\x3e";this._insideTextBlock=this._IN_CODE_BLOCK;this._insideHyperlink=this._insideMonospace=this._insideItalic=this._insideBold=0;this._hasSectionBreak=!1;this._WRAPPED_COMMENT_LENGTH=75;var b="",a=null,c=d.getMaxLineNumber(),e;for(e=0;e<c;e+=1){var f=d.getLineNode(e);a||(a="code"===this._getLineNodeFormat(f)?f:null);b+=this._getMTextForNode(f)}a&&this._checkIfLineNodeContainsFunction(a)&&(b=this._postProcessForFunctions(b));return b.replace(/\s+$/,"")},_checkIfLineNodeContainsFunction:function(d){return d.getText().match(/^(\s+)?function/)},
_postProcessForFunctions:function(d){var b=[],a=[],c=!1;d.split("\n").forEach(function(d){0<d.length&&(this._isCommentOrSectionMarkup(d)&&!c?b.push(d):(a.push(d),c=!0))},this);return 0===b.length?d:this._insertTopLevelCommentInsideFunction(a,b)},_insertTopLevelCommentInsideFunction:function(d,b){var a=e.extractFunctionName(d[0]);2<b[0].trim().length?b[0]=b[0].replace(/%%/,"%%"+a.toUpperCase()):(b[0]=b[0].replace(/%%/,"%"),b[0]+=a.trim().toUpperCase(),b[1]=b[1].replace(/%/,""),b[0]+=b[1],b.splice(1,
1));var a=b.join("\n"),c=d[0]+"\n";d.shift();return c=c+(a+"\n")+d.join("\n")},_isCommentOrSectionMarkup:function(d){return d.match(/%/)||d.match(/%%/)},_getMTextForNode:function(d){switch(this._getLineNodeFormat(d)){case "title":return this._visitTitle(d);case "heading":return this._visitTitle(d);case "text":return this._visitParagraph(d);case "code":return this._visitCode(d);case "ListParagraph":return this._visitListParagraph(d);case "sectionbreak":return this._hasSectionBreak=!0,"";case "tableofcontents":return"";
case "codeexample":return this._visitCodeExampleBlock(d)}},_visitListParagraph:function(d){var b=this._continueTextBlock(),a="",c=this._UNORDERED_LIST_DELIMITER;"ordered"===d.type&&(c=this._ORDERED_LIST_DELIMITER);var e=this;d.children.forEach(function(b){b="% "+c+e._visitRichParagraph(b)+"\n";a+=e._wrapParagraph(b)});return b+a},_visitTitle:function(d){this._insideTextBlock=this._IN_TITLE;return"%% "+this._visitRichParagraph(d)+"\n"},_visitCode:function(d){var b="";this._insideTextBlock!==this._IN_CODE_BLOCK&&
(b="\n");this._insideTextBlock===this._IN_PARAGRAPH&&(this._hasSectionBreak=!1);this._hasSectionBreak&&(b="%%\n",this._hasSectionBreak=!1);this._insideTextBlock=this._IN_CODE_BLOCK;d=d?d.getText():"";return b+d+"\n"},_visitParagraph:function(d){var b=this._continueTextBlock();d=this._visitRichParagraph(d);return this._wrapParagraph(b+"% "+d+"\n")},_getLineNodeFormat:function(d){return"LineNode"===d.className?"code":d.hasOwnProperty("level")?1===d.level?"title":"heading":"ListParagraph"===d.className?
"ListParagraph":"SectionBreak"===d.className?"sectionbreak":"TableOfContentsContainer"===d.className?"tableofcontents":"CodeExampleBlockNode"===d.className?"codeexample":"text"},_visitRichParagraph:function(d){var b=d.children,a="",c;for(c=0;c<b.length;c+=1){var e=b[c],f="";if(this._isHyperLinkNode(e))var g=e.children[0],f=this._HYPERLINK_START_DELIMITER+e.hyperlink+" "+g.text,f=this._wrapInlineMarkup(f,g),f=f+this._HYPERLINK_END_DELIMITER;else this._isEquationNode(e)?(a=this._terminateMarkup(a),
a.replace(/\s/g,"").length||(a=a.trim()),g=e.getDisplayStyle(),"ListItem"===d.className&&(g=!1),f+=this._wrapEquation(g,e.getTeXString())):(f+=e.text,f=this._wrapInlineMarkup(f,e));a+=f}return this._terminateMarkup(a)},_visitCodeExampleBlock:function(d){var b="%%\n% \n",a="%  ";"codeexample_matlab"===d.type&&(a="%   ");d.children.forEach(function(c){b+=a+c.getText()+"\n"});return b+"%\n"},_continueTextBlock:function(){return this._insideTextBlock===this._IN_CODE_BLOCK?(this._insideTextBlock=this._IN_PARAGRAPH,
"%% \n"):this._insideTextBlock===this._IN_TITLE?(this._insideTextBlock=this._IN_PARAGRAPH,""):"% \n"},_wrapInlineMarkup:function(d,b){d=this._wrapMarkupAroundText(d,b,"bold");d=this._wrapMarkupAroundText(d,b,"italic");return d=this._wrapMarkupAroundText(d,b,"monospace")},_wrapMarkupAroundText:function(d,b,a){var c,e;if("bold"===a)c="_insideBold",e=this._BOLD_DELIMITER;else if("italic"===a)c="_insideItalic",e=this._ITALIC_DELIMITER;else if("monospace"===a)c="_insideMonospace",e=this._MONOSPACE_DELIMITER;
else if("hyperlink"===a)c="_insideHyperlink",e=this._HYPERLINK_START_DELIMITER;else return d;if(void 0!==b[a]&&null!==b[a]&&b[a]){if(0===this[c])return this[c]=1,e+d}else if(1===this[c])return this[c]=0,e+d;return d},_terminateMarkup:function(d){1===this._insideBold&&(d+=this._BOLD_DELIMITER,this._insideBold=0);1===this._insideItalic&&(d+=this._ITALIC_DELIMITER,this._insideItalic=0);1===this._insideMonospace&&(d+=this._MONOSPACE_DELIMITER,this._insideMonospace=0);return d},_wrapParagraph:function(d){for(var b=
"",a="";0<d.length;){var c=this._WRAPPED_COMMENT_LENGTH,c=c<d.length?c+d.slice(c).match(/^\S*\s*/)[0].length:d.length,b=b+(a+d.slice(0,c));d=d.slice(c);a="\n% "}return b},_wrapEquation:function(d,b){b=b.split("\n").join("");return d?this._EQUATION_DISPLAY_DELIMITER+b+this._EQUATION_DISPLAY_DELIMITER:this._EQUATION_INLINE_DELIMITER+b+this._EQUATION_INLINE_DELIMITER},_isHyperLinkNode:function(d){return"HyperlinkNode"===d.className},_isEquationNode:function(d){return"EquationNode"===d.className}}})},
"MW/rtc/plugins/view/exporters/ViewBaseWriter":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-class mw-log/Log MW/rtc/model/SelectionUtilities MW/rtc/model/PositionUtilities".split(" "),function(g,f,e,d,b,a){return f(null,{constructor:function(a){this._inheritedStyles="text-align line-height min-height white-space color font-family font-style font-size font-weight text-decoration white-space".split(" ");this._nonInheritedStyles=["margin-left","margin-top","margin-bottom","margin-right"]},
switchToInlineView:function(a){var b=a.getAction("rtc_inline_view_no_animation");return b&&b.enabled?(a.executeAction("rtc_inline_view_no_animation"),!0):!1},write:function(a,b,d){this._internalDocument=a;this._embeddedOutputsView=d;this._reset();return b?this._writeSelection(b):this._write()},_writeSelection:function(c){this._reset();var d=b.trimSelectionForMultipleContainer(c);this._startNode=d.getStartPosition().getNode().box;this._startPosInNode=d.getStartPosition().getOffset();this._endNode=
d.getEndPosition().getNode().box;this._endPosInNode=d.getEndPosition().getOffset();d.fileEndSelected()?this._handleFileEndSelection(d.getEndPosition().getNode()):0!==a.comparePositions(d.getEndPosition(),c.getEndPosition())?this._extendSelectionForNonDocumentNodes(d.getEndPosition().getNode().rootContainer()):0!==a.comparePositions(d.getStartPosition(),c.getStartPosition())&&this._extendSelectionForNonDocumentNodes(d.getStartPosition().getNode().rootContainer(),!0);this._target="clipboard";return this._write()},
_extendSelectionForNonDocumentNodes:function(a,b){if(a.box){var d=b?a.box.previousElementSibling:a.box.nextElementSibling;if(d&&!d.rteNode){for(var e=d;e;)(e=b?d.firstChild:d.lastChild)&&(d=e);d&&(b?(this._startNode=d,this._startPosInNode=0):(this._endNode=d,this._endPosInNode=this._endNode.length))}}},_handleFileEndSelection:function(a){if(a=a.rootContainer().box.nextElementSibling)this._endNode=a,this._endPosInNode=1},_reset:function(){this._startNode=null;this._startPosInNode=-1;this._endNode=
null;this._endPosInNode=-1;this._target=""},_write:function(){this._writeBody();return this._writeOpening()+this._body+this._writeClosing()},_writeOpening:function(){return""},_writeClosing:function(){return""},_startNodeElement:function(a){d.assert("Subclasses must override _startNodeElement.");return!1},_endNodeElement:function(a){d.assert("Subclasses must override _endNodeElement.")},_writeBody:function(){this._body="";this._parseTree()},_enterNode:function(a){if(this._isRootNode(a))return!1;if(!(a===
this._endNode&&0===this._endPosInNode)&&!(a===this._startNode&&this._startPosInNode===a.rteNode.maxOffset()))return this._startNodeElement(a)},_leaveNode:function(a){this._isRootNode(a)||this._endNodeElement(a)},_enterTextNode:function(){},_enterAllParents:function(a){!this._isRootNode(a)&&!this._isRootNode(a.parentNode)&&(this._enterAllParents(a.parentNode),this._enterNode(a.parentNode))},_leaveAllParents:function(a){this._isRootNode(a)||(this._leaveNode(a),this._leaveAllParents(a.parentNode))},
_parseTree:function(){var a=this._startNode||this._internalDocument.root.box;this._enterAllParents(a);for(var b=!1;a;){"#text"===a.nodeName?(this._enterTextNode(a),b=!1):b=this._enterNode(a);if(a===this._endNode){this._leaveAllParents(a);break}if(!b&&a.firstChild)a=a.firstChild;else{if(a.nextSibling)"#text"!==a.nodeName&&this._leaveNode(a);else{for(;!a.nextSibling&&!e.contains(a,"rootNode");)this._leaveNode(a),a=a.parentNode;if(this._isRootNode(a))break;this._leaveNode(a)}a=a.nextSibling}}},_isRootNode:function(a){return e.contains(a,
"rootNode")},_writeTextNode:function(a){var b=0,d=0;g.some(a.childNodes,function(e){b=d;d=b+this._getNodeText(e).length;if(this._startNode===a)if(this._startPosInNode>=b&&this._startPosInNode<=d)b=this._startPosInNode;else if(this._startPosInNode>d)return!1;if(this._endNode===a)if(this._endPosInNode>=b&&this._endPosInNode<=d)d=this._endPosInNode;else if(d>=this._endPosInNode)return!0;var f=this._getNodeText(a).substring(b,d);this._writeChildNodeForTextNode(f,e)},this)},_getNodeText:function(a){return a.textContent},
_writeChildNodeForTextNode:function(a,b){}})})},"MW/rtc/plugins/view/exporters/HTMLOutputUtils":function(){define("dojo/_base/array dojo/dom-construct dojo/dom-style dojo/query MW/rtc/plugins/equations/equationcontroller/view/EquationViewUtilities dojo/text!MW/rtc/plugins/embeddedoutputs/outputhandlers/css/outputhandler.css dojo/text!MW/rtc/plugins/embeddedoutputs/view/css/errorOutput.css dojo/text!MW/rtc/plugins/embeddedoutputs/view/css/matrixOutput.css dojo/text!MW/rtc/plugins/embeddedoutputs/view/css/variableTableOutput.css dojo/text!MW/rtc/plugins/embeddedoutputs/view/css/symbolicOutput.css dojo/text!MW/rtc/plugins/embeddedoutputs/view/css/textOutput.css dojo/text!MW/rtc/plugins/embeddedoutputs/view/css/variableEditor.css dojo/text!MW/rtc/plugins/embeddedoutputs/view/css/variableOutput.css dojo/text!MW/rtc/plugins/embeddedoutputs/view/css/warningOutput.css dojo/text!MW/rtc/plugins/embeddedoutputs/view/inline/css/inlineoutput.css dojo/text!MW/rtc/plugins/language/matlab/alert/css/alertPlugin.css dojo/text!MW/rtc/plugins/language/matlab/diagnosticmessage/css/diagnosticMessage.css dojo/text!MW/rtc/plugins/view/exporters/ellipses.css".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u){return{_ELEMENT_NODE:1,writeOutputStyles:function(){var b;b=""+r;b+=l;b+=".embeddedOutputsSymbolicElement { overflow: initial !important;}\n.embeddedOutputsSymbolicElement { width: 100% !important; }\n";b+=m;b+=".embeddedOutputsTextElement,.embeddedOutputsVariableStringElement { max-height: none !important; overflow: initial !important;}\n";b+=p;b+=n;b+=".variableValue { width: 100% !important; }\n";b+=h;b+=".matrixElement { max-height: none !important; }\n";
b+=k;b+=s;b+=t;b+=q;b+=c;b+=a;b+=u;return b.replace(/\n/g,"").replace(/}/g,"}\n").replace(/.rtePane /g,"").replace(/.*rightPane.*\n/mg,"").replace(/.*alertPluginLayer.*\n/mg,"")},processOutput:function(a,c){var b=a.cloneNode(!0);this._convertToInlineStyles(b,a);c&&this._processInteractiveVariableOutput(b,a,c);this._replaceEquationsInOutput(b,a);b=this._removeDoNotExportsFromOutput(b);b=this._removeMATLABLinksFromOutput(b);this._updateFiguresInOutputs(b);return b=this._removeFigureWidgetsFromOutput(b)},
_processInteractiveVariableOutput:function(a,c,b){var d=a.children;g.forEach(d,function(a,e){var h=b.getOutputFromOutputDiv(c.children[e]);h&&h.getHTMLContent&&(h=h.getHTMLContent(d[e]),f.place(h,d[e].firstElementChild,"replace"))})},_removeDoNotExportsFromOutput:function(a){var c;c=d(".doNotExport",a);0<c.length&&(a=a.cloneNode(!0),c=d(".doNotExport",a),c.forEach(function(a){f.destroy(a)}));return a},_replaceEquationsInOutput:function(a,c){for(var e,h,k=d(".MathEquation",c),g=d(".MathEquation",a),
l=0;l<k.length;l+=1)e=b.exportDomnodeToImageURL(k[l],2),e.simpleEquation?g[l].firstChild.innerHTML=b.simpleEquationToHTML(e.simpleEquation):(h=f.create("span",{style:{verticalAlign:Math.round(e.verticalAlign)+"px"}},g[l].firstChild,"replace"),f.create("img",{src:e.dataURL,width:e.width/2,height:e.height/2},h))},_removeMATLABLinksFromOutput:function(a){var c=0,b,e=d("a",a);if(0<e.length){b=a.cloneNode(!0);e=d("a",b);for(c=0;c<e.length;c+=1)"matlab:"===e[c].href.substring(0,7)&&(a=document.createTextNode(e[c].textContent),
f.place(a,e[c],"replace"));return b}return a},_updateFiguresInOutputs:function(a){(a=d(".ImageView",a))&&0<a.length&&a.forEach(function(a){e.set(a,"height","auto");e.set(a.parentNode,"height","auto")})},_removeFigureWidgetsFromOutput:function(a){var c;c=d(".figureWidget",a);0<c.length&&(a=a.cloneNode(!0),c=d(".figureWidget",a),c.forEach(function(a){f.destroy(a)}));return a},_convertToInlineStyles:function(a,c){if(c.nodeType===this._ELEMENT_NODE){var b=e.getComputedStyle(c);a.style.whiteSpace=b.whiteSpace;
a.style.fontStyle=b.fontStyle;a.style.color=b.color;a.style.fontSize=b.fontSize;for(b=0;b<c.childNodes.length;b++)this._convertToInlineStyles(a.childNodes[b],c.childNodes[b])}}}})},"MW/rtc/plugins/cutcopypaste/InternalSerializationGeneratorProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/cutcopypaste/InternalSerializationGenerator"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cutcopypaste.converter"]}},createInstance:function(d){return new e(d)}})})},
"MW/rtc/plugins/cutcopypaste/InternalSerializationGenerator":function(){define("dojo/_base/declare dojo/_base/lang MW/rtc/model/io/ContentSerializerVisitor MW/rtc/model/SelectionTreeWalker MW/rtc/nodes/inner/RootNode MW/rtc/plugins/cutcopypaste/MIMETypes".split(" "),function(g,f,e,d,b,a){return g(null,{constructor:function(a){a.registerNodeConverter(b,f.hitch(this,"_serializeSelection"))},_serializeSelection:function(c){var b=new e;(new d(b)).traverseSelection(c);c=b.getSerialized();return[{flavor:a.MATLAB_RICHTEXT,
content:JSON.stringify(c)}]}})})},"MW/rtc/model/io/ContentSerializerVisitor":function(){define(["dojo/_base/declare","MW/rtc/model/DocumentUtilities","MW/rtc/model/io/NodeVisitorInterface"],function(g,f,e){return g(e,{constructor:function(){this._content=[];this._contentStack=[]},enterInnerNode:function(d){this._contentStack.push(this._content);this._content=[]},visitLeafNode:function(d,b,a){d=d.serialize(!0);d.text=d.text.substring(b,a);this._content.push(d)},leaveInnerNode:function(d){var b=d.serialize(!0);
b.children=this._content;this._content=this._contentStack.pop();(0!==b.children.length||!f.isTextLevelContainer(d))&&this._content.push(b)},getSerialized:function(){return this._content}})})},"MW/rtc/plugins/cutcopypaste/PlainTextNodeConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/cutcopypaste/PlainTextNodeConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cutcopypaste.converter"]}},createInstance:function(d){return new e(d)}})})},
"MW/rtc/plugins/cutcopypaste/PlainTextNodeConverter":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/nodes/leaf/PlainTextNode","MW/rtc/plugins/cutcopypaste/MIMETypes"],function(g,f,e,d){return g(null,{constructor:function(b){b.registerNodeConverter(e,f.hitch(this,"_convertPlainTextNode"))},_convertPlainTextNode:function(b){return!b.fileEndSelected()?[{flavor:d.MATLAB_RICHTEXT,content:void 0},{flavor:d.HTML,content:void 0}]:[]}})})},"MW/rtc/plugins/cutcopypaste/RTFGeneratorProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/cutcopypaste/RTFGenerator"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cutcopypaste.converter","rtc.internaldocument"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/cutcopypaste/RTFGenerator":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/nodes/inner/RootNode","MW/rtc/plugins/cutcopypaste/MIMETypes","MW/rtc/plugins/view/exporters/RTFWriter"],function(g,f,e,d,b){return g(null,
{constructor:function(a,c){this._internalDocument=c;a.registerNodeConverter(e,f.hitch(this,"_convertToRTF"))},_convertToRTF:function(a){this._rtfWriter||(this._rtfWriter=new b);a=this._write(a);var c=[];a&&c.push({flavor:d.RTF,content:a});return c},_write:function(a){return this._rtfWriter.write(this._internalDocument,a)}})})},"MW/rtc/plugins/view/exporters/RTFWriter":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-style dojo/dom-class dojo/has dojo/query MW/rtc/misc/ImageURIUtilities MW/rtc/plugins/equations/equationcontroller/view/EquationViewUtilities MW/rtc/plugins/view/exporters/RTFFormatUtils MW/rtc/plugins/view/exporters/ViewBaseWriter".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return f(l,{_PIX_TO_POINT_FACTOR:15,_MATLAB:"matlab:",_VE_SCALING_FACTOR:"10",_MULTIPLIER_SYMBOL:"\\'d7",constructor:function(a){},_reset:function(){this.colors=[];this._listNumber=this.numOfColors=0;this._listoverrides=this._lists="";this.inherited(arguments)},_writeFontTable:function(){return"{\\fonttbl{\\f0\\fswiss Helvetica;}{\\f1\\fmodern Courier;}}"},_handleFileEndSelection:function(a){var c=a.rootContainer();(a=c.box.nextSibling)||(a=c);for(c=a;c;)(c=a.lastChild)&&
(a=c);a&&(this._endNode=a,this._endPosInNode=this._endNode.length)},_writeColorTable:function(){var a="",c;this.colors.forEach(function(b){(c=b.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)(,\s*\d?\.?\d+)?\)/))&&(a+="\\red"+parseInt(c[1],10)+"\\green"+parseInt(c[2],10)+"\\blue"+parseInt(c[3],10)+";")});return a?"\n{\\colortbl"+a+"}\n":""},_writeListTable:function(){if(""===this._lists)return"";var a;a="{\\*\\listtable"+this._lists;return a=a+"}\n"+("{\\*\\listoverridetable"+this._listoverrides+"}\n")},_addList:function(a,
c,b){var d;d="{\\list\\listtemplateid"+a+"\\listhybrid";d+="{\\listlevel";c?(d+="\\levelnfc0\\levelnfcn0\\leveljc0\\leveljcn0\\levelfollow0\\levelstartat1\\levelspace360\\levelindent0"+b,d+="{\\*\\levelmarker \\{decimal\\}.}",d+="{\\leveltext\\leveltemplateid"+a,d+="\\'02\\'00.;}",d+="{\\levelnumbers\\'01;}"):(d+="\\levelnfc23\\levelnfcn23\\leveljc0\\leveljcn0\\levelfollow0\\levelstartat1\\levelspace360\\levelindent0"+b,d+="{\\*\\levelmarker \\{disc\\}}",d+="{\\leveltext\\leveltemplateid"+a,d+="\\'01\\uc0\\u8226 ;}",
d+="{\\levelnumbers;}");d+="\\fi-360\\li720\\lin720 ";d+="}";d+="{\\listname ;}";d+="\\listid"+a;d+="}\n";this._lists+=d;this._listoverrides+="{\\listoverride\\listid"+a+"\\listoverridecount0\\ls"+a+"}"},_enterTextNode:function(a){d.contains(a.parentNode,"textWrapper")||this._writeText(a,a.textContent)},_writeOpening:function(){return"{\\rtf1\\ansi"+this._writeFontTable()+this._writeColorTable()+this._writeListTable()},_writeClosing:function(){return"}"},_openParagraph:function(a){a.rteNode&&a.rteNode.anchorId&&
(this._body+="{\\fcs1 {\\*\\bkmkstart internal:"+a.rteNode.anchorId+"}{\\*\\bkmkend internal:"+a.rteNode.anchorId+"}");this._body+="\\pard";this._setAlignment(a);a=e.getComputedStyle(a);this._body+="\\sb"+Math.max(parseInt(a.marginTop,10),0)*this._PIX_TO_POINT_FACTOR;this._body+="\\sa"+Math.max(parseInt(a.marginBottom,10),0)*this._PIX_TO_POINT_FACTOR;this._body+=" "},_setAlignment:function(a){a=e.getComputedStyle(a);this._body="center"===a.textAlign?this._body+"\\qc":"right"===a.textAlign?this._body+
"\\qr":this._body+"\\ql"},_openText:function(a){this._body+="\\plain";a=e.getComputedStyle(a);-1<a.fontFamily.indexOf("monospace")?this._body+="\\f1":this._body+="\\f0";this._body+="\\fs"+Math.round(1.5*parseInt(a.fontSize,10));var c=this.colors.indexOf(a.color);0>c&&(this.colors.push(a.color),c=this.colors.length-1);this._body+="\\cf"+c;"italic"===a.fontStyle&&(this._body+="\\i");if("bold"===a.fontWeight||"700"===a.fontWeight)this._body+="\\b";"underline"===a.textDecoration&&(this._body+="\\ul");
this._body+=" "},_writeText:function(a,c){var b=c?c:this._getNodeTextWithLineBreak(a),d=0,e;a===this._startNode&&this._startPosInNode&&(d=this._startPosInNode);a===this._endNode&&-1!==this._endPosInNode&&(e=this._endPosInNode);this._body+=k.getFormattedChars(b.substring(d,e))},_startNodeElement:function(a){if("div"===a.localName&&a.className&&(-1<a.className.indexOf("ToCHeading")||-1<a.className.indexOf("ToCItems")))return!1;"ul"===a.localName&&(this.listItemNumber=0,this._openList(a));"ol"===a.localName&&
(this._openList(a,!0),this.listItemNumber=1);"li"===a.localName&&(this.listItemNumber?(this._body+="{\\listtext   "+this.listItemNumber+"  }",this.listItemNumber+=1):this._body+="{\\listtext    \\'95    }",this._setAlignment(a));"br"===a.localName&&(this._body+="\\line ");"strong"===a.localName&&(this._body+="\\b ");if("div"===a.localName)return this._checkForOpenParagraph(a);if("h1"===a.localName||"h2"===a.localName)this._openParagraph(a);else if("a"===a.localName&&a.href.substring(0,7)!==this._MATLAB){var c=
0===a.href.indexOf("internal")?" \\\\l ":"";this._body+="{\\field{\\*\\fldinst{HYPERLINK "+c+'"'+a.href+'"}}{\\fldrslt{\\ul\\cf1 ';this._openText(a)}else{if("equationNode"===a.className)return this._writeEquationNode(a),!0;if("img"===a.localName)return this._body+=this._writeImage(a.src,a.clientWidth,a.clientHeight),!0;if(d.contains(a,"textBox"))return this._writeTextNode(a),!0}return!1},_writeChildNodeForTextNode:function(a,c){this._openText(c);this._body+=k.getFormattedChars(a)},_getNodeTextWithLineBreak:function(a){return a.innerText},
_endNodeElement:function(a){if(!("div"===a.localName&&a.className&&-1<a.className.indexOf("ToC"))){if(("div"===a.localName||"h1"===a.localName||"h2"===a.localName)&&!this._checkForCloseParagraph(a))this._body+="\\par\n";"li"===a.localName&&(this._body+=" \\f0\\\n");"a"===a.localName&&a.href.substring(0,7)!==this._MATLAB&&(this._body+="}}}");"strong"===a.localName&&(this._body+="\\b0 ")}},_checkForOpenParagraph:function(a){if(d.contains(a,"outputParagraph"))return!1;if(d.contains(a,"doNotExport"))return!0;
if(d.contains(a,"figureElement"))return this._writeFigureOutputElement(a),!0;if(d.contains(a,"matrixElement"))return this._writeMatrixOutputElement(a),!0;if(d.contains(a,"outputElement")||d.contains(a,"textElement")||d.contains(a,"variableElement")||d.contains(a,"diagnosticMessage-messagePart")||d.contains(a,"diagnosticMessage-stackPart"))return a.innerHTML?(this._openText(a),!1):!0;if(d.contains(a,"symbolicElement"))return this._writeSymbolicOutputElement(a),!0;if(d.contains(a,"lineNode"))return this._writeLineNode(a),
!1;if(d.contains(a,"inlineElement"))return this._body+="\\pard\\li255\\sb150\\sa340 ",!1;if(d.contains(a,"tableElement")&&this._embeddedOutputsView)return this._writeTableOutputElement(a),!0;if(d.contains(a,"diagnosticMessage-wrapper"))return this._writeDiagnosticOutputMessage(a),!1;if(d.contains(a,"MathEquation")||d.contains(a,"render-target"))return!0;if("liveControlOuterNode"===a.className)return this._writeLiveControlNode(a),!0;this._openParagraph(a);return!1},_checkForCloseParagraph:function(a){return d.contains(a,
"inlineWrapper")||d.contains(a,"CodeBlock")||d.contains(a,"symbolicElement")||d.contains(a,"variableElement")||d.contains(a,"matrixElement")||d.contains(a,"outputParagraph")||d.contains(a,"figureElement")||d.contains(a,"diagnosticMessage-wrapper")||d.contains(a,"SectionBlock")||d.contains(a,"textElement")||d.contains(a,"embeddedOutputsWarningElement")||d.contains(a,"tableElement")||d.contains(a,"liveControlOuterNode")||!a.innerHTML},_openList:function(a){var c=e.getComputedStyle(a),b="\\cf"+this._colorIndex(a)+
" ";this._listNumber+=1;this._addList(this._listNumber,"ol"===a.localName,b);this._body+="\\pard\\tx220\\tx720\\pardeftab720\\li720\\fi-720\\sa225\n";this._body+="\\ls"+this._listNumber+"\\ilvl0\\f0\\fs"+Math.round(1.5*parseInt(c.fontSize,10))},_colorIndexBg:function(a){a=e.getComputedStyle(a).backgroundColor;var c=this.colors.indexOf(a);0>c&&(this.colors.push(a),c=this.colors.length-1);return c},_colorIndex:function(a){a=e.getComputedStyle(a).color;var c=this.colors.indexOf(a);0>c&&(this.colors.push(a),
c=this.colors.length-1);return c},_writeDiagnosticOutputMessage:function(a){var c=this._colorIndex(a);this._body+="\\cf"+c+" ";this._openText(a)},_writeLineNode:function(a){a=this._colorIndexBg(a.parentNode.parentNode);this._body+="\\cbpat"+a+" "},_writeSymbolicOutputElement:function(a){var c=a.getElementsByClassName("embeddedOutputsVariableElement"),b="";c[0]&&"div"===c[0].localName&&(b="\\line   ");0<c.length&&(this._openText(c[0]),this._writeText(c[0]),this._body+=b);this._writeEquationNode(a)},
_writeMatrixOutputElement:function(c){var b=c.getElementsByClassName("variableNameElement");if(0<b.length){this._openText(b[0].firstChild);this._writeText(b[0].firstChild);b=this._embeddedOutputsView?this._embeddedOutputsView.getOutputFromOutputDiv(c.parentElement):null;this._writeNodeContent(c,"veVariableValueSummary");if(b&&b.getFocusedView){if(b=a(".veViewportSummary",c),0<b.length&&!d.contains(b[0],"hide")&&(this._body+="{    ",g.forEach(b[0].children,function(a){this._openAndWrite(a)},this),
this._body+="}"),this._body+="\\line ",(b=c.getElementsByClassName("veScalingFactor")[0])&&!d.contains(b,"hide"))this._body+=this._VE_SCALING_FACTOR,b=b.getElementsByClassName("scaleExponent")[0],this._body+="{\\super "+b.textContent+"}\\fs21"+this._MULTIPLIER_SYMBOL+" \\line "}else this._body+="\\line ";this._writeNodeContent(c,"variableValue")}},_writeTableOutputElement:function(a){var c=this._embeddedOutputsView.getOutputFromOutputDiv(a.parentElement);this._writeNodeContent(a,"summaryBarVarName");
this._body+=" ";this._writeNodeContent(a,"summaryBarSize");this._body+=" ";this._writeNodeContent(a,"summaryBarType");this._body+=" ";c.getMetaSummary&&c.getMetaSummary()&&(this._writeNodeContent(a,"filterSummaryData"),this._body+=" ");this._body+="\\par\n\\pard ";this._openText(a);this._body+="{"+c.getRTFContent()+"}"},_writeNodeContent:function(a,c){var b=a.getElementsByClassName(c);b&&0<b.length&&this._openAndWrite(b[0])},_openAndWrite:function(a){this._openText(a);this._writeText(a)},_writeFigureOutputElement:function(a){a=
a.getElementsByClassName("figureImage");0<a.length&&(this._body+=this._writeImage(a[0].src,a[0].clientWidth,a[0].clientHeight))},_writeEquationNode:function(a){if(b("ie"))return"";a=h.exportDomnodeToImageURL(a,2);this._body+=this._writeImage(a.dataURL,a.width,a.height,2,a.verticalAlign*this._PIX_TO_POINT_FACTOR)},_writeImage:function(a,b,d,e,h){var f="";a=c.getHexBinaryFromURI(a);if(!a)return f;e||(e=1);var k="pngblip";if("jpg"===a.format||"jpeg"===a.format)k="jpegblip";f=f+("{\\pict\\"+k)+("\\picw"+
b);f+="\\pich"+d;f+="\\picwgoal"+Math.round(b*this._PIX_TO_POINT_FACTOR/e);f+="\\pichgoal"+Math.round(d*this._PIX_TO_POINT_FACTOR/e);0>h&&(f+="\\dn"+Math.round(h/-10));f+="\n";f+=a.hexData;return f+="}"},_writeLiveControlNode:function(a){a=a.getElementsByClassName("liveControlTextView")[0];this._writeTextNode(a)}})})},"MW/rtc/plugins/view/exporters/RTFFormatUtils":function(){define(["dojo/_base/declare"],function(g){return{getFormattedChars:function(f){for(var e="",d=0,b="",a=0,d=0;d<f.length;d+=
1){b=f[d];a=f.charCodeAt(d);switch(b){case "\\":b="\\\\";break;case "{":b="\\{";break;case "}":b="\\}";break;case "\n":b="\\line "}e=127>a?e+b:e+("\\u"+a+"?")}return e}}})},"MW/rtc/plugins/datatip/DataTipProvider":function(){define(["dojo/_base/declare","MW/rtc/datamodel/FileBackingStoreUtilities","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/datatip/DataTip"],function(g,f,e,d){return g(e,{isApplicable:function(b){return f.isPlainCodeFile(b)},requires:function(){return{isApplicable:["rtc.backingstore"],
createInstance:"rtc.internaldocument rtc.view rtc.editordataservice rtc.outputhandlerservice rtc.functionservice rtc.preferences.service rtc.actionservice rtc.document matlab.tokens rtc.domnode matlab.code.mtree.codeblocks debug.documentdebugservices rtc.linenumberservice".split(" ")}},createInstance:function(b,a,c,e,f,g,m,p,n,q,r,s,t){return new d(b,a,c,e,f,g,m,p,n,q,r,s,t)}})})},"MW/rtc/plugins/datatip/DataTip":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-class dojo/on MW/rtc/plugins/datatip/DataTipUtilities MW/rtc/plugins/debug/DebugServicesFactory MW/rtc/plugins/language/matlab/syntax/mtree/codeblocks/BlockType MW/rtc/plugins/tooltip/HoverableTooltipPlugin MW/rtc/preferences/PreferenceKeysEnum".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return g(k,{_MATRIX_MAX_COLUMN:5,_SCROLLABLE_CLASSNAME:"scrollableOutput",_DATATIP_CSS_CLASS:"rtcDataTipElement",_DO_NOT_SHOW_TOOLTIP:void 0,_DATATIP_ACTION_ID:"rtc_datatips",_TIMEOUT_VALUE:11E3,_CANCEL_REASON:"DatatipCancel",_ADDITIONAL_RIGHT_PADDING:"rtcDataTipElementRightPadding",constructor:function(a,c,b,d,h,k,g,l,v,w,x,y,B){this._internalDocument=a;this._view=c;this._editorDataService=b;this._outputHandlerService=d;this._functionService=h;this._preferencesService=
k;this._actionService=g;this._document=l;this._tokenService=v;this._domNode=w;this._codeBlockService=x;this._documentDebugServices=y;this._lineNumberService=B;this._showDataTips=!0;a=[{id:this._DATATIP_ACTION_ID,enabled:!0,selected:!0,callback:f.hitch(this,"_onActionChange")}];this._actionService.loadActions(a);this.own(e.after(this._actionService,"onActionChange",f.hitch(this,"_onActionChange"),!0));this.own(e.after(this._documentDebugServices,"onStackChanged",f.hitch(this,"_handleStackChanged")));
this._currentWorkspace=null},_handleStackChanged:function(){this._currentWorkspace=this._documentDebugServices.getActiveWorkspace()},_onActionChange:function(a){a.id===this._DATATIP_ACTION_ID&&(this._showDataTips=a.newValue)},priority:function(){return 4},getTooltipContent:function(c,b,d){this._latestPromise&&(this._latestPromise.cancel(this._CANCEL_REASON),this._latestPromise=null);if(this._isPreferenceDisabled())d(this._DO_NOT_SHOW_TOOLTIP);else{var e=this._tokenService.getTokensData().tokens,h=
a.getValidIdentifierTill(b,this._document,this._internalDocument,e);if(h)if(e=this._isDebugging(),b=b.getLineColumn().line,e){var k=this._lineNumberService.getCodeLineNumberFromLineNumber(b-1);this._codeBlockService.whenSynchronized(f.hitch(this,function(){this._isHoveringInCurrentWorkspace(k)?this._requestDatatip(h,c,d):d(this._DO_NOT_SHOW_TOOLTIP)}))}else this._isInsideFunction(b)?d(this._DO_NOT_SHOW_TOOLTIP):this._requestDatatip(h,c,d);else d(this._DO_NOT_SHOW_TOOLTIP)}},_requestDatatip:function(a,
c,b){this._latestPromise=this._editorDataService.request("rtc.datatip",{variablename:a.trim()},this._TIMEOUT_VALUE);a=f.hitch(this,"_updateDataTip",c,b);b=f.hitch(this,"_errorCallback",b);this._latestPromise.then(a,b)},_isPreferenceDisabled:function(){return!this._preferencesService.getValue(l.DATATIP,!0)||!this._showDataTips},_updateDataTip:function(c,e,h){if(h=h.result){var f={};"matrix"===h.type&&(f.createPromptController=!1,f.maxColumns=this._MATRIX_MAX_COLUMN);h.outputData.isPreview=!0;(h=this._outputHandlerService.handleRawOutput(h,
f))?(h=h.getOutput(),h.isReady()?(f=h.getDomElement(),h.startup(),c=a.createTooltipDiv(this._view,f,c,this._DATATIP_CSS_CLASS,this._domNode),e(c,!0),c&&(b(c,"mouseover",function(a){a.stopPropagation()}),d.add(c,this._SCROLLABLE_CLASSNAME),c.scrollHeight>c.clientHeight&&d.add(c,this._ADDITIONAL_RIGHT_PADDING))):e(this._DO_NOT_SHOW_TOOLTIP)):e(this._DO_NOT_SHOW_TOOLTIP)}else e(this._DO_NOT_SHOW_TOOLTIP)},_errorCallback:function(a,c){c!==this._CANCEL_REASON&&a(void 0)},_isInsideFunction:function(a){return this._functionService.isLineInFunction(a)},
_isDebugging:function(){return c.getInstance().isDebugging},_isHoveringInCurrentWorkspace:function(a){var c;this._currentWorkspace&&(c=this._codeBlockService.getInnermostBlockOfType(this._currentWorkspace.getLineNumber(),h.FUNCTION_DEFINITION));a=this._codeBlockService.getInnermostBlockOfType(a,h.FUNCTION_DEFINITION);return!c||!a?c===a:c.id===a.id},onTooltipClose:function(){}})})},"MW/rtc/plugins/datatip/DataTipUtilities":function(){define(["dojo/dom-construct","MW/rtc/model/DocumentUtilities","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities"],
function(g,f,e){return{_TOOLTIP_PADDING:20,_TOOLTIP_MAX_WIDTH:700,_TOOLTIP_MAX_HEIGHT:500,__DATATIP_TO_VIEWPORT_DIMENSION_RATIO:0.7,getValidIdentifierTill:function(d,b,a,c){b=this._getIdentifierTill(d,b,a);if(!b)return"";d=d.getLineColumn().line-1;a=b.text;return this._isInvalidIdentifier(a,b.startColumn,b.endColumn,d,c)?"":a},_getIdentifierTill:function(d,b,a){d=f.getWordAtPosition(a,d);if(!d||!d.text||this._isInvalidVariableName(d,b))return null;var c=d.text,e=d.startLineCol.column,k=d.endLineCol.column,
g=d.startLineCol.line,m;0!==e&&(m=this._getCharAtLocation(b,g,e-1));if("."===m){if(1>=e)return null;e=a.getPositionForLineColumn(g+1,e-1);b=this._getIdentifierTill(e,b,a);if(!b)return null;b=b.text+"."+c;k=d.endLineCol.column;e=k-b.length}else b=c;return{text:b,startColumn:e,endColumn:k}},_isInvalidVariableName:function(d,b){var a=d.startLineCol.line,c=d.startLineCol.column;return 1>=c?!1:"."===this._getCharAtLocation(b,a,c-1)&&"."===this._getCharAtLocation(b,a,c-2)},_getCharAtLocation:function(d,
b,a){return d.getTextCharacters(b,a,1)},_isInvalidIdentifier:function(d,b,a,c,h){d=e.getMatchingTokenInLine(h[c],b,a);return!d?!1:e.isCommentToken(d)||e.isMatlabStringToken(d)?!0:!1},createTooltipDiv:function(d,b,a,c,e){var f=null,l=d.getDomTargetPosition();if(!d.getDomtarget().contains(a.box))return f;d=d.getCoordinateForNode(a);a=d.y-l.scrollTop;l=Math.min(this._TOOLTIP_MAX_HEIGHT,0.7*Math.max(a,l.clientHeight-(a+d.height)))-this._TOOLTIP_PADDING;e=Math.min(this._TOOLTIP_MAX_WIDTH,0.7*e.clientWidth)-
this._TOOLTIP_PADDING;return f=g.create("div",{innerHTML:b.outerHTML?b.outerHTML:b,className:c,style:{"max-height":l+"px","max-width":e+"px"}})}}})},"MW/rtc/plugins/language/matlab/syntax/mtree/codeblocks/BlockType":function(){define("MW/rtc/plugins/language/matlab/syntax/mtree/nodes/BlockCommentMTreeNode MW/rtc/plugins/language/matlab/syntax/mtree/nodes/ClassdefMTreeNode MW/rtc/plugins/language/matlab/syntax/mtree/nodes/ClassdefSectionMTreeNode MW/rtc/plugins/language/matlab/syntax/mtree/nodes/ForMTreeNode MW/rtc/plugins/language/matlab/syntax/mtree/nodes/FunctionDeclarationMTreeNode MW/rtc/plugins/language/matlab/syntax/mtree/nodes/IfMTreeNode MW/rtc/plugins/language/matlab/syntax/mtree/nodes/StatementMTreeNode MW/rtc/plugins/language/matlab/syntax/mtree/nodes/SwitchMTreeNode MW/rtc/plugins/language/matlab/syntax/mtree/nodes/WhileMTreeNode".split(" "),
function(g,f,e,d,b,a,c,h,k){return{BLOCK_COMMENT:"blockcomment",CLASS_DEFINITION:"class",CLASS_SECTION:"classsection",FOR_LOOP:"for",FUNCTION_DEFINITION:"function",IF_STATEMENT:"if",STATEMENT:"statement",SWITCH:"switch",WHILE_LOOP:"while",getBlockTypeForNode:function(l){var m=null;l instanceof g?m=this.BLOCK_COMMENT:l instanceof f?m=this.CLASS_DEFINITION:l instanceof e?m=this.CLASS_SECTION:l instanceof d?m=this.FOR_LOOP:l instanceof b?m=this.FUNCTION_DEFINITION:l instanceof a?m=this.IF_STATEMENT:
l instanceof c?m=this.STATEMENT:l instanceof h?m=this.SWITCH:l instanceof k&&(m=this.WHILE_LOOP);return m}}})},"MW/rtc/plugins/language/matlab/syntax/mtree/nodes/BlockCommentMTreeNode":function(){define(["dojo/_base/declare","./MTreeNode"],function(g,f){return g(f,{})})},"MW/rtc/plugins/language/matlab/syntax/mtree/nodes/MTreeNode":function(){define(["dojo/_base/declare"],function(g){return g(null,{constructor:function(f,e){this._data=f;this._children=e;this._parent=null;this._children&&this._children.forEach(function(d){d._parent=
this},this)},getParent:function(){return this._parent},getChildren:function(){return this._children},getAllChildren:function(){return this.getChildren()},getStartLine:function(){return this._data.startLine},getStartColumn:function(){return this._data.startColumn},getEndLine:function(){return this._data.endLine},getEndColumn:function(){return this._data.endColumn}})})},"MW/rtc/plugins/language/matlab/syntax/mtree/nodes/ClassdefMTreeNode":function(){define(["dojo/_base/declare","./MTreeNode"],function(g,
f){return g(f,{})})},"MW/rtc/plugins/language/matlab/syntax/mtree/nodes/ClassdefSectionMTreeNode":function(){define(["dojo/_base/declare","./MTreeNode"],function(g,f){return g(f,{})})},"MW/rtc/plugins/language/matlab/syntax/mtree/nodes/ForMTreeNode":function(){define(["dojo/_base/declare","./MTreeNode"],function(g,f){return g(f,{})})},"MW/rtc/plugins/language/matlab/syntax/mtree/nodes/FunctionDeclarationMTreeNode":function(){define(["dojo/_base/declare","./MTreeNode","./FunctionIdentifierMTreeNode",
"./VariableMTreeNode"],function(g,f,e,d){return g(f,{constructor:function(b,a){this._functionName=new e(this._data.functionName);this._functionInputArguments=this._convertFunctionArguments(this._data.functionInputArguments);this._functionOutputArguments=this._convertFunctionArguments(this._data.functionOutputArguments)},_convertFunctionArguments:function(b){return b.map(function(a){return new d(a)})},getAllChildren:function(){return[].concat(this.getFunctionName(),this.getFunctionInputArguments(),
this.getFunctionOutputArguments(),this.getChildren())},getFunctionName:function(){return this._functionName},getFunctionInputArguments:function(){return this._functionInputArguments},getFunctionOutputArguments:function(){return this._functionOutputArguments}})})},"MW/rtc/plugins/language/matlab/syntax/mtree/nodes/FunctionIdentifierMTreeNode":function(){define(["dojo/_base/declare","./IdentifierMTreeNode"],function(g,f){return g(f,{isUsedCrossFunctions:function(){return this._data.isUsedCrossFunctions},
isPersistent:function(){return this._data.isPersistent},isGlobal:function(){return this._data.isGlobal}})})},"MW/rtc/plugins/language/matlab/syntax/mtree/nodes/IdentifierMTreeNode":function(){define(["dojo/_base/declare","./MTreeNode"],function(g,f){return g(f,{getText:function(){return this._data.text},getSymbolTableIndex:function(){return this._data.symbolTableIndex}})})},"MW/rtc/plugins/language/matlab/syntax/mtree/nodes/VariableMTreeNode":function(){define(["dojo/_base/declare","./IdentifierMTreeNode"],
function(g,f){return g(f,{isUsedCrossFunctions:function(){return this._data.isUsedCrossFunctions},isPersistent:function(){return this._data.isPersistent},isGlobal:function(){return this._data.isGlobal},isAssignment:function(){return this._data.isAssignment}})})},"MW/rtc/plugins/language/matlab/syntax/mtree/nodes/IfMTreeNode":function(){define(["dojo/_base/declare","./MTreeNode"],function(g,f){return g(f,{})})},"MW/rtc/plugins/language/matlab/syntax/mtree/nodes/StatementMTreeNode":function(){define(["dojo/_base/declare",
"./MTreeNode"],function(g,f){return g(f,{})})},"MW/rtc/plugins/language/matlab/syntax/mtree/nodes/SwitchMTreeNode":function(){define(["dojo/_base/declare","./MTreeNode"],function(g,f){return g(f,{})})},"MW/rtc/plugins/language/matlab/syntax/mtree/nodes/WhileMTreeNode":function(){define(["dojo/_base/declare","./MTreeNode"],function(g,f){return g(f,{})})},"MW/rtc/plugins/tooltip/HoverableTooltipPlugin":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin"],function(g,f){return g(f,
{priority:function(){throw Error("Unimplemented API: MW.rtc.plugins.tooltip.HoverableTooltipPlugin.priority");},getTooltipContent:function(e,d,b){throw Error("Unimplemented API: MW.rtc.plugins.tooltip.HoverableTooltipPlugin.getTooltipContent");}})})},"MW/rtc/preferences/PreferenceKeysEnum":function(){define([],function(){return{CODE_ANALYZER_DISPLAY:"Editormlint-display",CODE_ANALYZER_UNDERLINING:"Editormlint-underlining",DATATIP:"LiveEditorDataTips",INDENTING:"EditorMFunctionIndentType"}})},"MW/rtc/plugins/draganddrop/DragAndDropProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/draganddrop/DragAndDrop"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.document rtc.cursor rtc.focusservice rtc.cutcopypaste.converter rtc.draganddropnotifier rtc.view rtc.internaldocument rtc.divselection rtc.cursorcontroller".split(" ")}},createInstance:function(d,b,a,c,h,f,g,m,p){return new e(d,b,a,c,h,f,g,m,p)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/draganddrop/DragAndDrop":function(){define("dojo/_base/declare dojo/_base/event dojo/_base/lang dojo/aspect dojo/has dojo/on MW/rtc/model/CodeUtilities MW/rtc/plugins/cutcopypaste/MIMETypes".split(" "),
function(g,f,e,d,b,a,c,h){return g(null,{_COPY_MOVE_EFFECT:"copyMove",_COPY_EFFECT:"copy",_NO_EFFECT:"none",_MOUSE_DOWN:"mouseDown",_TEXT_MIMETYPE_FOR_IE:"text",constructor:function(a,c,b,h,f,g,r,s,t){this._document=a;this._focusService=b;this._cursor=c;this._converter=h;this._view=g;this._internalDocument=r;this._divSelection=s;this._cursorController=t;this._connections=[];this._draggedTextInfo=null;this._connections.push(d.after(f,"onDragEnter",e.hitch(this,"_handleDragEnter"),!0));this._connections.push(d.after(f,
"onDragOver",e.hitch(this,"_handleDragOver"),!0));this._connections.push(d.after(f,"onDragLeave",e.hitch(this,"_handleDragLeave"),!0));this._connections.push(d.after(f,"onDrop",e.hitch(this,"_handleDrop"),!0));this._view.setDraggable(!0);this._connections.push(d.after(f,"onDragStart",e.hitch(this,"_handleDragStart"),!0));this._connections.push(d.after(f,"onDragEnd",e.hitch(this,"_handleDragEnd"),!0))},_handleDragEnter:function(a){this._focusService.setFocus();this._cursorController.clearSelection();
this._handleDragOver(a)},_handleDragOver:function(a){this._cursorController.setCursorToEvent(a);this._cursor.isCursorReadOnly()&&(a.dataTransfer.dropEffect=this._NO_EFFECT)},_handleDragLeave:function(a){this._cursor.isCursorReadOnly()&&(a.dataTransfer.dropEffect=this._NO_EFFECT)},_handleDragStart:function(a){this._cursorController.hasSelection()&&("function"===typeof a.dataTransfer.setDragImage&&a.dataTransfer.setDragImage(this._getDragImage(),0,0),this._draggedTextInfo={coordinates:this._cursorController.getSelectionLineColumn()},
this._draggedTextInfo.selectionInfo=this._cursorController.getSelection(),a.dataTransfer.effectAllowed=this._COPY_MOVE_EFFECT,this._draggedTextInfo.operation=this._COPY_MOVE_EFFECT,b("mac")?a.altKey&&(!a.metaKey&&!a.shiftKey&&!a.ctrlKey)&&(a.dataTransfer.effectAllowed=this._COPY_EFFECT,this._draggedTextInfo.operation=this._COPY_EFFECT):a.ctrlKey&&(!a.altKey&&!a.shiftKey)&&(a.dataTransfer.effectAllowed=this._COPY_EFFECT,this._draggedTextInfo.operation=this._COPY_EFFECT),this._cursor.isCursorReadOnly()&&
(this._draggedTextInfo.operation=this._COPY_EFFECT,a.dataTransfer.effectAllowed=this._COPY_EFFECT),this._divSelection.lockSelection(),this._setDataTransferObject(a))},_setDataTransferObject:function(a){var c=this._converter.convertToClipboard(this._cursorController.getSelection());c.some(function(a){if(a.flavor===h.MATLAB_RICHTEXT)return this._draggedTextInfo.flavor_content=a.content,!0},this);try{c.forEach(function(c){a.dataTransfer.setData(c.flavor,c.content)},this)}catch(b){a.dataTransfer.setData(this._TEXT_MIMETYPE_FOR_IE,
this._cursorController.selectedText())}},_handleDrop:function(a){if(this._cursor.isCursorReadOnly())f.stop(a),a.preventDefault();else{this._document.startEdit();if(this._draggedTextInfo){var c=this._draggedTextInfo.flavor_content;this._divSelection.unlockSelection();this._cursorController.clearSelection();this._draggedTextInfo.operation===this._COPY_MOVE_EFFECT&&this._deleteSelectedText();this._draggedTextInfo=null}var b=e.hitch(this,function(b){try{return b===h.MATLAB_RICHTEXT&&!a.dataTransfer.getData(b)&&
c?c:a.dataTransfer.getData(b)}catch(d){if(c)return c;if(b===h.TEXT)return a.dataTransfer.getData(this._TEXT_MIMETYPE_FOR_IE)}});(b=this._converter.convertContentFromSource(b))&&this._document.insertContentAtCurrentPosition(b);this._document.endEdit()}},_handleDragEnd:function(a){this._draggedTextInfo&&(this._divSelection.unlockSelection(),this._rePaintSelectedText(),this._draggedTextInfo=null)},_deleteSelectedText:function(){this._draggedTextInfo.coordinates.forEach(function(a){var c=a.start;a=a.end;
c.line>a.line?this._document.deleteText(a.line,a.column,c.line,c.column):c.line===a.line&&c.column>a.column?this._document.deleteText(c.line,a.column,a.line,c.column):this._document.deleteText(c.line,c.column,a.line,a.column)},this)},_rePaintSelectedText:function(){this._cursorController.setSelection(this._draggedTextInfo.selectionInfo)},_getDragImage:function(){if(!this._invisibleDragImage){var a=document.createElement("img");a.src="";a.style.display="none";this._invisibleDragImage=a}return this._invisibleDragImage},
destroy:function(){this._view.setDraggable(!1);this._connections.forEach(function(a){a.remove()})}})})},"MW/rtc/plugins/draganddrop/DragAndDropNotifierProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/draganddrop/DragAndDropEventNotifier"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.view"]}},createInstance:function(d){d=d.getDomtarget();return new e(d,d)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/draganddrop/DragAndDropEventNotifier":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/on"],function(g,f,e){return g(null,{constructor:function(d,b){this._isDragging=!1;this._dndEventListeners=[];this._dndEventListeners.push(e(d,"dragenter",f.hitch(this,"_handleDragEnter")));this._dndEventListeners.push(e(d,"dragleave",f.hitch(this,"_handleDragLeave")));this._dndEventListeners.push(e(d,"dragover",f.hitch(this,"_handleDragOver")));this._dndEventListeners.push(e(b,"dragstart",f.hitch(this,"_handleDragStart")));this._dndEventListeners.push(e(b,"dragend",f.hitch(this,
"_handleDragEnd")));this._dndEventListeners.push(e(d,"drop",f.hitch(this,"_handleDrop")))},_handleDragEnter:function(d){this._isDragging||(this._isDragging=!0,this.onDragEnter(d));d.preventDefault()},_handleDragLeave:function(d){d.preventDefault();this.onDragLeave(d)},_handleDragOver:function(d){d.preventDefault();this.onDragOver(d)},_handleDragEnd:function(d){this._isDragging=!1;d.preventDefault();this.onDragEnd(d)},_handleDragStart:function(d){this.onDragStart(d)},_handleDrop:function(d){this._isDragging=
!1;d.preventDefault();this.onDrop(d)},onDragEnter:function(d){},onDragLeave:function(d){},onDragOver:function(d){},onDragStart:function(d){},onDragEnd:function(d){},onDrop:function(d){},destroy:function(){this._dndEventListeners.forEach(function(d){d.remove()})}})})},"MW/rtc/plugins/debug/breadcrumbstack/BreadcrumbStackProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/debug/breadcrumbstack/BreadcrumbStack"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.featureinterface rtc.view rtc.bordercontainer rtc.focusservice rtc.actionservice debug.control".split(" ")}},
createInstance:function(d,b,a,c,h,f){return new e(d,b,a,c,h,f)}})})},"MW/rtc/plugins/debug/breadcrumbstack/BreadcrumbStack":function(){define("dojo/aspect dojo/_base/declare dojo/_base/lang MW/rtc/abstract/AbstractPlugin MW/rtc/plugins/debug/DebugServicesFactory MW/rtc/plugins/debug/PersistentStackModelFactory ./BreadcrumbStackView".split(" "),function(g,f,e,d,b,a,c){return f(d,{constructor:function(d,f,l,m,p,n){this._featureInterface=d;this._view=f;this._borderContainer=l;this._focusService=m;this._actionService=
p;this._debuggerManager=n;this._aspectHandles=[];this._debugServices=b.getInstance();this._persistentStackModel=a.getInstance();d=e.hitch(this,"_changeWorkspace");f=e.hitch(this,"_stepOut");this._view=new c(this._persistentStackModel,this._featureInterface,this._view,this._borderContainer,this._focusService,this._actionService,this._debuggerManager,d,f);this.own(this._view);this.own(g.after(this._debugServices,"onDebugModeChanged",e.hitch(this,"_handleOnDebugMode"),!0));this.own(g.after(this._debugServices,
"onDBCont",e.hitch(this,"_handleOnDBCont"),!0))},_handleOnDebugMode:function(a){a||this._view.hideStackBar()},_handleOnDBCont:function(){this._view.disable()},_changeWorkspace:function(a){a-=this._persistentStackModel.getActiveWorkspaceIndex();this._debugServices.dbUpDown(a)},_stepOut:function(){this._debugServices.debugStepOut()}})})},"MW/rtc/plugins/debug/PersistentStackModelFactory":function(){define(["MW/rtc/plugins/debug/PersistentStackModel"],function(g){var f=null;return{getInstance:function(){null===
f&&(f=new g);return f}}})},"MW/rtc/plugins/debug/PersistentStackModel":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/plugins/debug/DebugServicesFactory MW/rtc/plugins/debug/DebugStackFrame mw-utils/Utils ./PersistentStackModelUpdateEvent".split(" "),function(g,f,e,d,b,a,c,h){return g(d,{constructor:function(){this._debugServices=b.getInstance();this._stackFrames=[];this.own(e.after(this._debugServices,"onStackChanged",f.hitch(this,"_handleStackChanged"),
!0));this._debugServices.requestStackState()},getStackFrames:function(){return this._stackFrames},getExecutionPoint:function(){for(var a=0;a<this._stackFrames.length;a+=1){var c=this._stackFrames[a];if(c.isExecutionPoint())return c}return null},getActiveWorkspaceIndex:function(){for(var a=0;a<this._stackFrames.length;a+=1)if(this._stackFrames[a].isActiveWorkspace())return a;return-1},hasStack:function(){return 0!==this._stackFrames.length&&-1!==this.getActiveWorkspaceIndex()},getStackDepth:function(){return this._stackFrames.length},
onModelUpdated:function(a){},_handleStackChanged:function(c,b){var d=c.map(function(c,d){var e=0===d,h=d===b,f=c.getLineNumber(),k=0>f;k&&(f*=-1);return new a(c.getName(),c.getFullPath(),f,e,h,k)},this),e=this._createStackUpdatedEvent(d,b);this._stackFrames=d;this.onModelUpdated(e)},_createStackUpdatedEvent:function(a,b){var d=a.map(function(a){return a.getName()}),e=this._stackFrames.map(function(a){return a.getName()}),d=!c.arrayEquals(d,e),e=this.getActiveWorkspaceIndex();return new h(d,b!==e)}})})},
"MW/rtc/plugins/debug/DebugStackFrame":function(){define(["dojo/_base/declare","MW/rtc/plugins/debug/StackFrame"],function(g,f){return g(f,{constructor:function(e,d,b,a,c,h){this._name=e;this._fullPath=d;this._lineNumber=b;this._isExecutionPoint=a;this._isActiveWorkspace=c;this._isLeavingFrame=h},isExecutionPoint:function(){return this._isExecutionPoint},isActiveWorkspace:function(){return this._isActiveWorkspace},isLeavingFrame:function(){return this._isLeavingFrame}})})},"MW/rtc/plugins/debug/PersistentStackModelUpdateEvent":function(){define(["dojo/_base/declare"],
function(g){return g(null,{constructor:function(f,e){this._hasStackChange=f;this._hasWorkspaceChange=e},hasStackChange:function(){return this._hasStackChange},hasWorkspaceChange:function(){return this._hasWorkspaceChange}})})},"MW/rtc/plugins/debug/breadcrumbstack/BreadcrumbStackView":function(){define("dijit/Destroyable dijit/layout/ContentPane dijit/Tooltip dojo/_base/declare dojo/_base/fx dojo/_base/lang dojo/aspect dojo/dom-construct dojo/dom-class dojo/dom-style dojo/fx/easing dojo/i18n!l10n/nls/breadcrumbStack dojo/on dojo/query dojo/string mw-log/Log mw-menu/ContextMenu mw-menu/MenuItem mw-navigationbar/NavigationBar MW/rtc/plugins/descriptivetooltip/DescriptiveTooltip MW/rtc/plugins/descriptivetooltip/DescriptiveTooltipUtilities MW/uiframework/FocusManager".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x,y){return d(g,{_OVERFLOW_TOLERANCE:2,_TOP_REGION:"top",_BREADCRUMB_BAR_TRAY_ANIM_DURATION:500,_TRAY_MAX_HEIGHT:30,_TRAY_MIN_HEIGHT:1,_TRAY_STATES:{HIDDEN:0,APPEARING:1,VISIBLE:2,DISAPPEARING:3},_FUNCTION_NAME_REGEX:/[A-Za-z0-9_]+$/,_FUNCTION_HANDLE_REGEX:/^@\(/,_BLANK_IMAGE:"data:image/gif;base64,R0lGODlhAQABAIAAAP///////yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw\x3d\x3d",_BREADCRUMB_BAR_TRAY_CLASS:"breadcrumbBarTray",_BREADCRUMB_BAR_CONTAINER_CLASS:"breadcrumbBarContainer",
_BREADCRUMB_BAR_CLASS:"breadcrumbBar",_STEP_OUT_CONTAINER_CLASS:"stepOutContainer",_STEP_OUT_BUTTON_CLASS:"stepOutButton",_CALL_STACK_CONTAINER_CLASS:"callStackContainer",_CALL_STACK_BUTTON_CLASS:"callStackButton",_CALL_STACK_BUTTON_ACTIVE_CLASS:"dropdownActive",_OVERFLOW_INDICATOR_CLASS:"overflowIndicator",_DISABLEMENT_OVERLAY_CLASS:"disablementOverlay",_DISABLED_CLASS:"disabled",_DROP_DOWN_MENU_CLASS:"rtcStackDropdownMenu",_DROP_DOWN_MENU_ITEM_CLASS:"rtcCallStackDropdownItem",_DROP_DOWN_MENU_OFFSET_Y:2,
_IS_ACTIVE_CLASS:"rtcCallStackDropdownItemIsActive",_CURRENT_FRAME_CLASS:"currentFrame",_TOOLTIP_CLASS:"breadcrumbTooltip",_SPLIT_BUTTON_SELECTOR:".mwSplitButton",_TEXT_NODE_SELECTOR:".mwTextNode",constructor:function(b,d,e,h,k,g,l,m,n){this._model=b;this._featureInterface=d;this._view=e;this._borderContainer=h;this._focusService=k;this._actionService=g;this._debuggerManager=l;this._changeWorkspaceCallback=m;this._stepOutCallback=n;this._breadcrumbBarTray=new f({"class":this._BREADCRUMB_BAR_TRAY_CLASS});
this._trayState=this._TRAY_STATES.HIDDEN;this._currentFrameDiv=this._breadcrumbBar=this._breadcrumbBarContainer=this._currentTrayAnimation=null;this._breadcrumbTooltips=[];this._navigationMaxScrollLeft=0;this._stepOutButton=this._overflowIndicator=null;this._stepOutButtonListeners=[];this._callStackButtonTooltip=this._callStackButton=this._stepOutButtonTooltip=null;this._callStackButtonListeners=[];this._stackContextMenu=null;this._menuItemClickListeners=[];this._isLiveEditorEval=!0;this.own(c.after(this._view,
"onResize",a.hitch(this,"_handleResize"),!0));this.own(c.after(this._model,"onModelUpdated",a.hitch(this,"_handleModelUpdated"),!0));this._initBreadCrumbsModule();this._layout(!0)},destroy:function(){this._hideTray(a.hitch(this,"_removeBreadcrumbBarContainer"));this._breadcrumbBarTray.destroy();this._breadcrumbBarTray=null;this.inherited(arguments)},enable:function(){this._disablementOverlay&&(k.remove(this._disablementOverlay,this._DISABLED_CLASS),k.remove(this._breadcrumbBarContainer,this._DISABLED_CLASS))},
disable:function(){this._stackContextMenu&&this._stackContextMenu.close();this._disablementOverlay&&(k.add(this._disablementOverlay,this._DISABLED_CLASS),k.add(this._breadcrumbBarContainer,this._DISABLED_CLASS))},_initBreadCrumbsModule:function(){this._navigationBar=d([v])({currentLocation:"",metaData:{hasChildren:!1,breadCrumbObjectsArray:[]}});this.own(n(this._navigationBar,"locationChanged",a.hitch(this,"_handleLocationChange")))},_handleLocationChange:function(a){this._changeWorkspaceCallback(parseInt(a,
10))},_handleResize:function(){this._breadcrumbBarContainer&&(this._updateOverflowIndicatorVisibility(),this._updateNavigationBarScrollLeft())},_handleModelUpdated:function(a){a=a.hasStackChange();this._layout(a)},_layout:function(c){!this._model.hasStack()||2>this._getPrunedStackFramesFromModel().length?this._hideTray(a.hitch(this,"_removeBreadcrumbBarContainer")):(this._showTray(),this._breadcrumbBarContainer||this._addBreadcrumbBarContainer(),c&&(this._updateBreadcrumbValues(),this._updateStepOutButton()),
this._updateActiveWorkspace(),this.enable())},_updateActiveWorkspace:function(){this._currentFrameDiv&&k.remove(this._currentFrameDiv,this._CURRENT_FRAME_CLASS);var a=this._model.getActiveWorkspaceIndex(),c=this._breadcrumbBar.querySelectorAll(this._SPLIT_BUTTON_SELECTOR);(this._currentFrameDiv=c[c.length-1-a])&&k.add(this._currentFrameDiv,this._CURRENT_FRAME_CLASS)},_updateBreadcrumbValues:function(){var a=this._getPrunedStackFramesFromModel().map(function(a,c){return{textToDisplay:a.getName(),pathToNavigateOnClick:c.toString()}}).reverse();
this._navigationBar.setCurrentLocation("",{locationIcon:this._BLANK_IMAGE,hasChildren:!1,breadCrumbObjectsArray:a});this._destroyBreadcrumbTooltips();q(this._TEXT_NODE_SELECTOR,this._navigationBar.domNode).forEach(function(a){if(""!==a.innerText){var c=x.styleAsCode(a.innerText),c=r.substitute(p.workspaceLabel,{"0":c}),b=this._buildDescriptionString(a.innerText,p.workspaceDescriptionForFunctions,p.workspaceDescriptionGeneric);this._breadcrumbTooltips.push(new w({targetNode:a,label:c,description:b,
cssClasses:this._TOOLTIP_CLASS}))}},this);this._updateNavigationBarScrollLeft();this._updateOverflowIndicatorVisibility()},_buildDescriptionString:function(a,c,b){if(this._FUNCTION_HANDLE_REGEX.test(a))return c;a=this._buildShortFunctionName(a);return r.substitute(b,{"0":a})},_buildShortFunctionName:function(a){var c=a.match(this._FUNCTION_NAME_REGEX);return null===c?(s.error("Couldn't extract function name from: "+a),""):x.styleAsCode(c[0])},_destroyBreadcrumbTooltips:function(){this._breadcrumbTooltips.forEach(function(a){a.destroy()});
this._breadcrumbTooltips=[]},_addBreadcrumbBarContainer:function(){this._breadcrumbBarContainer=h.create("div",{className:this._BREADCRUMB_BAR_CONTAINER_CLASS});h.place(this._breadcrumbBarContainer,this._breadcrumbBarTray.domNode,"last");y.refuseFocus(this._breadcrumbBarContainer);this._breadcrumbBarContainerMouseListener=n(this._breadcrumbBarContainer,"mousedown",a.hitch(this,function(){this._stackContextMenu&&this._stackContextMenu.close()}));this._addBreadcrumbBar();this._addStepOutButton();this._addCallStackButton();
this._addOverflowIndicator();this._disablementOverlay=h.create("div",{className:this._DISABLEMENT_OVERLAY_CLASS});h.place(this._disablementOverlay,this._breadcrumbBarContainer,"last");this._breadcrumbBarContainer.addEventListener("contextmenu",function(a){a.preventDefault();a.stopPropagation()},!0);this._breadcrumbBar.addEventListener("wheel",function(a){a.preventDefault();a.stopPropagation()},!0)},_addBreadcrumbBar:function(){this._breadcrumbBar=h.create("div",{className:this._BREADCRUMB_BAR_CLASS});
this._navigationBar.placeAt(this._breadcrumbBar,"first");h.place(this._breadcrumbBar,this._breadcrumbBarContainer,"last");this._navigationBar.startup()},_addStepOutButton:function(){var c=h.create("div",{"class":this._STEP_OUT_CONTAINER_CLASS});this._stepOutButton=h.create("div",{"class":this._STEP_OUT_BUTTON_CLASS});h.place(this._stepOutButton,c,"first");h.place(c,this._breadcrumbBarContainer,"last");this._stepOutButtonListeners.push(n(this._stepOutButton,"click",a.hitch(this,function(){this._stepOutCallback()})));
this._stepOutButtonListeners.push(n(this._stepOutButton,"mouseover",a.hitch(this,function(){this.onStepOutHover()})));this._stepOutButtonListeners.push(n(this._stepOutButton,"mouseout",a.hitch(this,function(){this.onStepOutHoverAway()})));this._updateStepOutButton()},_updateStepOutButton:function(){this._stepOutButtonTooltip&&this._stepOutButtonTooltip.destroy();var a=this._getPrunedStackFramesFromModel(),c=x.styleAsCode(a[0].getName()),c=r.substitute(p.stepOutLabel,{"0":c}),a=this._buildDescriptionString(a[0].getName(),
p.stepOutDescriptionForFunctions,p.stepOutDescriptionGeneric),b=this._actionService.getAction(this._debuggerManager.DEBUG_STEP_OUT_ACTION_ID);this._stepOutButtonTooltip=new w({targetNode:this._stepOutButton,label:c,description:a,keyBinding:b.shortcut,cssClasses:this._TOOLTIP_CLASS})},_addCallStackButton:function(){var c=h.create("div",{"class":this._CALL_STACK_CONTAINER_CLASS});this._callStackButton=h.create("div",{"class":this._CALL_STACK_BUTTON_CLASS});h.place(this._callStackButton,c,"first");h.place(c,
this._breadcrumbBarContainer,"last");this._createCallStackDropdown();var b=!1;this._callStackButtonListeners.push(n(this._callStackButton,"mousedown",a.hitch(this,function(){b=this._stackContextMenu.isMenuOpen()})));this._callStackButtonListeners.push(n(this._callStackButton,"mouseup",a.hitch(this,function(){b||this._openStackMenu(this._callStackButton)})));this._callStackButtonTooltip=new w({targetNode:this._callStackButton,label:p.functionCallStackLabel,description:p.functionCallStackDescription,
cssClasses:this._TOOLTIP_CLASS})},_createCallStackDropdown:function(){var c=a.hitch(this,function(){k.add(this._callStackButton,this._CALL_STACK_BUTTON_ACTIVE_CLASS);this._focusService.setBlur()}),b=a.hitch(this,function(){k.remove(this._callStackButton,this._CALL_STACK_BUTTON_ACTIVE_CLASS);this._focusService.setFocus()});this._stackContextMenu=new t({targetNodes:[this._callStackButton],onOpen:function(){this.inherited("onOpen",arguments);c()},onClose:function(){this.inherited("onClose",arguments);
b()}});k.add(this._stackContextMenu.domNode,this._DROP_DOWN_MENU_CLASS)},_addOverflowIndicator:function(){this._overflowIndicator=h.create("div",{"class":this._OVERFLOW_INDICATOR_CLASS});h.place(this._overflowIndicator,this._breadcrumbBarContainer,"last");this._updateOverflowIndicatorVisibility()},_updateNavigationBarScrollLeft:function(){var a=this._breadcrumbBar,c=a.scrollWidth-a.clientWidth;this._navigationMaxScrollLeft!==c&&(this._navigationMaxScrollLeft=a.scrollLeft=c)},_removeBreadcrumbBarContainer:function(){this._breadcrumbBarContainer&&
(this._breadcrumbBarContainerMouseListener.remove(),this._breadcrumbBarContainerMouseListener=null,this._callStackButtonListeners.forEach(function(a){a.remove()}),this._callStackButtonListeners=[],this._callStackButtonTooltip.destroy(),this._callStackButtonTooltip=null,this._stepOutButtonListeners.forEach(function(a){a.remove()}),this._stepOutButtonListeners=[],this._stepOutButtonTooltip.destroy(),this._stepOutButtonTooltip=null,h.destroy(this._stepOutButton),this._stepOutButton=null,this._destroyBreadcrumbTooltips(),
this._destroyStackMenuItems(),this._stackContextMenu.destroy(),this._stackContextMenu=null,this._callStackButton&&(e.hide(this._callStackButton),this._callStackButton=null),h.destroy(this._overflowIndicator),h.destroy(this._disablementOverlay),this._breadcrumbBar.removeChild(this._navigationBar.domNode),h.destroy(this._breadcrumbBar),h.destroy(this._breadcrumbBarContainer),this._currentFrameDiv=this._breadcrumbBarContainer=this._breadcrumbBar=this._disablementOverlay=this._overflowIndicator=null)},
_updateOverflowIndicatorVisibility:function(){var a=this._breadcrumbBar,c=a.scrollLeft;k.toggle(this._overflowIndicator,this._DISABLED_CLASS,!(a.clientWidth<a.scrollWidth&&c>=this._OVERFLOW_TOLERANCE))},_openStackMenu:function(c){this._destroyStackMenuItems();var b=this._model.getActiveWorkspaceIndex();this._getPrunedStackFramesFromModel().forEach(function(c,d){var e=new u({text:c.getName()});this._menuItemClickListeners.push(e.on("click",a.hitch(this,function(){b!==d&&this._changeWorkspaceCallback(d)})));
k.toggle(e.domNode,this._IS_ACTIVE_CLASS,b===d);k.add(e.domNode,this._DROP_DOWN_MENU_ITEM_CLASS);this._stackContextMenu.addChild(e)},this);c=c.getBoundingClientRect();this._stackContextMenu.open({x:c.right,y:c.bottom+this._DROP_DOWN_MENU_OFFSET_Y})},_destroyStackMenuItems:function(){this._menuItemClickListeners.forEach(function(a){a.remove()});this._menuItemClickListeners=[];var a=this._stackContextMenu;a.getChildren().forEach(function(c){c.destroy();a.removeChild(c)})},onStepOutHover:function(){},
onStepOutHoverAway:function(){},_getPrunedStackFramesFromModel:function(){var a=this._model.getStackFrames();return this._isLiveEditorEval?a.slice(0,-1):a},hideStackBar:function(){this._hideTray(a.hitch(this,"_removeBreadcrumbBarContainer"))},_showTray:function(){switch(this._trayState){case this._TRAY_STATES.HIDDEN:this._borderContainer.addWithProperties(this._breadcrumbBarTray,{region:this._TOP_REGION,maxSize:this._TRAY_MAX_HEIGHT,isResizable:!1,layoutOrder:0});this._borderContainer.setFreeDimension("top",
this._TRAY_MIN_HEIGHT);this._breadcrumbBarTray.startup();this._animateShowTray();break;case this._TRAY_STATES.DISAPPEARING:this._currentTrayAnimation.stop(),this._animateShowTray()}},_animateShowTray:function(){this._trayState=this._TRAY_STATES.APPEARING;this._currentTrayAnimation=b.animateProperty({node:this._breadcrumbBarTray.domNode,duration:this._BREADCRUMB_BAR_TRAY_ANIM_DURATION,easing:m.quadInOut,properties:{height:this._TRAY_MAX_HEIGHT},onAnimate:a.hitch(this,"_resizeDuringAnimation"),onEnd:a.hitch(this,
function(){this._trayState=this._TRAY_STATES.VISIBLE;this._currentTrayAnimation=null})}).play()},_hideTray:function(a){switch(this._trayState){case this._TRAY_STATES.VISIBLE:this._animateHideTray(a);break;case this._TRAY_STATES.APPEARING:this._currentTrayAnimation.stop(),this._animateHideTray(a)}},_animateHideTray:function(c){this._trayState=this._TRAY_STATES.DISAPPEARING;this._currentTrayAnimation=b.animateProperty({node:this._breadcrumbBarTray.domNode,duration:this._BREADCRUMB_BAR_TRAY_ANIM_DURATION,
easing:m.quadInOut,properties:{height:this._TRAY_MIN_HEIGHT},onAnimate:a.hitch(this,"_resizeDuringAnimation"),onEnd:a.hitch(this,function(){this._borderContainer.removeChild(this._breadcrumbBarTray);this._featureInterface.resize();this._trayState=this._TRAY_STATES.HIDDEN;this._currentTrayAnimation=null;c()})}).play()},_resizeDuringAnimation:function(a){a=parseInt(a.height,10);this._borderContainer.setFreeDimension("top",a);this._featureInterface.resize()}})})},"mw-navigationbar/NavigationBar":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom dojo/Evented dojo/on dojo/query dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-style dijit/_TemplatedMixin dijit/layout/_LayoutWidget dojo/text!./templates/navigationBar.html mw-navigationbar/BreadCrumbsModule mw-navigationbar/ActionToolbar mw-overlay-utils/BusyOverlay ./toolbaractions/BackNavigationAction ./toolbaractions/DataSource ./toolbaractions/ForwardNavigationAction".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v){return g([p,m,d],{templateString:n,constructor:function(a){a=a||{};this.currentLocation=a.currentLocation;this.visitedLocations=[];this._breadCrumbObjectsArray=a.metaData.breadCrumbObjectsArray;this.getChildNodes=a.getChildNodes;this.dataSource=new u;this.metaData=a.metaData;this._userActionsList=a.userActionsList;""!=this.currentLocation&&this.dataSource.addToDataList(this.currentLocation);this.hasChildren=a.metaData&&a.metaData.hasChildren?a.metaData.hasChildren:
!1},postCreate:function(a){this.inherited(arguments);this.currentLocationNode.textContent="";c.set(this.currentLocationNode,"data-tag",this.currentLocation);this._setLocationIcon(this.metaData.locationIcon);this._initializeNavigationActions();this._initializeBreadCrumbsModule();b(this,"rebuildLocationNode",this._rebuildLocationNode);this.busySpinner=new s(s.SIZE.SMALL);b(this.dataSource,"dataSourceMoved",f.hitch(this,function(a){this.navigatingBackOrForward=!0;this.emit("locationChanged",a)}))},startup:function(){this.inherited(arguments);
this.resize()},_setLocationIcon:function(a){this.iconNode.setAttribute("style","background-image: url('"+a+"')");this.iconNode.setAttribute("title",this.currentLocation)},resizeWidget:function(a){this.resize()},_initializeNavigationActions:function(){this._actionsList=[];var a=this._getBackButtonAction(),c=this._getForwardButtonAction();this._actionsList.push(a);this._actionsList.push(c);if(this._userActionsList)for(a=0;a<this._userActionsList.length;a++)this._actionsList.push(this._userActionsList[a]);
this.actionToolbar=new r({actionsList:this._actionsList,navigationBarNode:this.navigationBarNode})},_initializeBreadCrumbsModule:function(){this.breadCrumbsModule=new q({breadCrumbObjectsArray:this._breadCrumbObjectsArray,getChildNodes:this.getChildNodes,hasChildren:this.hasChildren});b(this.breadCrumbsModule,"locationChanged",f.hitch(this,function(a){this.navigatingBackOrForward=!1;this.emit("locationChanged",a)}));k.place(this.breadCrumbsModule.breadCrumbsParentNode,this.currentLocationNode)},_getBackButtonAction:function(){return new t({dataSource:this.dataSource})},
_getForwardButtonAction:function(){return new v({dataSource:this.dataSource})},getCurrentLocation:function(){return this.currentLocation},setCurrentLocation:function(a,b){this.currentLocation=a;this.hasChildren=b.hasChildren;this.metaData.locationIcon=b.locationIcon;var d=this.breadCrumbsModule.buildLocationNode(b.breadCrumbObjectsArray,b.hasChildren);c.set(this.currentLocationNode,"data-tag",this.currentLocation);k.place(d,this.currentLocationNode);this._setLocationIcon(b.locationIcon);this.getChildNodes&&
this.breadCrumbsModule.menu.isMenuOpen()&&this.breadCrumbsModule.closeBreadCrumbMenu();this.navigatingBackOrForward||this.dataSource.addToDataList(a);this.navigatingBackOrForward=!1;this.dataSource.deferred&&!this.dataSource.deferred.isResolved()&&this.dataSource.deferred.resolve(a)},_rebuildLocationNode:function(){var a=this.breadCrumbsModule.rebuildLocationNode(this.hasChildren);k.place(a,this.currentLocationNode);this.isBusy&&this.removeBusyMode()},isNavigatingBackOrForward:function(){return this.navigatingBackOrForward},
reset:function(){this.navigatingBackOrForward=!1;this.dataSource.setOldLocationNode()},showBusyAffordance:function(){this.isBusy=!0;this._showSpinnerInIconNode()},removeBusyMode:function(){this.isBusy=!1;this._removeSpinnerInIconNode()},_showSpinnerInIconNode:function(){this._setLocationIcon("");this.busySpinner.set("target",this.iconNode);this.busySpinner.show()},_removeSpinnerInIconNode:function(){this.busySpinner&&this.busySpinner.hide();this._setLocationIcon(this.metaData.locationIcon)},shouldClearEditMode:function(){return!this.isSearchInProgress}})})},
"mw-navigationbar/BreadCrumbsModule":function(){define("dojo/_base/declare dojo/_base/Deferred dojo/_base/lang dojo/dom dojo/dom-attr dojo/dom-construct dojo/dom-class dojo/Evented dojo/keys dojo/on dojo/dom-style dijit/popup mw-menu/Menu mw-menu/MenuItem mw-form/SplitButton".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r){return g([h],{constructor:function(b){this.breadCrumbObjectsArray=b.breadCrumbObjectsArray;this.breadCrumbsParentNode=a.create("div");c.add(this.breadCrumbsParentNode,"breadCrumbsParentNode");
this.getChildNodes=b.getChildNodes;this._hasDynamicMenu="function"===typeof b.getChildNodes;this.buildLocationNode(this.breadCrumbObjectsArray,b.hasChildren);this.menu=new n({style:"display: none;"})},rebuildLocationNode:function(a){return this.buildLocationNode(this.breadCrumbObjectsArray,a)},buildLocationNode:function(c,b){this.breadCrumbObjectsArray=c;a.empty(this.breadCrumbsParentNode);return this._renderBreadCrumbs(this.breadCrumbObjectsArray,b)},_renderBreadCrumbs:function(c,b){if(0<c.length){for(var d=
0;d<c.length;d++){var e=this._buildBreadCrumbs(c[d]);d===c.length-1&&!b&&a.destroy(e.focusNode);e.startup();e.placeAt(this.breadCrumbsParentNode)}return this.breadCrumbsParentNode}},_buildBreadCrumbs:function(a){var d=new r({hasDynamicMenu:this._hasDynamicMenu});d.set("text",a.textToDisplay);b.set(d.domNode,"data-test-id",a.textToDisplay);d.on("click",e.hitch(this,function(a){a.stopPropagation();a.preventDefault();a=dijit.registry.getEnclosingWidget(a.target).domNode.getAttribute("path");this.emit("locationChanged",
a)}));this._hasDynamicMenu&&this._setArrowNodeListeners(d);c.add(d.arrowIconNode,"arrowIconNode");c.add(d.dropDownNode,"breadCrumbDropDownNode");b.set(d.domNode,"path",a.pathToNavigateOnClick);return d},_setArrowNodeListeners:function(a){a.on("blur",e.hitch(a,function(){c.add(this.arrowIconNode,"arrowIconNode")}));a.on("dropdownclick",e.hitch(this,function(a){a=dijit.registry.getEnclosingWidget(a.target);this._toggleDropdownState(a)}))},_toggleDropdownState:function(a){a.arrowIconNode.classList.contains("arrowIconNode")?
(0<this.menu.getChildren().length&&this.menu.isMenuOpen()&&this.closeBreadCrumbMenu(),this._switchButtonToDropDownState(a)):this._switchButtonToNormalState(a)},closeBreadCrumbMenu:function(){p.close(this.menu)},_switchButtonToNormalState:function(a){a=a.arrowIconNode;c.remove(a,"downArrowIconNode");c.add(a,"arrowIconNode")},_switchButtonToDropDownState:function(a){var b=a.arrowIconNode;c.remove(b,"arrowIconNode");c.add(b,"downArrowIconNode");this._populateMenuItems(a)},_listSub:function(a,b){if(0<
b.length&&!a.arrowIconNode.classList.contains("arrowIconNode")){this.menu.destroyDescendants();for(var d=this,h=0;h<b.length;h++){var f=new q({text:b[h].label,path:b[h].path,icon:"iconMenuDropdown"});m.set(f.iconNode,"background-image","url(' "+b[h].icon+"')");f.set("data-tag",b[h].label);c.add(f.domNode,"navBarDropDownMenu");var k=a.domNode.getAttribute("path");this._highlightMenuItemIfItIsInCurrentLocation(k,f);f.on("click",e.hitch(f,function(a){a=dijit.registry.getEnclosingWidget(a.target);d.emit("locationChanged",
a.path)}));this.menu.addChild(f)}this.menu.on("close",e.hitch(a,function(){c.remove(a.arrowIconNode,"downArrowIconNode");c.add(a.arrowIconNode,"arrowIconNode")}));a.set("menu",this.menu);a.set("aroundNode",a.dropDownNode);a.showMenu()}},_highlightMenuItemIfItIsInCurrentLocation:function(a,b){for(var d=0;d<this.breadCrumbObjectsArray.length;d++)this.breadCrumbObjectsArray[d].pathToNavigateOnClick===a&&this.breadCrumbObjectsArray[d+1]&&this.breadCrumbObjectsArray[d+1].pathToNavigateOnClick===b.path&&
c.add(b.textNode.getElementsByClassName("mwTextLine")[0],"highlightMenuItem")},_populateMenuItems:function(a){var c=this.getChildNodes({path:a.domNode.getAttribute("path")}),b=this;c.path=a.domNode.getAttribute("path");this.context=c;f.when(c.listFolderComplete,function(c){if(a.arrowIconNode.classList.contains("downArrowIconNode"))return b._listSub(a,c.folders),c})}})})},"mw-navigationbar/ActionToolbar":function(){define("dojo/_base/declare dojo/dom dojo/dom-construct dojo/dom-class dojo/on dojo/dom-attr".split(" "),
function(g,f,e,d,b,a){return g([],{constructor:function(c){c=c||{};this._actionsList=c.actionsList;this.navigationBarNode=c.navigationBarNode;this.actionToolbarContainer=e.create("div");d.add(this.actionToolbarContainer,"actionToolbarContainerNode");this.navigationBarNode.appendChild(this.actionToolbarContainer);e.place(this.actionToolbarContainer,this.navigationBarNode,"first");var h=this;this._actionsList.forEach(function(c){var f=e.create("div");h[c.id]=c;b(f,"click",function(a){c.callback(h)});
d.add(f,c.actionClass);a.set(f,"title",c.text);c.disabled?(f.setAttribute("enabled","false"),d.remove(f,"actionEnabled"),d.add(f,"actionDisabled")):(f.setAttribute("enabled","true"),d.add(f,"actionEnabled"),d.remove(f,"actionDisabled"));c.node=f;h.actionToolbarContainer.appendChild(f)})}})})},"mw-navigationbar/toolbaractions/BackNavigationAction":function(){define("dojo/_base/declare dojo/aspect dojo/_base/Deferred dojo/dom-class dojo/on dojo/query dojo/_base/lang ./Action dojo/i18n!../l10n/nls/navigationBar".split(" "),
function(g,f,e,d,b,a,c,h,k){return g([h],{constructor:function(a){a=a||{};this.dataSource=a.dataSource;this.id="backButtonWidget";this.enabled=!1;this.actionClass="navBarBackButton";this.text=k.back;this.callback=c.hitch(this,function(a){this.enabled&&this.dataSource.goBack()});b(this.dataSource,"dataSourceUpdated",c.hitch(this,function(a){this._updateBackButton(a)}))},_updateBackButton:function(a){null!==a.prevNode?(this.enabled=!0,this.node.setAttribute("enabled","true"),d.remove(this.node,"actionDisabled"),
d.add(this.node,"actionEnabled")):(this.enabled=!1,this.node.setAttribute("enabled","false"),d.remove(this.node,"actionEnabled"),d.add(this.node,"actionDisabled"))}})})},"mw-navigationbar/toolbaractions/Action":function(){define(["dojo/_base/declare","dojo/_base/lang"],function(g,f){return g(null,{id:"",text:"",actionClass:"",enabled:function(){return!1},constructor:function(e){f.mixin(this,e)},callback:function(){}})})},"mw-navigationbar/toolbaractions/DataSource":function(){define("dojo/_base/declare dojo/_base/Deferred dojo/when dojo/_base/lang dojo/Evented ./LocationNode".split(" "),
function(g,f,e,d,b,a){return g([b],{constructor:function(a){this.dataList=[];this.locked=!1},addToDataList:function(c){c=new a({val:c});0===this.dataList.length?this.dataList.push(c):(c.prev=this.currentNode,this.currentNode.next=c);this.currentNode=c;this._notify()},goBack:function(){this.oldLocation=this.currentNode;this.emit("dataSourceMoved",this.currentNode.prev.value);this._updateCurrentNode(this.currentNode.prev)},goForward:function(){this.oldLocation=this.currentNode;this.emit("dataSourceMoved",
this.currentNode.next.value);this._updateCurrentNode(this.currentNode.next)},_updateCurrentNode:function(a){this.currentNode=a;this.deferred=new f;this._notify(a);e(this.deferred.promise,function(a){this._notify()}.bind(this))},_notify:function(){this.emit("dataSourceUpdated",{nextNode:this.currentNode.next,prevNode:this.currentNode.prev})},setOldLocationNode:function(){this.currentNode=this.oldLocation;this._notify()}})})},"mw-navigationbar/toolbaractions/LocationNode":function(){define(["dojo/_base/declare"],
function(g){return g([],{constructor:function(f){this.value=f.val;this.next=this.prev=null}})})},"mw-navigationbar/toolbaractions/ForwardNavigationAction":function(){define("dojo/_base/declare dojo/aspect dojo/_base/Deferred dojo/dom-class dojo/on dojo/query dojo/_base/lang ./Action dojo/i18n!../l10n/nls/navigationBar".split(" "),function(g,f,e,d,b,a,c,h,k){return g([h],{constructor:function(a){a=a||{};this.dataSource=a.dataSource;this.id="forwardButtonWidget";this.actionClass="navBarForwardButton";
this.enabled=!1;this.text=k.forward;this.callback=c.hitch(this,function(a){this.enabled&&this.dataSource.goForward()});b(this.dataSource,"dataSourceUpdated",c.hitch(this,function(a){this._updateForwardButton(a)}))},_updateForwardButton:function(a){null!==a.nextNode?(this.enabled=!0,this.node.setAttribute("enabled","true"),d.remove(this.node,"actionDisabled"),d.add(this.node,"actionEnabled")):(this.enabled=!1,this.node.setAttribute("enabled","false"),d.remove(this.node,"actionEnabled"),d.add(this.node,
"actionDisabled"))}})})},"MW/rtc/plugins/descriptivetooltip/DescriptiveTooltip":function(){define("dijit/Destroyable dijit/Tooltip dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/on MW/rtc/plugins/view/tooltip/TooltipUtilities".split(" "),function(g,f,e,d,b,a,c){return e(g,{_TOOLTIP_WRAPPER_CLASS:"rtcDescriptiveTooltip",_TOOLTIP_DESCRIPTION_CLASS:"detailedDescription",_TOOLTIP_SHORTCUT_INFO_CLASS:"shortcutInfo",_TOOLTIP_KEY_BINDING_CLASS:"keyBinding",_TOOLTIP_DELAY:400,constructor:function(c){if(!c.targetNode||
!c.label)throw Error("Required arguments not provided");this._targetNode=c.targetNode;var b=this._buildMessage(c.label,c.description,c.cssClasses,c.keyBinding);this.own(a(this._targetNode,"mouseenter",d.hitch(this,"_showTooltip",b,c.additionalDelay?this._TOOLTIP_DELAY+c.additionalDelay:this._TOOLTIP_DELAY)));this.own(a(this._targetNode,"mouseleave",d.hitch(this,"_hideTooltip")));this.own(a(this._targetNode,"click",d.hitch(this,"_hideTooltip")));this._tooltipTimer=null},_showTooltip:function(a,c){this._tooltipTimer&&
clearTimeout(this._tooltipTimer);this._tooltipTimer=setTimeout(d.hitch(this,function(){f.show(a,this._targetNode,["below","above"])}),c)},_hideTooltip:function(){clearTimeout(this._tooltipTimer);this._tooltipTimer=null;f.hide(this._targetNode)},_buildMessage:function(a,c,d,e){e&&(e=b.create("span",{"class":this._TOOLTIP_KEY_BINDING_CLASS,innerHTML:e}),a=b.create("span",{"class":this._TOOLTIP_SHORTCUT_INFO_CLASS,innerHTML:"("+e.outerHTML+")"}).outerHTML+a);c&&(c=b.create("span",{"class":this._TOOLTIP_DESCRIPTION_CLASS,
innerHTML:c}),a=a+"\x3cbr\x3e"+c.outerHTML);return this._wrapTooltipContent(a,d)},_wrapTooltipContent:function(a,d){var e=this._TOOLTIP_WRAPPER_CLASS;d&&(e=e+" "+d);return b.create("div",{"class":e,innerHTML:c.createUnfocusableTooltipTextHTML(a)}).outerHTML},destroy:function(){this.inherited(arguments);this._hideTooltip()}})})},"MW/rtc/plugins/view/tooltip/TooltipUtilities":function(){define(["dojo/dom-construct","MW/uiframework/FocusManager"],function(g,f){return{createUnfocusableTooltipTextHTML:function(e){e=
g.toDom("\x3cdiv\x3e"+e+"\x3c/div\x3e");f.refuseFocus(e);return e.outerHTML}}})},"MW/rtc/plugins/descriptivetooltip/DescriptiveTooltipUtilities":function(){define(["dojo/dom-construct"],function(g){return{_CODE_FORMAT_CLASS:"codeFormat",styleAsCode:function(f){return g.create("span",{"class":this._CODE_FORMAT_CLASS,textContent:f}).outerHTML}}})},"MW/rtc/plugins/debug/executionarrow/ExecutionArrowDecoratorProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/datamodel/FileBackingStoreUtilities",
"MW/rtc/margin/ExecutionArrowDecorator","MW/rtc/core/provider/PluginProvider"],function(g,f,e,d,b){return g(b,{isApplicable:function(a){return e.isPlainCodeFile(a)},requires:function(){return{isApplicable:["rtc.backingstore"],createInstance:"rtc.editordataservice rtc.linenumberservice rtc.view rtc.featureinterface rtc.document rtc.service.documentloaded".split(" ")}},createInstance:function(a,c,b,e,f,g){return new d(a,c,b,e,f,g)}})})},"MW/rtc/margin/ExecutionArrowDecorator":function(){define("dojo/aspect dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/mouse dojo/_base/declare dojo/_base/lang mw-log/Log MW/rtc/margin/AbstractLineMarginDecorator".split(" "),
function(g,f,e,d,b,a,c,h,k){return a(k,{EXECUTION_ARROW_FEATURE_ID:"matlab.debug.executionarrow",NO_LINE:-1,constructor:function(a,b,d,e,h,f){this._editorDataService=a;this._lineNumberService=b;this._view=d;this._document=h;this._documentLoadedService=f;this._topOfStack=[];this._exitingStack=[];this._inStack=[];this._currentMouseClickPosition=this.NO_LINE;this.own(this._editorDataService.listenTo(this.EXECUTION_ARROW_FEATURE_ID,c.hitch(this,"_updateData")))},_updateData:function(a){this._topOfStack=
a.TOP_OF_STACK;this._inStack=a.IN_STACK;this._exitingStack=a.EXITING_STACK;this.onUpdate()},handleMouseDown:function(a,c){b.isLeft(a)&&(this._currentMouseClickPosition=this._lineNumberService.getCodeLineNumberAtOrBeforeLineNumber(c)-1,this.onUpdate())},handleMouseUp:function(a,c){b.isLeft(a)&&(this._currentMouseClickPosition=this.NO_LINE,this.onUpdate())},handleMouseLeave:function(){this._currentMouseClickPosition!==this.NO_LINE&&(this._currentMouseClickPosition=this.NO_LINE,this.onUpdate())},_mouseClickAtLine:function(a){return this._currentMouseClickPosition===
a},hasLayerForLineNumber:function(a,c){var b=this._lineNumberService.getCodeLineNumberFromLineNumber(a);return 0>b?!1:!this._mouseClickAtLine(b)&&(this._isOnTopOfStack(b-1)||this._isInStack(b-1)||this._isExitingStack(b-1))},_isOnTopOfStack:function(a){return this._doesStackDataIncludeLineNumber(this._topOfStack,a)},_isInStack:function(a){return this._doesStackDataIncludeLineNumber(this._inStack,a)},_isExitingStack:function(a){return this._doesStackDataIncludeLineNumber(this._exitingStack,a)},_doesStackDataIncludeLineNumber:function(a,
c){return-1!==a.indexOf(c)},createDecorationForLineNumber:function(a,c){h.assert(this.hasLayerForLineNumber(a,c),"Unexpected call to ExecutionArrowDecorator createDecorationForLineNumber - which hasLayerForLineNumber returns false");var b=this._lineNumberService.getCodeLineNumberFromLineNumber(a),e=d.create("div");this._applyStyle(e,b,c);return e},_applyStyle:function(a,c,b){var d=[];e.add(a,"commonArrow");d.push("debugging");var h;this._isOnTopOfStack(c-1)?h=this._augmentArrowCssClass("topOfStackArrow",
b):this._isExitingStack(c-1)?h=this._augmentArrowCssClass("exitingStackArrow",b):this._isInStack(c-1)&&(h=this._augmentArrowCssClass("inStackArrow",b));d.push(h);e.add(a,h);this._addTestTag(a,d,c)},_augmentArrowCssClass:function(a,c){return a+(c?"OverBreakpoint":"")},_addTestTag:function(a,c,b){b-=1;b=c&&0<c.length?b+"_"+c.join("_"):b+"_invalid";f.set(a,"data-testid",b)},getWidth:function(){return 15}})})},"MW/rtc/plugins/debug/executionlines/ExecutionLinesPluginProvider":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/debug/executionlines/ExecutionLinesPlugin","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:"rtc.document rtc.cursor debug.documentdebugservices rtc.view.decoration rtc.linenumberservice rtc.embeddedoutputs.linenumbertracker rtc.service.documentloaded".split(" ")}},createInstance:function(d,b,a,c,e,k,g){return new f(d,b,a,c,e,k,g)}})})},"MW/rtc/plugins/debug/executionlines/ExecutionLinesPlugin":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/model/PositionUtilities MW/rtc/model/Range".split(" "),
function(g,f,e,d,b,a){return g(d,{EXECUTION_LINE_CSS:"executionLine",EXECUTION_POINT_CSS:"activeLine",STACK_LINE_CSS:"inStack",_EXECUTION_LINE_LAYER_CSS:"executionLineHighlights",_EXECUTION_LINE_NODE_CSS:"executionLineHighlightLine",constructor:function(a,b,d,g,m,p,n){this._document=a;this._cursor=b;this._documentDebugServices=d;this._decorator=g.createLayerDecorator(this._EXECUTION_LINE_LAYER_CSS,this._EXECUTION_LINE_NODE_CSS);this._lineNumberService=m;this._lineNumberTracker=p;this._documentLoadedService=
n;this._currentStackLineRanges=[];this.own(e.after(this._documentDebugServices,"onStackChanged",f.hitch(this,"_handleStackChanged")));this._drawExecutionLinesAfterDocumentReady()},_handleStackChanged:function(){this._drawExecutionLinesAfterDocumentReady()},_drawExecutionLinesAfterDocumentReady:function(){this._documentLoadedService.whenDocumentLoadedWithText(f.hitch(this,function(){this._drawExecutionLines()}))},_drawExecutionLines:function(){var c=this._documentDebugServices.getStackFrames();this._clearView();
this._deleteCurrentStackLineRanges();this._validStackForFile(c)&&(c.forEach(function(c){if(null!=c.getLineNumber()){var b=c.getLineNumber()-1,d=this._getCurrentLineNumberFromPreExecutionLineNumber(b);this._stackLineAlreadyHighlighted(d)||(b=this._document.createPositionAtLineColumn(d,0),d=this._document.createPositionAtLineColumn(d,0,!0),b=new a(b,d),d=[this.EXECUTION_LINE_CSS],c.isExecutionPoint()?d.push(this.EXECUTION_POINT_CSS):d.push(this.STACK_LINE_CSS),this._decorator.addClass(b,d),this._currentStackLineRanges.push(b))}},
this),this._decorator.applyChanges())},_getCurrentLineNumberFromPreExecutionLineNumber:function(a){a=this._lineNumberTracker.createPositionFromOldLineNumber(a);var b=a.getLineColumn().line;a.destroy();return b-1},_stackLineAlreadyHighlighted:function(a){var d=!1;a=this._document.createPositionAtLineColumn(a,0);for(var e=0;e<this._currentStackLineRanges.length;e++){var f=this._currentStackLineRanges[e].getStartPosition();if(0===b.comparePositions(f,a)){d=!0;break}}a.destroy();return d},_deleteCurrentStackLineRanges:function(){this._currentStackLineRanges.forEach(function(a){a.destroy()},
this);this._currentStackLineRanges=[]},_validStackForFile:function(a){var b=this._lineNumberService.getNumberOfCodeLines();return!a.some(function(a){if(a.getLineNumber()>b)return!0},this)},_clearView:function(){this._currentStackLineRanges.forEach(function(a){this._decorator.clearRange(a)},this)},_clearViewAndApplyChanges:function(){this._clearView();this._deleteCurrentStackLineRanges();this._decorator.applyChanges()},destroy:function(){this.inherited(arguments);this._clearView();this._deleteCurrentStackLineRanges()}})})},
"MW/rtc/plugins/debug/DatatipPluginProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/datamodel/FileBackingStoreUtilities","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/debug/DataTipPlugin"],function(g,f,e,d,b){return g(d,{isApplicable:function(a){return e.isPlainCodeFile(a)},requires:function(){return{isApplicable:["rtc.backingstore"],createInstance:"rtc.editordataservice rtc.internaldocument rtc.view rtc.document matlab.tokens rtc.domnode".split(" ")}},createInstance:function(a,
c,d,e,f,g){return new b(a,c,d,e,f,g)}})})},"MW/rtc/plugins/debug/DataTipPlugin":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/model/DocumentUtilities","MW/rtc/plugins/datatip/DataTipUtilities","MW/rtc/plugins/tooltip/HoverableTooltipPlugin"],function(g,f,e,d,b){return g(b,{_TOOLTIP_PADDING:50,_DATATIP_CSS_CLASS:"datatipElement",constructor:function(a,c,b,d,e,f){this._editorDataService=a;this._internalDocument=c;this._view=b;this._document=d;this._tokenService=e;this._domNode=f},
priority:function(){return 10},getTooltipContent:function(a,c,b){var e=this._tokenService.getTokensData().tokens;(c=d.getValidIdentifierTill(c,this._document,this._internalDocument,e))?this._editorDataService.request("matlab.datatip",{variablename:c.trim()}).then(f.hitch(this,function(c){var e=void 0;(c=c.result)&&(e=d.createTooltipDiv(this._view,"\x3cpre\x3e"+c+"\x3c/pre\x3e",a,this._DATATIP_CSS_CLASS,this._domNode));b(e,!0)}),function(){b(void 0)}):b(void 0)}})})},"MW/rtc/plugins/debug/DebuggerManagerProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/debug/DebugServicesFactory","MW/rtc/plugins/debug/DebuggerManager"],function(g,f,e,d){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.actionservice","rtc.keyhandler"]}},createInstance:function(b,a){var c=e.getInstance();return new d(b,c,a)}})})},"MW/rtc/plugins/debug/DebuggerManager":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","dojo/i18n!l10n/nls/rtcDebug"],
function(g,f,e,d){return g(null,{DEBUG_CONTINUE_ACTION_ID:"rtc_debug_continue",DEBUG_STEP_ACTION_ID:"rtc_debug_step",DEBUG_STEP_IN_ACTION_ID:"rtc_debug_step_in",DEBUG_STEP_OUT_ACTION_ID:"rtc_debug_step_out",DEBUG_QUIT_ACTION_ID:"rtc_debug_quit",constructor:function(b,a,c){this._actionService=b;this._debuggerActions=a;this._keyHandler=c;this._createActions();this._addAdditionalKeyBindings()},_createActions:function(){var b=[{id:this.DEBUG_CONTINUE_ACTION_ID,enabled:!0,key:"f5",platformKey:{mac:"f5"},
shortcut:d.debugContinueShortcut,text:d.debugContinueLabel,description:d.debugContinueDescription,callback:f.hitch(this,"_debugActionCallback",f.hitch(this._debuggerActions,"debugContinue"))},{id:this.DEBUG_STEP_ACTION_ID,enabled:!0,key:"f10",platformKey:{mac:"f10"},text:d.debugStepLabel,shortcut:d.debugStepShortcut,description:d.debugStepDescription,callback:f.hitch(this,"_debugActionCallback",f.hitch(this._debuggerActions,"debugStep"))},{id:this.DEBUG_STEP_IN_ACTION_ID,enabled:!0,key:"f11",platformKey:{mac:"f11"},
text:d.debugStepInLabel,shortcut:d.debugStepInShortcut,description:d.debugStepInDescription,callback:f.hitch(this,"_debugActionCallback",f.hitch(this._debuggerActions,"debugStepIn"))},{id:this.DEBUG_STEP_OUT_ACTION_ID,enabled:!0,key:"shift_f11",platformKey:{mac:"shift_f11"},text:d.debugStepOutLabel,shortcut:d.debugStepOutShortcut,description:d.debugStepOutDescription,callback:f.hitch(this,"_debugActionCallback",f.hitch(this._debuggerActions,"debugStepOut"))},{id:this.DEBUG_QUIT_ACTION_ID,enabled:!0,
key:"shift_f5",platformKey:{mac:"shift_f5"},text:d.debugExitLabel,shortcut:d.debugExitShortcut,description:d.debugExitDescription,callback:f.hitch(this,"_debugActionCallback",f.hitch(this._debuggerActions,"debugExit"))}];this._actionService.loadActions(b)},_debugActionCallback:function(b){return this._debuggerActions.isDebugging?(b(),!0):!1},_addAdditionalKeyBindings:function(){this._keyHandler.addBindings([{platformKey:{mac:"meta_alt_r"},action:this.DEBUG_CONTINUE_ACTION_ID},{platformKey:{mac:"meta_shift_o"},
action:this.DEBUG_STEP_ACTION_ID},{platformKey:{mac:"meta_shift_i"},action:this.DEBUG_STEP_IN_ACTION_ID},{platformKey:{mac:"meta_shift_u"},action:this.DEBUG_STEP_OUT_ACTION_ID}])}})})},"MW/rtc/plugins/debug/DebugLineAutoScrollPluginProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/debug/DebugLineAutoScrollPlugin","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.view",
"debug.linefocus"]}},createInstance:function(d,b){return new f(d,b)}})})},"MW/rtc/plugins/debug/DebugLineAutoScrollPlugin":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin"],function(g,f,e,d){return g(d,{_PERCENT_TO_SCROLL_TO:0.25,_CURSOR_CHANGE_PERIOD:100,constructor:function(b,a){this._view=b;this._debugLineFocus=a;this._layoutListener=this._timeout=null;this.own(e.after(this._debugLineFocus,"onCursorMove",f.hitch(this,"_handleOnCursorMove"),
!0))},_handleOnCursorMove:function(b,a){this._stopForcingScroll();this._scrollToLineColumn(b,a);this._startForcingScroll(b,a);this._timeout=setTimeout(this._stopForcingScroll.bind(this),this._CURSOR_CHANGE_PERIOD)},_startForcingScroll:function(b,a){this._layoutListener=e.after(this._view,"onLayoutChange",f.hitch(this,function(c){this._scrollToLineColumn(b,a)}))},_stopForcingScroll:function(){this._timeout&&(clearTimeout(this._timeout),this._timeout=null);this._layoutListener&&(this._layoutListener.remove(),
this._layoutListener=null)},_scrollToLineColumn:function(b,a){var c=this._view.getClientHeight()*this._PERCENT_TO_SCROLL_TO;this._view.scrollLineColumnIntoView(b,a,c)},destroy:function(){this._stopForcingScroll()}})})},"MW/rtc/plugins/debug/DebugLineFocusPluginProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/debug/DebugLineFocusPlugin","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:"rtc.cursor debug.documentdebugservices rtc.embeddedoutputs.linenumbertracker rtc.view.viewportopenedservice rtc.indentutilities rtc.cursorcontroller".split(" ")}},
createInstance:function(d,b,a,c,e,k){return new f(d,b,a,c,e,k)}})})},"MW/rtc/plugins/debug/DebugLineFocusPlugin":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin"],function(g,f,e,d){return g(d,{constructor:function(b,a,c,d,k,g){this._cursor=b;this._documentDebugServices=a;this._lineNumberTracker=c;this._viewportOpenedService=d;this._indentUtilities=k;this._cursorController=g;this.own(e.after(this._documentDebugServices,"onStackChanged",f.hitch(this,
"_moveCursorAndScrollToLineOnDocumentReady")));this._moveCursorAndScrollToLineOnDocumentReady()},_moveCursorAndScrollToLineOnDocumentReady:function(){this._viewportOpenedService.whenViewportOpenedWithContent(this._moveCursorAndScrollToLine.bind(this))},_moveCursorAndScrollToLine:function(){var b=this._documentDebugServices.getActiveWorkspace();null===b||null===b.getLineNumber()||(b=b.getLineNumber(),b=this._getLineColumnInfoToGoTo(b),this._cursorController.clearSelection(),this._cursor.setLineColumn(b.line+
1,b.column+1),this.onCursorMove(b.line+1,b.column+1))},onCursorMove:function(b,a){},_getLineColumnInfoToGoTo:function(b){b=this._lineNumberTracker.getNewLineNumberFromOldLineNumber(b-1);var a=this._indentUtilities.findFirstNonWhitespaceTokenInLine(b);return a?a.getPositionInfo():{line:b,column:0}}})})},"MW/rtc/plugins/debug/DebugStackModelProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/debug/DebugStackModel","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},
requires:function(){return{isApplicable:[],createInstance:["rtc.embeddedoutputs.statehandler"]}},createInstance:function(d){return new f(d)}})})},"MW/rtc/plugins/debug/DebugStackModel":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/plugins/debug/DebugServicesFactory MW/rtc/plugins/debug/DebugStackFrame MW/rtc/plugins/debug/DebugStackUtilities MW/rtc/plugins/debug/PersistentStackModelFactory".split(" "),function(g,f,e,d,b,a,c,h){return g(d,{constructor:function(a){this._debugServices=
b.getInstance();this._persistentStackModel=h.getInstance();this._stateHandler=a;this._stackFrames=[];this.own(e.after(this._persistentStackModel,"onModelUpdated",f.hitch(this,"_handleStackChanged"),!0));this.own(e.after(this._debugServices,"onDBCont",f.hitch(this,"_handleDbCont")));this.own(e.after(this._debugServices,"onDebugModeChanged",f.hitch(this,"_handleDebugMode"),!0));this.own(e.after(this._stateHandler,"stateChanged",f.hitch(this,"_stateChangeListener"),!0))},getStackFrames:function(){return this._stackFrames},
getExecutionPoint:function(){return c.getExecutionPointFrame(this._stackFrames)},onModelUpdated:function(){},_stateChangeListener:function(a){a===this._stateHandler.CHANGE_TYPE_ENUM.EVAL_INITIALIZED&&this._reset()},_handleDebugMode:function(a){a||this._reset()},_handleDbCont:function(){this._reset()},_handleStackChanged:function(){this._clearStackFrames();this._stackFrames=this._persistentStackModel.getStackFrames();this.onModelUpdated()},_reset:function(){this._clearStackFrames();this.onModelUpdated()},
_clearStackFrames:function(){this._stackFrames=[]}})})},"MW/rtc/plugins/debug/DebugStackUtilities":function(){define([],function(){return{getActiveWorkspaceFrame:function(g){for(var f=0;f<g.length;f+=1){var e=g[f];if(e.isActiveWorkspace())return e}return null},getExecutionPointFrame:function(g){for(var f=0;f<g.length;f+=1){var e=g[f];if(e.isExecutionPoint())return e}return null}}})},"MW/rtc/plugins/debug/DocumentDebugServicesProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/debug/DocumentDebugServices",
"MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["debug.stack.model","rtc.backingstore"]}},createInstance:function(d,b){return new f(d,b)}})})},"MW/rtc/plugins/debug/DocumentDebugServices":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/datamodel/FileBackingStore MW/rtc/plugins/debug/DebugServicesFactory MW/rtc/plugins/debug/DebugStackUtilities".split(" "),
function(g,f,e,d,b,a,c){return g(d,{constructor:function(c,b){this._debugServices=a.getInstance();this._debugStackModel=c;this._backingStore=b;this._documentStackFrames=[];this.own(e.after(this._debugStackModel,"onModelUpdated",f.hitch(this,"_handleStackModelUpdate"),!0));this.own(e.after(this._debugServices,"onDBStop",f.hitch(this,"_handleOnDBStop"),!0));this._hasFileBackingStore()&&this.own(e.after(this._backingStore,"onFilePathUpdated",f.hitch(this,"_handleFilePathUpdated")))},getStackFrames:function(){return this._documentStackFrames},
getExecutionPoint:function(){return c.getExecutionPointFrame(this._documentStackFrames)},getActiveWorkspace:function(){return c.getActiveWorkspaceFrame(this._documentStackFrames)},_handleStackModelUpdate:function(){var a=this._debugStackModel.getStackFrames().filter(function(a){if(this._hasFileBackingStore()&&a.getFullPath()===this._backingStore.getAbsoluteFilePath())return a},this);if(0!==a.length||0!==this._documentStackFrames.length)this._documentStackFrames=a,this.onStackChanged(this._documentStackFrames)},
_handleFilePathUpdated:function(){this._handleStackModelUpdate()},onStackChanged:function(a){},_handleOnDBStop:function(a,c){if(this._backingStore.getAbsoluteFilePath()===a)this.onDBStop(a,c)},onDBStop:function(a,c){},_hasFileBackingStore:function(){return this._backingStore instanceof b}})})},"MW/rtc/plugins/debug/DocumentLoadedServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/debug/DocumentLoadedService","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},
requires:function(){return{isApplicable:[],createInstance:["rtc.internaldocument","rtc.document"]}},createInstance:function(d,b){return new f(d,b)}})})},"MW/rtc/plugins/debug/DocumentLoadedService":function(){define("dojo/aspect dojo/Deferred dojo/_base/declare dojo/has dojo/_base/lang MW/rtc/abstract/AbstractPlugin".split(" "),function(g,f,e,d,b,a){return e(a,{constructor:function(a,d){this._internalDocument=a;this._document=d;this._isLoaded=!1;this._promise=new f;this._listeners=[g.after(this._internalDocument,
"onDocumentChanged",b.hitch(this,"_handleDocumentChanged")),g.after(this._internalDocument,"onDocumentReset",b.hitch(this,"_handleDocumentReset"))]},whenDocumentLoadedWithText:function(a){this._promise.then(a,function(a){})},onDocumentLoadedWithText:function(){},isDocumentLoadedWithText:function(){return this._isLoaded},_handleDocumentChanged:function(){this._document.getText()&&this._flushEvents()},_handleDocumentReset:function(){this._document.getText()&&this._flushEvents()},_flushEvents:function(){this._isLoaded=
!0;this._promise.resolve();this.onDocumentLoadedWithText();this._cleanupListeners()},_cleanupListeners:function(){this._listeners.forEach(function(a){a.remove()});this._listeners=[]},destroy:function(){this.inherited(arguments);this._cleanupListeners();this._promise.reject();this._promise=[]}})})},"MW/rtc/plugins/debug/RunToLineServiceProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/debug/RunToLineService"],function(g,f,e,d){return g(e,
{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.actionservice","matlab.code.mtree.codeblocks","rtc.execution.actions","debug.documentdebugservices","rtc.code.executablelines"]}},createInstance:function(b,a,c,e,f){return new d(b,a,c,e,f)}})})},"MW/rtc/plugins/debug/RunToLineService":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/Deferred MW/rtc/abstract/AbstractPlugin MW/rtc/plugins/execution/RunToLineEventData MW/rtc/plugins/language/matlab/syntax/mtree/codeblocks/BlockType".split(" "),
function(g,f,e,d,b,a,c){return g(b,{constructor:function(a,c,b,d,g){this._actionService=a;this._mtreeCodeBlockService=c;this._executionActions=b;this._documentDebugServices=d;this._executableLineService=g;this._currentFileStackFrames=[];this.own(e.after(this._documentDebugServices,"onStackChanged",f.hitch(this,"_handleStackChanged"),!0));this.own(e.after(this._actionService,"onActionChange",f.hitch(this,"_handleActionChange"),!0))},runToLine:function(c,b){var d=new a(c-1);this._actionService.executeAction(b,
d)},onActionEnablementChanged:function(a){},getPossibleAction:function(a){var c=new d;this._mtreeCodeBlockService.whenSynchronized(f.hitch(this,function(){var b=this._getAction(a);c.resolve(b)}));return c},_getAction:function(a){if(!this._executableLineService.isCodeLineExecutable(a))return null;var c=this._actionService.getAction(this._executionActions.RUN_TO_LINE_ACTION_ID);if(c.enabled)return this._mtreeCodeBlockService.isLineInFunction(a)?null:c;c=this._actionService.getAction(this._executionActions.CONTINUE_TO_LINE_ACTION_ID);
return c.enabled&&this._shouldShowContinueForLineNumber(a)?c:null},_shouldShowContinueForLineNumber:function(a){var b=this._mtreeCodeBlockService.getInnermostBlockOfType(a,c.FUNCTION_DEFINITION),b=this._getCurrentStackFrameLineNumbersInSameWorkspace(a,b);return 0<b.length?b.some(function(c){return this._isContinueToLineBelowStackFrameLine(a,c)},this):!1},_getCurrentStackFrameLineNumbersInSameWorkspace:function(a,c){var b=[];this._currentFileStackFrames.forEach(function(a){a=a.getLineNumber();this._isStackFrameInSameWorkspace(a,
c)&&b.push(a)},this);return b},_isStackFrameInSameWorkspace:function(a,c){return null===c?!this._mtreeCodeBlockService.isLineInFunction(a):this._isStackFrameInSameFunctionBlock(a,c)},_isStackFrameInSameFunctionBlock:function(a,b){var d=this._mtreeCodeBlockService.getInnermostBlockOfType(a,c.FUNCTION_DEFINITION);return null===d?!1:d.id===b.id},_isContinueToLineBelowStackFrameLine:function(a,c){return c<a},_handleStackChanged:function(a){this._currentFileStackFrames=a},_handleActionChange:function(a){var c=
"enabled"===a.key;if((a.id===this._executionActions.RUN_TO_LINE_ACTION_ID||a.id===this._executionActions.CONTINUE_TO_LINE_ACTION_ID)&&c)this.onActionEnablementChanged(a.newValue)}})})},"MW/rtc/plugins/execution/RunToLineEventData":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin"],function(g,f){return g(f,{constructor:function(e){this.lineNumber=e}})})},"MW/rtc/plugins/debug/DocumentDirtyDebugServiceProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider",
"MW/rtc/plugins/debug/DebugServicesFactory","MW/rtc/plugins/debug/DocumentDirtyDebugService"],function(g,f,e,d,b){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.document"]}},createInstance:function(a){var c=d.getInstance();return new b(a,c)}})})},"MW/rtc/plugins/debug/DocumentDirtyDebugService":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin"],function(g,f,e,d){return g(d,{constructor:function(b,
a){this._document=b;this._debugServices=a;this._documentDirtiedWhileDebugging=!1;this.own(e.after(this._debugServices,"onDebugModeChanged",f.hitch(this,"_handleDebugModeChanged")));this.own(e.after(this._document,"onChange",f.hitch(this,"_handleDocumentChanged")))},onDocumentDirtiedWhileDebugging:function(){},_handleDebugModeChanged:function(){this._documentDirtiedWhileDebugging=!1},_handleDocumentChanged:function(){this._debugServices.isDebugging&&!this._documentDirtiedWhileDebugging&&(this._documentDirtiedWhileDebugging=
!0,this.onDocumentDirtiedWhileDebugging())}})})},"MW/rtc/plugins/debug/contextualbuttons/ContextualButtonFactoryProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/debug/contextualbuttons/ContextualButtonFactory"],function(g,f,e,d){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:[]}},createInstance:function(){return new d}})})},"MW/rtc/plugins/debug/contextualbuttons/ContextualButtonFactory":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/buttonfactory/ButtonFactory"],function(g,f){return g(f,{_CONTEXTUAL_DEBUG_BUTTON_CSS:"contextualDebugButton",createButton:function(e,d,b){e.push(this._CONTEXTUAL_DEBUG_BUTTON_CSS);return this.inherited(arguments)}})})},"MW/rtc/plugins/debug/contextualbuttons/runtohere/RunToHereViewModelProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/debug/contextualbuttons/runtohere/RunToHereViewModel"],function(g,f,e,d){return g(e,
{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.document","rtc.linenumberservice","debug.contextualbuttons.runtohere.hoverservice","debug.runtolineservice"]}},createInstance:function(b,a,c,e){return new d(b,a,c,e)}})})},"MW/rtc/plugins/debug/contextualbuttons/runtohere/RunToHereViewModel":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-construct MW/rtc/abstract/AbstractPlugin MW/rtc/model/Range MW/rtc/plugins/debug/contextualbuttons/runtohere/RunToHereViewInfo".split(" "),
function(g,f,e,d,b,a,c){return g(b,{constructor:function(a,c,b,d){this._document=a;this._lineNumberService=c;this._codeHoverService=b;this._runToLineService=d;this._promise=null;this.own(e.after(this._codeHoverService,"onMouseEnter",f.hitch(this,"_handleMouseEnteredCode"),!0));this.own(e.after(this._codeHoverService,"onMouseLeave",f.hitch(this,"_handleMouseLeftCode"),!0));this.own(e.after(this._runToLineService,"onActionEnablementChanged",f.hitch(this,"_handleActionEnablementChange"),!0));this.own(e.after(this._document,
"onChange",f.hitch(this,"_cleanup")))},onUpdate:function(a){},onClear:function(){},_handleMouseEnteredCode:function(a){this._promise=this._runToLineService.getPossibleAction(a);this._promise.then(f.hitch(this,"_updateIfActionExists",a),function(){})},_updateIfActionExists:function(a,b){if(b){var d=this._lineNumberService.getLineNumberFromCodeLineNumber(a),e=this._getRangeForLineNumber(d);if(e){var g=f.hitch(this,"_runToHere",a,b.id),d=new c(e,g,b,d);this.onUpdate(d)}}},_getRangeForLineNumber:function(c){var b=
this._document.getLineText(c+1).length;if(0===b)return null;var d=this._document.createPositionAtLineColumn(c,0);c=this._document.createPositionAtLineColumn(c,b);return new a(d,c)},_handleMouseLeftCode:function(a){this._cleanup()},_handleActionEnablementChange:function(a,c){if(!c)this.onClear()},_runToHere:function(a,c){this._runToLineService.runToLine(a,c);this.onClear()},_cleanup:function(){this._promise&&(this._promise.cancel("Destroying"),this._promise=null);this.onClear()},destroy:function(){this.inherited(arguments);
this._cleanup()}})})},"MW/rtc/plugins/debug/contextualbuttons/runtohere/RunToHereViewInfo":function(){define(["dojo/_base/declare","MW/rtc/margin/MarginUtilities"],function(g,f){return g(null,{_CSS_CLASS:"runToHere",_ELEMENT_HEIGHT:18,constructor:function(e,d,b,a){this._range=e;this._callback=d;this._action=b;this._documentLineNumber=a},getRange:function(){return this._range},getCallback:function(){return this._callback},getBasicDescription:function(){return this._action.text||""},getDetailedDescription:function(){return this._action.description||
""},getCSSClasses:function(){return[this._CSS_CLASS]},getPixelsForVerticalAlignment:function(e){return f.getTopForMiddleAlignmentWithLineNumber(e,this._documentLineNumber,this._ELEMENT_HEIGHT)},destroy:function(){this._range&&this._range.destroy()}})})},"MW/rtc/plugins/debug/contextualbuttons/runtohere/RunToHereViewProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/debug/contextualbuttons/runtohere/RunToHereView"],function(g,f,
e,d){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.view","debug.contextualbuttons.runtohere.viewmodel","debug.contextualbuttons.buttonfactory","rtc.view.decoration"]}},createInstance:function(b,a,c,e){return new d(b,a,c,e)}})})},"MW/rtc/plugins/debug/contextualbuttons/runtohere/RunToHereView":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/view/decoration/DecorationUtilities MW/rtc/plugins/descriptivetooltip/DescriptiveTooltip dojo/text!MW/rtc/plugins/debug/css/run_here_14.svg".split(" "),
function(g,f,e,d,b,a,c){return g(d,{_HIDE_DISPLAY_STYLE:"none",_DOM_LOCATION:b.PLACEMENT.BEFORE,_ADDITIONAL_TOOLTIP_DELAY:300,constructor:function(a,c,b,d){this._view=a;this._runToHereViewModel=c;this._contextualButtonFactory=b;this._decorator=d.createDecorator(1);this._currentInfo=this._currentButtonNode=this._tooltip=null;this.own(e.after(this._runToHereViewModel,"onUpdate",f.hitch(this,"_handleUpdate"),!0));this.own(e.after(this._runToHereViewModel,"onClear",f.hitch(this,"_handleClear")))},_handleUpdate:function(a){this._removeCurrentButton();
this._addButton(a);this._currentButtonNode.style.marginTop=a.getPixelsForVerticalAlignment(this._view)+"px";this._decorator.applyChanges()},_handleClear:function(){this._hideCurrentButton()},_addButton:function(b){this._currentInfo=b;this._currentButtonNode=this._contextualButtonFactory.createButton(this._currentInfo.getCSSClasses(),c,null);this._currentButtonNode.addEventListener("animationend",f.hitch(this,"_enableButton",this._currentInfo.getCallback()));this._decorator.addDomNode(this._currentButtonNode,
this._currentInfo.getRange(),this._DOM_LOCATION);this._tooltip=new a({targetNode:this._currentButtonNode,label:this._currentInfo.getBasicDescription(),description:this._currentInfo.getDetailedDescription(),additionalDelay:this._ADDITIONAL_TOOLTIP_DELAY})},_enableButton:function(a){this._currentButtonNode.className+=" enabled";this._currentButtonNode.onclick=a},_removeCurrentButton:function(){this._currentButtonNode&&(this._tooltip&&(this._tooltip.destroy(),this._tooltip=null),this._decorator.removeDomNode(this._currentButtonNode,
this._currentInfo.getRange(),this._DOM_LOCATION),this._currentButtonNode=null,this._currentInfo.destroy(),this._currentInfo=null)},_hideCurrentButton:function(){this._currentButtonNode&&(this._tooltip&&(this._tooltip.destroy(),this._tooltip=null),this._currentButtonNode.style.display=this._HIDE_DISPLAY_STYLE)},destroy:function(){this.inherited(arguments);this._removeCurrentButton()}})})},"MW/rtc/plugins/debug/contextualbuttons/runtohere/hoverservice/RunToHereCodeHoverServiceProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/debug/contextualbuttons/runtohere/hoverservice/RunToHereCodeHoverService"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.view","rtc.internaldocument","rtc.linenumberservice"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/debug/contextualbuttons/runtohere/hoverservice/RunToHereCodeHoverService":function(){define("dojo/aspect dojo/on dojo/_base/declare dojo/_base/lang MW/rtc/abstract/AbstractPlugin MW/rtc/plugins/debug/contextualbuttons/runtohere/hoverservice/LeftMarginCodeHoverUtilities".split(" "),
function(g,f,e,d,b,a){return e(b,{_NO_LINE:-1,constructor:function(a,b,e){this._view=a;this._internalDocument=b;this._lineNumberService=e;this._currentLineNumber=this._NO_LINE;this.own(f(this._view.getDomtarget(),"mousemove",d.hitch(this,"_handleMouseMove")));this.own(f(this._view.getDomtarget(),"mouseleave",d.hitch(this,"_sendMouseLeaveIfNeeded")))},onMouseEnter:function(a){},onMouseLeave:function(a){},_handleMouseMove:function(c){c&&(c=this._view.fixEvent(c),a.shouldHandleMouseMoveEvent(this._view,
this._internalDocument,c)?this._handleHoverOnCodeLine(c):this._sendMouseLeaveIfNeeded())},_handleHoverOnCodeLine:function(a){a=this._view.getPositionFromEvent(a);a=this._lineNumberService.getCodeLineNumberFromLineNumber(a.getLine()-1);a!==this._currentLineNumber&&(this._sendMouseLeaveIfNeeded(),this._currentLineNumber=a,this.onMouseEnter(this._currentLineNumber))},_sendMouseLeaveIfNeeded:function(){this._currentLineNumber!==this._NO_LINE&&(this.onMouseLeave(this._currentLineNumber),this._currentLineNumber=
this._NO_LINE)}})})},"MW/rtc/plugins/debug/contextualbuttons/runtohere/hoverservice/LeftMarginCodeHoverUtilities":function(){define(["dojo/_base/declare","MW/rtc/model/CodeUtilities"],function(g,f){return{_LEFT_BUFFER:0,_RIGHT_OVERLAP:13,shouldHandleMouseMoveEvent:function(e,d,b){b=e.getCoordinateFromEvent(b);var a=e.getLineFromCoordinate(b),a=d.getLineNode(a-1);if(!a||!a.box||!f.isCodeContainer(a))return!1;d=this._isCorrectXPosition(b,a);e=this._isCorrectYPosition(e,b,a);return d&&e},_isCorrectXPosition:function(e,
d){var b=this._LEFT_BUFFER;return e.x<d.box.offsetLeft+this._RIGHT_OVERLAP&&e.x>=b},_isCorrectYPosition:function(e,d,b){var a=e.getNodeTop(b);e=e.getNodeBottom(b);return d.y>=a&&d.y<e}}})},"MW/rtc/plugins/debug/contextualbuttons/stepin/FunctionCallsiteFactoryProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/debug/contextualbuttons/stepin/FunctionCallsiteFactory"],function(g,f,e,d){return g(e,{isApplicable:function(){return!0},
requires:function(){return{isApplicable:[],createInstance:["rtc.editordataservice","rtc.document","rtc.embeddedoutputs.linenumbertracker"]}},createInstance:function(b,a,c){return new d(b,a,c)}})})},"MW/rtc/plugins/debug/contextualbuttons/stepin/FunctionCallsiteFactory":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin","MW/rtc/model/Range","MW/rtc/plugins/debug/contextualbuttons/stepin/FunctionCallsite"],function(g,f,e,d){return g(f,{_STEP_IN_FEATURE_ID:"code.stepinanywhere",
constructor:function(b,a,c){this._editorDataService=b;this._document=a;this._lineNumberTracker=c},_createRange:function(b,a,c){var d=this._lineNumberTracker.getNewLineNumberFromOldLineNumber(a);a=this._document.createPositionAtLineColumn(d,c,!0);if(a.isAtRightEdge()){var f=a.getNode().nextSibling();f&&a.setPosition(f,0)}b=this._document.createPositionAtLineColumn(d,c+b.length,!0);a.setLive(!0);b.setLive(!0);return new e(a,b)},create:function(b,a,c,e){c=this._createRange(b,c,e);return new d(this._editorDataService,
b,a,c)}})})},"MW/rtc/plugins/debug/contextualbuttons/stepin/FunctionCallsite":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin"],function(g,f){return g(f,{_STEP_IN_FEATURE_ID:"code.stepinanywhere",constructor:function(e,d,b,a){this._editorDataService=e;this._functionName=d;this._uniqueId=b;this._range=a;this._performingStepIn=!1},getFunctionName:function(){return this._functionName},getRange:function(){return this._range},getUniqueId:function(){return this._uniqueId},stepIn:function(){this._performingStepIn||
(this._performingStepIn=!0,this._editorDataService.request(this._STEP_IN_FEATURE_ID,{uniqueId:this._uniqueId}))},destroy:function(){this.inherited(arguments);this._range&&this._range.destroy()}})})},"MW/rtc/plugins/debug/contextualbuttons/stepin/StepInManagerProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/debug/DebugServicesFactory","MW/rtc/plugins/debug/contextualbuttons/stepin/StepInManager"],function(g,f,e,d,b){return g(e,
{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.editordataservice","rtc.id","debug.contextualbuttons.stepin.functioncallsitefactory","rtc.service.documentloaded","debug.documentdebugservices"]}},createInstance:function(a,c,e,f,g){var m=d.getInstance();return new b(a,c,e,f,g,m)}})})},"MW/rtc/plugins/debug/contextualbuttons/stepin/StepInManager":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin"],
function(g,f,e,d){return g(d,{_FUNCTION_CALLSITE_QUERY:"code.stepinanywhere.query",constructor:function(b,a,c,d,k,g){this._editorDataService=b;this._editorId=a;this._functionCallsiteFactory=c;this._documentLoadedService=d;this._documentDebugServices=k;this._debugServices=g;this._previousTopOfStack=this._promise=null;this._functionCallsites=[];this.own(e.after(this._documentDebugServices,"onStackChanged",f.hitch(this,"_updateFunctionCallsitesIfAtExecutionPoint")));this.own(e.after(this._debugServices,
"onDBCont",f.hitch(this,"_handleDBCont")))},onFunctionCallsitesUpdated:function(b){},_updateFunctionCallsitesIfAtExecutionPoint:function(){var b=this._documentDebugServices.getExecutionPoint();null!==b&&!this._isSameAsPreviousTopOfStack(b)&&(this._previousTopOfStack=b,b=b.getLineNumber(),this._documentLoadedService.whenDocumentLoadedWithText(f.hitch(this,"_updateFunctionCallsites",b-1)))},_isSameAsPreviousTopOfStack:function(b){return null===this._previousTopOfStack||this._previousTopOfStack.getName()!==
b.getName()||this._previousTopOfStack.getFullPath()!==b.getFullPath()||this._previousTopOfStack.getLineNumber()!==b.getLineNumber()||this._previousTopOfStack.isExecutionPoint()!==b.isExecutionPoint()||this._previousTopOfStack.isLeavingFrame()!==b.isLeavingFrame()?!1:!0},_updateFunctionCallsites:function(b){this._clearFunctionCallsites();0>b||this._addAllNewFunctionCallsites()},_addAllNewFunctionCallsites:function(){this._promise=this._editorDataService.request(this._FUNCTION_CALLSITE_QUERY,{editorId:this._editorId});
this._promise.then(f.hitch(this,function(b){this._promise=null;b.stepInInformation&&(b.stepInInformation.forEach(function(a){this._addFunctionCallsite(a.functionIdentifier,a.uniqueId,a.line,a.column)},this),this.onFunctionCallsitesUpdated(this._functionCallsites))}),f.hitch(this,function(b){}))},_addFunctionCallsite:function(b,a,c,d){b=this._functionCallsiteFactory.create(b,a,c,d);this._functionCallsites.push(b)},_handleDBCont:function(){this._previousTopOfStack=null;this._clearFunctionCallsites()},
_clearFunctionCallsites:function(){this._promise&&(this._promise.cancel("Cancel function callsite query request"),this._promise=null);this._functionCallsites.forEach(function(b){b.destroy()});this._functionCallsites=[];this.onFunctionCallsitesUpdated(this._functionCallsites)},destroy:function(){this.inherited(arguments);this._clearFunctionCallsites()}})})},"MW/rtc/plugins/debug/contextualbuttons/stepin/StepInViewProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider",
"MW/rtc/plugins/debug/contextualbuttons/stepin/StepInView"],function(g,f,e,d){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["debug.contextualbuttons.stepin.manager","debug.contextualbuttons.buttonfactory","rtc.view.decoration"]}},createInstance:function(b,a,c){return new d(b,a,c)}})})},"MW/rtc/plugins/debug/contextualbuttons/stepin/StepInView":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-attr dojo/i18n!l10n/nls/execution dojo/string MW/rtc/abstract/AbstractPlugin MW/rtc/browsersupport/BrowserSupportUtilities MW/rtc/view/decoration/DecorationUtilities MW/rtc/plugins/descriptivetooltip/DescriptiveTooltip MW/rtc/plugins/descriptivetooltip/DescriptiveTooltipUtilities dojo/text!MW/rtc/plugins/debug/css/step_in_14.svg".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p){return g(c,{_CSS_CLASS:"stepIn",_ENABLED_CSS_CLASS:"enabled",_LEFT_IS_NONWHITESPACE_CSS_CLASS:"includeLeftMargin",_DOM_LOCATION:k.PLACEMENT.BETWEEN,constructor:function(a,c,b){this._stepInManager=a;this._contextualButtonFactory=c;this._decorator=b.createDecorator(0,!0);this._buttonsToInfoMap=h.createMap();this.own(e.after(this._stepInManager,"onFunctionCallsitesUpdated",f.hitch(this,"_addButtons"),!0))},_addButtons:function(a){a.forEach(function(a){this._addButton(a)},
this);this._decorator.applyChanges()},_addButton:function(a){var c=a.getRange(),b=a.getFunctionName(),e=[this._CSS_CLASS,this._ENABLED_CSS_CLASS];this._isNonWhitepaceCharacterToLeft(c)&&e.push(this._LEFT_IS_NONWHITESPACE_CSS_CLASS);e=this._contextualButtonFactory.createButton(e,p,f.hitch(a,"stepIn"));d.set(e,"data-testid","stepin_"+b);this._addButtonNode(e,c);a=this._addButtonListener(e,a);b=this._addButtonTooltip(e,b);this._buttonsToInfoMap.set(e,{range:c,destroyListener:a,tooltip:b})},_isNonWhitepaceCharacterToLeft:function(a){a=
a.getStartPosition();var c=a.getColumn()-1;return 0===c?!1:""!==a.getNode().rootContainer().getCodeText().charAt(c-1).trim()},_addButtonNode:function(a,c){this._decorator.addDomNode(a,c,this._DOM_LOCATION)},_addButtonListener:function(a,c){return e.before(c,"destroy",f.hitch(this,"_removeButton",a))},_addButtonTooltip:function(c,d){var e=m.styleAsCode(d);return new l({targetNode:c,label:a.substitute(b.stepInAnywhereLabel,[e]),description:a.substitute(b.stepInAnywhereDescription,[e])})},_removeButton:function(a){var c=
this._buttonsToInfoMap.get(a);c&&(this._removeButtonWithInfo(a,c),this._buttonsToInfoMap.delete(a))},_removeButtonWithInfo:function(a,c){c.destroyListener.remove();c.tooltip.destroy();this._decorator.removeDomNode(a,c.range,this._DOM_LOCATION)},destroy:function(){this.inherited(arguments);this._buttonsToInfoMap.forEach(function(a,c){this._removeButtonWithInfo(c,a)},this);this._buttonsToInfoMap.clear()}})})},"MW/rtc/plugins/device/ios/VirtualKeyboardShortcutBarProvider":function(){define(["dojo/_base/declare",
"dojo/has","MW/rtc/core/provider/PluginProvider","./VirtualKeyboardShortcutBar"],function(g,f,e,d){return g([e],{requires:function(){return{isApplicable:[],createInstance:["rtc.cursor","rtc.keyhandler"]}},isApplicable:function(){return f("ios")},createInstance:function(b,a){return new d(b,a)}})})},"MW/rtc/plugins/device/ios/VirtualKeyboardShortcutBar":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect"],function(g,f,e){return g(null,{REFOCUS_DELAY:0,constructor:function(d,b){this._cursor=
d;this._keyHandler=b;this._handler=e.after(this._cursor,"onUpdate",f.hitch(this,"onCursorUpdate"))},destroy:function(){this._handler.remove();this._timeout&&window.clearTimeout(this._timeout)},onCursorUpdate:function(){var d=this;this._timeout&&window.clearTimeout(this._timeout);this._timeout=window.setTimeout(function(){d._timeout=null;d._doUpdateVirtualKeyboard()},this.REFOCUS_DELAY)},_doUpdateVirtualKeyboard:function(){document.activeElement===this._keyHandler.keyCapture&&this._cursor.hasSelection()!==
this._virtualKeyboardShowsSelection&&this._refocus()},_refocus:function(){this._keyHandler.keyCapture.blur();this._keyHandler.keyCapture.focus();this._virtualKeyboardShowsSelection=0<this._keyHandler.keyCapture.selectionEnd-this._keyHandler.keyCapture.selectionStart}})})},"MW/rtc/plugins/editordataservice/EditorDataServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider"],function(g,f){return g(f,{requires:function(){return{createInstance:["rtc.editordataservicemanager",
"rtc.backingstore","rtc.editordataservice.plugincontainer","rtc.internaldocument","rtc.document"]}},createInstance:function(e,d,b,a,c){this._editorDataSeviceProvider=e.getEditorDataServiceProvider(b?b:[],d,a,c);return this._editorDataSeviceProvider.getEditorDataService()},destroyInstance:function(e){this._editorDataSeviceProvider.dispose()}})})},"MW/rtc/plugins/editordataservice/EditorDataServiceManagerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/editordataservice/EditorDataServiceManagerFactory"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return e.getInstance()},destroyInstance:function(d){}})})},"MW/rtc/editordataservice/EditorDataServiceManagerFactory":function(){define(["MW/rtc/editordataservice/EditorDataServiceManager"],function(g){var f=null;return{getInstance:function(){null===f&&(f=new g);return f}}})},"MW/rtc/editordataservice/EditorDataServiceManager":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect mw-peermodel/PeerModelManager mw-messageservice/MessageService MW/rtc/editordataservice/EditorDataServiceProvider mw-utils/Utils".split(" "),
function(g,f,e,d,b,a,c){return g(null,{_RETRY_TIME_MILLISECONDS:250,_START_MESSAGE:"/editordataservice/start",_STARTED_MESSAGE:"/editordataservice/started/",constructor:function(a){this._isPeerModelInitialized=!1;this._namespace=a;this._mockFeatureDataServices={};this._mockRequestService={};this._namespaceUID={};this._startedInitialization=!1;this._initializationRetryTimer=null;this._messageService=b},_initializeRoot:function(){this._root=this._peerModel.setRoot("root",{one:1})},start:function(){this._initializePeerModel();
this._peerModel.hasRoot()||this._initializeRoot();this._peerModel.isSyncEnabled()||this._peerModel.setSyncEnabled(!0)},_initializePeerModel:function(){this._startedInitialization||(this._startedInitialization=!0,this._namespaceUID=c.generateUuid(),this._peerModel=d.getServerInstance(this._namespace?this._namespace:"/editordataservice/"+this._namespaceUID),this._namespace||(this._messageService.subscribe(this._STARTED_MESSAGE+this._namespaceUID,this._serverSideEditorDataServiceInitialized,this),this._initializeServerSideEditorDataService()))},
_initializeServerSideEditorDataService:function(){this._isPeerModelInitialized?this._initializationRetryTimer=null:(this._messageService.publish(this._START_MESSAGE,this._namespaceUID),this._initializationRetryTimer=setTimeout(f.hitch(this,this._initializeServerSideEditorDataService),this._RETRY_TIME_MILLISECONDS))},_serverSideEditorDataServiceInitialized:function(){!0!==this._isPeerModelInitialized&&(this._messageService.unsubscribe(this._STARTED_MESSAGE+this._namespaceUID,this._serverSideEditorDataServiceInitialized,
this),this._initializationRetryTimer&&(clearTimeout(this._initializationRetryTimer),this._initializationRetryTimer=null),this._isPeerModelInitialized=!0)},stop:function(){this.isInitialized()&&(this._root.destroy(),this._root=null,this._peerModel.setSyncEnabled(!1),this._mockFeatureDataServices={},this._mockRequestService={},this._isPeerModelInitialized=!1,this._namespace="",this._initializeRoot())},isInitialized:function(){return this._isPeerModelInitialized},installMockDataService:function(a,c){this._mockFeatureDataServices[a]=
c},removeMockDataService:function(a){delete this._mockFeatureDataServices[a]},installMockRequestService:function(a,c){this._mockRequestService[a]=c},removeMockRequestService:function(a,c){delete this._mockRequestService[a]},_getMockDataServices:function(){return f.clone(this._mockFeatureDataServices)},_getMockRequestServices:function(){return f.clone(this._mockRequestService)},getEditorDataServiceProvider:function(c,b,d,e){this.start();var f=this._addEditorOpenedNode(b);return new a(f,c,this._getMockDataServices(),
d,e,this._getMockRequestServices(),b)},_addEditorOpenedNode:function(a){return this._root.addChild("editor",{uniqueId:a.getUniqueId()})}})})},"MW/rtc/editordataservice/EditorDataServiceProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","dojo/Deferred","mw-utils/Utils"],function(g,f,e,d,b){return g(null,{PROPERTY_SET_ID:"propertySet",DOCUMENT_STATE_ID_SUFFIX:".documentstate",constructor:function(a,c,b,d,e,f,g){this._peerNode=a;this._mockFeatureDataServices=b;this._document=
e;this._internalDocument=d;this._connections=[];this._mockRequestDataServices=f;this._fullyRegisteredFeatures={};this._registeredClientSideDataServices=[];this._backingStore=g;this._clientSidePlugins={};c.forEach(function(a){this._clientSidePlugins[a.getFeatureId()]=a},this);this._clientSideDataTable={};this._clientSideDataListeners={};this._editorDataServiceBroadcast=this._createDataBroadcastDependency();this._registerDocumentListenerWithNode(d);this._registerFilepathListenerWithNode()},_registerDocumentListenerWithNode:function(a){var c=
f.hitch(this,function(){this._dispatchNewText(this._document)});this._connections.push(e.after(a,"onDocumentChanged",c,!0));this._connections.push(e.after(a,"onDocumentReset",c,!0));this._dispatchNewText(this._document)},_registerFilepathListenerWithNode:function(){var a=f.hitch(this,function(){this._dispatchFileUpdate(this._backingStore)});this._connections.push(e.after(this._backingStore,"onFilePathUpdated",a,!0));this._dispatchFileUpdate(this._backingStore)},_hasMockInstalled:function(a){return this._mockFeatureDataServices.hasOwnProperty(a)},
_dispatchNewText:function(a){var c=a.getCodeText(),b=a.getState();clearTimeout(this._textToServerTimerId);this._textToServerTimerId=setTimeout(f.hitch(this,function(){this._dispatchEventToServer("documentChanged",{data:c,documentState:b})}),200);for(var d in this._mockFeatureDataServices)this._mockFeatureDataServices.hasOwnProperty(d)&&(a=(0,this._mockFeatureDataServices[d])(c,this._document.getState()),this._putDataInFeatureTableAndBroadcastUpdate(d,a),this._peerNode.dispatchEvent(this.PROPERTY_SET_ID,
this._peerNode,this._createMockFeatureMessage(d,a)))},_dispatchFileUpdate:function(a){if(!("function"!==typeof a.getFileName||"function"!==typeof a.getFileLocation)){var c=a.getFileName(),b=a.getFileLocation();clearTimeout(this._pathToServerTimerId);this._pathToServerTimerId=setTimeout(f.hitch(this,function(){this._dispatchEventToServer("filepathChanged",{filename:c,location:b})}),200)}},_putDataInFeatureTableAndBroadcastUpdate:function(a,c){this._peerNode.setProperty(a,c);this._peerNode.setProperty(a+
this.DOCUMENT_STATE_ID_SUFFIX,this._document.getState())},_dispatchEventToServer:function(a,c){this._peerNode.dispatchPeerEvent(a,this._peerNode,c)},_createMockFeatureMessage:function(a,c){return{key:a,newValue:c}},getEditorDataService:function(){var a=this._peerNode,c=f.hitch(this,this._registerFeatureWithNode),e=this.PROPERTY_SET_ID,k=f.hitch(this,this._dispatchEventToServer),g=this._mockRequestDataServices,m=this._fullyRegisteredFeatures,p=f.hitch(this,this._isClientSideRegisteredFeature),n=this._clientSideDataListeners,
q=this._clientSideDataTable;return{listenTo:function(b,d){c(b);var f=function(a){a.type===e&&(a=a.data,a.key===b&&(m[b]=!0,d(a.newValue)))};if(p(b))return n[b]||(n[b]=[]),n[b].push(d),{remove:function(){}};a.addEventListener(e,f);return{remove:function(){a.removeEventListener(e,f)}}},get:function(b){c(b);return p(b)?q[b]:a.getProperty(b)},request:function(e,h,f){c(e);var m=b.generateUuid();h={internalRequestId:m,requestData:h};var n=new d;if(g.hasOwnProperty(e))n.resolve((0,g[e])(h));else{var p=function(c){return function(b){b.data.internalRequestId===
c&&(clearTimeout(y),b.error?n.reject(b.error):n.resolve(b.data),n.isFulfilled()&&a.removePeerEventListener(q,p))}}(m),q=e+".RESPONSE";a.addPeerEventListener(q,p);k(e,h);var y=setTimeout(function(){n.reject("EditorDataService timed out for the feature "+e);a.removePeerEventListener(q,p)},f||5E3)}return n.promise}}},_registerFeatureWithNode:function(a){!this._hasMockInstalled(a)&&(!this.hasFeatureBeenRegisteredWithServer(a)&&!this._isDocumentStateId(a)&&!this._isClientSideRegisteredFeature(a))&&(this._clientSidePlugins[a]?
(this._clientSidePlugins[a].beginBroadcasting(this._editorDataServiceBroadcast),this._appendFeatureToClientSideRegisteredList(a)):this._dispatchEventToServer("registerFeature",{featureId:a}))},_createDataBroadcastDependency:function(){var a=f.hitch(this,this._putDataIntoClientSideTable);return{updateFeatureData:function(c,b){a(c,b)}}},_putDataIntoClientSideTable:function(a,c){this._clientSideDataTable[a]=c;var b=this._clientSideDataListeners[a];b&&b.forEach(function(a){a()})},_isClientSideRegisteredFeature:function(a){return 0<=
this._registeredClientSideDataServices.indexOf(a)},_appendFeatureToClientSideRegisteredList:function(a){this._registeredClientSideDataServices.push(a)},_isDocumentStateId:function(a){return a&&-1!==a.indexOf(this.DOCUMENT_STATE_ID_SUFFIX,a.length-this.DOCUMENT_STATE_ID_SUFFIX.length)},hasFeatureBeenRegisteredWithServer:function(a){return!!this._fullyRegisteredFeatures[a]},dispose:function(){this._connections.forEach(function(a){a.remove()});this._peerNode.destroy()}})})},"MW/rtc/plugins/embeddedoutputs/EmbeddedOutputsDBQuitSaveReadyProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/embeddedoutputs/EmbeddedOutputsDBQuitSaveReady"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.embeddedoutputs.statehandler","rtc.embeddedoutputs.model"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/embeddedoutputs/EmbeddedOutputsDBQuitSaveReady":function(){define(["dojo/aspect","dojo/_base/declare","dojo/_base/lang","MW/rtc/abstract/AbstractPlugin","MW/rtc/abstract/AbstractSynchronizableMixin"],
function(g,f,e,d,b){return f([d,b],{_SAVE_READY_TIMEOUT:1E3,constructor:function(a,c){this._stateHandler=a;this._outputsModel=c;this.markClean();this.own(g.after(this._stateHandler,"onStateChanged",e.hitch(this,"_handleStateChanged"),!0))},_handleStateChanged:function(a){a===this._stateHandler.CHANGE_TYPE_ENUM.EVAL_INITIALIZED?this.markDirty():a===this._stateHandler.CHANGE_TYPE_ENUM.EVAL_COMPLETE&&this._handleEvalEnded()},_handleEvalEnded:function(){this._outputsModel.whenOutputsReady(e.hitch(this,
function(){this.markClean()}));this.setReadyTimeout(this._SAVE_READY_TIMEOUT)}})})},"MW/rtc/abstract/AbstractSynchronizableMixin":function(){define(["dojo/_base/declare","dojo/aspect","dojo/_base/lang","dojo/Deferred"],function(g,f,e,d){return g([],{"-chains-":{destroy:"before"},constructor:function(){this._isReadyState=!1;this._timeout=this._promise=null},whenReady:function(b){this.isReady()?b():(this._promise||(this._promise=new d),this._promise.then(b))},isReady:function(){return this._isReadyState},
markDirty:function(){this._isReadyState=!1},markClean:function(){this._isReadyState=!0;this._promise&&(this._promise.resolve(this),this._promise=null);this._timeout&&(clearTimeout(this._timeout),this._timeout=null)},setReadyTimeout:function(b){this._timeout=setTimeout(e.hitch(this,function(){this._timeout=null;this.markClean()}),b)},destroy:function(){this._promise=null}})})},"MW/rtc/plugins/embeddedoutputs/EvalTextCacheProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/embeddedoutputs/EvalTextCache",
"MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{requires:function(){return{createInstance:["rtc.id","rtc.backingstore","rtc.editordataservice"]}},createInstance:function(d,b,a){return new f(d,b,a)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/embeddedoutputs/EvalTextCache":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin"],function(g,f,e,d){return g(d,{_EVAL_TEXT_CACHE_FEATURE_ID:"matlab.code.evaluationtextcache",
constructor:function(b,a,c){this._backingStore=a;this._editorId=b;this._editorDataService=c;this._editorDataService.request(this._EVAL_TEXT_CACHE_FEATURE_ID,{id:this._editorId,filePath:this._backingStore.getAbsoluteFilePath()}).then(function(){},function(){});this.own(e.after(this._backingStore,"onFilePathUpdated",f.hitch(this,"_handleFilePathUpdated")))},_handleFilePathUpdated:function(){this._editorDataService.request(this._EVAL_TEXT_CACHE_FEATURE_ID,{id:this._editorId,filePath:this._backingStore.getAbsoluteFilePath()}).then(function(){},
function(){})}})})},"MW/rtc/plugins/embeddedoutputs/ClearOutputsCacheProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/embeddedoutputs/ClearOutputsCache","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{requires:function(){return{createInstance:["rtc.actionservice","rtc.id","rtc.embeddedoutputs.model","rtc.code.matlabfiletype"]}},createInstance:function(d,b,a,c){return new f(d,b,a,c)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/embeddedoutputs/ClearOutputsCache":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/i18n!l10n/nls/actions mw-utils/Utils ./MessageServiceFactory".split(" "),
function(g,f,e,d,b,a){return g(null,{_CLEAR_SERVER_OUTPUTS_CACHE_NAMESPACE:"/embeddedOutputs/clearOutputsCacheRequest/",constructor:function(c,b,k,g){this._messageService=a.getInstance();this._clearServerOutputsCacheNamespace=this._CLEAR_SERVER_OUTPUTS_CACHE_NAMESPACE+b;this._actionService=c;this._outputsModel=k;this._editorId=b;this._fileTypeService=g;this._enabled=!1;this._supportedFileTypeChangeListener=e.after(this._fileTypeService,"onSupportedFileTypeChange",f.hitch(this,"_handleSupportedFileTypeChange"),
!0);this._actions=[{id:"rtc_clear_all_output",enabled:!1,contextMenuGroup:"Output",text:d.clearAllOutput,callback:f.hitch(this,"_clearOutputs")}];this._aspectHandles=[];this._enableClearOutputs()},_clearOutputs:function(){var a={requestId:b.generateUuid(),editorId:this._editorId};this._messageService.publish(this._clearServerOutputsCacheNamespace,a);this._outputsModel.clearAllOutputs();this.onOutputsCleared()},onOutputsCleared:function(){},_updateActionState:function(){var a=this._outputsModel.hasOutputs();
this._actionService.updateAction("rtc_clear_all_output",{enabled:a})},_enableClearOutputs:function(){this._enabled||(this._aspectHandles.push(e.after(this._outputsModel,"onModelUpdated",f.hitch(this,this._updateActionState))),this._actionService.loadActions(this._actions),this._enabled=!0)},_disableClearOutputs:function(){this._enabled&&(this._aspectHandles.forEach(function(a){a.remove()}),this._aspectHandles=[],this._actionService.removeAction("rtc_clear_all_output"),this._enabled=!1)},_handleSupportedFileTypeChange:function(a){a?
this._enableClearOutputs():this._disableClearOutputs()},destroy:function(){this._disableClearOutputs();this._supportedFileTypeChangeListener.remove();this._supportedFileTypeChangeListener=null}})})},"MW/rtc/plugins/embeddedoutputs/MessageServiceFactory":function(){define(["dojo/_base/lang","MW/rtc/messageservice/MessageServiceFactory"],function(g,f){return new f})},"MW/rtc/plugins/embeddedoutputs/CurrentOutputServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/embeddedoutputs/CurrentOutputService",
"MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{requires:function(){return{createInstance:"rtc.embeddedoutputs rtc.cursor rtc.cursor.view rtc.embeddedoutputs.model rtc.exportnotifier rtc.embeddedoutputs.view.onright".split(" ")}},createInstance:function(d,b,a,c,e,k){return new f(d,b,a,c,e,k)}})})},"MW/rtc/plugins/embeddedoutputs/CurrentOutputService":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect mw-utils/Utils MW/rtc/abstract/AbstractPlugin MW/rtc/model/Position".split(" "),
function(g,f,e,d,b,a){return g(b,{_cursor:null,constructor:function(a,b,d,g,m,p){this._cursor=b;this._cursorView=d;this._embeddedOutputs=a;this._embeddedOutputsView=a.getEmbeddedOutputsView();this._embeddedOutputsModel=g;this._onRightView=p;this._selectedOutputs=[];this._lastCursorPosition=this._focusedOutput=null;this.own(e.after(this._cursorView,"onChange",f.hitch(this,"_handleCursorViewOnUpdate"),!0));this.own(e.after(this._embeddedOutputsView,"onOutputClick",f.hitch(this,"_handleOutputClick"),
!0));this.own(e.after(this._embeddedOutputsView,"onViewToggled",f.hitch(this,"_handleViewToggled"),!0));this.own(e.after(g,"onModelUpdated",f.hitch(this,"_handleModelUpdated"),!0));this.own(e.after(m,"onExportStart",f.hitch(this,"_handleOnExportStart"),!0));this.own(e.after(this._embeddedOutputs,"onEmbeddedOutputsStateChange",f.hitch(this,"_handleEmbeddedOutputsStateChange"),!0));p.registerCurrentOutputService(this)},_handleEmbeddedOutputsStateChange:function(a){a&&this._onRightView.registerCurrentOutputService(this)},
_handleModelUpdated:function(a){a=this._focusedOutput;var b=this._selectedOutputs;this._focusedOutput&&(this._focusedOutput=this._embeddedOutputsModel.findOutput(f.hitch(this,function(a){return a===this._focusedOutput})));this._selectedOutputs=this._getOutputsAssociatedWithCursor();(this._focusedOutput!==a||!d.arrayEquals(this._selectedOutputs,b))&&this._emitCurrentState()},_handleCursorViewOnUpdate:function(){this._cursor.position.isEqualTo(this._lastCursorPosition)||(this._lastCursorPosition=new a(this._cursor.position.getNode(),
this._cursor.position.getOffset()),this._selectedOutputs=this._getOutputsAssociatedWithCursor(),this._focusedOutput=null,this._emitCurrentState())},_handleOnExportStart:function(){this._focusedOutput=null;this._emitCurrentState()},_handleOutputClick:function(a){this._focusedOutput=a;this._selectedOutputs=[a];this._emitCurrentState()},_handleViewToggled:function(){this._focusedOutput=null;this._selectedOutputs=[];this._emitCurrentState();this._lastCursorPosition=new a(this._cursor.getNode(),this._cursor.getOffset());
this._selectedOutputs=this._getOutputsAssociatedWithCursor();this._emitCurrentState()},_emitCurrentState:function(){this.onOutputSelected({selectedOutputs:this._selectedOutputs,focusedOutput:this._focusedOutput})},_getOutputsAssociatedWithCursor:function(){var a=this._cursor.getNode().rootContainer();return this._embeddedOutputsView.getOutputsAssociatedWithNode(a)},onOutputSelected:function(a){}})})},"MW/rtc/plugins/embeddedoutputs/EmbeddedOutputsProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./EmbeddedOutputs"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.document rtc.internaldocument rtc.view rtc.cursor rtc.actionservice rtc.id rtc.focusservice rtc.bordercontainer rtc.code.matlabfiletype rtc.embeddedoutputs.statehandler rtc.domnode rtc.margin rtc.margin.execution rtc.embeddedoutputs.linenumbertracker rtc.embeddedoutputs.model rtc.preferences.service rtc.backingstore rtc.embeddedoutputs.syntaxerrors rtc.messagebar.rightmargincontainer rtc.embeddedoutputs.outputhandler rtc.embeddedoutputs.splitterpositionmodel rtc.embeddedoutputs.triggers rtc.embeddedoutputs.executiondatamanager rtc.embeddedoutputs.viewservice debug.documentdebugservices rtc.service.documentloaded rtc.code.codeanalyzermodel rtc.cursorcontroller embeddedoutputsviews rtc.view.viewportopenedservice".split(" ")}},
createInstance:function(d,b,a,c,h,f,g,m,p,n,q,r,s,t,u,v,w,x,y,B,D,E,F,I,L,C,M,G,N){return new e(d,b,a,c,h,f,g,m,p,n,q,r,s,t,u,v,w,x,y,B,D,E,F,I,L,C,M,G,N)}})})},"MW/rtc/plugins/embeddedoutputs/EmbeddedOutputs":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/i18n!l10n/nls/actions mw-log/Log mw-utils/Utils MW/rtc/abstract/AbstractPlugin MW/rtc/misc/Synchronizer ./model/EmbeddedOutputsLoad16a ./model/EmbeddedOutputsSave16a ./OutputQueue ./view/EmbeddedOutputsView".split(" "),function(g,
f,e,d,b,a,c,h,k,l,m,p){return g(c,{EMPTY_SAVE_STATE:{metaData:{evaluationState:"manual",layoutState:"code",outputStatus:"ready"},outputArray:[],regionArray:[]},constructor:function(a,c,b,d,h,k,g,l,m,y,B,D,E,F,I,L,C,M,G,N,P,R,S,K,Q,U,T,X,$){this._cursor=d;this._internalDocument=c;this._document=a;this._rtcView=b;this._fileTypeService=m;this._stateHandler=y;this._editorId=k;this._outputsModel=I;this._outputHandler=N;this._splitterPositionModel=P;this._triggers=R;this._codeAnalyzerModel=T;this._outputLoadInterceptors=
[];this._embeddedOutputsEnabled=!1;this._synchronizer=null;this.own(e.after(this._fileTypeService,"onFileTypeChange",f.hitch(this,"_handleFileTypeChange"),!0));this._view=new p(this._outputsModel,l,this._cursor,this._rtcView,g,this._stateHandler,h,this._internalDocument,this._document,B,D,E,L,M,G,this._editorId,S,C,F,K,Q,U,X,$);this._enableEmbeddedOutputs()},_handleFileTypeChange:function(){this._synchronizer||(this._synchronizer=new h([this._fileTypeService,this._codeAnalyzerModel]),this._synchronizer.whenAllReady(f.hitch(this,
function(){this._synchronizer.destroy();this._synchronizer=null;this._handleValidFileTypeChange()})))},_handleValidFileTypeChange:function(){this._fileTypeService.getFileType()===this._fileTypeService.FILE_TYPE.ClassDefinitionFile||this._fileTypeService.getFileType()===this._fileTypeService.FILE_TYPE.FunctionFile?this._disableEmbeddedOutputs():this._enableEmbeddedOutputs()},_enableEmbeddedOutputs:function(){this._embeddedOutputsEnabled||(this._view.enable(),this._load16a=new k(this._document,this._internalDocument,
this._editorId,this._outputsModel,this._outputHandler,this._view,this._triggers,this._splitterPositionModel),this._saveAs16a=new l(this._internalDocument,this._outputsModel,this._view,this._triggers,this._splitterPositionModel),this._triggers.enableTriggers(),this._embeddedOutputsEnabled=!0,this.onEmbeddedOutputsStateChange(this._embeddedOutputsEnabled))},_disableEmbeddedOutputs:function(){this._embeddedOutputsEnabled&&(this._outputsModel.clear(),this._view.disable(),this._load16a.destroy(),this._load16a=
null,this._saveAs16a.destroy(),this._saveAs16a=null,this._triggers.disableTriggers(),this._embeddedOutputsEnabled=!1,this.onEmbeddedOutputsStateChange(this._embeddedOutputsEnabled))},onEmbeddedOutputsStateChange:function(a){},isEmbeddedOutputsEnabled:function(){return this._embeddedOutputsEnabled},save:function(){if(!this._embeddedOutputsEnabled)return this.EMPTY_SAVE_STATE;try{return this._saveAs16a.get16aSaveObject()}catch(a){return b.assert(!1,"Exception occurred while saving outputs. Outputs will not be saved:"+
a),this.EMPTY_SAVE_STATE}},load:function(a){if(!this._outputLoadInterceptors.some(function(c){return c.interceptLoading(a)})){var c=this._view.getLayoutView(),d=this._triggers.getEvaluationState(),e=this._view.getReadyBusyIndicatorState();try{this._load16a.loadFrom16a(a)}catch(h){b.assert(!1,"Exception occurred while loading outputs. Outputs will not be loaded:"+h),this._splitterPositionModel.setDefaultRightPanelProportion(),this._view.setLayoutState(c),this._outputsModel.clear(),this._triggers.setEvaluationState(d),
this._view.setReadyBusyIndicatorState(e)}}},registerLoadInterceptor:function(a){this._outputLoadInterceptors.push(a)},getEmbeddedOutputsView:function(){return this._view},destroy:function(){this.inherited(arguments);this._outputLoadInterceptors=[];this._stateHandler.destroy();this._disableEmbeddedOutputs()}})})},"MW/rtc/misc/Synchronizer":function(){define(["dojo/_base/declare","dojo/aspect","dojo/_base/lang","dojo/Deferred"],function(g,f,e,d){return g([],{constructor:function(b){this._synchronizables=
b.map(function(a){return{isWaitingForUpdate:!1,synchronizable:a}});this._allReadyPromise=null},whenAllReady:function(b){this._areAllReady()?b():(this._allReadyPromise||(this._allReadyPromise=new d),this._allReadyPromise.then(b),this._addWhenReadyCallbacks())},_areAllReady:function(){return 0===this._getAllDirty().length},_getAllDirty:function(){return this._synchronizables.filter(function(b){return!b.synchronizable.isReady()})},_getAllNeedingUpdate:function(){return this._getAllDirty().filter(function(b){return!b.isWaitingForUpdate})},
_addWhenReadyCallbacks:function(){this._getAllNeedingUpdate().forEach(function(b){b.synchronizable.whenReady(e.hitch(this,this._handleSynchronizableBecomingClean))},this)},_handleSynchronizableBecomingClean:function(){this._areAllReady()?this._allReadyPromise&&(this._allReadyPromise.resolve(),this._allReadyPromise=null):this._addWhenReadyCallbacks()},destroy:function(){this._synchronizables=[];this._allReadyPromise&&this._allReadyPromise.reject();this._allReadyPromise=null}})})},"MW/rtc/plugins/embeddedoutputs/model/EmbeddedOutputsLoad16a":function(){define("dojo/_base/declare dojo/_base/lang mw-log/Log MW/rtc/model/CodeUtilities MW/rtc/model/DocumentUtilities MW/rtc/model/Range MW/rtc/plugins/embeddedoutputs/EmbeddedOutputsUtilities MW/rtc/plugins/embeddedoutputs/model/Region mw-utils/Utils".split(" "),
function(g,f,e,d,b,a,c,h,k){return g(null,{constructor:function(a,c,b,d,e,h,f,k){this._document=a;this._internalDocument=c;this._editorId=b;this._outputsModel=d;this._outputHandler=e;this._eoView=h;this._triggers=f;this._splitterPositionModel=k},destroy:function(){},loadFrom16a:function(a){a.metaData&&(this._eoView.setLayoutState(a.metaData.layoutState),this._splitterPositionModel.loadSplitterPosition(a));a.regionArray&&a.outputArray&&this._loadRegionsAndOutputs(a.regionArray,a.outputArray);a.metaData&&
(this._triggers.setEvaluationState(a.metaData.evaluationState),this._eoView.setReadyBusyIndicatorState(a.metaData.outputStatus))},_loadRegionsAndOutputs:function(a,c){this._cleanData(a,c);this._loadRegionsWithoutOutputs(a);this._loadOutputs(a,c)},_loadRegionsWithoutOutputs:function(a){var c=[],b=this._internalDocument.getLineNode(0);a.forEach(function(a,d){var f=this._internalDocument.getLineNode(a.startLine),g=this._internalDocument.getLineNode(a.endLine);if(!f||!g)e.error("Error loading outputs. Region line doesn't exist:\nRegion number: "+
d+"\nStartLine: "+a.startLine+"\nEndLine:   "+a.endLine+"\nInternalDocument last line number: "+(this._internalDocument.getMaxLineNumber()-1)+"\n"),g=f=b;b=g;f={sectionBreak:a.code.sectionBreak,endOfSection:a.code.endOfSection,regionString:a.code.regionString,regionNumber:a.code.regionNumber,regionPositions:this._document.getPositionsInNodeRange(f,g)};f=new h(f,k.generateUuid());c.push(f)},this);this._outputsModel.setRegions(c)},_loadOutputs:function(a,d){var e=[],h=[],f=[],k=this._outputsModel.getRegions();
a.forEach(function(a){a.outputIndexes.forEach(function(c){e[c]||(e[c]={outputData:d[c],regionNumbers:[]});e[c].regionNumbers.push(a.code.regionNumber)})});a.forEach(function(a,c){a.outputIndexes.forEach(function(a){a=e[a];if(c===a.regionNumbers[a.regionNumbers.length-1]){var b=a.outputData;b.lineNumbers=this._getLineNumbers(b,a.regionNumbers,k);0<b.lineNumbers.length&&h.push(b)}},this);f.push(c)},this);var g=b.createFullFileRange(this._document,this._internalDocument);this._outputHandler.handleStartOfEvaluation(g);
this._outputHandler.handleOutputsData(h,f,c.LOADED_FROM_DISK_EVALUATION_ID,g);this._outputHandler.handleEndOfEvaluation(g,c.LOADED_FROM_DISK_EVALUATION_ID,"");g.destroy()},_getLineNumbers:function(a,b,d){return a.lineNumbers&&0<a.lineNumbers.length?a.lineNumbers:c.getLineNumbersFromRegionNumbers(b,d,this._internalDocument)},_cleanData:function(a,c){this._cleanRegionData(a);this._cleanOutputsRegionData(c);this._cleanOutputsFigureSizeData(c)},_cleanRegionData:function(a){a.forEach(function(a){a.outputIndexes.forEach(function(c,
b){a.outputIndexes[b]=parseInt(c,10)},this);a.code.sectionBreak="true"===a.code.sectionBreak;a.code.endOfSection="true"===a.code.endOfSection;a.code.regionNumber=parseInt(a.code.regionNumber,10);a.startLine=parseInt(a.startLine,10);a.endLine=parseInt(a.endLine,10)},this)},_cleanOutputsRegionData:function(a){a.forEach(function(a){var c=a.outputData;c.regionNumbers&&(c.regionNumbers=c.regionNumbers.map(function(a){return parseInt(a,10)}));if(c.truncationInfo){var b=c.truncationInfo;c.truncationInfo.wasTruncatedMidLine=
"true"===b.wasTruncatedMidLine;c.truncationInfo.wasTruncatedAtLineBreak="true"===b.wasTruncatedAtLineBreak}a.lineNumbers=a.lineNumbers?a.lineNumbers.map(function(a){return parseInt(a,10)}):[]})},_cleanOutputsFigureSizeData:function(a){a.forEach(function(a){a=a.outputData;a.figureSize&&(a.figureSize=a.figureSize.map(function(a){return parseInt(a,10)}))})}})})},"MW/rtc/plugins/embeddedoutputs/EmbeddedOutputsUtilities":function(){define(["dojo/dom-construct","MW/rtc/model/CodeUtilities","MW/rtc/model/PositionUtilities"],
function(g,f,e){return{LOADED_FROM_DISK_EVALUATION_ID:"Load from disk",isLoadedFromDisk:function(d){return d===this.LOADED_FROM_DISK_EVALUATION_ID},convertPositionToRegionNumber:function(d,b){if(0===b.length)throw Error("There should be at least one region.");var a=d.line,c=0;b.some(function(b,d){return b.code.regionPositions[0].line<=a?(c=d,!1):!0},this);return c},getLineNumbersFromRegionNumbers:function(d,b,a){var c=[];d.forEach(function(d){b[d].code.regionPositions.forEach(function(b){f.isCodeContainer(b.getNode(),
!0)&&(b=f.getCodeLineNumberFromPosition(a,b),c.push(b))},this)},this);return c},createPositionsFromRegionNumbers:function(d,b,a){var c=[];d.forEach(function(d){b[d].code.regionPositions.forEach(function(b){b=a.createLinePosition(b.getNode(),!1);c.push(b)},this)},this);return c},isOutputAssociatedWithRegion:function(d,b){var a=b.code.regionPositions[0],c=b.code.regionPositions[b.code.regionPositions.length-1];return d.codeLinePositions.some(function(b){return b.line>=a.line&&b.line<=c.line},this)},
mergeCodeLinePositions:function(d,b){for(var a=0,c=0,h=[];a<d.length&&c<b.length;){var f=d[a],g=b[c],m=e.comparePositions(f,g);0>m?a++:(0<m?f=g:(g.destroy(),a++),c++);h.push(f)}g=[];a<d.length?g=d.slice(a):c<b.length&&(g=b.slice(c));return h=h.concat(g)}}})},"MW/rtc/plugins/embeddedoutputs/model/Region":function(){define(["dojo/_base/declare"],function(g){return g(null,{constructor:function(f,e){this.code=f;this.uid=e}})})},"MW/rtc/plugins/embeddedoutputs/model/EmbeddedOutputsSave16a":function(){define(["dojo/_base/declare",
"dojo/_base/lang","MW/rtc/model/CodeUtilities","MW/rtc/plugins/embeddedoutputs/EmbeddedOutputsUtilities"],function(g,f,e,d){return g(null,{constructor:function(b,a,c,d,e){this._internalDocument=b;this._outputsModel=a;this._eoView=c;this._triggers=d;this._splitterPositionModel=e},destroy:function(){},get16aSaveObject:function(){var b=this._outputsModel.getRegions(),a=[],c=[],d={};this._get16aDataStructureFrom18aPlusModel(b).forEach(function(b){var f=b.code.regionPositions[0],g=b.code.regionPositions[b.code.regionPositions.length-
1];if(!f.isValid()||!g.isValid())throw Error("Position not valid.");var f=this._internalDocument.getLineNumber(f.getNode()),g=this._internalDocument.getLineNumber(g.getNode()),p={code:{sectionBreak:b.code.sectionBreak,endOfSection:b.code.endOfSection,regionString:b.code.regionString,regionNumber:b.code.regionNumber},startLine:f,endLine:g,outputIndexes:[]};b.outputs.forEach(function(c){var b=[],f=c.uid,k=d[f];if(void 0===k){c.codeLinePositions.forEach(function(a){e.isCodeContainer(a.getNode())&&(a=
e.getCodeLineNumberFromPosition(this._internalDocument,a),0<a&&b.push(a))},this);if(0===b.length)return;a.push({type:c.type,outputData:c.getSerializableData(),lineNumbers:b});k=a.length-1;d[f]=k}p.outputIndexes.push(k)},this);c.push(p)},this);return{metaData:{evaluationState:this._triggers.getEvaluationState(),layoutState:this._eoView.getLayoutView(),outputStatus:this._eoView.getReadyBusyIndicatorState(),splitterState:{proportion:this._splitterPositionModel.getRightPanelProportion()}},outputArray:a,
regionArray:c}},_get16aDataStructureFrom18aPlusModel:function(b){var a,c=[];a=b.map(function(a){var b=this._outputsModel.getOutputsForRegion(a);c=c.concat(b);return{code:a.code,outputs:[]}},this);c.forEach(function(c){c.codeLinePositions.forEach(function(e){e=d.convertPositionToRegionNumber(e,b);e=a[e].outputs;-1===e.indexOf(c)&&e.push(c)})});return a}})})},"MW/rtc/plugins/embeddedoutputs/OutputQueue":function(){define(["dojo/_base/declare","dojo/_base/lang"],function(g,f){return g(null,{_TIMEOUT_PERIOD:33,
constructor:function(e){this._outputsHandler=e;this._outputQueue=[];this._regionNumberQueue=[];this._queueTimeout=this._currentEvaluationRange=this._currentEvaluationId=null},destroy:function(){clearTimeout(this._queueTimeout);this._queueTimeout=null},addToQueue:function(e,d,b,a){this._outputQueue=this._outputQueue.concat(e);this._regionNumberQueue=this._regionNumberQueue.concat(d);this._currentEvaluationId=b;this._currentEvaluationRange=a;0===this._TIMEOUT_PERIOD?this._flushQueue():this._queueTimeout||
(this._queueTimeout=setTimeout(f.hitch(this,"_flushQueue"),this._TIMEOUT_PERIOD))},flushNow:function(){clearTimeout(this._queueTimeout);this._queueTimeout=null;this._flushQueue()},_flushQueue:function(){var e=this._outputQueue,d=this._regionNumberQueue;this._outputQueue=[];this._regionNumberQueue=[];this._queueTimeout=null;0===e.length&&0===d.length||this._outputsHandler.handleOutputsData(e,d,this._currentEvaluationId,this._currentEvaluationRange)}})})},"MW/rtc/plugins/embeddedoutputs/view/EmbeddedOutputsView":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/on dojo/has MW/rtc/plugins/embeddedoutputs/view/EmbeddedOutputsStaleOutput MW/rtc/plugins/embeddedoutputs/view/EmbeddedOutputsViewModel MW/rtc/plugins/embeddedoutputs/view/EmbeddedOutputsViewStateEnum MW/rtc/plugins/embeddedoutputs/view/LineBusyIndicator MW/rtc/plugins/embeddedoutputs/view/ReadyBusyIndicator MW/rtc/plugins/embeddedoutputs/view/ScrollableOutputStyler MW/rtc/plugins/embeddedoutputs/view/ViewToggler".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p){return g(null,{_VIEW_ORDER:[h.ON_RIGHT_VIEW_STATE,h.INLINE_VIEW_STATE],constructor:function(a,b,d,e,h,k,g,l,m,p,B,D,E,F,I,L,C,M,G,N,P,R,S,K){this._outputsModel=a;this._parentBorderContainer=b;this._cursor=d;this._rtcView=e;this._focusService=h;this._stateHandler=k;this._actionService=g;this._internalDocument=l;this._document=m;this._rtcDomNode=p;this._margin=B;this._executionMargin=D;this._preferences=E;this._syntaxErrorHandler=F;this._rightmargincontainer=I;this._editorId=
L;this._executionDataManager=C;this._backingStore=M;this._lineNumberTracker=G;this._viewService=N;this._documentDebugServices=P;this._documentLoadedService=R;this._cursorController=S;this._embeddedOutputsViews=K;this._aspectHandles=[];this._savedViewState=null;this._viewModel=new c(a,f.hitch(this,"_createOutputDivsFromOutputs"))},enable:function(){this._staleOutputManager=new a(this._viewModel,this._stateHandler,this._syntaxErrorHandler,this._viewService,this._outputsModel,this._rtcDomNode);this._aspectHandles.push(e.after(this._viewModel,
"onModelUpdated",f.hitch(this,"_layoutView",!1,!1,!1),!0));this._viewToggler=new p(this._rightmargincontainer,this._actionService,this._editorId,this._savedViewState,this._embeddedOutputsViews);this._setupStyler(this._parentBorderContainer,this._viewModel);this._actions=[{id:"_rtc_toggle_outputs_view",enabled:!0,key:"ctrl_alt_i",callback:f.hitch(this,"toggle",!0)}];this._currentView=this._getOnRightView();this._setupViews();this._savedViewState&&(this.setLayoutState(this._savedViewState),this._savedViewState=
null);this._setupViewActions();this._readyBusyIndicator=new l(this._outputsModel,this._cursor,this._stateHandler,this._internalDocument,this._focusService,this._rtcDomNode,this._margin,this._rtcView,this._preferences,this._syntaxErrorHandler,this._document,this._backingStore,this._lineNumberTracker,this._cursorController,this._executionDataManager);this._lineBusyIndicator=new k(this._outputsModel,this._rtcView,this._stateHandler,this._internalDocument,this._margin,this._rtcDomNode,this._executionMargin,
this._document,this._preferences,this._executionDataManager,this._backingStore,this._lineNumberTracker,this._viewService,this._documentDebugServices,this._documentLoadedService);this._aspectHandles.push(e.after(this._parentBorderContainer,"layout",f.hitch(this,"_layoutView",!1,!0,!1),!0));this._actionService.loadActions(this._actions);this._aspectHandles.push(e.after(this._actionService,"onActionChange",f.hitch(this,"_onActionChange"),!0))},_setupViews:function(){this._embeddedOutputsViews.forEach(function(a){a.setup(this._viewModel,
this._scrollableOutputStyler,f.hitch(this,"isInView",a));this._aspectHandles.push(e.after(a,"onOutputClicked",f.hitch(this,"_handleOutputClicked"),!0))},this)},_setupViewActions:function(){this._embeddedOutputsViews.forEach(function(a){a=[{id:a.ACTION_ID,enabled:!0,selected:this._currentView===a,callback:f.hitch(this,"_toggleState",a.getName(),!0)},{id:a.ACTION_ID_NO_ANIMATION,enabled:!0,callback:f.hitch(this,"_toggleState",a.getName(),!1)}];this._actions=this._actions.concat(a)},this)},disable:function(){var a=
this;this._actions.forEach(function(c){a._actionService.getAction(c.id)&&(a._actionService.updateAction(c.id,{enabled:!1}),a._actionService.removeAction(c.id))});this._viewModel.clear();this._staleOutputManager.destroy();this._readyBusyIndicator.destroy();this._lineBusyIndicator.destroy();this._scrollableOutputStyler.destroy();this._viewToggler.destroy();this._savedViewState=this.getLayoutView();this._embeddedOutputsViews.forEach(function(a){a.destroyView()},this);this._currentView=null;this._aspectHandles.forEach(function(a){a.remove()})},
onAlign:function(){this._scrollableOutputStyler.layout()},outputChanged:function(){this._outputStyleChanged(!1,!0,!0)},onViewToggled:function(a){},_setupStyler:function(a,c){this._scrollableOutputStyler=new m(c,this._rtcDomNode);this._aspectHandles.push(e.after(this,"_layoutView",f.hitch(this._scrollableOutputStyler,"layout"),!0));this._aspectHandles.push(e.after(this._scrollableOutputStyler,"onStyledWithHeightChange",f.hitch(this,"_handleOnStyledWithHeightChange"),!0))},toggle:function(a,c){if(!this._toggling){this._toggling=
!0;this._actionService.updateAction("_rtc_toggle_outputs_view",{enabled:!1});var b=this._currentView.disable(a);this._updateCurrentViewAndActions(c);this._viewModel.refreshViewModel();if(b&&a)var e=this,h=d(b,"End",function(){h.remove();e._toggleComplete(a)});else this._toggleComplete(a);this._focusService.setFocus()}},_updateCurrentViewAndActions:function(a){a=a||this._getNextViewName();for(var c=0;c<this._embeddedOutputsViews.length;c++){var b=this._embeddedOutputsViews[c],d=!1;a===b.getName()&&
(this._currentView=b,d=!0);this._actionService.updateAction(b.ACTION_ID,{enabled:!0,selected:d})}},_toggleComplete:function(a){this._scrollableOutputStyler.clearListeners();this._redrawCurrentView(a);this._toggling=!1;this._actionService.updateAction("_rtc_toggle_outputs_view",{enabled:!0});this.onViewToggled(this._currentView.getName());if(this._lastToggleRequest){var c=this._lastToggleRequest;this._lastToggleRequest=null;this._toggleState(c,a)}},_getNextViewName:function(){for(var a=this._VIEW_ORDER.length,
c=0;c<a;c++)if(this._currentView.getName()===this._VIEW_ORDER[c])return this._VIEW_ORDER[(c+1)%a]},_redrawCurrentView:function(a){this._currentView.enable(a);this._layoutView(a,!1,!0)},_handleOnStyledWithHeightChange:function(a){this._outputStyleChanged(a,!0,!1)},_outputStyleChanged:function(a,c,b){this._currentView.outputStyleChanged(a,c,b)},isInView:function(a){return this._currentView===a},_getOnRightView:function(){for(var a=0;a<this._embeddedOutputsViews.length;a++){var c=this._embeddedOutputsViews[a];
if(c.getName()===h.ON_RIGHT_VIEW_STATE)return c}},_toggleState:function(a,c){this._currentView.getName()!==a&&this.toggle(c,a)},_layoutView:function(a,c,b){this._currentView.layout(this._viewModel,a,c,b)},_createOutputDivsFromOutputs:function(a){return this._currentView.createOutputDivsFromOutputs(a)},getOutputsAssociatedWithNode:function(a){return this._viewModel.getOutputsAssociatedWithNode(a)},_onActionChange:function(a){var c=a.id;if("selected"===a.key&&a.newValue)for(a=0;a<this._embeddedOutputsViews.length;a++)c===
this._embeddedOutputsViews[a].ACTION_ID&&this._toggleOnActionChanged(this._embeddedOutputsViews[a].getName())},_toggleOnActionChanged:function(a){this._toggling?this._lastToggleRequest=a:this._toggleState(a,!0)},setLayoutState:function(a){this._toggleState(a,!1)},setReadyBusyIndicatorState:function(a){this._readyBusyIndicator.setState(a)},getLayoutView:function(){return this._currentView.getName()},getReadyBusyIndicatorState:function(){return this._readyBusyIndicator.getState()},getOutputFromOutputDiv:function(a){return this._viewModel.getOutputFromOutputDiv(a)},
getOutputDivsForRange:function(a,c){return this._viewModel.getOutputDivsForRange(a,c)},getOutputWrapperFromElement:function(a){return this._viewModel.getOutputWrapperFromElement(a)},_handleOutputClicked:function(a){if(a=this.getOutputWrapperFromElement(a))a=this._viewModel.getOutputFromOutputDiv(a),this.onOutputClick(a)},onOutputClick:function(a){}})})},"MW/rtc/plugins/embeddedoutputs/view/EmbeddedOutputsStaleOutput":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom dojo/query dojo/dom-class".split(" "),
function(g,f,e,d,b,a){return g(null,{_STALE_OUTPUT_CLASS:"stale_output",_STALE_OUTPUT_SELECTOR:".stale_output",constructor:function(a,b,d,g,m,p){this._stateHandler=b;this._viewModel=a;this._syntaxErrorHandler=d;this._viewService=g;this._outputsModel=m;this._rtcDomNode=p;this._aspectHandles=[e.after(this._stateHandler,"stateChanged",f.hitch(this,"_stateChangeListener"),!0),e.after(this._syntaxErrorHandler,"onEvaluationCompletedWithNoSyntaxErrors",f.hitch(this,"_handleEvaluationEnd")),e.after(this._syntaxErrorHandler,
"onSyntaxError",f.hitch(this,"_unstaleSyntaxError")),e.after(this._outputsModel,"onOldOutputNotRemovedDuringReplacementRejection",f.hitch(this,"_setOutputStale"),!0)]},_stateChangeListener:function(a,b){if(a===this._stateHandler.CHANGE_TYPE_ENUM.EVAL_INITIALIZED){var d=b.evaluationRange,e=d.getStartPosition().getNode(),d=d.getEndPosition().getNode(),e=this._viewModel.getOutputDivsForRange(e,d);this._viewService.executeViewAction(f.hitch(this,"_setOutputsInRangeStale",e))}},_handleEvaluationEnd:function(){this._outputsModel.whenOutputsReady(f.hitch(this,
function(){this._stateHandler.isRunning()||this._clearAllStale()}))},_unstaleSyntaxError:function(){var c=this._syntaxErrorHandler.getFirstSyntaxErrorOutput();c&&a.remove(c.getDomElement(),this._STALE_OUTPUT_CLASS)},_clearAllStale:function(){this._viewModel.getOutputDivs().forEach(function(c){a.remove(this._getTargetDiv(c),this._STALE_OUTPUT_CLASS)},this)},_setOutputStale:function(c){a.add(c.getDomElement(),this._STALE_OUTPUT_CLASS)},_setOutputsInRangeStale:function(c){c.forEach(function(c){d.isDescendant(c,
this._rtcDomNode)&&a.add(this._getTargetDiv(c),this._STALE_OUTPUT_CLASS)},this)},_getTargetDiv:function(a){return a.children[0]},destroy:function(){this._aspectHandles.forEach(function(a){a.remove()});this._aspectHandles=[]}})})},"MW/rtc/plugins/embeddedoutputs/view/EmbeddedOutputsViewModel":function(){define("dojo/_base/declare dojo/aspect dojo/_base/lang dojo/dom-construct dojo/dom-class dojo/dom-style mw-log/Log mw-utils/Utils MW/rtc/model/NodeUtilities MW/rtc/model/PositionUtilities".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return g(null,{constructor:function(a,c){this._createWrapperCallback=c;this._outputsModel=a;this._aspectHandles=[];this._regions=[];this._positionToOutputMap=new Map;this._uidToOutputMap={};this._aspectHandles.push(f.after(this._outputsModel,"onModelUpdated",e.hitch(this,"_updateViewModel"),!0));this._updateViewModel()},getOutputsAssociatedWithNode:function(a){return this.getOutputDivsForNode(a.rootContainer()).map(function(a){return this.getOutputFromOutputDiv(a)},this)},
getOutputDivs:function(){var a=[];this._forEachOutput(function(c){a.push(c.domElement)});return a},getRegions:function(){return this._regions},getOutputDivsForNode:function(a){a=l.getPositions(a);for(var c=[],b=0;b<a.length;b++){var d=this._positionToOutputMap.get(a[b]);void 0!==d&&c.push(d)}c=h.unique(c);c.sort(function(a,c){return a._index-c._index});return c.map(function(a){return a.domElement})},getOutputDivsForRange:function(a,c){var b=k.getParagraphNodesInRange(a,c);return this._getOutputDivsForNodes(b)},
_getOutputDivsForNodes:function(a){var c=[],b=this;this._forEachOutput(function(d){b._isOutputAssociatedWithNode(d,a)&&c.push(d.domElement)},this);return c},_forEachOutput:function(a){var c,b,d,e,h;for(c=0;c<this._regions.length;c++){d=this._regions[c];e=d.outputUidArray;for(b=0;b<e.length;b++)h=d.outputsByUid[d.outputUidArray[b]],a(h)}},_isOutputAssociatedWithNode:function(a,c){return a.codeLinePositions.some(function(a){return-1<c.indexOf(a.getNode())})},doesNodeHaveOutputs:function(a){a=l.getPositions(a);
for(var c=0;c<a.length;c++)if(void 0!==this._positionToOutputMap.get(a[c]))return!0;return!1},refreshViewModel:function(){this._updateViewModel()},onModelUpdated:function(){},clear:function(){this._regions=[];this._positionToOutputMap.clear();this._uidToOutputMap={};this.onModelUpdated()},destroy:function(){this.clear();this._uidToOutputMap=this._positionToOutputMap=null;this._aspectHandles.forEach(function(a){a.remove()})},getLineNumbersForOutput:function(a){a=a.getAttribute("uid");return this._uidToOutputMap[a].codeLinePositions.map(function(a){return a.getLineColumn().line-
1})},getClosestNodeWithOutputToLineNumber:function(a,c,b){c=c||Number.NEGATIVE_INFINITY;b=b||Number.POSITIVE_INFINITY;var d=null,e=Number.NEGATIVE_INFINITY;this._forEachOutput(function(h){h.codeLinePositions.forEach(function(h){if(h.isValid()){var f=h.getLineColumn().line-1;if(!(f<c||f>b)){var k=Math.abs(a-f),g=Math.abs(a-e);k<=g&&(d=h.node,e=f)}}})});return d},_updateViewModel:function(a,c){c?this._updateViewRegionsFromChangelist(c):this._updateViewRegions();var b=0;this._forEachOutput(function(a){a._index=
b;b++});this.onModelUpdated(a)},_updateViewRegions:function(){this._preserveExistingHeights();this._positionToOutputMap.clear();this._uidToOutputMap={};this._regions=this._outputsModel.getRegions().map(function(a){var c=a.code.regionPositions;a=this._outputsModel.getOutputsForRegion(a);var b=this._createOutputMap(a);b.outputUidArray.forEach(function(a){var c=b.outputMap[a];this._uidToOutputMap[a]=c;this._addViewModelOutputToPositionMap(c)},this);return{positions:c,outputsByUid:b.outputMap,outputUidArray:b.outputUidArray}},
this)},_preserveExistingHeights:function(){var c=[];this._forEachOutput(function(a){var b=a.domElement.parentElement;b&&c.push({previousWrapper:b,previousClientHeight:a.domElement.clientHeight})});c.forEach(function(c){a.set(c.previousWrapper,"height",c.previousClientHeight+"px")})},_updateViewRegionsFromChangelist:function(a){var b=this._regions;a.forEach(function(a){var d=a.removedOutputId,e=a.outputIndex,h=a.output,f=b[a.regionNumber];switch(a.type){case this._outputsModel.CHANGE_TYPE.ADD:this._addOutput(f,
h,e);break;case this._outputsModel.CHANGE_TYPE.REMOVE:e=f.outputUidArray.indexOf(d);if(0>e){c.error("Invalid output index; skipping output.");break}this._removeOutput(f,d,e);break;case this._outputsModel.CHANGE_TYPE.REPLACE:this._removeOutput(f,d,e);this._addOutput(f,h,e);break;case this._outputsModel.CHANGE_TYPE.UPDATE:this._updateOutput(f,h)}},this);this._regions=b},_createOutputMap:function(a){var c={},b=[];a.forEach(function(a){c[a.uid]=this._createViewModelOutput(a.codeLinePositions,a);b.push(a.uid)},
this);return{outputMap:c,outputUidArray:b}},_addOutput:function(a,c,b){var d=a.outputsByUid;a=a.outputUidArray;var e=this._createViewModelOutput(c.codeLinePositions,c);d[c.uid]=e;a.splice(b,0,c.uid);this._uidToOutputMap[c.uid]=e;this._addViewModelOutputToPositionMap(e)},_createViewModelOutput:function(a,c){return{domElement:this._createOutputWrapper(c),codeLinePositions:a,_modelOutput:c,_index:-1}},_removeOutput:function(a,c,b){var d=a.outputsByUid;a=a.outputUidArray;delete this._uidToOutputMap[c];
this._removeViewModelOutputToPositionMap(d[c]);a.splice(b,1);delete d[c]},_updateOutput:function(a,c){var b=a.outputsByUid;this._removeViewModelOutputToPositionMap(b[c.uid]);var d=this._createViewModelOutput(c.codeLinePositions,c);b[c.uid]=d;this._uidToOutputMap[c.uid]=d;this._addViewModelOutputToPositionMap(d)},_addViewModelOutputToPositionMap:function(a){a.codeLinePositions.forEach(function(c){this._positionToOutputMap.set(c,a)},this)},_removeViewModelOutputToPositionMap:function(a){a.codeLinePositions.forEach(function(a){this._positionToOutputMap["delete"](a)},
this)},_createOutputWrapper:function(a){var c=this._createWrapperCallback(a.codeLinePositions);b.add(c,a.getCssTag());c.setAttribute("uid",a.uid);a=a.getDomElement();var e=a.parentElement;e&&(c.setAttribute("data-scroll-top",e.getAttribute("data-scroll-top")),c.setAttribute("data-scroll-left",e.getAttribute("data-scroll-left")));d.place(a,c,"last");return c},getOutputFromOutputDiv:function(a){a=a.getAttribute("uid");return(a=this._uidToOutputMap[a])?a._modelOutput:null},hasOutputs:function(){return this._regions.some(function(a){return a.outputUidArray&&
0<a.outputUidArray.length})},getOutputWrapperFromElement:function(a){for(var c=b.contains(a,"rightPaneElement"),d=b.contains(a,"inlineElement"),e=b.contains(a,"rtePane");!c&&!d&&!e;){a=a.parentElement;if(!a)return null;c=b.contains(a,"rightPaneElement");d=b.contains(a,"inlineElement");e=b.contains(a,"rtePane")}return b.contains(a,"rtePane")?null:a},startupOutputs:function(){this._outputsModel.getOutputs().forEach(function(a){a.startup()})}})})},"MW/rtc/plugins/embeddedoutputs/view/EmbeddedOutputsViewStateEnum":function(){define([],
function(){return{INLINE_VIEW_STATE:"document",ON_RIGHT_VIEW_STATE:"code"}})},"MW/rtc/plugins/embeddedoutputs/view/LineBusyIndicator":function(){define("dojo/aspect dojo/dom-class dojo/dom-construct dojo/dom-style dojo/_base/declare dojo/_base/lang MW/rtc/model/DocumentConstants MW/rtc/model/DocumentEventUtilities MW/rtc/plugins/debug/DebugServicesFactory MW/rtc/plugins/embeddedoutputs/view/AnimationUtilities MW/rtc/view/ViewEventUtilities MW/rtc/view/ViewUtilities".split(" "),function(g,f,e,d,b,
a,c,h,k,l,m,p){return b(null,{_ANIMATION_LENGTH:1E3,_ONE_SECOND:1E3,_PADDING:0,constructor:function(c,b,d,h,f,l,m,p,x,y,B,D,E,F,I){this._model=c;this._view=b;this._stateManager=d;this._internalDocument=h;this._margin=f;this._rtcDomNode=l;this._executionMargin=m;this._document=p;this._preferences=x;this._executionDataManager=y;this._backingStore=B;this._lineNumberTracker=D;this._viewService=E;this._documentDebugServices=F;this._documentLoadedService=I;this._debugServices=k.getInstance();this._currentEndPosition=
this._currentStartPosition=null;this._positionChangeListeners=[];this._aspectHandles=[];this._aspectHandles.push(g.after(this._stateManager,"stateChanged",a.hitch(this,"_stateChangeListener"),!0));this._aspectHandles.push(g.after(this._internalDocument,"onDocumentChanged",a.hitch(this,"_onFormatChange"),!0));this._aspectHandles.push(g.after(this._view,"onViewUpdated",a.hitch(this,"_viewUpdated"),!0));this._aspectHandles.push(g.after(this._margin,"onResize",a.hitch(this,"_setMarginPositioning")));
this._aspectHandles.push(g.after(this._executionDataManager,"onDataUpdate",a.hitch(this,"_handleDataUpdate"),!0));this._aspectHandles.push(g.after(this._debugServices,"onDBCont",a.hitch(this,"_handleDBCont")));this._aspectHandles.push(g.after(this._documentDebugServices,"onStackChanged",a.hitch(this,"_handleStackChanged"),!0));this._indicator=e.create("div",{className:"busyLineIndicator"});e.place(this._indicator,l,"last");this._convertedCache=[];this._gutterTop=0;this._busyLineAnimationTimer=null;
this._isPaused=!1;this._currentRegion=-1},destroy:function(){this._aspectHandles.forEach(function(a){a.remove()});this._aspectHandles=[];this._removeIndicator();e.destroy(this._indicator)},_stateChangeListener:function(a,c){switch(a){case this._stateManager.CHANGE_TYPE_ENUM.EVAL_COMPLETE:this._removeIndicator(),this._convertedCache=[],this._isPaused=!1}},_handleDataUpdate:function(a){!this._isPaused&&this._shouldUpdateIndicator(a)&&(this._removeIndicator(),this._setCacheOnDataUpdate(a),this._setBusyLine(),
this._startAnimation())},_handleStackChanged:function(c){if(0!==c.length){this._isPaused=!0;var b=c[c.length-1].getLineNumber()-1;0>b&&(b=-b);this._documentLoadedService.whenDocumentLoadedWithText(a.hitch(this,function(){this._currentRegion=-1;var a=this._lineNumberTracker.createPositionFromOldLineNumber(b);this._setAnimationPercent(0);this._setCache([a]);this._setBusyLine();this._stopAnimation();a.destroy()}))}},_handleDBCont:function(){this._isPaused=!1;this._stateManager.isRunning()?this._startAnimation():
this._removeIndicator()},_onFormatChange:function(a){a=h.getEventsOfType(a,c.FORMAT_CHANGE_EVENT);this._isBusy()&&0<a.length&&(a=a[0],"code"===a.oldFormat&&(this._isRangeWithinBusyRegion(a.startLine+1,a.endLine+1)?this._removeIndicator():this._convertedCache.push({start:a.startLine+1,end:a.endLine+1})),this._setPositioning())},_checkCache:function(){return!this._convertedCache.length?!1:this._convertedCache.some(function(a){return this._isRangeWithinBusyRegion(a.start,a.end)},this)},_isRangeWithinBusyRegion:function(a,
c){var b=this._currentStartPosition.getLineColumn().line,d=this._currentEndPosition.getLineColumn().line;return a>=b&&a<=d||c>=b&&c<=d},_isBusy:function(){return f.contains(this._indicator,"busy")},_shouldUpdateIndicator:function(a){return this._currentRegion!==a||-1===a},_setCacheOnDataUpdate:function(a){var c=this._model.getRegions()[a-1];c?(this._currentRegion=a,this._setCache(c.code.regionPositions)):this._currentRegion=-1},_setCache:function(c){this._clearCache();this._currentStartPosition=this._document.createLinePosition(c[0].getNode());
this._positionChangeListeners.push(g.after(this._currentStartPosition,"onChange",a.hitch(this,"_setBusyLine")));this._currentEndPosition=this._document.createLinePosition(c[c.length-1].getNode());this._positionChangeListeners.push(g.after(this._currentEndPosition,"onChange",a.hitch(this,"_setBusyLine")))},_clearCache:function(){this._currentStartPosition&&this._currentEndPosition&&(this._document.deletePosition(this._currentStartPosition),this._document.deletePosition(this._currentEndPosition),this._currentEndPosition=
this._currentStartPosition=null,this._positionChangeListeners.forEach(function(a){a.remove()}),this._positionChangeListeners=[])},_setBusyLine:function(){this._currentStartPosition&&(this._currentEndPosition&&!this._checkCache())&&this._viewService.executeViewAction(a.hitch(this,"_setPositionAndAddIndicator"))},_setPositionAndAddIndicator:function(){this._addIndicator();this._setPositioning()},_setPositioning:function(){if(this._currentStartPosition&&this._currentEndPosition){var a=p.getVerticalDimensionsBetweenPositions(this._currentStartPosition,
this._currentEndPosition,this._view),c=a.bottom-a.top,a=a.top,b=this._view.getDomTargetPosition().scrollTop;this._isBusy()&&d.set(this._indicator,{top:this._gutterTop+a-b+"px",height:c+"px"});this._setMarginPositioning()}},_addIndicator:function(){f.add(this._indicator,"busy")},_removeIndicator:function(){f.remove(this._indicator,"busy");d.set(this._indicator,{top:"0px",height:"0px"});this._stopAnimation();this._clearCache();this._currentRegion=-1},_startAnimation:function(){if(null===this._busyLineAnimationTimer){var c=
l.getAnimationFrameRate(this._preferences),c=this._ONE_SECOND/c,b=this._ANIMATION_LENGTH/c,d=0,e=1;this._busyLineAnimationTimer=setInterval(a.hitch(this,function(){var a=d/b;1<a||0>a?e*=-1:this._setAnimationPercent(a);d+=e}),c)}},_setAnimationPercent:function(a){d.set(this._indicator,{backgroundColor:"rgba(0,0,0,"+(0.5-0.25*a)+")"})},_stopAnimation:function(){null!==this._busyLineAnimationTimer&&(clearInterval(this._busyLineAnimationTimer),this._busyLineAnimationTimer=null)},_setMarginPositioning:function(){var a=
this._getGutter().style,c=parseFloat(a.left)+this._PADDING,a=parseFloat(a.width);d.set(this._indicator,{left:c+"px",width:a+"px"})},_viewUpdated:function(a){if(m.hasOffsetHeightEvent(a)){var c=this._getGutter();if(p.isDescendant(c,this._rtcDomNode)){var c=c.getBoundingClientRect().top,b=this._rtcDomNode.getBoundingClientRect().top;this._gutterTop=c-b}else this._gutterTop=0}(m.hasScrollEvent(a)||m.hasHeightEvent(a)||m.hasLayoutEvent(a))&&this._setPositioning()},_getGutter:function(){return this._executionMargin.getMarginElement()}})})},
"MW/rtc/plugins/embeddedoutputs/view/AnimationUtilities":function(){define([],function(){return{_ANIMATION_FRAMERATE:30,_ANIMATION_FRAMERATE_THROTTLED:10,_SHOULD_THROTTLE_PREFERENCE:"LiveEditorEmbeddedOutputsThrottleFrameRate",constructor:function(){},destroy:function(){},getAnimationFrameRate:function(g){return g.getValue(this._SHOULD_THROTTLE_PREFERENCE,!1)?this._ANIMATION_FRAMERATE_THROTTLED:this._ANIMATION_FRAMERATE}}})},"MW/rtc/plugins/embeddedoutputs/view/ReadyBusyIndicator":function(){define("dijit/Tooltip dojo/aspect dojo/dom-class dojo/dom-construct dojo/dom-style dojo/on dojo/_base/declare dojo/_base/lang dojo/i18n!l10n/nls/actions dojo/text!MW/rtc/plugins/embeddedoutputs/view/templateError.html MW/rtc/plugins/debug/DebugServicesFactory MW/rtc/plugins/embeddedoutputs/outputhandlers/error/ErrorOutput MW/rtc/plugins/embeddedoutputs/view/AnimationUtilities MW/rtc/plugins/embeddedoutputs/view/Spinner MW/rtc/plugins/view/tooltip/TooltipUtilities MW/rtc/view/ViewEventUtilities MW/rtc/view/ViewUtilities".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t){return c(null,{_READY_MESSAGE:"",_BUSY_MESSAGE:k.scriptIsBusy,_BUSY_NO_CLICK_MESSAGE:k.scriptIsBusyNoClick,_PAUSED_MESSAGE:k.scriptIsPaused,_PAUSED_NO_CLICK_MESSAGE:k.scriptIsPausedNoClick,_ERROR_MESSAGE:k.scriptHasError,_INDICATOR_STATES:{READY:"ready",ERROR:"error"},_SCROLL_PERCENT:33,_SPINNER_SIZE:16,_ANIMATION_LENGTH:1E3,_WIDTH_OF_EMPTY_MARGIN:18,constructor:function(a,c,b,e,k,l,p,s,t,I,L,C,M,G,N){this._model=a;this._cursor=c;this._stateHandler=b;this._internalDocument=
e;this._focusService=k;this._rtcDomNode=l;this._margin=p;this._view=s;this._syntaxErrorHandler=I;this._document=L;this._backingStore=C;this._lineNumberTracker=M;this._cursorController=G;this._executionDataManager=N;this._debugServices=m.getInstance();this._aspectHandles=[];this._aspectHandles.push(f.after(this._stateHandler,"stateChanged",h.hitch(this,"_stateChangeListener"),!0));this._aspectHandles.push(f.after(e,"onDocumentReset",h.hitch(this,"_resetError")));this._aspectHandles.push(f.after(this._model,
"onModelUpdated",h.hitch(this,"_resetError")));this._aspectHandles.push(f.after(this._margin,"onResize",h.hitch(this,"_setMarginPositioning")));this._aspectHandles.push(f.after(this._view,"onViewUpdated",h.hitch(this,"_handleViewUpdated"),!0));this._aspectHandles.push(f.after(this._syntaxErrorHandler,"onSyntaxError",h.hitch(this,"_handleSyntaxError")));this._aspectHandles.push(f.after(this._executionDataManager,"onDataUpdate",h.hitch(this,"_handleDataUpdate"),!0));this._aspectHandles.push(f.after(this._debugServices,
"onDBStop",h.hitch(this,"_handleDBStop"),!0));this._aspectHandles.push(f.after(this._debugServices,"onDBCont",h.hitch(this,"_handleDBCont")));this._indicator=null;this._isPaused=!1;this._createBusyIndicator();this._setMarginPositioning();this._busySpinner=new q({size:this._SPINNER_SIZE,animationLength:this._ANIMATION_LENGTH,frameRate:n.getAnimationFrameRate(t)});this._tooltip=new g({connectId:[this._indicator],label:r.createUnfocusableTooltipTextHTML(this._READY_MESSAGE)});this._currentIndicator=
this._INDICATOR_STATES.READY;this._clickHandle=null;d.place(this._indicator,l,"last")},_createBusyIndicator:function(){this._indicator=d.create("div",{className:"busyHolder"});this._holder=d.create("div",{className:"progressHolder"});d.place(this._holder,this._indicator)},destroy:function(){this._aspectHandles.forEach(function(a){a.remove()});this._destroyPausePosition();this._tooltip.destroy();this._aspectHandles=[];this._removeClickHandle();d.destroy(this._indicator)},_stateChangeListener:function(a){switch(a){case this._stateHandler.CHANGE_TYPE_ENUM.EVAL_INITIALIZED:this._handleEvalInitialized();
break;case this._stateHandler.CHANGE_TYPE_ENUM.EVAL_COMPLETE:this._handleEvalCompleted()}},_handleEvalInitialized:function(){this._clearStatus();e.add(this._indicator,"busy");this._tooltip.label=r.createUnfocusableTooltipTextHTML(this._BUSY_NO_CLICK_MESSAGE);this._startAnimation()},_handleEvalCompleted:function(){this._busySpinner.remove();this._tooltip.close();this._isPaused=!1;this._destroyPausePosition();this._model.hasError()?this._setError():this._ready()},_clearStatus:function(){this._busySpinner.remove();
e.remove(this._indicator,"error");this._holder.innerHTML=""},_handleSyntaxError:function(){var a=this._syntaxErrorHandler.getFirstSyntaxErrorOutput();a&&this._clickMethod(a.codeLinePositions[0])},_handleDataUpdate:function(a){this._updateBusyRegion(a-1)},_updateBusyRegion:function(a){if(!this._isPaused&&(this._destroyPausePosition(),a=this._model.getRegions()[a])){var c=null===this._clickHandle;this._setClickPosition(a);c&&(this._tooltip.label=r.createUnfocusableTooltipTextHTML(this._BUSY_MESSAGE))}},
_handleDBStop:function(a,c){this._isPaused=!0;this._stateHandler.isRunning()&&(this._busySpinner.pause(),this._tooltip.label=r.createUnfocusableTooltipTextHTML(this._PAUSED_MESSAGE),a===this._backingStore.getAbsoluteFilePath()&&(0===c?(this._tooltip.label=r.createUnfocusableTooltipTextHTML(this._PAUSED_NO_CLICK_MESSAGE),this._destroyPausePosition(),this._removeClickHandle()):(0>c&&(c=-c),c-=1,this._destroyPausePosition(),this._pausePosition=this._lineNumberTracker.createPositionFromOldLineNumber(c),
this._removeClickHandle(),this._createClickHandle(this._pausePosition))))},_handleDBCont:function(){this._isPaused=!1;this._stateHandler.isRunning()&&this._startAnimation()},_destroyPausePosition:function(){this._pausePosition&&(this._pausePosition.destroy(),this._pausePosition=null)},_setClickPosition:function(a){a=a.code.regionPositions[0];this._removeClickHandle();this._createClickHandle(a)},_startAnimation:function(){this._busySpinner.isActive()||(this._busySpinner.placeAt(this._holder),this._busySpinner.startup())},
_ready:function(){this._currentIndicator=this._INDICATOR_STATES.READY;e.remove(this._indicator,"busy");this._tooltip.label=r.createUnfocusableTooltipTextHTML(this._READY_MESSAGE);this._removeClickHandle()},_resetError:function(){this._currentIndicator===this._INDICATOR_STATES.ERROR&&!this._model.hasError()&&(this._clearStatus(),this._currentIndicator=this._INDICATOR_STATES.READY,this._tooltip.label=r.createUnfocusableTooltipTextHTML(this._READY_MESSAGE))},_setError:function(){this._currentIndicator=
this._INDICATOR_STATES.ERROR;e.add(this._indicator,"error");this._holder.innerHTML=l;e.remove(this._indicator,"busy");this._tooltip.label=r.createUnfocusableTooltipTextHTML(this._ERROR_MESSAGE);var a=this._model.findOutput(function(a){return a.isInstanceOf(p)});this._removeClickHandle();this._createClickHandle(a.codeLinePositions[0])},_createClickHandle:function(c){this._clickHandle=a(this._indicator,"click",h.hitch(this,"_clickMethod",c))},_clickMethod:function(a){var c=a.getNode();this._cursorController.clearSelection();
a.getLineColumn().line!==this._cursor.getLineColumn().line&&this._cursor.setPosition(c,0,!1);this._view.scrollNodeToPercent(c,this._SCROLL_PERCENT);this._focusService.setFocus()},_removeClickHandle:function(){this._clickHandle&&(this._clickHandle.remove(),this._clickHandle=null)},setState:function(a){this._resetError();a===this._INDICATOR_STATES.ERROR&&this._setError()},getState:function(){return this._currentIndicator},_setMarginPositioning:function(){var a=parseFloat(this._margin.lineMargin.style.width)-
this._WIDTH_OF_EMPTY_MARGIN;b.set(this._indicator,{width:a+"px",height:this._SPINNER_SIZE+4+"px"});b.set(this._holder,{left:(a-this._SPINNER_SIZE)/2+"px"})},_handleViewUpdated:function(a){if(s.hasOffsetHeightEvent(a)){a=0;if(t.isDescendant(this._margin.lineMargin,this._rtcDomNode)){a=this._margin.lineMargin.getBoundingClientRect().top;var c=this._rtcDomNode.getBoundingClientRect().top;a=Math.max(a-c,0)}this._indicator.style.top=a+"px"}}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/error/ErrorOutput":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/query mw-html-utils/HtmlUtils MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseOutput MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerUtility ./ErrorOutputProperties".split(" "),
function(g,f,e,d,b,a,c,h){return g([a],{type:h.OUTPUT_TYPE,constructor:function(a){this._data=a.data;this._diagnosticMessageFormatter=a.diagnosticMessageFormatter;this._lineNumberTracker=a.lineNumberTracker;a=b.treatHtmlLikeCommandWindow(this._data.text);this._domElement=this._diagnosticMessageFormatter.createErrorMessageWithStack(a).getDomNode();this._data.stackLineNumber&&(this.stackLineNumber=this._lineNumberTracker.createPositionFromOldLineNumber(this._data.stackLineNumber-1),this.identifier=
this._data.identifier)},getCssTag:function(){return h.CSS_TAG},getDomElement:function(){return this._domElement},getSerializableData:function(){return{text:this._removeScrollToLinks(this._data.text),errorType:this._data.errorType}},getText:function(){return c.getText(this._data.text)},getHTML:function(a,c){var b=this._domElement.cloneNode(!0);d(".doNotExport",b).forEach(function(a){e.destroy(a)});return b.innerHTML},_removeScrollToLinks:function(a){var c=RegExp('\x3ca href\x3d"matlab:opentoline\\(\'(?:[^\\/\\\\]*?\\.mlx)\', (?:[0-9]+), (?:[0-9]+)\\)" style\x3d"font-weight:bold"\x3e([^\x3c]*?)\x3c\\/a\x3e',
"g");a=a.replace(/<a href="matlab:opentoline\('(?:[^\/\\]*?\.mlx)', (?:[0-9]+), (?:[0-9]+)\)">([^<]*?)<\/a>/g,"$1");return a=a.replace(c,"\x3cstrong\x3e$1\x3c/strong\x3e")},getErrorType:function(){return this._data.errorType}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseOutput":function(){define(["dojo/_base/declare","mw-utils/Utils"],function(g,f){return g(null,{type:null,uid:null,codeLinePositions:null,constructor:function(){this.uid=f.generateUuid()},destroy:function(){},getCodeLinePositions:function(){return this.codeLinePositions},
setCodeLinePositions:function(e){this.codeLinePositions=e},getCssTag:function(){throw Error("Unimplemented API: MW.rtc.plugins.embeddedoutputs.outputhandlers.BaseOutput.getCssTag()");},getDomElement:function(){throw Error("Unimplemented API: MW.rtc.plugins.embeddedoutputs.outputhandlers.BaseOutput.getDomElement()");},startup:function(){},getSerializableData:function(){throw Error("Unimplemented API: MW.rtc.plugins.embeddedoutputs.outputhandlers.BaseOutput.getSerializableData()");},getText:function(){throw Error("Unimplemented API: MW.rtc.plugins.embeddedoutputs.outputhandlers.BaseOutput.getText()");
},getHTML:function(e,d){throw Error("Unimplemented API: MW.rtc.plugins.embeddedoutputs.outputhandlers.BaseOutput.getHTML()");},isReady:function(){return!0},getReadyPromise:function(){throw Error("Unimplemented API: MW.rtc.plugins.embeddedoutputs.outputhandlers.BaseOutput.getReadyPromise()");}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerUtility":function(){define(["dojo/dom-construct"],function(g){return{getText:function(f){f=g.create("div",{innerHTML:f});f.innerHTML=f.innerHTML.replace(/<br>/g,
"\n");var e=f.textContent;g.destroy(f);return e},removeControlCharacters:function(f){return f.replace(/[\x00-\x07\x0B\x0C\x0E-\x1F\x7F-\x9F]/g,"")},processBackspaceCharacters:function(f){for(;-1!==f.indexOf("\b");)f=f.replace(/[\s\S]?\x08/,"");return f}}})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/error/ErrorOutputProperties":function(){define([],function(){return{OUTPUT_TYPE:"error",CSS_TAG:"embeddedOutputsErrorElement",SYNTAX_ERROR_TYPE:"syntax",RUNTIME_ERROR_TYPE:"runtime"}})},"MW/rtc/plugins/embeddedoutputs/view/Spinner":function(){define(["dojo/_base/declare",
"dojo/_base/lang"],function(g,f){return g(null,{_SVG_NAMESPACE:"http://www.w3.org/2000/svg",_ONE_SECOND:1E3,constructor:function(e){e=e||{};this.size=e.size||24;this.frameRate=e.frameRate||30;this.animationLength=e.animationLength||1E3;this._reset();this._initializeSizing();this._createSpinner()},destroy:function(){this.remove();this._reset()},isActive:function(){return null!==this._spinnerTimer},placeAt:function(e){this._attachPoint=e;this._attachPoint.appendChild(this._spinner)},remove:function(){this.stop();
this._attachPoint&&this._spinner.parentNode===this._attachPoint&&(this._attachPoint.removeChild(this._spinner),this._attachPoint=null)},startup:function(){if(this._attachPoint){var e=this._ONE_SECOND/this.frameRate;this._startTime=(new Date).getTime();this._spinnerTimer=setInterval(f.hitch(this,"_processFrame"),e)}},stop:function(){clearInterval(this._spinnerTimer);this._spinnerTimer=null},pause:function(){this.stop();this._renderPercentage(0)},_reset:function(){this._attachPoint=this._spinnerTimer=
this._spinner=null;this._startTime=0},_initializeSizing:function(){this._centerX=this.size/2;this._centerY=this.size/2;this._width=this.size/6;this._radius=(this.size-this._width)/2;this._circumference=2*Math.PI*this._radius;this._rotationalOffset=0.25*this._circumference},_createSpinner:function(){this._spinner=document.createElementNS(this._SVG_NAMESPACE,"svg");this._spinner.setAttribute("height",this.size+"px");this._spinner.setAttribute("width",this.size+"px");var e=this._createCircle();e.setAttribute("class",
"donutGutter");this._spinner.appendChild(e);this._animatedElement=this._createCircle();this._animatedElement.setAttribute("class","donutProgress");this._spinner.appendChild(this._animatedElement)},_createCircle:function(){var e=document.createElementNS(this._SVG_NAMESPACE,"circle");e.setAttribute("r",this._radius);e.setAttribute("cx",this._centerX);e.setAttribute("cy",this._centerY);e.setAttribute("style","stroke-width: "+this._width+"px;");return e},_processFrame:function(){var e=this._getCurrentPercent(this._startTime,
this.animationLength);this._renderPercentage(e)},_renderPercentage:function(e){var d=this._getHeadPercent(e),b=this._getTailPercent(e);e=this._getStrokeLength(d,b,this._circumference);d=this._getStrokeGap(d,b,this._circumference);b=this._getStrokeStart(b,this._circumference);this._animatedElement.style["stroke-dasharray"]=e+", "+d;this._animatedElement.style["stroke-dashoffset"]=this._rotationalOffset-b},_getCurrentPercent:function(e,d){return((new Date).getTime()-e)%d/d},_getHeadPercent:function(e){var d=
1+Math.pow(e/702664100,0.2632525);return 0.75>=e?228.9139+-228.91373830770002/d:1},_getTailPercent:function(e){var d=1+Math.pow(e/0.6602402,7.174857);return 0.25<=e?1.050912+-1.0519016562/d:0},_getStrokeLength:function(e,d,b){return(e-d)*b},_getStrokeGap:function(e,d,b){return(1-(e-d))*b},_getStrokeStart:function(e,d){return e*d}})})},"MW/rtc/plugins/embeddedoutputs/view/ScrollableOutputStyler":function(){define("dojo/_base/declare dojo/_base/event dojo/_base/lang dojo/dom dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/on mw-gesture/GestureDetector mw-gesture/GestureRegistry MW/rtc/events/MouseEventUtil MW/rtc/plugins/embeddedoutputs/outputhandlers/error/ErrorOutputProperties MW/rtc/plugins/embeddedoutputs/outputhandlers/symbolic/SymbolicOutputProperties MW/rtc/plugins/embeddedoutputs/outputhandlers/text/TextOutputProperties MW/rtc/plugins/embeddedoutputs/outputhandlers/warning/WarningOutputProperties MW/rtc/plugins/embeddedoutputs/outputhandlers/variablestring/VariableStringOutputProperties".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s){return g(null,{MARGIN_PADDING_BUFFER:30,_SCROLLBAR_THICKNESS:11,_MAX_SCROLLABLE_HEIGHT:250,_OVERFLOW_THRESHOLD:3,constructor:function(a,c){this._viewModel=a;this._rtcDomNode=c;this._listeners=new Map},destroy:function(){},layout:function(a,c){this._styleScrollableOutputs(c);this._cleanUpScrollListeners()},onStyledWithHeightChange:function(a){},_styleScrollableOutputs:function(a){var c=!1,b=this._viewModel.getOutputDivs(),c=this._styleTextOutputsIfRequired(b)||
c;if(c=this._styleOutputs(b)||c)this.onStyledWithHeightChange(a)},_styleOutputs:function(a){a=a.map(function(a){if(a.firstElementChild&&a.firstElementChild.getStyler)return a.firstElementChild.getStyler().getStyleChange(a)});a=a.filter(function(a){return!!a});var c=!1;a.forEach(function(a){a=a.output.firstElementChild.getStyler().applyStyleChange(a);c=c||a});return c},_styleTextOutputsIfRequired:function(d){d=d.filter(function(a){return b.contains(a,q.CSS_TAG)||b.contains(a,s.CSS_TAG)||b.contains(a,
p.CSS_TAG)||b.contains(a,r.CSS_TAG)||b.contains(a,n.CSS_TAG)}).map(e.hitch(this,"_getTextStyleChange",a),this);d=d.filter(function(a){return!!a});var h=!1;d.forEach(function(a){a=this._makeTextStyleChange(b,c,a);h=h||a},this);var f=d.some(function(a){return a.hadHorizontalOverflow!==a.hasHorizontalOverflow},this),k=d.map(this._isOutputOverflown,this);d.forEach(function(a,c){this._setOverflowState(a,k[c])},this);d.forEach(function(a,c){this._makeScrollPositionChange(a,k[c])},this);return h||f},_getTextStyleChange:function(a,
c){var b=a.getMarginBox(c).w-this.MARGIN_PADDING_BUFFER,d=parseFloat(c.getAttribute("data-width")),e=c.scrollHeight,h=parseFloat(c.getAttribute("data-height")),f="true"===c.getAttribute("data-hasHorizontalOverflow"),k=parseFloat(c.getAttribute("data-scroll-top"))||0,g=parseFloat(c.getAttribute("data-scroll-left"))||0,l=Math.max(0,c.scrollHeight-c.clientHeight),m=Math.max(0,c.scrollWidth-c.clientWidth),k=Math.min(l,k),g=Math.min(m,g),d=this._hasWidthChanged(b,d),e=this._hasHeightChanged(e,h);return!d&&
!e&&!this._hasScrollPositionChanged(c.scrollTop,k)&&!this._hasScrollPositionChanged(c.scrollLeft,g)?null:{output:c,availableWidth:b,isElementGrowable:this._isElementGrowable(c),scrollHeight:c.scrollHeight,scrollTop:k,scrollLeft:g,hasHeightChange:e,hadHorizontalOverflow:f,hasHorizontalOverflow:this._hasHorizontalOverflow(c)}},_makeTextStyleChange:function(a,c,b){b.output.setAttribute("data-width",b.availableWidth);b.output.setAttribute("data-height",b.scrollHeight);b.output.setAttribute("data-hasHorizontalOverflow",
b.hasHorizontalOverflow);b.output.style.maxHeight=(b.isElementGrowable?b.scrollHeight:this._MAX_SCROLLABLE_HEIGHT)+this._SCROLLBAR_THICKNESS+"px";return b.hasHeightChange},_makeScrollPositionChange:function(a,c){c?(a.output.scrollTop=a.scrollTop,a.output.scrollLeft=a.scrollLeft,this._addListeners(a.output)):this._removeListenersForOutput(a.output)},_setOverflowState:function(a,c){c?b.add(a.output,"scrollableOutput"):b.remove(a.output,"scrollableOutput")},_isElementGrowable:function(a){return a.scrollHeight<
2*this._MAX_SCROLLABLE_HEIGHT&&a.scrollHeight>this._MAX_SCROLLABLE_HEIGHT},_hasWidthChanged:function(a,c){return this._hasDimensionChanged(a,c)},_hasHeightChanged:function(a,c){return this._hasDimensionChanged(a,c)},_hasDimensionChanged:function(a,c){return isNaN(c)?!0:a&&0!==a&&Math.abs(a-c)>this._OVERFLOW_THRESHOLD},_hasScrollPositionChanged:function(a,c){return c!==a},_addListeners:function(a){if(!this._listeners.has(a)){var c=h(a,m.MOUSEWHEEL,e.hitch(this,"_checkScroll",a)),b=h(a,"scroll",e.hitch(this,
"_handleScrollEvent",a)),d=new k(a,[l.tapmove({options:{numTaps:0},callbacks:{began:e.hitch(this,"_handleDownEvent")}})]);this._listeners.set(a,{mouseWheelScrollListener:c,scrollListener:b,gestureDetector:d})}},_removeListenersForOutput:function(a){var c=this._listeners.get(a);c&&(this._removeListeners(c),this._listeners["delete"](a))},clearListeners:function(){this._listeners.forEach(this._removeListeners);this._listeners.clear()},_removeListeners:function(a){a.mouseWheelScrollListener.remove();
a.scrollListener.remove();a.gestureDetector.destroy()},_checkScroll:function(a,c){var b=this._checkVerticalScroll(a,c),d=this._checkHorizontalScroll(a,c);(b||d)&&c.stopPropagation()},_handleScrollEvent:function(a,c){this._updateScrollTopAttribute(a);this._updateScrollLeftAttribute(a)},_updateScrollTopAttribute:function(a){a.setAttribute("data-scroll-top",a.scrollTop)},_updateScrollLeftAttribute:function(a){a.setAttribute("data-scroll-left",a.scrollLeft)},_cleanUpScrollListeners:function(){var a=[];
this._listeners.forEach(function(c,b){d.isDescendant(b,this._rtcDomNode)||a.push(b)},this);a.forEach(this._removeListenersForOutput,this)},_checkVerticalScroll:function(a,c){var b=!1,d=a.scrollTop,e=a.scrollHeight-a.clientHeight,h=m.getVerticalScrollDistance(c);0<h?b=0!==d:0>h&&(b=d!==e);return b},_checkHorizontalScroll:function(a,c){var b=!1,d=a.scrollLeft,e=a.scrollWidth-a.clientWidth,h=m.getHorizontalScrollDistance(c);0<h?b=0!==d:0>h&&(b=d!==e);return b},_handleDownEvent:function(a){a=a.srcEvent;
m.isEventInScrollbarTrack(a)&&f.stop(a)},_isOutputOverflown:function(a){a=a.output;return this._hasVerticalOverflow(a)||this._hasHorizontalOverflow(a)},_hasVerticalOverflow:function(a){return a.scrollHeight-a.getBoundingClientRect().height>this._OVERFLOW_THRESHOLD},_hasHorizontalOverflow:function(a){return a.scrollWidth-a.getBoundingClientRect().width>this._OVERFLOW_THRESHOLD}})})},"mw-gesture/GestureDetector":function(){define(["dojo/_base/declare","./input/PointerInput","./input/WheelInput"],function(g,
f,e){return function(d,b){var a=[],c=f.fromNode(d),h=e.fromNode(d),k=function(b){Array.isArray(b)||(b=[b]);b.forEach(function(a){a.attachInputStream(c);a.attachInputStream(h)});a=a.concat(b)};b&&k(b);return{add:k,remove:function(a){},getAttachedRecognizers:function(){return a},destroy:function(){c.destroy();h.destroy();a.forEach(function(a){return a.destroy()})},preventFocus:function(){c.preventFocus()},allowFocus:function(){c.allowFocus()},stopPropagation:function(){c.stopPropagation();h.stopPropagation()},
allowPropagation:function(){c.allowPropagation();h.allowPropagation()},preventDefault:function(){c.preventDefault();h.preventDefault()},allowDefault:function(){c.allowDefault();h.allowDefault()},addHoverListeners:function(){return c.addHoverListeners()},resetAll:function(){c.clearInput();a&&a.forEach(function(a){return a.reset()})}}}})},"mw-gesture/input/PointerInput":function(){define(["../util/DomUtils","../util/InputDataUtil","../events/Observable","../events/RemovableGroup","./PointerInputUtil"],
function(g,f,e,d,b){var a=g.addDomListener,c=g.preventDefault,h=g.stopPropagation;g=b.getActiveImplementations;var k=b.getImplementationForEvent,l=b.addListenersToRemovable,m=b.updateLastTouch,p=b.isCompatibilityEvent,n=g(),q=null;return{fromNode:function(b,g){var t=d(),u=d(),v=d(),w=d(),x=d(),y=d(),B=b.ownerDocument,D=[],E=[],F=e(),I=function(a){var c=a;q=m(a,q);p(a,q)&&(c=null);return c},L=function(a){F.emit(f.createFromPointers(D,a,b))},C=function(a){if(a=I(a))k(a).addEventToPointers(D,a),L(a)},
M=function(a){if(a=I(a)){var c=k(a);c.addEventToPointers(D,a);L(a);c.removeEventFromPointers(D,a);0===D.length&&u.remove()}},G=function(a){if(a=I(a)){var c=k(a);c&&c.addEventToPointers(D,a);u.remove();L(a);D=[]}},N=function(a){if((a=I(a))&&0===a.buttons)E=[a],F.emit(f.createFromPointers(E,a,b))},t=l(n,t,b,{down:function(c){if(c=I(c))k(c).addEventToPointers(D,c),u=l(n,u,B,{move:C,up:M,cancel:G},!0),t.own(a(b,"dragstart",G,!1)),t.own(a(b,"drag",G,!1)),t.own(a(b,"dragend",G,!1)),L(c)}},!1);return{EVENT_SET:"pointers",
subscribe:F.subscribe,preventFocus:function(){v.remove();v=l(n,v,b,{down:c},!1)},allowFocus:function(){v.remove()},stopPropagation:function(){w.remove();w=l(n,w,b,{down:h,move:h,up:h},!1)},allowPropagation:function(){w.remove()},preventDefault:function(){x.remove();x=l(n,x,b,{down:c,move:c,up:c},!1)},allowDefault:function(){x.remove()},clearInput:function(){u.remove();D=[]},addHoverListeners:function(){y.remove();return y=l(n,y,b,{move:N},!1)},destroy:function(){t.remove();u.remove();v.remove();w.remove();
x.remove();y.remove()}}}}})},"mw-gesture/util/DomUtils":function(){define([],function(){return{isAncestorNode:function(g,f){for(var e=!1;f;){if(f===g){e=!0;break}f=f.parentNode}return e},addDomListener:function(g,f,e,d){g.addEventListener(f,e,d);return{remove:function(){g.removeEventListener(f,e,d)}}},preventDefault:function(g){g.preventDefault()},stopPropagation:function(g){g.stopPropagation()}}})},"mw-gesture/util/InputDataUtil":function(){define(["./InputTypes","./PointerUtil","../util/PointerProperties",
"../input/PointerInputUtil"],function(g,f,e){var d=f.isPrimary,b=f.getXY,a=e.calculateProperties,c={pointerdown:g.DOWN,pointermove:g.MOVE,pointerup:g.UP,pointercancel:g.CANCEL,touchstart:g.DOWN,touchmove:g.MOVE,touchend:g.UP,touchcancel:g.CANCEL,mousedown:g.DOWN,mousemove:g.MOVE,mouseup:g.UP,"":g.CANCEL},h=function(a){var b=null;a&&a.srcEvent&&(b=c[a.srcEvent.type]);return b};return{createFromPointers:function(c,b,d){b._softTimestamp=Date.now()+(b.detail?b.detail:0);c=c.slice();var e=a(c,b),h=[b],
f=b?b.target:null;f||(b.touches&&b.touches[0]?f=b.touches[0].target:b.changedTouches&&b.changedTouches[0]&&(f=b.changedTouches[0].target));return{type:"inputData",pointers:c,properties:e,changedPointers:h,srcEvent:b,target:f,srcNode:d}},createTimeout:function(){return{type:"inputData",isTimeout:!0}},isSinglePrimary:function(a){return a.pointers&&1===a.pointers.length&&d(a.pointers[0])},isDown:function(a){return h(a)===g.DOWN},isMove:function(a){return h(a)===g.MOVE},isUp:function(a){return h(a)===
g.UP},isCancel:function(a){return h(a)===g.CANCEL},isTimeout:function(a){return!!a.isTimeout},isWheel:function(a){return(a=a.srcEvent)&&"wheel"===a.type},getInputType:h,getCenterPoint:function(a){var c={x:NaN,y:NaN};a&&a.properties&&(c=a.properties.center);return c},getPointerLocations:function(a){return a.pointers.map(b)},getTimestamp:function(a){return a&&a.srcEvent?a.srcEvent._softTimestamp:NaN}}})},"mw-gesture/util/InputTypes":function(){define([],function(){return{DOWN:"down",MOVE:"move",UP:"up",
CANCEL:"cancel"}})},"mw-gesture/util/PointerUtil":function(){define([],function(){return{isPrimary:function(g){return g.isPrimary||1===g.pointerId||0===g.button||"Touch"===g.constructor.name},getXY:function(g){return{x:g.clientX,y:g.clientY}}}})},"mw-gesture/util/PointerProperties":function(){define(["./GeomUtil","./TimeUtils","./PointerUtil"],function(g,f,e){var d=e.getXY,b=f.getTimestamp,a=g.getCenter,c=g.getAngle,h=g.getSpread,k=g.computeDistance,l=g.computeDirection;return{calculateProperties:function(e,
f){var k=e.map(d);return{center:a(k),angle:c(k),spread:h(k),timestamp:b(f)}},compareProperties:function(a,c,b){c||(c=a);b||(b=c);var d=a.timestamp-b.timestamp,e=k(b.center,a.center);return{center:{current:a.center,initial:c.center,previous:b.center,delta:k(c.center,a.center),velocity:{x:e.x/d,y:e.y/d},direction:l(b.center,a.center)},angle:{current:a.angle,initial:c.angle,previous:b.angle,delta:a.angle-c.angle,velocity:(a.angle-b.angle)/d},spread:{current:a.spread,initial:c.spread,previous:b.spread,
delta:a.spread-c.spread,velocity:(a.spread-b.spread)/d},timestamp:{current:a.timestamp,initial:c.timestamp,previous:b.timestamp,delta:a.timestamp-c.timestamp}}}}})},"mw-gesture/util/GeomUtil":function(){define(["./Directions"],function(g){var f=g.DIRECTION_UP,e=g.DIRECTION_RIGHT,d=g.DIRECTION_DOWN,b=g.DIRECTION_LEFT,a=g.DIRECTION_NONE,c=function(a){return a.x},h=function(a){return a.y},k=function(a){return{max:{x:Math.max.apply(null,a.map(c)),y:Math.max.apply(null,a.map(h))},min:{x:Math.min.apply(null,
a.map(c)),y:Math.min.apply(null,a.map(h))}}},l=function(a,c){return{x:c.x-a.x,y:c.y-a.y}},m=function(a,c){return p(l(a,c))},p=function(a){var c=Math.pow(a.x,2);a=Math.pow(a.y,2);return Math.sqrt(c+a)};return{arePointsWithinRadius:function(a,c,b){var d=void 0,e=void 0,d=void 0;if(!a||!c)return!1;d=a.x-c.x;e=a.y-c.y;d=Math.sqrt(d*d+e*e);return d<b},getCenter:function(a){var c=k(a);a=c.max;c=c.min;return{x:(a.x+c.x)/2,y:(a.y+c.y)/2}},getAngle:function(a){var c=k(a);a=c.max;c=c.min;return Math.atan2(a.y-
c.y,a.x-c.x)*(180/Math.PI)},getSpread:function(a){a=k(a);return m(a.max,a.min)},computeDistance:l,computeMagnitude:p,computeDistanceMagnitude:m,computeDirection:function(c,h){var k=a,g=h.x-c.x,l=h.y-c.y;if(0!==g||0!==l)k=Math.abs(g)>Math.abs(l)?0>g?b:e:0>l?f:d;return k}}})},"mw-gesture/util/Directions":function(){define([],function(){return{DIRECTION_UP:"up",DIRECTION_RIGHT:"right",DIRECTION_DOWN:"down",DIRECTION_LEFT:"left",DIRECTION_NONE:"none"}})},"mw-gesture/util/TimeUtils":function(){define([],
function(){return{isWithinTimeout:function(g,f,e){return Math.abs(g-f)<e},getTimestamp:function(g){return g._softTimestamp?g._softTimestamp:g.timestamp}}})},"mw-gesture/input/PointerInputUtil":function(){define(["../util/DomUtils","./impl/pointer","./impl/touch","./impl/mouse"],function(g,f,e,d){var b=g.addDomListener;g=!!window.PointerEvent;var a="ontouchstart"in window,c=g?[f]:a?[e,d]:[d],h=!g&&a,k={mousedown:!0,mousemove:!0,mouseup:!0},l={pointerdown:!0,pointermove:!0,pointerup:!0},m={touchstart:!0,
touchmove:!0,touchend:!0,touchcancel:!0},p=function(a){return a&&a.type&&k[a.type]},n=function(a){return a&&a.type&&l[a.type]},q=function(a){return a&&a.type&&m[a.type]};return{isTouchEvent:q,isPointerEvent:n,isMouseEvent:p,getActiveImplementations:function(){return c},getImplementationForEvent:function(a){var c=null;p(a)&&(c=d);n(a)&&(c=f);q(a)&&(c=e);return c},addListenersToRemovable:function(a,c,d,e,h){a.forEach(function(a){for(var f in e)e.hasOwnProperty(f)&&c.own(b(d,a[f],e[f],h))});return c},
updateLastTouch:function(a,c){var b=c;q(a)&&(a._softTimestamp=Date.now(),b=a);return b},isCompatibilityEvent:function(a,c){var b=!1;if(c&&p(a)&&h)a:{var b=a.clientX,d=a.clientY,e=Date.now();if(!(c._softTimestamp+1E3<=e)){var e=c.changedTouches,f;for(f in e)if(e.hasOwnProperty(f)&&"length"!==f){var k=e[f],g=k.clientY,k=Math.abs(b-k.clientX),g=Math.abs(d-g);if(25>=k&&25>=g){b=!0;break a}}}b=!1}return b}}})},"mw-gesture/input/impl/pointer":function(){define([],function(){var g=function(f,e){for(var d=
void 0,b=-1,d=0;d<f.length;d++)f[d].pointerId===e.pointerId&&(b=d);-1===b&&(b=f.length);return b};return{type:"pointer",down:"pointerdown",move:"pointermove",up:"pointerup",cancel:"pointercancel",addEventToPointers:function(f,e){var d=g(f,e);f[d]=e;e.pointerType||(e.pointerType="mouse")},removeEventFromPointers:function(f,e){var d=g(f,e);f.splice(d,1)}}})},"mw-gesture/input/impl/touch":function(){define([],function(){var g=function(f,e){for(var d=void 0,b=-1,d=0;d<f.length;d++)f[d].identifier===e.identifier&&
(b=d);-1===b&&(b=f.length);return b};return{type:"touch",down:"touchstart",move:"touchmove",up:"touchend",cancel:"touchcancel",addEventToPointers:function(f,e){var d=e.touches,b=e.changedTouches[0],a;for(a in d)if(d.hasOwnProperty(a)&&"length"!==a){var c=g(f,d[a]);d[a].pointerId=c+1;f[c]=d[a]}e.pointerType="touch";"pageX pageY screenX screenY clientX clientY target".split(" ").forEach(function(a){try{a in e||(e[a]=b[a])}catch(c){}})},removeEventFromPointers:function(f,e){f.splice(0,f.length)}}})},
"mw-gesture/input/impl/mouse":function(){define([],function(){return{type:"mouse",down:"mousedown",move:"mousemove",up:"mouseup",cancel:"",addEventToPointers:function(g,f){if(0===f.button||2===f.button)f.pointerId=1,g[0]=f,f.pointerType="mouse"},removeEventFromPointers:function(g,f){for(var e=void 0,d=-1,e=0;e<g.length;e++)g[e].pointerId===f.pointerId&&(d=e);-1===d&&(d=g.length);g.splice(d,1)}}})},"mw-gesture/events/Observable":function(){define(["dojo/aspect"],function(g){return function(){var f=
{emit:function(e){}};return{subscribe:function(e){var d=g.after(f,"emit",e,!0);return{unsubscribe:function(){d.remove()}}},emit:function(e){f.emit(e)}}}})},"mw-gesture/events/RemovableGroup":function(){define([],function(){return function(){var g=[];return{own:function(f,e){var d=f;e&&(d={remove:function(){f[e].call(f)}});g.push(d)},remove:function(){g.forEach(function(f){f.remove()});g=[]}}}})},"mw-gesture/input/WheelInput":function(){define(["../util/DomUtils","../util/InputDataUtil","../events/Observable",
"../events/RemovableGroup"],function(g,f,e,d){var b=g.addDomListener,a=g.preventDefault,c=g.stopPropagation;return{fromNode:function(h,k){var g=d(),m=d(),p=d(),n=e();g.own(b(h,"wheel",function(a){n.emit(f.createFromPointers([],a,h))},!1));return{EVENT_SET:"wheel",subscribe:n.subscribe,stopPropagation:function(){m.remove();m.own(b(h,"wheel",c,!1))},allowPropagation:function(){m.remove()},preventDefault:function(){p.remove();p.own(b(h,"wheel",a,!1))},allowDefault:function(){p.remove()},destroy:function(){g.remove()}}}}})},
"mw-gesture/GestureRegistry":function(){define("./recognizers/GestureRecognizer ./util/ButtonValues ./gestures/tapmove ./gestures/tap ./gestures/click ./gestures/flick ./gestures/pan ./gestures/rotate ./gestures/pinch ./gestures/wheel ./gestures/hover".split(" "),function(g,f,e,d,b,a,c,h,k,l,m){var p=function(a,c){return function(b){if(c){b.options||(b.options={});for(var d in c)c.hasOwnProperty(d)&&(b.options[d]=c[d])}d=g(a(b.options));if(b.callbacks)for(var e in b.callbacks)if(b.callbacks.hasOwnProperty(e))d.on(e,
b.callbacks[e]);b&&(b.options&&b.options.pointerTypes)&&d.setPointerTypes(b.options.pointerTypes);return d}};return{click:p(b),tap:p(d),tapmove:p(e),slide:p(e,{numTaps:0}),flick:p(a),pan:p(c),rotate:p(h),pinch:p(k),doubleTap:p(d,{numTaps:2}),tripleTap:p(d,{numTaps:3}),leftClick:p(b,{button:f.LEFT}),rightClick:p(b,{button:f.RIGHT}),wheel:p(l),hover:p(m)}})},"mw-gesture/recognizers/GestureRecognizer":function(){define("dojo/aspect ../events/RemovableGroup ../coordination/RecognizerCoordinator ./RecognizerStates ./RecognizerStateUtil ../util/PointerTypes ../util/InputDataUtil".split(" "),
function(g,f,e,d,b,a,c){return function(h){var k=d.INACTIVE,l=null,m=f(),p=f(),n=void 0,q=[a.MOUSE,a.TOUCH,a.PEN],r={began:function(a,c){},progress:function(a,c){},recognized:function(a,c){},cancelled:function(a,c){},after:function(a,c){}},s=function(a){var e=!0;a.srcEvent&&a.srcEvent.pointerType&&(e=-1!==q.indexOf(a.srcEvent.pointerType));c.isCancel(a)&&(e=!0);!n.isPrevented()&&(!b.isWaitingState(k)&&!b.isDisabledState(k)&&e)&&(k=k===d.RECOGNIZED||k===d.CANCELLED?d.INACTIVE:k,k===d.INACTIVE&&p.remove(),
a=h.recognize({inputData:a,currentState:k}),t(a.targetState,a.actionData))},t=function(a,c){l=null;b.isActiveState(a)&&n.needsToWait()&&(l={targetState:a,actionData:c},a=d.WAITING);k=a;b.isActiveState(k)&&(n.resetPrevented(),n.failThoseWaiting());b.isInactiveState(k)&&n.allowThoseWaiting();if(b.isActiveState(k))try{r[k](c,u)}catch(e){}if(b.isEndedState(k))try{r.after()}catch(h){}};h.subscribe&&m.own(h.subscribe(s),"unsubscribe");var u={attachInputStream:function(a){var c=!1;h.EVENT_SETS.forEach(function(b){b===
a.EVENT_SET&&(c=!0)});if(!c)return{unsubscribe:function(){}};var b=a.subscribe(s);m.own(b,"unsubscribe");return b},on:function(a,c){if("string"===typeof a){var b=g.after(r,a,c,!0);m.own(b);return b}var b=f(),d;for(d in a)if(a.hasOwnProperty(d)){var e=g.after(r,d,a[d],!0);m.own(e);b.own(e)}return b},onTemp:function(a,c){if("string"===typeof a){var b=g.after(r,a,c,!0);p.own(b);return b}var b=f(),d;for(d in a)if(a.hasOwnProperty(d)){var e=g.after(r,d,a[d],!0);p.own(e);b.own(e)}return b},enable:function(){k=
d.INACTIVE},disable:function(){k=d.DISABLED},setPointerTypes:function(a){q=a},setOptions:function(a){h.setOptions&&h.setOptions(a)},reset:function(){t(d.INACTIVE);h.reset()},getCoordinator:function(){return n},destroy:function(){p.remove();m.remove()},attemptProcess:function(a){k===d.WAITING&&l&&t(a?d.INACTIVE:l.targetState,l.actionData)},isActive:function(){return b.isActiveState(k)},isPossible:function(){return b.isPossibleState(k)||b.isWaitingState(k)}},n=e(u);return u}})},"mw-gesture/coordination/RecognizerCoordinator":function(){define([],
function(){return function(g){var f=[],e=[],d=[],b=[];return{prevents:function(a){f.push(a);a.getCoordinator().isPreventedBy(g)},isPreventedBy:function(a){e.push(a)},resetPrevented:function(){f.forEach(function(a){return a.reset()})},isPrevented:function(){return e.some(function(a){return a.isActive()})},waitForFailure:function(a){d.push(a);a.getCoordinator().isWaitingFor(g)},isWaitingFor:function(a){b.push(a)},needsToWait:function(){return d.some(function(a){return a.isPossible()})},failThoseWaiting:function(){b.forEach(function(a){a.reset();
a.attemptProcess(!0)})},allowThoseWaiting:function(){b.forEach(function(a){a.attemptProcess(!1)})}}}})},"mw-gesture/recognizers/RecognizerStates":function(){define([],function(){return{INACTIVE:"inactive",POSSIBLE:"possible",WAITING:"waiting",BEGAN:"began",PROGRESS:"progress",RECOGNIZED:"recognized",CANCELLED:"cancelled",DISABLED:"disabled"}})},"mw-gesture/recognizers/RecognizerStateUtil":function(){define(["./RecognizerStates"],function(g){return{isActiveState:function(f){return f===g.RECOGNIZED||
f===g.CANCELLED||f===g.BEGAN||f===g.PROGRESS},isEndedState:function(f){return f===g.RECOGNIZED||f===g.CANCELLED},isWaitingState:function(f){return f===g.WAITING},isInactiveState:function(f){return f===g.INACTIVE},isPossibleState:function(f){return f===g.POSSIBLE},hasBegun:function(f){return f===g.BEGAN||f===g.PROGRESS},isDisabledState:function(f){return f===g.DISABLED}}})},"mw-gesture/util/PointerTypes":function(){define([],function(){return{TOUCH:"touch",MOUSE:"mouse",PEN:"pen"}})},"mw-gesture/util/ButtonValues":function(){define([],
function(){return{LEFT:0,RIGHT:2}})},"mw-gesture/gestures/tapmove":function(){define("dojo/_base/lang ../timer/Timer ../functional/FunctionalUtils ../events/Observable ../util/ActionDataUtil ../util/InputDataUtil ../util/GeomUtil ../util/TimeUtils ../util/RecognizerDataUtil ../recognizers/RecognizerStates ../recognizers/RecognizerStateUtil ./_state/TapCount ./_state/PositionTracker".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p,n){var q=e.sequence,r=l.BEGAN,s=l.POSSIBLE,t=l.CANCELLED,u=b.trackUpdate,
v=b.trackFinal;f=b.resetTracker;e=b.setActionData;var w=k.createRecognizerData,x=k.markAsNoChange;d=k.markAsCancelled;var y=k.markAsProgress,B=k.markAsInactive,D=k.markAsRecognized;a=k.applyIfUndetermined;c=k.applyOnTimeout;h=k.applyOnDown;l=k.applyOnMove;var E=k.applyOnUp,F=k.applyIfBegun,I=k.applyIfTargetStateIsComplete,L=k.applyIfActive,C=k.applyIfInactive,M=k.applyIfTargetStateBegun;k=k.applyIfTargetStateIsActive;var G=m.hasBegun;b=q(b.trackInitial,function(a){a.internalData.tapCount.onDown(a.inputData);
return a},F(d),a(function(a){a.internalData.tapCount.isTap()?a.targetState=r:G(a)?a.targetState=t:a.targetState=s;return a}),M(function(a){a.internalData.tapCount.resetTimers();return a}));m=q(u,a(F(y)),a(x));var v=q(function(a){a.internalData.tapCount.onUp(a.inputData);return a},a(F(q(v,D))),a(x)),N=q(c(B),a(h(function(a){void 0!==a.inputData.srcEvent.button&&a.inputData.srcEvent.button!==a.internalData.tapMoveOptions.button&&(a=B(a));return a})),a(h(b)),a(l(m)),a(E(v)),a(C(B)),a(L(d)),k(e),I(q(f,
function(a){a.internalData.tapCount.reset();return a})));return function(a){var c=g.mixin({button:0},a?a:{}),b=new p(c),d=new n;return{EVENT_SETS:["pointers"],setOptions:function(a){c=g.mixin(c,a?a:{});b.setOptions(c)},reset:q(b.reset.bind(b),d.reset.bind(d)),subscribe:b.observable.subscribe.bind(b.observable),recognize:function(a){a=N(w("tapmove",a,{positionTracker:d,tapCount:b,tapMoveOptions:c}));return{targetState:a.targetState,actionData:a.actionData}}}}})},"mw-gesture/timer/Timer":function(){define([],
function(){return function(g,f){var e=null,d=function(){e&&window.clearTimeout(e);e=null};return{start:function(){d();e=window.setTimeout(g,f)},clear:d}}})},"mw-gesture/functional/FunctionalUtils":function(){define([],function(){location.href.slice(-1);return{sequence:function(){var g=arguments;return function(f){for(var e=0;e<g.length;e++)f=g[e].call(this,f);return f}}}})},"mw-gesture/util/ActionDataUtil":function(){define([],function(){return{setActionData:function(g){g.actionData={type:g.type,
srcEvent:g.inputData.srcEvent,pointers:g.inputData.pointers,properties:g.internalData.positionTracker.getActionProperties()};return g},trackInitial:function(g){g.internalData.positionTracker.setInitial(g.inputData);return g},trackFinal:function(g){g.internalData.positionTracker.setFinal(g.inputData);return g},trackUpdate:function(g){g.internalData.positionTracker.setUpdated(g.inputData);return g},resetTracker:function(g){g.internalData.positionTracker.reset();return g}}})},"mw-gesture/util/RecognizerDataUtil":function(){define(["../recognizers/RecognizerStates",
"../recognizers/RecognizerStateUtil","../util/InputDataUtil"],function(g,f,e){var d=g.RECOGNIZED,b=g.BEGAN,a=g.PROGRESS,c=g.INACTIVE,h=g.POSSIBLE,k=g.CANCELLED,l=f.isEndedState,m=f.isInactiveState,p={createRecognizerData:function(a,c,b){return{type:a,currentState:c.currentState,inputData:c.inputData,targetState:null,actionData:{},internalData:b}},applyWhen:function(a,c){return function(b){return a(b)?c(b):b}},applyIfUndetermined:function(a){return p.applyWhen(p.isUndetermined,a)},applyIfDetermined:function(a){return p.applyWhen(p.isDetermined,
a)},applyIfActive:function(a){return p.applyWhen(function(a){return f.isActiveState(a.currentState)},a)},applyIfBegun:function(a){return p.applyWhen(function(a){return f.hasBegun(a.currentState)},a)},applyIfPossible:function(a){return p.applyWhen(function(a){return f.isPossibleState(a.currentState)},a)},applyIfTargetStateBegun:function(a){return p.applyWhen(function(a){return f.hasBegun(a.targetState)},a)},applyIfTargetStateIsActive:function(a){return p.applyWhen(function(a){return f.isActiveState(a.targetState)},
a)},applyIfTargetStateIsComplete:function(a){return p.applyWhen(function(a){return m(a.targetState)||l(a.targetState)},a)},applyIfInactive:function(a){return p.applyWhen(function(a){return!f.isActiveState(a.currentState)},a)},applyOnUp:function(a){return p.applyWhen(function(a){return e.isUp(a.inputData)},a)},applyOnDown:function(a){return p.applyWhen(function(a){return e.isDown(a.inputData)},a)},applyOnMove:function(a){return p.applyWhen(function(a){return e.isMove(a.inputData)},a)},applyOnCancel:function(a){return p.applyWhen(function(a){return e.isCancel(a.inputData)},
a)},applyOnTimeout:function(a){return p.applyWhen(function(a){return e.isTimeout(a.inputData)},a)},applyOnWheel:function(a){return p.applyWhen(function(a){return e.isWheel(a.inputData)},a)},applyWhenNotSinglePrimary:function(a){return p.applyWhen(function(a){return!e.isSinglePrimary(a.inputData)},a)},isDetermined:function(a){return!!a.targetState},isUndetermined:function(a){return!a.targetState},markAsNoChange:function(a){a.targetState=a.currentState;return a},markAsPossible:function(a){a.targetState=
h;return a},markAsRecognized:function(a){a.targetState=d;return a},markAsInactive:function(a){a.targetState=c;return a},markAsCancelled:function(a){a.targetState=k;return a},markAsProgress:function(c){c.targetState=a;return c},markAsBegan:function(a){a.targetState=b;return a},resetWhenComplete:function(a){var c=a.targetState,b=a.internalData;(m(c)||l(c))&&b&&b.reset&&b.reset();return a}};return p})},"mw-gesture/gestures/_state/TapCount":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=
d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define("dojo/_base/lang ../../timer/Timer ../../functional/FunctionalUtils ../../events/Observable ../../util/InputDataUtil ../../util/GeomUtil ../../util/TimeUtils".split(" "),function(f,e,d,b,a,c,h){var k=c.arePointsWithinRadius,l=h.isWithinTimeout,m=a.getCenterPoint,p=a.getTimestamp,n=a.createTimeout;return function(){function a(c){if(!(this instanceof
a))throw new TypeError("Cannot call a class as a function");this.options=f.mixin({numTaps:1,maxRadius:1,maxTouchRadius:20,maxHold:250,tapDelay:250},c?c:{});this.observable=b();this.reset()}g(a,[{key:"setOptions",value:function(a){this.options=f.mixin(this.options,a?a:{});this.reset()}},{key:"_emitTimeout",value:function(){this.observable.emit(n())}},{key:"onDown",value:function(a){this.resetTimers();this.holdTimer.start();this.latestDown=a;this._checkUpToDownDelay();this._checkUpToDownDistance()}},
{key:"onUp",value:function(a){this.resetTimers();this.eventTimer.start();this.latestUp=a;this._updateTapCount()}},{key:"_isActivePress",value:function(){var a=!!this.latestDown;return this.latestDown&&this.latestUp?p(this.latestUp)>p(this.latestDown):a}},{key:"_checkUpToDownDelay",value:function(){this.validUpToDownDelay=!0;0!==this.tapCount&&!l(p(this.latestUp),p(this.latestDown),this.options.tapDelay)&&(this.validUpToDownDelay=!1)}},{key:"_checkUpToDownDistance",value:function(){this.validUpToDownDistance=
!0;if(0!==this.tapCount&&!k(m(this.latestUp),m(this.latestDown),this.latestDown&&this.latestDown.srcEvent&&"touch"===this.latestDown.srcEvent.pointerType?this.options.maxTouchRadius:this.options.maxRadius))this.validUpToDownDistance=!1}},{key:"_updateTapCount",value:function(){var a=this._isActivePress(),c=k(m(this.latestDown),m(this.latestUp),this.latestDown&&this.latestDown.srcEvent&&"touch"===this.latestDown.srcEvent.pointerType?this.options.maxTouchRadius:this.options.maxRadius),b=l(p(this.latestDown),
p(this.latestUp),this.options.maxHold),d=!1!==this.validUpToDownDelay&&!1!==this.validUpToDownDistance;a&&(c&&b&&d)&&this.tapCount++}},{key:"isTap",value:function(){var a=!1!==this.validUpToDownDelay&&!1!==this.validUpToDownDistance;return this.tapCount===this.options.numTaps&&a}},{key:"isEarlyTap",value:function(){var a=this._isActivePress(),c=this.tapCount<this.options.numTaps;return a&&c}},{key:"getTapCount",value:function(){return this.tapCount}},{key:"resetTimers",value:function(){this.holdTimer&&
this.holdTimer.clear();this.eventTimer&&this.eventTimer.clear()}},{key:"reset",value:function(){this.tapCount=0;this.latestUp=this.latestDown=null;this.resetTimers();this.holdTimer=new e(this._emitTimeout.bind(this),this.options.maxHold);this.eventTimer=new e(this._emitTimeout.bind(this),this.options.tapDelay)}}]);return a}()})},"mw-gesture/gestures/_state/PositionTracker":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=
!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["../../util/PointerProperties"],function(f){var e=f.compareProperties;return function(){function d(){if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");this.reset()}g(d,[{key:"setInitial",value:function(b){this.currentProperties=this.initialProperties=b.properties;this.finalProperties=this.previousProperties=null;this.updateActionProperties()}},
{key:"setUpdated",value:function(b){this.previousProperties=this.currentProperties;this.currentProperties=b.properties;this.updateActionProperties()}},{key:"setFinal",value:function(b){this.previousProperties=this.currentProperties;this.finalProperties=this.currentProperties=b.properties;this.updateActionProperties()}},{key:"updateActionProperties",value:function(){this.actionProperties=e(this.currentProperties,this.initialProperties,this.previousProperties,this.actionProperties)}},{key:"reset",value:function(){this.actionProperties=
this.previousProperties=this.currentProperties=this.finalProperties=this.initialProperties=null}},{key:"getActionProperties",value:function(){return this.actionProperties}}]);return d}()})},"mw-gesture/gestures/tap":function(){define("dojo/_base/lang ../timer/Timer ../functional/FunctionalUtils ../events/Observable ../util/ActionDataUtil ../util/InputDataUtil ../util/GeomUtil ../util/TimeUtils ../util/RecognizerDataUtil ./_state/TapCount ./_state/PositionTracker".split(" "),function(g,f,e,d,b,a,c,
h,k,l,m){var p=e.sequence,n=b.trackUpdate,q=b.trackFinal;f=b.resetTracker;e=b.setActionData;var r=k.createRecognizerData,s=k.markAsNoChange,t=k.markAsPossible,u=k.markAsInactive,v=k.markAsRecognized,w=k.applyWhen;d=k.applyIfUndetermined;a=k.applyIfTargetStateIsActive;c=k.applyOnTimeout;h=k.applyOnDown;var x=k.applyOnMove,y=k.applyOnUp;k=k.applyIfTargetStateIsComplete;b=p(b.trackInitial,function(a){a.internalData.tapCount.onDown(a.inputData);return a},d(t));var n=p(n,d(s)),q=p(function(a){a.internalData.tapCount.onUp(a.inputData);
return a},d(w(function(a){return a.internalData.tapCount.isTap()},p(q,v))),d(w(function(a){return a.internalData.tapCount.isEarlyTap()},t))),B=p(c(u),d(h(function(a){void 0!==a.inputData.srcEvent.button&&a.inputData.srcEvent.button!==a.internalData.tapOptions.button&&(a=u(a));return a})),d(h(b)),d(x(n)),d(y(q)),d(u),a(e),k(p(f,function(a){a.internalData.tapCount.reset();return a})));return function(a){var c=g.mixin({button:0},a?a:{}),b=new l(c),d=new m;return{EVENT_SETS:["pointers"],setOptions:function(a){c=
g.mixin(c,a?a:{});b.setOptions(c)},reset:p(b.reset.bind(b),d.reset.bind(d)),subscribe:b.observable.subscribe.bind(b.observable),recognize:function(a){a=B(r("tap",a,{positionTracker:d,tapCount:b,tapOptions:c}));return{targetState:a.targetState,actionData:a.actionData}}}}})},"mw-gesture/gestures/click":function(){define("dojo/_base/lang ../events/Observable ../functional/FunctionalUtils ../util/ActionDataUtil ../util/DomUtils ../util/InputDataUtil ../util/RecognizerDataUtil ../recognizers/RecognizerStates ./_state/PositionTracker".split(" "),
function(g,f,e,d,b,a,c,h,k){var l=d.trackFinal;a=d.setActionData;var m=b.isAncestorNode;e=e.sequence;var p=h.RECOGNIZED,n=h.INACTIVE,q=h.POSSIBLE,r=c.createRecognizerData,s=c.applyWhen;h=c.applyWhenNotSinglePrimary;b=c.applyIfUndetermined;var t=c.applyOnDown,u=c.applyOnMove,v=c.applyOnUp,w=c.markAsInactive,x=c.markAsNoChange,y=c.applyIfTargetStateIsActive;d=e(s(function(a){var c=a.internalData.clickOptions;a=a.inputData.srcEvent;var b=!1;void 0!==a.button?b=a.button===c.button:0!==c.button&&(b=!0);
return b},e(c.markAsPossible,d.trackInitial)),b(w));c=e(l,function(a){var c;if(c=a.currentState===q)c=a.inputData,c=m(c.srcNode,c.target);a.targetState=c?p:n;return a});var B=e(h(w),t(d),u(x),v(c),b(w),y(a));return function(a){var c=f(),b=g.mixin({button:0},a?a:{}),d=new k;return{EVENT_SETS:["pointers"],reset:d.reset.bind(d),subscribe:c.subscribe.bind(c),recognize:function(a){a=B(r("click",a,{clickOptions:b,positionTracker:d}));return{targetState:a.targetState,actionData:a.actionData}}}}})},"mw-gesture/gestures/flick":function(){define("dojo/_base/lang ../functional/FunctionalUtils ../events/Observable ../util/RecognizerDataUtil ../util/ActionDataUtil ../util/GeomUtil ../recognizers/RecognizerStates ../util/Directions ./_state/PositionTracker".split(" "),
function(g,f,e,d,b,a,c,h,k){var l=b.trackUpdate;c=b.resetTracker;var m=b.setActionData;f=f.sequence;var p=a.computeMagnitude,n=d.createRecognizerData,q=d.markAsNoChange,r=d.markAsRecognized;a=d.markAsInactive;var s=d.applyIfUndetermined,t=d.applyIfPossible,u=d.applyOnDown,v=d.applyOnMove,w=d.applyWhen,x=d.applyOnUp,y=d.applyIfTargetStateIsActive,B=d.applyIfTargetStateIsComplete,D=h.DIRECTION_NONE;d=f(b.trackInitial,s(d.markAsPossible));b=t(f(l,w(function(a){var c=a.internalData.flickOptions,b=a.internalData.positionTracker.getActionProperties().center.direction;
a=a.inputData.pointers.length===c.pointers;return(c.direction===D||c.direction===b)&&a},q),s(a)));h=t(f(w(function(a){var c=a.internalData.flickOptions,b=a.internalData.positionTracker.getActionProperties();a=p(b.center.delta);b=p(b.center.velocity);return a>=c.minDistance&&b>c.minVelocity},r),s(a)));var E=f(u(d),v(b),x(h),s(a),y(m),B(c));return function(a){var c=e(),b=new k,d=g.mixin({pointers:1,minDistance:20,direction:D,minVelocity:0.3},a?a:{});return{EVENT_SETS:["pointers"],reset:b.reset.bind(b),
subscribe:c.subscribe.bind(c),recognize:function(a){a=E(n("flick",a,{positionTracker:b,flickOptions:d}));return{targetState:a.targetState,actionData:a.actionData}}}}})},"mw-gesture/gestures/pan":function(){define("dojo/_base/lang ../timer/Timer ../functional/FunctionalUtils ../events/Observable ../util/Directions ../util/ActionDataUtil ../util/GeomUtil ../util/RecognizerDataUtil ./_state/PositionTracker".split(" "),function(g,f,e,d,b,a,c,h,k){f=e.sequence;var l=c.computeMagnitude,m=a.trackUpdate,
p=a.trackFinal;c=a.resetTracker;e=a.setActionData;var n=h.createRecognizerData,q=h.markAsNoChange,r=h.markAsCancelled,s=h.markAsInactive,t=h.markAsPossible,u=h.markAsBegan,v=h.markAsProgress,w=h.markAsRecognized,x=h.applyIfUndetermined,y=h.applyOnDown,B=h.applyOnMove,D=h.applyIfTargetStateIsActive,E=h.applyIfTargetStateIsComplete,F=h.applyOnUp,I=h.applyWhen,L=h.applyIfPossible,C=h.applyIfActive,M=h.applyIfInactive;h=h.applyIfBegun;var G=b.DIRECTION_NONE;b=function(a){return a.inputData.pointers.length!==
a.internalData.panOptions.pointers};a=f(a.trackInitial,I(b,f(h(w),x(s))),x(h(w)),x(t));b=f(m,h(I(b,w)),x(f(L(I(function(a){var c=a.internalData.panOptions;a=a.internalData.positionTracker.getActionProperties();a=l(a.center.delta);return Math.abs(a)>=c.minDistance},u)),h(v))),x(q));var p=f(p,h(w),x(s)),N=f(y(a),B(b),F(p),x(M(s)),x(C(r)),D(e),E(c));return function(a){var c=d(),b=new k,e=g.mixin({pointers:1,minDistance:20,direction:G},a?a:{});return{EVENT_SETS:["pointers"],reset:b.reset.bind(b),subscribe:c.subscribe.bind(c),
recognize:function(a){a=N(n("pan",a,{positionTracker:b,panOptions:e}));return{targetState:a.targetState,actionData:a.actionData}}}}})},"mw-gesture/gestures/rotate":function(){define("dojo/_base/lang ../functional/FunctionalUtils ../events/Observable ../util/ActionDataUtil ../util/RecognizerDataUtil ./_state/PositionTracker".split(" "),function(g,f,e,d,b,a){f=f.sequence;var c=d.trackUpdate,h=d.trackFinal,k=d.resetTracker,l=d.setActionData,m=b.createRecognizerData,p=b.markAsNoChange,n=b.markAsCancelled,
q=b.markAsInactive,r=b.markAsPossible,s=b.markAsBegan,t=b.markAsProgress,u=b.markAsRecognized,v=b.applyIfUndetermined,w=b.applyOnDown,x=b.applyOnMove,y=b.applyIfTargetStateIsActive,B=b.applyIfTargetStateIsComplete,D=b.applyOnUp,E=b.applyWhen,F=b.applyIfPossible,I=b.applyIfActive,L=b.applyIfInactive;b=b.applyIfBegun;var C=function(a){return a.inputData.pointers.length!==a.internalData.rotateOptions.pointers};d=f(d.trackInitial,E(C,f(b(u),v(q))),v(b(u)),v(r));var c=f(c,b(E(C,u)),v(f(F(E(function(a){var c=
a.internalData.rotateOptions;a=a.internalData.positionTracker.getActionProperties().angle.delta;return Math.abs(a)>=c.minRotation},s)),b(t))),v(p)),h=f(h,b(u),v(q)),M=f(w(d),x(c),D(h),v(L(q)),v(I(n)),y(l),B(k));return function(c){var b=e(),d=new a,h=g.mixin({pointers:2,minRotation:20},c?c:{});return{EVENT_SETS:["pointers"],reset:d.reset.bind(d),subscribe:b.subscribe.bind(b),recognize:function(a){a=M(m("rotate",a,{positionTracker:d,rotateOptions:h}));return{targetState:a.targetState,actionData:a.actionData}}}}})},
"mw-gesture/gestures/pinch":function(){define("dojo/_base/lang ../functional/FunctionalUtils ../events/Observable ../util/ActionDataUtil ../util/RecognizerDataUtil ./_state/PositionTracker".split(" "),function(g,f,e,d,b,a){f=f.sequence;var c=d.trackUpdate,h=d.trackFinal,k=d.resetTracker,l=d.setActionData,m=b.createRecognizerData,p=b.markAsNoChange,n=b.markAsCancelled,q=b.markAsInactive,r=b.markAsPossible,s=b.markAsBegan,t=b.markAsProgress,u=b.markAsRecognized,v=b.applyIfUndetermined,w=b.applyOnDown,
x=b.applyOnMove,y=b.applyIfTargetStateIsActive,B=b.applyIfTargetStateIsComplete,D=b.applyOnUp,E=b.applyWhen,F=b.applyIfPossible,I=b.applyIfActive,L=b.applyIfInactive;b=b.applyIfBegun;var C=function(a){return a.inputData.pointers.length!==a.internalData.pinchOptions.pointers};d=f(d.trackInitial,E(C,f(b(u),v(q))),v(b(u)),v(r));var c=f(c,b(E(C,u)),v(f(F(E(function(a){var c=a.internalData.pinchOptions;a=a.internalData.positionTracker.getActionProperties().spread.delta;return Math.abs(a)>=c.minDistance},
s)),b(t))),v(p)),h=f(h,b(u),v(q)),M=f(w(d),x(c),D(h),v(L(q)),v(I(n)),y(l),B(k));return function(c){var b=e(),d=new a,h=g.mixin({pointers:2,minDistance:3},c?c:{});return{EVENT_SETS:["pointers"],reset:d.reset.bind(d),subscribe:b.subscribe.bind(b),recognize:function(a){a=M(m("pinch",a,{positionTracker:d,pinchOptions:h}));return{targetState:a.targetState,actionData:a.actionData}}}}})},"mw-gesture/gestures/wheel":function(){define(["../events/Observable","../functional/FunctionalUtils","../util/RecognizerDataUtil"],
function(g,f,e){f=f.sequence;var d=e.createRecognizerData,b=e.applyIfUndetermined,a=e.markAsInactive,c=e.applyIfTargetStateIsActive,h=e.applyOnWheel,k=f(h(e.markAsRecognized),b(a),c(function(a){a.actionData={type:a.type,srcEvent:a.inputData.srcEvent};return a}));return function(a){a=g();return{EVENT_SETS:["wheel"],reset:function(){},subscribe:a.subscribe.bind(a),recognize:function(a){a=k(d("wheel",a,{}));return{targetState:a.targetState,actionData:a.actionData}}}}})},"mw-gesture/gestures/hover":function(){define(["../events/Observable",
"../util/ActionDataUtil","../functional/FunctionalUtils","../util/RecognizerDataUtil","./_state/PositionTracker"],function(g,f,e,d,b){e=e.sequence;var a=f.resetTracker,c=f.setActionData,h=d.createRecognizerData,k=d.applyWhen,l=d.applyIfUndetermined,m=d.markAsInactive,p=d.applyIfTargetStateIsActive,n=e(k(function(a){return(a=a.inputData.srcEvent)&&0===a.buttons&&("pointermove"===a.type||"mousemove"===a.type)},e(f.trackInitial,d.markAsRecognized)),l(m),p(c),a);return function(a){a=g();var c=new b;return{EVENT_SETS:["pointers"],
reset:c.reset.bind(c),subscribe:a.subscribe.bind(a),recognize:function(a){a=n(h("hover",a,{positionTracker:c}));return{targetState:a.targetState,actionData:a.actionData}}}}})},"MW/rtc/events/MouseEventUtil":function(){define(["dojo/_base/lang","dojo/has","dojo/on"],function(g,f,e){return{MOUSEWHEEL:!f("mozilla")?"wheel":"DOMMouseScroll",_WHEEL_DELTA:120,_MOZ_PIXEL_DISTANCE:51,_IE_PIXEL_DISTANCE:45,_MAC_PIXEL_DISTANCE:40,_DEFAULT_PIXEL_DISTANCE:100,_WHEEL_MODE_LINE:-40,redirectMouseScroll:function(d,
b){var a=g.hitch(this,function(a){b.setScrollTop(b.getScrollTop()-this.getVerticalScrollDistance(a));b.setScrollLeft(b.getScrollLeft()-this.getHorizontalScrollDistance(a))});e(d,this.MOUSEWHEEL,a)},getVerticalScrollDistance:function(d){if(!this.isVerticalScroll(d))return 0;d=this._normalizeMouseEvent(d).vertical;return this._browserfyScrollDistance(d)},getHorizontalScrollDistance:function(d){if(!this.isHorizontalScroll(d))return 0;d=this._normalizeMouseEvent(d).horizontal;return this._browserfyScrollDistance(d)},
isVerticalScroll:function(d){return 0!==this._normalizeMouseEvent(d).vertical},isHorizontalScroll:function(d){return 0!==this._normalizeMouseEvent(d).horizontal},_normalizeMouseEvent:function(d){var b={vertical:0,horizontal:0};if(f("mozilla"))b.vertical=d.axis===d.VERTICAL_AXIS?d.detail:0,b.horizontal=d.axis===d.HORIZONTAL_AXIS?d.detail:0;else{var a=d.deltaY&&0!==d.deltaY,c=d.wheelDeltaY&&0!==d.wheelDeltaY,e=d.wheelDeltaX&&0!==d.wheelDeltaX,k=d.deltaX&&0!==d.deltaX||e,g=d.shiftKey;if(a||c)g?b.horizontal=
c?d.wheelDeltaY:-d.deltaY:b.vertical=c?d.wheelDeltaY:-d.deltaY;k&&(g&&a?b.vertical=e?d.wheelDeltaX:-d.deltaX:b.horizontal=e?d.wheelDeltaX:b.horizontal||-d.deltaX)}return b},_browserfyScrollDistance:function(d){return(f("mozilla")?this._WHEEL_MODE_LINE*this._MOZ_PIXEL_DISTANCE:f("trident")||f("ie")?this._IE_PIXEL_DISTANCE:f("safari")||f("mac")?this._MAC_PIXEL_DISTANCE:this._DEFAULT_PIXEL_DISTANCE)*d/this._WHEEL_DELTA},isEventInScrollbarTrack:function(d){var b=d.target.getBoundingClientRect(),a=d.clientY>
b.top+d.target.clientHeight;return d.clientX>b.left+d.target.clientWidth||a},isBrowserZoomScrollEvent:function(d){return d.ctrlKey&&!f("mac")}}})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/symbolic/SymbolicOutputProperties":function(){define([],function(){return{OUTPUT_TYPE:"symbolic",CSS_TAG:"embeddedOutputsSymbolicElement"}})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/text/TextOutputProperties":function(){define([],function(){return{OUTPUT_TYPE:"text",CSS_TAG:"embeddedOutputsTextElement"}})},
"MW/rtc/plugins/embeddedoutputs/outputhandlers/warning/WarningOutputProperties":function(){define([],function(){return{OUTPUT_TYPE:"warning",CSS_TAG:"embeddedOutputsWarningElement"}})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/variablestring/VariableStringOutputProperties":function(){define([],function(){return{OUTPUT_TYPE:"variableString",CSS_TAG:"embeddedOutputsVariableStringElement"}})},"MW/rtc/plugins/embeddedoutputs/view/ViewToggler":function(){define("dijit/Tooltip dijit/Destroyable dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-attr dojo/dom-construct dojo/on mw-form/ToggleButton MW/rtc/plugins/embeddedoutputs/view/EmbeddedOutputsViewStateEnum MW/rtc/plugins/view/tooltip/TooltipUtilities".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m){return e(f,{_TOGGLE_PANEL:"toggleButtonPanel",_TOGGLE_PANEL_PRIORITY:1,_BUTTON_GROUP:"embeddedOutputsViewToggleGroup",_STATIC_HEIGHT:50,_DEFAULT_VIEW_STATE:l.ON_RIGHT_VIEW_STATE,constructor:function(a,c,e,h,f){this._rightMarginContainer=a;this._actionDataService=c;this._editorId=e;this._embeddedOutputsViews=f;this._viewState=h||this._DEFAULT_VIEW_STATE;this.own(b.after(this._actionDataService,"onActionChange",d.hitch(this,"_handleActionChange"),!0));this._setupButtons()},
_handleActionChange:function(a){"selected"===a.key&&a.newValue&&this._highlightButtonBasedOnAction(a.id)},_highlightButtonBasedOnAction:function(a){this._embeddedOutputsViews.forEach(function(c){var b=c.getName(),d=this._viewButtons[b];a===c.ACTION_ID&&this._highlightViewButton(b,d)},this)},_setupButtons:function(){this._addButtonPanel();this._embeddedOutputsViews.forEach(function(a){var c=a.getName();this.own(this._viewButtons[c].on("change",d.hitch(this,"_switchToView",c,a.ACTION_ID)))},this)},
_addButtonPanel:function(){this._createButtonPanel();this._setupTooltips();this._initializeButtonPanelPosition()},_createButtonPanel:function(){var b=c.create("div",{className:this._TOGGLE_PANEL});this._viewButtons=[];this._embeddedOutputsViews.forEach(function(c){var d=this._createButton(c.BUTTON_CSS_CLASS,this._viewState===c.getName());this._viewButtons[c.getName()]=d;a.set(d.domNode,"data-testid",c.DATATEST_ID);d.placeAt(b);d.startup()},this);this._buttonPanel=b},_createButton:function(a,c){return new k({icon:"toggleButton "+
a,checked:c,buttonGroup:this._BUTTON_GROUP+this._editorId})},_initializeButtonPanelPosition:function(){this._rightMarginContainer.addLayer(this._buttonPanel,this._TOGGLE_PANEL_PRIORITY,this._STATIC_HEIGHT)},_removeButtonPanel:function(){this._rightMarginContainer.removeLayer(this._buttonPanel)},_setupTooltips:function(){this._viewTooltips=[];this._embeddedOutputsViews.forEach(function(a){var c=a.getName();this._viewTooltips[c]=new g({connectId:this._viewButtons[c],label:m.createUnfocusableTooltipTextHTML(a.TOOLTIP_MESSAGE),
position:["below-centered"]})},this)},_switchToView:function(a,c,b){this._viewState!==a&&this._actionDataService.updateAction(c,{selected:b.mwEventData.newValue})},_highlightViewButton:function(a,c){this._viewState=a;c.set("checked",!0);this._closeTooltips()},_closeTooltips:function(){this._embeddedOutputsViews.forEach(function(a){this._viewTooltips[a.getName()].close()},this)},destroy:function(){this._removeButtonPanel();this._embeddedOutputsViews.forEach(function(a){this._viewTooltips[a.getName()].destroy()},
this)}})})},"MW/rtc/plugins/embeddedoutputs/ExecutionRequestFactoryProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/embeddedoutputs/ExecutionRequestFactory"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.internaldocument","rtc.document","rtc.code.sections.model"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/embeddedoutputs/ExecutionRequestFactory":function(){define(["dojo/_base/declare",
"MW/rtc/abstract/AbstractPlugin","MW/rtc/model/CodeUtilities","MW/rtc/plugins/embeddedoutputs/ExecutionRequest"],function(g,f,e,d){return g(f,{constructor:function(b,a,c){this._internalDocument=b;this._document=a;this._sectionModel=c},createRequest:function(b,a,c,e,f,g,m,p){return new d(b,a,c,e,f,g,m,p,this._getStartCodeIndexForNode.bind(this),this._getEndCodeIndexForNode.bind(this))},_getStartCodeIndexForNode:function(b){b=this._sectionModel.getSectionNumberForNode(b);return this._getStartCodeIndexForSection(b)},
_getEndCodeIndexForNode:function(b){b=this._sectionModel.getSectionNumberForNode(b);return this._getEndCodeIndexForSection(b)},_getStartCodeIndexForSection:function(b){b=this._getCodeNodesClosestToSection(b,1);return 0===b.length?-1:this._getCodeIndexForCodeNode(b[0])+1},_getEndCodeIndexForSection:function(b){b=this._getCodeNodesClosestToSection(b,-1);if(0===b.length)return-1;b=b[b.length-1];var a=this._getCodeIndexForCodeNode(b),a=a+b.getCodeText().length;return a+1},_getCodeNodesClosestToSection:function(b,
a){for(var c=[],d=b;0===c.length;){c=this._sectionModel.getSection(d);if(null===c)return[];c=e.getCodeNodesInNodeRange(c.start.getNode(),c.end.getNode());d+=a}return c},_getCodeIndexForCodeNode:function(b){b=this._document.createLinePosition(b);var a=e.getAbsoluteCodeOffsetFromPosition(this._internalDocument,b);b.destroy();return a}})})},"MW/rtc/plugins/embeddedoutputs/ExecutionRequest":function(){define(["dojo/_base/declare","mw-utils/Utils","MW/rtc/model/CodeUtilities","MW/rtc/model/Range"],function(g,
f,e,d){return g(null,{constructor:function(b,a,c,d,e,g,m,p,n,q){this._fileName=b;this._filePath=a;this._fullCodeText=c;this._documentStateToken=d;this._startPosition=e;this._endPosition=g;this._executableRegions=m;this._partialEval=p;this._requestId=f.generateUuid();this._evaluationRange=null;this._getStartCodeIndexCallback=n;this._getEndCodeIndexCallback=q},getRequestId:function(){return this._requestId},getDocumentStateToken:function(){return this._documentStateToken},getRegionNumbersToRun:function(){return this._executableRegions.map(function(b){return b.regionNumber})},
getEvaluationRange:function(){null===this._evaluationRange&&(this._evaluationRange=new d(this._startPosition,this._endPosition));return this._evaluationRange},getExecutionMessage:function(){return{requestId:this._requestId,regionArray:this._executableRegions,fullText:this._fullCodeText,partialEval:this._partialEval,documentStateToken:this._documentStateToken,fullFilePath:this._filePath}},getTraditionalExecutionMessage:function(){if(void 0===this._startIndex){var b=this._startPosition.getNode(),a=
this._endPosition.getNode();this._startIndex=this._getStartCodeIndexCallback(b);this._endIndex=this._getEndCodeIndexCallback(a)}0>this._startIndex&&0>this._endIndex&&(this._endIndex=this._startIndex=1);b=this._filePath.substring(0,this._filePath.length-this._fileName.length);return{requestId:this._requestId,fileName:this._fileName,filePath:b,codeText:this._fullCodeText+"\n",startIndex:this._startIndex,executionTextLength:this._endIndex-this._startIndex,documentState:this._documentStateToken}},destroy:function(){this._evaluationRange&&
(this._evaluationRange.destroy(),this._evaluationRange=null)}})})},"MW/rtc/plugins/embeddedoutputs/OutputHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/embeddedoutputs/OutputHandler","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{requires:function(){return{createInstance:["rtc.embeddedoutputs.model","rtc.document","rtc.embeddedoutputs.linenumbertracker","rtc.outputhandlerservice","rtc.embeddedoutputs.linecontinuationtracker"]}},createInstance:function(d,
b,a,c,e){return new f(d,b,a,c,e)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/embeddedoutputs/OutputHandler":function(){define("dojo/_base/declare mw-log/Log mw-utils/Utils ./EmbeddedOutputsUtilities ./outputhandlers/error/ErrorOutputProperties MW/rtc/model/CodeUtilities MW/rtc/model/Range MW/rtc/plugins/embeddedoutputs/model/RegionUtilities MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerResultInstruction".split(" "),function(g,f,e,d,b,a,c,h,k){return g(null,{constructor:function(a,
c,b,d,e){this._embeddedOutputsModel=a;this._document=c;this._lineNumberTracker=b;this._lineContinuationTracker=e;this._outputHandlerService=d;this._lastOutputAdded=null},_getOutputFromRawOutput:function(a,c,b){var e=this._createOutputMetaData(a,b);a=this._outputHandlerService.handleRawOutput(a,e);if(null===a)return null;e=a.getOutput();e.evaluationId=b;a.getInstruction()===k.REASSOCIATE_AND_UPDATE?e.setCodeLinePositions(d.mergeCodeLinePositions(e.codeLinePositions,c)):e.setCodeLinePositions(c);return a},
handleOutputsData:function(a,f,g,n){var q=this._embeddedOutputsModel.getRegions();this._embeddedOutputsModel.startBatchOperation();a.forEach(function(a){var c,f=e.unique(a.lineNumbers);f.sort(function(a,c){return a-c});a.lineNumbers=f;f=this._getCodeLinePositions(a);if(null!==f){var l=f[f.length-1],m=!1;0<q.length&&(c=d.convertPositionToRegionNumber(l,q),m=q[c],m=h.isPositionWithinRegionRange(l,m,m));c=m?c:this._embeddedOutputsModel.addRegionForPosition(l);a=this._getOutputFromRawOutput(a,f,g);if(null!==
a)switch(this._lastOutputAdded=a.getOutput(),a.getInstruction()){case k.ADD_OUTPUT:if("error"===a.getOutput().type&&a.getOutput().getErrorType()===b.SYNTAX_ERROR_TYPE){this._embeddedOutputsModel.clearReplacementRange();this._embeddedOutputsModel.prependOutput(c,a.getOutput());break}this._embeddedOutputsModel.addOutput(c,a.getOutput());break;case k.REASSOCIATE_AND_UPDATE:this._embeddedOutputsModel.updateOutputAssociations(a.getOutput(),c);break;case k.UPDATE:this._embeddedOutputsModel.updateOutput(a.getOutput())}}},
this);0<f.length&&(a=q[f[f.length-1]].code.regionPositions,a=a[a.length-1],n=n.getStartPosition(),n=new c(n,a),this._embeddedOutputsModel.clearOldOutputsInRange(n,g));this._embeddedOutputsModel.finishBatchOperation()},handleStartOfEvaluation:function(a){this._embeddedOutputsModel.setReplacementRange(a)},handleEndOfEvaluation:function(a,c,d){this._embeddedOutputsModel.clearReplacementRange();d!==b.SYNTAX_ERROR_TYPE&&this._embeddedOutputsModel.clearOldOutputsInRange(a,c)},clearRegionsOutputs:function(a){a instanceof
Array||(a=[a]);a.forEach(function(a){this._embeddedOutputsModel.clearOutputsForRegionNumber(a)},this)},destroy:function(){},_hasLineNumberInformation:function(a){return void 0!=a.lineNumbers&&0<a.lineNumbers.length},_getCodeLinePositions:function(a){if(!this._hasLineNumberInformation(a))return f.error("Output with no line numbers received. Skipping output. Output data: "+JSON.stringify(a)),null;var c=a.lineNumbers.map(function(a){return this._lineContinuationTracker.getAllContinuationLines(a)},this),
c=[].concat.apply([],c);c.sort(function(a,c){return a-c});c=e.unique(c);return c.map(function(c){return this._lineNumberTracker.createPositionFromOldLineNumber(c-1,a)},this)},_createOutputMetaData:function(a,c){var b={};b.evaluationId=c;"matrix"===a.type&&(b.createPromptController=!0);"text"===a.type&&(b.lineNumber=a.lineNumbers[0],b.lastAddedOutput=this._lastOutputAdded);return b}})})},"MW/rtc/plugins/embeddedoutputs/model/RegionUtilities":function(){define([],function(){return{regionStartNodesMatch:function(g,
f){this.checkRegionIsValid(g);this.checkRegionIsValid(f);return!g.code.regionPositions.length||!f.code.regionPositions.length?!1:g.code.regionPositions[0].getNode()===f.code.regionPositions[0].getNode()},codeRegionsMatch:function(g,f){this.checkRegionIsValid(g);this.checkRegionIsValid(f);if(g.regionString!==f.regionString)return!1;var e=g.regionPositions,d=f.regionPositions;if(e.length!==d.length)return!1;var b;for(b=0;b<e.length;b+=1)if(e[b].getNode()!==d[b].getNode())return!1;return!0},isPositionWithinRegionRange:function(g,
f,e){this.checkRegionIsValid(f);this.checkRegionIsValid(e);this.checkPositionIsValid(g);e=e.code.regionPositions;e=e[e.length-1].line;g=g.line;return f.code.regionPositions[0].line<=g&&g<=e},checkRegionIsValid:function(g){this.assert(g,"No region");this.assert(g.code,"No code in region");this.assert(g.code.regionPositions,"No region positions")},checkPositionIsValid:function(g){this.assert(g.isValid(),"Region position is invalid")},assert:function(g,f){if(!g)throw Error(f);}}})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerResultInstruction":function(){define([],
function(){return{ADD_OUTPUT:0,REASSOCIATE_AND_UPDATE:1,UPDATE:2}})},"MW/rtc/plugins/embeddedoutputs/LineNumberTrackerProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/embeddedoutputs/LineNumberTracker","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{createInstance:["rtc.document","rtc.internaldocument","rtc.embeddedoutputs.statehandler"]}},createInstance:function(d,b,a){return new f(d,b,a)}})})},"MW/rtc/plugins/embeddedoutputs/LineNumberTracker":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin","MW/rtc/model/CodeUtilities"],function(g,f,e,d,b){return g(d,{constructor:function(a,c,b){this._document=a;this._internalDocument=c;this._stateHandler=b;this._lineNumberMap=[];this._isTracking=!1;this.own(e.after(this._stateHandler,"stateChanged",f.hitch(this,"_stateChangeListener"),!0))},createPositionFromOldLineNumber:function(a,c){var b=this._getNodeFromOldLineNumber(a,c);return this._document.createLinePosition(b,!1)},getNewLineNumberFromOldLineNumber:function(a,
c){var b=this._getNodeFromOldLineNumber(a,c);return this._internalDocument.getLineNumber(b)},_getNodeFromOldLineNumber:function(a,c){var d;d=this._isTracking?this._lineNumberMap[a].node:b.getCodeLineNodes(this._internalDocument)[a];if(!d)throw d=b.getCodeLineNodes(this._internalDocument),Error("Node is null. isTracking: "+this._isTracking+" ;\noldLineNumber: "+a+" ;\nmapping Length: "+this._lineNumberMap.length+" ;\ncodeLinesLength: "+d.length+" ;\nstack: "+Error().stack+" ;\noutputData: "+JSON.stringify(c)+
" ;\ndocumentText:  \n\x3d\x3d\x3d\x3d\x3dSTART OF DOCUMENT\x3d\x3d\x3d\x3d\x3d\n"+this._document.getText()+" ;\n\x3d\x3d\x3d\x3d\x3dEND OF DOCUMENT\x3d\x3d\x3d\x3d\x3d\n");return d},_stateChangeListener:function(a){a===this._stateHandler.CHANGE_TYPE_ENUM.EVAL_INITIALIZED?this._startTracking():a===this._stateHandler.CHANGE_TYPE_ENUM.EVAL_COMPLETE&&this._reset()},_startTracking:function(){this._reset();this._lineNumberMap=b.getCodeLineNodes(this._internalDocument).map(function(a){return this._document.createLinePosition(a,
!1)},this);this._isTracking=!0},_reset:function(){this._lineNumberMap.forEach(this._document.deletePosition);this._lineNumberMap=[];this._isTracking=!1},destroy:function(){this._reset()}})})},"MW/rtc/plugins/embeddedoutputs/LineContinuationTrackerProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/embeddedoutputs/LineContinuationTracker","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{createInstance:["rtc.document",
"rtc.internaldocument","rtc.embeddedoutputs.statehandler","matlab.tokens","rtc.linenumberservice"]}},createInstance:function(d,b,a,c,e){return new f(d,b,a,c,e)}})})},"MW/rtc/plugins/embeddedoutputs/LineContinuationTracker":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin","MW/rtc/model/CodeUtilities"],function(g,f,e,d,b){return g(d,{constructor:function(a,c,b,d,g){this._document=a;this._internalDocument=c;this._stateHandler=b;this._tokenizer=
d;this._lineNumberService=g;this._lineContinuationMap=[];this._isTracking=!1;this.own(e.after(this._stateHandler,"stateChanged",f.hitch(this,"_stateChangeListener"),!0));this.own(e.after(this._internalDocument,"onDocumentReset",f.hitch(this,"_reset")))},getAllContinuationLines:function(a){if(this._isTracking)return this._lineContinuationMap[a-1];this._startTracking();return this.getAllContinuationLines(a)},_stateChangeListener:function(a){a===this._stateHandler.CHANGE_TYPE_ENUM.EVAL_INITIALIZED?this._startTracking():
a===this._stateHandler.CHANGE_TYPE_ENUM.EVAL_COMPLETE&&this._reset()},_startTracking:function(){this._reset();for(var a=[],c=b.getCodeLineNodes(this._internalDocument).length-1;0<=c;c--){var d=c+1;a.push(d);d=this._tokenizer.getLexStateForLine(this._lineNumberService.getLineNumberFromCodeLineNumber(d));this._tokenizer.isLineContinuation(d)||(a.forEach(function(c){this._lineContinuationMap[c-1]=a},this),a=[])}this._isTracking=!0},_reset:function(){this._lineContinuationMap=[];this._isTracking=!1},
destroy:function(){this.inherited(arguments);this._reset()}})})},"MW/rtc/plugins/embeddedoutputs/StateHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/embeddedoutputs/StateHandler","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:[]}},createInstance:function(){return new f}})})},"MW/rtc/plugins/embeddedoutputs/StateHandler":function(){define(["dojo/_base/declare","dojo/_base/lang",
"dojo/aspect"],function(g,f,e){return g(null,{CHANGE_TYPE_ENUM:{EVAL_INITIALIZED:1,EVAL_COMPLETE:2,REGION_EVAL_STARTED:3,SECTION_EVAL_COMPLETE:4},constructor:function(){this._isRunning=!1},stateChanged:function(d,b){switch(d){case this.CHANGE_TYPE_ENUM.EVAL_INITIALIZED:case this.CHANGE_TYPE_ENUM.REGION_EVAL_STARTED:this._isRunning=!0;break;case this.CHANGE_TYPE_ENUM.EVAL_COMPLETE:this._isRunning=!1}this.onStateChanged(d,b)},onStateChanged:function(d,b){},attachListener:function(d,b){var a=f.partial(function(a,
b,d){d===a&&b()},d,b);return e.after(this,"stateChanged",a,!0)},isRunning:function(){return this._isRunning},destroy:function(){}})})},"MW/rtc/plugins/embeddedoutputs/SyntaxErrorHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/embeddedoutputs/SyntaxErrorHandler","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{requires:function(){return{createInstance:["rtc.embeddedoutputs.statehandler","rtc.embeddedoutputs.model"]}},createInstance:function(d,b){return new f(d,
b)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/embeddedoutputs/SyntaxErrorHandler":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/plugins/embeddedoutputs/outputhandlers/error/ErrorOutputProperties"],function(g,f,e,d){return g(null,{constructor:function(b,a){this._stateHandler=b;this._eoModel=a;this._hasEvaluatedFirstRegion=!1;this._previousSyntaxError=null;this._evalArgs=[];this._aspectHandles=[];this._aspectHandles.push(e.after(this._stateHandler,
"stateChanged",f.hitch(this,"_stateChangeListener"),!0))},_stateChangeListener:function(b,a){if(b===this._stateHandler.CHANGE_TYPE_ENUM.EVAL_INITIALIZED)this._previousSyntaxError=this.getFirstSyntaxErrorOutput(),this._evalArgs=a;else if(b===this._stateHandler.CHANGE_TYPE_ENUM.REGION_EVAL_STARTED)this._hasEvaluatedFirstRegion||(this._hasEvaluatedFirstRegion=!0,this._clearSyntaxError(this._previousSyntaxError),this.onParseCompletedWithNoSyntaxErrors(this._evalArgs));else if(b===this._stateHandler.CHANGE_TYPE_ENUM.EVAL_COMPLETE)if(this._hasEvaluatedFirstRegion=
!1,this._evalArgs=[],"syntax"===a.errorType){var c=this.getFirstSyntaxErrorOutput();this._syntaxErrorsAreSame(this._previousSyntaxError,c)?this._clearSyntaxError(c):(this._clearSyntaxError(this._previousSyntaxError),this._previousSyntaxError=null);this.onSyntaxError(a)}else this.onEvaluationCompletedWithNoSyntaxErrors(a)},onSyntaxError:function(b){},onParseCompletedWithNoSyntaxErrors:function(b){},onEvaluationCompletedWithNoSyntaxErrors:function(b){},_syntaxErrorsAreSame:function(b,a){if(!b&&!a)return!0;
if(!b||!a||!b.codeLinePositions||!a.codeLinePositions||b.codeLinePositions.length!==a.codeLinePositions.length)return!1;var c=b.codeLinePositions.every(function(c,b){return c.line===a.codeLinePositions[b].line}),d=b.getErrorType()===a.getErrorType()&&b.getText()===a.getText(),e=b.identifier===a.identifier&&!a.identifier;return c&&d&&e},_clearSyntaxError:function(b){b&&this._eoModel.removeOutput(b)},getFirstSyntaxErrorOutput:function(){return this._eoModel.findOutput(this.isSyntaxError)},isSyntaxError:function(b){return b.type===
d.OUTPUT_TYPE&&b.getErrorType()===d.SYNTAX_ERROR_TYPE},hasSyntaxError:function(b){return b.some(this.isSyntaxError)},destroy:function(){this._aspectHandles.forEach(function(b){b.remove()})}})})},"MW/rtc/plugins/embeddedoutputs/OutputRemoverProvider":function(){define(["dojo/_base/declare","./OutputRemover","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.embeddedoutputs","rtc.localfunctionnotifier",
"rtc.internaldocument","rtc.code.sections.model","rtc.embeddedoutputs.syntaxerrors"]}},createInstance:function(d,b,a,c,e){return new f(d._outputsModel,b,a,c,e)}})})},"MW/rtc/plugins/embeddedoutputs/OutputRemover":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/plugins/functionnotifier/FunctionStateConstants"],function(g,f,e,d){return g(null,{constructor:function(b,a,c,d,k){this._embeddedOutputsModel=b;this._localFunctionNotifier=a;this._internalDocument=c;this._sectionModel=
d;this._syntaxErrorHandler=k;this._functionInfo=null;this._aspectHandles=[];this._aspectHandles.push(e.after(this._localFunctionNotifier,"onValidFunctionsChange",f.hitch(this,"_functionListener"),!0));this._aspectHandles.push(e.after(this._internalDocument,"onDocumentChanged",f.hitch(this,"_docChangeListener")))},destroy:function(){this._aspectHandles.forEach(function(b){b.remove()});this._aspectHandles=[]},_functionListener:function(b){b.type===d.VALID_FUNCTIONS_ADDED||b.type===d.VALID_FUNCTIONS_CHANGED?
(this._functionInfo={startLine:b.validFunctions[0].startLine-1,endLine:b.validFunctions[b.validFunctions.length-1].endLine-1},this._updateToSectionBounds(),this._clearOutputsFromFunction()):b.type===d.VALID_FUNCTIONS_REMOVED&&(this._functionInfo=null)},_clearOutputsFromFunction:function(){var b=this._functionInfo.endLine,a=this._internalDocument.getLineNode(this._functionInfo.startLine),b=this._internalDocument.getLineNode(b),a=this._embeddedOutputsModel.getSectionRegionsFromNodeRange(a,b);0<a.length&&
this._embeddedOutputsModel.clearOutputsForward(a[0].code.regionNumber,this._syntaxErrorHandler.isSyntaxError)},_docChangeListener:function(){this._updateToSectionBounds()&&this._clearOutputsFromFunction()},_updateToSectionBounds:function(){if(!this._functionInfo)return!1;var b=this._sectionModel.getSections();if(0===b.length)return!1;b=b[b.length-1];if(b.localFunctions){if(b.start.line===this._functionInfo.startLine&&b.end.line===this._functionInfo.endLine)return!1;this._functionInfo.startLine=b.start.line;
this._functionInfo.endLine=b.end.line;return!0}return!1}})})},"MW/rtc/plugins/functionnotifier/FunctionStateConstants":function(){define([],function(){return{FUNCTION_ARGS_NAVIGATE_ENTER:"navigateIntoFunctionArgs",FUNCTION_ARGS_NAVIGATE_EXIT:"navigateOutFunctionArgs",FUNCTION_ARGS_NAVIGATE:"navigateInsideFunctionArgs",FUNCTION_ARGS_NAVIGATE_CHANGE:"navigateBetweenArgs",INNER_NESTED_FUNCTION_CALL:"nestedChildFunctionCall",OUTER_NESTED_FUNCTION_CALL:"ParentFunctionCall",VALID_FUNCTIONS_ADDED:"validFunctionsAdded",
VALID_FUNCTIONS_CHANGED:"validFunctionsChanged",VALID_FUNCTIONS_REMOVED:"validFunctionsRemoved",FUNCTIONS_ON_VALID_DOCUMENT_CHANGE:"functionInfoOnValidDocumentChange"}})},"MW/rtc/plugins/embeddedoutputs/CopyOutputsProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/embeddedoutputs/CopyOutputs","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{requires:function(){return{createInstance:"rtc.embeddedoutputs.model rtc.embeddedoutputs rtc.clipboard rtc.cursor rtc.actionservice rtc.contextmenu.generator rtc.clipboardtempdirpath".split(" ")}},
createInstance:function(d,b,a,c,e,k,g){return new f(d,b,a,c,e,k,g)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/embeddedoutputs/CopyOutputs":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/plugins/cutcopypaste/MIMETypes","dojo/i18n!l10n/nls/actions"],function(g,f,e,d,b){return g(null,{RTC_COPY_OUTPUT:"rtc_copy_output",RTC_COPY_ALL_OUTPUT:"rtc_copy_all_output",constructor:function(a,c,d,k,g,m,p){this._outputModel=a;this._outputView=c.getEmbeddedOutputsView();
this._clipboard=d;this._cursor=k;this._actionService=g;this._tempDirPath=p;this._actions=[{id:this.RTC_COPY_OUTPUT,enabled:!1,contextMenuGroup:"copyPaste",description:b.copyOutput,callback:f.hitch(this,this._copyCurrentOutputs)},{id:this.RTC_COPY_ALL_OUTPUT,enabled:!0,contextMenuGroup:"copyPaste",description:b.copyAllOutput,callback:f.hitch(this,this._copyAllOutputs)}];this._selectedOutputs=[];this._handleEmbeddedOutputsStateChange(c.isEmbeddedOutputsEnabled());this._aspectHandles=[];this._aspectHandles.push(e.after(m,
"willOpen",f.hitch(this,"_updateSelectedOutputs"),!0));this._aspectHandles.push(e.after(c,"onEmbeddedOutputsStateChange",f.hitch(this,"_handleEmbeddedOutputsStateChange"),!0))},_updateSelectedOutputs:function(a,c){var b;b=this._outputView.getOutputWrapperFromElement(c);var d=a===this._rightPanel;b?b=[b]:d?b=[]:(b=this._getSelectionRange(),b=this._outputView.getOutputDivsForRange(b.start,b.end));this._selectedOutputs=b.map(function(a){return this._outputView.getOutputFromOutputDiv(a)},this);this._actionService.updateAction("rtc_copy_output",
{enabled:0<this._selectedOutputs.length});b=this._outputModel.hasOutputs();this._actionService.updateAction("rtc_copy_all_output",{enabled:b})},_copyOutputs:function(a){var c="",b="",e=1<a.length,f=this._tempDirPath,g=[],p=[];e&&(b+="\x3cp\x3e");a.forEach(function(d,p){if(e&&0<p){var n=a[p-1];d.codeLinePositions[d.codeLinePositions.length-1].line!==n.codeLinePositions[n.codeLinePositions.length-1].line&&(b+="\x3c/p\x3e\x3cp\x3e")}n=d.getText();c+=(c?"\n":"")+n;b+=d.getHTML(f,g)});e&&(b+="\x3c/p\x3e");
if(1===a.length){var n=a[0];n.getMIMEContent&&(p=p.concat(n.getMIMEContent()))}p=[{flavor:d.HTML,content:b},{flavor:d.TEXT,content:c},{flavor:d.COPY_FOR_COMMAND_WINDOW,content:c}].concat(p);g.length&&p.push({flavor:d.IMAGE_LIST,content:g});for(var n=[],q=p.length-1;0<=q;q-=1){var r=p[q].flavor;(0<=n.indexOf(r)||void 0===p[q].content)&&p.splice(q,1);n.push(r)}this._clipboard.setClipboardData(p)},_getSelectionRange:function(){var a=this._cursor.selectionInfo(),c=a.startNode.rootContainer(),a=a.endNode.rootContainer();
return{start:c,end:a}},_copyCurrentOutputs:function(){this._copyOutputs(this._selectedOutputs)},_copyAllOutputs:function(){var a=this._outputModel.getOutputs();this._copyOutputs(a)},_handleEmbeddedOutputsStateChange:function(a){a?this._actionService.loadActions(this._actions):this._actions.forEach(function(a){this._actionService.getAction(a.id)&&this._actionService.removeAction(a.id)},this)},destroy:function(){var a=this._actionService;this._actions.forEach(function(c){a.getAction(c.id)&&a.removeAction(c.id)});
this._aspectHandles.forEach(function(a){a.remove()})}})})},"MW/rtc/plugins/embeddedoutputs/ExecutionManagerProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/embeddedoutputs/ExecutionManager","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{requires:function(){return{createInstance:"rtc.document rtc.internaldocument rtc.code.sections.model rtc.embeddedoutputs.model rtc.backingstore rtc.document.executablecode.executablecodeservice rtc.id rtc.embeddedoutputs.outputhandler rtc.embeddedoutputs.statehandler rtc.code.matlabfiletype rtc.editordataservice rtc.linenumberservice rtc.embeddedoutputs.executionrequestfactory".split(" ")}},
createInstance:function(d,b,a,c,e,k,g,m,p,n,q,r,s){return new f(d,b,a,c,e,k,g,m,p,n,q,r,s)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/embeddedoutputs/ExecutionManager":function(){define("./ExecutionAndOutputsDataServiceController dojo/_base/declare dojo/_base/lang MW/rtc/model/CodeUtilities MW/rtc/model/Range MW/rtc/plugins/debug/DebugServicesFactory".split(" "),function(g,f,e,d,b,a){return f([],{constructor:function(c,b,d,f,m,p,n,q,r,s,t,u,v){this._document=c;this._internalDocument=
b;this._sectionModel=d;this._outputsModel=f;this._backingStore=m;this._executableCodeService=p;this._editorId=n;this._outputHandler=q;this._stateHandler=r;this._debugServices=a.getInstance();this._filetype=s;this._editorDataService=t;this._lineNumberService=u;this._executionRequestFactory=v;this._executionAndOutputsDataServiceController=new g(this._editorId,this._outputHandler,this._stateHandler,this._editorDataService,this._sectionModel,this._lineNumberService,this._executionRequestFactory,e.hitch(this,
"_getAllUpdatedTextRegions"),e.hitch(this,"_getFullEvaluationRangeCallback"))},interrupt:function(){this._executionAndOutputsDataServiceController.interrupt()},hasPendingRequests:function(){return this._executionAndOutputsDataServiceController.hasPendingRequests()},executeCurrentSection:function(a,b){var d=this._sectionModel.getCurrentSectionNumber();-1!==d&&this.executeSection(d,a,b)},executeSection:function(a,b,d,e){var f;f=b?this._sectionModel.getSections().length-1:a;this._executeSectionRange(a,
f,b,d,e)},executeAllSections:function(){var a=this._sectionModel.getSections().length-1;this._executeSectionRange(0,a,!0,!1)},_executeSectionRange:function(a,b,d,e,f){if(this._isExecutionAllowed()){this._quitDebuggingIfNeeded();var g=this._sectionModel.getSection(a).start,n=this._sectionModel.getSection(b).end,g=this._document.createLinePosition(g.getNode().rootContainer(),!1),n=this._document.createLinePosition(n.getNode().rootContainer(),!1);this._outputsModel.synchronizeRegionsPartial(a,d);var q=
this._getRegionsForSection(a,d).map(this._getTextRegion,this),r=this._executableCodeService.getEvalText(),s=this._document.getState();a=0!==a||!d;e=!e;d=this._backingStore.getFilePath();var t=this._backingStore.getFileName();this._executionAndOutputsDataServiceController.evaluateCode(q,r,s,a,e,g,n,b,d,t,f)}},_getFullEvaluationRangeCallback:function(){var a=this._sectionModel.getSection(0),d=this._sectionModel.getSection(this._sectionModel.getSections().length-1),a=a.start.getNode(),d=d.end.getNode(),
a=this._document.createLinePosition(a.rootContainer(),!1),d=this._document.createLinePosition(d.rootContainer(),!1);return new b(a,d)},_getRegionsForSection:function(a,b){var d=this._sectionModel.getSection(a),e=d.start.getNode();b&&(d=this._sectionModel.getSections(),d=d[d.length-1]);d=d.end.getNode();return this._outputsModel.getSectionRegionsFromNodeRange(e,d)},_getTextRegions:function(a,b){return this._outputsModel.getRegions(a,b).map(this._getTextRegion,this)},_getAllUpdatedTextRegions:function(){this._outputsModel.synchronizeRegions();
return this._getTextRegions()},_getTextRegion:function(a){var b=a.code;return{regionLineNumber:d.getCodeLineNumberFromPosition(this._internalDocument,b.regionPositions[0]),regionString:b.regionString,regionNumber:b.regionNumber,endOfSection:b.endOfSection,sectionNumber:b.sectionNumber,regionUid:a.uid}},_quitDebuggingIfNeeded:function(){this._debugServices.isDebugging&&this._debugServices.debugExit()},_isExecutionAllowed:function(){return this._filetype.isScript()},destroy:function(){this._executionAndOutputsDataServiceController.destroy();
this._executionAndOutputsDataServiceController=null}})})},"MW/rtc/plugins/embeddedoutputs/ExecutionAndOutputsDataServiceController":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect mw-log/Log mw-utils/Utils MW/rtc/plugins/embeddedoutputs/EmbeddedOutputDataService MW/rtc/plugins/embeddedoutputs/ExecutionDataService MW/rtc/plugins/embeddedoutputs/ExecutionRequest MW/rtc/plugins/embeddedoutputs/outputhandlers/error/ErrorOutputProperties".split(" "),function(g,f,e,d,b,a,c,h,k){return g(null,
{_EMBEDDED_OUTPUTS_FEATURE_ID:"matlab.code.embeddedoutputs",_TRADITIONAL_OUTPUTS_FEATURE_ID:"rtc.execution.traditional",constructor:function(b,d,h,k,g,r,s,t,u){this._editorId=b;this._outputsHandler=d;this._stateHandler=h;this._editorDataService=k;this._sectionModel=g;this._lineNumberService=r;this._executionRequestFactory=s;this._editorDataService.request(this._EMBEDDED_OUTPUTS_FEATURE_ID,{id:b}).then(function(){},function(){});this._editorDataService.request(this._TRADITIONAL_OUTPUTS_FEATURE_ID,
{id:b}).then(function(){},function(){});this._executionDataService=new c(this._editorId,t);this._embeddedOutputsDataService=new a(this._editorId,this._outputsHandler,t,u);this._getFullEvaluationRangeCallback=u;this._queuedRequests=[];this._lastQueuedSection=this._lastDocumentState=this._currentlyRunningEvaluationResult=this._currentlyRunningRequest=null;this._isTraditionalExecution=this._regionsEvalFinished=this._outputsFinished=!1;this._aspectHandles=[];this._aspectHandles.push(e.after(this._executionDataService,
"onEvalComplete",f.hitch(this,"_handleEvalComplete"),!0));this._aspectHandles.push(e.after(this._executionDataService,"onSectionEvalComplete",f.hitch(this,"_handleSectionEvalComplete"),!0));this._aspectHandles.push(e.after(this._executionDataService,"onRegionEvalStarted",f.hitch(this,"_handleRegionEvalStarted"),!0));this._aspectHandles.push(e.after(this._embeddedOutputsDataService,"onOutputsStreamingFinished",f.hitch(this,"_handleOutputsStreamingFinished"),!0))},interrupt:function(){this._clearQueuedRequests();
this._doInterrupt()},_clearQueuedRequests:function(){this._queuedRequests.forEach(function(a){a.destroy()});this._queuedRequests=[]},_doInterrupt:function(){this._currentlyRunningRequest&&this._executionDataService.interrupt(this._currentlyRunningRequest)},_handleSectionEvalComplete:function(a){this._embeddedOutputsDataService.flushOutputs();this._notifySectionCompletion(a)},_notifySectionCompletion:function(a){this._stateHandler.stateChanged(this._stateHandler.CHANGE_TYPE_ENUM.SECTION_EVAL_COMPLETE,
a)},_handleRegionEvalStarted:function(a){this._stateHandler.stateChanged(this._stateHandler.CHANGE_TYPE_ENUM.REGION_EVAL_STARTED,a)},_handleEvalComplete:function(a){this._currentlyRunningEvaluationResult={didRunToCompletion:a.data.didRunToCompletion,errorType:a.data.errorType,errorLine:a.data.errorLine};this._regionsEvalFinished=!0;this._finishCurrentRequestIfComplete()},_handleOutputsStreamingFinished:function(){this._outputsFinished=!0;this._finishCurrentRequestIfComplete()},_finishCurrentRequestIfComplete:function(){this._regionsEvalFinished&&
(this._outputsFinished||this._isTraditionalExecution)&&this._finishCurrentRequest()},_finishCurrentRequest:function(){var a,c=this._currentlyRunningEvaluationResult.didRunToCompletion,b=this._currentlyRunningEvaluationResult.errorType,d=this._currentlyRunningEvaluationResult.errorLine;a=this._currentlyRunningRequest?this._currentlyRunningRequest.getEvaluationRange():this._getFullEvaluationRangeCallback();this._isTraditionalExecution&&(b!==k.SYNTAX_ERROR_TYPE&&-1<d)&&this._sendSectionCompletionEvents(a,
d);this._stateHandler.stateChanged(this._stateHandler.CHANGE_TYPE_ENUM.EVAL_COMPLETE,{didRunToCompletion:c,errorType:b,requestedEvaluationRange:a});this._embeddedOutputsDataService.handleEndOfEvaluation(this._currentlyRunningRequest,b);this._executionDataService.handleEndOfEvaluation();this._currentlyRunningRequest&&(this._currentlyRunningRequest.destroy(),this._currentlyRunningRequest=null);this._currentlyRunningEvaluationResult=null;this._regionsEvalFinished=this._outputsFinished=!1;0!==this._queuedRequests.length&&
(a=this._queuedRequests.pop(),this._getOutputsForMessage(a))},_sendSectionCompletionEvents:function(a,c){var b=a.getStartPosition().getNode(),b=this._sectionModel.getSectionNumberForNode(b),d=a.getEndPosition().getNode(),d=this._sectionModel.getSectionNumberForNode(d);0<c&&(d=this._lineNumberService.getLineNumberFromCodeLineNumber(c),d=this._sectionModel.getSectionNumberForLine(d)-1);for(;b<=d;b++)this._notifySectionCompletion(b)},evaluateCode:function(a,c,b,d,e,h,f,k,g,v,w){a=this._executionRequestFactory.createRequest(v,
g,c,b,h,f,a,d);this._lastQueuedSection=k;this._lastDocumentState=b;b=!w&&!this._isOkayToQueue(b,k);this._getOutputsForMessage(a,e||b,w)},_getOutputsForMessage:function(a,c,b){this._currentlyRunningRequest?c?(this.interrupt(),this._queuedRequests=[a]):b?(this._clearQueuedRequests(),this._queuedRequests=[a]):this._queuedRequests.unshift(a):(this._currentlyRunningRequest=a,c={regionNumbersToRun:a.getRegionNumbersToRun(),evaluationRange:a.getEvaluationRange()},this._stateHandler.stateChanged(this._stateHandler.CHANGE_TYPE_ENUM.EVAL_INITIALIZED,
c),this._embeddedOutputsDataService.handleStartOfEvaluation(a),this._isTraditionalExecution?this._executionDataService.executeTraditionalRequest(a):this._executionDataService.executeRequest(a))},_isOkayToQueue:function(a,c){var b=this._lastQueuedSection<c;return a===this._lastDocumentState&&b},hasPendingRequests:function(){return 0<this._queuedRequests.length},destroy:function(){this._executionDataService.destroy();this._executionDataService=null;this._embeddedOutputsDataService.destroy();this._embeddedOutputsDataService=
null;this._currentlyRunningRequest&&(this._currentlyRunningRequest.destroy(),this._currentlyRunningRequest=null);this._currentlyRunningEvaluationResult=null;this._aspectHandles.forEach(function(a){a.remove()});this._aspectHandles=[]}})})},"MW/rtc/plugins/embeddedoutputs/EmbeddedOutputDataService":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect mw-log/Log mw-utils/Utils MW/rtc/plugins/embeddedoutputs/MessageServiceFactory MW/rtc/plugins/embeddedoutputs/OutputQueue".split(" "),function(g,
f,e,d,b,a,c){return g(null,{_CLEAR_REGIONS_OUTPUTS_NAMESPACE:"/embeddedOutputs/clearRegionsOutputsRequest/",_OUTPUT_STREAM_EVENT_NAMESPACE:"/embeddedOutputs/outputStreamEvent/",_OUTPUT_STREAM_STATUS_NAMESPACE:"/embeddedOutputs/outputStreamStatus/",constructor:function(b,d,e,f){this._editorId=b;this._outputsHandler=d;this._outputQueue=new c(this._outputsHandler);this._getRegionsDataCallback=e;this._getFullEvaluationRangeCallback=f;this._currentRequest=null;this._messageService=a.getInstance();this._messageService.subscribe(this._CLEAR_REGIONS_OUTPUTS_NAMESPACE+
this._editorId,"_clearRegionsOutput",this);this._messageService.subscribe(this._OUTPUT_STREAM_EVENT_NAMESPACE+this._editorId,"_outputStreamEvent",this);this._messageService.subscribe(this._OUTPUT_STREAM_STATUS_NAMESPACE+this._editorId,"_handleOutputStreamStatus",this)},handleStartOfEvaluation:function(a){this._outputsHandler.handleStartOfEvaluation(a.getEvaluationRange());this._currentRequest=a},handleEndOfEvaluation:function(a,c){if(!(null===a||null===this._currentRequest)){var b=this._currentRequest.getRequestId();
if(b===a.getRequestId()){var d=this._currentRequest.getEvaluationRange();this._outputsHandler.handleEndOfEvaluation(d,b,c);this._currentRequest=null}}},onOutputsStreamingFinished:function(){},flushOutputs:function(){this._outputQueue.flushNow()},_outputStreamEvent:function(a){var c=a.data.requestId,b=a.data.outputs;a=a.data.completedRegionNumbers||[];if(!(0===b.length&&0===a.length)){var d=null;if(this._currentRequest){if(c!==this._currentRequest.getRequestId())return;d=this._currentRequest.getEvaluationRange()}else d=
this._getFullEvaluationRangeCallback();this._outputQueue.addToQueue(b,a,c,d)}},_clearRegionsOutput:function(a){a=a.data;this._outputQueue.flushNow();this._outputsHandler.clearRegionsOutputs(a)},_handleOutputStreamStatus:function(a){a.data.streamingFinished&&this._handleOutputStreamingFinished()},_handleOutputStreamingFinished:function(){try{this._outputQueue.flushNow()}catch(a){d.error("Exception occurred while flushing outputs: "+a)}this.onOutputsStreamingFinished()},destroy:function(){this._outputQueue.destroy();
this._outputQueue=null;this._messageService.unsubscribe(this._CLEAR_REGIONS_OUTPUTS_NAMESPACE+this._editorId,"_clearRegionsOutput",this);this._messageService.unsubscribe(this._OUTPUT_STREAM_EVENT_NAMESPACE+this._editorId,"_outputStreamEvent",this);this._messageService.unsubscribe(this._OUTPUT_STREAM_STATUS_NAMESPACE+this._editorId,"_handleOutputStreamStatus",this);this._currentRequest=null}})})},"MW/rtc/plugins/embeddedoutputs/ExecutionDataService":function(){define(["dojo/_base/declare","dojo/_base/lang",
"dojo/aspect","./MessageServiceFactory"],function(g,f,e,d){return g(null,{_EVAL_REGIONS_NAMESPACE:"/embeddedOutputs/evalRegions/",_INTERRUPT_EVAL_NAMESPACE:"/embeddedOutputs/interruptRegion/",_EVAL_COMPLETE:"/embeddedOutputs/regionsComplete/",_REGION_EVAL_STARTED_NAMESPACE:"/liveEval/regionEvaluating/",_SECTION_EVAL_COMPLETED_NAMESPACE:"/liveEval/sectionEvaled/",_EVAL_COMPLETED_NAMESPACE:"/liveEval/regionsEvaled/",_GET_REGIONS_DATA_REQUEST_NAMESPACE:"/embeddedOutputs/getRegionsDataRequest/",_GET_REGIONS_DATA_RESPONSE_NAMESPACE:"/embeddedOutputs/getRegionsDataResponse/",
_TRADITIONAL_EXECUTION_REQUEST_PREFIX:"/traditionalexecution/request_",_TRADITIONAL_EXECUTION_EVAL_RESPONSE_PREFIX:"/traditionalexecution/evaluatecode/response_",constructor:function(b,a){this._editorId=b;this._getRegionsDataCallback=a;this._evalRegionsNamespace=this._EVAL_REGIONS_NAMESPACE+this._editorId;this._evalCompleteNamespace=this._EVAL_COMPLETE+this._editorId;this._interruptRegionsNamespace=this._INTERRUPT_EVAL_NAMESPACE+this._editorId;this._getUpdatedTextRegionsNamespace=this._GET_REGIONS_DATA_RESPONSE_NAMESPACE+
this._editorId;this._traditionalExecutionNamespace=this._TRADITIONAL_EXECUTION_REQUEST_PREFIX+this._editorId;this._messageService=d.getInstance();this._messageService.subscribe(this._REGION_EVAL_STARTED_NAMESPACE+this._editorId,"_handleRegionEvalStarted",this);this._messageService.subscribe(this._EVAL_COMPLETED_NAMESPACE+this._editorId,"_handleEvalCompleted",this);this._messageService.subscribe(this._SECTION_EVAL_COMPLETED_NAMESPACE+this._editorId,"_handleSectionEvalCompleted",this);this._messageService.subscribe(this._GET_REGIONS_DATA_REQUEST_NAMESPACE+
this._editorId,"_getRegionsDataRequest",this);this._messageService.subscribe(this._TRADITIONAL_EXECUTION_EVAL_RESPONSE_PREFIX+this._editorId,"_handleTraditionalEvalResponse",this)},executeRequest:function(b){b=b.getExecutionMessage();this._messageService.publish(this._evalRegionsNamespace,b)},executeTraditionalRequest:function(b){b=b.getTraditionalExecutionMessage();this._messageService.publish(this._traditionalExecutionNamespace,b)},interrupt:function(b){this._messageService.publish(this._interruptRegionsNamespace,
b.getRequestId())},handleEndOfEvaluation:function(){this._messageService.publish(this._evalCompleteNamespace)},onEvalComplete:function(b){},onSectionEvalComplete:function(b){},onRegionEvalStarted:function(b){},_handleSectionEvalCompleted:function(b){this.onSectionEvalComplete(b.data)},_handleRegionEvalStarted:function(b){this.onRegionEvalStarted(b.data)},_handleEvalCompleted:function(b){this.onEvalComplete(b)},_handleTraditionalEvalResponse:function(b){this._handleEvalCompleted({data:{didRunToCompletion:b.data.didRunToCompletion,
errorType:b.data.errorType,errorLine:b.data.errorLine}})},_getRegionsDataRequest:function(){var b={status:!0,exception:""};try{b.regionsData=this._getRegionsDataCallback()}catch(a){b.exception=a}this._messageService.publish(this._getUpdatedTextRegionsNamespace,b)},destroy:function(){this._messageService.unsubscribe(this._REGION_EVAL_STARTED_NAMESPACE+this._editorId,"_handleRegionEvalStarted",this);this._messageService.unsubscribe(this._EVAL_COMPLETED_NAMESPACE+this._editorId,"_handleEvalCompleted",
this);this._messageService.unsubscribe(this._SECTION_EVAL_COMPLETED_NAMESPACE+this._editorId,"_handleSectionEvalCompleted",this);this._messageService.unsubscribe(this._GET_REGIONS_DATA_REQUEST_NAMESPACE+this._editorId,"_getRegionsDataRequest",this);this._messageService.unsubscribe(this._TRADITIONAL_EXECUTION_EVAL_RESPONSE_PREFIX+this._editorId,"_handleTraditionalEvalResponse",this)}})})},"MW/rtc/plugins/embeddedoutputs/ExecutionDataManagerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"MW/rtc/plugins/embeddedoutputs/ExecutionDataManager"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.embeddedoutputs.statehandler","rtc.id","rtc.embeddedoutputs.model","rtc.internaldocument","rtc.linenumberservice"]}},createInstance:function(d,b,a,c,h){return new e(d,b,a,c,h)}})})},"MW/rtc/plugins/embeddedoutputs/ExecutionDataManager":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin","mw-messageservice/MessageService"],
function(g,f,e,d,b){return g(d,{_REQUEST_DATA:"/executionData/executionDataRequest/",_RECEIVE_DATA:"/executionData/executionDataResponse/",_MAX_REQUEST_INTERVAL:500,_DEFAULT_REQUEST_INTERVAL:16,constructor:function(a,c,d,k,g){this._stateHandler=a;this._editorId=c;this._requestInterval=null;this._embeddedOutputsModel=d;this._internalDocument=k;this._lineNumberService=g;this._knownExecutionRunning=!1;this.own(e.after(this._stateHandler,"stateChanged",f.hitch(this,"_handleEvalType"),!0));b.subscribe(this._RECEIVE_DATA+
this._editorId,"_handleExecutionData",this)},_handleEvalType:function(a){if(a===this._stateHandler.CHANGE_TYPE_ENUM.EVAL_INITIALIZED){this._requestIntervalTime=this._DEFAULT_REQUEST_INTERVAL;this._previousRegionCall=0;this._lineRunCounters=[];this._knownExecutionRunning=!0;a=this._lineNumberService.getNumberOfCodeLines();for(var c=0;c<a;c++)this._lineRunCounters[c]=0;this._initializeRequests()}else a===this._stateHandler.CHANGE_TYPE_ENUM.EVAL_COMPLETE&&(this._terminateRequests(),this._knownExecutionRunning=
!1)},_initializeRequests:function(){this._requestInterval=setInterval(f.hitch(this,"_requestForData"),this._requestIntervalTime)},_terminateRequests:function(){clearInterval(this._requestInterval);this._requestInterval=null},_requestForData:function(){b.publish(this._REQUEST_DATA+this._editorId,{dataSent:"requestData"})},_handleExecutionData:function(a){if(!this._knownExecutionRunning)return!1;this._currentRegion=a.data.checkPoint;var c=!1,b;for(b in a.data.linesData)a.data.linesData.hasOwnProperty(b)&&
(this._lineRunCounters[b]+=a.data.linesData[b],c=!0);this._updateIntervalTime();this._initializeRequests();if(c)this.onDataUpdate(this._currentRegion,this._lineRunCounters);this._previousRegionCall=this._currentRegion},_updateIntervalTime:function(){this._currentRegion!==this._previousRegionCall?this._requestIntervalTime=this._DEFAULT_REQUEST_INTERVAL:(this._requestIntervalTime*=2,this._requestIntervalTime=Math.min(this._requestIntervalTime,this._MAX_REQUEST_INTERVAL));clearInterval(this._requestInterval)},
onDataUpdate:function(a,c){},destroy:function(){b.unsubscribe(this._RECEIVE_DATA+this._editorId,"_handleExecutionData",this)}})})},"MW/rtc/plugins/embeddedoutputs/view/inline/InlineViewProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./InlineView"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.view rtc.cursor rtc.internaldocument rtc.embeddedoutputs.syntaxerrors rtc.focusservice rtc.view.decoration.layerviewmodel rtc.view.hidden.hiddennodemodel".split(" ")}},
createInstance:function(d,b,a,c,h,f,g){return new e(d,b,a,c,h,f,g)}})})},"MW/rtc/plugins/embeddedoutputs/view/inline/InlineView":function(){define("dojo/_base/declare dojo/_base/event dojo/_base/fx dojo/_base/lang dojo/aspect dojo/dom-construct dojo/dom-style dojo/fx dojo/i18n!l10n/nls/actions dojo/mouse dojo/on mw-gesture/GestureDetector mw-gesture/GestureRegistry mw-gesture/util/ButtonValues MW/rtc/model/CodeUtilities MW/rtc/model/DocumentConstants MW/rtc/model/DocumentEventUtilities MW/rtc/model/DocumentUtilities MW/rtc/model/events/nodechange/NodeChangeEventTypes MW/rtc/plugins/embeddedoutputs/view/AbstractView MW/rtc/plugins/embeddedoutputs/view/EmbeddedOutputsViewStateEnum ./LineWithOutputLayouter".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x,y){return g(w,{_NODES_ARE_IN_ORDER:1,_VIEW_STATE_NAME:x.INLINE_VIEW_STATE,ACTION_ID:"rtc_inline_view",ACTION_ID_NO_ANIMATION:"rtc_inline_view_no_animation",BUTTON_CSS_CLASS:"inline",DATATEST_ID:"outputsInlineButton",TOOLTIP_MESSAGE:'\x3cdiv data-testid\x3d"inlineTooltip"\x3e'+k.showInline+"\x3c/div\x3e",constructor:function(c,e,h,f,k,g,l){this._cursor=e;this._view=c;this._internalDocument=h;this._syntaxErrorHandler=f;this._focusService=k;this._view.registerLayouter(new y(g,
l,this));this._enabled=!1;this._outputDivs={};this._animations=[];this._gestureDetector=null;this._deletedNodes=[];this._lineMap={};this._cacheDiv=a.create("div");this.own(b.after(this._internalDocument,"onNodeChange",d.hitch(this,"_onNodeChange"),!0));this.own(b.after(this._internalDocument,"onDocumentChanged",d.hitch(this,"_handleOnDocumentChanged"),!0));this.own(b.after(this._internalDocument,"onDocumentReset",d.hitch(this,"_handleOnDocumentReset")))},setup:function(a){this._viewModel=a},getName:function(){return this._VIEW_STATE_NAME},
createOutputDivsFromOutputs:function(){var c=a.create("div",{className:"inlineElement eoOutputWrapper"});c.addEventListener("click",d.hitch(this,function(a){this.onOutputClicked(a.target)}));c.addEventListener("mouseup",d.hitch(this,"_handleMouseUp"));return c},layout:function(a,c,b,d){this.isEnabled()&&(this._updateLineMap(),this._updateOutputs(c,b),this._view.onLayoutChange(),this.redrawRTCView(d))},cacheOutput:function(c){a.place(c,this._cacheDiv)},_cacheOutputs:function(a){var c;for(c=0;c<a.length;c+=
1)this.cacheOutput(a[c])},isEnabled:function(){return this._enabled},enable:function(){this._enableGestureHandling();this._enabled=!0},disable:function(){this._disableGestureHandling();this._removeOutputs();this._enabled=!1},_enableGestureHandling:function(){this._gestureDetector||(this._gestureDetector=new p(this._internalDocument.root.box),this._addGestureHandlers(this._gestureDetector))},_disableGestureHandling:function(){this._gestureDetector&&(this._gestureDetector.destroy(),this._gestureDetector=
null)},_addGestureHandlers:function(a){a.add([n.tapmove({options:{numTaps:0,button:q.RIGHT},callbacks:{began:d.hitch(this,function(a,c){var b=a.srcEvent;null!==this._viewModel.getOutputWrapperFromElement(b.target)&&f.stop(b)})}}),n.tapmove({options:{numTaps:0,button:q.LEFT},callbacks:{began:d.hitch(this,function(a,c){var b=a.srcEvent;null!==this._viewModel.getOutputWrapperFromElement(b.target)&&"A"===b.target.tagName&&f.stop(b)})}})])},_onNodeChange:function(a){var c;if(a.type===v.MERGE_NODE){var b=
a.node,d=a.newNode;if((c=this.getOutputsForNode(b))&&0<c.length){this._cacheOutputs(c);var e=this.getOutputsForNode(d),e=u.nodesInOrder(b,d)===this._NODES_ARE_IN_ORDER?c.concat(e):e.concat(c);this._outputDivs[d.uid]=e;this._outputDivs[b.uid]=null}}if(a.type===v.SPLIT_NODE&&1===a.lineStartOrEnd&&(c=this.getOutputsForNode(a.node))&&0<c.length)this._outputDivs[a.newNode.uid]=c,this._outputDivs[a.node.uid]=null;a.type===v.DELETE_NODE&&(c=this.getOutputsForNode(a.node))&&0<c.length&&this._deletedNodes.push(a.node)},
_handleOnDocumentChanged:function(a){0<this._deletedNodes.length?(this._deletedNodes=[],this.layout(this._viewModel,!1)):t.hasEventType(a,s.FORMAT_CHANGE_EVENT)&&this.layout(this._viewModel,!1)},_handleOnDocumentReset:function(){this._enabled&&(this._disableGestureHandling(),this._enableGestureHandling())},_removeOutputs:function(){var a=r.getCodeLineNodes(this._internalDocument),c;for(c=0;c<a.length;c+=1){var b=a[c];this.getOutputsForNode(b).length&&this._clearOutput(b)}},_clearOutput:function(a){this._outputDivs[a.uid]=
null;this._view.layoutNode(a)},_updateLineMap:function(){this._lineMap={};this._viewModel.getRegions().forEach(function(a){var c=this._findLastLineNode(a.positions);c&&a.positions.forEach(function(a){a=a.getNode();this._lineMap[a.uid]=c},this)},this)},_updateOutputs:function(a,c){var b={};Object.keys(this._outputDivs).forEach(function(a){b[a]=this._outputDivs[a]},this);this._outputDivs=this._buildOutputMap();var d=r.getCodeLineNodes(this._internalDocument).filter(function(a){return c&&this._hasVisibleOutputs(a)||
this._areOutputsForLineDifferent(a,b,this._outputDivs)},this);d.forEach(function(a){this._view.refreshNode(a)},this);a&&this._fadeInOutputs(d)},_buildOutputMap:function(){var a={},c=0;this._viewModel.getOutputDivs().forEach(function(b){var d=this._findNodeToDisplayOutput(b);d&&(b.setAttribute("data-testid","output_"+c),c++,a[d.uid]||(a[d.uid]=[]),a[d.uid].push(b))},this);return a},_findNodeToDisplayOutput:function(a){var c,b=this._viewModel.getOutputFromOutputDiv(a);if(this._syntaxErrorHandler.isSyntaxError(b))return c=
b.codeLinePositions[b.codeLinePositions.length-1].getNode(),r.isCodeContainer(c,!0)?c:null;for(a=b.codeLinePositions.length-1;0<=a;a--)if(c=b.codeLinePositions[a].getNode(),c=this._lineMap[c.uid])return c;return null},_areOutputsForLineDifferent:function(a,c,b){a=a.uid;c=c[a]||[];var d=b[a]||[];return c.length!==d.length?!0:!c.every(function(a,c){return a===d[c]})},_hasVisibleOutputs:function(a){return 0<(this._outputDivs[a.uid]||[]).length},_fadeInOutputs:function(a){a=this._getOutputsToAnimateByLines(a);
a.forEach(function(a){c.set(a,"opacity","0")});a=a.map(function(a){return e.fadeIn({node:a})},this);h.combine(a).play()},_getOutputsToAnimateByLines:function(a){var c=[];a.forEach(function(a){a=this.getOutputsForNode(a);c=c.concat(this._getOutputsToAnimateByElements(a))},this);return c},_getOutputsToAnimateByElements:function(a){var c=this._getAnimationBuffer();return a.filter(function(a){return!this._view.isElementOutOfView(a,c)},this)},_getAnimationBuffer:function(){var a=this._view.getDomTargetPosition();
return{left:0,right:0,top:a.clientHeight/2,bottom:a.clientHeight/2}},_findLastLineNode:function(a){var c,b;for(c=a.length-1;0<=c;c--)if(b=a[c].getNode(),r.isCodeContainer(b,!0))return b;return null},startupOutputsForNode:function(a){this.getOutputsForNode(a).forEach(function(a){(a=this._viewModel.getOutputFromOutputDiv(a))&&a.startup()},this)},getOutputsForNode:function(a){return!this.isEnabled()?[]:this._outputDivs[a.uid]||[]},_handleMouseUp:function(a){l.isMiddle(a)&&this._focusService.setFocus()},
destroy:function(){this._removeOutputs(!1);this._view.onLayoutChange(this._cursor.position);this._disableGestureHandling();a.destroy(this._cacheDiv)},destroyView:function(){this.disable()}})})},"MW/rtc/plugins/embeddedoutputs/view/AbstractView":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin"],function(g,f){return g(f,{ACTION_ID:"actionId",ACTION_ID_NO_ANIMATION:"actionIdNoAnimation",BUTTON_CSS_CLASS:"buttonClass",DATATEST_ID:"dataTestId",TOOLTIP_MESSAGE:"tooltipMessage",constructor:function(e,
d){this._rtcView=e;this._cursor=d},setup:function(){},destroy:function(){},enable:function(){throw Error("Unimplemented API: enable");},disable:function(){throw Error("Unimplemented API: disable");},onOutputClicked:function(e){},getName:function(){throw Error("Unimplemented API: getName");},layout:function(){throw Error("Unimplemented API: layout");},outputStyleChanged:function(e,d,b){this.redrawRTCView(!1)},redrawRTCView:function(e){this._rtcView.onLayoutChange(e?this._cursor.position:null)},destroyView:function(){}})})},
"MW/rtc/plugins/embeddedoutputs/view/inline/LineWithOutputLayouter":function(){define(["dojo/_base/declare","dojo/dom-class","dojo/dom-construct","MW/rtc/nodes/inner/LineNode","MW/rtc/plugins/view/layoutmanager/layouters/LineLayouter"],function(g,f,e,d,b){return g(b,{constructor:function(a,c,b){this._inlineView=b},getApplicableNodeClass:function(){return d},layout:function(a,c){this._cacheOutput(c);var b=this.inherited(arguments);if(!b)return null;var d=e.create("div",{"class":"inlineWrapper"});e.place(b,
d,"last");if((b=this._getOutputDivs(c))&&0<b.length)b=this._getOutputBox(b),d=this._updateOutputs(d,b);return d},refresh:function(a,c,b){this._cacheOutput(c);this.inherited(arguments);var d=b.parentElement,e=this._getOutputDivs(c);if(e&&0<e.length){var e=this._getOutputBox(e),g=this._isElementOutputParagraph(d.lastChild);this._updateOutputs(d,e,g);this._inlineView.startupOutputsForNode(c)}else f.remove(d,"outputs");return null},_cacheOutput:function(a){if((a=a.box)&&a.lastChild)a=this._getLastChildOfParent(a),
this._isElementOutputParagraph(a)&&this._inlineView.cacheOutput(a)},_getLastChildOfParent:function(a){return a.parentElement.lastChild},_isElementOutputParagraph:function(a){return 0<=a.className.indexOf("outputParagraph")},_getOutputDivs:function(a){return this._inlineView.getOutputsForNode(a)},_getOutputBox:function(a){var c=e.create("div",{"class":"outputParagraph"}),b;for(b=0;b<a.length;b+=1)e.place(a[b],c,"last");return c},_updateOutputs:function(a,c,b){f.add(a,"outputs");b?a.replaceChild(a.lastChild,
c):e.place(c,a,"last");return a}})})},"MW/rtc/plugins/view/layoutmanager/layouters/LineLayouter":function(){define(["dojo/_base/declare","MW/rtc/model/Range","MW/rtc/nodes/inner/LineNode","MW/rtc/plugins/view/layoutmanager/abstract/AbstractLayouter"],function(g,f,e,d){return g(d,{constructor:function(b,a){this._layerViewModel=b;this._hiddenNodeModel=a},getApplicableNodeClass:function(){return e},layout:function(b,a){return this._hiddenNodeModel.isHidden(a)?(b.removeAndDisconnectNode(a),null):b.layoutInto(a,
"div",{"class":this._getCSSStyle(b,a)})},refresh:function(b,a,c){c.className=this._getCSSStyle(b,a);return null},_getCSSStyle:function(b,a){var c="lineNode mwRichTextComponentLine",d=new f(a.startPosition(),a.endPosition()),d=this._layerViewModel.getLayerDecoratorsLineNodeCSSForRange(d);0<d.length&&(c+=" "+d);b.fixedSize&&(c+=" plainTextFixedSize");a.readOnly&&(c+=" readonly");a.cssClass&&(c+=" "+a.cssClass);return c}})})},"MW/rtc/plugins/embeddedoutputs/view/onright/OnrightViewProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./OnrightView"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.view rtc.cursor rtc.cursor.view rtc.focusservice rtc.actionservice rtc.contextmenu.generator rtc.embeddedoutputs.statehandler rtc.internaldocument rtc.cursorcontroller rtc.embeddedoutputs.splitterpositionmodel rtc.bordercontainer".split(" ")}},createInstance:function(d,b,a,c,h,f,g,m,p,n,q){return new e(d,b,a,c,h,f,g,m,p,n,q)}})})},"MW/rtc/plugins/embeddedoutputs/view/onright/OnrightView":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-construct dojo/dom-class dojo/i18n!l10n/nls/actions dojo/mouse MW/rtc/plugins/embeddedoutputs/EmbeddedOutputsContextMenuModel MW/rtc/plugins/embeddedoutputs/view/AbstractView MW/rtc/plugins/embeddedoutputs/view/EmbeddedOutputsViewStateEnum MW/rtc/plugins/embeddedoutputs/view/RightPanel ./AlignmentDisabler ./AlignmentManager ./CurrentElementManager ./SplitterPositionController".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r){return g(k,{_VIEW_STATE_NAME:l.ON_RIGHT_VIEW_STATE,ACTION_ID:"rtc_on_right_view",ACTION_ID_NO_ANIMATION:"_rtc_on_right_view_no_animation",_MIN_THRESHOLD:5,_MAX_THRESHOLD:95,BUTTON_CSS_CLASS:"onright",DATATEST_ID:"outputsOnRightButton",TOOLTIP_MESSAGE:'\x3cdiv data-testid\x3d"onRightTooltip"\x3e'+a.showOnRight+"\x3c/div\x3e",constructor:function(a,c,b,d,h,k,g,l,m,p,n){this._rtcView=a;this._cursor=c;this._cursorView=b;this._focusService=d;this._actionService=
h;this._contextMenuGenerator=k;this._stateHandler=g;this._internalDocument=l;this._cursorController=m;this._splitterPositionModel=p;this._parentBorderContainer=n;this._rightClickedOutput=null;this.own(e.after(k,"onOpen",f.hitch(this,"_handleContextMenuOpen"),!0));this.own(e.after(k,"onClose",f.hitch(this,"_handleContextMenuClose")))},setup:function(a,c,b){this._viewModel=a;this._scrollableOutputStyler=c;this._splitterPositionController=new r(this._splitterPositionModel,this._parentBorderContainer,
b);this._rightPanel=new m(this._parentBorderContainer,this._splitterPositionController,this._splitterPositionModel);this._outputScrollPane=this._rightPanel.getScrollPane();this._outputScrollPane.addEventListener("click",f.hitch(this,"_setFocus"));this._outputScrollPane.addEventListener("mouseup",f.hitch(this,"_handleMouseUp"));this._currentElementManager=new q(this._rtcView,this._viewModel,this._cursor,this._cursorView,this._actionService);this.own(this._currentElementManager);this._alignmentManager=
new n(this._rtcView,this._viewModel,this._cursor,this._cursorView,this._rightPanel,this._actionService,this._internalDocument);this.own(this._alignmentManager);this._alignmentDisabler=new p(this._stateHandler,this._alignmentManager);this.own(this._alignmentDisabler);this.own(e.after(this._alignmentManager,"onAlign",f.hitch(this,"onAlign")));this._embeddedOutputsContextModel=new h(this._actionService);this._contextMenuGenerator.createContextMenu(this._outputScrollPane,this._embeddedOutputsContextModel)},
_setFocus:function(){this._focusService.setFocus()},outputStyleChanged:function(a,c,b){c&&this.align(a)},registerCurrentOutputService:function(a){this._currentElementManager.registerCurrentOutputService(a)},onAlign:function(){this._scrollableOutputStyler.layout()},enable:function(a){this._currentElementManager.enable();a=this._rightPanel.show(a);this._alignmentManager.enable();return a},disable:function(a){this._currentElementManager.disable();this._alignmentManager.disable();return this._rightPanel.hide(a)},
getName:function(){return this._VIEW_STATE_NAME},createOutputDivsFromOutputs:function(a){var c=d.create("div",{className:"rightPaneElement eoOutputWrapper"});a=f.hitch(this,"_handleClick",a[a.length-1]);c.addEventListener("click",a);return c},_handleClick:function(a,b){!c.isRight(b)&&!(b.target&&"A"===b.target.tagName)&&(this._cursor.hasSelection()&&this._cursor.releaseAnchor(),this._alignmentManager.isEnabled()?(this._alignmentManager.disable(),this._cursorController.clearSelection(),this._cursor.setPosition(a.getNode(),
0,!1),this.onOutputClicked(b.target),this._scrollPositionToOutput(a,b.currentTarget)||this._alignmentManager.enable()):(this._cursor.setPosition(a.getNode(),0,!1),this.onOutputClicked(b.target)))},_handleMouseUp:function(a){c.isMiddle(a)&&this._focusService.setFocus()},_scrollPositionToOutput:function(a,c){if(this._rtcView.isNodeInView(a.getNode()))return!1;this._clickAspect&&(this._clickAspect.remove(),this._clickAspect=null);this._clickAspect=e.after(this._rtcView,"onScroll",f.hitch(this,function(){this._alignmentManager.enable();
this._clickAspect.remove();this._clickAspect=null}));var b=Math.max(Math.min(this._getOutputsPercent(c),this._MAX_THRESHOLD),this._MIN_THRESHOLD);this._rtcView.scrollNodeToPercent(a.getNode(),b);return!0},_getOutputsPercent:function(a){var c=this._rightPanel.getScrollPane().getBoundingClientRect();return 100*(a.getBoundingClientRect().top/c.height)},_handleContextMenuOpen:function(a){if(a=this._viewModel.getOutputWrapperFromElement(a))this._rightClickedOutput=a,b.add(a,"rightClicked")},_handleContextMenuClose:function(){this._rightClickedOutput&&
(b.remove(this._rightClickedOutput,"rightClicked"),this._rightClickedOutput=null)},layout:function(a,c,b,e){if(!b){var h=d.create("span",{className:"outputContentPane"});a.getOutputDivs().forEach(function(a,c){a.setAttribute("data-testid","output_"+c);d.place(a,h,"last")},this);this._rightPanel.replaceContent(h);a.startupOutputs();this._alignmentManager.layout();this.redrawRTCView(e)}},align:function(a){a?this._alignmentManager.checkExtraWhiteSpace():this._alignmentManager.layout()},destroy:function(){this._splitterPositionController.destroy();
this._rightPanel.destroy();this._embeddedOutputsContextModel=this._outputScrollPane=null},destroyView:function(){this.destroy()}})})},"MW/rtc/plugins/embeddedoutputs/EmbeddedOutputsContextMenuModel":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/plugins/contextmenu/ContextMenuModel"],function(g,f,e,d){return g(d,{constructor:function(b){this._groupActionsMap={CopyOutput:["rtc_copy_output","rtc_copy_all_output"],ClearOutput:["rtc_clear_all_output"],Align:["rtc_alignment_toggle"],
ModeInteraction:"figure_zoom_in figure_zoom_out figure_reset_mode figure_rotate_xy figure_rotate_xz figure_rotate_yz figure_reset_rotatemode".split(" ")};this._groupList=["ModeInteraction","CopyOutput","ClearOutput","Align"];this._actionService=b},getGroups:function(){return this._groupList},getActions:function(b){b=this._groupActionsMap[b];if(!b)return[];var a=[];b.forEach(function(c){(c=this._getActionInfo(c))&&a.push(c)},this);return a},_getActionInfo:function(b){var a=this._actionService.getAction(b),
c=null;if(a){var d=a.text||a.description;if(void 0===d)return c;c={id:b,label:d,shortcut:a.shortcut,callback:f.hitch(this._actionService,"executeAction",b,{}),enabled:a.enabled}}return c}})})},"MW/rtc/plugins/embeddedoutputs/view/RightPanel":function(){define("dojo/_base/declare dojo/_base/fx dojo/dom-construct dojo/dom-style dojo/on dijit/layout/ContentPane mw-log/Log ./SplitterMixin".split(" "),function(g,f,e,d,b,a,c,h){return g(null,{_PLACEMENT_CONFIG:{hasSplitter:!0,isResizable:!0,isProportional:!0,
isCollapsible:!1,region:"right",minSize:10,proportion:null},constructor:function(c,b,d){this._aspectHandles=[];this._hidden=!1;this._outputScrollPane=e.create("div",{className:"outputScrollPane mwDoNotApplyCustomScrollbarCSS"});this._setDataTestId(this._outputScrollPane,"rtc_outputScrollPane");this._parentBorderContainer=c;this._splitterPositionModel=d;this._splitterPositionController=b;this._contentPanel=new a({className:"outputsOnRight",content:this._outputScrollPane});this._initializeAndSetupBorderContainer()},
_initializeAndSetupBorderContainer:function(){h.setup(this._parentBorderContainer);c.assert(this._parentBorderContainer,"BorderContainer should have been constructed");c.assert(!this._parentBorderContainer.getChildInRegion(this._PLACEMENT_CONFIG.region),"There should have been no child placed here");this._parentBorderContainer.getChildInRegion(this._PLACEMENT_CONFIG.region)||(this._parentBorderContainer.installConnections(),this._parentBorderContainer.hoverOverSplitter(this._PLACEMENT_CONFIG.region),
this._splitterPositionController.addContentPanel(this._PLACEMENT_CONFIG,this._contentPanel))},getScrollPane:function(){return this._outputScrollPane},getContentPane:function(){return this._contentPanel.domNode},canScroll:function(){return this._outputScrollPane.scrollHeight>this._outputScrollPane.clientHeight},replaceContent:function(a){e.place(a,this._outputScrollPane,"only");this.contentChanged()},contentChanged:function(){},onShow:function(){},onHide:function(){},show:function(a){var c=this._splitterPositionModel.getRightPanelProportion();
if(a)return d.set(this.getContentPane(),"opacity","0"),c=this._parentBorderContainer.getDerivedRightProportion(),this._parentBorderContainer.addWithProperties(this._contentPanel,this._PLACEMENT_CONFIG),this._parentBorderContainer.setProportion("right",c),this.onShow(),f.fadeIn({node:this.getContentPane()}).play();d.set(this.getContentPane(),"opacity","1");c=this._parentBorderContainer.getDerivedRightProportion();this._parentBorderContainer.addWithProperties(this._contentPanel,this._PLACEMENT_CONFIG);
this._parentBorderContainer.setProportion("right",c);this.onShow();return[]},hide:function(a){if(a){var c=this;this._fadeAnim=f.fadeOut({node:this.getContentPane()}).play();b(this._fadeAnim,"End",function(){e.empty(c._outputScrollPane)});this._parentBorderContainer.removeChild(this._contentPanel);this.onHide();return this._fadeAnim}d.set(this.getContentPane(),"opacity","0");e.empty(this._outputScrollPane);this._parentBorderContainer.removeChild(this._contentPanel);this.onHide();return[]},destroy:function(){c.assert(this._parentBorderContainer,
"BorderContainer should have been constructed");this._parentBorderContainer.uninstallConnections();this._contentPanel&&this._contentPanel.content.parentElement&&this._parentBorderContainer.removeChild(this._contentPanel);e.destroy(this._outputScrollPane);this._contentPanel=null;this._aspectHandles.forEach(function(a){a.remove()})},_setDataTestId:function(a,c){a.setAttribute("data-testid",c)}})})},"MW/rtc/plugins/embeddedoutputs/view/SplitterMixin":function(){define(["dojo/_base/lang","dojo/aspect",
"dojo/dom-class","dojo/dom-style","dojo/mouse"],function(g,f,e,d,b){return{_MIN_RIGHT_WIDTH:50,installConnections:function(){this._aspectHandles.push(f.after(this,"_setupChild",g.hitch(this,this._setupSplitterLayout)));this._aspectHandles.push(f.before(this,"_beginSplitterDrag",g.hitch(this,this._makeSplitterVisible)));this._aspectHandles.push(f.before(this,"_endSplitterDrag",g.hitch(this,this._updateAfterSplitterDrag)));this._aspectHandles.push(f.after(this,"setFreeDimension",g.hitch(this,this.setDims)));
this._aspectHandles.push(f.after(this,"addChild",g.hitch(this,this._updateAfterChildAdded),!0))},_updateAfterChildAdded:function(a){a=a.region;this._initializedRegions[a]||(this._updateMaxWidthAndCache(),this._initializedRegions[a]=!0)},uninstallConnections:function(){this._aspectHandles.forEach(function(a){a.remove()})},setup:function(a){this._aspectHandles=[];this._maxCenterWidth=null;this._initializedRegions={};g.mixin(a,this);e.add(a.domNode,"borderContainerWithSplitter")},hoverOverSplitter:function(a){this._splitterToMakeInvisible=
a},_setupSplitterLayout:function(){this.splitter=this._borderInfo[this._splitterToMakeInvisible]},_makeSplitterVisible:function(a,c){(b.isLeft(c)||b.isRight(c))&&e.add(this.splitter.splitterNode,"visibleSplitter")},_updateAfterSplitterDrag:function(){this._makeSplitterInvisible();this._updateMaxWidthAndCache()},_makeSplitterInvisible:function(){e.remove(this.splitter.splitterNode,"visibleSplitter")},cache:function(){var a=this.getChildInRegion("center"),c=this.getChildInRegion("right");a&&(this._centerWidth=
d.get(a.domNode,"width"));c&&(this._rightWidth=d.get(c.domNode,"width"))},setDims:function(){if(!this._centerWidth||!this._rightWidth)return this.cache(),null;var a=this.getChildInRegion("center"),c=this.getChildInRegion("right");if(!a||!c)return null;a=d.get(a.domNode,"width");c=d.get(c.domNode,"width");c=a+c;a=this._centerWidth+this._rightWidth-c;if(0===a)return null;if(0<a)a=Math.max(this._MIN_RIGHT_WIDTH,this._rightWidth-a);else{if(!this._maxCenterWidth)return;a=Math.min(this._maxCenterWidth,
this._centerWidth+-1*a);a=c-a}var b=d.get(this.domNode,"width");this.setProportion("right",a/b);this.cache();return{center:c-a,right:a}},_updateMaxWidthAndCache:function(){var a=this.getChildInRegion("center"),c=this.getChildInRegion("right");a&&c&&(a=d.get(a.domNode,"width"),c=d.get(c.domNode,"width"),a&&c&&(this._maxCenterWidth=a,this.cache()))},getDerivedRightProportion:function(){var a=this.getChildInRegion("left"),c=a?d.get(a.domNode,"width"):0,a=d.get(this.domNode,"width"),c=a-(c+this._centerWidth);
c<this._MIN_RIGHT_WIDTH&&(c=this._MIN_RIGHT_WIDTH);return c/a}}})},"MW/rtc/plugins/embeddedoutputs/view/onright/AlignmentDisabler":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/plugins/debug/DebugServicesFactory"],function(g,f,e,d){return g(null,{constructor:function(b,a){this._stateHandler=b;this._alignmentManager=a;this._debugServices=d.getInstance();this._aspectHandles=[];this._aspectHandles.push(e.after(this._stateHandler,"stateChanged",f.hitch(this,"_handleStateChange"),
!0));this._aspectHandles.push(e.after(this._debugServices,"onDBStop",f.hitch(this,"_handleDBStop"),!0));this._aspectHandles.push(e.after(this._debugServices,"onDBCont",f.hitch(this,"_handleDBCont"),!0));this._isBeingDisabled=!1},destroy:function(){this._aspectHandles.forEach(function(b){b.remove()});this._aspectHandles=[]},_handleDBStop:function(){this._isBeingDisabled&&this._enableAlignment()},_handleDBCont:function(){this._isBeingDisabled&&this._disableAlignment()},_handleStateChange:function(b){b===
this._stateHandler.CHANGE_TYPE_ENUM.EVAL_INITIALIZED?this._handleEvaluationStarted():b===this._stateHandler.CHANGE_TYPE_ENUM.EVAL_COMPLETE&&this._handleEvaluationCompleted()},_handleEvaluationStarted:function(){this._isBeingDisabled=!0;this._disableAlignment()},_disableAlignment:function(){this._alignmentManager.setEnablement({alignOnScroll:!1,autoScroll:!1})},_handleEvaluationCompleted:function(){this._isBeingDisabled=!1;this._enableAlignment()},_enableAlignment:function(){this._isBeingDisabled=
!0;this._alignmentManager.setEnablement({alignOnScroll:!0,autoScroll:!0});this._alignmentManager.isEnabled()&&this._alignmentManager.layout()}})})},"MW/rtc/plugins/embeddedoutputs/view/onright/AlignmentManager":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-construct dojo/dom-style dojo/i18n!l10n/nls/actions dojo/on dojo/touch MW/rtc/events/MouseEventUtil MW/rtc/view/ViewEventUtilities mw-utils/Utils ./AlignmentUtils".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p){return g(null,
{_TOP_BOUND:0,_BOTTOM_BOUND:100,_ACTION_ID:"rtc_alignment_toggle",constructor:function(b,d,g,l,m,p,v){this._rtcView=b;this._viewModel=d;this._cursor=g;this._cursorView=l;this._outputScrollPane=m.getScrollPane();this._aspectHandles=[];this._actionService=p;this._internalDocument=v;this._userEnabledState=this._allowed=!0;this._enablement={alignOnLayout:!0,alignOnViewChange:!0,alignOnScroll:!0,autoScroll:!0};this._bottomPad=this._topPad=null;this._initializePadding();this._lastAlignedPercentage=0;this._alignStack=
[];this._scrollPercent=0;this._updateScrollData();this._resetEquation();this._overScrollListener=c(this._rtcView.getDomtarget(),k.MOUSEWHEEL,f.hitch(this,"_scroll"),!0);this._lastCursorLine=-1;this._aspectHandles.push(e.after(this._cursorView,"onChange",f.hitch(this,"_updateOnLineChange")));this._aspectHandles.push(c(this._rtcView.getDomtarget(),h.release,f.hitch(this,"_updateOnMouseUp")));this._aspectHandles.push(e.after(this._rtcView,"onViewUpdated",f.hitch(this,"_updateOnViewChange"),!0));b=[{id:this._ACTION_ID,
enabled:!0,text:a.disableAlignment,callback:f.hitch(this,"_toggle")}];this._actionService.loadActions(b)},_updateScrollData:function(){var a=this._rtcView.getDomTargetPosition();this._scrollPercent=100*a.scrollTop/(a.scrollHeight-a.clientHeight)||0},_toggle:function(){this._userEnabledState=!this._userEnabledState;this._updateEnabledState()},_updateEnabledState:function(){var c;this._userEnabledState?(c=a.disableAlignment,this.layout()):(c=a.enableAlignment,p.removeAllAlignment(this._viewModel.getOutputDivs(),
this._getAlignmentData()));this._actionService.updateAction(this._ACTION_ID,{text:c})},destroy:function(){this._aspectHandles.forEach(function(a){a.remove()});this._aspectHandles=[];this._actionService.removeAction(this._ACTION_ID);this._overScrollListener.remove();this._equation=this._overScrollListener=null;this._alignStack=[]},disable:function(){this._allowed=!1},enable:function(){this._allowed=!0},isEnabled:function(){return this._allowed&&this._userEnabledState},setEnablement:function(a){f.mixin(this._enablement,
a)},_scroll:function(a){if(!this._dontAlign()&&this._enablement.alignOnScroll&&k.isVerticalScroll(a)&&!k.isBrowserZoomScrollEvent(a)){var c=k.getVerticalScrollDistance(a),b=0!==this._alignStack.length,d=this._rtcView.getDomTargetPosition(),e=100===this._scrollPercent||d.clientHeight===d.scrollHeight,d=e&&0>c,h=0===this._scrollPercent&&0<c,f=0===this._scrollPercent&&0>c||e&&0<c,g=d||h;if(b||g)e=!0,b&&f&&!g?e=c=this._reverseOverscroll():c=this._overscroll(c,d,h),e&&(this._stopScrollEvent(a),this._scrollHorizontal(a)),
c&&(this._lastAlignedPercentage=this._alignStack[this._alignStack.length-1],this.updateAlignment(this._rtcView.getPositionAtPercent(this._lastAlignedPercentage)))}},_reverseOverscroll:function(){this._alignStack.pop();return 0!==this._alignStack.length},_overscroll:function(a,c,b){var d=this._rtcView.getDomTargetPosition();a=Math.min(Math.max(this._lastAlignedPercentage+-100*a/(d.scrollHeight-d.clientHeight),0),100);var e;if(c){e=this._getNextUnalignedBelow(this._lastAlignedPercentage);if(!e)return!1;
e=Math.max(a,e)}if(b){e=this._getNextUnalignedAbove(this._lastAlignedPercentage);if(!e)return!1;e=Math.min(a,e)}if(this._alignStack[this._alignStack.length-1]===e)return!1;0===this._alignStack.length&&this._alignStack.push(this._lastAlignedPercentage);this._alignStack.push(e);return!0},_stopScrollEvent:function(a){a.stopPropagation();a.preventDefault()},_scrollHorizontal:function(a){a=k.getHorizontalScrollDistance(a);0!==a&&this._rtcView.setScrollLeft(this._rtcView.getDomTargetPosition().scrollLeft-
a)},_getNextUnalignedAbove:function(a){for(a=this._rtcView.getPositionAtPercent(a).getNode().rootContainer().previousSibling();a;){if(!this._nodeIsAligned(a))return this._rtcView.getNodePercentScrolled(a,!0);a=a.previousSibling()}},_getNextUnalignedBelow:function(a){for(a=this._rtcView.getPositionAtPercent(a).getNode().rootContainer().nextSibling();a;){if(!this._nodeIsAligned(a))return this._rtcView.getNodePercentScrolled(a,!0);a=a.nextSibling()}},_nodeIsAligned:function(a){var c=this._viewModel.getOutputDivsForNode(a);
if(0===c.length)return!0;var b=this._getAlignmentData().rtcDomTargetData.scrollTop;a={top:a.getTop()-b,bottom:a.getBottom()-b};return p.areOutputsAligned(a,c,this._outputScrollPane,!0)},_resetEquation:function(){this._equation=p.generateLinearStepwiseFunction(this._scrollPercent,this._lastAlignedPercentage,this._rtcView.getDomTargetPosition());this._alignStack=[]},layout:function(){this._restorePadding();if(!this._dontAlign()&&this._enablement.alignOnLayout){var a=this._outputScrollPane.scrollTop;
this.updateAlignment(this._rtcView.getPositionAtPercent(this._lastAlignedPercentage));this._enablement.autoScroll||(this._outputScrollPane.scrollTop=a)}},_updateOnLineChange:function(){var a=this._cursor.getLineColumn().line;this._lastCursorLine!==a&&(this._lastCursorLine=a,!this._dontAlign()&&this._viewModel.doesNodeHaveOutputs(this._cursor.getNode().rootContainer())&&(this._updateScrollData(),this._lastAlignedPercentage=this._rtcView.getLinePercentScrolled(this._lastCursorLine,!0),this._resetEquation(),
this.updateAlignment(this._cursor)))},_updateOnMouseUp:function(){this._dontAlign()||(this._lastCursorLine=this._cursor.getLineColumn().line,this._updateScrollData(),this._lastAlignedPercentage=this._rtcView.getLinePercentScrolled(this._lastCursorLine,!0),this._resetEquation(),this.updateAlignment(this._cursor))},_updateOnViewChange:function(a){this._updateScrollData();if(!this._dontAlign()&&this._enablement.alignOnViewChange&&(!l.hasSizingEvent(a)||l.isOnlyScrollHeightChange(a)))if(!l.isOnlyHorizontalEvents(a)&&
(l.hasVerticalScrollEvent(a)||l.hasHeightEvent(a)||l.hasLayoutEvent(a))){var c=null;l.hasVerticalScrollEvent(a)?(this._lastAlignedPercentage=this._equation(this._scrollPercent),c=this._rtcView.getPositionAtPercent(this._lastAlignedPercentage)):(this._cursor.isInVisualBounds(this._TOP_BOUND,this._BOTTOM_BOUND)?(c=this._cursor,a=this._rtcView.getLinePercentScrolled(this._cursor.getLineColumn().line,!0)):(c=this._rtcView.getPositionAtPercent(this._lastAlignedPercentage),a=this._lastAlignedPercentage),
this._lastAlignedPercentage=a,this._resetEquation());a=this._outputScrollPane.scrollTop;this.updateAlignment(c);this._enablement.autoScroll||(this._outputScrollPane.scrollTop=a)}},_dontAlign:function(){return!this.isEnabled()||!this._viewModel.hasOutputs()},_initializePadding:function(){this._topPad=d.create("div",{className:"outputTopPad"});this._bottomPad=d.create("div",{className:"outputBottomPad"})},_restorePadding:function(){this._outputScrollPane.children[0]&&(d.place(this._topPad,this._outputScrollPane.children[0],
"first"),d.place(this._bottomPad,this._outputScrollPane.children[0],"last"))},updateAlignment:function(a){a=a.getLineColumn().line-1;var c=this._getNodeWithOutputToAlign(a);if(c){a=this._internalDocument.getLineNumber(c);var b=p.getOutputs(c,a,this._viewModel,this._outputScrollPane);b.outputsAbove=b.outputsAbove.reverse();p.clearMargins(b.comingledOutputs);p.clearInnerMargins(b.currentOutputs);var d=this._getAlignmentData(),e=d.rtcDomTargetData.scrollTop,c={top:c.getTop()-e,bottom:c.getBottom()-e};
p.alignCurrentTarget(c,b,!1,d);this._updateAlignment(a,b);this.checkExtraWhiteSpace();this.onAlign()}},_getNodeWithOutputToAlign:function(a){var c=this._getOnscreenNodeWithOutput(a);c||(c=this._viewModel.getClosestNodeWithOutputToLineNumber(a));return c},_getOnscreenNodeWithOutput:function(a){var c=this._rtcView.getFirstVisibleLineNumber()-1,b=this._rtcView.getLastVisibleLineNumber()-1;return this._viewModel.getClosestNodeWithOutputToLineNumber(a,c,b)},checkExtraWhiteSpace:function(){var a,c=this._outputScrollPane.scrollTop;
a=c+this._outputScrollPane.clientHeight;var b=this._bottomPad.clientHeight,d=this._bottomPad.offsetTop+b;d>a&&(a=Math.max(0,b-(d-a)),this._setBottomPadHeight(a));b=this._topPad.clientHeight;a=this._topPad.offsetTop;a<c&&(a=Math.max(0,b-(c-a)),b-=a,this._setTopPadHeight(a),this._outputScrollPane.scrollTop=c-b)},_setTopPadHeight:function(a){b.set(this._topPad,"height",a+"px")},_setBottomPadHeight:function(a){b.set(this._bottomPad,"height",a+"px")},onAlign:function(){},_updateAlignment:function(a,c){var b=
this._outputScrollPane.scrollTop,d=this._getAlignmentsAboveAndBelowCurrent(a),e=d.alignmentsAbove,d=d.alignmentsBelow,h=c.currentOutputs.concat(c.comingledOutputs,c.dontAlign),h=p.alignTargetsBelow(d,c.outputsBelow,h,this._getAlignmentData());p.alignTargetsAbove(e,c.outputsAbove,h,this._getAlignmentData());this._outputScrollPane.scrollTop=b},_getAlignmentsAboveAndBelowCurrent:function(a){var c=this._getAlignmentData().rtcDomTargetData.scrollTop,b=[],d=[];this._internalDocument.root.children.forEach(function(e,
h){var f=this._viewModel.getOutputDivsForNode(e),k={target:{top:e.getTop()-c,bottom:e.getBottom()-c},associatedOutputs:f};0!==f.length&&(h<a?b.push(k):h>a&&d.push(k))},this);return{alignmentsAbove:b,alignmentsBelow:d}},_getAlignmentData:function(){return{topPad:this._topPad,bottomPad:this._bottomPad,outputScrollPane:this._outputScrollPane,rtcDomTargetData:this._rtcView.getDomTargetPosition()}}})})},"MW/rtc/plugins/embeddedoutputs/view/onright/AlignmentUtils":function(){define("dojo/dom-class dojo/dom-style dojo/fx/easing MW/rtc/plugins/embeddedoutputs/view/ViewModelUtilities mw-log/Log mw-utils/Utils".split(" "),
function(g,f,e,d,b,a){return{getOutputs:function(c,b,d,e){var f=d.getOutputDivsForNode(c),g=this._getViewableOutputs(e),n=f.map(function(a){return g.indexOf(a)}).sort(function(a,c){return a-c});e=g.slice(n[0],n[n.length-1]+1);c=e.filter(function(a){return 0>f.indexOf(a)});e=e.filter(function(a){return 0<=f.indexOf(a)});var q=g.slice(0,n[0]),n=g.slice(n[n.length-1]+1),q=this._removeOutputsBelongingToLineNumber(q,b,d,this._isOnlyAbove),n=this._removeOutputsBelongingToLineNumber(n,b,d,this._isOnlyBelow);
b=e.concat(c,q,n);b=a.differenceOfArrays(g,b);return{outputsAbove:q,outputsBelow:n,comingledOutputs:c,currentOutputs:e,dontAlign:b}},_removeOutputsBelongingToLineNumber:function(a,b,d,e){return a.filter(function(a){a=d.getLineNumbersForOutput(a);return e(a,b)},this)},_isOnlyAbove:function(a,b){a=a.sort(function(a,c){return a-c});return a[a.length-1]<b},_isOnlyBelow:function(a,b){a=a.sort(function(a,c){return a-c});return a[0]>b},_getViewableOutputs:function(a){a=a.children[0].children;a=[].slice.call(a);
var b=g.contains(a[0],"outputTopPad"),d=g.contains(a[a.length-1],"outputBottomPad");b&&(a=a.slice(1));d&&(a=a.slice(0,a.length-1));return a},clearMargins:function(a){a.forEach(function(a){a.style.removeProperty("margin-top");a.style.removeProperty("margin-bottom")})},clearInnerMargins:function(a){if(!(2>a.length)){a[0].style.removeProperty("margin-bottom");a[a.length-1].style.removeProperty("margin-top");for(var b=1;b<a.length-1;b+=1)a[b].style.removeProperty("margin-bottom"),a[b].style.removeProperty("margin-top")}},
generateLinearStepwiseFunction:function(a,b,d){d=100/(100*(d.clientHeight/d.scrollHeight)||0);var e=Math.min(b/a||0,d),f=b-e*a,g=Math.min((100-b)/(100-a)||0,d),n=b-g*a;return function(d){var k,s;if(d<a)k=e,s=f;else if(d>a)k=g,s=n;else return b;return Math.max(Math.min(k*d+s,100),0)}},areOutputsAligned:function(a,b,d,e){a=this._areOutputsAlignedToCode(a,b,d);b=e?this._areOutputsOnScreen(b,d):!0;return a&&b},removeAllAlignment:function(a,b){var d=b.bottomPad;b.topPad.style.height="0px";d.style.height=
"0px";a.forEach(function(a){a.style.removeProperty("margin-top");a.style.removeProperty("margin-bottom")})},alignCurrentTarget:function(a,b,d,e){var g=e.outputScrollPane,p=e.rtcDomTargetData,n=e.topPad;e=e.bottomPad;var q=b.currentOutputs,r=b.outputsAbove;b=b.outputsBelow;this._moveMarginUp(q,r,n);this._moveMarginDown(q,b,e);if(this._needToAlign(a,q,g)){var s=g.scrollTop,t=a.bottom-a.top,u=this._getTopAndBottomOfDivList(q);if(u){var v=u.top,w=u.bottom,x=w-v;if(b.length)var y=b[b.length-1];w=Math.max(0,
g.offsetHeight-(u.bottom-s)-((y?y.offsetTop+y.offsetHeight:w)-w));e.style.height=w+"px";u=this._getTopAndBottomOfDivList(q);v=u.top;w=u.bottom;if(w-v>=g.offsetHeight)t=s-v,0!==t&&(0<t?t=this._moveOutputDown(t,q,r,b,g,n,e,!0,!1):0>t&&(t=Math.abs(t),t=this._moveOutputUp(t,q,r,b,g,n,e,!0,!1)),0<t&&this._setScrollTop(v,g,d));else{if(v<s&&(this._moveOutputDown(s-v,q,r,b,g,n,e,!0,!1),this._areOutputsAlignedToCode(a,q,g)))return;s+=g.offsetHeight;p=a.top>p.clientHeight;if(w>s){if(p)return;this._moveOutputUp(w-
s,q,r,b,g,n,e,!0,!1);if(this._areOutputsAlignedToCode(a,q,g))return}u=this._getTopAndBottomOfDivList(q);v=u.top;w=u.bottom;x=w-v;s=g.scrollTop;p=a.top;v-=s;y=a.bottom;w-=s;p>v?(t=this._moveOutputDown(t>x?p-v:y-w,q,r,b,g,n,e,!1,!1),this._areOutputsAlignedToCode(a,q,g)||(a=s-t,a=0<a?a:0,this._setScrollTop(a,g,d),q=t-(s-a),0<q&&(r=f.get(n,"height"),n.style.height=q+r+"px"))):(t=Math.abs(t<x?p-v:y-w),t=this._moveOutputUp(t,q,r,b,g,n,e,!1,!1),this._areOutputsAlignedToCode(a,q,g)||(a=s+t,a!==s&&this._setScrollTop(a,
g,d),s=g.scrollTop,q=a-s,0<q&&(r=f.get(e,"height"),e.style.height=q+r+"px",this._setScrollTop(a,g,d))))}}}},alignTargetsBelow:function(a,b,d,e){for(var f,g,n=e.outputScrollPane,q=e.bottomPad,r=0;r<a.length;r++)if(f=a[r].target,e=a[r].associatedOutputs,g=e.length,b=b.slice(g,b.length),0===g){if(0===b.length)break}else d=this._alignTargetBelow(f,e,b,d,q,n);return d},alignTargetsAbove:function(a,b,d,e){for(var f,g,n=e.outputScrollPane,q=e.topPad,r=a.length-1;0<=r;r--)if(f=a[r].target,e=a[r].associatedOutputs,
g=e.length,b=b.slice(g,b.length),0===g){if(0===b.length)break}else d=this._alignTargetAbove(f,e,b,d,q,n)},_alignTargetBelow:function(c,b,e,g,m,p){this._moveMarginDown(b,e,m);if(b.some(function(a){return 0<=g.indexOf(a)})||this._areOutputsAlignedToCode(c,b,p))return g=g.concat(b);var n=d.getHeightOfNodes(b),q=c.top;c=c.bottom;var r=c-q;p=b[0].offsetTop-p.scrollTop;var s=p+n,t=s-p,n=f.get(b[0],"margin-top"),u;q>p?(u=0,u=r>t?q-p:c-s,b[0].style["margin-top"]=n+u+"px",g=g.concat(b),this._removeMarginFromBelow(u,
e,b,m)):(u=0,c=Math.max(0,n-(r>t?s-c:p-q)),q=n-c,b[0].style["margin-top"]=c+"px",(e=a.getFirstUniqueElement(b,e))?(m=f.get(e,"margin-top"),this._setMargin(e,"margin-top",m+q)):(e=f.get(m,"height"),m.style.height=e+q+"px"),g=g.concat(b));return g},_alignTargetAbove:function(c,b,e,g,m,p){this._moveMarginUp(b,e,m);if(b.some(function(a){return 0<=g.indexOf(a)})||this._areOutputsAlignedToCode(c,b,p))return g=g.concat(b);var n=d.getHeightOfNodes(b),q=c.top;c=c.bottom;var r=c-q,s=b[0].offsetTop-p.scrollTop,
t=s+n;p=f.get(b[0],"margin-bottom");var u;q>s?(u=0,q=Math.max(0,p-(r>n?q-s:c-t)),n=p-q,b[0].style["margin-bottom"]=q+"px",(e=a.getFirstUniqueElement(b,e))?(m=f.get(e,"margin-bottom"),this._setMargin(e,"margin-bottom",m+n)):(e=f.get(m,"height"),m.style.height=e+n+"px"),g=g.concat(b)):(u=0,u=Math.min(r>n?t-c:s-q,this._getAvailableSpaceAbove(e,b,m)),b[0].style["margin-bottom"]=p+u+"px",g=g.concat(b),this._removeMarginFromAbove(u,e,b,m));return g},_moveMarginUp:function(c,b,d){var e=f.get(c[0],"margin-top");
0!==e&&(c[0].style.removeProperty("margin-top"),(c=a.getFirstUniqueElement(c,b))?(d=f.get(c,"margin-bottom"),this._setMargin(c,"margin-bottom",d+e)):(c=f.get(d,"height"),d.style.height=c+e+"px"))},_moveMarginDown:function(c,b,d){var e=f.get(c[c.length-1],"margin-bottom");0!==e&&(c[c.length-1].style.removeProperty("margin-bottom"),(c=a.getFirstUniqueElement(c,b))?(d=f.get(c,"margin-top"),this._setMargin(c,"margin-top",d+e)):(c=f.get(d,"height"),d.style.height=c+e+"px"))},_moveOutputUp:function(c,b,
d,e,g,p,n,q,r){q?this._setScrollTop(g.scrollTop+c,g,r):(e=a.getFirstUniqueElement(b,e))?(n=f.get(e,"margin-top"),this._setMargin(e,"margin-top",n+c)):(e=f.get(n,"height"),n.style.height=e+c+"px");return this._removeMarginFromAbove(c,d,b,p)},_moveOutputDown:function(c,b,d,e,g,p,n,q,r){if(q){p=this._getTopAndBottomOfDivList(b);if(!p)return;this._setScrollTop(p.top-5,g,r)}else(g=a.getFirstUniqueElement(b,d))?(p=f.get(g,"margin-bottom"),this._setMargin(g,"margin-bottom",p+c)):(g=f.get(p,"height"),p.style.height=
g+c+"px");return this._removeMarginFromBelow(c,e,b,n)},_removeMarginFromAbove:function(a,b,d,e){return this._removeMarginFrom(a,b,d,e,"margin-bottom","margin-top")},_removeMarginFromBelow:function(a,b,d,e){return this._removeMarginFrom(a,b,d,e,"margin-top","margin-bottom")},_removeMarginFrom:function(a,b,d,e,g,p){for(var n=[],q=0;q<b.length;q++){if(0>=a)return this._setMargins(n,g,p),0;var r=b[q];if(!(0<=d.indexOf(r))){var s=f.get(r,g),t=Math.max(s-a,0);a-=s-t;var u=f.get(r,p),s=Math.max(u-a,0);a-=
u-s;r={domNode:r};r[g]=t;r[p]=s;n.push(r)}}this._setMargins(n,g,p);if(0>=a)return 0;b=f.get(e,"height");d=Math.max(b-a,0);e.style.height=d+"px";return a-(b-d)},_setMargins:function(a,b,d){a.forEach(function(a){a.domNode.style[b]=a[b]+"px";a.domNode.style[d]=a[d]+"px"},this)},_setMargin:function(a,d,e){0>e&&(e=0,b.error("AlignmentUtils: Tried to assign a negative margin"));a.style[d]=e+"px"},_areOutputsAlignedToCode:function(a,b,d){b=this._getTopAndBottomOfDivList(b);if(!b)return!1;var e=d.scrollTop;
d=b.top-e;b=b.bottom-e;e=d>=a.top&&b<=a.bottom;return a.top>=d&&a.bottom<=b||e},_getTopAndBottomOfDivList:function(a){return!a||0===a.length?null:{top:a[0].offsetTop,bottom:a[a.length-1].offsetTop+a[a.length-1].offsetHeight}},_getAvailableSpaceAbove:function(a,b,d){var e=0;d&&(e+=f.get(d,"height"));a.forEach(function(a){-1===b.indexOf(a)&&(e+=f.get(a,"margin-top"),e+=f.get(a,"margin-bottom"))});return e},_needToAlign:function(a,b,d){return!(this._areOutputsAlignedToCode(a,b,d)&&this._areOutputsOnScreen(b,
d))},_areOutputsOnScreen:function(a,b){var d=b.scrollTop,e=this._getTopAndBottomOfDivList(a);if(!e)return!1;var f=e.bottom<=d+b.offsetHeight;return e.top>=d&&f},_setScrollTop:function(a,b,d){d?this._animateScrollTop(a,b):b.scrollTop=a},_animateScrollTop:function(a,b){(new dojo.Animation({curve:[b.scrollTop,a],onAnimate:function(a){b.scrollTop=a},duration:250,easing:e.quadInOut})).play()}}})},"MW/rtc/plugins/embeddedoutputs/view/ViewModelUtilities":function(){define(["dojo/dom-class","MW/rtc/plugins/embeddedoutputs/model/RegionUtilities",
"MW/rtc/plugins/embeddedoutputs/outputhandlers/error/ErrorOutputProperties","MW/rtc/plugins/embeddedoutputs/outputhandlers/warning/WarningOutputProperties"],function(g,f,e,d){return{filterErrorsAndWarnings:function(b){var a={clean:[],errors:[],warnings:[],errorsAndWarnings:[]};if(!b)return a;b.forEach(function(c){this.isErrorOutputDiv(c)?a.errors.push(c):this.isWarningOutputDiv(c)?a.warnings.push(c):a.clean.push(c)},this);a.errorsAndWarnings=a.errors.concat(a.warnings);return a},isErrorOutputDiv:function(b){return g.contains(b,
e.CSS_TAG)},isWarningOutputDiv:function(b){return g.contains(b,d.CSS_TAG)},getHeightOfNodes:function(b){if(0===b.length)return 0;var a=b[b.length-1];return a.offsetTop+a.offsetHeight-b[0].offsetTop},doNodeSetsIntersect:function(b,a){return 0<b.filter(function(c){return-1!=a.indexOf(c)}).length}}})},"MW/rtc/plugins/embeddedoutputs/view/onright/CurrentElementManager":function(){define("dojo/_base/declare dojo/_base/array dojo/_base/lang dojo/aspect dojo/dom-class dojo/query mw-utils/Utils MW/rtc/model/CodeUtilities".split(" "),
function(g,f,e,d,b,a,c,h){return g(null,{_LINE_CLASS:"selectedLine",_OUTPUT_CLASS:"selectedOutput",_FOCUSED_CLASS:"focusedOutput",_OUTPUT_START_CLASS:"selectionStart",_OUTPUT_END_CLASS:"selectionEnd",_OOR_OUTPUT_SELECTOR:".outputsOnRight .selectedOutput",_OOR_FOCUSED_OUTPUT_SELECTOR:".outputsOnRight .focusedOutput",_OOR_ALL_OUTPUTS_SELECTOR:".outputsOnRight .rightPaneElement",_RTC_LINE_SELECTOR:".rtePane .selectedLine",_HIGHLIGHT_ON_HOVER_CLASS:"highlightOnHover",_ACTION_ID:"rtc_current_element_manager_hover_highlighting_toggle",
constructor:function(a,c,b,d,e){this._rtcView=a;this._viewModel=c;this._cursor=b;this._cursorView=d;this._actionService=e;this._currentOutputService=null;this._highlightCodeEnabled=this._highlightOnHoverEnabled=!1;this._currentCursorLineNode=null;this._currentOutputs=[];this._focusedOutput=null;this._isEnabled=!1;this._aspectHandles=[];this._currentOutputServiceHandle=null;this.enable()},registerCurrentOutputService:function(a){this._currentOutputService||(this._currentOutputService=a,this._currentOutputServiceHandle=
d.after(this._currentOutputService,"onOutputSelected",e.hitch(this,"_handleOnOutputSelected"),!0))},enable:function(){this._aspectHandles.push(d.after(this._viewModel,"onModelUpdated",e.hitch(this,"_handleOnModelUpdated")));this._aspectHandles.push(d.after(this._cursorView,"onChange",e.hitch(this,"_handleCursorChange")));this._aspectHandles.push(d.after(this._rtcView,"onVisitNode",e.hitch(this,"_updateCurrentElementOnNodeChange"),!0));this._updateCurrentElementFromCursorPosition();this._isEnabled=
!0},disable:function(){this._aspectHandles.forEach(function(a){a.remove()});this._clearAllStyles();this._currentOutputs=[];this._isEnabled=!1},_handleOnOutputSelected:function(a){this._isEnabled&&((a=a.focusedOutput)&&a.getDomElement().parentElement?this._focusOutput(a.getDomElement().parentElement):this._blurOutput())},_focusOutput:function(a){this._clearAllStyles();this._currentOutputs=[];this._focusedOutput=a;b.add(this._focusedOutput,this._FOCUSED_CLASS)},_blurOutput:function(){this._clearFocusStyles();
this._focusedOutput=null;this._updateCurrentElementFromCursorPosition()},_handleOnModelUpdated:function(){this._addSingleOutputHighlightingClass();this._updateCurrentElementFromCursorPosition()},_handleCursorChange:function(){var a=this._getCursorLineNode();a&&a!==this._currentCursorLineNode&&(this._currentCursorLineNode=a,this._updateCurrentItemSelection())},_updateCurrentElementOnNodeChange:function(a){var c=this._getCursorLineNode();c&&a.some(function(a){if((a=a.rootContainer())&&c.uid===a.uid)return this._currentCursorLineNode=
c,!0},this)&&this._updateCurrentItemSelection()},_updateCurrentElementFromCursorPosition:function(){var a=this._getCursorLineNode();a&&(this._currentCursorLineNode=a,this._updateCurrentItemSelection())},_getCursorLineNode:function(){return!this._cursor.position.isValid()?null:this._cursor.getNode().rootContainer()},destroy:function(){this.disable();this._currentOutputServiceHandle&&(this._currentOutputServiceHandle.remove(),this._currentOutputServiceHandle=null)},_updateCurrentItemSelection:function(){if(h.isCodeContainer(this._currentCursorLineNode)){this._clearCodeStyles();
var a=this._viewModel.getOutputDivsForNode(this._currentCursorLineNode),b=c.differenceOfArrays(this._currentOutputs,a);this._clearOutputStyles(b);if((this._currentOutputs=a)&&0!==a.length)this._setCurrentLineBackground(this._currentCursorLineNode.box),a.forEach(this._setCurrentOutputsBackground,this)}else this._clearAllStyles()},_setCurrentLineBackground:function(a){this._highlightCodeEnabled&&b.add(a,this._LINE_CLASS)},_setCurrentOutputsBackground:function(a,c,d){var e=d[c-1];c=d[c+1];b.toggle(a,
this._OUTPUT_START_CLASS,!e||e!==a.previousSibling);b.toggle(a,this._OUTPUT_END_CLASS,!c||c!==a.nextSibling);b.add(a,this._OUTPUT_CLASS)},_clearAllStyles:function(){this._clearCodeStyles();var c=a(this._OOR_OUTPUT_SELECTOR);c.removeClass(this._OUTPUT_CLASS);c.removeClass(this._OUTPUT_START_CLASS);c.removeClass(this._OUTPUT_END_CLASS);this._clearFocusStyles()},_clearOutputStyles:function(a){a.forEach(function(a){b.remove(a,[this._OUTPUT_CLASS,this._OUTPUT_START_CLASS,this._OUTPUT_END_CLASS])},this);
this._clearFocusStyles()},_clearFocusStyles:function(){this._focusedOutput&&b.remove(this._focusedOutput,this._FOCUSED_CLASS)},_clearCodeStyles:function(){this._highlightCodeEnabled&&a(this._RTC_LINE_SELECTOR).removeClass(this._LINE_CLASS)},_toggleHighlightOnHover:function(){this._highlightOnHoverEnabled?(this._highlightOnHoverEnabled=!1,a(this._OOR_ALL_OUTPUTS_SELECTOR).removeClass(this._HIGHLIGHT_ON_HOVER_CLASS)):(this._highlightOnHoverEnabled=!0,this._addSingleOutputHighlightingClass())},_addSingleOutputHighlightingClass:function(){this._highlightOnHoverEnabled&&
a(this._OOR_ALL_OUTPUTS_SELECTOR).addClass(this._HIGHLIGHT_ON_HOVER_CLASS)}})})},"MW/rtc/plugins/embeddedoutputs/view/onright/SplitterPositionController":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/Deferred mw-log/Log ../../../../../layout/LayoutContainerEvent".split(" "),function(g,f,e,d,b,a){return g(null,{constructor:function(c,b,d){this._aspectHandles=[];this._splitterPositionModel=c;this._parentBorderContainer=b;this._isOnRightView=d;this._splitterDeferred=null;this._aspectHandles.push(e.after(this._splitterPositionModel,
"onLoaded",f.hitch(this,"_resolveSplitterDeferred")));this._evtListener=this._parentBorderContainer.on(a.SPLITTER_DRAG_ENDED,f.hitch(this,"_updateModel"))},addContentPanel:function(a,e){this._splitterDeferred=new d;if(this._splitterPositionModel.hasSplitterPosition()){var k=this._splitterPositionModel.getRightPanelProportion();this._splitterDeferred.resolve(k)}this._splitterDeferred.then(f.hitch(this,function(b){a.proportion=b;this._parentBorderContainer.addWithProperties(e,a)}),function(a){b.assert("The Deferred that gets the Splitter Position is cancelled: "+
a)})},_resolveSplitterDeferred:function(){if(this._isOnRightView()){var a=this._splitterPositionModel.getRightPanelProportion();this._splitterDeferred.resolve(a)}else this._splitterDeferred.cancel("opening a file with InLine view")},_updateModel:function(){var a=this._parentBorderContainer.getDerivedRightProportion();this._splitterPositionModel.setRightPanelProportion(a)},destroy:function(){this._aspectHandles.forEach(function(a){a.remove()});this._evtListener.remove()}})})},"MW/rtc/plugins/embeddedoutputs/loadinterceptors/DeferredLoadInterceptorProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./DeferredLoadInterceptor"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document","rtc.embeddedoutputs"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/embeddedoutputs/loadinterceptors/DeferredLoadInterceptor":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","dojo/Deferred","MW/rtc/plugins/embeddedoutputs/loadinterceptors/AbstractOutputLoadInterceptor"],function(g,f,e,d,b){return g(b,
{constructor:function(a,c){this._document=a;this._embeddedOutputs=c;this.own(e.after(this._embeddedOutputs,"onEmbeddedOutputsStateChange",this._handleStateChange.bind(this),!0))},interceptLoading:function(a){if(this._embeddedOutputs.isEmbeddedOutputsEnabled())return!1;this._deferred&&this._deferred.reject();var c=this._document.getState();this._deferred=new d;this._deferred.promise.then(f.hitch(this,function(a,c){this._document.getState()===c&&this._embeddedOutputs.load(a)},a,c),function(a){});return!0},
_handleStateChange:function(a){this._deferred&&(a?this._deferred.resolve():this._deferred.reject(),this._deferred=null)},destroy:function(){this.inherited(arguments);this._deferred&&(this._deferred.reject(),this._deferred=null)}})})},"MW/rtc/plugins/embeddedoutputs/loadinterceptors/AbstractOutputLoadInterceptor":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin"],function(g,f){return g(f,{interceptLoading:function(e){throw Error("Unimplemented API: MW.rtc.plugins.embeddedoutputs.loadinterceptors.AbstractOutputLoadInterceptor.interceptLoading");
}})})},"MW/rtc/plugins/embeddedoutputs/loadinterceptors/EmbeddedOutputsLoadInterceptorManagerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./EmbeddedOutputsLoadInterceptorManager"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.embeddedoutputs","rtc.embeddedoutputs.loadinterceptors"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/embeddedoutputs/loadinterceptors/EmbeddedOutputsLoadInterceptorManager":function(){define(["dojo/_base/declare",
"MW/rtc/abstract/AbstractPlugin"],function(g,f){return g(f,{constructor:function(e,d){this._embeddedOutputs=e;this._registerInterceptors(d)},_registerInterceptors:function(e){e.forEach(function(d){this._embeddedOutputs.registerLoadInterceptor(d)},this)}})})},"MW/rtc/plugins/embeddedoutputs/model/EmbeddedOutputsModelProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/embeddedoutputs/model/EmbeddedOutputsModel","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{requires:function(){return{createInstance:["rtc.internaldocument",
"rtc.document","rtc.code.sections.model","rtc.document.executablecode.executablecodeconverter","rtc.embeddedoutputs.statehandler"]}},createInstance:function(d,b,a,c,e){return new f(d,b,a,c,e)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/embeddedoutputs/model/EmbeddedOutputsModel":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/Deferred mw-log/Log MW/rtc/model/CodeUtilities MW/rtc/model/DocumentUtilities MW/rtc/model/NodeUtilities MW/rtc/model/PositionUtilities MW/rtc/model/Range mw-utils/Utils ./OutputContainer ./Region ./RegionParser ./RegionUtilities ../outputhandlers/error/ErrorOutputProperties".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s){return g(null,{CHANGE_TYPE:{ADD:0,REMOVE:1,REPLACE:2,UPDATE:3},_RELATION:{BEFORE:0,AFTER:1},_COMPARISON:{BEFORE:-1,WITHIN:0,AFTER:1},_CANCEL_REASONS:{EVALUATION_START:"eval start",OTHER:"other"},constructor:function(a,c,b,d,h){this._internalDocument=a;this._document=c;this._sectionModel=b;this._stateHandler=h;this._regionParser=new q(this._document,d);this._regions=[];this._HEAD=new p(null,{});this._TAIL=new p(null,{});this._HEAD.setNext(this._TAIL);this._TAIL.setPrevious(this._HEAD);
this._allOutputsReadyPromise=this._replacementRange=null;this._unresolvedOutputCount=0;this._isBatchOperationInProgress=!1;this._changes=[];this._aspectHandles=[];this._aspectHandles.push(e.after(this._internalDocument,"onDocumentReset",f.hitch(this,"clear")));this._aspectHandles.push(e.after(this._stateHandler,"onStateChanged",f.hitch(this,"_stateChangeListener"),!0));this.synchronizeRegions()},_stateChangeListener:function(a,c){if(a===this._stateHandler.CHANGE_TYPE_ENUM.EVAL_INITIALIZED){var b=
c.evaluationRange,d=this._sectionModel.getSectionNumberForNode(b.getStartPosition().node),b=this._sectionModel.getSectionNumberForNode(b.getEndPosition().node);this._clearDeferredOutputsForSections(d,b)}},destroy:function(){this.clear();this._aspectHandles.forEach(function(a){a.remove()})},startBatchOperation:function(){this._isBatchOperationInProgress=!0},finishBatchOperation:function(){0<this._changes.length&&(this.onModelUpdated(!0,this._changes),this._changes=[]);this._isBatchOperationInProgress=
!1},_batchAwareModelUpdate:function(a){if(this._isBatchOperationInProgress)this._changes.push(a);else this.onModelUpdated(!0,[a])},synchronizeRegions:function(){this.synchronizeRegionsPartial(0,!0)},synchronizeRegionsPartial:function(a,c){var b=this._getUpdatedCodeRegions(a,c),d=[],e=[],h=this._getEndSectionNumber(a,c);b.forEach(function(c,b){c.regionNumber=b;c.sectionBreak||(c.sectionBreak=!1);c.endOfSection||(c.endOfSection=!1);var f=c.regionPositions[0].getNode();if(!e.some(function(a){return f===
a},this)){var k=this._mergeAllOutputsInCollapsedRegionsForStartNode(this._regions,f);e.push(f)}var g;if(k){var l=c.sectionNumber;l>=a&&l<=h&&this._clearRegionPositions(k);g=new n(c,k.uid);this._getOutputContainersForRegion(k,!0).forEach(function(a){a.setRegion(g)})}else g=new n(c,m.generateUuid());d[c.regionNumber]=g},this);this._blockEvents(f.hitch(this,"_clearStaleRegions",d));this._regions=d;this.onModelUpdated()},_clearDeferredOutputsForSections:function(a,c){this._clearOutputsIf(function(b){var d=
b.getRegion().code.sectionNumber,d=d>=a&&d<=c;b=!b.getOutput().isReady();return d&&b},this._CANCEL_REASONS.EVALUATION_START)},_mergeAllOutputsInCollapsedRegionsForStartNode:function(a,c){var b=null,d=[];a.forEach(function(a){r.checkRegionIsValid(a);if(a.code.regionPositions.length&&a.code.regionPositions[0].getNode()===c){var e=this._getOutputContainersForRegion(a,!0);e&&0<e.length&&(d=d.concat(e));b=a;d.forEach(function(a){a.setRegion(b)},this)}},this);return b},_getEndSectionNumber:function(a,c){var b=
this._sectionModel.getSections();return c?b.length-1:a},_getUpdatedCodeRegions:function(a,c){var b=this._getEndSectionNumber(a,c),d=[],e=[];0===a&&c||(this._updateOldRegions(),d=this._getRegionsBeforeSection(a),c||(e=this._getRegionsAfterSection(b)));b=this._sectionModel.getSections().slice(a,b+1);b=this._getNewRegions(b,a);return[].concat(d,b,e)},_getRegionsBeforeSection:function(a){return this._regions.filter(function(c){return c.code.sectionNumber<a}).map(function(a){return a.code})},_getRegionsAfterSection:function(a){return this._regions.filter(function(c){return c.code.sectionNumber>
a}).map(function(a){return a.code})},_updateOldRegions:function(){var a=-1;this._regions.forEach(function(c,b,d){c=c.code;if(-1!==c.sectionNumber){var e=this._sectionModel.getSectionNumberForNode(c.regionPositions[0].node);c.sectionNumber=e;c.endOfSection=!1;e!=a?(c.sectionBreak=!0,0!==b&&(d[b-1].code.endOfSection=!0)):c.sectionBreak=!1;a=e}},this);0<this._regions.length&&(this._regions[this._regions.length-1].code.endOfSection=!0)},_getNewRegions:function(a,c){var b=[];a=a||this._sectionModel.getSections();
c=c||0;a.forEach(function(a,d){var e=a.start.getNode(),h=a.end.getNode(),e=this._regionParser.getCodeRegionsInRange(e,h);0<e.executableRegions.length&&(e.executableRegions[0].sectionBreak=!0,e.executableRegions[e.executableRegions.length-1].endOfSection=!0,e.executableRegions.forEach(function(a){a.sectionNumber=c+d}),b=b.concat(e.executableRegions))},this);return b},prependOutput:function(a,c){if(!c.isReady())throw Error("prependOutput API expects a resolved output");if(this._replacementRange)throw Error("prependOutput should not be used while a replacement is in progress.");
var b=this._findFirstOutputContainerIf(function(c){return c.getRegion().code.regionNumber>=a},this._HEAD,this._TAIL),d=new p(c,this._regions[a]);this._spliceInOutputContainer(d,b,this._RELATION.BEFORE);this._handleDeferredInsertResolved(d)},setReplacementRange:function(a){a=this._getOutputContainerListForDocumentRange(a);this._replacementRange={head:a.head,insertionPoint:a.head.next(),tail:a.tail}},clearReplacementRange:function(){this._replacementRange=null},_setInsertionPoint:function(a){if(a===
this._HEAD||null===a.next()&&null===a.previous())throw Error("Invalid output container");if(a!==this._TAIL&&!a.getOutput().isReady())throw Error("There shouldn't be any non ready outputs after the execution point.");this._replacementRange.insertionPoint=a},addOutput:function(a,b){this._replacementRange||this.setReplacementRange(c.createFullFileRange(this._document,this._internalDocument));this._insertWithReplacement(a,b)},_insertWithReplacement:function(a,c){var b=new p(c,this._regions[a]);this._insertContainerWithReplacement(a,
b)},_insertContainerWithReplacement:function(a,c){var b=c.getOutput(),d=this._calculateInsertionPoint(b.evaluationId,a);this._setInsertionPoint(d);if(d!==this._replacementRange.tail&&this._isOutputReplaceable(d,b))return this._replaceOutput(c,d),c;this._insertOutput(c,d,this._RELATION.BEFORE)},_replaceOutput:function(a,c){c.setBeingReplacedBy(a);a.setContainerToReplace(c);var b;b=c.getRegion().code.regionNumber;b=a.getRegion().code.regionNumber<b?this._RELATION.BEFORE:this._RELATION.AFTER;this._spliceInOutputContainer(a,
c,b);b===this._RELATION.AFTER?this._setInsertionPoint(a.next()):this._setInsertionPoint(c.next());this._unresolvedOutputCount++;a.then(f.hitch(this,"_handleDeferredReplacementResolved",a,c),f.hitch(this,"_handleDeferredReplacementCancelled",c),f.hitch(this,"_handleOutputPromiseRejection",[a,c]))},_handleDeferredReplacementResolved:function(a,c){this._ensureBatched(f.hitch(this,function(){this._destroyOutputContainer(c);a.setContainerToReplace(null);this._unresolvedOutputCount--;var b=this._getIndexInRegion(a);
this._batchAwareModelUpdate({type:this.CHANGE_TYPE.ADD,regionNumber:a.getRegion().code.regionNumber,output:a.getOutput(),outputIndex:b})}))},_handleDeferredReplacementCancelled:function(a){this._unresolvedOutputCount--;a.getBeingReplacedBy().setContainerToReplace(null);a.setBeingReplacedBy(null);this._updateAllOutputsReadyPromise()},_insertOutput:function(a,c,b){this._spliceInOutputContainer(a,c,b);this._setInsertionPoint(a.next());this._unresolvedOutputCount++;a.then(f.hitch(this,"_handleDeferredInsertResolved",
a),f.hitch(this,"_handleDeferredInsertCancelled"),f.hitch(this,"_handleOutputPromiseRejection",[a]))},_handleDeferredInsertResolved:function(a){this._unresolvedOutputCount--;var c=this._getIndexInRegion(a);this._batchAwareModelUpdate({type:this.CHANGE_TYPE.ADD,regionNumber:a.getRegion().code.regionNumber,output:a.getOutput(),outputIndex:c})},_handleDeferredInsertCancelled:function(){this._unresolvedOutputCount--;this._updateAllOutputsReadyPromise()},_handleOutputPromiseRejection:function(a,c){var b=
a[1];this._destroyOutputContainer(a[0]);if(b)if(c===this._CANCEL_REASONS.EVALUATION_START&&this._stateHandler.isRunning())this.onOldOutputNotRemovedDuringReplacementRejection(b.getOutput());else this._destroyOutputContainer(b);this._updateAllOutputsReadyPromise()},onOldOutputNotRemovedDuringReplacementRejection:function(a){},_calculateInsertionPoint:function(a,c){return this._findFirstOutputContainerIf(f.hitch(this,function(a){return this._isInOrAdjacentToRegionNumber(a,c)}),this._replacementRange.insertionPoint.previous(),
this._replacementRange.tail)},_isInOrAdjacentToRegionNumber:function(a,c){var b=a.getRegion().code.regionNumber;if(b<c){var d=a.next();if(d!==this._TAIL&&d.getRegion().code.regionNumber<c)return!1}return b>c&&(b=a.previous(),b!==this._HEAD&&b.getRegion().code.regionNumber>c)?!1:!0},_spliceInOutputContainer:function(a,c,b){b===this._RELATION.BEFORE?(a.setNext(c),a.setPrevious(c.previous()),c.previous().setNext(a),c.setPrevious(a)):(a.setNext(c.next()),a.setPrevious(c),c.next().setPrevious(a),c.setNext(a))},
_spliceOutOutputContainer:function(a){a.previous().setNext(a.next());a.next().setPrevious(a.previous());a.setPrevious(null);a.setNext(null)},_removeReplacementReferences:function(a){var c=a.getBeingReplacedBy();c&&c.setContainerToReplace(null);a.setBeingReplacedBy(null);(c=a.getContainerToReplace())&&c.setBeingReplacedBy(null);a.setContainerToReplace(null)},_destroyOutputContainer:function(a){this._isContainerInModel(a)?(a.isResolved()||a.cancel(),this._removeContainerAndEmitChangeEvent(a),a.destroy(),
this._destroyOutput(a.getOutput())):b.error("Tried to remove a container that wasn't in the model.")},_removeContainerAndEmitChangeEvent:function(a){this._replacementRange&&a===this._replacementRange.insertionPoint&&(this._replacementRange.insertionPoint=a.next());this._spliceOutOutputContainer(a);this._removeReplacementReferences(a);a.getOutput().isReady()&&this._batchAwareModelUpdate({type:this.CHANGE_TYPE.REMOVE,regionNumber:a.getRegion().code.regionNumber,removedOutputId:a.getOutput().uid})},
_isOutputReplaceable:function(a,c){var b=this._findFirstReadyOutputContainerIf(function(c){return c===a},this._replacementRange.head,this._replacementRange.tail),d=!this._isOutputUsedByCurrentEvaluation(c.evaluationId,a),e=a.getOutput().type===c.type;return b&&d&&e},clear:function(){this.clearAllOutputs();this._clearAllRegions();this.onModelUpdated();this._isBatchOperationInProgress=!1;this._changes=[]},clearOldOutputsInRange:function(a,c){var b=this._getOutputContainerListForDocumentRange(a),d=f.hitch(this,
function(a){return!this._isOutputUsedByCurrentEvaluation(c,a)});this._clearOutputsIf(d,this._CANCEL_REASONS.OTHER,b.head,b.tail)},clearOutputsForward:function(a,c){c=c||function(){return!1};this._ensureBatched(f.hitch(this,function(){this._clearOutputsIf(function(b){var d=b.getRegion().code.regionNumber>=a;b=c(b.getOutput());return d&&!b})}))},clearAllOutputs:function(){this._clearOutputsIf();this._HEAD.next()!==this._TAIL&&(b.error("Some outputs remained after clearing outputs. This might be because an output was rejected, but no one cleaned it up. Removing all remaining outputs."),
this._HEAD.setNext(this._TAIL),this._TAIL.setPrevious(this._HEAD))},clearOutputsForRegionNumber:function(a){this._ensureBatched(f.hitch(this,function(){this._clearOutputsIf(function(c){return c.getRegion().code.regionNumber===a})}))},removeOutput:function(a){(a=this._findOutputContainerForOutput(a))&&this._destroyOutputContainer(a)},_clearOutputsIf:function(a,c,b,d){c=c||this._CANCEL_REASONS.OTHER;b=b||this._HEAD;d=d||this._TAIL;var e=this._findOutputContainersIf(a||function(){return!0},b,d);this._ensureBatched(f.hitch(this,
function(){e=e.filter(function(a){a=a.getOutput();return!a.isReady()?(a.getReadyPromise().cancel(c),!1):!0},this);e.forEach(function(a){this._isContainerInModel(a)&&this._destroyOutputContainer(a)},this)}))},updateOutput:function(a){var c=this._findOutputContainerForOutput(a);if(!c)throw Error("Output not found");a.isReady()&&this._batchAwareModelUpdate({type:this.CHANGE_TYPE.UPDATE,regionNumber:c.getRegion().code.regionNumber,output:c.getOutput()})},updateOutputAssociations:function(a,c){var b=this._findOutputContainerForOutput(a);
if(!b)throw Error("Output not found");if(!this._replacementRange)throw Error("No active replacement range");this._ensureBatched(f.hitch(this,function(){var a=b.getContainerToReplace();a&&(b.next()===this._replacementRange.insertionPoint||a.next()===this._replacementRange.insertionPoint?this._setInsertionPoint(a):this._destroyOutputContainer(a));this._removeContainerAndEmitChangeEvent(b);this._resetContainerForReuse(b,c);this._insertContainerWithReplacement(c,b)}))},_resetContainerForReuse:function(a,
c){a.setRegion(this._regions[c]);if(!a.isResolved()){var b=a.getContainerToReplace();b&&(b.setBeingReplacedBy(null),a.setContainerToReplace(null));this._unresolvedOutputCount--;this._updateAllOutputsReadyPromise()}},_ensureBatched:function(a){if(this._isBatchOperationInProgress)return a();this.startBatchOperation();a=a();this.finishBatchOperation();return a},_blockEvents:function(a){var c=!1;this._isBatchOperationInProgress&&(this.finishBatchOperation(),c=!0);this.startBatchOperation();a=a();this._changes=
[];this.finishBatchOperation();c&&this.startBatchOperation();return a},_isOutputUsedByCurrentEvaluation:function(a,c){if(c.getOutput().evaluationId===a)return!0;var b=c.getBeingReplacedBy();return b&&b.getOutput().evaluationId===a},_destroyOutput:function(a){a.destroy();a.codeLinePositions.forEach(function(a){this._document.deletePosition(a)},this);a.codeLinePositions=[]},_clearRegionPositions:function(a){a.code.regionPositions.forEach(this._document.deletePosition);a.code.regionPositions=[]},_clearAllRegions:function(){this._regions.forEach(this._clearRegionPositions,
this);this._regions=[]},_clearStaleRegions:function(a){var c=[];this._regions.forEach(function(b){b.code.regionPositions&&b.code.regionPositions.length&&!a.some(f.hitch(r,"regionStartNodesMatch",b))&&(c.push(b),this._clearRegionPositions(b))},this);this._clearOutputsIf(function(a){return-1<c.indexOf(a.getRegion())})},getRegions:function(a,c){return void 0===a||null===a?this._regions:this._regions.slice(a,c)},getOutputs:function(){var a=this._getOutputContainers(!1,!0);return this._getOutputsFromContainers(a)},
_getOutputContainers:function(a,c){return a&&!c?this._findOutputContainersIf(function(a){return!a.getOutput().isReady()},this._HEAD,this._TAIL):c&&!a?this._findReadyOutputContainersIf(function(){return!0},this._HEAD,this._TAIL):this._findOutputContainersIf(function(){return!0},this._HEAD,this._TAIL)},_getOutputsFromContainers:function(a){return a.map(function(a){return a.getOutput()})},getOutputsForRegion:function(a){a=this._getOutputContainersForRegion(a,!1);return this._getOutputsFromContainers(a)},
_getOutputContainersForRegion:function(a,c){var b=function(c){return a===c.getRegion()};return c?this._findOutputContainersIf(b,this._HEAD,this._TAIL):this._findReadyOutputContainersIf(b,this._HEAD,this._TAIL)},setRegions:function(a){this.clearAllOutputs();this._clearAllRegions();this._regions=a;this.onModelUpdated()},hasOutputs:function(){return this._findFirstReadyOutputContainerIf(function(){return!0},this._HEAD,this._TAIL)!==this._TAIL},getSectionRegionsFromNodeRange:function(a,c){var b=h.getLineNumberForNode(a,
this._internalDocument),d=h.getLineNumberForNode(c,this._internalDocument),e=[];this._regions.some(function(a){var c=a.code.regionPositions,h=c[c.length-1].line;c[0].line>=b&&h<=d&&e.push(a);if(h>d)return!0},this);return e},onModelUpdated:function(){this._changes=[];this._updateAllOutputsReadyPromise()},hasError:function(){return this._findFirstReadyOutputContainerIf(function(a){return a.getOutput().type===s.OUTPUT_TYPE},this._HEAD,this._TAIL)!==this._TAIL},findOutput:function(a){var c=this._findFirstReadyOutputContainerIf(function(c){return a(c.getOutput())},
this._HEAD,this._TAIL);return c!==this._TAIL?c.getOutput():null},whenOutputsReady:function(a){this._hasUnresolvedOutputs()?(this._allOutputsReadyPromise||(this._allOutputsReadyPromise=new d),this._allOutputsReadyPromise.then(a)):a()},_updateAllOutputsReadyPromise:function(){this._allOutputsReadyPromise&&!this._hasUnresolvedOutputs()&&(this._allOutputsReadyPromise.resolve(),this._allOutputsReadyPromise=null)},_hasUnresolvedOutputs:function(){return 0<this._unresolvedOutputCount},getOutputsForPosition:function(a){var c=
this._findReadyOutputContainersIf(function(c){c=c.getOutput().getCodeLinePositions();return a.line===c[c.length-1].line},this._HEAD,this._TAIL);return this._getOutputsFromContainers(c)},_findFirstReadyOutputContainerIf:function(a,c,b){this._assertHeadNotEqualToTail(c,b);for(c=c.next();c!==b;){if(c.getOutput().isReady()&&a(c))return c;c=c.next()}return b},_findFirstOutputContainerIf:function(a,c,b){this._assertHeadNotEqualToTail(c,b);for(c=c.next();c!==b;){if(a(c))return c;c=c.next()}return b},_findReadyOutputContainersIf:function(a,
c,b){this._assertHeadNotEqualToTail(c,b);var d=[];for(c=c.next();c!==b;)c.getOutput().isReady()&&a(c)&&d.push(c),c=c.next();return d},_findOutputContainersIf:function(a,c,b){this._assertHeadNotEqualToTail(c,b);var d=[];for(c=c.next();c!==b;)a(c)&&d.push(c),c=c.next();return d},_findOutputContainerForOutput:function(a){var c=this._findFirstOutputContainerIf(function(c){return a===c.getOutput()},this._HEAD,this._TAIL);return c===this._TAIL?null:c},_getOutputContainerListForDocumentRange:function(a){var c=
{head:null,tail:null},b=a.getStartPosition().getLine(),d=this._findFirstOutputContainerIf(f.hitch(this,function(a){return this._getPrimaryLineForContainer(a)>=b}),this._HEAD,this._TAIL);c.head=d.previous();var e=a.getEndPosition().getLine();c.tail=this._findFirstOutputContainerIf(f.hitch(this,function(a){return this._getPrimaryLineForContainer(a)>e}),c.head,this._TAIL);return c},_getPrimaryLineForContainer:function(a){a=a.getOutput().codeLinePositions;return a[a.length-1].getLine()},addRegionForPosition:function(a){var c=
this._createNewRegionTemplate(),b=this._document.createLinePosition(a.node,!1);c.code.regionPositions=[b];c.code.regionString=a.node.getText();a=this._getNewRegionNumberForPosition(a);this._regions.splice(a,0,c);this._regions.forEach(function(a,c){a.code.regionNumber=c});this._updateOldRegions();this.onModelUpdated();return a},_getNewRegionNumberForPosition:function(a){for(var c=0;c<this._regions.length;c++)if(a.line<this._regions[c].code.regionPositions[0].line)return c;return this._regions.length},
_createNewRegionTemplate:function(){return new n({regionNumber:null,regionPositions:null,regionString:null,sectionBreak:null,endOfSection:null,sectionNumber:null},m.generateUuid())},_getIndexInRegion:function(a){var c=0,b=a.getRegion();for(a=a.previous();a!==this._HEAD&&a.getRegion()===b;)c+=a.getOutput().isReady()?1:0,a=a.previous();return c},_assertHeadNotEqualToTail:function(a,c){if(a===c)throw Error("Head should not be equal to tail.");},_isContainerInModel:function(a){var c=a.previous();a=a.next();
(null===c&&null!==a||null!==c&&null===a)&&b.error("Unexpected previous/next value: previous: "+c+" next: "+a);return null!==c&&null!==a}})})},"MW/rtc/plugins/embeddedoutputs/model/OutputContainer":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/Deferred"],function(g,f,e){return g(null,{constructor:function(d,b){this._output=d;this._containerToReplace=this._beingReplacedBy=this._deferredModelChange=null;this._region=b;this._outputErrorCallback=this._cancelCallback=this._thenCallback=
this._previous=this._next=null;if(!b)throw Error("Tried to set an undefined region");d&&!d.isReady()&&(this._deferredModelChange=new e,this._deferredModelChange.then(f.hitch(this,"_handleResolve"),f.hitch(this,"_handleCancel")),d.getReadyPromise().then(f.hitch(this,"resolve"),f.hitch(this,"_handleOutputError")))},destroy:function(){this.cancel();this._deferredModelChange=null},_handleResolve:function(){this._thenCallback&&(this._thenCallback(),this._deferredModelChange=null)},_handleCancel:function(){this._cancelCallback&&
(this._cancelCallback(),this._deferredModelChange=null)},_handleOutputError:function(d){this._outputErrorCallback&&(this._outputErrorCallback(d),this._deferredModelChange=null)},getOutput:function(){return this._output},getRegion:function(){return this._region},setRegion:function(d){if(!d)throw Error("Tried to set an undefined region");this._region=d},next:function(){return this._next},setNext:function(d){this._next=d},previous:function(){return this._previous},setPrevious:function(d){this._previous=
d},getBeingReplacedBy:function(){return this._beingReplacedBy},setBeingReplacedBy:function(d){this._beingReplacedBy=d},getContainerToReplace:function(){return this._containerToReplace},setContainerToReplace:function(d){this._containerToReplace=d},cancel:function(d){this._deferredModelChange&&(this._outputErrorCallback=null,this._deferredModelChange.cancel(d),this._deferredModelChange=null)},isResolved:function(){return this._deferredModelChange?this._deferredModelChange.isResolved():!0},then:function(d,
b,a){this._deferredModelChange?(this._thenCallback=d,this._cancelCallback=b,this._outputErrorCallback=a):d()},resolve:function(d){this._deferredModelChange&&this._deferredModelChange.resolve(d)}})})},"MW/rtc/plugins/embeddedoutputs/model/RegionParser":function(){define(["dojo/_base/declare","MW/rtc/model/importers/MATLAB_PEG","MW/rtc/model/CodeUtilities","MW/rtc/model/NodeUtilities"],function(g,f,e,d){return g(null,{constructor:function(b,a){this._document=b;this._executableCodeConverter=a;this._parser=
new f},getCodeRegionsInRange:function(b,a){var c=[],h="",f=null,g=null,m="",p=!1;d.getParagraphNodesInRange(b,a).forEach(function(a){var b=this._executableCodeConverter.getEvalTextFromNode(a);if(null!==b){var d="";try{d=this._parser.classifyCode(m+b)}catch(n){}if(!p){if(d===this._parser.BLANK_OR_COMMENT&&!this._isAfterLineContinuation(h)){m="";return}if(d===this._parser.IN_BLOCK_COMMENT){m=m+b+"\n";return}}m="";0<h.length?h=h+"\n"+b:(h=b,f=a);g=a;a="";try{a=this._parser.classifyCode(h)}catch(u){}b=
a===this._parser.FUNCTION;a===this._parser.COMPLETE_NONTRIVIAL_COMMAND||b?(a=e.getCodePositionsInNodeRange(this._document,f,g),c.push({regionString:h,regionPositions:a}),h="",p=!1):p=!0}},this);if(0<h.length){var n=e.getCodePositionsInNodeRange(this._document,f,g);c.push({regionString:h,regionPositions:n})}return{executableRegions:c}},_isAfterLineContinuation:function(b){if(0===b.length)return!1;var a=b.lastIndexOf("\n");return-1!==b.indexOf("...",a+1)}})})},"MW/rtc/model/importers/MATLAB_PEG":function(){define(["dojo/_base/declare",
"MW/rtc/model/importers/Base","MW/rtc/model/importers/MatlabRules","MW/rtc/model/importers/PEG"],function(g,f,e,d){return g(f,{constructor:function(){this._inScript=!1},makeSymbolMap:function(){var b={},a="alpha beta gamma delta epsilon zeta eta theta iota kappa lambda mu nu xi omicron pi rho sigma tau upsilon phi chi psi omega varepsilon vartheta varomega Gamma Delta Theta Lambda Eta Pi Sigma Phi Psi Omega".split(" "),c;for(c=0;c<a.length;c+=1)b[a[c]]=a[c];return b},makePEG:function(){return new d(e.rulenames,
e.rules,0)},makeActionMap:function(){var b={},a=this.peg.names,c=[this.appendChildren],d;for(d=0;d<a.length;d+=1)b[a[d]]=c;b.S14=[this.appendAssignment];b.S14=[this.appendCmd,"if"];b.S15=[this.appendCmd,"elseif"];b.S16=[this.appendCmd,"else"];b.S17=[this.appendCmd,"switch"];b.S18=[this.appendCmd,"case"];b.S19=[this.appendCmd,"otherwise"];b.S20=[this.appendCmd,"for"];b.S21=[this.appendCmd,"parfor"];b.S22=[this.appendCmd,"while"];b.S26=[this.appendCmd,"try"];b.S27=[this.appendCmd,"catch"];b.S33=[this.appendCmd,
"!"];b.S28=[this.appendRawString,"code"];b.x5=[this.appendSymbol];b.x6=[this.appendSymbol];b.x7=[this.appendSymbol];b.x8=[this.appendSymbol];b.X10=[this.appendSymbol];b.x11=[this.appendSymbol];b.X13=[this.appendSymbol];b.X14=[this.appendProd];b.X15=[this.appendProdOp];b.X17=[this.appendSymbol];b.X18=[this.appendPostfix];b.X19=b.X17;b.X20=b.X17;b.X21=[this.appendSymbol];b.x23=[this.appendParenExpr];b.X25=[this.appendRawString,"number"];b.X28=[this.appendVariable];b.X29=[this.appendExprList];b.X39=
[this.appendMatrix];b.X44=b.X39;b.X45=[this.appendRawString,"code"];b.X46=[this.appendID];b.SO2=[this.appendSymMatrix];return b},parseSymOutput:function(b){this.peg||this.initMaps();var a=this.peg,c=a.root;a.root=1;b=a.parse(b);a.root=c;return b},COMPLETE_NONTRIVIAL_COMMAND:1,BLANK_OR_COMMENT:2,IN_BLOCK_COMMENT:3,SYNTAX_ERROR:4,FUNCTION:5,classifyCode:function(b){this.peg||this.initMaps();b=b.trim();b=this.peg.parse(b);if(!b.tree)return this.SYNTAX_ERROR;b=b.tree;var a=this.peg.names;return this._hasOpenBlockComment(b,
a)?this.IN_BLOCK_COMMENT:this._hasFunctions(b,a)?this.FUNCTION:this._hasBadEnds(b,a)?this.SYNTAX_ERROR:this._trivialStmts(b,a)?this.BLANK_OR_COMMENT:this.COMPLETE_NONTRIVIAL_COMMAND},isIncompleteCommand:function(b){return this.classifyCode(b)>this.BLANK_OR_COMMENT},_hasOpenBlockComment:function(b,a){if(0<b.children.length){var c=b.children[0];if("BC1"===a[c.name]&&1<c.children.length&&(c=c.children,"B1"===a[c[c.length-2].name]))return!0}return!1},_hasBadEnds:function(b,a){return this._hasNodes(b,
a,["B1","B2","B4"])},_hasFunctions:function(b,a){return this._hasNodes(b,a,["FN1","FN2"])},_hasNodes:function(b,a,c){var d;d=function(b){var e=a[b.name],f=!1;c.forEach(function(a){a===e&&(f=!0)});if(f)return!0;b=b.children;var g;for(g=0;g<b.length;g+=1)if(d(b[g]))return!0;return!1};return d(b)},_trivialStmts:function(b,a){var c=b.children;if(2>c.length)return!1;for(var d=1,e=c[d];d<c.length-1&&"LineC"===a[e.name];)d+=1,e=c[d];return"S1"===a[e.name]&&(c=e.children,0===c.length)?!0:!1},bubbleWraps:function(b){var a=
!1;if(b){"LW"===this.peg.names[b.name]&&(a=!0);var c=b.children,d;for(d=0;d<c.length;d+=1)a=a||this.bubbleWraps(c[d]);b.wrap=a}return a},appendCmd:function(b,a){this.startSubRow();this.pushText(a,"code");this.appendChildren(b);this.endSubRow()},appendAssignment:function(b){this.startSubRow();this.append(b.children[0]);this.pushText("\x3d","symbol");this.append(b.children[1]);this.endSubRow()},fillLineWrap:function(b,a){alert("line wrap not done")},appendSep:function(b){var a=this.slice(b);if(0<a.length){var c=
a.charAt(0);if(", "===c||";"===c)this.pushText(a,"code");else if(c===String.fromCharCode(10)||c===String.fromCharCode(13)||"%"===c){b=b.children;var d=function(a){return this.makeRow()};"%"!==c&&(this.row=d(this.row));if(0<b.length){for(c=0;c<b.length;c+=1)a=this.slice(b[c]),this.pushText(a,"code"),c<b.length-1&&(this.row=d(this.row));this.row=d(this.row)}}else alert(c+" not done")}},appendExprList:function(b){b=b.children;var a;for(a=0;a<b.length;a+=1){this.append(b[a]);var c=this.name(b[a]);a!==
b.length-1&&"LW"!==c&&this.pushText(", ","code")}},appendParenExpr:function(b){var a=this.makeFenced();this.push(a);this.fillRow(b.children[0],a.children[0])},fillRowNoFence:function(b,a){"x23"===this.name(b)?this.fillRow(b.children[0],a):this.fillRow(b,a)},appendProd:function(b){var a=b.children;3!==a.length?this.appendChildren(b):"/"===this.slice(a[1])&&!this._inScript?(b=this.makeFraction(),this.push(b),this.fillRowNoFence(a[0],b.children[0]),this.fillRowNoFence(a[2],b.children[1])):this.appendChildren(b)},
appendPostfix:function(b){var a=b.children;if(3!==a.length)this.appendChildren(b);else if("^"===this.slice(a[1])||this._inScript){b=this.makeScript();this.push(b);this.fillRow(a[0],b.children[0]);var c=this._inScript;this._inScript=!0;this.fillRowNoFence(a[2],b.children[2]);this._inScript=c}else this.appendChildren(b)},appendSymMatrix:function(b){1===b.children.length&&1===b.children[0].children.length?this.append(b.children[0].children[0]):this.appendMatrix(b)},appendMatrix:function(b){b="SO2"===
this.name(b)?b.children:b.children[0].children;var a=(b.length+1)/2,c=0,d;for(d=0;d<b.length;d+=2)c=Math.max(c,b[d].children.length);a=this.makeMatrix(a,c);for(d=0;d<b.length;d+=2){var e=b[d].children,f;for(f=0;f<c;f+=1){var g=this.makeRow();a.children.push(g);this.pushRow(g);f<e.length&&(this.append(e[f]),this.validateRow());this.popRow()}}this.push(a)},lookupSymbol:function(b){return this.symbolMap[b]?(this.pushText(b,"symbol"),!0):!1},appendID:function(b){b=this.slice(b);this.lookupSymbol(b)||
this.pushText(b,"id")},appendSqrt:function(b){var a=this.makeRadical();this.push(a);this.fillRow(b.children[2],a.children[0])},appendSpecialFunctionCall:function(b){var a=b.children;return 3===a.length&&"X33"===this.name(a[1])&&"sqrt"===this.slice(a[0])?(this.appendSqrt(b),!0):!1},appendVariable:function(b){this.appendSpecialFunctionCall(b)||(1<b.children.length?(this.startSubRow(),this.appendVariableRow(b),this.endSubRow()):this.appendVariableRow(b))},appendVariableRow:function(b){b=b.children;this.append(b[0]);
var a;for(a=1;a<b.length;){var c=b[a];a+=1;switch(this.name(c)){case "X33":this.pushDelim("(");a<b.length&&this.append(b[a]);this.pushDelim(")");a+=1;break;case "X36":this.pushDelim("{");this.append(b[a]);this.pushDelim("}");a+=1;break;case "X37":this.pushText(".","code");this.append(b[a]);a+=1;break;case "X35":alert("DotLRB not done");break;case "X38":alert("At not done")}}},appendProdOp:function(b){b=this.slice(b);"*"===b?this.pushText("ImplicitMult","symbol"):this.pushText(b,"code")},fillMulti:function(b,
a,c){}})})},"MW/rtc/model/importers/Base":function(){define(["dojo/_base/declare"],function(g){return g(null,{constructor:function(){this.row=this.symbolMap=this.actionMap=this.peg=null;this.rows=[];this.str=""},initMaps:function(){this.peg=this.makePEG();this.actionMap=this.makeActionMap();this.symbolMap=this.makeSymbolMap()},parse:function(f){this.peg||this.initMaps();return this.peg.parse(f)},pushRow:function(f){this.rows.push(this.row);this.row=f},popRow:function(){this.validateRow();this.row=
this.rows.pop()},fillRow:function(f,e){this.pushRow(e);this.append(f);this.popRow()},startSubRow:function(){var f=this.row;this.pushRow(this.makeRow());f.children.push(this.row)},endSubRow:function(){this.popRow()},makeEquation:function(f){var e=this.makeRoot();f&&(this.str=f.str,this.fillRow(f.tree,e.children[0]));return e},makeRoot:function(){return{className:"MathRoot",children:[this.makeRow()]}},makeRow:function(){return{className:"MathRow",children:[]}},makeDelim:function(f){return{className:"MathDelimiter",
symbol:f}},makeText:function(f,e){return"symbol"===e?{className:"MathText",text:" ",symbolName:f,kind:e}:{className:"MathText",text:f,kind:e}},makeSymbol:function(f){return{className:"MathText",text:" ",symbolName:f,kind:"symbol"}},makeFraction:function(f){var e={className:"MathFraction",children:[this.makeRow(),this.makeRow()]};!0===f&&(e.bevelled=f);return e},makeIntegral:function(){return{className:"MathIntegral",children:[this.makeRow(),this.makeRow(),this.makeRow(),this.makeRow()]}},makeRadical:function(){return{className:"MathRadical",
children:[this.makeRow(),this.makeRow()]}},makeFenced:function(f,e){return{className:"MathFenced",open:f,close:e,children:[this.makeRow()]}},makeScript:function(){return{className:"MathScript",children:[this.makeRow(),this.makeRow(),this.makeRow()]}},makeMatrix:function(f,e){return{className:"MathMatrix",rows:f,cols:e,children:[]}},name:function(f){return this.peg.names[f.name]},slice:function(f){return this.str.slice(f.start,f.end)},push:function(f){this.row.children.push(f);return f},pushText:function(f,
e){var d=this.makeText(f,e);return this.push(d)},pushDelim:function(f){return this.push(this.makeDelim(f))},notLeafNode:function(f){return void 0===f||"MathText"!==f.className&&"MathDelimiter"!==f.className&&"MathRow"!==f.className},validateRow:function(){},append:function(f){var e=this.actionMap[this.peg.names[f.name]];1===e.length?e[0].call(this,f):2===e.length?e[0].call(this,f,e[1]):e[0].call(this,f,e[1],e[2])},mapSymbolName:function(f){var e=this.symbolMap[f];return e?e:f},appendSymbol:function(f){f=
this.slice(f).trim();this.pushText(this.mapSymbolName(f),"symbol")},appendRawString:function(f,e){this.pushText(this.slice(f),e)},simplifyLastItem:function(f){f=f.children;if(0!==f.length){var e=f[f.length-1];"MathRow"===e.className&&(e=e.children,1===e.length?(f.pop(),f.push(e.pop())):0===e.length&&f.pop())}},appendChildren:function(f){var e=f.children;if(0===e.length&&f.start<f.end)this.pushText(this.slice(f),"code");else if(1===e.length)this.append(e[0]);else if(0<e.length){this.startSubRow();
for(f=0;f<e.length;f+=1)this.append(e[f]);this.endSubRow();this.simplifyLastItem(this.row)}}})})},"MW/rtc/model/importers/MatlabRules":function(){define([],function(){return{rulenames:"F SO1 SO2 SO3 B1 B2 B3 B4 B5 B6 w ws s LW E1 E2 E3 E4 E5 E6 E7 C1 C2 C3 C4 BC1 BC2 BC3 BC4 LineC WhiteLine FN1 FN2 FN3 FN4 FN5 FN6 FN7 FN8 FN9 S1 SC S4 S5 S7 S8 S9 S10 S11 S12 S13 IG S14 S15 S16 S17 S18 S19 S20 s20 S21 s21 S22 S23 S24 S25 S26 S27 S28 D1 D2 D3 D3a D4 D5 D6 D7 D6a D8 D9 S29 S30 S31 S32 S33 S34 X1 X2 X3 X4 X5 x5 X6 x6 X7 x7 X8 x8 X9 X10 X11 x11 X12 X13 X14 X15 X16 XX1 X17 X18 X19 X20 X21 X22 X23 x23 X24 X25 X26 X27 X28 X29 X30 X31 X32 X33 X34 X35 X36 X37 X38 X39 X40 X41 X42 X43 X44 X45 X45a X45b X46 X47 X48 E0 Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8 Y9 Y10 Y11 Y12 YY1 Y13 Y14 Y15 Y16 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 T15 T16 T17 T18 T19 T20 T21 T22 T23 T24 T25 T26 T27".split(" "),
rules:[[0,2,22,10,35,0,2,32,11,21,0,2,162,10,11,2,24,10,7,0,2,32,4,1,11,5,2,41,1,10,9,2,24,10,5,2,19,1,13,0],[0,2,12,10,16,2,3,10,12,2,24,10,8,2,12,10,4,26,1,13,0],[9,0,0,2,12,10,18,2,4,10,14,2,12,10,10,0,2,136,11,4,26,1,1,5,-21,13,2],[0,0,3,1,91,10,24,2,88,10,20,0,0,3,1,44,10,5,2,88,1,6,-9,10,6,3,1,93,1,11,5,2,88,1,13,2],[14,13,2],[14,13,2],[14,13,2],[14,13,2],[14,13,2],[14,13,2],[16,2,32,32,9,9],[0,2,11,6,-2],[0,0,16,2,32,32,9,9,6,-6,10,8,0,2,14,6,-2,1],[0,3,3,46,46,46,10,19,2,15,10,15,0,2,16,11,
5,2,6,1,10,5,2,12,1,13,2],[0,17,1,10,13,6,-4,13,0],[0,0,16,1,10,12,11,17,0,16,1,13,13,10,9,0,16,1,10,10,4,1,1,10,5,2,23,1,13,0],[0,2,16,11,4,26,1,13,0],[0,2,15,10,5,2,17,1,13,0],[26,13,0],[0,16,1,10,12,11,17,0,16,1,13,13,10,9,0,16,1,10,10,4,1,1,13,0],[0,16,1,26,26,10,7,0,21,6,-1,1,13,0],[0,2,12,10,32,0,0,0,2,26,11,13,2,30,11,9,2,16,11,5,2,21,1,10,5,2,12,1,6,-22,10,5,2,12,1,13,0],[0,0,0,2,12,10,5,2,26,1,6,-8,10,5,2,12,1,13,0],[0,2,12,10,19,0,0,0,2,30,11,5,2,17,1,10,5,2,22,1,4,1,13,0],[0,0,2,30,11,
5,2,16,1,10,5,2,22,1,13,0],[0,2,28,10,36,2,31,10,32,0,0,2,12,10,5,2,27,1,6,-8,10,19,2,12,10,15,0,2,29,11,5,2,5,1,10,5,2,18,1,13,0],[0,2,26,11,19,0,0,2,29,7,10,11,0,2,19,7,10,5,2,18,1,1,13,0],[3,2,37,123,13,0],[3,2,37,125,13,0],[0,3,1,37,10,5,2,18,1,13,2],[0,0,16,2,32,32,9,9,6,-6,10,5,2,17,1,13,0],[0,2,33,10,14,0,0,2,24,10,5,2,33,1,6,-8,1,13,0],[0,3,8,102,117,110,99,116,105,111,110,10,31,2,144,10,27,2,13,10,23,2,35,10,19,2,39,10,15,2,12,10,11,0,2,34,11,5,2,5,1,1,13,0],[2,117,13,2],[0,0,2,36,4,10,39,
0,2,125,11,5,2,117,1,10,29,2,13,10,25,0,2,38,4,10,19,2,12,10,15,0,16,2,44,44,59,59,4,10,5,2,24,1,13,0],[0,0,2,37,11,5,2,141,1,10,14,2,13,10,10,3,1,61,10,5,2,13,1,13,2],[0,3,1,91,10,50,2,13,10,46,0,2,141,4,10,40,2,13,10,36,0,0,0,3,1,44,4,10,13,2,13,10,9,2,141,10,5,2,13,1,6,-19,10,12,0,3,1,93,11,5,2,5,1,1,13,2],[0,3,1,40,10,60,2,13,10,56,0,0,2,141,11,5,2,52,1,4,10,44,2,13,10,40,0,0,3,1,44,10,19,2,13,10,15,0,2,141,11,5,2,52,1,10,5,2,13,1,6,-23,10,12,0,3,1,41,11,5,2,5,1,1,13,2],[2,40,13,2],[0,2,13,10,
24,0,0,0,2,33,11,9,2,45,11,5,2,30,1,10,5,2,13,1,6,-18,1,13,0],[0,2,13,10,14,0,0,2,42,10,5,2,13,1,6,-8,1,13,0],[0,2,45,11,5,2,30,1,13,0],[0,0,16,2,44,44,59,59,10,5,2,24,1,11,5,2,25,1,13,2],[0,2,43,11,4,26,1],[0,2,43,11,5,2,46,1,13,0],[0,2,69,11,5,2,47,1],[0,0,2,51,10,9,2,13,10,5,2,44,1,11,40,0,2,48,10,5,2,44,1,11,30,0,0,0,3,3,101,110,100,10,5,2,144,1,7,10,13,2,88,10,9,2,13,10,5,2,44,1,1],[0,2,49,10,22,2,13,10,18,3,1,61,10,13,2,13,10,9,2,87,10,5,2,13,1,13,0],[0,2,121,11,5,2,50,1,13,0],[0,2,127,10,76,
2,13,10,72,0,2,121,11,5,2,52,1,10,62,0,0,2,13,10,22,0,3,1,44,4,10,15,2,13,10,11,0,2,121,11,5,2,52,1,1,6,-25,10,32,2,13,10,28,0,3,1,93,11,21,0,3,1,44,10,10,2,13,10,6,3,1,93,1,11,5,2,5,1,1,13,0],[0,2,53,11,45,2,56,11,41,2,59,11,37,2,63,11,33,2,83,11,29,2,84,11,25,2,64,11,21,2,85,11,17,2,67,11,13,2,86,11,9,2,81,11,5,2,60,1,13,0],[3,1,126,13,0],[0,3,2,105,102,10,36,2,144,10,32,2,87,10,28,2,41,10,24,0,2,54,6,-2,10,17,0,2,55,4,10,11,0,2,117,11,5,2,5,1,1,13,0],[0,3,6,101,108,115,101,105,102,10,13,2,144,
10,9,2,87,10,5,2,41,1,13,0],[0,3,4,101,108,115,101,10,9,2,144,10,5,2,41,1,13,0],[0,3,6,115,119,105,116,99,104,10,47,2,144,10,43,2,87,10,39,0,2,43,6,-2,10,32,2,24,10,28,2,12,10,24,0,2,57,6,-2,10,17,0,2,58,4,10,11,0,2,117,11,5,2,5,1,1,13,0],[0,3,4,99,97,115,101,10,17,2,144,10,13,2,87,10,9,2,43,10,5,2,41,1,13,0],[0,3,9,111,116,104,101,114,119,105,115,101,10,9,2,144,10,5,2,41,1,13,0],[0,3,3,102,111,114,10,27,2,144,10,23,2,13,10,19,2,61,10,15,2,41,10,11,0,2,117,11,5,2,5,1,1,13,0],[0,3,6,112,97,114,102,
111,114,10,27,2,144,10,23,2,13,10,19,2,62,10,15,2,41,10,11,0,2,117,11,5,2,5,1,1,13,0],[0,0,2,141,10,14,2,13,10,10,3,1,61,10,5,2,87,1,11,34,0,3,1,40,10,27,2,13,10,23,2,141,10,19,2,13,10,15,3,1,61,10,10,2,87,10,6,3,1,41,1,1,13,0],[0,0,2,141,10,14,2,13,10,10,3,1,61,10,5,2,87,1,11,51,0,3,1,40,10,44,2,13,10,40,2,141,10,36,2,13,10,32,3,1,61,10,27,2,87,10,23,0,0,3,1,44,10,9,2,13,10,5,2,122,1,4,10,6,3,1,41,1,1,13,0],[0,3,5,119,104,105,108,101,10,23,2,144,10,19,2,87,10,15,2,41,10,11,0,2,117,11,5,2,5,1,1,13,
0],[0,0,2,65,11,5,2,66,1,10,15,9,0,0,2,13,10,5,2,141,1,5,-8,1,13,0],[0,3,6,103,108,111,98,97,108,10,5,2,144,1,13,0],[0,3,10,112,101,114,115,105,115,116,101,110,116,10,5,2,144,1,13,0],[0,3,3,116,114,121,10,25,2,144,10,21,2,41,10,17,0,2,68,4,10,11,0,2,117,11,5,2,5,1,1,13,0],[0,3,5,99,97,116,99,104,10,29,2,144,10,25,0,0,2,12,10,13,2,141,10,9,2,13,10,5,2,43,1,4,10,5,2,41,1,13,0],[0,2,79,10,17,2,70,10,13,2,75,10,9,2,13,10,5,2,44,1,13,0],[0,9,0,2,11,5,-2,10,7,0,2,71,7,1,13,0],[0,16,7,40,40,41,41,44,44,
59,59,37,37,123,123,125,125,11,36,0,16,1,61,61,10,9,0,16,1,61,61,7,1,11,20,2,20,11,16,3,3,46,46,46,11,9,2,72,11,5,2,73,1,13,0],[0,0,3,1,46,4,10,25,16,8,43,43,45,45,42,42,47,47,92,92,39,39,40,40,94,94,10,5,2,74,1,13,0],[0,0,2,100,11,27,3,2,38,38,11,21,3,2,124,124,11,15,16,5,38,38,124,124,94,94,64,64,58,58,1,10,5,2,74,1,13,0],[0,9,0,2,11,5,-2,10,37,0,3,3,46,46,46,11,28,0,3,1,46,10,7,16,1,48,57,1,11,15,16,5,97,122,65,90,48,57,95,95,39,39,1,1,13,0],[9,0,0,0,2,138,10,5,2,13,1,11,11,0,2,76,10,5,2,13,1,
1,5,-20,13,0],[9,0,0,2,77,11,13,17,4,44,44,59,59,32,32,10,13,1,5,-16,13,0],[0,16,3,40,40,123,123,91,91,10,17,2,78,10,13,0,16,3,41,41,125,125,93,93,4,1,13,2],[9,0,0,2,77,11,30,0,3,3,46,46,46,10,5,2,18,1,11,17,17,6,41,41,125,125,93,93,59,59,37,37,10,13,1,5,-33,13,0],[0,2,143,18,2,2,80,19,13,2],[0,3,2,105,102,11,244,3,3,102,111,114,11,237,3,3,101,110,100,11,230,3,3,116,114,121,11,223,3,4,99,97,115,101,11,215,3,6,101,108,115,101,105,102,11,205,3,4,115,112,109,100,11,197,3,5,99,97,116,99,104,11,188,3,
5,119,104,105,108,101,11,179,3,5,98,114,101,97,107,11,170,3,4,101,108,115,101,11,162,3,6,115,119,105,116,99,104,11,152,3,6,103,108,111,98,97,108,11,142,3,6,114,101,116,117,114,110,11,132,3,6,112,97,114,102,111,114,11,122,3,8,102,117,110,99,116,105,111,110,11,110,3,8,99,111,110,116,105,110,117,101,11,98,3,8,99,108,97,115,115,100,101,102,11,86,3,9,111,116,104,101,114,119,105,115,101,11,73,3,10,112,101,114,115,105,115,116,101,110,116,11,59,3,2,112,105,11,53,3,3,101,112,115,11,46,3,3,110,97,110,11,39,
3,3,78,97,78,11,32,3,3,105,110,102,11,25,3,3,73,110,102,11,18,3,1,105,11,13,3,1,106,11,8,3,3,97,110,115,1,13,0],[0,2,82,10,30,2,13,10,26,0,0,2,126,10,10,2,122,10,6,3,1,41,1,4,10,9,2,41,10,5,2,117,1,13,0],[0,3,4,115,112,109,100,10,5,2,144,1,13,0],[0,3,5,98,114,101,97,107,10,5,2,144,1,13,0],[0,3,6,114,101,116,117,114,110,10,5,2,144,1,13,0],[0,3,1,33,10,5,2,15,1,13,0],[0,3,8,99,111,110,116,105,110,117,101,10,5,2,144,1,13,0],[0,2,13,10,11,0,2,89,4,10,5,2,13,1,13,0],[0,2,13,10,9,2,89,10,5,2,13,1,13,0],
[0,0,2,131,10,31,2,13,10,27,3,1,40,10,22,2,13,10,18,2,90,10,14,3,1,41,10,9,2,13,10,5,2,87,1,11,5,2,91,1,13,0],[0,0,0,2,141,11,5,2,52,1,4,10,37,2,13,10,33,0,0,3,1,44,10,23,2,13,10,19,0,2,141,11,9,2,52,11,5,2,9,1,10,5,2,13,1,6,-27,1,13,0],[0,2,93,10,24,0,0,2,92,10,15,2,13,10,11,0,2,93,11,5,2,8,1,1,6,-18,1,13,0],[3,2,124,124,13,0],[0,2,95,10,24,0,0,2,94,10,15,2,13,10,11,0,2,95,11,5,2,8,1,1,6,-18,1,13,0],[3,2,38,38,13,0],[0,2,97,10,24,0,0,2,96,10,15,2,13,10,11,0,2,97,11,5,2,8,1,1,6,-18,1,13,0],[0,3,1,
124,10,8,0,3,1,124,7,1,13,0],[0,2,99,10,24,0,0,2,98,10,15,2,13,10,11,0,2,99,11,5,2,8,1,1,6,-18,1,13,0],[0,3,1,38,10,8,0,3,1,38,7,1,13,0],[0,2,101,10,18,0,0,2,100,10,9,2,13,10,5,2,101,1,6,-12,1,13,0],[0,0,16,4,61,61,62,62,60,60,126,126,10,7,16,1,61,61,1,11,9,16,2,60,60,62,62,1,13,0],[0,2,103,10,24,0,0,2,102,10,15,2,13,10,11,0,2,103,11,5,2,8,1,1,6,-18,1,13,0],[3,1,58,13,0],[0,2,105,10,32,2,13,10,28,0,0,2,104,10,19,2,13,10,15,0,2,105,11,5,2,8,1,10,5,2,13,1,6,-22,1,13,0],[16,2,43,43,45,45,13,0],[0,2,
107,10,22,0,0,2,13,10,13,2,106,10,9,2,13,10,5,2,107,1,6,-16,1,13,0],[0,0,3,1,46,4,10,11,16,3,42,42,47,47,92,92,1,13,0],[0,0,0,0,2,109,10,5,2,13,1,6,-8,10,5,2,110,1,11,5,2,108,1,13,0],[0,2,131,10,39,2,13,10,35,0,0,3,1,40,10,22,2,13,10,18,2,90,10,14,3,1,41,10,9,2,13,10,5,2,87,1,11,5,2,125,1,1,13,0],[16,3,126,126,43,43,45,45,13,0],[0,2,114,10,44,0,0,2,111,11,35,0,2,13,10,5,2,112,1,11,25,0,2,13,10,19,2,113,10,15,2,13,10,11,0,2,107,11,5,2,8,1,1,1,6,-38,1,13,0],[16,1,39,39,13,0],[3,2,46,39,13,0],[0,0,3,
1,46,4,10,6,3,1,94,1,13,0],[0,2,115,11,13,0,16,1,63,63,10,5,2,125,1,1,13,0],[0,2,118,11,25,2,116,11,21,2,121,11,17,2,132,11,13,2,137,11,9,2,138,11,5,2,117,1,13,0],[0,3,1,40,10,16,2,88,10,12,0,3,1,41,11,5,2,5,1,1,13,2],[0,3,3,101,110,100,10,5,2,144,1,13,0],[0,0,9,0,16,1,48,57,5,-4,10,48,0,0,16,1,46,46,10,26,0,16,5,42,42,47,47,92,92,94,94,39,39,7,10,10,0,16,1,48,57,6,-4,1,4,10,13,0,2,119,4,10,7,0,2,120,4,1,11,47,0,16,1,46,46,10,39,0,16,5,42,42,47,47,92,92,94,94,39,39,7,10,23,9,0,16,1,48,57,5,-4,10,
13,0,2,119,4,10,7,0,2,120,4,1,1,13,2],[0,16,4,101,101,69,69,100,100,68,68,10,21,0,16,2,43,43,45,45,4,10,11,9,0,16,1,48,57,5,-4,1,13,0],[0,16,2,105,105,106,106,10,5,2,144,1,13,0],[0,2,141,10,145,2,13,10,141,0,0,0,2,130,10,13,2,13,10,9,2,143,10,5,2,13,1,11,118,0,2,129,10,20,2,122,10,16,0,3,1,125,11,5,2,5,1,10,5,2,13,1,11,93,0,2,126,10,20,2,124,10,16,0,3,1,41,11,5,2,5,1,10,5,2,13,1,11,68,0,2,128,10,20,2,88,10,16,0,3,1,41,11,5,2,5,1,10,5,2,13,1,11,43,0,2,131,10,37,2,13,10,33,2,125,10,29,0,0,3,1,40,10,
16,2,124,10,12,0,3,1,41,11,5,2,5,1,1,4,10,5,2,13,1,1,6,-135,1,13,0],[0,2,13,10,47,0,2,123,11,5,2,88,1,10,37,2,13,10,33,0,0,3,1,44,10,23,2,13,10,19,0,2,123,11,9,2,88,11,5,2,8,1,10,5,2,13,1,6,-27,1,13,2],[3,1,58,13,0],[0,2,122,11,5,2,13,1,13,0],[0,2,141,10,14,0,0,2,130,10,5,2,141,1,6,-8,1,13,0],[3,1,40,13,0],[3,1,91,13,0],[3,2,46,40,13,0],[3,1,123,13,0],[3,1,46,13,0],[3,1,64,13,0],[0,3,1,91,10,24,2,13,10,20,2,133,10,16,2,13,10,12,0,3,1,93,11,5,2,5,1,1,13,2],[0,2,134,10,32,0,0,2,13,10,6,3,1,44,1,6,-9,
10,18,0,0,2,13,10,9,2,135,10,5,2,134,1,6,-12,1,13,2],[0,0,0,2,13,10,6,3,1,44,1,6,-9,10,52,2,13,10,48,0,2,145,4,10,42,0,0,0,0,2,13,10,6,3,1,44,1,6,-9,10,9,2,13,10,5,2,145,1,6,-22,10,15,0,0,2,13,10,6,3,1,44,1,6,-9,1,13,2],[9,0,0,2,13,10,5,2,136,1,5,-8,13,2],[0,3,1,59,11,9,2,16,11,5,2,30,1,13,0],[0,3,1,123,10,18,2,13,10,14,2,133,10,10,2,13,10,6,3,1,125,1,13,2],[0,2,139,11,5,2,140,1,13,0],[0,3,1,39,10,31,0,0,3,2,39,39,11,9,17,2,10,13,39,39,1,6,-14,10,12,0,3,1,39,11,5,2,10,1,1,13,2],[0,3,1,34,10,31,0,
0,3,2,34,34,11,9,17,2,10,13,34,34,1,6,-14,10,12,0,3,1,34,11,5,2,10,1,1,13,2],[0,2,143,18,2,2,142,19,13,2],[0,3,2,105,102,11,186,3,3,102,111,114,11,179,3,3,101,110,100,11,172,3,3,116,114,121,11,165,3,4,99,97,115,101,11,157,3,6,101,108,115,101,105,102,11,147,3,4,115,112,109,100,11,139,3,5,99,97,116,99,104,11,130,3,5,119,104,105,108,101,11,121,3,5,98,114,101,97,107,11,112,3,4,101,108,115,101,11,104,3,6,115,119,105,116,99,104,11,94,3,6,103,108,111,98,97,108,11,84,3,6,114,101,116,117,114,110,11,74,3,6,
112,97,114,102,111,114,11,64,3,8,102,117,110,99,116,105,111,110,11,52,3,8,99,111,110,116,105,110,117,101,11,40,3,8,99,108,97,115,115,100,101,102,11,28,3,9,111,116,104,101,114,119,105,115,101,11,15,3,10,112,101,114,115,105,115,116,101,110,116,1,13,0],[0,16,2,97,122,65,90,10,16,0,16,4,97,122,65,90,95,95,48,57,6,-10,1,13,0],[0,16,4,97,122,65,90,95,95,48,57,7],[2,146,13,0],[0,0,2,131,10,31,2,13,10,27,3,1,40,10,22,2,13,10,18,2,90,10,14,3,1,41,10,9,2,13,10,5,2,145,1,11,5,2,147,1,13,0],[0,2,148,10,22,0,
0,2,13,10,13,2,92,10,9,2,13,10,5,2,148,1,6,-16,1,13,0],[0,2,149,10,22,0,0,2,13,10,13,2,94,10,9,2,13,10,5,2,149,1,6,-16,1,13,0],[0,2,150,10,22,0,0,2,13,10,13,2,96,10,9,2,13,10,5,2,150,1,6,-16,1,13,0],[0,2,151,10,22,0,0,2,13,10,13,2,98,10,9,2,13,10,5,2,151,1,6,-16,1,13,0],[0,2,152,10,22,0,0,2,13,10,13,2,100,10,9,2,13,10,5,2,152,1,6,-16,1,13,0],[0,2,153,10,22,0,0,2,13,10,13,2,102,10,9,2,13,10,5,2,153,1,6,-16,1,13,0],[0,2,155,10,18,0,0,2,154,10,9,2,13,10,5,2,155,1,6,-12,1,13,0],[0,0,2,11,10,17,2,13,10,
13,2,104,10,9,2,11,10,5,2,13,1,11,5,2,104,1,13,0],[0,2,156,10,22,0,0,2,13,10,13,2,106,10,9,2,13,10,5,2,156,1,6,-16,1,13,0],[0,0,0,0,2,109,10,5,2,13,1,6,-8,10,5,2,158,1,11,5,2,157,1,13,0],[0,2,131,10,39,2,13,10,35,0,0,3,1,40,10,22,2,13,10,18,2,90,10,14,3,1,41,10,9,2,13,10,5,2,145,1,11,5,2,125,1,1,13,0],[0,2,159,10,44,0,0,2,111,11,35,0,2,13,10,5,2,112,1,11,25,0,2,13,10,19,2,113,10,15,2,13,10,11,0,2,156,11,5,2,8,1,1,1,6,-38,1,13,0],[0,2,160,11,13,0,16,1,63,63,10,5,2,125,1,1,13,0],[0,2,118,11,25,2,116,
11,21,2,161,11,17,2,132,11,13,2,137,11,9,2,138,11,5,2,117,1,13,0],[0,2,141,10,137,0,0,0,2,13,10,13,2,130,10,9,2,13,10,5,2,143,1,11,114,0,2,129,10,16,2,122,10,12,0,3,1,125,11,5,2,5,1,1,11,93,0,2,126,10,16,2,124,10,12,0,3,1,41,11,5,2,5,1,1,11,72,0,2,13,10,20,2,128,10,16,2,88,10,12,0,3,1,41,11,5,2,5,1,1,11,47,0,2,13,10,41,2,131,10,37,2,13,10,33,2,125,10,29,0,0,2,13,10,21,3,1,40,10,16,2,124,10,12,0,3,1,41,11,5,2,5,1,1,4,1,1,6,-131,1,13,0],[0,2,163,10,29,2,24,10,25,2,12,10,21,0,2,169,4,10,15,2,117,10,
11,2,24,10,7,0,2,32,4,1,13,0],[0,3,8,99,108,97,115,115,100,101,102,10,23,2,144,10,19,2,13,10,15,0,2,166,4,10,9,2,164,10,5,2,43,1,13,0],[0,2,125,10,26,2,13,10,22,0,0,3,1,60,10,13,2,13,10,9,2,165,10,5,2,13,1,4,1,13,0],[0,2,125,10,27,2,13,10,23,0,0,3,1,38,10,13,2,13,10,9,2,125,10,5,2,13,1,6,-17,1,13,0],[0,3,1,40,10,36,2,13,10,32,2,167,10,28,0,0,3,1,44,10,9,2,13,10,5,2,167,1,6,-13,10,10,3,1,41,10,5,2,13,1,13,0],[0,0,0,2,168,10,5,2,13,1,4,10,30,2,141,10,26,0,0,2,13,10,14,3,1,61,10,9,2,13,10,5,2,88,1,4,
10,5,2,13,1,13,0],[3,1,126,13,0],[0,0,0,2,170,11,17,2,178,11,13,2,181,11,9,2,174,11,5,2,43,1,10,9,2,24,10,5,2,12,1,6,-30,13,0],[0,3,10,112,114,111,112,101,114,116,105,101,115,10,23,2,144,10,19,2,13,10,15,0,2,166,4,10,9,2,171,10,5,2,117,1,13,0],[0,0,2,172,10,5,2,13,1,6,-8,13,0],[0,2,43,11,24,0,2,173,10,18,0,0,2,13,10,10,3,1,61,10,5,2,88,1,4,1,1,13,0],[0,2,141,10,30,0,0,2,13,10,22,2,131,10,18,2,13,10,14,0,0,2,125,10,5,2,13,1,6,-8,1,4,1,13,0],[0,3,11,101,110,117,109,101,114,97,116,105,111,110,10,23,
2,144,10,19,2,13,10,15,0,2,166,4,10,9,2,175,10,5,2,117,1,13,0],[0,0,2,176,10,5,2,13,1,6,-8,13,0],[0,2,43,11,29,0,2,141,10,23,2,13,10,19,0,0,3,1,40,10,10,2,177,10,6,3,1,41,1,4,1,1,13,0],[0,2,88,10,15,0,0,3,1,44,10,5,2,88,1,6,-9,1,13,0],[0,3,7,109,101,116,104,111,100,115,10,23,2,144,10,19,2,13,10,15,0,2,166,4,10,9,2,179,10,5,2,117,1,13,0],[0,0,2,180,10,5,2,13,1,6,-8,13,0],[0,2,43,11,32,0,2,184,10,5,2,24,1,11,22,0,0,0,3,3,101,110,100,10,5,2,144,1,7,10,5,2,35,1,1,13,0],[0,3,6,101,118,101,110,116,115,
10,23,2,144,10,19,2,13,10,15,0,2,166,4,10,9,2,182,10,5,2,117,1,13,0],[0,0,2,183,10,5,2,13,1,6,-8,13,0],[0,0,0,2,141,10,31,2,13,10,27,0,0,3,1,40,10,18,2,13,10,14,2,125,10,10,2,13,10,6,3,1,41,1,4,1,4,10,5,2,43,1,13,0],[0,3,8,102,117,110,99,116,105,111,110,10,25,2,144,10,21,2,13,10,17,2,35,10,13,2,185,10,9,2,24,10,5,2,34,1,13,0],[0,0,2,12,10,23,0,2,186,11,17,2,184,11,13,0,0,2,188,7,10,5,2,187,1,1,1,6,-26,13,0],[0,2,13,10,15,9,0,0,2,42,10,5,2,13,1,5,-8,1,13,0],[0,2,12,10,15,0,2,30,11,5,2,17,1,10,5,2,
22,1,13,0],[26,13,0]]}})},"MW/rtc/model/importers/PEG":function(){define(["dojo/_base/declare"],function(g){return g(null,{constructor:function(f,e,d){this.rules=e;this.names=f;this.root=d},my_strcmp:function(f,e,d,b,a){if(d+a>e)return!1;f=f.substring(d,d+a);e="";for(d=0;d<a;d+=1)e+=String.fromCharCode(b[d]);return f===e},recordRule:function(f,e,d,b,a,c,h,k,g){k=h.length;f[d-1]=0===e&&1===k?h:[{name:b,start:a,end:c,children:h}]},joinRecords:function(f,e){var d=f.length,b=f.pop();1<d&&(0<b.length&&
e)&&(f[d-2]=f[d-2].concat(b))},pretty:function(f,e,d,b){4>arguments.length&&(b="long");3>arguments.length&&(d="");var a=d;if(f){var c=f.children;if(c){var h=String.fromCharCode(10);"short"===b&&(a+="(");a+=this.names[f.name];if("long"===b){var k=e.substring(f.start,f.end),k=k.replace(h,""),k=k.replace(/^[ ]*/,"");10<k.length&&(k=k.substring(0,10)+"...");a=a+" "+k+h}if(0===c.length&&"short"===b)a+=" "+f.start.toString()+" "+f.end.toString()+")";else{for(h=0;h<c.length;h+=1)a="long"===b?a+this.pretty(c[h],
e,d+" ",b):a+(" "+this.pretty(c[h],e,d,b));"short"===b&&(a+=")")}}}return a},parse:function(f){var e=this.rules,d=this.root,b=f.length,a=0,c=0,h=[],k=0,g=[],m=[],p=[],n=[],q=!0;m.push(0,0,d);var r=[];n.push(r);h=e[d];for(k=h.length;0<m.length;)if(d=m.length,c>=k)3<d&&(h=e[m[d-4]],k=h.length,c=m[d-2],d=g.pop(),q||(a=d),this.joinRecords(n,q)),m.pop(),m.pop(),m.pop();else{var d=h[c],s;switch(d){case 0:g.push(a);n.push(r);c+=1;break;case 1:d=g.pop();q||(a=d);this.joinRecords(n,q);c+=1;break;case 2:d=
h[c+1]-1;c+=2;h=e[d];k=h.length;g.push(a);n.push(r);m.push(a,c,d);c=0;break;case 3:s=h[c+1];(q=this.my_strcmp(f,b,a,h.slice(c+2),s))&&(a+=s);c+=s+2;break;case 4:d=g.pop();q||(a=d);this.joinRecords(n,q);q=!0;c+=1;break;case 5:q&&0<g[g.length-2]?(c+=h[c+1],g[g.length-1]=a):q?(c+=h[c+1],g[g.length-1]=a,g[g.length-2]=1,this.joinRecords(n,q),n.push(r)):(c+=2,a=g[g.length-1],q=0<g[g.length-2],g.pop(),g.pop(),this.joinRecords(n,q));break;case 6:this.joinRecords(n,q);q?(c+=h[c+1],g[g.length-1]=a,n.push(r)):
(c+=2,a=g.pop(),q=!0);break;case 7:case 8:7===d&&(q=!q);a=g.pop();this.joinRecords(n,!1);c+=1;break;case 9:g.push(0);c+=1;break;case 10:this.joinRecords(n,q);q?(c+=2,n.push(r)):(a=g.pop(),c+=h[c+1]);break;case 11:this.joinRecords(n,q);q?(g.pop(),c+=h[c+1]):(c+=2,n.push(r));break;case 12:case 15:a>=b?q=!1:(q=String.fromCharCode(h[c+1]),q=f[a]===q);q&&(a+=1);c+=2;break;case 13:if(q){d=h[c+1];s=m[m.length-1];var t=0;0<g.length&&(t=g[g.length-1]);var u=n.length,v=n[u-1],w=[];1<u&&(w=n[u-2]);this.recordRule(n,
d,u,s,t,a,v,w,r)}c+=2;break;case 14:q=!0;c+=1;break;case 16:case 17:s=h[c+1];t=c+2;c+=2+2*s;if(a>=b)q=!1;else{for(u=f.charCodeAt(a);s&&!(s-=1,q=h[t],t+=1,v=h[t],t+=1,q=u>=q&&u<=v););17===d&&(q=!q)}q&&(a+=1);break;case 18:q?(p.push(f),b=g[g.length-1],f=f.substring(b),b=a-b,a=0,c+=2):(c+=3+h[c+1],a=g.pop(),this.joinRecords(n,q));break;case 19:d=g.pop();a!==b||!q?(a=d+b,q=!0):(a=d,q=!1);f=p.pop();b=f.length;this.joinRecords(n,!1);c+=1;break;case 21:(q=a<b)&&(a+=1);c+=1;break;case 26:q=a===b,c+=1}}return q&&
0<n.length&&0<n[0].length?{tree:n[0][0],str:f}:{tree:null,str:f}}})})},"MW/rtc/plugins/embeddedoutputs/model/SplitterPositionModelProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./SplitterPositionModel"],function(g,f,e){return g(f,{requires:function(){return{isApplicable:[],createInstance:["rtc.backingstore"]}},createInstance:function(d){return new e(d)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/embeddedoutputs/model/SplitterPositionModel":function(){define(["dojo/_base/declare",
"dojo/_base/lang","mw-filename-utils/FileNameUtil","MW/rtc/datamodel/FileBackingStoreUtilities"],function(g,f,e,d){return g(null,{_DEFAULT_RIGHT_PANEL_PROPORTION:0.4,constructor:function(b){this._backingStore=b;this._updatedRightPanelProportion=null;this._handleNewScript()},_handleNewScript:function(){e.locationFromPath(d.getAbsoluteFilePathFromBackingStore(this._backingStore))||(this._updatedRightPanelProportion=this._DEFAULT_RIGHT_PANEL_PROPORTION)},loadSplitterPosition:function(b){b.metaData.splitterState?
this.setRightPanelProportion(parseFloat(b.metaData.splitterState.proportion)):this.setDefaultRightPanelProportion();this.onLoaded()},setDefaultRightPanelProportion:function(){this.setRightPanelProportion(this._DEFAULT_RIGHT_PANEL_PROPORTION)},onLoaded:function(){},setRightPanelProportion:function(b){this._updatedRightPanelProportion=b},getRightPanelProportion:function(){return null!==this._updatedRightPanelProportion?this._updatedRightPanelProportion:this._DEFAULT_RIGHT_PANEL_PROPORTION},hasSplitterPosition:function(){return null!==
this._updatedRightPanelProportion},destroy:function(){}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/error/ErrorOutputHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./ErrorOutputHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.outputhandlerservice","rtc.diagnosticmessage","rtc.embeddedoutputs.linenumbertracker"]}},createInstance:function(d,b,a){b=new e(b,a);d.registerOutputPlugin(b);return b},destroyInstance:function(d){d.destroy()}})})},
"MW/rtc/plugins/embeddedoutputs/outputhandlers/error/ErrorOutputHandler":function(){define("dojo/_base/declare dojo/_base/lang MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseOutputHandler MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerResult MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerResultInstruction MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerUtility ./ErrorOutput ./ErrorOutputProperties".split(" "),function(g,f,e,d,b,a,c,h){return g([e],{OUTPUT_TYPE:h.OUTPUT_TYPE,
constructor:function(a,c){this._diagnosticMessageFormatter=a;this._lineNumberTracker=c},getOutputFromData:function(a,e){a=f.clone(a);this._cleanData(a);var h=new c({data:a,diagnosticMessageFormatter:this._diagnosticMessageFormatter,lineNumberTracker:this._lineNumberTracker});return new d(b.ADD_OUTPUT,h)},_cleanData:function(c){var b=a.removeControlCharacters(c.text);c.text=a.processBackspaceCharacters(b)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseOutputHandler":function(){define(["dojo/_base/declare",
"MW/rtc/abstract/AbstractPlugin"],function(g,f){return g(f,{OUTPUT_TYPE:null,constructor:function(){},getOutputFromData:function(e,d){throw Error("Unimplemented API: MW.rtc.plugins.embeddedoutputs.outputhandlers.BaseOutputHandler.getOutputFromData()");}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerResult":function(){define(["dojo/_base/declare"],function(g){return g(null,{constructor:function(f,e){this._output=e;this._instruction=f},getOutput:function(){return this._output},getInstruction:function(){return this._instruction}})})},
"MW/rtc/plugins/embeddedoutputs/codegen/CodeGenFactoryProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/embeddedoutputs/codegen/CodeGenFactory"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.embeddedoutputs.model rtc.code.sections.model rtc.code.sections.stale.model rtc.document rtc.internaldocument rtc.clipboard rtc.focusservice rtc.cursor rtc.embeddedoutputs.statehandler rtc.embeddedoutputs rtc.cursorcontroller".split(" ")}},
createInstance:function(d,b,a,c,h,f,g,m,p,n,q){var r={};r.embeddedOutputsModel=d;r.sectionModel=b;r.staleSectionModel=a;r.document=c;r.internalDocument=h;r.clipboard=f;r.focusService=g;r.cursor=m;r.stateHandler=p;r.embeddedOutputsView=n.getEmbeddedOutputsView();r.cursorController=q;return new e(r)}})})},"MW/rtc/plugins/embeddedoutputs/codegen/CodeGenFactory":function(){define(["dojo/_base/declare","MW/rtc/plugins/embeddedoutputs/codegen/EditorCodeGenerator","MW/rtc/plugins/embeddedoutputs/codegen/EditorDocumentProxy"],
function(g,f,e){return g(null,{_editorDocumentProxy:null,constructor:function(d){this._editorDocumentProxy=new e({_sectionModel:d.sectionModel,_staleSectionModel:d.staleSectionModel,_clipboard:d.clipboard,_document:d.document,_internalDocument:d.internalDocument,_embeddedOutputsModel:d.embeddedOutputsModel,_focusService:d.focusService,_cursor:d.cursor,_cursorController:d.cursorController,_embeddedOutputsView:d.embeddedOutputsView});this._embeddedOutputsDependencies={stateHandler:d.stateHandler,embeddedOutputsModel:d.embeddedOutputsModel,
embeddedOutputsView:d.embeddedOutputsView}},createEditorCodeGenerator:function(){var d=new f;d.setEditorDocumentProxy(this._editorDocumentProxy);d.setEmbeddedOutputsDependencies(this._embeddedOutputsDependencies);return d}})})},"MW/rtc/plugins/embeddedoutputs/codegen/EditorCodeGenerator":function(){define("dojo/_base/declare dojo/on dojo/_base/lang dojo/i18n!l10n/nls/actions dojo/dom-style MW/rtc/plugins/embeddedoutputs/codegen/CodeGenWidget dojo/dom-geometry dojo/dom-class dojo/Evented dojo/aspect MW/rtc/plugins/undoredo/commands/CodeGenInteractionCommand".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m){return g([a,k],{_clipboard:null,_output:null,_generatedCode:null,_insertedCode:null,_editorDocumentProxy:null,_stalenessChangeListener:null,_outputPositions:null,_shouldForceDisablement:!1,_stateHandler:null,_embeddedOutputsModel:null,_embeddedOutputsView:null,_enablementConditionCallback:null,_wasDestroyed:!1,_stateHandlerAspects:null,_documentEditedTooltip:d.disableWhenDocumentEdited,_DISABLED_WHILE_RUNNING_TOOLTIP:d.disabledDuringExecution,_CODEGEN_INTERACTION:"CodeGenInteraction",
_MIN_TOP:3,_MAX_TOP:13,_IMAGE_PATH:require.toUrl("images/"),_overrideInlinePosition:!1,_DISABLED_WHILE_READONLY_TOOLTIP:d.disableWhenReadOnly,constructor:function(){this._stateHandlerAspects=[]},postCreate:function(){this.inherited(arguments);this.disableUpdateCodeBtn(this._DISABLED_WHILE_RUNNING_TOOLTIP)},setEditorDocumentProxy:function(a){this._editorDocumentProxy=a;a=this._editorDocumentProxy.getInternalDocument();void 0!==a&&null!==a&&this.own(l.after(a,"readOnlyChanged",e.hitch(this,"_readOnlyStateChangedHandler"),
!0));this._stalenessChangeListener=f(this._editorDocumentProxy,"stalenessChange",e.hitch(this,"_documentEdited"))},_readOnlyStateChangedHandler:function(a){a?this._updateButtonTooltip.label||(this.disableUpdateCodeBtn(this._DISABLED_WHILE_READONLY_TOOLTIP),this.disableCopyBtn()):!this._wasDestroyed&&this._updateButtonTooltip.label===this._DISABLED_WHILE_READONLY_TOOLTIP&&(this.enableUpdateCodeBtn(),this.enableCopyBtn())},setCodeGenDependencies:function(a){this._output=a.output;this._outputPositions=
a.outputPositions;a.overrideInlinePosition&&(this._overrideInlinePosition=a.overrideInlinePosition)},updateWidget:function(a,c,b,d){if(b)this.detach();else if(c&&0<c.length){d&&this.attach(a);this.setGeneratedCode(c);var e=this;this._deferredObj?(a=this._deferredObj.promise)&&!a.isResolved()?a.then(function(){e.updateCodeArea()}):this.updateCodeArea():this.updateCodeArea()}},updateCodeArea:function(){this.setText(this.combineCodeLines(this._generatedCode))},setGeneratedCode:function(a){this._generatedCode=
a},combineCodeLines:function(a){for(var c=a[0],b=1;b<a.length;b++)c=c+"\n"+a[b];return c},_canEnableCodeBtn:function(){return!this._shouldForceDisablement},_documentEdited:function(a){if(!this._isUpdateCodeButtonDisabled()&&(this._output.codeLinePositions&&0!==this._output.codeLinePositions.length)&&a){var c=this._editorDocumentProxy.getSectionNumberForNode(this._output.codeLinePositions[this._output.codeLinePositions.length-1].node);a.forEach(function(a){c===this._editorDocumentProxy.getSectionNumberForNode(a)&&
(this.disableUpdateCodeBtn(this._documentEditedTooltip),this._shouldForceDisablement=!0)},this)}},_insertGeneratedCode:function(){var a=this._generatedCode;if(a&&0!==a.length){var c=this._output.codeLinePositions[this._output.codeLinePositions.length-1].line+1;a.unshift("");var b=this.combineCodeLines(a);if(this._insertedCode){var d=this._insertedCode[this._insertedCode.length-1].length,c=c-this._insertedCode.length;this._editorDocumentProxy.replaceCode(b,c+1,c+this._insertedCode.length,d+1)}else this._editorDocumentProxy.insertCode("\n"+
b,c);this._insertedCode=this._generatedCode;this._editorDocumentProxy.remapInjectedCodeLinesToOutputs(this._output,this._generatedCode.length,c);this._editorDocumentProxy.setCursor(c+a.length,a[a.length-1].length+1,!0)}},_updateBtnClick:function(a){var c=this._editorDocumentProxy.getDocument();c.startEdit();this._insertGeneratedCode();this._addInteractionsToUndoRedo(c);c.endEdit();this.detach();a.stopPropagation();this._editorDocumentProxy.setDocumentFocus();this._embeddedOutputsView.outputChanged()},
_addInteractionsToUndoRedo:function(a){var c={interactionType:this._CODEGEN_INTERACTION,imgNode:this._previousDomNode},b=this;a.undoable(function(a){a.appendCommand(new m(b,c))})},copyBtnClick:function(){var a=this.inherited(arguments);this._editorDocumentProxy.copyCode(a);event.stopPropagation()},destroy:function(){this.inherited(arguments);this._stalenessChangeListener&&this._stalenessChangeListener.remove();this._stateHandlerAspects.forEach(function(a){a.remove()});this._stateHandlerAspects=[];
this._wasDestroyed=!0},attach:function(a){this.inherited(arguments);this.containerNode&&this.containerNode.parentNode&&(this._setCodeGenButtonState(),this._setCodeGenLayout(a),this._setCodeGenTopMargin(a));return this._deferredObj.promise},_setCodeGenTopMargin:function(a){0===this._getBottomRef(a)?(h.add(this.containerNode,"noTopMargin"),h.remove(this.containerNode,"addTopMargin")):(h.add(this.containerNode,"addTopMargin"),h.remove(this.containerNode,"noTopMargin"))},_setCodeGenButtonState:function(){var a=
this._editorDocumentProxy.getInternalDocument();void 0!==a&&null!==a&&this._readOnlyStateChangedHandler(a.isReadOnly())},_setCodeGenLayout:function(a){a=c.position(a).w;this._overrideInlinePosition||this.changeCodeGenLayout(a)},changeCodeGenLayout:function(a){this.containerNode&&(void 0!==a&&(null!==a&&"number"===typeof a)&&this._setCodeGenWidgetWidth(a),this._doInlineElementResize())},_setCodeGenWidgetWidth:function(a){this.containerNode.parentNode&&this.isInline(this.containerNode.parentNode)&&
b.set(this.containerNode,"width","calc(100% - "+(a+10)+"px)")},resizeCodeGen:function(){this.inherited(arguments);this._setCodeGenPosition()},_getRefPosition:function(){var a=this._outputPositions,c;if(Array.isArray(a))c=Array.isArray(a[0])?a[0]:a;else if(!a||0===a.length)c=[0,0,1,1],a=[c];a.forEach(function(a){a[1]>=c[1]&&(c=a)});return this._getRefPlotBox(c)},_setCodeGenPosition:function(){var a=this._getTopForElement(this.arrowImgNode);b.set(this.containerNode,{top:a+"px"})},_getElementBounds:function(a){a=
c.position(a);return{width:a.w,height:a.h,left:a.x,top:a.y}},_getTopRef:function(){var a=this._getRefPosition(),c=this._getElementBounds(this._previousDomNode);return a.yLow-c.top},_getBottomRef:function(a){var c=this._getRefPosition();a=this._getElementBounds(a);return c.yHigh-(a.top+a.height)},_getRefPlotBox:function(a){var b=c.position(this._previousDomNode);return{xLow:a[0]*b.w+b.x,xHigh:(a[0]+a[2])*b.w+b.x,yLow:b.h-(a[1]+a[3])*b.h+b.y,yHigh:b.h-a[1]*b.h+b.y}},_getTopForElement:function(a){var c=
this._getTopRef();a=this._getElementBounds(a).height+this._MAX_TOP;c-=a;c<this._MIN_TOP+2?c=this._MIN_TOP+2:c>this._MAX_TOP&&(c=this._MAX_TOP);return c},setEnablementCondition:function(a,c){this._enablementConditionCallback=a;this._disableUpdateCodeBtnTooltipMessage=c},setEmbeddedOutputsDependencies:function(a){this._stateHandler=a.stateHandler;this._embeddedOutputsModel=a.embeddedOutputsModel;this._embeddedOutputsView=a.embeddedOutputsView;this._stateHandlerAspects.push(this._stateHandler.attachListener(this._stateHandler.CHANGE_TYPE_ENUM.EVAL_INITIALIZED,
e.hitch(this,"_handleEvaluationStart")));this._stateHandlerAspects.push(this._stateHandler.attachListener(this._stateHandler.CHANGE_TYPE_ENUM.EVAL_COMPLETE,e.hitch(this,"_handleEvaluationEnd")));this.own(f(this.containerNode,this._eventName,e.hitch(this,function(a){this._embeddedOutputsView.outputChanged()})))},_handleEvaluationStart:function(){this._updateButtonTooltip.label||(this.disableUpdateCodeBtn(this._DISABLED_WHILE_RUNNING_TOOLTIP),this.disableCopyBtn())},_handleEvaluationEnd:function(){var a=
e.hitch(this,function(){!this._wasDestroyed&&this._updateButtonTooltip.label===this._DISABLED_WHILE_RUNNING_TOOLTIP&&(!this._enablementConditionCallback||this._enablementConditionCallback()?this.enableUpdateCodeBtn():this.disableUpdateCodeBtn(this._disableUpdateCodeBtnTooltipMessage),this.enableCopyBtn())});this._embeddedOutputsModel.whenOutputsReady(a)}})})},"MW/rtc/plugins/embeddedoutputs/codegen/CodeGenWidget":function(){define("dojo/dom-style dojo/_base/declare dojo/dom-class dojo/dom-attr dojo/window dojo/on dojo/touch dojo/_base/lang dojo/dom-construct dijit/_WidgetBase dijit/_TemplatedMixin dojo/text!./templates/CodeGenWidget.html dojo/i18n!l10n/nls/actions dijit/Tooltip dojo/fx dojo/fx/easing dojo/Deferred dojo/has mw-html-utils/HtmlUtils dojo/NodeList-traverse".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v){var w=!0;return f([l,m],{baseClass:"codeGen",templateString:p,_MAX_TEXT_SIZE:6,_MIN_TEXT_SIZE:1,_TOOLTIP_SHOW_DELAY:0,_TOOLTIP_HIDE_DELAY:100,_MIN_CODE_WIDTH:10,_updateCodeHandler:null,_copyLabel:n.copyLabel,_codeLabel:n.codeLabel,_updateCodeLabel:n.updateCodeLabel,_isCodeExpanded:!1,_updateButtonTooltip:null,_codeGenAreaSlideAnim:null,_codeDivMinWidth:0,_animationDuration:300,_windowMouseMoveListener:null,_windowMouseUpListener:null,_arrowImgPath:require.toUrl("images/"),
_previousDomNode:null,_animationCompleteEvent:document.createEvent("CustomEvent"),_eventName:"AnimationDone",_deferredObj:null,_HAS_POINTER_EVENTS:window.PointerEvent,postCreate:function(a){this.inherited(arguments);this.setArrowImagePath(this._getImageUrl());this._addEventHandlers();this._setupTooltip();this._animationCompleteEvent.initEvent(this._eventName,!0,!0)},_getImageUrl:function(){var a=v.parseUrl(this._IMAGE_PATH);return a.protocol+"//"+a.hostname+":"+a.port+a.pathname},attach:function(a){if(this.containerNode&&
this.containerNode.parentNode&&this._previousDomNode===a)return null;this._deferredObj=new t;this._previousDomNode=a;k.place(this.containerNode,this._previousDomNode,"after");0===this._codeDivMinWidth&&(this._codeDivMinWidth=g.get(this.codeDiv,"min-width"));this._setBusyIndicator();this.toggleCode();return this._deferredObj.promise},detach:function(){this.containerNode&&this.containerNode.parentNode&&this.containerNode.parentNode.removeChild(this.containerNode)},destroy:function(){this.inherited(arguments);
this._updateCodeHandler&&this._updateCodeHandler.remove();this._windowMouseMoveListener&&this._windowMouseMoveListener.remove()},setArrowImagePath:function(a){this._arrowImgPath=a;this._updateArrowImageSrc()},_updateArrowImageSrc:function(){d.set(this.arrowImgNode,"src",this._arrowImgPath+"BlueArrow.png")},_WindowButtonMouseMove:function(a){d.set(this.textarea,"readOnly",!1);a.stopPropagation()},_WindowButtonMouseUp:function(a){d.set(this.textarea,"readOnly",!0);this._windowMouseMoveListener.pause();
window.removeEventListener(this._HAS_POINTER_EVENTS?"pointerup":"mouseup",this._windowMouseUpListener,!0);a.stopPropagation()},_addEventHandlers:function(){this.own(a(this.codeDiv,"click",h.hitch(this,"_setToggleAction")));this._updateCodeHandler=a.pausable(this.updateBtn,"click",h.hitch(this,"_updateBtnClick"));this.own(a(this.copyBtn,"click",h.hitch(this,"copyBtnClick")));this.own(a(this.containerNode,c.press,h.hitch(this,function(a){a.stopPropagation()})));this.own(a(this.textarea,"click",h.hitch(this,
function(a){a.stopPropagation()})));this.own(a(this.textarea,"dragstart",function(a){dojo.stopEvent(a)}));this.own(a(this.textarea,"dragend",function(a){dojo.stopEvent(a)}));this.own(a(this.textarea,c.press,h.hitch(this,function(b){this._windowMouseMoveListener||(this._windowMouseMoveListener=a.pausable(window,c.move,h.hitch(this,"_WindowButtonMouseMove")));this._windowMouseMoveListener.resume();this._windowMouseUpListener=h.hitch(this,"_WindowButtonMouseUp");window.addEventListener(this._HAS_POINTER_EVENTS?
"pointerup":"mouseup",this._windowMouseUpListener,!0);b.stopPropagation()})));this.own(a(this.textarea,"keydown",h.hitch(this,function(a){this._isCopyKeyDownEvent(a)||a.preventDefault()})));this.own(a(this.containerNode,"mousewheel",h.hitch(this,function(a){a.stopPropagation()})));this.own(a(this.containerNode,c.release,h.hitch(this,function(a){a.stopPropagation()})));this.own(a(this.updateBtn,c.leave,h.hitch(this,function(a){this.isValidLeaveEvent(a)&&q.hide(this.updateBtn)})));(u("trident")||u("ie")||
u("edge"))&&this.own(a(this.textarea,"selectstart",function(a){a.stopPropagation()}))},_isCopyKeyDownEvent:function(a){if("keydown"===a.type){var c=this._getKeyCode(a);return c&&67===c&&(a.ctrlKey||a.metaKey)}},_getKeyCode:function(a){return a.which?a.which:a.keyCode?a.keyCode:a.charCode?a.charCode:a.key?a.key:null},isValidLeaveEvent:function(a){return!(a.relatedTarget&&e.contains(a.relatedTarget,"dijitTooltipConnector"))},_setupTooltip:function(){this._updateButtonTooltip=new q({connectId:this.updateBtn,
position:["below","before","after","above"],showDelay:this._TOOLTIP_SHOW_DELAY,hideDelay:this._TOOLTIP_HIDE_DELAY})},_setCodeGenSlideInTransition:function(){g.set(this.codeGenArea,"display","none");var c=this;this._codeGenAreaSlideAnim=r.wipeIn({node:this.codeGenArea,duration:this._animationDuration,easing:s.linear,beforeBegin:function(){d.set(c.arrowImgNode,"src",c._arrowImgPath+"BlueArrowUp.png");e.add(c.codeGenArea,"expanded")}});a(this._codeGenAreaSlideAnim,"End",function(){c.containerNode&&(c._doInlineElementResize(),
c.containerNode.dispatchEvent(c._animationCompleteEvent),c._scrollCodeGenToView(),void 0!==c._deferredObj&&null!==c._deferredObj&&c._deferredObj.resolve("success"))},!0);this._codeGenAreaSlideAnim.play()},_setCodeGenSlideOutTransition:function(){var c=this;g.set(this.codeGenArea,"display","block");this._codeGenAreaSlideAnim=r.wipeOut({node:this.codeGenArea,duration:this._animationDuration,easing:s.linear});a(this._codeGenAreaSlideAnim,"End",function(){c.containerNode&&(d.set(c.arrowImgNode,"src",
c._arrowImgPath+"BlueArrow.png"),e.remove(c.codeGenArea,"expanded"),c._doInlineElementResize(),c.containerNode.dispatchEvent(c._animationCompleteEvent),void 0!==c._deferredObj&&null!==c._deferredObj&&c._deferredObj.resolve("success"))},!0);this._codeGenAreaSlideAnim.play()},toggleCode:function(){w?this._showCode():this._hideCode()},_setToggleAction:function(){this._isCodeExpanded?this._hideCode():this._showCode()},_hideCode:function(){this._isCodeExpanded=w=!1;this._setCodeGenSlideOutTransition()},
_showCode:function(){this._isCodeExpanded=w=!0;this._setCodeGenSlideInTransition()},_updateLayout:function(){var a=0,c=this._MIN_TEXT_SIZE,b=this.textarea.value.split("\n"),a=b.length,d=0;a>this._MAX_TEXT_SIZE?(c=this._MAX_TEXT_SIZE,d=parseInt(g.get(this.textarea,"font-size"))/2):a>this._MIN_TEXT_SIZE&&(c=a);this.textarea.rows=c;this.textarea.scrollTop=d;this._setCodeAreaWidth(b);g.set(this.codeGenArea,"height",c+2.7+"rem")},_setCodeAreaWidth:function(a){a=a.sort(function(a,c){return c.length-a.length})[0].length/
2+2;a>this._MIN_CODE_WIDTH&&g.set(this.codeGenArea,"min-width",a+"rem");this._doInlineElementResize()},copyBtnClick:function(){return this.getSelectedText()},getSelectedText:function(){var a={text:"",html:""};if("selectionStart"in this.textarea)this.textarea.selectionStart!=this.textarea.selectionEnd&&(a.text=this.textarea.value.substring(this.textarea.selectionStart,this.textarea.selectionEnd));else{var c=document.selection.createRange();c.parentElement()===this.textarea&&(a.text=c.text)}""===a.text&&
(a.text=this.textarea.value);this.textarea.selectionStart=this.textarea.selectionEnd;return a},setText:function(a){e.remove(this.textarea,"codegenprogressbar");void 0!==a&&(null!==a&&"string"===typeof a)&&(this.textarea.value=a,this._updateLayout())},_updateBtnClick:function(a){},_setBusyIndicator:function(){""===this.textarea.value&&e.add(this.textarea,"codegenprogressbar")},disableUpdateCodeBtn:function(a){e.add(this.updateBtn,"disabled");this._updateCodeHandler.pause();this._updateButtonTooltip.label=
a},enableUpdateCodeBtn:function(){this._canEnableCodeBtn()&&(this._updateButtonTooltip.label="",e.remove(this.updateBtn,"disabled"),this._updateCodeHandler.resume())},disableCopyBtn:function(){this.copyBtn.disabled=!0},enableCopyBtn:function(){this.copyBtn.disabled=!1},_canEnableCodeBtn:function(){return!0},_isUpdateCodeButtonDisabled:function(){return e.contains(this.updateBtn,"disabled")},_scrollCodeGenToView:function(){b.scrollIntoView(this.containerNode)},disable:function(){e.add(this.containerNode,
"disabled")},enable:function(){e.remove(this.containerNode,"disabled")},_doInlineElementResize:function(){this.containerNode.parentNode&&this.isInline(this.containerNode.parentNode)&&this.resizeCodeGen()},resizeCodeGen:function(){var a=g.get(this.containerNode,"width");this._codeDivMinWidth>a?(e.add(this.codeLabel,"hideLabel"),e.add(this.codeDiv,"diminishCode")):(e.remove(this.codeLabel,"hideLabel"),e.remove(this.codeDiv,"diminishCode"));g.get(this.codeGenArea,"width")>a&&this._isCodeExpanded?(e.add(this.codeDiv,
"outlineBorder"),e.add(this.codeGenArea,"outerBorder")):(e.remove(this.codeDiv,"outlineBorder"),e.remove(this.codeGenArea,"outerBorder"))},isInline:function(a){for(a=a.parentNode;a&&a!==document;){if(e.contains(a,"inlineElement"))return!0;a=a.parentNode}return!1},isCodeGenAttached:function(){return this.containerNode&&this.containerNode.parentNode}})})},"MW/rtc/plugins/undoredo/commands/CodeGenInteractionCommand":function(){define(["dojo/_base/declare","mw-log/Log","MW/rtc/plugins/undoredo/commands/CommandInterface"],
function(g,f,e){return g(e,{_codeGen:null,_clientEventArgs:null,constructor:function(d,b){this._codeGen=d;this._clientEventArgs=b},execute:function(){this._codeGen.detach()},unexecute:function(){this._codeGen.containerNode&&this._codeGen.attach(this._clientEventArgs.imgNode)}})})},"MW/rtc/plugins/embeddedoutputs/codegen/EditorDocumentProxy":function(){define("dojo/_base/declare dojo/_base/lang dojo/Evented dojo/aspect MW/rtc/model/DocumentUtilities MW/rtc/model/Range MW/rtc/plugins/cutcopypaste/CutCopyPasteService".split(" "),
function(g,f,e,d,b,a,c){return g(e,{_sectionModel:null,_staleSectionModel:null,_clipboard:null,_document:null,_internalDocument:null,_embeddedOutputsModel:null,_focusService:null,_documentStaleEditAspect:null,_cursor:null,_cursorController:null,constructor:function(a){f.mixin(this,a);this._staleSectionModel&&(this._documentStaleEditAspect=d.after(this._staleSectionModel,"onModelUpdated",f.hitch(this,"_documentEdited"),!0))},setDocumentFocus:function(){this._focusService.setFocus()},getInternalDocument:function(){return this._internalDocument},
_documentEdited:function(a){this.emit("stalenessChange",a)},getDocument:function(){return this._document},insertCode:function(a,c){this._staleSectionModel&&this._documentStaleEditAspect.remove();var b=this._document.getLineText(c);this._document.insertText(a,c,b.length+1);this._staleSectionModel&&(this._documentStaleEditAspect=d.after(this._staleSectionModel,"onModelUpdated",f.hitch(this,"_documentEdited"),!0))},setCursor:function(a,c,b){this._cursorController.clearSelection();this._cursor.setLineColumn(a,
c,b)},replaceCode:function(a,c,b,e){this._staleSectionModel&&this._documentStaleEditAspect.remove();this._document.replaceText(a,c,1,b,e);this._staleSectionModel&&(this._documentStaleEditAspect=d.after(this._staleSectionModel,"onModelUpdated",f.hitch(this,"_documentEdited"),!0))},copyCode:function(a){c.copyContent(this._clipboard,a)},getSectionNumberForNode:function(a){return this._sectionModel.getSectionNumberForNode(a)},remapInjectedCodeLinesToOutputs:function(c,b,d){b=this._addGeneratedCodeLinePositions(c.codeLinePositions,
d,b);c.codeLinePositions=b;b=b[b.length-1];d=this._embeddedOutputsModel.addRegionForPosition(b);this._embeddedOutputsModel.setReplacementRange(new a(b,b));this._embeddedOutputsModel.updateOutputAssociations(c,d);this._embeddedOutputsModel.clearReplacementRange()},_addGeneratedCodeLinePositions:function(a,c,b){var d=[];a.forEach(function(a){a.line>c-1?a.destroy():d.push(a)});a=d;for(var e=0;e<b;e++){var f=this._internalDocument.getLineNode(c+e);0<f.getText().length&&(f=this._document.createLinePosition(f,
!1),a.push(f))}return a}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseText2HTMLProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseText2HTML"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseText2HTML":function(){define("dojo/_base/declare dojo/dom-construct dojo/query MW/rtc/plugins/export/html/HTMLOutputUtilities MW/rtc/plugins/export/OutputNodeExporterInterface dojo/text!MW/rtc/plugins/embeddedoutputs/view/css/errorOutput.css dojo/text!MW/rtc/plugins/embeddedoutputs/view/css/textOutput.css dojo/text!MW/rtc/plugins/embeddedoutputs/view/css/warningOutput.css dojo/text!MW/rtc/plugins/language/matlab/diagnosticmessage/css/diagnosticMessage.css".split(" "),
function(g,f,e,d,b,a,c,h,k){return g([b],{constructor:function(){this._firstVisit=!0},getApplicableDomNodeClasses:function(){return["embeddedOutputsWarningElement","embeddedOutputsVariableStringElement","embeddedOutputsTextElement","embeddedOutputsErrorElement"]},reset:function(){this._firstVisit=!0},enter:function(b,e,f){this._firstVisit&&(b.addCSSToStyle(d.cleanUpCSS(a+h+k+c)),this._firstVisit=!1);e=d.removeElementsWithClass(e,".doNotExport");e=this._removeMATLABLinks(e);b.addToBody(e.outerHTML);
return!0},_removeMATLABLinks:function(a){var c=e("a",a);if(0===c.length)return a;for(var b=0,d=a.cloneNode(!0),c=e("a",d),b=0;b<c.length;b+=1)"matlab:"===c[b].href.substring(0,7)&&(a=document.createTextNode(c[b].textContent),f.place(a,c[b],"replace"));return d}})})},"MW/rtc/plugins/export/html/HTMLOutputUtilities":function(){define(["dojo/dom-construct","dojo/dom-style","dojo/query"],function(g,f,e){return{_ELEMENT_NODE:1,cleanUpCSS:function(d){return d.replace(/\n|.rtePane /g,"").replace(/}/g,"}\n")},
removeElementsWithClass:function(d,b){var a,c;a=e(b,d);return 0<a.length?(c=d.cloneNode(!0),a=e(b,c),a.forEach(function(a){g.destroy(a)}),c):d},convertToInlineStyles:function(d,b){if(b.nodeType===this._ELEMENT_NODE){var a=f.getComputedStyle(b);d.style.whiteSpace=a.whiteSpace;d.style.fontStyle=a.fontStyle;d.style.color=a.color;d.style.fontSize=a.fontSize;for(a=0;a<b.childNodes.length;a++)this.convertToInlineStyles(d.childNodes[a],b.childNodes[a])}}}})},"MW/rtc/plugins/export/OutputNodeExporterInterface":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/export/html/HTMLExportUtilities"],function(g,f){return g([],{_STYLES:[],constructor:function(){},getApplicableDomNodeClasses:function(){throw Error("Unimplemented: getApplicableNodeClass");},reset:function(){},enter:function(e,d,b){return!1},leave:function(e,d,b){}})})},"MW/rtc/plugins/export/html/HTMLExportUtilities":function(){define(["dojo/dom-style"],function(g){return{getStyleValuesForNode:function(f,e){return this.getStyleValuesForDomNode(this.getDomNode(f),e)},getStyleValuesForDomNode:function(f,
e){for(var d="",b=g.getComputedStyle(f),a=0;a<e.length;a+=1)d+=e[a]+": "+b[e[a]]+"; ";return d},getDomNode:function(f){return f.box}}})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureOutputHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./FigureOutputHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.embeddedoutputs rtc.embeddedoutputs.currentoutputservice rtc.id rtc.embeddedoutputs.model rtc.contextmenu.generator rtc.actionservice rtc.code.sections.model rtc.code.sections.stale.model rtc.clipboard rtc.document rtc.embeddedoutputs.codegen rtc.view rtc.focusservice rtc.outputhandlerservice rtc.embeddedoutputs.statehandler rtc.embeddedoutputs.figureconnectionmanager".split(" ")}},
createInstance:function(d,b,a,c,h,f,g,m,p,n,q,r,s,t,u,v){d=new e(d.getEmbeddedOutputsView(),b,a,c,r,f,h,g,m,p,n,q,s,u,v);t.registerOutputPlugin(d);return d}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureOutputHandler":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/event dojo/aspect dojo/dom-class dojo/dom-construct dojo/Deferred dojo/on MW/rtc/plugins/embeddedoutputs/EmbeddedOutputsUtilities MW/rtc/plugins/embeddedoutputs/MessageServiceFactory MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseOutputHandler MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerResult MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerResultInstruction MW/rtc/plugins/embeddedoutputs/codegen/CodeGenFactoryProvider MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureOutput MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureProxy MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureOutputProperties MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FocusedFigure MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/ToolstripActionController MW/rtc/plugins/embeddedoutputs/model/RegionUtilities MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureSnapshotManager".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x){return g([m],{OUTPUT_TYPE:t.OUTPUT_TYPE,_MISSING_FIGURE_URI_ERROR:"A figure image or figureURI is required.",_snapshotManager:null,_FIGURE_SNAPSHOT_DELETE_CHANNEL:"/liveeditor/figuresnapshots",constructor:function(a,c,b,e,h,k,g,l,m,p,n,q,r,s,w){this._aspectHandles=[];this._currentouputservice=c;this._editorId=b;this._outputsModel=e;this._view=h;this._actionService=k;this._contextMenuGenerator=g;this._sectionModel=l;this._staleSectionModel=m;this._clipboard=
p;this._document=n;this._codeGenFactory=q;this._focusService=r;this._embeddedOutputsView=a;this._stateHandler=s;this._figureConnectionManager=w;this._outputsInProgressMap={};this._numberOfSectionsRemaining=0;this._toolstripActionController=new v(b,this._actionService);this._aspectHandles.push(d.after(this._currentouputservice,"onOutputSelected",f.hitch(this,"_handleOutputSelectionAndModelChanges"),!0));this._aspectHandles.push(d.after(this._stateHandler,"stateChanged",f.hitch(this,"_handleStateChanged"),
!0));this._snapshotManager=new x(b,this._FIGURE_SNAPSHOT_DELETE_CHANNEL);this._focusedFigure=new u},getOutputFromData:function(a,c){var b,d=a.lineNumbers,e=a.figurePlaceHolderId||a.figureId,h=this._outputsInProgressMap[e],k=!!h,g=a.figurePlaceHolderId,l=a.isPending,m=!g&&!l;b=k&&this._isPending(h);var q=n.REASSOCIATE_AND_UPDATE;h||(h=new r({figureId:e,onOutputDestroyedCallback:f.hitch(this,"onOutputDestroyed")}),this._outputsInProgressMap[e]=h,q=n.ADD_OUTPUT);if(g)return h.getState()!==t.STATE.PENDING&&
h.setState(t.STATE.PLACEHOLDER),new p(q,h);l?h.setState(t.STATE.PENDING):h.setState(t.STATE.FINAL_SNAPSHOT);q=k?n.UPDATE:n.ADD_OUTPUT;m&&delete this._outputsInProgressMap[e];var s={lineNumbers:d,figureUri:""};a.figureSize&&(s.figureSize=a.figureSize);e={editorId:this._editorId,figureId:a.figureId,lineNumbers:d,snapshotManager:this._snapshotManager};k=a.hasOwnProperty("figureUri");a.hasOwnProperty("figureImage")?(b=this.createFigureProxyForURI(e,a.figureImage.src,a.figureSize),s.figureUri=a.figureImage.src,
h.initializeFigure({figureProxy:b,parsedData:s,lineNumbers:d,getRegionNumbersFromPositions:f.hitch(this,"_convertPositionsToRegionNumbers")}),h.getReadyPromise().resolve()):k?(b=this.createFigureProxyForURI(e,a.figureUri,a.figureSize),b.showRunCodePrompt(),s.figureUri=a.figureUri,h.initializeFigure({figureProxy:b,parsedData:s,lineNumbers:d,getRegionNumbersFromPositions:f.hitch(this,"_convertPositionsToRegionNumbers")}),h.getReadyPromise().resolve()):(b=b?this.createFigureProxyForWebCanvas(a,e,h.getContentPane()):
this.createFigureProxyForWebCanvas(a,e),b.addFigureURIChangedListener(f.hitch(this,function(a){s.figureUri=a.uri;h.getReadyPromise().resolve()})),b.addFigureStateChangedListener(f.hitch(this,function(a){this.onOutputFocused(a.figureProperties)})),b.addUpdateLayoutListener(f.hitch(this,function(a){this._embeddedOutputsView.onAlign()})),h.initializeFigure({figureProxy:b,parsedData:s,lineNumbers:d,getRegionNumbersFromPositions:f.hitch(this,"_convertPositionsToRegionNumbers")}),b.setOutput(h),b.setDocumentView(this._view),
b.setFigureUndoRedo(this._document),b.setContextMenuService(this._actionService,this._contextMenuGenerator),b.setCodeGenFactory(this._codeGenFactory),b.setFocusService(this._focusService),b.addInteractionFeatures(),b.setFocusedFigure(this._focusedFigure),b.setGetNumberOfOutputsOnLineCallback(f.hitch(this,function(){return this._outputsModel.getOutputsForPosition(h.codeLinePositions[h.codeLinePositions.length-1]).filter(function(a){return a.type===t.OUTPUT_TYPE}).length})),h.getState()!==t.STATE.FINAL_SNAPSHOT?
this._figureConnectionManager.registerOutput(a.figureId,h):this._figureConnectionManager.removeOutput(a.figureId));b&&b.addCustomEventListener("startEditing",f.hitch(this,function(a){this._focusService.setBlur()}));return new p(q,h)},_convertPositionsToRegionNumbers:function(a){var c=[],b=this._outputsModel.getRegions();if(!a)return[];a.forEach(function(a){var d=k.convertPositionToRegionNumber(a,b),e=b[d];w.isPositionWithinRegionRange(a,e,e)&&c.push(d)},this);return c},createFigureProxyForURI:function(a,
c,b){var d=new s(a);d.createViewForURI(a,c,b);return d},createFigureProxyForWebCanvas:function(a,c,b){var d=s(c);d.createViewForWebCanvas(c,a.serverID,b,a.figureSize,a.figureData.iFigureMetaData);return d},onOutputFocused:function(a){a&&(this._focusedFigure.figureId=a.figureId)},onOutputsSelected:function(a){},onOutputDestroyed:function(a){this._figureConnectionManager.removeOutput(a);delete this._outputsInProgressMap[a]},_handleOutputSelectionAndModelChanges:function(a){var c=this.OUTPUT_TYPE,b=
a.selectedOutputs.filter(function(a){return a.type===c}).map(function(a){return a.getFigureProperties()});this.onOutputsSelected(b);if(a.focusedOutput&&a.focusedOutput.type===this.OUTPUT_TYPE)this.onOutputFocused(a.focusedOutput.getFigureProperties())},_handleStateChanged:function(a,c){a===this._stateHandler.CHANGE_TYPE_ENUM.EVAL_INITIALIZED?(this._clearIncompleteFigures(),this._numberOfSectionsRemaining=this._sectionModel.getSections().length):a===this._stateHandler.CHANGE_TYPE_ENUM.SECTION_EVAL_COMPLETE?
(this._numberOfSectionsRemaining--,0!==this._numberOfSectionsRemaining&&this._clearIncompleteFigures()):a===this._stateHandler.CHANGE_TYPE_ENUM.EVAL_COMPLETE&&this._clearIncompleteFigures()},_clearIncompleteFigures:function(){Object.keys(this._outputsInProgressMap).forEach(function(a){a=this._outputsInProgressMap[a];a.isReady()?a.setState(t.STATE.FINAL_PENDING_SNAPSHOT):a.getReadyPromise().reject()},this);this._outputsInProgressMap={}},_isPending:function(a){return a.getState()===t.STATE.PENDING},
_isFinalSnapshot:function(a){return a.getState()===t.STATE.FINAL_SNAPSHOT||a.getState()===t.STATE.FINAL_PENDING_SNAPSHOT},destroy:function(){this._aspectHandles.forEach(function(a){a.remove()});this._aspectHandles=[];this._toolstripActionController.destroy();this._snapshotManager.destroy()}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureOutput":function(){define("dojo/_base/declare dojo/_base/lang dojo/Deferred MW/rtc/misc/ImageURIUtilities MW/rtc/plugins/cutcopypaste/MIMETypes MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseOutput MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureProxy MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureOutputProperties".split(" "),
function(g,f,e,d,b,a,c,h){return g([a],{_IMG_URI_DATA_ATTRIBUTE:"data-imguri",type:h.OUTPUT_TYPE,constructor:function(a){this._isReadyPromise=new e;this._state=h.STATE.NOT_INITIALIZED;this._figureId=a.figureId;this._onOutputDestroyedCallback=a.onOutputDestroyedCallback},initializeFigure:function(a){this._figureProxy&&this._figureProxy.destroy();this._figureProxy=a.figureProxy;this._parsedData=a.parsedData;this._getRegionNumbersFromPositions=a.getRegionNumbersFromPositions},destroy:function(){this._isReadyPromise.reject();
this._isReadyPromise=null;this._figureProxy&&this._figureProxy.destroy();this._onOutputDestroyedCallback(this._figureId)},getCssTag:function(){return h.CSS_TAG},getDomElement:function(){return this._figureProxy.getFigureView().getWrapperNode()},getSerializableData:function(){var a=this._getRegionNumbersFromPositions(this.getCodeLinePositions()),c=f.clone(this._parsedData);c.figureId=this._figureId;c.regionNumbers=a;c.originalRegionNumber=a[0];return c},getText:function(){return""},getHTML:function(a,
c){var b="\x3cdiv\x3e\x3cimg ";if(a)var e=d.pushImageAndGetPathFromURI(this._parsedData.figureUri,a,c),b=b+('src\x3d"'+e+'"')+(this._IMG_URI_DATA_ATTRIBUTE+'\x3d"'+this._parsedData.figureUri+'"');else b+='src\x3d"'+this._parsedData.figureUri+'"';return b+="\x3e\x3c/div\x3e"},getMIMEContent:function(){return[{flavor:b.IMAGE,content:this._parsedData.figureUri}]},isReady:function(){return this._isReadyPromise.isResolved()},getReadyPromise:function(){return this._isReadyPromise},printToFile:function(a,
c,b){return this._figureProxy.printToFile(["-d"+a,"-r"+c,b])},canPrintToFile:function(){return null!=this._figureProxy.figureModel.getFigureProperties()},getFigureProperties:function(){return this._figureProxy.getFigureProperties()},getContentPane:function(){return this._figureProxy.getFigureContentPane()},getFigureId:function(){return this._figureId},getFigureUri:function(){return this._parsedData.figureUri},getFigureSize:function(){return this._parsedData.figureSize},getState:function(){return this._state},
setState:function(a){this._state=a},reconnect:function(){this._figureProxy.reconnectView()},disconnect:function(){this._figureProxy.disconnectView()}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureProxy":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/event dojo/dom-class dojo/dom-construct dojo/dom-style dojo/query dojo/on dojo/Deferred dojo/Evented dijit/Destroyable dijit/focus dojo/i18n!l10n/nls/actions MW/rtc/plugins/embeddedoutputs/MessageServiceFactory MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureModel MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureView MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/ModelessManager MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/ModeManager MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/controllers/PaletteController MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/controllers/PromptController MW/rtc/plugins/embeddedoutputs/codegen/EditorCodeGenerator MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/ActionManager MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureUndoRedoManager MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureOutputProperties mw-html-utils/HtmlUtils MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/EventHandler".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x,y,B,D,E,F){return g([l,m],{figureModel:null,figureView:null,_paletteController:null,_promptController:null,_modeManager:null,_modelessManager:null,_layoutManager:null,_windowMouseMoveListener:null,_windowMouseUpListener:null,_enableInteraction:!1,_enableModelessInteraction:!1,_output:null,_dependencies:null,_codeGenFactory:null,_codeGenerator:null,_actionService:null,_contextMenuGenerator:null,_paletteDisabled:!1,_actionManager:null,_figureUndoRedoManager:null,
_focusService:null,_IMAGE_PATH:require.toUrl("images/"),_eventHandler:null,_figureViewInteractionListeners:null,_cannotidentifyFigureTooltip:n.disabledWhenCannotIdentifyFigure,_getNumberOfOutputsOnLineCallback:null,_snapshotManager:null,constructor:function(a){this.figureModel=new r(a);this._IMAGE_PATH=this._getImageUrl();this._snapshotManager=a.snapshotManager},createViewForURI:function(a,c,b){this.figureView=new s(b);this.own(this.figureView);this.figureView.createImageNode(c,a.editorId,a.figureId)},
createViewForWebCanvas:function(a,c,b,d,e){this.figureView=new s(d);this.own(this.figureView);e&&this._setFigureMetaData(e);this.figureView.createWebGraphicsNode(c,b);this.own(h(this.figureView,"refreshURI",f.hitch(this,function(){this._setupFigureViewListeners();this.emit("FigureURIChanged",{uri:this.getFigureURI()})})))},_replaceWebCanvas:function(a){this.figureView.createWebGraphicsNode(a,this.figureView.getGraphicsViewContainerNode())},getFigureContentPane:function(){return this.figureView.getGraphicsViewContainerNode()},
setOutput:function(a){this._output=a;this.figureModel&&this.figureModel.setFigureToolstripEnablementCallback(f.hitch(this,"_shouldFigureToolstripBeEnabled"))},_shouldFigureToolstripBeEnabled:function(){if(!this._output)return!1;var a=this._output.getState();return this._isEnabledFigure()&&(a===D.STATE.FINAL_SNAPSHOT||a===D.STATE.FINAL_PENDING_SNAPSHOT)},setContextMenuService:function(a,c){this._actionService=a;this._contextMenuGenerator=c},setFocusService:function(a){this._focusService=a},setCodeGenFactory:function(a){this._codeGenFactory=
a},setDocumentView:function(a){this.figureView.setDocumentView(a)},setGetNumberOfOutputsOnLineCallback:function(a){this._getNumberOfOutputsOnLineCallback=a},showRunCodePrompt:function(){this.figureView.showRunCodePrompt()},_getImageUrl:function(){var a=E.parseUrl(this._IMAGE_PATH);return a.protocol+"//"+a.hostname+":"+a.port+a.pathname},_getMouseEventData:function(a){return this.getFigureModel().getMouseEventData(a,this.figureView,this._modeManager._cursorHotSpot)},notify:function(a,c){this.emit(a,
c)},_setupFigureViewListeners:function(){this._enableModelessInteraction||q.getInstance().subscribe(this.figureModel.getModelessChannel(),"_modelessDataUpdate",this);this._enableModelessInteraction=!0;this._figureViewInteractionListeners||(this._figureViewInteractionListeners=[h(this.figureView,"WindowButtonMouseDown",f.hitch(this,"notify","WindowButtonMouseDown")),h(this.figureView,"WindowButtonMouseMove",f.hitch(this,"notify","WindowButtonMouseMove")),h(this.figureView,"WindowButtonMouseEnter",
f.hitch(this,"notify","WindowButtonMouseEnter")),h(this.figureView,"WindowButtonMouseLeave",f.hitch(this,"notify","WindowButtonMouseLeave")),h(this.figureView,"WrapperElementMouseLeave",f.hitch(this,"notify","_WrapperElementMouseLeave")),h(this.figureView,"dblclick",f.hitch(this,"_WindowDblClickHandler")),h(this.figureView,"contextmenu",f.hitch(this,"_WindowContextMenuEventHandler")),h(this.figureView,"mousewheel",f.hitch(this,"notify","WindowButtonMouseWheel")),h(this.figureView,"LayoutResize",f.hitch(this,
"notify","LayoutResize")),h(this.figureView,"InlineViewLayout",f.hitch(this,"notify","InlineViewLayout")),h(this.figureView,"click",f.hitch(this,"_WindowClickHandler")),h(this.figureView,"WrapperElementMouseMove",f.hitch(this,"_WrapperMouseMoveHandler"))],this.own.apply(this,this._figureViewInteractionListeners))},getFigureProperties:function(){return this.figureModel.getFigureProperties()},destroy:function(){this._destroyed||(this._enableModelessInteraction&&q.getInstance().unsubscribe(this.figureModel.getModelessChannel(),
"_modelessDataUpdate",this),this._enableInteraction&&q.getInstance().unsubscribe(this.figureModel.getRefreshChannel(),"_refreshFromServer",this),this._paletteController&&this._paletteController.destroyView(),this._promptController&&this._promptController.destroyView(),this._modeManager&&this._modeManager.destroy(),this._modelessManager&&this._modelessManager.destroy(),this._codeGenerator&&this._codeGenerator.destroy(),this._eventHandler&&this._eventHandler.destroy(),this._snapshotManager&&this._snapshotManager.removeSnapshot(this.figureModel.figureId));
this.inherited(arguments)},getFigureModel:function(){return this.figureModel},getFigureView:function(){return this.figureView},getFigureURI:function(){return this.getFigureView().getFigureURI()},feval:function(a,c){q.getInstance().publish(this.figureModel.getInteractionChannel(),JSON.stringify({method:a,args:c}))},printToFile:function(a){var c=new k,b=f.hitch(this,function(a){q.getInstance().unsubscribe(this.figureModel.getInteractionChannel()+"/printed",b,this);c.resolve(a)});q.getInstance().subscribe(this.figureModel.getInteractionChannel()+
"/printed",b,this);q.getInstance().publish(this.figureModel.getInteractionChannel(),JSON.stringify({method:"printToFile",args:a}));return c},_modelessDataUpdate:function(a){a.data.iFigureInteractionData&&this._modelessManager.handleModelessEvent(a.data.iFigureInteractionData);this._setDocumentFocusIfNeeded()},_refreshFromServer:function(a){this._refresh(a.data.iFigureInteractionData,a.data.iFigureMetaData,a.data.iFigureUndoRedoData,a.data.iServerID)},_refresh:function(a,c,b,d){"string"===typeof d&&
""!==d&&this.figureView.getServerID()!==d?this._replaceWebCanvas(d):b?(this._setFigureUndoRedoData(c,b,a),this.emit("FigureStateChanged",{figureProperties:this.figureModel.getFigureProperties()}),this.emit("InteractionEventProcessed",{})):(c&&(this._setFigureMetaData(c),this._setFigureInteractionData(null),this._updateFigureState()),a&&(this._setFigureInteractionData(a),"subplot"===a.iAtomicActionID?this.emit("FigureStateChanged",{figureProperties:this.figureModel.getFigureProperties()}):this.emit("InteractionEventProcessed",
{})),this._modelessManager&&this._modelessManager.forceCommit(),this._setDocumentFocusIfNeeded())},_setFigureUndoRedoData:function(a,c,b){this._setFigureMetaData(a);this.figureModel.setUndoRedoData(c);this._setFigureInteractionData(b);this._updateFigureState();this._modelessManager&&this._modelessManager.forceRollback();this._setDocumentFocusIfNeeded()},_setFigureMetaData:function(a){this.figureView.deleteRunCodePrompt();this.figureModel.setFigureModelState(a)},_updateFigureState:function(){this._paletteController.setState(this.figureModel);
this._promptController.setState(this.figureModel);this._modeManager.isInSpringLoadedMode()?(this._paletteController.disablePalette(),this._paletteDisabled=!0):(this._paletteController.enablePalette(),this._paletteDisabled=!1)},_updateCodeGen:function(){var a=this.figureModel._interactionData;if(a){var c=a.iClearCode,b=a.iShowCode||""!==a.iAtomicActionID,a=a.iCode;this._codeGenerator.updateWidget(this.figureView.getGraphicsViewContainerNode(),a,c,b)}},_setDocumentFocusIfNeeded:function(){null===p.curNode&&
this._focusService.setFocus()},_setupInteractionEvents:function(a){var c=this;this.own(a.on("interaction",function(a){c.feval(a.fcn,a.args);a.args&&(void 0!==a.args.mode&&!c._modeManager.isSpringLoadedMode(a.args.mode))&&c._modeManager.setModeFromClient(a.args.mode)}))},_WindowClickHandler:function(a){this._isValidFigure()&&this._modelessManager&&this._modelessManager.WindowMouseClick(this._getMouseEventData(a))},_WrapperMouseMoveHandler:function(a){this._isValidFigure()&&this._modelessManager&&this._modelessManager.WindowButtonMouseMove(this._getMouseEventData(a))},
_WindowDblClickHandler:function(a){this.figureModel.getMode()&&""!==this.figureModel.getMode()&&(this._isValidFigure()&&this._modeManager.WindowMouseDblClick(this._getMouseEventData(a)),e.stop(a))},_WindowContextMenuEventHandler:function(a){this.figureModel.getMode()&&""!==this.figureModel.getMode()&&this._isValidFigure()&&this._modeManager.updateContextMenuEventData(this._getMouseEventData(a))},undockFigure:function(){q.getInstance().publish(this.figureModel.getInteractionChannel(),JSON.stringify({method:"launchFigure",
args:{editorId:this.figureModel.editorId}}))},addInteractionEventProcessedListener:function(a){this.own(h(this,"InteractionEventProcessed",a))},addFigureStateChangedListener:function(a){this.own(h(this,"FigureStateChanged",a))},addFigureURIChangedListener:function(a){this.own(h(this,"FigureURIChanged",a))},addUpdateLayoutListener:function(a){this.own(h(this,"updateLayout",a))},addWindowMouseListener:function(a,c){this.addCustomEventListener(a,c)},addCustomEventListener:function(a,c){this.own(h(this,
a,c))},_isValidFigure:function(){return this._isEnabledFigure()&&(this._isInlineFigure()||this._isRHSSelectedFigure())},_isEnabledFigure:function(){var a=this.figureView.getWrapperNode();return a.parentElement&&!d.contains(a,"stale_output")},_isInlineFigure:function(){var a=this.figureView.getWrapperNode();return a.parentElement&&d.contains(a.parentElement,"inlineElement")},_isRHSSelectedFigure:function(){var a=this.figureView.getWrapperNode();return a.parentElement&&d.contains(a.parentElement,"focusedOutput")},
_isInsideAxes:function(a,c){return this.figureView.isInsideAxes(a,c,this._modeManager._cursorHotSpot)},toggleFigureComponents:function(){this.figureView.hasRenderingSize()?(this._codeGenerator.enable(),this._paletteDisabled||this._paletteController.enablePalette()):(this._isValidFigure()&&this._codeGenerator.disable(),this._paletteController.disablePalette())},addInteractionFeatures:function(){this._createCodeGenWidget();this._eventHandler=new F;this._actionManager=new y({figureView:this.figureView,
figureModel:this.figureModel,codeGenerator:this._codeGenerator});this._actionManager.setUndoRedoManager(this._figureUndoRedoManager);this._modelessManager=new t({figureView:this.figureView,figureModel:this.figureModel,codeGenerator:this._codeGenerator});this._modelessManager.setUndoRedoManager(this._figureUndoRedoManager);this._modelessManager.setEventHandler(this._eventHandler);this._modeManager=new u({figureView:this.figureView,figureModel:this.figureModel,codeGenerator:this._codeGenerator,actionService:this._actionService,
contextMenuGenerator:this._contextMenuGenerator});this._modeManager.setUndoRedoManager(this._figureUndoRedoManager);this._modeManager.setCursorImagePath(this._IMAGE_PATH);this._modeManager.setEventHandler(this._eventHandler);this._modelessManager.setCursorImagePath(this._IMAGE_PATH);this._setupInteractionEvents(this._modeManager);this._setupInteractionEvents(this._modelessManager);this.own(h(this._modeManager,"startEditing",f.hitch(this,function(a){this.emit("startEditing",a)})));this.own(h(this._modelessManager,
"startEditing",f.hitch(this,function(a){this.emit("startEditing",a)})));this.addInteractionEventProcessedListener(f.hitch(this,function(){this._eventHandler.processNextPendingEvent()}));this._paletteController=new v({figureView:this.figureView,figureModel:this.figureModel});this._setupInteractionEvents(this._paletteController);this._promptController=new w({figureView:this.figureView,figureModel:this.figureModel});this._setupInteractionEvents(this._promptController);this.addWindowMouseListener("LayoutResize",
f.hitch(this,"_handleLayoutResizeEvent"));this.addWindowMouseListener("InlineViewLayout",f.hitch(this,"_inlineViewLayoutEventHandler"));this.addWindowMouseListener("WindowButtonMouseDown",f.hitch(this,function(a){this._isEnabledFigure()&&(this._modeManager.WindowButtonMouseDown(this._getMouseEventData(a)),this._paletteController._handleMouseClick(this._getMouseEventData(a)),this._promptController._handleMouseClick(a),this._modelessManager.WindowButtonMouseDown(this._getMouseEventData(a)))}));this.addWindowMouseListener("WindowButtonMouseWheel",
f.hitch(this,"handleWheelEvent"));this.addWindowMouseListener("WindowButtonMouseEnter",f.hitch(this,function(a){this.toggleFigureComponents();this._codeGenerator.changeCodeGenLayout(this.figureView.getFigureWidth());this._isValidFigure()&&(a=this._getMouseEventData(a),this._paletteController._handleMouseEnter(a),this._promptController._handleMouseEnter(a))}));this.addWindowMouseListener("WindowButtonMouseLeave",f.hitch(this,function(a){a=this._getMouseEventData(a);this._modelessManager._handleMouseLeave(a)}));
this.addWindowMouseListener("_WrapperElementMouseLeave",f.hitch(this,function(a){this._paletteController._handleMouseLeave(a);this._promptController._handleMouseLeave(a)}));this.addWindowMouseListener("WindowButtonMouseMove",function(a){this._isValidFigure()&&(a=this._getMouseEventData(a),this._modelessManager._handleMouseMove(a),this._modeManager.WindowButtonMouseMove(a),this._paletteController._handleMouseMove(a),this._promptController._handleMouseMove(a))});q.getInstance().subscribe(this.figureModel.getRefreshChannel(),
"_refreshFromServer",this);this._enableInteraction=!0},handleWheelEvent:function(a){a=this._getMouseEventData(a);this._isValidFigure()&&(a.MouseOverAxes&&a.MouseOverAxes.isInside)&&(this._modeManager.WindowButtonMouseWheel(a),this._modelessManager.WindowButtonMouseWheel(a))},_handleLayoutResizeEvent:function(a){this.toggleFigureComponents();this._codeGenerator.changeCodeGenLayout(this.figureView.getFigureWidth());this._modeManager.switchLayouts();this._modelessManager.forceCommit()},_inlineViewLayoutEventHandler:function(){var a=
this.figureView.getWrapperNode();a.parentElement&&d.contains(a.parentElement,"inlineElement")&&this._codeGenerator.changeCodeGenLayout(this.figureView.getFigureWidth())},setFigureUndoRedo:function(a){this._figureUndoRedoManager=new B({document:a})},_createCodeGenWidget:function(){this._codeGenFactory&&(this._codeGenerator=this._codeGenFactory.createEditorCodeGenerator(),this._codeGenerator.setCodeGenDependencies({output:this._output,outputPositions:this.figureModel.getVisibleAxesPositions()}),this._codeGenerator.setEnablementCondition(f.hitch(this,
function(){return 1===this._getNumberOfOutputsOnLineCallback()}),this._cannotidentifyFigureTooltip))},_setFigureInteractionData:function(a){this.figureModel.setInteractionData(a);this._actionManager.setState(this.figureModel);this._modeManager.setState(this.figureModel);this._modelessManager.setState(this.figureModel);this._updateCodeGen();a&&a.isFakeCode&&this._codeGenerator.disableUpdateCodeBtn(this._cannotidentifyFigureTooltip)},reconnectView:function(){this.figureView&&this.figureView.reconnectView()},
disconnectView:function(){this.figureView&&this.figureView.disconnectView()},setFocusedFigure:function(a){this._modelessManager&&this._modelessManager.setFocusedFigure(a)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureModel":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/Evented"],function(g,f,e){return g([e],{editorId:null,figureId:null,lineNumbers:null,_CHANNEL_PREFIX:"/liveeditor/figure/",_is2D:null,_axesPositions:null,_chartType:null,_mode:null,_modeStateData:null,
_zoomDirection:null,_currentTarget:null,_interactionData:null,_backgroundColor:null,_isPZREnabled:null,_isSubplotCase:null,_isSubplot3D:null,_titles:null,_xlabels:null,_ylabels:null,_yLabelPositions:null,_xLabelPositions:null,_titlePositions:null,_legendPositions:null,_isXlabelSupported:null,_isYlabelSupported:null,_isXGridSupported:null,_isYGridSupported:null,_isGridSupported:null,_isTitleSupported:null,_isColorbarSupported:null,_isLegendSupported:null,_annotationPositions:null,_annotationTextPositions:null,
_enableToolstrip:null,_enableMOLToolstrip:null,_enableAxesToolbar:null,_figureToolstripEnablementCallback:null,_undoRedoData:null,constructor:function(d){f.mixin(this,d)},setEnableToolstrip:function(d){this._enableToolstrip=new Boolean(d)},getEnableToolstrip:function(){var d=!this._figureToolstripEnablementCallback||this._figureToolstripEnablementCallback();return this._enableToolstrip.valueOf()&&d},setFigureToolstripEnablementCallback:function(d){this._figureToolstripEnablementCallback=d},setEnableAxesToolbar:function(d){this._enableAxesToolbar=
d},getAxesToolbarEnabled:function(){return this._enableAxesToolbar},getUndoRedoData:function(){return this._undoRedoData},setUndoRedoData:function(d){this._undoRedoData=d},setEnableMOLToolstrip:function(d){this._enableMOLToolstrip=new Boolean(d)},getEnableMOLToolstrip:function(){var d=!this._figureToolstripEnablementCallback||this._figureToolstripEnablementCallback();return this._enableMOLToolstrip.valueOf()&&d},getIsSubplotCase:function(){return new Boolean(this._isSubplotCase)},getIsPZREnabled:function(){return this._isPZREnabled},
getInteractionChannel:function(){return this._CHANNEL_PREFIX+this.figureId},getRefreshChannel:function(){return this._CHANNEL_PREFIX+this.figureId+"/refresh"},getModelessChannel:function(){return this._CHANNEL_PREFIX+this.figureId+"/modeless"},getMode:function(){return this._mode},getModeStateData:function(){return this._modeStateData},getZoomDirection:function(){return this._zoomDirection},getIs2D:function(){return this._is2D},getIsSubplot3D:function(){return this._isSubplot3D},getAxesPositions:function(){return this._axesPositions},
getChartType:function(){return this._chartType},getVisibleAxesPositions:function(){var d=[];this._axesPositions&&this._axesPositions.forEach(function(b,a){this.isAxesObscuredByEarlierChild(a)||d.push(b)},this);return d},isAxesObscuredByEarlierChild:function(d){var b=this._axesPositions[d];if(0==d)return!1;for(var a=0;a<d;a++){var c=[Math.max(this._axesPositions[a][0],b[0]),Math.max(this._axesPositions[a][1],b[1])],e=[Math.min(this._axesPositions[a][0]+this._axesPositions[a][2],b[0]+b[2]),Math.min(this._axesPositions[a][1]+
this._axesPositions[a][3],b[1]+b[3])],f=e[0]-c[0],c=e[1]-c[1];if(0<f&&0<c&&0<b[2]&&0<b[3]&&0.9<f*c/(b[2]*b[3]))return!0}return!1},getTitles:function(){return this._titles},getXLabels:function(){return this._xlabels},getYLabels:function(){return this._ylabels},getBackgroundColor:function(){return this._backgroundColor},setMode:function(d){this._mode=d},setModeStateData:function(d){this._modeStateData=d},setZoomDirection:function(d){this._zoomDirection=d},setIs2D:function(d){this._is2D=d;this._updateIsSubplot3D(d)},
_updateIsSubplot3D:function(d){this.getIsSubplot3D()||Array.isArray(d)&&d.forEach(function(b){b||(this._isSubplot3D=!0)},this)},setBackgroundColor:function(d){this._backgroundColor=d},setInteractionData:function(d){this._interactionData=d},getInteractionData:function(){return this._interactionData},setAxesPositions:function(d){var b=this._axesPositions;this._axesPositions=d;this.emit("AxesPositionUpdated",{originalAxesPositions:b,newAxesPositions:this._axesPositions})},setTitles:function(d){this._titles=
d},setXLabels:function(d){this._xlabels=d},setYLabels:function(d){this._ylabels=d},setIsPZREnabled:function(d){this._isPZREnabled=d},setIsSubplotCase:function(d){this._isSubplotCase=d},getXLabelPositions:function(){return this._xLabelPositions},getYLabelPositions:function(){return this._yLabelPositions},getTitlePositions:function(){return this._titlePositions},setXLabelPositions:function(d){this._xLabelPositions=d},setYLabelPositions:function(d){this._yLabelPositions=d},setTitlePositions:function(d){this._titlePositions=
d},getAnnotationPositions:function(){return this._annotationPositions},setAnnotationPositions:function(d){this._annotationPositions=d},getAnnotationTextPositions:function(){return this._annotationTextPositions},setAnnotationTextPositions:function(d){this._annotationTextPositions=d},setChartType:function(d){this._chartType=d},setFigureModelState:function(d){this.setMode(d.iMode);this.setModeStateData(d.iModeStateData);this.setZoomDirection(d.iZoomDirection);this.setIs2D(d.iIs2D);this.setAxesPositions(d.iAxesPositions);
this.setChartType(d.iChartType);this.setLegendPositions(d.iLegendPositions);this.setBackgroundColor(d.iBackgroundColor);this.setIsSubplotCase(d.iIsSubplotCase);this.setIsPZREnabled(d.iIsPZREnabled);this.setTitles(d.iTitles);this.setXLabels(d.iXLabels);this.setYLabels(d.iYLabels);this.setTitlePositions(d.iTitlePositions);this.setXLabelPositions(d.iXLabelPositions);this.setYLabelPositions(d.iYLabelPositions);this.setAnnotationPositions(d.iAnnotationPositions);this.setAnnotationTextPositions(d.iAnnotationTextPositions);
this.setEnableToolstrip(d.iEnableFigureToolstrip);this.setEnableMOLToolstrip(d.iEnableMOLFigureToolstrip);this.setEnableAxesToolbar(d.iEnableAxesToolbar);this.setUndoRedoData(null);this._isColorbarSupported=new Boolean(d.iIsColorbarSupported);this._isTitleSupported=new Boolean(d.iIsTitleSupported);this._isLegendSupported=new Boolean(d.iIsLegendSupported);this._isXGridSupported=new Boolean(d.iIsXGridSupported);this._isGridSupported=new Boolean(d.iIsGridSupported);this._isYGridSupported=new Boolean(d.iIsYGridSupported);
this._isYlabelSupported=new Boolean(d.iIsYlabelSupported);this._isXlabelSupported=new Boolean(d.iIsXlabelSupported)},getLegendPositions:function(){return this._legendPositions},setLegendPositions:function(d){this._legendPositions=d},getMouseEventData:function(d,b,a){var c=this,e=c.getAnnotationTextPositions();Array.isArray(e)&&e.forEach(function(a){a=b.isInsideLabel(d,b,a);a.isInside&&(d.isInsideTextAnnotation=a.isInside)});d.isInsideTextAnnotation||(e=c.getAnnotationPositions(),Array.isArray(e)&&
e.forEach(function(a){a=b.isInsideAnnotations(d,a);a.isInside&&(d.isInsideAnnotation=a.isInside)}));this.getAxesPositions()&&this.getAxesPositions().some(function(e,h){if(!d.isInsideTextAnnotation&&!d.isInsideAnnotation){var f=b.isInsideLabel(d,b,c.getTitlePositions()[h]);f.isInside&&(d.isInsideTitle=f.isInside,d.labelAxesIndex=h);f=b.isInsideLabel(d,b,c.getXLabelPositions()[h]);f.isInside&&(d.isInsideXLabel=f.isInside,d.labelAxesIndex=h);f=b.isInsideLabel(d,b,c.getYLabelPositions()[h]);f.isInside&&
(d.isInsideYLabel=f.isInside,d.labelAxesIndex=h);f=b.isInsideLabel(d,b,c.getLegendPositions()[h]);f.isInside&&(d.isInsideLegend=f.isInside,d.labelAxesIndex=h)}f=b.isInsideAxes(e,d,a);d.MouseOverAxes=f;d.MouseOverAxes.Index=-1;if(f.isInside)return d.MouseOverAxes.Index=h,void 0!==c.getChartType()&&(null!==c.getChartType()&&Array.isArray(c.getChartType()))&&(d.isMouseOverChart="axes"!==c.getChartType()[d.MouseOverAxes.Index].toLowerCase()),d});return d},getFigureProperties:function(){return!this._axesPositions?
null:{editorId:this.editorId,figureId:this.figureId,lineNumbers:this.lineNumbers,axesPositions:this.getVisibleAxesPositions(),enableToolstrip:this.getEnableToolstrip(),enableAxesToolbar:this.getAxesToolbarEnabled(),enableMOLToolstrip:this.getEnableMOLToolstrip(),supportedActions:{xlabel:this._isXlabelSupported,ylabel:this._isYlabelSupported,grid:this._isGridSupported,xgrid:this._isXGridSupported,ygrid:this._isYGridSupported,legend:this._isLegendSupported,colorbar:this._isColorbarSupported,title:this._isTitleSupported,
subplot:this.getIsSubplotCase()}}}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureView":function(){define("dojo/_base/declare dojo/dom dojo/dom-construct dojo/dom-class dojo/Evented dojo/mouse dijit/Destroyable dojo/on dojo/touch dojo/_base/lang dojo/dom-geometry dojo/dom-style dojo/query dojo/aspect mw-log/Log MW/rtc/events/MouseEventUtil MW/rtc/plugins/embeddedoutputs/MessageServiceFactory MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/EventUtils MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/controllers/RunScriptPromptController".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v){return g([b,c,u],{_figureUri:null,_imgElement:null,_wrapperElement:null,_runInfoElement:null,_figureSize:null,_sceneWidgetAttachedHandler:null,_serverID:"",_isDisconnected:!1,_figureContainerPane:null,_graphicsView:null,_documentView:null,_viewThreshold:{Width:200,Height:100},_isFirstOutput:null,_TOLERANCE:200,_MAXWIDTH:800,_cachedBlankImageSrc:null,_figureViewInteractionListeners:null,constructor:function(a){this._wrapperElement=e.create("div",{className:"figureElement"});
if(void 0!==a&&null!==a&&"number"===typeof a[0]){var c=Math.max(window.innerWidth,this._MAXWIDTH);this._figureSize=this._scaleFigureWidth(a,c)}},reconnectView:function(){this._graphicsView.setSceneChannel(this._serverID);this._isDisconnected=!1},disconnectView:function(){this._graphicsView.setSceneChannel("");this._isDisconnected=!0},_attachInteractionListeners:function(){if(!this._figureViewInteractionListeners){var c=this;this._figureViewInteractionListeners=[];this._figureViewInteractionListeners.push(h(this._imgElement,
k.move,function(a){c.emit("WindowButtonMouseMove",a)}));this._figureViewInteractionListeners.push(h(this._imgElement,k.press,function(b){a.isLeft(b)&&c.emit("WindowButtonMouseDown",b)}));this._figureViewInteractionListeners.push(h(this._imgElement,k.release,function(b){a.isLeft(b)&&c.emit("WindowButtonMouseUp",b)}));this._figureViewInteractionListeners.push(h(this._imgElement,k.enter,function(a){c.emit("WindowButtonMouseEnter",a)}));this._figureViewInteractionListeners.push(h(this._wrapperElement,
k.leave,function(a){c.emit("WrapperElementMouseLeave",a)}));this._figureViewInteractionListeners.push(h(this._imgElement,k.leave,function(a){c.emit("WindowButtonMouseLeave",a)}));this._figureViewInteractionListeners.push(h(this._imgElement,"dblclick",function(b){a.isLeft(b)&&c.emit("dblclick",b)}));this._figureViewInteractionListeners.push(h(this._wrapperElement,"click",function(b){a.isLeft(b)&&c.emit("click",b)}));this._figureViewInteractionListeners.push(h(this._wrapperElement,k.move,function(a){c.emit("WrapperElementMouseMove",
a)}));this._figureViewInteractionListeners.push(h(this._imgElement,"contextmenu",function(a){c.emit("contextmenu",a)}));this._figureViewInteractionListeners.push(h(this._imgElement,s.MOUSEWHEEL,function(a){c.emit("mousewheel",a)},!0));this._figureViewInteractionListeners.push(h(this._imgElement,"dragstart",function(a){dojo.stopEvent(a)},!0));this._figureViewInteractionListeners.push(h(this._imgElement,"dragend",function(a){dojo.stopEvent(a)},!0));this.own.apply(this,this._figureViewInteractionListeners)}},
createImageNode:function(a,c,b){this._imgElement=e.create("img",{className:"figureImage figureContainingNode",src:a},this._wrapperElement);this.figureSize&&0<this.figureSize.length&&p.set(this._imgElement,"width",this.figureSize[0]+"px");this._figureContainerPane=this._imgElement;this._attachInteractionListeners();t.getInstance().publish("/graphics/guiclientready",{Event:"NewClient",EditorID:c,FigureID:b})},createWebGraphicsNode:function(a,c){this._figureViewInteractionListeners=null;var b=e.create("div",
null);if(c)this._replaceFigureContainingDOMNode(c);else{if(this._cachedBlankImageSrc&&this._cachedBlankImageSrc.width===this._figureSize[0]&&this._cachedBlankImageSrc.height===this._figureSize[1])var h=e.create("img",{src:this._cachedBlankImageData.src},this._wrapperElement);else h=document.createElement("canvas"),h.width=this._figureSize[0],h.height=this._figureSize[1],this._cachedBlankImageData={src:h.toDataURL("image/png"),width:this._figureSize[0],height:this._figureSize[1]},h=e.create("img",
{src:this._cachedBlankImageData.src},this._wrapperElement);d.add(h,"figureContainingNode");p.set(h,"max-width","100%")}d.add(b,"figureContainingNode");p.set(b,{width:this._figureSize[0]+"px",height:"","max-width":"100%",display:"inline-block"});if("string"===typeof a){this._serverID=a;var f=this;require(["graphics/SceneWidgets/GraphicsView"],function(c){c=new c({Container:b});c.setInteractionEnabled(!1);c.startup();f._createSceneWidgetAttachedHandler(c);c.set("ServerId",a);f._graphicsView=c;this._isDisconnected&&
this.disconnectView();f._addGraphicsCompleteHandler(this._figureSize,c,b)})}else e.place(a.domNode,b,"only"),this._addGraphicsCompleteHandler(this._figureSize,a,b)},_createSceneWidgetAttachedHandler:function(a){this._sceneWidgetAttachedHandler=a.on("attached",function(c){var b="/graphics/"+a.get("ServerId")+"/event";if(this._imgElement)t.getInstance().publish(b,{Event:"NewClient"});else var d=a.onEvent("graphicscomplete",l.hitch(this,function(){t.getInstance().publish(b,{Event:"NewClient"});d.remove()}))})},
_addGraphicsCompleteHandler:function(a,c,b){c.onEvent("graphicscomplete",l.hitch(this,function(){f.isDescendant(b,this._wrapperElement)||this._replaceFigureContainingDOMNode(b);this._figureContainerPane=b;this._imgElement=n("img",c.domNode)[0];d.add(this._imgElement,"figureImage");this._attachInteractionListeners();this._serverID=c.get("ServerId");this.emit("refreshURI",{})}))},getServerID:function(){return this._serverID},destroy:function(){this.inherited(arguments);this._runInfoElement&&this._runInfoElement.destroyView()},
showRunCodePrompt:function(){this._runInfoElement||(this._runInfoElement=new v,this._runInfoElement.setTarget(this._wrapperElement))},deleteRunCodePrompt:function(){this._runInfoElement&&(this._runInfoElement.destroy(),this._runInfoElement=null)},getWrapperNode:function(){this._isFirstOutput=null;return this._wrapperElement},getDomNode:function(){return this._imgElement},getGraphicsViewContainerNode:function(){return this._figureContainerPane?this._figureContainerPane:null},getFigureURI:function(){return this._imgElement.src},
getPosition:function(){return m.position(this.getDomNode())},getFigureWidth:function(){return this._figureSize[0]},_scaleFigureWidth:function(a,c){a[0]>c&&0<a[0]&&(a[1]*=c/a[0],a[0]=c);return a},getFigureSize:function(){return this._figureSize},setDocumentView:function(a){this._documentView=a;this.setupResizeAspect();this._setupLayoutChangeAspect()},setupResizeAspect:function(){this.own(q.after(this._documentView,"onResize",l.hitch(this,function(a){this.emit("LayoutResize",{})})))},_setupLayoutChangeAspect:function(){this.own(q.after(this._documentView,
"onLayoutChange",l.hitch(this,function(a){this.emit("InlineViewLayout",{})})))},hasRenderingSize:function(){var a=!1;this._wrapperElement&&f.isDescendant(this._wrapperElement,document.body)&&(a=m.position(this._wrapperElement),a=this._viewThreshold.Width<a.w&&this._viewThreshold.Height<a.h);return a},getAxesPlotBox:function(a){var c=this.getPosition();return{xLow:a[0]*c.w+c.x,xHigh:(a[0]+a[2])*c.w+c.x,yLow:c.h-(a[1]+a[3])*c.h+c.y,yHigh:c.h-a[1]*c.h+c.y}},isInsideAxes:function(a,c,b){a=this.getAxesPlotBox(a);
var d=null;void 0!==c.clientX&&null!==c.clientX?d={x:c.clientX,y:c.clientY}:void 0!==c.x&&null!==c.x&&(d={x:c.x,y:c.y});c=d.x+b[0];b=d.y+b[1];b=b>a.yLow&&b<a.yHigh&&c>a.xLow&&c<a.xHigh;return{isInside:b,axesPlotBox:b?a:{}}},isInsideLabel:function(a,c,b){c=this.getAxesPlotBox(b);a=this.getEventPosition(a);return{isInside:a.y>c.yLow&&a.y<c.yHigh&&a.x>c.xLow&&a.x<c.xHigh}},isInsideAnnotations:function(a,c){var b=this.getPosition(),d=[c[0]*b.w,c[1]*b.h,c[2]*b.w,c[3]*b.h],e=this.getEventPosition(a);e.x-=
b.x;e.y-=b.y;return{isInside:Math.abs(d[0]*(d[3]-e.y)+d[2]*(e.y-d[1])+e.x*(d[1]-d[3]))/2<this._TOLERANCE}},_replaceFigureContainingDOMNode:function(a){var c=n(".figureContainingNode",this._wrapperElement);0<c.length?e.place(a,c[0],"replace"):e.place(a,this._wrapperElement,"only")},isFigureInline:function(){var a=this.getWrapperNode();return a.parentElement&&d.contains(a.parentElement,"inlineElement")}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/EventUtils":function(){define(["dojo/_base/declare",
"dojo/dom-geometry"],function(g,f){return g(null,{_HAS_POINTER_EVENTS:window.PointerEvent,getEventPosition:function(e){if(e){if(void 0!==e.clientX&&null!==e.clientX)return{x:e.clientX,y:e.clientY};if(void 0!==e.x&&null!==e.x)return{x:e.x,y:e.y}}return null},convertEventToMatlabRelativeCoords:function(e,d){var b=f.position(d,!1);return this.convertEventToMatlabRelativeToFigureCoords(e,b)},convertEventToMatlabRelativeToFigureCoords:function(e,d){return{x:(e.x-d.x+1)/d.w,y:(d.h-(e.y-d.y)+1)/d.h}},isEventInsideAxes:function(e,
d){return e.MouseOverAxes&&e.MouseOverAxes.isInside&&e.target===d},addCursorOffset:function(e,d){var b=this.getEventPosition(e);return{x:b.x+d[0],y:b.y+d[1]}},hasMouseClicked:function(e,d){if(!d)return!1;var b=this.getEventPosition(e);return d.x===b.x&&d.y===b.y?!0:!1},addEventListener:function(e,d,b){switch(d){case "mousedown":this._HAS_POINTER_EVENTS&&(d="pointerdown");break;case "mouseup":this._HAS_POINTER_EVENTS&&(d="pointerup");break;case "mousemove":this._HAS_POINTER_EVENTS&&(d="pointermove")}e.addEventListener(d,
b,!0)},removeEventListener:function(e,d,b){switch(d){case "mousedown":this._HAS_POINTER_EVENTS&&(d="pointerdown");break;case "mouseup":this._HAS_POINTER_EVENTS&&(d="pointerup");break;case "mousemove":this._HAS_POINTER_EVENTS&&(d="pointermove")}e.removeEventListener(d,b,!0)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/controllers/RunScriptPromptController":function(){define("dojo/_base/declare dojo/Evented dojo/dom-construct dojo/query dojo/dom-style MW/rtc/plugins/embeddedoutputs/outputhandlers/floatingpalette/controllers/SimpleFloatingElement".split(" "),
function(g,f,e,d,b,a){return g([a,f],{constructor:function(){this.paletteRegistryId="RunScriptPalette"},getPreferredLeftPosition:function(){var a=d(".figureImage",this._outputDomNode);return a[0].offsetLeft+a[0].offsetWidth},_setupPaletteListeners:function(){}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/floatingpalette/controllers/SimpleFloatingElement":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/dom-style dojo/dom-class MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/PaletteRegistry MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/elements/ElementFactory dojo/on dojo/dom-geometry dijit/Destroyable MW/rtc/plugins/embeddedoutputs/outputhandlers/floatingpalette/controllers/BasePaletteController".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m){return g([l,m],{_outputDomNode:null,_mouseEnterListener:null,_mouseLeaveListener:null,paletteRegistryId:"",paletteWidth:null,setTarget:function(a){this._outputDomNode!==a&&(this._mouseEnterListener&&this._mouseEnterListener.remove(),this._outputDomNode=a,this._mouseEnterListener=h(this._outputDomNode,"mouseenter",f.hitch(this,function(a){this._handleMouseEnter(a)})),this._mouseLeaveListener=h(this._outputDomNode,"mouseleave",f.hitch(this,function(a){this._handleMouseLeave(a)})),
this.own(this._mouseEnterListener),this.own(this._mouseLeaveListener))},getView:function(){if(!this._palette){var b=a.getPalette(this.paletteRegistryId);c.getPalette(b,f.hitch(this,function(a){this._palette=a;this._palette.startup();this._setupPaletteListeners()}))}return this._palette},_setupPaletteListeners:function(){this._paletteListener||(this._paletteListener=this._palette.on("elementClicked",f.hitch(this,function(a){this.notify("interaction",{})})))},addInteractionListener:function(a){this.own(h(this,
"interaction",a))},getPreferredLeftPosition:function(){throw Error("getPreferredLeftPosition must be overridden");},_handleMouseEnter:function(a){this.updatePalettePosition()},updatePalettePosition:function(){if(this._palette=this.getView()){e.place(this._palette.domNode,this._outputDomNode);if(this.isInline(this._outputDomNode)){var a=this.getPreferredLeftPosition();null===this.paletteWidth&&(this.paletteWidth=this._palette.domNode.offsetWidth);a+this._palette.domNode.offsetWidth>this._outputDomNode.offsetWidth?
d.set(this._palette.domNode,{right:"1px",left:"",top:"0px"}):d.set(this._palette.domNode,{left:a+"px",right:"",top:"0px"})}else d.set(this._palette.domNode,{right:"1px",left:"",top:"5px"});this.setVisible(!0)}},destroy:function(){this.inherited(arguments);this.destroyView()}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/PaletteRegistry":function(){define(["dojo/i18n!l10n/nls/actions"],function(g){function f(){null===e&&(e={},e.FigurePalette={configName:"FigurePalette",
configElements:[{iconClass:"datacursorButton",mode:"Exploration.Datacursor",elementType:"ModeButtonElement",tooltip:g.dataCursorLabel},{iconClass:"rotateButton",mode:"Exploration.Rotate3d",elementType:"3DModeButtonElement",tooltip:g.rotateLabel},{iconClass:"panButton",mode:"Exploration.Pan",elementType:"ModeButtonElement",tooltip:g.panLabel},{iconClass:"zoomInButton",mode:"Exploration.Zoom",elementType:"ZoomModeButtonElement",direction:"in",tooltip:g.zoomInLabel},{iconClass:"zoomOutButton",mode:"Exploration.Zoom",
elementType:"ZoomModeButtonElement",direction:"out",tooltip:g.zoomOutLabel},{iconClass:"restoreViewButton",action:"Action.RestoreView",elementType:"ActionButtonElement",tooltip:g.restoreViewLabel}]},e.OutputPopoutPalette={configName:"OutputPopoutPalette",configElements:[{iconClass:"figurePopoutButton",elementType:"ActionButtonElement",tooltip:g.figurePopOutPrompt}]},e.MatrixPopoutPalette={configName:"MatrixPopoutPalette",configElements:[{iconClass:"figurePopoutButton",elementType:"ActionButtonElement",
tooltip:g.variableEditorPopOutPrompt}]},e.InteractiveVariablePopoutPalette={configName:"InteractiveVariablePopoutPalette",configElements:[{iconClass:"figurePopoutButton",elementType:"ActionButtonElement",tooltip:g.variableEditorPopOutPrompt}]},e.RunScriptPalette={configName:"RunScriptPalette",configElements:[{iconClass:"runScriptInfoButton",elementType:"ActionButtonElement",tooltip:g.figureRunPrompt}]},e.ActionPalette={configName:"ActionPalette",configElements:[{iconClass:"zInButton",action:"Action.Zoom",
elementType:"ActionButtonElement",direction:"in",tooltip:g.zoomInActionLabel},{iconClass:"zOutButton",action:"Action.Zoom",elementType:"ActionButtonElement",direction:"out",tooltip:g.zoomOutActionLabel},{iconClass:"restoreViewButton",action:"Action.RestoreView",elementType:"ActionButtonElement",tooltip:g.restoreViewLabel}]},e.GeoAxesPalette={configName:"GeoAxesPalette",configElements:[{iconClass:"datacursorButton",mode:"Exploration.Datacursor",elementType:"ModeButtonElement",tooltip:g.dataCursorLabel},
{iconClass:"zInButton",action:"Action.Zoom",elementType:"ActionButtonElement",direction:"in",tooltip:g.zoomInActionLabel},{iconClass:"zOutButton",action:"Action.Zoom",elementType:"ActionButtonElement",direction:"out",tooltip:g.zoomOutActionLabel},{iconClass:"restoreViewButton",action:"Action.RestoreView",elementType:"ActionButtonElement",tooltip:g.restoreViewLabel}]})}var e=null;return{getPalette:function(d){f();return e[d]},registerPalette:function(d,b){f();e[d]=b},getRegistry:function(){f();return e}}})},
"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/elements/ElementFactory":function(){define("dojo/_base/declare dojo/_base/lang dijit/registry MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/Palette MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/PaletteRegistry MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/ModuleManifest mw-log/Log".split(" "),function(g,f,e,d,b,a,c){function h(a,b,d){var e=null;try{if(a="MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/elements/"+
a)require([a],function(a){e=new a(b);d&&"function"===typeof d&&d(e)});else return null}catch(h){c.error(h)}return e}return{getPalette:function(a,c){var b=null;if(a&&a.configName&&a.configElements&&Array.isArray(a.configElements)){var e=a.configElements,b=new d({dataTag:a.configName,numElements:e.length});e.forEach(function(a,d,e){h(a.elementType,a,function(a){b.addElementAtIndex(a,d);b.isComplete()&&c&&"function"===typeof c&&c(b)})})}return b}}})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/Palette":function(){define("dojo/_base/declare dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/_base/lang dojo/Evented dojo/on dojo/mouse dijit/_WidgetBase dijit/_TemplatedMixin dojo/dom-construct dojo/text!./templates/Palette.html".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p){return g([k,a,l],{baseClass:"figurefloatingpalette",templateString:p,elements:null,_mouseEnterListener:null,_mouseLeaveListener:null,constructor:function(a){this.inherited(arguments);if(!a||!a.dataTag)throw Error("dataTag must be passed to the Palette constructor");this.dataTag=a.dataTag;a.numElements?this.createDefaultElements(a.numElements):this.elements=[]},createDefaultElements:function(a){null===this.elements&&(this.elements=[]);for(var c=0;c<a;c+=1)this.elements[c]=
void 0},isComplete:function(){var a=!0;this.elements.forEach(function(c){a=a&&void 0!==c},this);return a},addElement:function(a){this.addElementAtIndex(a,this.elements.length)},addElementAtIndex:function(a,c){null===this.elements&&(this.elements=[]);this.elements[c]=a;this._setupElementListener(a)},postCreate:function(){this.inherited(arguments);this._initMouseListeners()},startup:function(){this.inherited(arguments);this.elements.forEach(function(a){void 0!==a&&(a.startup(),m.place(a.domNode,this.containerNode))},
this)},_setupElementListener:function(a){var c=a.getElementEvents(),d;for(d in c)a.on(d,b.hitch(this,"notify"))},_initMouseListeners:function(){this._mouseEnterListener=c.pausable(this.containerNode,h.enter,b.hitch(this,function(a){this.fadeIn()}));this._mouseLeaveListener=c.pausable(this.containerNode,h.leave,b.hitch(this,function(a){this.isValidLeaveEvent(a)&&this.fadeOut()}))},fadeIn:function(){f.remove(this.containerNode,"fadeout");f.add(this.containerNode,"fadein")},fadeOut:function(){this.elements.forEach(function(a){a.hideTooltip()});
f.remove(this.containerNode,"fadein");f.add(this.containerNode,"fadeout")},disable:function(){f.add(this.containerNode,"disabled")},enable:function(){f.remove(this.containerNode,"disabled")},setStyles:function(a){a&&void 0!==a.backgroundColor?d.set(this.containerNode,"background-color",a.backgroundColor):d.set(this.containerNode,"background-color","white")},setState:function(a){this.setStyles(a);this.elements.forEach(function(c){c.setState(a)},this)},notify:function(a){this.emit(a.elementEvent,a)},
destroy:function(){this.inherited(arguments);this.elements.forEach(function(a){a.destroy()},this);this.elements=[]},isValidLeaveEvent:function(a){var c=!0;this.elements.forEach(function(b){b.isValidLeaveEvent(a)||(c=!1)});return c}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/ModuleManifest":function(){define(["dojo/_base/declare","MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/elements/ModeButtonElement","MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/elements/ZoomModeButtonElement",
"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/elements/3DModeButtonElement","MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/elements/ActionButtonElement"],function(g){return g([],{constructor:function(f){}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/elements/ModeButtonElement":function(){define("dojo/_base/declare dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/_base/lang dojo/mouse dijit/form/Button MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/elements/AbstractPaletteElement MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/elements/ElementToolTipMixin".split(" "),
function(g,f,e,d,b,a,c,h,k){return g([c,h,k],{isStyleSet:!1,isStateSet:!1,_mode:null,_elementEvents:{elementClicked:"elementClicked"},constructor:function(a){a&&this._init(a)},_init:function(a){a.iconClass&&(this.baseClass=a.iconClass);a.mode&&(this._mode=a.mode);a.tooltip?this.setToolTipText(a.tooltip):this.setToolTipText(this._mode.replace("Exploration.",""))},startup:function(){this.inherited(arguments);this.createToolTip(this.domNode);this.createMouseListeners(this.domNode);f.add(this.domNode,
"palettebutton")},onClick:function(a){this.isStyleSet===this.isStateSet&&(this.isStateSet=!this.isStateSet,this.setStyle(this.isStateSet),this.notify(this._elementEvents.elementClicked,{mode:!1===this.isStateSet?"":this._mode}))},setStyle:function(a){a?(f.add(this.domNode,this.baseClass+"Pressed"),this.isStyleSet=!0):(f.remove(this.domNode,this.baseClass+"Pressed"),this.isStyleSet=!1)},setState:function(a){void 0!==a.mode&&(this.isStateSet=a.mode!==this._mode?!1:!0,this.setStyle(this.isStateSet))}})})},
"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/elements/AbstractPaletteElement":function(){define(["dojo/_base/declare","dojo/Evented","dojo/on","dojo/touch","dojo/_base/event"],function(g,f,e,d,b){return g([f],{_elementEvents:{elementClicked:"elementClicked"},_mouseDownListener_I:null,_mouseUpListener_I:null,_mouseClickListener_I:null,setState:function(a){},notify:function(a,c,b){c.elementEvent=a;c.mode=c.mode;c.direction=b;this.emit(a,c)},getElementEvents:function(){return this._elementEvents},
createMouseListeners:function(a){this._mouseUpListener_I=e(a,d.release,function(a){b.stop(a)});this._mouseDownListener_I=e(a,d.press,function(a){b.stop(a)});this._mouseClickListener_I=e(a,"click",function(a){b.stop(a)})}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/elements/ElementToolTipMixin":function(){define(["dojo/_base/declare","dojo/dom-class","dijit/Tooltip"],function(g,f,e){return g([],{_tooltipWidget:null,_toolTipLabel:null,setToolTipText:function(d){this._toolTipLabel=
d;this._tooltipWidget&&(this._tooltipWidget.label=this._toolTipLabel)},createToolTip:function(d){this._tooltipWidget=new e({connectId:[d],label:this._toolTipLabel,hideDelay:100,position:["below","after","before","above"]})},hideTooltip:function(){e.hide(this.domNode)},setPosition:function(d){this._tooltipWidget.position=d},isValidLeaveEvent:function(d){return!(d.relatedTarget&&f.contains(d.relatedTarget,"dijitTooltipConnector"))}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/elements/ZoomModeButtonElement":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/elements/ModeButtonElement"],function(g,f){return g([f],{_zoomDirection:null,_init:function(e){this.inherited(arguments);e.direction&&(this._zoomDirection=e.direction)},notify:function(e,d){d.elementEvent=e;d.mode=d.mode;d.direction=this._zoomDirection;this.emit(e,d)},setState:function(e){void 0!==e.mode&&void 0!==e.direction&&(this.isStateSet=e.mode!==this._mode?!1:e.direction!==this._zoomDirection?!1:!0,this.setStyle(this.isStateSet))}})})},
"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/elements/3DModeButtonElement":function(){define(["dojo/_base/declare","dojo/dom-class","MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/elements/ModeButtonElement"],function(g,f,e){return g([e],{setState:function(d){this.inherited(arguments);if(void 0!==d.is2D){var b=0===d.is2D;!0===b?f.add(this.domNode,"showButton"):!1===b&&f.remove(this.domNode,"showButton")}}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/elements/ActionButtonElement":function(){define("dojo/_base/declare dojo/dom-class dojo/dom-geometry dojo/dom-style dojo/_base/lang dojo/mouse dojo/on dijit/form/Button MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/elements/AbstractPaletteElement MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/elements/ElementToolTipMixin".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return g([h,k,l],{constructor:function(a){a&&this._init(a)},_init:function(a){a.iconClass&&(this.baseClass=a.iconClass);a.action&&(this._action=a.action);a.tooltip?this.setToolTipText(a.tooltip):this.setToolTipText(this._action.replace("Action.",""))},startup:function(){this.inherited(arguments);this.createToolTip(this.domNode);this.createMouseListeners(this.domNode);f.add(this.domNode,"palettebutton")},onClick:function(){this.notify(this._elementEvents.elementClicked,
{action:this._action},this.direction)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/floatingpalette/controllers/BasePaletteController":function(){define(["dojo/_base/declare","dojo/dom-class","dojo/Evented"],function(g,f,e){return g([e],{_palette:null,_paletteListener:null,getView:function(){},notify:function(d,b){this.emit(d,b)},_handleMouseLeave:function(d){this._palette&&this._palette.isValidLeaveEvent(d)&&this.setVisible(!1)},_handleMouseEnter:function(d){},_handleMouseClick:function(d){},
_handleMouseMove:function(d){},setVisible:function(d){this._palette&&(d?this._palette.fadeIn():this._palette.fadeOut())},disablePalette:function(){this._palette&&this._palette.disable()},enablePalette:function(){this._palette&&this._palette.enable()},isInline:function(d){for(d=d.parentNode;d&&d!==document;){if(f.contains(d,"inlineWrapper"))return!0;d=d.parentNode}return!1},destroyView:function(){this._palette&&(this._palette.destroy(),this._palette=null)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/ModelessManager":function(){define("dojo/_base/declare dojo/_base/lang dojo/Evented dijit/Destroyable dojo/dom-geometry dojo/dom-style dojo/on dojo/_base/event MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/EventUtils MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/TextInputElement MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/EditedAnnotationController MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/ChartHandler".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p){return g([e,d,k],{_figureView:null,_figureModel:null,_textInputElement:null,_editedLegendEntryIndex:null,_labelAxesIndex:null,_editType:null,_undoRedoManager:null,_editedAnnotation:null,_codeGen:null,_chartHandler:null,_eventHandler:null,_cursorImagePath:null,_chartClicked:!1,_TITLE_EDITED:"TITLE_EDITED",_XLABEL_EDITED:"XLABEL_EDITED",_YLABEL_EDITED:"YLABEL_EDITED",_LEGEND_EDITED:"LEGEND_EDITED",_ANNOTATION_EDITED:"ANNOTATION_EDITED",_MODELESS_INTERACTION:"modeLessInteractionCallback",
_textFieldBeingEdited:!1,_MATLAB_returned:!0,_annotationMouseDownEvent:null,_focusedFigure:null,constructor:function(a){this._figureView=a.figureView;this._figureModel=a.figureModel;this._codeGen=a.codeGenerator},setEventHandler:function(a){this._eventHandler=a},handleModelessEvent:function(a){this._MATLAB_returned=!0;a.ilegendTextPosition&&(a.iLegendEntryString&&a.iLegendEntryIndex)&&this.showTextEditBoxForLegend(a.iLegendEntryIndex,a.ilegendTextPosition,a.iLegendEntryString);a.editedAnnotationType&&
""!==a.editedAnnotationType&&this._initAnnotation(a.editedAnnotationType,a.editedAnnotationPosition,a.editedAnnotationText)},WindowButtonMouseMove:function(a){this._updateMouseCursor(a)},_isValidMouseEvent:function(a){return a.MouseOverAxes&&(a.MouseOverAxes.isInside||a.isMouseOverChart)&&""===this._figureModel.getMode()},_handleMouseMove:function(a){this._figureView.isFigureInline()&&!this._isFigureFocused()||this._editType||(this._isValidMouseEvent(a)&&!a.isInsideAnnotation&&!a.isInsideTextAnnotation?
(this._initChartHandlerIfNeeded(),this._chartHandler.WindowMouseMoveHandler(a)):this._handleMouseLeave(a))},_handleMouseLeave:function(a){this._initChartHandlerIfNeeded();this._chartHandler.WindowMouseLeaveHandler(a)},_initChartHandlerIfNeeded:function(){null===this._chartHandler&&(this._chartHandler=new p(this._figureView,this._figureModel,this._eventHandler,this._cursorImagePath,this._codeGen),this.own(this._chartHandler.on("CHART_INTERACTION",f.hitch(this,function(a){this.emit("interaction",a);
"heatmap"===a.args.chartType&&this._insertFigureInteractionsToUndoRedo({type:a.args.type,interactionType:this._MODELESS_INTERACTION})}))))},WindowButtonMouseDown:function(a){a.isInsideAnnotation&&""===this._figureModel.getMode()?this._MATLAB_returned&&!(this._editedAnnotation&&null!==this._editedAnnotation._annotationElement)&&(a.editedAnnotation=!0,this.notify("AnnotationSelection",a),this._MATLAB_returned=this._textFieldBeingEdited=!1,this._annotationMouseDownEvent=a,h.stop(a)):this._isValidMouseEvent(a)&&
!a.isInsideAnnotation&&(this._initChartHandlerIfNeeded(),this._chartHandler.WindowMouseDownHandler(a))},WindowButtonMouseWheel:function(a){if(this._isValidMouseEvent(a)&&(!this._figureView.isFigureInline()||this._isFigureFocused()))this._initChartHandlerIfNeeded(),this._chartHandler.WindowMouseWheelHandler(a)},WindowMouseClick:function(a){if(""===this._figureModel.getMode())if(a.isInsideLegend&&this._MATLAB_returned&&(this._labelAxesIndex=a.labelAxesIndex,this._MATLAB_returned=!1,this.notify("WindowMouseClick",
a),h.stop(a)),a.isInsideTextAnnotation)this._MATLAB_returned&&!(this._editedAnnotation&&null!==this._editedAnnotation._annotationElement)&&(a.editedAnnotation=!0,this.notify("AnnotationSelection",a),h.stop(a),this._MATLAB_returned=!1,this._textFieldBeingEdited=!0,this.emit("startEditing",a));else if((a.isInsideTitle||a.isInsideXLabel||a.isInsideYLabel)&&null===this._textInputElement){this._labelAxesIndex=a.labelAxesIndex;var c="",b="",d="";a.isInsideTitle?(c=this._TITLE_EDITED,b=this._figureModel.getTitlePositions()[a.labelAxesIndex],
d=this._figureModel.getTitles()[a.labelAxesIndex]):a.isInsideXLabel?(c=this._XLABEL_EDITED,b=this._figureModel.getXLabelPositions()[a.labelAxesIndex],d=this._figureModel.getXLabels()[a.labelAxesIndex]):a.isInsideYLabel&&(c=this._YLABEL_EDITED,b=this._figureModel.getYLabelPositions()[a.labelAxesIndex],d=this._figureModel.getYLabels()[a.labelAxesIndex]);this._showTextBoxForLabel(b,d,c);h.stop(a)}},forceCommit:function(a){this._textInputElement&&this._textInputElement.isVisible()&&(this._doCommit(this._textInputElement.get("value")),
this._doReset());this.commitPendingAnnotation()},forceRollback:function(){this._textInputElement&&this._textInputElement.isVisible()&&this._doReset()},showTextEditBoxForLegend:function(a,c,b){a&&(this._editedLegendEntryIndex=a);this._showTextBoxForLabel(c,b,this._LEGEND_EDITED)},setCursorImagePath:function(a){this._cursorImagePath=a},setState:function(a){this._chartHandler&&this._chartHandler.setState(a)},_updateMouseCursor:function(c){""===this._figureModel.getMode()?c.isInsideTextAnnotation||null===
this._textInputElement&&(c.isInsideLegend||c.isInsideTitle||c.isInsideXLabel||c.isInsideYLabel)?a.set(this._figureView._wrapperElement,"cursor","text"):c.isInsideAnnotation?a.set(this._figureView._wrapperElement,"cursor","pointer"):a.set(this._figureView._wrapperElement,"cursor","default"):a.set(this._figureView._wrapperElement,"cursor","default")},_showTextBoxForLabel:function(a,c,b){this._editType=b;this._initTextBox();this._positionTextBox(a);this._textInputElement.show();this._textInputElement.setText(c);
this._textInputElement.focus();this._textInputElement.startEditing();this.emit("startEditing",{})},_initTextBox:function(){this._textInputElement=new l({widgetClass:"legendEdit"});this.own(c(this._textInputElement,"startEditing",f.hitch(this,function(a){this.emit("startEditing",a)})));this._textInputElement.placeAt(this._figureView.getWrapperNode());this._textInputElement.setTextAlignement("left");this._addCommitListener(this._textInputElement.domNode);this._textInputElement.START_WIDTH=10;this._textInputElement.setPromptingState(!1)},
_addCommitListener:function(a){this.own(c(a,"textcommit",f.hitch(this,function(a){this._doCommit(a.textValue);this._insertFigureInteractionsToUndoRedo({type:this._editType,newText:a.textValue,entryIndex:this._editedLegendEntryIndex,legendAxesIndex:this._labelAxesIndex,interactionType:this._MODELESS_INTERACTION})})))},_addAnnotationInteractionListener:function(a){this.own(c(a,"annotationInteraction",f.hitch(this,function(a){this.emit("interaction",a);this._insertFigureInteractionsToUndoRedo({type:a.type,
interactionType:this._MODELESS_INTERACTION})})))},_doCommit:function(a){this.emit("interaction",{fcn:this._MODELESS_INTERACTION,args:{type:this._editType,newText:a,entryIndex:this._editedLegendEntryIndex,legendAxesIndex:this._labelAxesIndex}});this._editType=this._editedLegendEntryIndex=null},_doReset:function(){this._editedLegendEntryIndex=null;this._textInputElement.stopEditing();this._removeEditedElement()},_positionTextBox:function(c){c=this._figureView.getAxesPlotBox(c);var d=b.position(this._figureView.getWrapperNode(),
!1),e=c.yLow-d.y,h=c.xHigh-d.x-(c.xHigh-c.xLow);c.yHigh-c.yLow>c.xHigh-c.xLow&&(e=(c.yHigh+c.yLow)/2-d.y);a.set(this._textInputElement.domNode,{position:"absolute",left:h+"px",top:e+"px",height:"20px"})},notify:function(a,c){var b=this.getEventPosition(c),b={x:b.x,y:b.y,type:c.type},b=this.convertEventToMatlabRelativeCoords(b,this._figureView.getDomNode());this.emit("interaction",{fcn:this._MODELESS_INTERACTION,args:{type:a,x:b.x,y:b.y,isInsideLegend:c.isInsideLegend,isInsideAnnotation:c.isInsideAnnotation||
c.isInsideTextAnnotation}});this._editType=null},destroy:function(){this._removeEditedElement();this._chartHandler&&this._chartHandler.destroy()},_removeEditedElement:function(){this._textInputElement&&(this._textInputElement.destroy(),this._textInputElement=null);this._editedAnnotation&&(this._editedAnnotation.destroy(),this._editedAnnotation=null)},setUndoRedoManager:function(a){this._undoRedoManager=a},_insertFigureInteractionsToUndoRedo:function(a){this._figureModel.getMode();a.codeGenState={attachCodeGenOnUndo:!1,
attachCodeGenOnRedo:!0};this._codeGen&&this._codeGen.isCodeGenAttached()&&(a.codeGenState.attachCodeGenOnUndo=!0);this._undoRedoManager.insertInteractionsForUndoRedo(this._figureModel,a)},_initAnnotation:function(a,c,b){this._editedAnnotation=new m({figureView:this._figureView,figureModel:this._figureModel,type:a,text:b,position:c});this._addAnnotationInteractionListener(this._editedAnnotation);this._textFieldBeingEdited?this._editedAnnotation.focusTextField():this._editedAnnotation.performMouseDown(this._annotationMouseDownEvent)},
commitPendingAnnotation:function(){this._editedAnnotation&&this._editedAnnotation.commitAnnotation()},setFocusedFigure:function(a){this._focusedFigure=a},_isFigureFocused:function(){return this._focusedFigure&&this._focusedFigure.figureId===this._figureModel.figureId}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/TextInputElement":function(){define("dojo/_base/declare dojo/dom-class dojo/on dojo/dom-geometry dojo/dom-style dojo/_base/lang dojo/mouse dojo/keys dojo/query dojo/_base/event dijit/form/TextBox MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/EventUtils dojo/has".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){return g([m,p],{_keyboardListener:null,_isExpander:!0,START_WIDTH:128,documentMouseDownHandler:null,documentMouseUpHandler:null,eraseWhileEditing:!0,originalPosition:null,_textAlignment:"center",_MIN_WIDTH:20,_MAX_IMG_WIDTH:560,_isEditing:!1,_mouseDownTarget:null,_elementEvents:{textCommit:"textCommit",textRollback:"textRollback",textClicked:"textClicked"},constructor:function(a){a&&this._init(a)},_init:function(a){a.widgetClass&&(this.baseClass=a.widgetClass);
a.placeHolderText&&(this.placeHolderText=a.placeHolderText);a.fieldType&&(this.fieldType=a.fieldType);a.customClass&&(this.customClass=a.customClass)},startup:function(){this.inherited(arguments);f.add(this.domNode,"placeholder");b.set(this.domNode,"width",this.START_WIDTH+"px");b.set(this.focusNode,"width",this.START_WIDTH+"px");this.customClass&&f.add(this.domNode,this.customClass);this.createMouseListeners(this.domNode);this.createKeyboardListeners(this.domNode);this.documentMouseDownHandler=a.hitch(this,
"_handleMouseDown")},setTextAlignement:function(a){this._textAlignment=a},createKeyboardListeners:function(c){this.own(e(c,"keydown",a.hitch(this,"_handleKeyboardEvent")))},isEditing:function(){return this._isEditing},createMouseListeners:function(c){this.own(e(c,"click",a.hitch(this,"_handleClickEvent")));this.own(e(c,"input",a.hitch(this,function(){this._isEditing||this.startEditing()})));this.own(e(c,"contextmenu",function(a){dojo.stopEvent(a)}));this.own(e(c,"dragstart",function(a){dojo.stopEvent(a)}));
this.own(e(c,"dragend",function(a){dojo.stopEvent(a)}));(n("trident")||n("ie")||n("edge"))&&this.own(e(c,"selectstart",function(a){a.stopPropagation()}))},_handleClickEvent:function(a){this.focus();this.startEditing();this.notify("textClicked",{titleWidget:this});a.stopPropagation()},_handleKeyboardEvent:function(a){switch(this._getKeyCode(a)){case h.ENTER:this.commit();break;case h.TAB:this._focusNextNode(a);break;case h.ESCAPE:this.rollback();break;default:this._doResize()}},_focusNextNode:function(a){a.stopPropagation();
a={textValue:this.get("value"),fieldType:this.fieldType,eventKeyCode:a.shiftKey?"SHIFTTAB":"TAB"};this.stopEditing();this.notify("textCommit",a)},_getParentDomNodePosition:function(){return d.position(this.domNode.parentNode)},_getDomNodePosition:function(){return d.position(this.domNode)},_getFocusDomNodePosition:function(){return d.position(this.focusNode)},_setDomNodeLeftPosition:function(a){b.set(this.domNode,"left",a+"px")},_setFocusDomNodeLeftPosition:function(a){b.set(this.focusNode,"left",
a+"px")},_setDomNodesWidth:function(a){b.set(this.domNode,"width",a+"px")},_setFocusDomNodesWidth:function(a){b.set(this.focusNode,"width",a+"px")},_doResize:function(){var a=this.get("value"),c=this._getStringDimsInPixels(a).width,c=Math.max(c,this._MIN_WIDTH),a=1.2*c,d=this._getParentDomNodePosition(),e=this._getWidthInFigureBounds(a);c>this.START_WIDTH&&(a<d.w?(c=this._getDomNodePosition(),this.originalPosition||(this.originalPosition=c),this._setDomNodesWidth(a),this._setFocusDomNodesWidth(a),
"center"===this._textAlignment?(this._setDomNodeLeftPosition(this.originalPosition.x-d.x-(a-this.originalPosition.w)/2),this._setFocusDomNodeLeftPosition(this.originalPosition.x-d.x-(a-this.originalPosition.w)/2)):(d=b.get(this.domNode,"left")-(a-e),a=b.get(this.focusNode,"left")-(a-e),this._setDomNodeLeftPosition(0>d?0:d),this._setFocusDomNodeLeftPosition(0>a?0:a))):(a=Math.min(d.w,this._MAX_IMG_WIDTH),e=k("input",this.domNode),e[0]&&e[0].setSelectionRange&&e[0].setSelectionRange(0,0),this._setDomNodesWidth(a),
this._setFocusDomNodesWidth(a),this._setDomNodeLeftPosition(0),this._setFocusDomNodeLeftPosition(0)))},_getWidthInFigureBounds:function(a){var c=this._getDomNodePosition(),b=this._getParentDomNodePosition();return c.x+a>b.x+b.w?b.x+b.w-c.x:a},_getStringDimsInPixels:function(a){var c=document.createElement("canvas").getContext("2d"),d=b.get(this.domNode,"fontSize"),e=b.get(this.domNode,"fontFamily"),h=b.get(this.domNode,"fontWeight");c.font=h+" "+d+" "+e;a=c.measureText(a).width;c=parseInt(c.font);
return{width:a,height:c}},commit:function(a){a={textValue:this.get("value"),fieldType:this.fieldType,focusedWidget:a};this.stopEditing();this.notify("textCommit",a)},rollback:function(){this.set("value","");this.notify("textRollback",{textValue:""})},startEditing:function(){this.setPromptingState(!1);this.addEventListener(window,"mousedown",this.documentMouseDownHandler);this._isEditing=!0},isEditing:function(){return this._isEditing},setPromptingState:function(a){a?(f.remove(this.domNode,"editing"),
f.add(this.domNode,"placeholder"),this.setText(this.placeHolderText)):(this.isPromptingState()&&this.eraseWhileEditing&&this.setText(""),f.remove(this.domNode,"placeholder"),f.add(this.domNode,"editing"));this.eraseWhileEditing=a},isPromptingState:function(){return f.contains(this.domNode,"placeholder")},stopEditing:function(){this.removeEventListener(window,"mousedown",this.documentMouseDownHandler);this._isEditing=!1},notify:function(a,c){c.elementEvent=a;c.textValue=c.textValue;this.emit(a,c)},
_getKeyCode:function(a){return a.which?a.which:a.keyCode?a.keyCode:a.charCode?a.charCode:a.key?a.key:null},setState:function(a){},isVisible:function(){return"none"!==b.get(this.domNode,"display")},hide:function(){b.set(this.domNode,"display","none")},show:function(){b.set(this.domNode,"display","inline-block")},_handleMouseDown:function(c){c.stopPropagation();c=dijit.getEnclosingWidget(c.target);this!==c&&this._callOnMouseUp(a.hitch(this,"commit",c))},_callOnMouseUp:function(c){var b=a.hitch(this,
function(a){this.removeEventListener(window,"mouseup",b);a.stopPropagation();c()});this.addEventListener(window,"mouseup",b)},setText:function(a){this.set("value",a.trim());this._doResize();this.START_WIDTH=b.get(this.domNode,"width")},destroy:function(){this.stopEditing();this.inherited(arguments)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/EditedAnnotationController":function(){define("dojo/_base/declare dojo/_base/lang dojo/Evented dijit/Destroyable dojo/on dojo/_base/event MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/EventUtils MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/TextInputElement MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/LineAnnotation MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/ArrowAnnotation MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/DoubleArrowAnnotation MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/TextArrowAnnotation".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p){return g([e,d,c],{_ANNOTATION_EDITED:"ANNOTATION_EDITED",_ANNOTATION_CLEARED:"ANNOTATION_CLEARED",_annotationElement:null,_MODELESS_INTERACTION:"modeLessInteractionCallback",constructor:function(a){var c=a.figureModel,b=a.figureView;switch(a.type){case "lineshape":this._annotationElement=new k(c,b);break;case "arrowshape":this._annotationElement=new l(c,b);break;case "doubleendarrowshape":this._annotationElement=new m(c,b);break;case "textarrowshape":this._annotationElement=
new p(c,b)}this._annotationElement.showAffordances(c.getAxesPositions(),b.getWrapperNode(),b.getDomNode());this._setAnnotationProperties(a.position,a.text)},_setAnnotationProperties:function(a,c){this._addInteractionListener();var b=[a[0]*this._annotationElement._imageNodePosition.w,a[1]*this._annotationElement._imageNodePosition.h,a[2]*this._annotationElement._imageNodePosition.w,a[3]*this._annotationElement._imageNodePosition.h];this._annotationElement.setAnnotationEndPoints([b[0],b[1]],[b[2],b[3]]);
this._annotationElement.show();this._annotationElement.draw(this._annotationElement._anchorPoint,this._annotationElement._endPoint);this._annotationElement._textField&&(this._annotationElement._textField.value=c,this._annotationElement.removeTextFocusListener(),this._annotationElement.doResize());this._annotationElement._canvas.focus()},performMouseDown:function(a){this._annotationElement.addMouseMoveForExistingAnnotation(a)},focusTextField:function(){this._annotationElement._textField.focus();this._annotationElement.createFocusTextListener()},
_addInteractionListener:function(){this.own(this._annotationElement.on("interaction",f.hitch(this,function(a){this._emitAnnotationCommit(a)})))},_emitAnnotationCommit:function(a){if("clearMode"===a.args.type)a.args.editType&&(this._annotationElement.clearWait(),this._annotationElement.destroy(),a={fcn:this._MODELESS_INTERACTION,args:{type:this._ANNOTATION_CLEARED,editType:a.args.editType}},this.emit("annotationInteraction",a));else{var c=a.args.configurationData;a={fcn:this._MODELESS_INTERACTION,
args:{type:this._ANNOTATION_EDITED,editType:a.args.type,relativePosition:c.relativePosition,editedText:c.text?c.text:""}};this.emit("annotationInteraction",a)}},commitAnnotation:function(){this._annotationElement&&(this._annotationElement.clearWait(),this._annotationElement.hide(!1),this.destroy())},destroy:function(){this._annotationElement&&(this._annotationElement.destroy(),this._annotationElement=null);this.inherited(arguments)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/LineAnnotation":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-class dojo/dom-style dojo/dom-construct dojo/dom-geometry dojo/on dojo/keys MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/Annotation".split(" "),
function(g,f,e,d,b,a,c,h,k){return g([k],{matlabInteractionFunction:"line",mode:"placedLineMode",draw:function(a,c){var b=this._canvas.getContext("2d");b.clearRect(0,0,this._canvas.width,this._canvas.height);b.lineWidth=1;b.beginPath();var d=[a[0],a[1]],e=[c[0],c[1]];b.moveTo(d[0],d[1]);b.lineTo(e[0],e[1]);b.rect(d[0]-2,d[1]-2,4,4);b.rect(e[0]-2,e[1]-2,4,4);b.stroke()}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/Annotation":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom dojo/dom-class dojo/dom-style dojo/dom-construct dojo/dom-geometry dojo/on dojo/keys MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/EventUtils MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/SpringLoadedModePreview".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m){return g([m,l],{_anchorPoint:null,_endPoint:null,_mouseDownPoint:null,_pivotPoint:"end",_canvas:null,_mouseDownHandlerFcn:null,_mouseMoveHandlerFcn:null,_mouseUpHandlerFcn:null,_keyHandlerFcn:null,_isMouseMove:!1,_imageNodePosition:null,_imageNode:null,_cursorOffset:5,_Z_KEY:90,createDomNodes:function(c,b){this._imageNode=b;var e=a.create("div");a.place(e,c);this.previewDomNodes=[e];this._canvas=a.create("canvas");a.place(this._canvas,e);d.add(this._canvas,"scribe");
d.add(e,"scribe");this.own(h(e,"dragstart",function(a){dojo.stopEvent(a)}));this.own(h(e,"dragend",function(a){dojo.stopEvent(a)}));return e},setAnnotationEndPoints:function(a,c){this._anchorPoint=a;this._endPoint=c},addClickListener:function(a,c){this.matlabInteractionFunction=c;this._mouseMoveHandlerFcn=f.hitch(this,"_mouseMoveListener");this._mouseUpHandlerFcn=f.hitch(this,"_mouseUpListener");this._addMouseupWindowListener();this._mouseDownHandlerFcn=f.hitch(this,"_mouseDownHandler");this._addMousedownWindowListener()},
_addKeyListener:function(){this._keyHandlerFcn||(this._keyHandlerFcn=f.hitch(this,"_keyHandler"));this._removeKeyListener();document.body.addEventListener("keydown",this._keyHandlerFcn,!0)},_removeKeyListener:function(){document.body.removeEventListener("keydown",this._keyHandlerFcn,!0)},_getKeyCode:function(a){return a.which?a.which:a.keyCode?a.keyCode:a.charCode?a.charCode:a.key?a.key:null},_keyHandler:function(a){var c=this._getKeyCode(a);if(this._isPositioned())switch(c){case k.UP_ARROW:a.stopPropagation();
this._anchorPoint[1]--;this._endPoint[1]--;this.draw(this._anchorPoint,this._endPoint);break;case k.DOWN_ARROW:a.stopPropagation();this._anchorPoint[1]++;this._endPoint[1]++;this.draw(this._anchorPoint,this._endPoint);break;case k.RIGHT_ARROW:a.stopPropagation();this._anchorPoint[0]++;this._endPoint[0]++;this.draw(this._anchorPoint,this._endPoint);break;case k.LEFT_ARROW:a.stopPropagation();this._anchorPoint[0]--;this._endPoint[0]--;this.draw(this._anchorPoint,this._endPoint);break;case k.ENTER:this.commit();
a.stopPropagation();a.preventDefault();break;case k.ESCAPE:this.commit();a.stopPropagation();break;case k.DELETE:this._resetAnnotation("delete");a.stopPropagation();break;case this._Z_KEY:if(a.ctrlKey||a.metaKey)this._resetAnnotation("undo"),a.stopPropagation()}else c===k.ESCAPE&&(this._resetAnnotation(),a.stopPropagation())},_resetAnnotation:function(a){this._removeMouseupWindowListener();this._removeMousedownWindowListener();this._reset();this.clearMode(a);document.body.removeEventListener("keydown",
this._keyHandlerFcn,!0)},positionAffordance:function(a,d,e,h,f,k,g,l){this._imageNodePosition={w:a.w,h:a.h,x:d,y:e};d=this.previewDomNodes[0];this._canvas.width=a.w;this._canvas.height=a.h;b.set(d,{width:a.w+"px",height:a.h+"px"});b.set(this._canvas,{width:a.w+"px",height:a.h+"px"});a=c.getPadExtents(h);b.set(d,{top:a.t+"px",left:a.l+"px"});this.parentNode=h},showAffordances:function(a,b,d){if(!this.previewDomNodes||0===this.previewDomNodes.length)a=this.createDomNodes(b,d),this.addClickListener(a,
this.matlabInteractionFunction);d=c.position(d);this.positionAffordance(d,d.x,d.y,b);this._canvas.getContext("2d").clearRect(0,0,this._canvas.width,this._canvas.height);this._endPoint=this._anchorPoint=null;this.show();document.body.removeEventListener("keydown",this._keyHandlerFcn,!0);this._addKeyListener()},_getEventPositionRelativeToCanvas:function(a){a=this.getEventPosition(a);a.x-=this._imageNodePosition.x;a.y-=this._imageNodePosition.y;return a},_updateImageNodePosition:function(){var a=c.position(this._imageNode);
this._imageNodePosition.y=a.y;this._imageNodePosition.x=a.x},addMouseMoveForExistingAnnotation:function(a){a=this._getEventPositionRelativeToCanvas(a);this._mouseDownPoint=[a.x,a.y];this._isMouseMove=!1;this._addMousemoveWindowListener();this._pivotPoint="translate"},_mouseDownHandler:function(a){dojo.stopEvent(a);this._updateImageNodePosition();var c=this._getEventPositionRelativeToCanvas(a);0>c.x||0>c.y||c.x>this._imageNodePosition.w||c.y>this._imageNodePosition.h?this._pivotPoint="":(this._isMouseMove=
!1,this._anchorPoint||(this._anchorPoint=[c.x+this._cursorOffset,c.y+this._cursorOffset]),this._pivotPoint="",this._mouseDownPoint=[c.x,c.y],this._endPoint?(c=this._getClosestVertex(a),10>c.distance?(this._pivotPoint=c.vertex,this._addMousemoveWindowListener()):this._isAlignedWithLine(a)?(this._addMousemoveWindowListener(),this._pivotPoint="translate"):this.commit()):this._addMousemoveWindowListener())},_addMouseupWindowListener:function(){this.addEventListener(window,"mouseup",this._mouseUpHandlerFcn)},
_removeMouseupWindowListener:function(){this.removeEventListener(window,"mouseup",this._mouseUpHandlerFcn)},_addMousedownWindowListener:function(){this.addEventListener(document,"mousedown",this._mouseDownHandlerFcn)},_removeMousedownWindowListener:function(){this.removeEventListener(document,"mousedown",this._mouseDownHandlerFcn)},_addMousemoveWindowListener:function(){this.addEventListener(window,"mousemove",this._mouseMoveHandlerFcn)},_removeMousemoveWindowListener:function(){this.removeEventListener(window,
"mousemove",this._mouseMoveHandlerFcn)},_mouseMoveListener:function(a){this._isMouseMove=!0;var c=this._getEventPositionRelativeToCanvas(a);this._anchorPoint&&2<=this._anchorPoint.length&&(!this._endPoint||"end"===this._pivotPoint)?this.draw(this._anchorPoint,[c.x+this._cursorOffset,c.y+this._cursorOffset]):this._endPoint&&2<=this._endPoint.length&&"anchor"===this._pivotPoint?this.draw([c.x+this._cursorOffset,c.y+this._cursorOffset],this._endPoint):"translate"===this._pivotPoint&&this._isPositioned()&&
(c=[c.x+this._cursorOffset-this._mouseDownPoint[0],c.y+this._cursorOffset-this._mouseDownPoint[1]],this.draw([this._anchorPoint[0]+c[0],this._anchorPoint[1]+c[1]],[this._endPoint[0]+c[0],this._endPoint[1]+c[1]]));a.stopPropagation()},_mouseUpListener:function(a){this._removeMousemoveWindowListener();var c=this._getEventPositionRelativeToCanvas(a);if(!this._isMouseMove)if(this._endPoint)this._pivotPoint="";else{this._rollback();a.stopPropagation();return}if(!this._endPoint||"end"===this._pivotPoint)this._endPoint=
[c.x+this._cursorOffset,c.y+this._cursorOffset];else if("anchor"===this._pivotPoint)this._anchorPoint=[c.x+this._cursorOffset,c.y+this._cursorOffset];else if("translate"===this._pivotPoint){var b=[c.x+this._cursorOffset-this._mouseDownPoint[0],c.y+this._cursorOffset-this._mouseDownPoint[1]];this._anchorPoint=[this._anchorPoint[0]+b[0],this._anchorPoint[1]+b[1]];this._endPoint=[this._endPoint[0]+b[0],this._endPoint[1]+b[1]]}(c.x>this._imageNodePosition.w||0>c.x||c.y>this._imageNodePosition.h||0>c.y)&&
this.commit();dojo.stopEvent(a)},_getAngleFromLine:function(a){a=this._getEventPositionRelativeToCanvas(a);var c=[a.x+this._cursorOffset,a.y+this._cursorOffset];a=[this._endPoint[0]-this._anchorPoint[0],this._endPoint[1]-this._anchorPoint[1]];var b=[c[0]-this._anchorPoint[0],c[1]-this._anchorPoint[1]],c=[c[0]-this._endPoint[0],c[1]-this._endPoint[1]],d=-c[0]*a[1]+c[1]*a[0],e=360/(2*Math.PI)*Math.asin((b[0]*a[1]-b[1]*a[0])/(Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2))*Math.sqrt(Math.pow(b[0],2)+Math.pow(b[1],
2))));0>b[0]*a[0]+b[1]*a[1]&&(e+=180);b=360/(2*Math.PI)*Math.asin(d/(Math.sqrt(Math.pow(a[0],2)+Math.pow(a[1],2))*Math.sqrt(Math.pow(b[0],2)+Math.pow(b[1],2))));0>c[0]*-a[0]+c[1]*-a[1]&&(b+=180);return[e,b]},_isAlignedWithLine:function(a){a=this._getAngleFromLine(a);return 10>Math.abs(a[0])&&90>Math.abs(a[1])||90>Math.abs(a[0])&&10>Math.abs(a[1])},_getClosestVertex:function(a){var c=this._getEventPositionRelativeToCanvas(a);a=Math.sqrt(Math.pow(c.x+this._cursorOffset-this._anchorPoint[0],2)+Math.pow(c.y+
this._cursorOffset-this._anchorPoint[1],2));c=Math.sqrt(Math.pow(c.x+this._cursorOffset-this._endPoint[0],2)+Math.pow(c.y+this._cursorOffset-this._endPoint[1],2));return a<=c?{distance:a,vertex:"anchor"}:{distance:c,vertex:"end"}},commit:function(){this._removeMouseupWindowListener();this._removeMousedownWindowListener();if(this._isPositioned()){var a=[this._anchorPoint[0]/this._imageNodePosition.w,this._anchorPoint[1]/this._imageNodePosition.h,this._endPoint[0]/this._imageNodePosition.w,this._endPoint[1]/
this._imageNodePosition.h],c=(0>a[1]||1<a[1])&&(0>a[3]||1<a[3]);(0>a[0]||1<a[0])&&(0>a[2]||1<a[2])||c?this._resetAnnotation("delete"):(this.emit("interaction",{fcn:"springLoadedModeAction",args:{type:this.matlabInteractionFunction,axesIndex:-1,configurationData:{relativePosition:a},mode:this.mode}}),document.body.removeEventListener("keydown",this._keyHandlerFcn,!0),this._reset())}else this._rollback()},_isPositioned:function(){return this._anchorPoint&&this._endPoint&&2==this._anchorPoint.length&&
2==this._endPoint.length&&!this._anchorPoint.some(function(a){return isNaN(a)})&&!this._endPoint.some(function(a){return isNaN(a)})},draw:function(a,c){throw Error("Subclasses should implement this method");},show:function(){this.previewDomNodes.forEach(function(a){b.set(a,"display","block")})},_isVisible:function(){return this.previewDomNodes&&0<this.previewDomNodes.length&&this.previewDomNodes[0]&&"block"===b.get(this.previewDomNodes[0],"display")},_reset:function(){this._anchorPoint=[];this._endPoint=
[]},_rollback:function(){this._removeMouseupWindowListener();this._removeMousedownWindowListener();this._reset();this.clearMode();document.body.removeEventListener("keydown",this._keyHandlerFcn,!0)},hide:function(a){!a&&this._isVisible()?this.commit():this._rollback();this._removeKeyListener();this._removeMouseupWindowListener();this._removeMousedownWindowListener();this._removeMousemoveWindowListener();this.inherited(arguments)},destroy:function(){this.inherited(arguments);this._removeKeyListener();
this._removeMouseupWindowListener();this._removeMousedownWindowListener()}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/SpringLoadedModePreview":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/dom-class dojo/dom-attr dojo/on dojo/Evented dijit/Destroyable".split(" "),function(g,f,e,d,b,a,c,h,k,l){return g([k,l],{previewDomNodes:null,parentNode:null,figureModel:null,figureView:null,mode:"",constructor:function(a,c){this.figureModel=
a;this.figureView=c},createDomNodes:function(c,b,d){c=e.create("div",{title:b},c);a.add(c,d);return c},addClickListener:function(a,c,d){h(a,"click",f.hitch(this,function(a){var e=0;this.previewDomNodes.forEach(function(a){a&&"block"==b.get(a,"display")&&e++});var h={fcn:"springLoadedModeAction",args:{type:c,axesIndex:d,configurationData:"",mode:this.mode,retainMode:2<=e}};1>=e&&this.hide();this.wait();dojo.stopEvent(a);this.emit("interaction",h)}))},showAffordances:function(a,c,b){throw Error("Subclasses should implement this method");
},positionAffordance:function(a,d,e,h,f,k,g,l){this.parentNode=h;this.previewDomNodes||(this.previewDomNodes=[]);this.previewDomNodes[k]||(this.previewDomNodes[k]=this.createDomNodes(h,l,g),this.addClickListener(this.previewDomNodes[k],f,k));a?b.set(this.previewDomNodes[k],{position:"absolute",top:e+"px",left:d+"px",width:a.w+"px",height:a.h+"px"}):b.set(this.previewDomNodes[k],{position:"absolute",top:e+"px",left:d+"px"});c.set(this.previewDomNodes[k],"data-tag",g+"."+f+"."+k)},show:function(){var a=
this.figureModel.getModeStateData();this.previewDomNodes.forEach(function(c,d){!a||0<a[d]?b.set(c,"display","block"):b.set(c,"display","none")});this.clearWait()},clearMode:function(a){var c={fcn:"springLoadedModeAction",args:{type:"clearMode",clearedMode:this.mode}};a&&(c.args.editType=a);this.emit("interaction",c)},isShowing:function(){return 0<this.previewDomNodes.length&&this.previewDomNodes.some(function(a){return"none"!==b.get(a,"display")})},hide:function(a){a=this.isShowing();this.previewDomNodes.forEach(function(a){e.destroy(a)});
this.previewDomNodes=[];a&&this.clearMode()},wait:function(){this.isShowing()&&(b.set(this.parentNode,"cursor","wait"),this.previewDomNodes.forEach(function(a){b.set(a,"cursor","wait")}))},clearWait:function(){this.isShowing()&&(b.set(this.parentNode,"cursor",""),this.previewDomNodes.forEach(function(a){b.set(a,"cursor","")}))},_getStringWidthInPixels:function(a,c){var d=document.createElement("canvas").getContext("2d"),e=b.get(c,"fontSize"),h=b.get(c,"fontFamily"),f=b.get(c,"fontWeight");d.font=
f+" "+e+" "+h;return d.measureText(a).width},destroy:function(){this.previewDomNodes.forEach(function(a){e.destroy(a)})}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/ArrowAnnotation":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-class dojo/dom-style dojo/dom-construct dojo/dom-geometry dojo/on dojo/keys MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/Annotation".split(" "),function(g,f,e,d,b,a,c,h,k){return g([k],{matlabInteractionFunction:"arrow",mode:"placedArrowMode",
draw:function(a,c){var b=this._canvas.getContext("2d");b.clearRect(0,0,this._canvas.width,this._canvas.height);b.lineWidth=1;b.beginPath();var d=[a[0],a[1]],e=[c[0],c[1]],h=[c[0],c[1]],f=[h[0]-d[0],h[1]-d[1]],k=Math.sqrt(Math.pow(f[0],2)+Math.pow(f[1],2));f[0]/=k;f[1]/=k;var k=0==h[1]-d[1]?[0,1]:[1,-(h[0]-d[0])/(h[1]-d[1])],g=Math.sqrt(k[0]*k[0]+k[1]*k[1]);k[0]/=g;k[1]/=g;e[0]-=10*f[0];e[1]-=10*f[1];b.moveTo(d[0],d[1]);b.lineTo(e[0],e[1]);b.moveTo(e[0]+5*k[0],e[1]+5*k[1]);b.lineTo(e[0]+10*f[0],e[1]+
10*f[1]);b.lineTo(e[0]-5*k[0],e[1]-5*k[1]);b.fill();b.rect(d[0]-2,d[1]-2,4,4);b.rect(h[0]-2,h[1]-2,4,4);b.stroke()}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/DoubleArrowAnnotation":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-class dojo/dom-style dojo/dom-construct dojo/dom-geometry dojo/on dojo/keys MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/Annotation".split(" "),function(g,f,e,d,b,a,c,h,k){return g([k],{matlabInteractionFunction:"doublearrow",
mode:"placedDoubleArrowMode",draw:function(a,c){var b=this._canvas.getContext("2d");b.clearRect(0,0,this._canvas.width,this._canvas.height);b.lineWidth=1;b.beginPath();var d=[a[0],a[1]],e=[c[0],c[1]],h=[c[0],c[1]],f=[a[0],a[1]],k=[h[0]-d[0],h[1]-d[1]],g=Math.sqrt(Math.pow(k[0],2)+Math.pow(k[1],2));k[0]/=g;k[1]/=g;var g=0==h[1]-d[1]?[0,1]:[1,-(h[0]-d[0])/(h[1]-d[1])],v=Math.sqrt(g[0]*g[0]+g[1]*g[1]);g[0]/=v;g[1]/=v;e[0]-=10*k[0];e[1]-=10*k[1];d[0]+=10*k[0];d[1]+=10*k[1];b.moveTo(d[0],d[1]);b.lineTo(e[0],
e[1]);b.moveTo(e[0]+5*g[0],e[1]+5*g[1]);b.lineTo(e[0]+10*k[0],e[1]+10*k[1]);b.lineTo(e[0]-5*g[0],e[1]-5*g[1]);b.fill();b.moveTo(d[0]+5*g[0],d[1]+5*g[1]);b.lineTo(d[0]-10*k[0],d[1]-10*k[1]);b.lineTo(d[0]-5*g[0],d[1]-5*g[1]);b.fill();b.rect(f[0]-2,f[1]-2,4,4);b.rect(h[0]-2,h[1]-2,4,4);b.stroke()}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/TextArrowAnnotation":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-class dojo/dom-style dojo/dom-construct dojo/dom-geometry dojo/on dojo/touch dojo/keys dijit/focus MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/ArrowAnnotation".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m){return g([m],{matlabInteractionFunction:"textarrow",mode:"placedTextArrowMode",_textField:null,_textFocusListener:null,_mouseDownOnText:!1,_VERTICAL_GAP:3,createDomNodes:function(a,k){var g=this.inherited(arguments);this._textField=b.create("input");d.set(this._textField,"visibility","hidden");b.place(this._textField,g);e.add(this._textField,"textArrowText");this.own(c(this._textField,h.press,function(a){a.stopPropagation()}));this.own(c(this._textField,h.release,function(a){a.stopPropagation()}));
this.own(c(this._textField,"click",function(a){a.stopPropagation()}));this.own(c(this._textField,"keydown",f.hitch(this,"doResize")));this.own(c(this._textField,"contextmenu",function(a){dojo.stopEvent(a)}));this.createFocusTextListener();return g},createFocusTextListener:function(){this._textFocusListener=f.hitch(this,"_documentMouseClickHandler");document.body.addEventListener("click",this._textFocusListener,!0)},_mouseUpListener:function(a){this._mouseDownOnText?this._mouseDownOnText=!1:this.inherited(arguments)},
_mouseMoveListener:function(a){this._mouseDownOnText||this.inherited(arguments)},_mouseDownHandler:function(a){a.target===this._textField?this._mouseDownOnText=!0:this.inherited(arguments)},_keyHandler:function(a){l.curNode===this._textField?k.ENTER===this._getKeyCode(a)&&(this.commit(),a.stopPropagation(),a.preventDefault()):this.inherited(arguments)},_documentMouseClickHandler:function(a){this._textField.focus();this.removeTextFocusListener();a.stopPropagation();this.emit("startEditing",a)},showAffordances:function(a,
c,b){this.inherited(arguments);this._textField.value="";d.set(this._textField,"visibility","hidden");d.set(this._textField,"width","")},draw:function(a,c){this.inherited(arguments);if(!a||!(2<=a.length&&c&&2<=c.length))d.set(this._textField,"visibility","hidden");else{var b=this._imageNodePosition;a[1]>c[1]?(d.set(this._textField,"top",a[1]+this._VERTICAL_GAP+"px"),d.set(this._textField,"bottom","")):(d.set(this._textField,"bottom",b.h-a[1]+this._VERTICAL_GAP+"px"),d.set(this._textField,"top",""));
d.set(this._textField,"right",b.w-a[0]+"px");d.set(this._textField,"visibility","visible")}},commit:function(){if(this._isPositioned()){var a=[this._anchorPoint[0]/this._imageNodePosition.w,this._anchorPoint[1]/this._imageNodePosition.h,this._endPoint[0]/this._imageNodePosition.w,this._endPoint[1]/this._imageNodePosition.h],c=(0>a[1]||1<a[1])&&(0>a[3]||1<a[3]);(0>a[0]||1<a[0])&&(0>a[2]||1<a[2])||c?this._resetAnnotation("delete"):(a={fcn:"springLoadedModeAction",args:{type:this.matlabInteractionFunction,
axesIndex:-1,configurationData:{relativePosition:a,text:this._textField.value},mode:this.mode}},this._textField.blur(),this.emit("interaction",a),document.body.removeEventListener("keydown",this._keyHandlerFcn,!0),this._reset())}else this._rollback()},doResize:function(c){c=1.2*this._getStringWidthInPixels(this._textField.value,this._textField);var b=a.position(this._textField);c>b.w&&b.x-(c-b.w)>this._imageNodePosition.x&&d.set(this._textField,"width",c+"px")},hide:function(a){this.removeTextFocusListener();
this.inherited(arguments)},destroy:function(){this.removeTextFocusListener();this.inherited(arguments)},removeTextFocusListener:function(){document.body.removeEventListener("click",this._textFocusListener,!0)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/ChartHandler":function(){define("dojo/_base/declare dojo/Evented dijit/Destroyable dojo/touch dojo/on dojo/dom-style dojo/_base/lang dojo/_base/event MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/EventUtils".split(" "),function(g,
f,e,d,b,a,c,h,k){return g([f,e,k],{_figureView:null,_figureModel:null,_eventHandler:null,_cursorHotSpot:null,_windowMouseUpListener:null,_windowMouseMoveListener:null,_lastMouseDownLocation:null,_currentAxesIndex:null,_cursorImagePath:null,_overChartOrAxes:!1,_MODELESS_INTERACTION:"modeLessInteractionCallback",_CHART_INTERACTION:"CHART_INTERACTION",_codeGen:null,constructor:function(a,c,b,d,e){this._figureView=a;this._figureModel=c;this._eventHandler=b;this._cursorImagePath=d;this._cursorHotSpot=
[0,0];this._codeGen=e},setState:function(a){this._figureModel=a},_getMouseEventData:function(a){return this._figureModel.getMouseEventData(a,this._figureView,this._cursorHotSpot)},_checkIfMouseOverInteractiveChart:function(a){a=this._figureModel.getChartType()[a.MouseOverAxes.Index];return"geobubble"===a||"heatmap"===a||"axes"===a||"geoaxes"===a||"stackedplot"===a},WindowMouseDownHandler:function(a){if(this._checkIfMouseOverInteractiveChart(a)){this._windowMouseMoveListener||(this._windowMouseMoveListener=
b.pausable(window,d.move,c.hitch(this,"WindowMouseMoveHandler")));this._windowMouseMoveListener.resume();this.removeEventListener(window,"mouseup",this._windowMouseUpListener);this._windowMouseUpListener=c.hitch(this,"WindowMouseUpHandler");this.addEventListener(window,"mouseup",this._windowMouseUpListener);var e=this;e._eventHandler.processEvent(function(a){e._emitChartInteraction("WindowMousePress",a)},a);this._currentAxesIndex=a.MouseOverAxes.Index;h.stop(a)}this._lastMouseDownLocation=this.getEventPosition(a)},
WindowMouseMoveHandler:function(a){a=this._getMouseEventData(a);this._overChartOrAxes=a.isMouseOverChart||a.MouseOverAxes.isInside;if(!this.hasMouseClicked(a,this._lastMouseDownLocation)&&(null!=this._currentAxesIndex||-1<a.MouseOverAxes.Index)){var c=this;a.isDragEvent=this._isDragEvent(a);c._eventHandler.processEvent(function(a){c._emitChartInteraction("WindowMouseMotion",a)},a)}},WindowMouseLeaveHandler:function(a){if(this._overChartOrAxes){this._overChartOrAxes=!1;a=this._getMouseEventData(a);
var c=this;c._eventHandler.processEvent(function(a){c._emitChartInteraction("WindowMouseLeave",a)},a)}},WindowMouseUpHandler:function(a){a=this._getMouseEventData(a);var c=this;this._codeGen&&this._isDragEvent(a)&&this._codeGen.attach(this._figureView.getGraphicsViewContainerNode());c._eventHandler.processEvent(function(a){c._emitChartInteraction("WindowMouseRelease",a);c._currentAxesIndex=null},a);this._windowMouseMoveListener&&this._windowMouseMoveListener.pause();this._lastMouseDownLocation=null;
this.removeEventListener(window,"mouseup",this._windowMouseUpListener);h.stop(a)},WindowMouseWheelHandler:function(a){if(this._checkIfMouseOverInteractiveChart(a)){var c=this;c._eventHandler.processEvent(function(a){c._emitChartInteraction("WindowScrollWheel",a)},a);h.stop(a)}},_isDragEvent:function(a){return!this.hasMouseClicked(a,this._lastMouseDownLocation)&&null!=this._lastMouseDownLocation},_emitChartInteraction:function(a,c){var b=this.getEventPosition(c),b={x:b.x,y:b.y},b=this.addCursorOffset(b,
this._cursorHotSpot),b=this.convertEventToMatlabRelativeCoords(b,this._figureView.getDomNode()),b={type:this._CHART_INTERACTION,interaction:a,x:b.x,y:b.y,isDragEvent:c.isDragEvent?c.isDragEvent:!1};this.isEventInsideAxes(c,this._figureView.getDomNode())?b.axesIndex=c.MouseOverAxes.Index:b.axesIndex=this._currentAxesIndex;b.chartType=this._figureModel._chartType[b.axesIndex];"WindowScrollWheel"===a&&(b.wheelDelta=c.deltaY/120||c.detail/3);this.emit(this._CHART_INTERACTION,{fcn:this._MODELESS_INTERACTION,
args:b})},destroy:function(){this.removeEventListener(window,"mouseup",this._windowMouseUpListener);this._windowMouseMoveListener&&this._windowMouseMoveListener.pause()}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/ModeManager":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/event dojo/dom-class dojo/dom-construct dojo/dom-style dojo/dom-geometry dojo/on dojo/touch dojo/Evented dijit/Destroyable dojo/has MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/ROI MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/InteractionsContextMenu MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/GhostLegend MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/GhostColorbar MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/GhostGrid MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/GhostXGrid MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/GhostYGrid MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/GhostTitle MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/GhostXLabel MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/GhostYLabel MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/LineAnnotation MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/ArrowAnnotation MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/DoubleArrowAnnotation MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/TextArrowAnnotation MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/EventUtils".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x,y,B,D,E,F,I){return g([l,m,I],{_figureView:null,_figureModel:null,_windowMouseMoveListener:null,_windowMouseUpListener:null,_ROI:null,_codeGen:null,_eventHandler:null,_maintainROI:!1,_lastMouseDownLocation:null,_currentAxesPosition:null,_cursorTimeout:null,_cursorHotSpot:null,_interactionContextMenu:null,_lastMouseMoveEvent:null,_isIEBrowser:!1,_springLoadedAffordanceObjects:null,_springLoadedAffordanceModules:null,_undoRedoManager:null,_MODE_INTERACTION:"modeInteraction",
_cursorImagePath:null,constructor:function(a){this._figureView=a.figureView;this._figureModel=a.figureModel;this._codeGen=a.codeGenerator;a.actionService&&a.contextMenuGenerator&&this._addInteractionsContextMenu(a.actionService,a.contextMenuGenerator);this._cursorHotSpot=[0,0];this._isIEBrowser=this._checkIfIEBrowser();this._springLoadedAffordanceObjects={placedLegendMode:null,placedColorbarMode:null,placedGridMode:null,placedXGridMode:null,placedYGridMode:null,placedTitleMode:null,placedXLabelMode:null,
placedYLabelMode:null,placedLineMode:null,placedArrowMode:null,placedDoubleArrowMode:null,placedTextArrowMode:null};this._springLoadedAffordanceModules={placedLegendMode:r,placedColorbarMode:s,placedGridMode:t,placedXGridMode:u,placedYGridMode:v,placedTitleMode:w,placedXLabelMode:x,placedYLabelMode:y,placedLineMode:B,placedArrowMode:D,placedDoubleArrowMode:E,placedTextArrowMode:F}},setCursorImagePath:function(a){this._cursorImagePath=a},setEventHandler:function(a){this._eventHandler=a},_addInteractionsContextMenu:function(a,
c){this._interactionContextMenu=new q(a,c,this._figureView,this._figureModel);h(this._interactionContextMenu,"ModeContextMenuAction",f.hitch(this,"_WindowMouseRightClick"))},WindowButtonMouseDown:function(a){if(this._springLoadedAffordanceModules.hasOwnProperty(this._figureModel.getMode()))this.notify("ModeWindowButtonMouseDown",a),this.removeEventListener(window,"mouseup",this._windowMouseUpListener),this._windowMouseUpListener=f.hitch(this,function(a){this.notify("ModeWindowButtonMouseUp",a);this.removeEventListener(window,
"mouseup",this._windowMouseUpListener)}),this.addEventListener(window,"mouseup",this._windowMouseUpListener);else{if(""!==this._figureModel.getMode()&&this.isEventInsideAxes(a,this._figureView.getDomNode())||"Exploration.Datacursor"===this._figureModel.getMode()){if(this._isPZRenabled(a)){this._windowMouseMoveListener||(this._windowMouseMoveListener=h.pausable(window,k.move,f.hitch(this,"ModeWindowButtonMouseMove")));this._windowMouseMoveListener.resume();this.removeEventListener(window,"mouseup",
this._windowMouseUpListener);this._windowMouseUpListener=f.hitch(this,"ModeWindowButtonMouseUp");this.addEventListener(window,"mouseup",this._windowMouseUpListener);var b=this;b._eventHandler.processEvent(function(a){b.notify("WindowButtonMouseDown",a)},a);if("Exploration.Zoom"===this._figureModel.getMode()&&"in"===this._figureModel.getZoomDirection()){this._ROI||(this._ROI=new n(this._figureView._wrapperElement));var d=c.position(this._figureView._wrapperElement);this._ROI.setTopLeft(d.y,d.x);d=
this.addCursorOffset(a,this._cursorHotSpot);this._ROI.setAnchorPoint(d.x,d.y);this._currentAxesPosition=a.MouseOverAxes.axesPlotBox}}e.stop(a)}this._lastMouseDownLocation=this.getEventPosition(a)}},WindowButtonMouseMove:function(a){var c=this._figureModel.getMode(),b=this._figureModel.getZoomDirection();this._lastMouseMoveEvent=a;this.removeCursorStyle();this.isEventInsideAxes(a,this._figureView.getDomNode())&&this._isPZRenabled(a)&&this.applyCursorStyle(c,b,a)},_isPZRenabled:function(a){var c=!0,
b=this._figureModel.getIsPZREnabled();this.isEventInsideAxes(a,this._figureView.getDomNode())&&(b&&b.length>=a.MouseOverAxes.Index)&&(c=0!==b[a.MouseOverAxes.Index]);return c},WindowMouseDblClick:function(a){if(""!==this._figureModel.getMode()&&this.isEventInsideAxes(a,this._figureView.getDomNode())){var c=this;c._eventHandler.processEvent(function(a){c.notify("WindowMouseDblClick",a);c._insertFigureInteractions({type:"WindowMouseDblClick",interactionType:c._MODE_INTERACTION})},a)}},_WindowMouseRightClick:function(a){this._eventHandler.clearEventQueue();
""!==this._figureModel.getMode()&&this.isEventInsideAxes(a,this._figureView.getDomNode())&&(this.notify("WindowMouseRightClick",a),this._insertFigureInteractions({type:"WindowMouseRightClick",interactionType:this._MODE_INTERACTION,tag:a.Tag}),"ResetView"!==a.Tag&&"Reset"!==a.Tag&&this._codeGen&&this._codeGen.attach(this._figureView.getGraphicsViewContainerNode()));e.stop(a)},updateContextMenuEventData:function(a){this._interactionContextMenu.updateContextMenuEventData(a)},WindowButtonMouseWheel:function(a){if("Exploration.Zoom"===
this._figureModel.getMode()&&!a.isMouseOverChart){var c=this;c._eventHandler.processEvent(function(a){c.notify("WindowButtonMouseWheel",a);c._insertFigureInteractions({type:"WindowButtonMouseWheel",interactionType:c._MODE_INTERACTION})},a);e.stop(a)}},ModeWindowButtonMouseMove:function(a){a=this._getMouseEventData(a);if("Exploration.Zoom"===this._figureModel.getMode()&&"in"===this._figureModel.getZoomDirection()){var c=null;this.isEventInsideAxes(a,this._figureView.getDomNode())&&this._isEventOverTheSameAxes(a)&&
this._isCurrentAxes2D(a)?(c=this.addCursorOffset(a,this._cursorHotSpot),c=this._clipXYbyAxesPlotBox(a.MouseOverAxes.axesPlotBox,c.x,c.y),this._maintainROI=!0):this._maintainROI&&(c=this.getEventPosition(a),c=this._clipXYbyAxesPlotBox(this._currentAxesPosition,c.x,c.y));if(c){this._ROI.drawROI(c.x,c.y);return}}if(!this.hasMouseClicked(a,this._lastMouseDownLocation)){var b=this;b._eventHandler.processEvent(function(a){b.notify("ModeWindowButtonMouseMove",a)},a)}e.stop(a)},ModeWindowButtonMouseUp:function(a){var c=
"Exploration.Datacursor"==this._figureModel.getMode();this._windowMouseMoveListener.pause();this.removeEventListener(window,"mouseup",this._windowMouseUpListener);a=this._getMouseEventData(a);this._ROI&&(this._ROI.hide(),this._ROI.resetAnchorPoint());this._maintainROI=!1;var b=this;b._eventHandler.processEvent(function(a){b.notify("ModeWindowButtonMouseUp",a);if(!c){var d=b.getEventPosition(a);b._insertFigureInteractions({type:"ModeWindowButtonMouseUp",x:d.x,y:d.y,interactionType:b._MODE_INTERACTION});
d="Exploration.Pan"===b._figureModel.getMode()||"Exploration.Rotate3d"===b._figureModel.getMode();b._codeGen&&(d&&!b.hasMouseClicked(a,b._lastMouseDownLocation)?b._codeGen.attach(b._figureView.getGraphicsViewContainerNode()):d||b._codeGen.attach(b._figureView.getGraphicsViewContainerNode()))}},a);this._currentAxesPosition=null;e.stop(a)},removeCursorStyle:function(){var c=this._figureView.getDomNode();this._checkIfIEBrowser()?a.set(c,"cursor",""):(d.remove(c,"panCursor"),d.remove(c,"rotateCursor"),
d.remove(c,"zoomCursor"),d.remove(c,"zoom3DCursor"),d.remove(c,"zoomOutCursor"),d.remove(c,"datatipCursor"))},applyCursorStyle:function(a,c,b){if(!b||!b.isMouseOverChart){var d=this._figureView.getDomNode();this._setCursorStyle(a,c,b,d);this._cursorHotSpot=this._isIEBrowser?[0,0]:[7,7]}},_setCursorStyle:function(a,c,b,e){switch(a){case "Exploration.Pan":this._isIEBrowser?this._setCursorImageStyleForIE(e,"pan_cursor.cur"):d.add(e,"panCursor");break;case "Exploration.Rotate3d":this._isIEBrowser?this._setCursorImageStyleForIE(e,
"rotate_cursor.cur"):d.add(e,"rotateCursor");break;case "Exploration.Zoom":"in"===c?b&&this._isCurrentAxes2D(b)?this._isIEBrowser?this._setCursorImageStyleForIE(e,"zoomin_cursor.cur"):d.add(e,"zoomCursor"):this._isIEBrowser?this._setCursorImageStyleForIE(e,"zoomin_cursor3D.cur"):d.add(e,"zoom3DCursor"):"out"===c&&(this._isIEBrowser?this._setCursorImageStyleForIE(e,"zoomout_cursor.cur"):d.add(e,"zoomOutCursor"));break;case "Exploration.Datacursor":this._isIEBrowser?this._setCursorImageStyleForIE(e,
"datatip_cursor.cur"):d.add(e,"datatipCursor")}},_setCursorImageStyleForIE:function(c,b){a.set(c,"cursor","url("+this._cursorImagePath+"figurefloatingpalette/"+b+"), default")},_isEventOverTheSameAxes:function(a){return this._currentAxesPosition&&this._currentAxesPosition.xLow===a.MouseOverAxes.axesPlotBox.xLow&&this._currentAxesPosition.xHigh===a.MouseOverAxes.axesPlotBox.xHigh&&this._currentAxesPosition.yLow===a.MouseOverAxes.axesPlotBox.yLow&&this._currentAxesPosition.yHigh===a.MouseOverAxes.axesPlotBox.yHigh},
_isCurrentAxes2D:function(a){return 1===this._figureModel.getIs2D()[a.MouseOverAxes.Index]},_setupInteractionEvents:function(a){this.own(a.on("interaction",f.hitch(this,function(a){this.emit("interaction",a)})))},isInSpringLoadedMode:function(){return this._springLoadedAffordanceObjects.hasOwnProperty(this._figureModel.getMode())},setState:function(a){this._figureModel=a;this.removeCursorStyle();this.applyCursorStyle(this._figureModel.getMode(),this._figureModel.getZoomDirection(),this._lastMouseMoveEvent);
this._cursorTimeout&&clearTimeout(this._cursorTimeout);var c=this._figureView.getDomNode();c&&d.remove(c,"waitCursor");c=!1;null!==a.getUndoRedoData()&&a.getUndoRedoData().isUndoRedo&&(c=!0);for(var b in this._springLoadedAffordanceObjects)this._figureModel.getMode()!==b&&this._springLoadedAffordanceObjects[b]?(this._springLoadedAffordanceObjects[b].clearWait(),this._springLoadedAffordanceObjects[b].hide(c)):this._figureModel.getMode()===b&&(this._springLoadedAffordanceObjects[b]?this._springLoadedAffordanceObjects[b].showAffordances(this._figureModel.getAxesPositions(),
this._figureView.getWrapperNode(),this._figureView.getDomNode()):(this._springLoadedAffordanceObjects[b]=new this._springLoadedAffordanceModules[b](this._figureModel,this._figureView),this.own(h(this._springLoadedAffordanceObjects[b],"WindowButtonMouseDown",f.hitch(this,function(a){this.WindowButtonMouseDown(a)}))),this.own(h(this._springLoadedAffordanceObjects[b],"startEditing",f.hitch(this,function(a){this.emit("startEditing",a)}))),this._springLoadedAffordanceObjects[b].showAffordances(this._figureModel.getAxesPositions(),
this._figureView.getWrapperNode(),this._figureView.getDomNode()),this._setupInteractionEvents(this._springLoadedAffordanceObjects[b])))},setUndoRedoManager:function(a){this._undoRedoManager=a},notify:function(a,c){var b=this.getEventPosition(c),b={x:b.x,y:b.y},b=this.addCursorOffset(b,this._cursorHotSpot),b=this.convertEventToMatlabRelativeCoords(b,this._figureView.getDomNode()),b={type:a,x:b.x,y:b.y};this.isEventInsideAxes(c,this._figureView.getDomNode())&&(b.axesIndex=c.MouseOverAxes.Index);"WindowButtonMouseWheel"===
a&&(b.wheelDelta=c.deltaY/120||c.detail/3);"WindowMouseRightClick"===a&&(b.Tag=c.Tag);this.emit("interaction",{fcn:"modeInteractionCallback",args:b})},destroy:function(){this._ROI&&this._ROI.destroy();this._codeGen&&this._codeGen.destroy();this._windowMouseMoveListener&&this._windowMouseMoveListener.pause();for(var a in this._springLoadedAffordanceObjects)this._springLoadedAffordanceObjects[a]&&this._springLoadedAffordanceObjects[a].destroy();this.removeEventListener(window,"mouseup",this._windowMouseUpListener)},
_clipXYbyAxesPlotBox:function(a,c,b){var d=a.yHigh,e=a.yLow,h=a.xHigh;a=a.xLow;var f={};f.y=b>d?d:b<e?e:b;f.x=c<a?a:c>h?h:c;return f},switchLayouts:function(){this._springLoadedAffordanceObjects[this._figureModel.getMode()]&&this._springLoadedAffordanceObjects[this._figureModel.getMode()].hide()},setModeFromClient:function(a){this._cursorTimeout&&clearTimeout(this._cursorTimeout);a&&a!==this._figureModel.getMode()&&(this._cursorTimeout=setTimeout(f.hitch(this,function(){d.add(this._figureView.getDomNode(),
"waitCursor")}),300));this._figureModel.setMode(a);this._figureModel.setIsPZREnabled("Exploration.Pan"===a||"Exploration.Zoom"===a||"Exploration.Rotate3d"===a)},isSpringLoadedMode:function(a){return this._springLoadedAffordanceModules.hasOwnProperty(a)},_getMouseEventData:function(a){return this._figureModel.getMouseEventData(a,this._figureView,this._cursorHotSpot)},_checkIfIEBrowser:function(){return p("trident")||p("ie")||p("edge")},_insertFigureInteractions:function(a){a.codeGenState={attachCodeGenOnUndo:!1,
attachCodeGenOnRedo:!0};this._codeGen&&this._codeGen.isCodeGenAttached()&&(a.codeGenState.attachCodeGenOnUndo=!0);this._undoRedoManager.insertInteractionsForUndoRedo(this._figureModel,a)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/ROI":function(){define(["dojo/_base/declare","dojo/dom-class","dojo/dom-style","dojo/dom-construct"],function(g,f,e,d){return g(null,{_domNode:null,_anchorPoint:null,_parentNode:null,_constraintLine:null,_top:0,_left:0,useConstraint:!0,color:"#0099ff",_CONSTRAINT_VIEW_THRESHOLD:15,
_CENTER_OF_ROI:6,constructor:function(b){this._domNode=d.create("div");f.add(this._domNode,"figuremoderoi");f.add(this._domNode,"figureWidget");this._setParentNode(b);this._createConstraintLine();this.setColor(this.color)},_createConstraintLine:function(){this._constraintLine=d.create("div");f.add(this._constraintLine,"constraintLine constraintLineHorizontal constraintLineVertical");d.place(this._constraintLine,this._domNode)},setAnchorPoint:function(b,a){this._anchorPoint=[b,a]},resetAnchorPoint:function(){this._anchorPoint=
null},hide:function(){f.remove(this._domNode,"roiShow");f.add(this._domNode,"roiHidden")},setUseConstraint:function(b){this.useConstraint=b},drawROI:function(b,a){if(this._anchorPoint){var c=b-this._anchorPoint[0],d=this._anchorPoint[0]-this._left,f=a-this._anchorPoint[1],g=this._anchorPoint[1]-this._top,m=Math.abs(f),p=Math.abs(c),n=this.useConstraint&&this._isRectangleShortAndFat(m,p),q=this.useConstraint&&this._isRectangleThinAndTall(m,p);0>f&&!n&&(g+=f);0>c&&!q&&(d+=c);c=e.get(this._domNode,"border-width");
e.set(this._domNode,{height:m+"px",width:p+"px",left:d-c+"px",top:g-c+"px"});this.useConstraint&&(this._clearConstraintClasses(),this._drawConstraintROI(m,p));this._show()}},_isRectangleShortAndFat:function(b,a){return b<this._CONSTRAINT_VIEW_THRESHOLD&&a>this._CONSTRAINT_VIEW_THRESHOLD},_isRectangleThinAndTall:function(b,a){return a<this._CONSTRAINT_VIEW_THRESHOLD&&b>this._CONSTRAINT_VIEW_THRESHOLD},_drawConstraintROI:function(b,a){if(this._isRectangleShortAndFat(b,a)){var c=e.get(this._domNode,
"top");e.set(this._domNode,{height:this._CONSTRAINT_VIEW_THRESHOLD+"px",top:c-this._CENTER_OF_ROI+"px"});f.add(this._domNode,"roiHorizontal")}else this._isRectangleThinAndTall(b,a)&&(c=e.get(this._domNode,"left"),e.set(this._domNode,{width:this._CONSTRAINT_VIEW_THRESHOLD+"px",left:c-this._CENTER_OF_ROI+"px"}),f.add(this._domNode,"roiVertical"))},setColor:function(b){e.set(this._domNode,{borderColor:b})},setTopLeft:function(b,a){this._top=b;this._left=a},_setParentNode:function(b){d.place(this._domNode,
b);this._parentNode=b},_clearConstraintClasses:function(){f.remove(this._domNode,"roiHorizontal");f.remove(this._domNode,"roiVertical")},_show:function(){f.remove(this._domNode,"roiHidden");f.add(this._domNode,"roiShow")},destroy:function(){this._domNode&&d.destroy(this._domNode)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/InteractionsContextMenu":function(){define("dojo/_base/declare dojo/dom-style dojo/Evented dojo/_base/lang mw-actiondataservice/ActionDataService dojo/i18n!l10n/nls/actions dojo/aspect".split(" "),
function(g,f,e,d,b,a,c){return g([e],{_actionService:null,_modeActions:null,_contextMenuEvent:{},_contextMenuGenerator:null,_figureView:null,_figureModel:null,_ZOOM_IN_INDEX:0,_ZOOM_OUT_INDEX:1,_RESET_VIEW_INDEX:2,_RESET_INDEX:3,_ROTATEXY_INDEX:4,_ROTATEXZ_INDEX:5,_ROTATEYZ_INDEX:6,constructor:function(a,c,b,d){this._actionService=a;this._contextMenuGenerator=c;this._figureView=b;this._figureModel=d;this._setModeActions();this._setAspectHandles()},_setAspectHandles:function(){this._aspectHandles=
[];this._aspectHandles.push(c.before(this._contextMenuGenerator,"willOpen",d.hitch(this,"_removeModeMenuActions"),!0));this._aspectHandles.push(c.after(this._contextMenuGenerator,"willOpen",d.hitch(this,"_updateContextMenu"),!0));this._aspectHandles.push(c.after(this._contextMenuGenerator,"onClose",d.hitch(this,"_enableActions"),!0))},destroy:function(){this._removeModeActions(this._modeActions);this._aspectHandles.forEach(function(a){a.remove()});this._aspectHandles=[]},updateContextMenuEventData:function(a){this._contextMenuEvent=
a},_setModeActions:function(){this._modeActions=[];this._modeActions[this._ZOOM_IN_INDEX]={id:"figure_zoom_in",enabled:!0,contextMenuGroup:"ModeInteraction",text:a.zoomInLabel,callback:d.hitch(this,this._modeEventData,"ZoomInOut")};this._modeActions[this._ZOOM_OUT_INDEX]={id:"figure_zoom_out",enabled:!0,contextMenuGroup:"ModeInteraction",text:a.zoomOutLabel,callback:d.hitch(this,this._modeEventData,"ZoomInOut")};this._modeActions[this._RESET_VIEW_INDEX]={id:"figure_reset_mode",enabled:!0,contextMenuGroup:"ModeInteraction",
text:a.resetFigure,callback:d.hitch(this,this._modeEventData,"ResetView")};this._modeActions[this._ROTATEXY_INDEX]={id:"figure_rotate_xy",enabled:!0,contextMenuGroup:"ModeInteraction",text:a.XYRotate,callback:d.hitch(this,this._modeEventData,"SnapToXY")};this._modeActions[this._ROTATEXZ_INDEX]={id:"figure_rotate_xz",enabled:!0,contextMenuGroup:"ModeInteraction",text:a.XZRotate,callback:d.hitch(this,this._modeEventData,"SnapToXZ")};this._modeActions[this._ROTATEYZ_INDEX]={id:"figure_rotate_yz",enabled:!0,
contextMenuGroup:"ModeInteraction",text:a.YZRotate,callback:d.hitch(this,this._modeEventData,"SnapToYZ")};this._modeActions[this._RESET_INDEX]={id:"figure_reset_rotatemode",enabled:!0,contextMenuGroup:"ModeInteraction",text:a.resetFigure,callback:d.hitch(this,this._modeEventData,"Reset")}},_removeModeMenuActions:function(a,c){this._removeModeActions(this._modeActions)},_updateContextMenu:function(a,c){if(c===this._figureView._imgElement){var b=this._actionService,d=f.get(c,"cursor");if(0<=d.indexOf("pan_cursor"))this._setPanModeAction(),
b.disableAction("rtc_clear_all_output");else if(0<=d.indexOf("zoomout_cursor"))this._setZoomOutAction(),b.disableAction("rtc_clear_all_output");else if(0<=d.indexOf("rotate_cursor"))this._setRotateAction(),b.disableAction("rtc_clear_all_output");else if(0<=d.indexOf("zoomin_cursor")||0<=d.indexOf("zoomin_cursor3D"))this._setZoomInAction(),b.disableAction("rtc_clear_all_output")}},_setZoomInAction:function(){this._addModeActions([this._modeActions[this._ZOOM_OUT_INDEX],this._modeActions[this._RESET_VIEW_INDEX]]);
this._removeModeActions([this._modeActions[this._ZOOM_IN_INDEX],this._modeActions[this._RESET_INDEX],this._modeActions[this._ROTATEXY_INDEX],this._modeActions[this._ROTATEXZ_INDEX],this._modeActions[this._ROTATEYZ_INDEX]])},_setPanModeAction:function(){this._addModeActions([this._modeActions[this._RESET_VIEW_INDEX]]);this._removeModeActions([this._modeActions[this._ZOOM_OUT_INDEX],this._modeActions[this._ZOOM_IN_INDEX],this._modeActions[this._RESET_INDEX],this._modeActions[this._ROTATEXY_INDEX],this._modeActions[this._ROTATEXZ_INDEX],
this._modeActions[this._ROTATEYZ_INDEX]])},_setZoomOutAction:function(){this._addModeActions([this._modeActions[this._ZOOM_IN_INDEX],this._modeActions[this._RESET_VIEW_INDEX]]);this._removeModeActions([this._modeActions[this._ZOOM_OUT_INDEX],this._modeActions[this._RESET_INDEX],this._modeActions[this._ROTATEXY_INDEX],this._modeActions[this._ROTATEXZ_INDEX],this._modeActions[this._ROTATEYZ_INDEX]])},_setRotateAction:function(){this._addModeActions([this._modeActions[this._RESET_INDEX],this._modeActions[this._ROTATEXY_INDEX],
this._modeActions[this._ROTATEXZ_INDEX],this._modeActions[this._ROTATEYZ_INDEX]]);this._removeModeActions([this._modeActions[this._ZOOM_IN_INDEX],this._modeActions[this._ZOOM_OUT_INDEX],this._modeActions[this._RESET_VIEW_INDEX]])},_addModeActions:function(a){var c=this._actionService;a.forEach(function(a){c.getAction(a.id)||c.addAction(a)})},_removeModeActions:function(a){var c=this._actionService;a.forEach(function(a){c.getAction(a.id)&&c.removeAction(a.id)})},_enableActions:function(){this._actionService.enableAction("rtc_clear_all_output")},
_modeEventData:function(a){var c=this._contextMenuEvent;c.Tag=a;this.emit("ModeContextMenuAction",c)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/GhostLegend":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/dom-class dojo/on MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/AxesDecorationModePreview dojo/i18n!l10n/nls/figureToolStrip".split(" "),function(g,f,e,d,b,a,c,h,k){return g([h],{mode:"placedLegendMode",
addLegendText:k.addLegendText,legendTooltipText:k.addLegendTooltipText,showAffordances:function(a,c,b){var e=d.position(b),h=d.position(c);a.forEach(function(a,b){this.figureModel.isAxesObscuredByEarlierChild(b)||this.positionAffordance(null,(a[0]+a[2])*e.w+e.x-h.x-0.02*a[2]*e.w,(1-a[1]-a[3])*e.h+e.y-h.y+0.05*a[3]*e.h,c,"legend",b,"placeableGhostLegend",this.legendTooltipText)},this);this.show()},createDomNodes:function(c,b,d){c=e.create("div",{title:b,innerHTML:"\x3cdiv class\x3d'legendIcon'\x3e\x3c/div\x3e\x3cspan\x3e"+
this.addLegendText+"\x3c/span\x3e"},c);a.add(c,d);return c}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/AxesDecorationModePreview":function(){define("dojo/_base/declare dojo/_base/lang dojo/keys dojo/on dojo/touch MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/SpringLoadedModePreview".split(" "),function(g,f,e,d,b,a){return g([a],{_modeClearListener:null,constructor:function(a){this._modeClearListener=d.pausable(document.body,"click",f.hitch(this,"clearMode"));this._modeClearListener.pause();
this.own(this._modeClearListener)},addClickListener:function(a,e,f){this.inherited(arguments);d(a,b.press,function(a){a.stopPropagation()})},_keyHandler:function(a){a.keyCode===e.ESCAPE&&(this.clearMode(),a.stopPropagation())},_addKeyListener:function(){this._keyHandlerFcn||(this._keyHandlerFcn=f.hitch(this,"_keyHandler"));this._removeKeyListener();document.body.addEventListener("keydown",this._keyHandlerFcn,!0)},_removeKeyListener:function(){document.body.removeEventListener("keydown",this._keyHandlerFcn,
!0)},clearMode:function(){this.inherited(arguments);this._modeClearListener.pause();this._removeKeyListener()},show:function(){this.inherited(arguments);this._modeClearListener.resume();this._addKeyListener()},hide:function(a){this.inherited(arguments);this._modeClearListener.pause();this._removeKeyListener()},destroy:function(){this.inherited(arguments);this._keyHandlerFcn&&document.body.removeEventListener("keydown",this._keyHandlerFcn,!0)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/GhostColorbar":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/dom-class dojo/on dojo/query MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/AxesDecorationModePreview dojo/i18n!l10n/nls/figureToolStrip".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return g([k],{mode:"placedColorbarMode",promptText:l.addColorBarText,colorbarTooltipText:l.addColorBarTooltipText,showAffordances:function(a,c,e){var f=d.position(e),k=d.position(c);a.forEach(function(a,d){if(!this.figureModel.isAxesObscuredByEarlierChild(d)){var e=0.06*a[2]*f.w,g=0.9*a[3]*f.h,e=20>e?20:e;this.positionAffordance({w:g,h:e},(a[0]+a[2])*f.w+f.x-k.x+1.2*e,(1-a[1]-a[3])*f.h+f.y-k.y+0.05*a[3]*f.h,c,"colorbar",d,"placeableGhostColorbar",this.colorbarTooltipText);
b.set(this.previewDomNodes[d],"font-size",0.5*e+"px");var l=this._getStringWidthInPixels(this.promptText,this.previewDomNodes[d])<g;h("p",this.previewDomNodes[d]).forEach(function(a){l?b.set(a,"visibility","visible"):b.set(a,"visibility","hidden")})}},this);this.show()},createDomNodes:function(c,b,d){c=e.create("div",{title:b,innerHTML:"\x3cp\x3e"+this.promptText+"\x3c/p\x3e"},c);a.add(c,d);return c}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/GhostGrid":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/dom-class dojo/on MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/AxesDecorationModePreview dojo/i18n!l10n/nls/figureToolStrip".split(" "),
function(g,f,e,d,b,a,c,h,k){return g([h],{matlabInteractionFunction:"grid",mode:"placedGridMode",text:k.addGridText,gridIconClass:"gridIcon",tooltipText:k.addGridTooltipText,createDomNodes:function(c,b,d){c=e.create("div",{title:b,innerHTML:"\x3cdiv class\x3d'"+this.gridIconClass+"'\x3e\x3c/div\x3e\x3cspan\x3e"+this.text+"\x3c/span\x3e"},c);a.add(c,d);return c},showAffordances:function(a,c,b){var e=d.position(b),h=d.position(c);a.forEach(function(a,b){this.figureModel.isAxesObscuredByEarlierChild(b)||
this.positionAffordance(null,(a[0]+a[2]/2)*e.w+e.x-h.x,(1-a[1]-a[3]/2)*e.h+e.y-h.y,c,this.matlabInteractionFunction,b,"placeableGhostGrid",this.tooltipText)},this);this.show()}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/GhostXGrid":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/GhostGrid dojo/i18n!l10n/nls/figureToolStrip".split(" "),function(g,
f,e,d,b,a,c,h){return g([c],{matlabInteractionFunction:"xgrid",mode:"placedXGridMode",text:h.addXGridText,gridIconClass:"xgridIcon",tooltipText:h.addXGridTextTooltipText})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/GhostYGrid":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/GhostGrid dojo/i18n!l10n/nls/figureToolStrip".split(" "),function(g,f,e,d,
b,a,c,h){return g([c],{matlabInteractionFunction:"ygrid",mode:"placedYGridMode",text:h.addYGridText,gridIconClass:"ygridIcon",tooltipText:h.addYGridTooltipText})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/GhostTitle":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-attr dojo/dom-geometry dojo/dom-style dojo/dom-construct MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/GhostLabel dojo/i18n!l10n/nls/figureToolStrip".split(" "),function(g,f,e,d,b,a,c,h){return g([c],
{promptText:h.addTitleText,mode:"placedTitleMode",positionMatrix:[[0,1,0.5],[0,1,1]],actionId:"title",getLabels:function(){return this.figureModel.getTitles()},positionAffordance:function(a,c,h,f,g,q,r,s){this.previewDomNodes||(this.previewDomNodes=[]);this.previewDomNodes[q]||(this.previewDomNodes[q]=this.createDomNodes(f,s,r,g,q),this.addClickListener(this.previewDomNodes[q],g,q));f=d.position(f);a=100*b.get(this.previewDomNodes[q],"width")/f.w;f=100*b.get(this.previewDomNodes[q],"height")/f.h;
100<h+f&&(h=100-f);b.set(this.previewDomNodes[q],{position:"absolute",bottom:h+"%",left:c-a/2+"%"});this._textInputElements[q].originalPosition=null;e.set(this.previewDomNodes[q],"data-tag",g+"."+q)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/GhostLabel":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/dom-class dojo/dom dojo/on dijit/focus dijit/registry MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/SpringLoadedModePreview MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/TextInputElement".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p){return g([m],{_textInputElements:null,promptText:"",textInputElementCSSClass:"ghostLabel",_textCommitListener:null,_matlabInteractionFunction:"",createDomNodes:function(a,c,b,d,e){this._matlabInteractionFunction=d;null===this._textInputElements&&(this._textInputElements=[]);this._textInputElements[e]=new p({widgetClass:this.textInputElementCSSClass,placeHolderText:this.promptText});this._textInputElements[e].placeAt(a);this.own(h(this._textInputElements[e],"startEditing",
f.hitch(this,function(a){this.emit("startEditing",a)})));return this._textInputElements[e].domNode},_emitTextEditEvent:function(a,c,b,d){this.emit("interaction",{fcn:"springLoadedModeAction",args:{type:a,axesIndex:c,configurationData:b,mode:this.mode,retainMode:d}})},addClickListener:function(a,c,b){null===this._textCommitListener&&(this._textCommitListener=[]);this._textCommitListener[b]=h(l.getEnclosingWidget(a),"textcommit",f.hitch(this,function(a){var d=!1;this._textInputElements.forEach(function(c){c===
a.focusedWidget&&(d=!0,c.stopEditing())});a.eventKeyCode&&(this._focusNextInputField(b,a.eventKeyCode),1<this._textInputElements.length&&(this._textInputElements[b].stopEditing(),d=!0));2<=this._textInputElements.length&&""===a.textValue&&this._textInputElements[b].setPromptingState(!0);this._emitTextEditEvent(c,b,a.textValue,d)}))},_focusNextInputField:function(a,c){var b=a,d=null;switch(c){case "TAB":0===b&&(b=this._textInputElements.length);d=this._textInputElements[b-1];break;case "SHIFTTAB":b===
this._textInputElements.length-1&&(b=-1),d=this._textInputElements[b+1]}null!==d&&void 0!==d&&(d.startEditing(),d.focus(),this.emit("startEditing",{}))},showAffordances:function(a,c,d){null===this._textCommitListener&&(this._textCommitListener=[]);var h=this.getLabels(),f=this.parentNode&&"block"===b.get(this.parentNode,"display");this.parentNode||(this.parentNode=e.create("div",null,c));b.set(this.parentNode,{display:"block",position:"absolute",top:"0px",left:"0px",width:b.get(d,"width")+"px",height:b.get(d,
"height")+"px"});a.forEach(function(a,c){this.figureModel.isAxesObscuredByEarlierChild(c)||(this.positionAffordance(null,100*(this.positionMatrix[0][0]+this.positionMatrix[0][1]*a[0]+this.positionMatrix[0][2]*a[2]),100*(this.positionMatrix[1][0]+this.positionMatrix[1][1]*a[1]+this.positionMatrix[1][2]*a[3]),this.parentNode,this.actionId,c),this.updateTextField(this._textInputElements[c],h[c]))},this);this.show();!f&&0<this._textInputElements.length&&(a=this._textInputElements[this._textInputElements.length-
1],a.setPromptingState(!1),a.startEditing(),a.focus(),this.emit("startEditing",{}))},updateTextField:function(a,b){c.isDescendant(k.curNode,a.domNode)||a.isEditing()?a.focus():b?(a.setPromptingState(!1),a.setText(b)):a.setPromptingState(!0)},hide:function(a){var c=this._textInputElements.filter(function(a){return a.isEditing()});a?c.forEach(function(a){a.rollback()},this):c.forEach(function(a){a.commit()},this);this._textInputElements.forEach(function(a){a.destroy()});this._textInputElements=[];e.destroy(this.parentNode);
this.parentNode=null;this.inherited(arguments)},show:function(){b.set(this.parentNode,"display","block");this.previewDomNodes.forEach(function(a,c){b.set(a,"display","block")})},destroy:function(){null!==this._textCommitListener&&this._textCommitListener.forEach(function(a){a.remove()});this._textInputElements.forEach(function(a){a.destroy()});this.inherited(arguments)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/GhostXLabel":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-attr dojo/dom-geometry dojo/dom-style dojo/dom-construct MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/GhostLabel dojo/i18n!l10n/nls/figureToolStrip".split(" "),
function(g,f,e,d,b,a,c,h){return g([c],{promptText:h.addXLabelText,mode:"placedXLabelMode",positionMatrix:[[0,1,0.5],[1,-1,0]],actionId:"xlabel",getLabels:function(){return this.figureModel.getXLabels()},positionAffordance:function(a,c,h,f,g,q,r,s){this.parentNode=f;this.previewDomNodes||(this.previewDomNodes=[]);this.previewDomNodes[q]||(this.previewDomNodes[q]=this.createDomNodes(f,s,r,g,q),this.addClickListener(this.previewDomNodes[q],g,q));a=d.position(f);f=100*b.get(this.previewDomNodes[q],"width")/
a.w;h+=6/(2>=this.previewDomNodes.length?1:this.previewDomNodes.length);this.figureModel.getIs2D()[q]?b.set(this.previewDomNodes[q],{position:"absolute",top:h+"%",left:c-f/2+"%"}):(c=this.figureModel.getXLabelPositions()[q],0<Math.abs(c[0])&&0<Math.abs(c[1])?(c=this.figureView.getAxesPlotBox(c),b.set(this.previewDomNodes[q],{position:"absolute",top:c.yLow-a.y+"px",left:c.xLow-a.x+"px"})):(h=this.figureView.getAxesPlotBox(this.figureModel.getAxesPositions()[q]),c=h.xLow+Math.abs(h.xHigh-h.xLow)/2,
b.set(this.previewDomNodes[q],{position:"absolute",top:h.yHigh-a.y+"px",left:c-a.x+"px"})));e.set(this.previewDomNodes[q],"data-tag",g+"."+q)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/GhostYLabel":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-attr dojo/dom-geometry dojo/dom-style dojo/dom-construct MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/modes/GhostLabel dojo/i18n!l10n/nls/figureToolStrip".split(" "),function(g,f,e,d,b,a,c,h){return g([c],{promptText:h.addYLabelText,
textInputElementCSSClass:"ghostYLabel",mode:"placedYLabelMode",positionMatrix:[[0,1,0],[1,-1,-0.5]],actionId:"ylabel",getLabels:function(){return this.figureModel.getYLabels()},positionAffordance:function(a,c,h,f,g,q,r,s){this.parentNode=f;this.previewDomNodes||(this.previewDomNodes=[]);this.previewDomNodes[q]||(this.previewDomNodes[q]=this.createDomNodes(f,s,r,g,q),this.addClickListener(this.previewDomNodes[q],g,q),this._textInputElements[q].setTextAlignement("left"));b.set(this.previewDomNodes[q],
{position:"absolute",top:h+"%",left:c+"%"});a=d.position(this.figureView.getDomNode(),!1);c=this.figureModel.getYLabelPositions()[q];0<Math.abs(c[0])&&0<Math.abs(c[1])?(h=this.figureView.getAxesPlotBox(c),c=b.get(this.previewDomNodes[q],"width"),h.xLow+c>a.x+a.w&&(c=h.xHigh-a.x-c,b.set(this.previewDomNodes[q],{position:"absolute",left:c+"px"})),this.figureModel.getIs2D()[q]||b.set(this.previewDomNodes[q],{position:"absolute",top:h.yLow-a.y+"px",left:h.xLow-a.x+"px"})):this.figureModel.getIs2D()[q]||
(h=this.figureView.getAxesPlotBox(this.figureModel.getAxesPositions()[q]),this.figureModel.isAxesObscuredByEarlierChild(q)?b.set(this.previewDomNodes[q],{visibility:"hidden"}):(c=h.xLow+Math.abs(h.xHigh-h.xLow)/8,b.set(this.previewDomNodes[q],{position:"absolute",top:h.yHigh-a.y+"px",left:c-a.x+"px"})));this._textInputElements[q].originalPosition=null;e.set(this.previewDomNodes[q],"data-tag",g+"."+q)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/controllers/PaletteController":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/dom-style MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/Palette MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/PaletteRegistry MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/elements/ElementFactory MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/controllers/BaseFigurePaletteController dojo/on dojo/mouse dojo/dom-class dojo/dom".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p){return g([h],{_leftMaxForFirstElement:370,_leftPadForFirstElement:35,_suspendAllListeners:!1,getView:function(b,d,h){!this._palette||this._palette.dataTag!==b?(b=a.getPalette(b),void 0===b&&(this._palette=null),null!==this._palette&&e.destroy(this._palette.domNode),c.getPalette(b,f.hitch(this,function(a){this._palette=a;this._palette.startup();this._setupPaletteListeners();this.setViewState(this.getState(this._figureModel));h&&"function"===typeof h&&h(a)}))):(this.setViewState({is2D:this.getCurrentTarget().is2D,
backgroundColor:this._figureModel.getBackgroundColor()}),h&&"function"===typeof h&&h(this._palette));return this._palette},_setupPaletteListeners:function(){this._paletteListener||(this._paletteListener=this._palette.on("elementClicked",f.hitch(this,function(a){var c={};if(a.action)c={fcn:"paletteActionInteractionCallback",args:{action:a.action,axesIndex:this.getCurrentTarget().targetIndex,direction:a.direction||""}};else if(null!==a.mode||void 0!==a.mode)c={fcn:"setMode",args:{mode:a.mode,direction:a.direction||
""}},a={mode:a.mode,backgroundColor:this._figureModel.getBackgroundColor(),direction:a.direction||""},this.setViewState(a);this._paletteListener=null;this.notify("interaction",c)})));this._paletteListener=null},setViewState:function(a){this._palette&&this._palette.setState(a)},getState:function(a){return{mode:a.getMode(),is2D:this.getCurrentTarget()?this.getCurrentTarget().is2D:0,backgroundColor:a.getBackgroundColor(),direction:a.getZoomDirection()}},_handleMouseClick:function(a){this._doSetPalettePosition=
!0;this._handleClickOrMove(a)},_handleMouseMove:function(a){this._handleClickOrMove(a)},_handleMouseEnter:function(a){this._doSetPalettePosition=!0;this._handleClickOrMove(a)},setCurrentTarget:function(a){this._currentTarget=a},getCurrentTarget:function(){return null===this._currentTarget?null:{targetIndex:this._currentTarget,is2D:this._figureModel.getIsSubplot3D()?0:this._figureModel.getIs2D()[this._currentTarget],axesPosition:this._figureModel.getAxesPositions()[this._currentTarget],chartType:this._figureModel.getChartType()[this._currentTarget],
toolbarEnabled:this._figureModel.getAxesToolbarEnabled()[this._currentTarget]}},_handleClickOrMove:function(a){if(!this._suspendAllListeners){var c=this,b=!1;if(a.MouseOverAxes&&a.MouseOverAxes.isInside){var b=!0,d=c.getCurrentTarget();if(d&&a.MouseOverAxes.Index===d.targetIndex)this._palette&&this._doSetPalettePosition&&(c._setPalettePosition(a.MouseOverAxes.axesPlotBox),this._doSetPalettePosition=!1);else{c.setCurrentTarget(a.MouseOverAxes.Index);var d=1===c.getCurrentTarget().is2D?"2DAxes":"3DAxes",
h=c.getCurrentTarget().chartType,f="";c.getCurrentTarget().toolbarEnabled&&("axes"===h?f="FigurePalette":"geobubble"===h?f="ActionPalette":"geoaxes"===h&&(f="GeoAxesPalette"));c.getView(f,d,function(b){c._figureView.hasRenderingSize()?c.enablePalette():c.disablePalette();e.place(b.domNode,c._figureView.getWrapperNode());c._setPalettePosition(a.MouseOverAxes.axesPlotBox)})}}this.setVisible(b)}},_handleAxesPositionUpdate:function(a){this._palette&&!m.contains(this._palette.domNode,"disabled")&&(this._currentTarget>
a.newAxesPositions.length-1&&this.setCurrentTarget(a.newAxesPositions.length-1),a=this.getCurrentTarget(),a=this._figureView.getAxesPlotBox(a.axesPosition),this._setPalettePosition(a))},getTopForElement:function(a,c){var b=this.getTopForAxesRef(a),d=this.getElementBounds(c).height;return b-d<this._MIN_TOP?this._MIN_TOP:b-d},getLeftForElement:function(a,c){var b=this.getRightForAxesRef(a),d=this.getElementBounds(c);return b-d.width},enablePalette:function(){this.inherited(arguments);this._suspendAllListeners=
!1},disablePalette:function(){this.inherited(arguments);this._suspendAllListeners=!0},_setPalettePosition:function(a){var c=this.getTopForElement(a,this._palette.domNode);a=this.getRightForAxesRef(a);var b=this.getElementBounds(this._figureView.getWrapperNode());d.set(this._palette.domNode,{position:"absolute",right:b.width-a+"px",top:c+"px"})}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/controllers/BaseFigurePaletteController":function(){define("dojo/_base/declare dojo/_base/lang dojo/Evented dojo/on dijit/Destroyable MW/rtc/plugins/embeddedoutputs/outputhandlers/floatingpalette/controllers/BasePaletteController MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/AxesPositionMixin".split(" "),
function(g,f,e,d,b,a,c){return g([a,e,b,c],{_currentTarget:null,constructor:function(a){this._setFigureProperties(a);this._figureModel&&this.own(d(this._figureModel,"AxesPositionUpdated",f.hitch(this,function(a){this._handleAxesPositionUpdate(a)})))},setState:function(a){this._figureModel=a;a=this.getState(a);this._palette&&this._palette.setState(a)},getState:function(a){return a},_setupPaletteListeners:function(){},_setPalettePosition:function(a){},_handleAxesPositionUpdate:function(a){}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/AxesPositionMixin":function(){define(["dojo/_base/declare",
"dojo/dom-geometry"],function(g,f){return g([],{_figureModel:null,_figureView:null,_MIN_TOP:3,_MAX_TOP:13,_setFigureProperties:function(e){e&&(e.figureView&&e.figureModel)&&(this._figureView=e.figureView,this._figureModel=e.figureModel)},_getAxesPlotBox:function(e){return this._figureView.getAxesPlotBox(e)},_getTopAxesPlotBox:function(){var e=this._figureModel.getVisibleAxesPositions(),d;!e||0===e.length?(d=[0,0,1,1],e=[d]):d=e[0];e.forEach(function(b){b[1]>=d[1]&&(d=b)});return this._getAxesPlotBox(d)},
getElementBounds:function(e){e=f.position(e);return{width:e.w,height:e.h,left:e.x,top:e.y}},getTopForAxesRef:function(e){if(void 0===e||null===e)e=this._getTopAxesPlotBox();var d=this.getElementBounds(this._figureView.getDomNode());return e.yLow-d.top},getRightForAxesRef:function(e){if(void 0===e||null===e)e=this._getTopAxesPlotBox();var d=this.getElementBounds(this._figureView.getDomNode()),b=d.left+d.width,a=b-e.xHigh,d=e.xHigh-d.left;16>a&&(d-=16,0>a&&(d-=e.xHigh-b));return d},getBottomForAxesRef:function(e){if(void 0===
e||null===e)e=this._getTopAxesPlotBox();var d=this.getElementBounds(this._figureView.getDomNode());return e.yHigh-(d.top+d.height)},getTopForElement:function(e,d){},getLeftForElement:function(e,d){}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/controllers/PromptController":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/dom-style dojo/dom-class MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/PaletteRegistry MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/elements/ElementFactory dojo/on dojo/Evented MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/controllers/BaseFigurePaletteController".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return g([l,k],{getView:function(){if(!this._palette){var b=a.getPalette("OutputPopoutPalette");c.getPalette(b,f.hitch(this,function(a){this._palette=a;this._palette.startup();this._setupPaletteListeners()}))}return this._palette},_setupPaletteListeners:function(){this._paletteListener||(this._paletteListener=this._palette.on("elementClicked",f.hitch(this,function(a){this.notify("interaction",{fcn:"launchFigure",args:{editorId:this._figureModel.editorId}})})))},_handleMouseMove:function(a){},
_handleMouseClick:function(a){this._handleMouseEnter(a)},_handleMouseEnter:function(a){this._palette||(this._palette=this.getView(),e.place(this._palette.domNode,this._figureView.getWrapperNode()));this._setPalettePosition();this.setVisible(!0)},getTopForElement:function(a,c){var b=this.getTopForAxesRef(a),d=this.getElementBounds(c).height;return b-d<this._MIN_TOP?this._MIN_TOP:b-d},getLeftForElement:function(a,c){var b=this.getElementBounds(c);return this._figureView.getDomNode().offsetLeft+this.getElementBounds(this._figureView.getDomNode()).width-
b.width},_setPalettePosition:function(a){var c=this.getTopForElement(a,this._palette.domNode);a=this.getLeftForElement(a,this._palette.domNode);this.isInline(this._figureView.getWrapperNode())?d.set(this._palette.domNode,{position:"absolute",left:a+"px",right:"",top:c+"px"}):d.set(this._palette.domNode,{position:"absolute",left:"",right:"1px",top:c+"px"})}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/ActionManager":function(){define(["dojo/_base/declare"],function(g){return g(null,{_figureModel:null,
_figureView:null,_codeGen:null,_undoRedoManager:null,_TOOLSTRIP_INTERACTION:"ToolstripInteraction",constructor:function(f){this._figureView=f.figureView;this._figureModel=f.figureModel;this._codeGen=f.codeGenerator},setUndoRedoManager:function(f){this._undoRedoManager=f},setState:function(f){this._figureModel=f;this._figureModel.getInteractionData()&&""!==this._figureModel.getInteractionData().iAtomicActionID&&this._updateFigureForToolStripAction()},_updateFigureForToolStripAction:function(){var f=
this._figureModel.getInteractionData().iAtomicActionID;this._addToolStripActionToUndoRedo(f)},_addToolStripActionToUndoRedo:function(f){f={actionID:f,interactionType:this._TOOLSTRIP_INTERACTION,codeGenState:{attachCodeGenOnUndo:!1,attachCodeGenOnRedo:!1}};this._codeGen&&this._codeGen.isCodeGenAttached()&&(f.codeGenState.attachCodeGenOnUndo=!0);""!==this._figureModel._interactionData.iCode&&(f.codeGenState.attachCodeGenOnRedo=!0);this._undoRedoManager.insertInteractionsForUndoRedo(this._figureModel,
f)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureUndoRedoManager":function(){define(["dojo/_base/declare","MW/rtc/plugins/undoredo/commands/FigureInteractionCommand","MW/rtc/plugins/undoredo/commands/CodeGenInteractionCommand"],function(g,f,e){return g(null,{_document:null,_UNDOREDO_CALLBACK:"undoRedoInteractionCallback",_FIGURE_INTERACTION_EVENT:"FigureInteractionEvent",_CODEGEN_INTERACTION:"CodeGenInteraction",constructor:function(d){this._document=d.document},insertInteractionsForUndoRedo:function(d,
b){var a=this;this._document.undoable(function(c){b.interactionType===a._CODEGEN_INTERACTION?c.appendCommand(new e(d,a._UNDOREDO_CALLBACK,b)):c.appendCommand(new f(d,a._UNDOREDO_CALLBACK,b))})}})})},"MW/rtc/plugins/undoredo/commands/FigureInteractionCommand":function(){define(["dojo/_base/declare","mw-log/Log","MW/rtc/plugins/embeddedoutputs/MessageServiceFactory","MW/rtc/plugins/undoredo/commands/CommandInterface"],function(g,f,e,d){return g(d,{_figureModel:null,_clientEventArgs:null,_eventCallBack:null,
_UNDO_EVENT_TYPE:"Undo",_REDO_EVENT_TYPE:"Redo",constructor:function(b,a,c){this._figureModel=b;this._eventCallBack=a;this._clientEventArgs=c},execute:function(){this._setInteractionEventType(this._REDO_EVENT_TYPE);this._feval(this._eventCallBack,this._clientEventArgs)},unexecute:function(){this._setInteractionEventType(this._UNDO_EVENT_TYPE);this._feval(this._eventCallBack,this._clientEventArgs)},_setInteractionEventType:function(b){this._clientEventArgs.type=b},_feval:function(b,a){e.getInstance().publish(this._figureModel.getInteractionChannel(),
JSON.stringify({method:b,args:a}))}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureOutputProperties":function(){define([],function(){return{OUTPUT_TYPE:"figure",CSS_TAG:"embeddedOutputsFigure",STATE:{NOT_INITIALIZED:0,PLACEHOLDER:1,PENDING:2,FINAL_SNAPSHOT:3,FINAL_PENDING_SNAPSHOT:4}}})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/EventHandler":function(){define(["dojo/_base/declare","dojo/_base/lang"],function(g,f){return g(null,{_isServerBusy:!1,_eventQueue:null,constructor:function(){this._eventQueue=
[]},destroy:function(){this.clearEventQueue()},setIsServerBusy:function(e){this._isServerBusy=e},getIsServerBusy:function(){return this._isServerBusy},_processPendingEvent:function(){if(0<this._eventQueue.length){var e=this._eventQueue.shift();this.setIsServerBusy(!0);e.callback(e.event)}},_addEventToQueue:function(e,d){var b=this._eventQueue.length;if(0<b)switch(b=this._eventQueue[b-1].event,d.type){case "pointermove":case "mousemove":("pointermove"===b.type||"mousemove"===b.type)&&this._eventQueue.pop();
break;case "pointerup":case "mouseup":break;default:this.clearEventQueue()}this._eventQueue.push({event:d,callback:e})},clearEventQueue:function(){0<this._eventQueue.length&&(this._eventQueue.length=0)},processEvent:function(e,d){this._addEventToQueue(e,d);this.getIsServerBusy()||this._processPendingEvent()},processNextPendingEvent:function(){this.setIsServerBusy(!1);this._processPendingEvent()}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FocusedFigure":function(){define(["dojo/_base/declare"],
function(g){return g(null,{figureId:""})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/ToolstripActionController":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/plugins/embeddedoutputs/MessageServiceFactory"],function(g,f,e,d){return g(null,{channel:null,pendingActions:null,_actionService:null,_aspectHandles:null,_FIGURE_TOOLSTRIP_ACTION_IDS:"figure.grid figure.colorbar figure.legend figure.cleargrid figure.clearcolorbar figure.clearlegend figure.xlabel figure.ylabel figure.title figure.xgrid figure.ygrid figure.line figure.arrow figure.doublearrow figure.textarrow".split(" "),
constructor:function(b,a){this._actionService=a;this.channel="/toolstrip/toolstripactionevent/"+b;d.getInstance().subscribe(this.channel,"_actionCallback",this);this.pendingActions=[];this._aspectHandles=[];this._loadActions()},_loadActions:function(){var b=[];this._FIGURE_TOOLSTRIP_ACTION_IDS.forEach(function(a){b.push({id:a,enabled:!0,selected:!1,callback:function(){}})});this._actionService.loadActions(b);this._aspectHandles.push(e.after(this._actionService,"onActionChange",f.hitch(this,"_handleActionChange"),
!0))},_handleActionChange:function(b){"selected"===b.key&&(b.newValue&&!b.oldValue&&this._FIGURE_TOOLSTRIP_ACTION_IDS.some(function(a){return a===b.id}))&&this._feval(b)},_feval:function(b){this.pendingActions.push(b);d.getInstance().publish(this.channel,{actionId:b.id})},_actionCallback:function(b){var a=-1,c=this;this.pendingActions.some(function(d,e){d.id===b.data.id&&(c._actionService.updateAction(d.id,{selected:!1}),a=e)});0<=a&&this.pendingActions.splice(a,1)},destroy:function(){d.getInstance().unsubscribe(this.channel,
"_actionCallback",this);this._aspectHandles.forEach(function(b){b.remove()});this._aspectHandles=[]}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureSnapshotManager":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/plugins/embeddedoutputs/MessageServiceFactory"],function(g,f,e){return g(null,{_REMOVE_DELAY:100,constructor:function(d,b){this._editorId=d;this._idsPendingRemoval=[];this._deletionChannel=b},destroy:function(){this._flushSnapshotsToRemoveQueue()},removeSnapshot:function(d){this._idsPendingRemoval.push(d);
1===this._idsPendingRemoval.length&&setTimeout(f.hitch(this,"_flushSnapshotsToRemoveQueue"),this._REMOVE_DELAY)},_flushSnapshotsToRemoveQueue:function(){if(0!==this._idsPendingRemoval.length){var d="{'"+this._idsPendingRemoval.join("', '")+"'}",d={editorId:this._editorId,figureIds:d};e.getInstance().publish(this._deletionChannel,d);this._idsPendingRemoval=[]}}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureConnectionManagerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"./FigureConnectionManager"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.id"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/FigureConnectionManager":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/plugins/embeddedoutputs/MessageServiceFactory"],function(g,f,e,d){return g(null,{CONNECTION_STATE:{CONNECTED:1,DISCONNECTED:0},constructor:function(b){this._editorId=b;this._connections=
{};d.getInstance().subscribe("/liveeditor/figure/disconnect/*","_diconnectionHandler",this);d.getInstance().subscribe("/liveeditor/figure/reconnect/*","_reconnectionHandler",this)},_diconnectionHandler:function(b){b=b.data;var a=this._connections[b];a||(a=this._createEmptyConnection());a.state=this.CONNECTION_STATE.DISCONNECTED;this._connections[b]=a;a.output&&a.output.disconnect()},_reconnectionHandler:function(b){b=b.data;var a=this._connections[b];a||(a=this._createEmptyConnection());a.state=this.CONNECTION_STATE.CONNECTED;
this._connections[b]=a;a.output&&a.output.reconnect()},registerOutput:function(b,a){this._connections[b]||(this._connections[b]=this._createEmptyConnection());this._connections[b].output=a;!this._connections[b].state===this.CONNECTION_STATE.CONNECTED?a.disconnect():a.reconnect()},getConnectionStatus:function(b){return this._connections[b].state},removeOutput:function(b){delete this._connections[b]},_createEmptyConnection:function(){return{output:null,state:this.CONNECTION_STATE.CONNECTED}},destroy:function(){d.getInstance().subscribe("/liveeditor/figure/disconnect/*",
"_diconnectionHandler",this);d.getInstance().subscribe("/liveeditor/figure/reconnect/*","_reconnectionHandler",this)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/export/Figure2HTMLProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/export/Figure2HTML"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/export/Figure2HTML":function(){define(["dojo/_base/declare",
"dojo/dom-style","dojo/query","MW/rtc/plugins/export/html/HTMLOutputUtilities","MW/rtc/plugins/export/OutputNodeExporterInterface"],function(g,f,e,d,b){return g([b],{constructor:function(){},getApplicableDomNodeClasses:function(){return["embeddedOutputsFigure"]},enter:function(a,c,b){c=d.removeElementsWithClass(c,".figureWidget");this._updateFiguresInOutputs(c);a.addToBody(c.outerHTML);return!0},_updateFiguresInOutputs:function(a){e(".ImageView",a).forEach(function(a){f.set(a,"height","auto");f.set(a.parentNode,
"height","auto")})}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/matrix/MatrixOutputHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./MatrixOutputHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.id","rtc.outputhandlerservice","rtc.executionservice"]}},createInstance:function(d,b,a){d=new e(d,a);b.registerOutputPlugin(d);return d}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/matrix/MatrixOutputHandler":function(){define("dojo/_base/declare MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseOutputHandler MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerResult MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerResultInstruction ./MatrixOutput ./MatrixOutputProperties ./SnapshotManager".split(" "),
function(g,f,e,d,b,a,c){return g([f],{OUTPUT_TYPE:a.OUTPUT_TYPE,constructor:function(a,b){this._snapshotManager=new c(a,b)},getOutputFromData:function(a,c){var f=new b({data:a,outputMetaData:c,executionService:this._executionService,snapshotManager:this._snapshotManager});return new e(d.ADD_OUTPUT,f)},destroy:function(){this._snapshotManager.destroy()}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/matrix/MatrixOutput":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-class dojo/dom-construct MW/rtc/plugins/embeddedoutputs/EmbeddedOutputsUtilities MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseOutput MW/rtc/plugins/embeddedoutputs/outputhandlers/floatingpalette/controllers/matrix/MatrixPromptController MW/rtc/plugins/embeddedoutputs/outputhandlers/floatingpalette/controllers/matrix/RunScriptPromptController MW/rtc/plugins/embeddedoutputs/outputhandlers/matrix/MatrixStyler MW/rtc/plugins/embeddedoutputs/outputhandlers/VariableUtilities MW/rtc/plugins/embeddedoutputs/view/EllipsisUtilities mw-html-utils/HtmlUtils mw-utils/Utils ./CharacterWidthUtility ./MatrixOutput ./MatrixOutputProperties ./MatrixOutputUtility".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t){return g([a],{_REGEX_FOR_EXPONENT:/1.0e\+\d+ \*/,type:s.OUTPUT_TYPE,constructor:function(a){this._data=f.clone(a.data);this._outputMetaData=a.outputMetaData;this._snapshotManager=a.snapshotManager;this._promptController=this._outputMetaData.createPromptController?this._createPromptController():null;this._domElement=this._createDomElement()},destroy:function(){this._data.id&&this._snapshotManager.removeVariableSnapshot(this._data.id);this._promptController&&
this._promptController.destroy()},getCssTag:function(){return s.CSS_TAG},getDomElement:function(){return this._domElement},getSerializableData:function(){return this._data},getText:function(){return t.createName(this._data.name)+"\n"+this._data.value},getHTML:function(a,c){var b=p.treatHtmlLikeCommandWindow(t.createName(this._data.name)),d=p.treatHtmlLikeCommandWindow(this._data.value),e="";this._data.header&&(e=t.createHeader(this._data.header).textContent);return"\x3cpre\x3e"+b+e+"\n"+d+"\x3c/pre\x3e"},
_createPromptController:function(){if(b.isLoadedFromDisk(this._outputMetaData.evaluationId))return new h;var a=new c;a.addInteractionListener(f.hitch(this._snapshotManager,"openVariableSnapshot",this._data.id));return a},_createDomElement:function(){var a=d.create("div",{className:"matrixElement veSpecifier"});this._styler=new k(this);a.getStyler=f.hitch(this,function(){return this._styler});var c=t.createNameAndSummary(this._data.name,this._data.rows,this._data.columns,this._data.type,this._data.header);
a.appendChild(c.summary);c=t.createMatrixValue(this._data,this._REGEX_FOR_EXPONENT,this._outputMetaData).container;a.appendChild(c);this._promptController&&this._promptController.setTarget(a);return a}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/floatingpalette/controllers/matrix/MatrixPromptController":function(){define(["dojo/_base/declare","dojo/query","dijit/Destroyable","MW/rtc/plugins/embeddedoutputs/outputhandlers/floatingpalette/controllers/SimpleFloatingElement"],function(g,f,e,d){return g([d,
e],{constructor:function(){this.paletteRegistryId="MatrixPopoutPalette"},getPreferredLeftPosition:function(){var b=f(".variableValue",this._outputDomNode),a=0;b&&1<=b.length&&(a=b[0].offsetLeft+b[0].offsetWidth);var b=f(".veVariableName",this._outputDomNode),c=0;b&&1<=b.length&&(c=b[0].offsetLeft+b[0].offsetWidth);return Math.max(a,c)+10}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/floatingpalette/controllers/matrix/RunScriptPromptController":function(){define(["dojo/_base/declare","MW/rtc/plugins/embeddedoutputs/outputhandlers/floatingpalette/controllers/matrix/MatrixPromptController"],
function(g,f){return g([f],{constructor:function(){this.paletteRegistryId="RunScriptPalette"},_setupPaletteListeners:function(){}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/matrix/MatrixStyler":function(){define("dojo/dom-class dojo/_base/declare dojo/dom-geometry dojo/query dojo/dom-style MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseOutputStyler MW/rtc/plugins/embeddedoutputs/view/EllipsisUtilities".split(" "),function(g,f,e,d,b,a,c){return f([a],{MARGIN_PADDING_BUFFER:30,LEFT_MARGIN_BUFFER:14,
ELLIPSIS_WIDTH:32,BUFFER_SPACE_FOR_COLUMN:2,MAX_ROWS_TO_SHOW:10,_SUMMARYBAR_VIEWPORT_SPAN:"veViewportSummary",getStyleChange:function(a){var c=d(".valueContainer",a)[0],b=this.getAvailableWidth(a),e=parseFloat(a.getAttribute("data-width"));if(c){var f=this.getMatrixInfo(c),g=this.getTotalColumnsThatFit(b,f,c);this.updateViewportInfo(a,this.MAX_ROWS_TO_SHOW,g,f.totalRows,f.totalColumns);if(!this._hasWidthChanged(b,e))return null;var e=d(".variableValue",c)[0],q=d(".veVariableName",a)[0],g=Math.min(g,
f.totalColumns);return{output:a,availableWidth:b,totalWidth:g*f.columnWidth+this.BUFFER_SPACE_FOR_COLUMN,valueContainer:c,variableValue:e,matrixInfo:f,numOfColumnsToShow:g,veVariableName:q}}},applyStyleChange:function(a){a.output.setAttribute("data-width",a.availableWidth);b.set(a.variableValue,"width",a.totalWidth+"px");b.set(a.veVariableName,"width",a.availableWidth+"px");return c.updateEllipsesVisibility(a.valueContainer,a.matrixInfo.totalColumns,a.matrixInfo.totalRows,a.numOfColumnsToShow,this.MAX_ROWS_TO_SHOW).verticalChanged},
_hasWidthChanged:function(a,c){return this._hasDimensionChanged(a,c)},_hasDimensionChanged:function(a,c){return a&&0!==a&&a!==c},updateViewportInfo:function(a,c,b,d,e){if(a=a.getElementsByClassName(this._SUMMARYBAR_VIEWPORT_SPAN)[0]){if(1<d){var f=a.getElementsByClassName("startRow")[0];a.getElementsByClassName("endRow")[0].innerText=Math.min(parseInt(f.innerText)+(c-1),d)}1<e&&(c=a.getElementsByClassName("startColumn")[0],a.getElementsByClassName("endColumn")[0].innerText=Math.min(parseInt(c.innerText)+
(b-1),e))}},getMatrixInfo:function(a){if(a)try{return JSON.parse(a.getAttribute("data-layout"))}catch(c){}return null},getAvailableWidth:function(a){return e.getMarginBox(a).w-this.MARGIN_PADDING_BUFFER},getTotalColumnsThatFit:function(a,c,b){return g.contains(b,"hideEllipses")||0!=b.getElementsByClassName("horizontalEllipsis hide").length?Math.floor(a/c.columnWidth):Math.floor((a-(this.ELLIPSIS_WIDTH+this.LEFT_MARGIN_BUFFER))/c.columnWidth)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseOutputStyler":function(){define(["dojo/_base/declare"],
function(g){return g(null,{constructor:function(){},getStyleChange:function(f){},setStyleChange:function(f){}})})},"MW/rtc/plugins/embeddedoutputs/view/EllipsisUtilities":function(){define(["dojo/query","dojo/dom-class"],function(g,f){return{updateEllipsesVisibility:function(e,d,b,a,c){var h=g(".horizontalEllipsis",e)[0];d=this._showHideEllipsis(h,d,a);e=g(".verticalEllipsis",e)[0];return{verticalChanged:this._showHideEllipsis(e,b,c),horizontalChanged:d}},_showHideEllipsis:function(e,d,b){var a=f.contains(e,
"hide");if(d>b)return this._show(e),a;this._hide(e);return!a},_show:function(e){f.remove(e,"hide")},_hide:function(e){f.add(e,"hide")}}})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/VariableUtilities":function(){define(["dojo/dom-construct"],function(g){return{createHeader:function(f){return""==f?f:this._createHeaderSpanElement(f)},_createHeaderSpanElement:function(f){f=g.create("span",{className:"headerElement",innerHTML:f}).innerText;var e=g.create("span",{className:"headerElement"});e.innerText=
f;return e}}})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/matrix/CharacterWidthUtility":function(){define(["dojo/_base/declare","dojo/dom-construct"],function(g,f){return{_singleCharWidth:null,getNumericCharacterWidth:function(){if(null===this._singleCharWidth){var e=f.create("span",{className:"rtePane"}),d=f.create("span",{innerHTML:"1234567890",className:"eoOutputWrapper"});f.place(d,e);f.place(e,document.body);this._singleCharWidth=d.getBoundingClientRect().width/10;f.destroy(e)}return this._singleCharWidth}}})},
"MW/rtc/plugins/embeddedoutputs/outputhandlers/matrix/MatrixOutputProperties":function(){define([],function(){return{OUTPUT_TYPE:"matrix",CSS_TAG:"embeddedOutputsMatrixElement"}})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/matrix/MatrixOutputUtility":function(){define("dojo/dom-class dojo/dom-construct MW/rtc/plugins/embeddedoutputs/outputhandlers/VariableUtilities MW/rtc/plugins/embeddedoutputs/view/EllipsisUtilities mw-html-utils/HtmlUtils mw-utils/Utils ./CharacterWidthUtility".split(" "),
function(g,f,e,d,b,a,c){return{_DEFAULT_MAX_COLUMNS:50,_MAX_ROWS:10,_REGEX_FOR_FIRST_ELEMENT:/^\s*\S*/,_REGEX_FOR_FIRST_COMPLEX_ELEMENT:/^[\s\d\.+-]+[ij]/i,createHeader:function(a){a=b.treatHtmlLikeCommandWindow(a);if(""===a)return a;a=f.create("span",{className:"headerElement",innerHTML:a}).innerText;var c=f.create("span",{className:"headerElement"});c.innerText=a;return c},createMatrixValue:function(a,c,b){var d=a.value;c=d.match(c);return this.createValueElement({value:d,id:a.id,rows:a.rows,columns:a.columns,
exponent:c,isComplex:a.subtype&&"complex"===a.subtype,columnWidth:a.columnWidth},b)},createName:function(a){return a+" \x3d "},createNameAndSummary:function(a,c,b,d,e){var n=f.create("div",{className:"veVariableName variableNameElement"}),q=f.create("span");q.textContent=this.createName(a);a=f.create("span",{className:"veVariableValueSummary"});(e=this.createHeader(e))?(a.innerText=e.innerText,g.add(a,"headerElement")):"double"!==d&&(a.textContent=c+"\u00d7"+b+" "+d,g.add(a,"veMetaSummary"));n.appendChild(q);
n.appendChild(a);return{summary:n,metaSummary:a}},createValueElement:function(a,c){var b=f.create("div",{className:"valueContainer"}),e=f.create("div",{className:"variableValue"}),g=a.value,n=c.maxColumns||this._DEFAULT_MAX_COLUMNS;a.columns>n&&(g=this._chopColumns(g,n));e.textContent=g;b.appendChild(e);this._addEllipsis(b);c.createPromptController||d.updateEllipsesVisibility(b,a.columns,a.rows,n,this._MAX_ROWS);n=a.columnWidth?a.columnWidth:this._getColumnWidth(g,a.exponent);g=this._getCharsPerElement(g,
a.exponent,a.isComplex);this.updateLayoutInfo(n,a.columns,a.rows,g,b);return{value:e,container:b}},updateLayoutInfo:function(a,c,b,d,e){e.setAttribute("data-layout",JSON.stringify({columnWidth:a,totalColumns:c,totalRows:b,charsPerColumn:d}))},_addEllipsis:function(a){var c=f.create("div",{className:"horizontalEllipsis hide"});a.appendChild(c);c=f.create("div",{className:"verticalEllipsis hide"});a.appendChild(c)},_getColumnWidth:function(a,b){return this._getCharsPerElement(a,b)*c.getNumericCharacterWidth()},
_chopColumns:function(a,c){if(!a)return null;var b="",d,e,f=a.split("\n"),g=f.length,r=this._getCharsPerElement(a)*c;for(d=0;d<g-1;d+=1)e=f[d].substr(0,r),b+=e+"\n";return b+=f[d].substr(0,r)},_getCharsPerElement:function(a,c,b){b=b?this._REGEX_FOR_FIRST_COMPLEX_ELEMENT:this._REGEX_FOR_FIRST_ELEMENT;c&&((c=a.split("\n\n")[1])||(c=a.substring(a.indexOf("\n")+1)),a=c);a=b.exec(a);a=a[0];return a.length}}})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/matrix/SnapshotManager":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/string"],function(g,f,e){return g(null,{_OPEN_VARIABLE_COMMAND:"matlab.internal.editor.VariableManager.openVariableEditor('${editorId}', '${variableId}');",_REMOVE_VARIABLE_COMMAND:"matlab.internal.editor.VariableManager.removeVariables('${editorId}', ${variableIds});",_REMOVE_VARIABLE_DELAY:500,constructor:function(d,b){this._editorId=d;this._executionService=b;this._idsPendingRemoval=[]},destroy:function(){this._flushVariablesToRemoveQueue()},openVariableSnapshot:function(d){d=
e.substitute(this._OPEN_VARIABLE_COMMAND,{editorId:this._editorId,variableId:d});this._executionService.executionEval(d,!0)},removeVariableSnapshot:function(d){this._idsPendingRemoval.push(d);1===this._idsPendingRemoval.length&&setTimeout(f.hitch(this,"_flushVariablesToRemoveQueue"),this._REMOVE_VARIABLE_DELAY)},_flushVariablesToRemoveQueue:function(){if(0!==this._idsPendingRemoval.length){var d="{'"+this._idsPendingRemoval.join("', '")+"'}",d=e.substitute(this._REMOVE_VARIABLE_COMMAND,{editorId:this._editorId,
variableIds:d});this._executionService.executionEval(d,!0);this._idsPendingRemoval=[]}}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/matrix/export/MatrixElement2HTMLProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/embeddedoutputs/outputhandlers/matrix/export/MatrixElement2HTML"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/matrix/export/MatrixElement2HTML":function(){define("dojo/_base/declare MW/rtc/plugins/embeddedoutputs/outputhandlers/matrix/MatrixOutputProperties MW/rtc/plugins/export/html/HTMLOutputUtilities MW/rtc/plugins/export/OutputNodeExporterInterface dojo/text!MW/rtc/plugins/embeddedoutputs/view/css/matrixOutput.css dojo/text!MW/rtc/plugins/view/exporters/ellipses.css".split(" "),
function(g,f,e,d,b,a){return g([d],{constructor:function(){this._firstVisit=!0},getApplicableDomNodeClasses:function(){return[f.CSS_TAG]},reset:function(){this._firstVisit=!0},enter:function(c,d,f){this._firstVisit&&(c.addCSSToStyle(".variableValue { width: 100% !important; }\n"),c.addCSSToStyle(e.cleanUpCSS(b)),c.addCSSToStyle(e.cleanUpCSS(a)),this._firstVisit=!1);d=e.removeElementsWithClass(d,".figureWidget");c.addToBody(d.outerHTML);return!0}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/symbolic/SymbolicOutputHandlerProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./SymbolicOutputHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.outputhandlerservice"]}},createInstance:function(d){var b=new e;d.registerOutputPlugin(b);return b}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/symbolic/SymbolicOutputHandler":function(){define("dojo/_base/declare dojo/_base/lang MW/equations/renderer/Renderer MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseOutputHandler MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerResult MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerResultInstruction ./SymbolicOutput ./SymbolicOutputProperties".split(" "),
function(g,f,e,d,b,a,c,h){return g([d],{OUTPUT_TYPE:h.OUTPUT_TYPE,_PX_PER_EM:14,constructor:function(){this._renderer=new e({equationFormat:"mathml",pxPerEm:this._PX_PER_EM})},getOutputFromData:function(d){d=new c({data:d,renderer:this._renderer,pxPerEm:this._PX_PER_EM});return new b(a.ADD_OUTPUT,d)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/symbolic/SymbolicOutput":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-class dojo/dom-construct MW/equations/renderer/model/utils/MathMLUtils MW/rtc/misc/ImageURIUtilities MW/rtc/plugins/cutcopypaste/MIMETypes MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseOutput MW/rtc/plugins/embeddedoutputs/view/EquationTooltip ./SymbolicOutputProperties".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return g([h],{_IMG_URI_DATA_ATTRIBUTE:"data-imguri",type:l.OUTPUT_TYPE,constructor:function(a){this._data=a.data;this._renderer=a.renderer;this._pxPerEm=a.pxPerEm;this._domElement=this._createDomElement()},getCssTag:function(){return l.CSS_TAG},getDomElement:function(){return this._domElement},getSerializableData:function(){return this._data},getText:function(){return""},getHTML:function(a,c){var b=this._renderer.renderToImageURLSynch(this._data.value,this._pxPerEm),
d="\x3cp class\x3d'symbolicElement'\x3e";this._data.name&&(d=d+"\x3cpre\x3e"+(this._data.name+"\u00a0\x3d\u00a0\n"),d+="\x3c/pre\x3e",d+="\u00a0\u00a0\u00a0");d+=this._equationImageToHTML(b,a,c);return d+="\x3c/p\x3e"},_isTall:function(a){return a>2*this._pxPerEm},_equationImageToHTML:function(c,b,d){var e='\x3cspan style\x3d"vertical-align: '+Math.round(c.verticalAlign)+'px;"\x3e',e=e+"\x3cimg ";b?(b=a.pushImageAndGetPathFromURI(c.dataURL,b,d),e=e+('src\x3d"'+b+'"')+(" "+this._IMG_URI_DATA_ATTRIBUTE+
'\x3d"'+c.dataURL+'"')):e+='src\x3d"'+c.dataURL+'"';e+=' width\x3d"'+c.width+'" height\x3d"'+c.height+'"';return e+="\x3e\x3c/span\x3e"},_createDomElement:function(){var a=d.create("div");e.add(a,"symbolicElement");this._renderer.render(this._data.value,a).then(f.hitch(this,function(){var c=this._isTall(a.lastChild["data-eqn-height"]),b;this._tooltip=new k;this._data.name&&(b=d.create(c?"div":"span"),b.textContent=this._data.name+" \x3d\u00a0",e.add(b,"embeddedOutputsVariableElement"),d.place(b,a,
"first"),e.add(a.lastChild,c?"displaySymbolicElement":"inlineSymbolicElement"))}));return a},getMIMEContent:function(){var a=this._renderer.renderToImageURLSynch(this._data.value,this._pxPerEm),d=this._renderer.getModel(this._data.value),d=b.exportMathML([d]);return[{flavor:c.MATHML_PRESENTATION,content:d},{flavor:c.IMAGE,content:a.dataURL}]},getName:function(){return this._data.name},getValue:function(){return this._data.value}})})},"MW/equations/renderer/model/utils/MathMLUtils":function(){define(["./NodeFactory"],
function(g){return{exportMathML:function(f,e){e=e||{};e.attribBlackList=e.attribBlackList||["data-category"];var d,b;if(1===f.length)b=f[0];else{b=g.createNode("MathRoot",{inline:e.inline});for(d=0;d<f.length;d+=1)b.children.push(f[d])}return b.exportMathML(e)}}})},"MW/rtc/plugins/embeddedoutputs/view/EquationTooltip":function(){define("dijit/popup dijit/registry dijit/TooltipDialog dojo/_base/declare dojo/_base/lang dojo/dom dojo/dom-class dojo/on dojo/query".split(" "),function(g,f,e,d,b,a,c,h){return d(null,
{constructor:function(){this._tooltip=f.byId("MathEquationRendererTooltip");this._tooltip||(this._tooltip=new e({"class":"rtcTooltip",id:"MathEquationRendererTooltip",content:"none",onMouseLeave:b.hitch(this,"_closeTooltip")}));this._localHandlers=[];this._handlers=[];this._handlers.push(h(document.body,".hasTooltip:mouseover",b.hitch(this,"_handleTooltipMouseover")))},destroy:function(){this._handlers.forEach(function(a){a.remove()});this._handlers=[]},_handleTooltipMouseover:function(a){for(a=a.target;a&&
a.parentNode&&!c.contains(a,"hasTooltip");)a=a.parentNode;delete a.title;this._tooltip.set("content",a["data-eqn-tooltip"]);g.open({popup:this._tooltip,around:a});this._localHandlers.push(h(a,"DOMNodeRemoved, DOMNodeRemovedFromDocument",b.hitch(this,"_closeTooltip")));this._timeout&&window.clearTimeout(this._timeout);this._timeout=setTimeout(b.hitch(this,"_closeTooltip"),3E3)},_closeTooltip:function(){g.close(this._tooltip);this._localHandlers.forEach(function(a){a.remove()});this._localHandlers=
[]}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/symbolic/export/Symbolic2HTMLProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/embeddedoutputs/outputhandlers/symbolic/export/Symbolic2HTML"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/symbolic/export/Symbolic2HTML":function(){define(["dojo/_base/declare","dojo/dom-construct",
"dojo/query","MW/rtc/plugins/equations/equationcontroller/view/EquationViewUtilities","MW/rtc/plugins/export/OutputNodeExporterInterface"],function(g,f,e,d,b){return g([b],{constructor:function(){},getApplicableDomNodeClasses:function(){return["embeddedOutputsSymbolicElement"]},enter:function(a,c,b){0<e(".MathEquation",c).length?(b=c.cloneNode(!0),this._replaceEquations(b,c),a.addToBody(b.outerHTML)):a.addToBody(c.outerHTML);return!0},_replaceEquations:function(a,c){var b,g,l=e(".MathEquation",c),
m=e(".MathEquation",a);l.forEach(function(a,c){b=d.exportDomnodeToImageURL(a,2);b.simpleEquation?m[c].firstChild.innerHTML=d.simpleEquationToHTML(b.simpleEquation):(g=f.create("span",{style:{verticalAlign:Math.round(b.verticalAlign)+"px"}},m[c].firstChild,"replace"),f.create("img",{src:b.dataURL,width:b.width/2,height:b.height/2},g))})}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/text/TextOutputHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"./TextOutputHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.outputhandlerservice"]}},createInstance:function(d){var b=new e;d.registerOutputPlugin(b);return b}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/text/TextOutputHandler":function(){define("dojo/_base/declare MW/rtc/plugins/embeddedoutputs/EmbeddedOutputsUtilities MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseOutputHandler MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerResult MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerResultInstruction MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerUtility ./TextOutput ./TextOutputProperties".split(" "),
function(g,f,e,d,b,a,c,h){return g([e],{OUTPUT_TYPE:h.OUTPUT_TYPE,constructor:function(){},getOutputFromData:function(a,e){var h=e.lineNumber,f=e.evaluationId;this._cleanData(a);var g=e.lastAddedOutput;if(this._shouldUpdateLastOutput(g,h,f))return g.updateDomElement(a),new d(b.UPDATE,g);h=new c({text:a.text,truncationInfo:a.truncationInfo,lineNumber:h});return new d(b.ADD_OUTPUT,h)},_shouldUpdateLastOutput:function(a,c,b){return f.isLoadedFromDisk(b)||(!a||a.type!==h.OUTPUT_TYPE||a.getWasDestroyed())||
!(a.evaluationId===b&&a.getServerLineNumber()===c)?!1:!0},_cleanData:function(c){c.text=a.removeControlCharacters(c.text)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/text/TextOutput":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct mw-html-utils/HtmlUtils mw-string-utils/StringUtils mw-utils/Utils MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseOutput MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerUtility ./TextOutputProperties".split(" "),function(g,
f,e,d,b,a,c,h,k){return g([c],{_ELLIPSIS:"...",_MAX_LENGTH:6E4,type:k.OUTPUT_TYPE,constructor:function(a){this._text=a.text;this._truncationInfo=a.truncationInfo;this._domElement=this._createDomElement();this._serverLineNumber=a.lineNumber;this._destroyed=!1},destroy:function(){this._destroyed=!0},getCssTag:function(){return k.CSS_TAG},getDomElement:function(){return this._domElement},getSerializableData:function(){return{text:this._text,truncationInfo:this._truncationInfo}},getText:function(){var a=
this._createDomElement();a.innerHTML=a.innerHTML.replace(/<br>/g,"\n");var c=a.textContent;e.destroy(a);return c},getHTML:function(a,c){return"\x3cpre\x3e"+this._cleanupText(this._text)+"\x3c/pre\x3e"},_createDomElement:function(){this._text=h.processBackspaceCharacters(this._text);var a=this._cleanupText(this._text),a={innerHTML:this._showTruncationIfNeeded(a,this._truncationInfo),className:"textElement"};return e.create("div",a)},_cleanupText:function(c){c=b.normalizeNewlines(c);c=a.removeSurroundingNewLines(c);
return c=d.treatHtmlLikeCommandWindow(c)},updateDomElement:function(a){if(!this._truncationInfo||!this._truncationInfo.wasTruncatedMidLine){this._text+=a.text;this._reapplyTruncation(a);this._text=h.processBackspaceCharacters(this._text);a=this.getDomElement();var c=this._cleanupText(this._text);a.innerHTML=this._showTruncationIfNeeded(c,this._truncationInfo)}},_reapplyTruncation:function(a){var c=!1;this._text.length>this._MAX_LENGTH&&(this._text=this._text.slice(0,this._MAX_LENGTH),c=!0);c|=a.truncationInfo&&
a.truncationInfo.wasTruncatedMidLine;this._truncationInfo={wasTruncatedMidLine:!!c}},_showTruncationIfNeeded:function(a,c){return c&&c.wasTruncatedMidLine?a+this._ELLIPSIS:a},getServerLineNumber:function(){return this._serverLineNumber},getWasDestroyed:function(){return this._destroyed}})})},"mw-string-utils/StringUtils":function(){define([],function(){return{_LEFT_TRIM_REGEXP:/^\s+/,_NEWLINE_REXEXP:/(\r\n|\n|\r)/g,leftTrim:function(g){return g.replace(this._LEFT_TRIM_REGEXP,"")},normalizeNewlines:function(g){return g.replace(this._NEWLINE_REXEXP,
"\n")}}})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/variable/VariableOutputHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./VariableOutputHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.outputhandlerservice"]}},createInstance:function(d){var b=new e;d.registerOutputPlugin(b);return b}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/variable/VariableOutputHandler":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseOutputHandler","MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerResult","MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerResultInstruction","./VariableOutput"],function(g,f,e,d,b){return g([f],{OUTPUT_TYPE:"variable",CSS_TAG:"embeddedOutputsVariableElement",constructor:function(){},getOutputFromData:function(a){a=new b({data:a});return new e(d.ADD_OUTPUT,a)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/variable/VariableOutput":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseOutput MW/rtc/plugins/embeddedoutputs/outputhandlers/VariableUtilities mw-html-utils/HtmlUtils".split(" "),
function(g,f,e,d,b,a){return g([d],{_CSS_TAG:"embeddedOutputsVariableElement",type:"variable",constructor:function(a){this._data=a.data;this._domElement=this._createDomElement()},getCssTag:function(){return this._CSS_TAG},getDomElement:function(){return this._domElement},getSerializableData:function(){return this._data},getText:function(){return this._createNameAndValue()},getHTML:function(c,b){var d=a.treatHtmlLikeCommandWindow(this._data.name),e="";this._data.header&&(e=this._createHeader(this._data.header).textContent);
return"\x3cpre\x3e"+d+" \x3d "+e+(e?"\n":"")+this._data.value+"\x3c/pre\x3e"},_createDomElement:function(){var a={innerHTML:this._createNameValueAndHeader(this._data),className:"variableElement"};return e.create("div",a)},_createNameAndValue:function(){return a.treatHtmlLikeCommandWindow(this._data.name)+" \x3d "+this._data.value},_createNameValueAndHeader:function(){var c=a.treatHtmlLikeCommandWindow(this._data.name);if(this._data.header){var b=this._createHeader(this._data.header);return e.create("span",
{innerHTML:c+" \x3d "+b.outerHTML,className:"variableNameElement"}).outerHTML+"\n    "+this._data.value}return c+" \x3d "+this._data.value},_createHeader:function(c){return b.createHeader(a.treatHtmlLikeCommandWindow(c))}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/variable/export/VariableElement2HTMLProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/embeddedoutputs/outputhandlers/variable/export/VariableElement2HTML"],function(g,f,e){return g(f,
{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/variable/export/VariableElement2HTML":function(){define(["dojo/_base/declare","MW/rtc/plugins/export/html/HTMLExportUtilities","MW/rtc/plugins/export/OutputNodeExporterInterface"],function(g,f,e){return g([e],{_STYLES:["font-family","font-size"],constructor:function(){},getApplicableDomNodeClasses:function(){return["embeddedOutputsVariableElement"]},enter:function(d,
b,a){a=f.getStyleValuesForDomNode(b,this._STYLES);a=a.replace(/'/g,"\x26quot;");d.addToBody("\x3cdiv class\x3d'variableElement' style\x3d'"+a+"'\x3e"+b.textContent+"\x3c/div\x3e");return!0}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/variablestring/VariableStringOutputHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./VariableStringOutputHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.outputhandlerservice"]}},
createInstance:function(d){var b=new e;d.registerOutputPlugin(b);return b}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/variablestring/VariableStringOutputHandler":function(){define("dojo/_base/declare dojo/_base/lang MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerUtility MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseOutputHandler MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerResult MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerResultInstruction ./VariableStringOutput ./VariableStringOutputProperties".split(" "),
function(g,f,e,d,b,a,c,h){return g([d],{OUTPUT_TYPE:h.OUTPUT_TYPE,constructor:function(){},getOutputFromData:function(d){d=f.clone(d);this._cleanData(d);d=new c({data:d});return new b(a.ADD_OUTPUT,d)},_cleanData:function(a){var c=e.removeControlCharacters(a.value);a.value=e.processBackspaceCharacters(c)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/variablestring/VariableStringOutput":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseOutput MW/rtc/plugins/embeddedoutputs/outputhandlers/VariableUtilities MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerUtility mw-html-utils/HtmlUtils mw-string-utils/StringUtils mw-utils/Utils ./VariableStringOutputProperties".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return g([d],{_ELLIPSIS:"...",type:l.OUTPUT_TYPE,constructor:function(a){this._data=a.data;this._domElement=this._createDomElement()},getCssTag:function(){return l.CSS_TAG},getDomElement:function(){return this._domElement},getSerializableData:function(){return this._data},getText:function(){var a=this._createText(this._data.value),c=-1!==a.search("\n")?"\n":"",a=e.create("div",{innerHTML:a});return this._createName(this._data.name)+c+a.textContent},getHTML:function(a,
c){var b="";this._data.header&&(b=this._createHeader(this._data.header).textContent);var d=h.normalizeNewlines(this._data.value),d=b||-1!==d.search("\n")?"\n":"";return"\x3cpre\x3e"+this._createName(this._data.name)+b+d+this._createText(this._data.value)+"\x3c/pre\x3e"},_createHeader:function(a){return b.createHeader(c.treatHtmlLikeCommandWindow(a))},_createName:function(a){return c.treatHtmlLikeCommandWindow(a)+" \x3d "},_createText:function(a){a=h.normalizeNewlines(a);return a=c.treatHtmlLikeCommandWindow(a)},
_createDomElement:function(){var a,c=e.create("div",{className:"textElement"}),b=this._createText(this._data.value),d;this._data.header?(d=this._createHeader(this._data.header),d=e.create("span",{innerHTML:this._data.name+" \x3d "+d.outerHTML,className:"variableNameElement"})):d=e.create("span",{innerHTML:this._data.name+" \x3d ",className:"variableNameElement"});d=e.create("div",{innerHTML:d.outerHTML},c,"last");var h=this._data.truncationInfo&&this._data.truncationInfo.wasTruncatedAtLineBreak;-1===
this._data.value.search("\n")&&!h?(this._data.header&&(d.innerHTML+="\n"),d.innerHTML+=b):a=e.create("div",{innerHTML:b},c,"last");this._addTruncationEllipses(this._data.truncationInfo,d,a);return c},_addTruncationEllipses:function(a,c,b){c&&(a&&a.wasTruncatedMidLine)&&(c.innerHTML+=this._ELLIPSIS);b&&(a&&a.wasTruncatedAtLineBreak)&&(a=e.create("div",{className:"verticalEllipsis"}),b.appendChild(a))}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/warning/WarningOutputHandlerProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./WarningOutputHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.outputhandlerservice","rtc.diagnosticmessage"]}},createInstance:function(d,b){var a=new e(b);d.registerOutputPlugin(a);return a}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/warning/WarningOutputHandler":function(){define("dojo/_base/declare dojo/_base/lang MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseOutputHandler MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerResult MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerResultInstruction MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerUtility ./WarningOutput ./WarningOutputProperties".split(" "),
function(g,f,e,d,b,a,c,h){return g([e],{OUTPUT_TYPE:h.OUTPUT_TYPE,constructor:function(a){this._diagnosticMessageFormatter=a},getOutputFromData:function(a,e){a=f.clone(a);this._cleanData(a);var h=new c({text:a.text,truncationInfo:a.truncationInfo,diagnosticMessageFormatter:this._diagnosticMessageFormatter});return new d(b.ADD_OUTPUT,h)},_cleanData:function(c){var b=a.removeControlCharacters(c.text);c.text=a.processBackspaceCharacters(b)}})})},"MW/rtc/plugins/embeddedoutputs/outputhandlers/warning/WarningOutput":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/query mw-html-utils/HtmlUtils MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseOutput MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerUtility ./WarningOutputProperties".split(" "),
function(g,f,e,d,b,a,c,h){return g([a],{type:h.OUTPUT_TYPE,constructor:function(a){this._text=a.text;this._truncationInfo=a.truncationInfo;this._diagnosticMessageFormatter=a.diagnosticMessageFormatter;a=b.treatHtmlLikeCommandWindow(this._text);this._domElement=this._diagnosticMessageFormatter.createWarningMessageWithStack(a).getDomNode()},getCssTag:function(){return h.CSS_TAG},getDomElement:function(){return this._domElement},getSerializableData:function(){return{text:this._text,truncationInfo:this._truncationInfo}},
getText:function(){return c.getText(this._text)},getHTML:function(a,c){return this._domElement.innerHTML}})})},"MW/rtc/plugins/embeddedoutputs/view/EmbeddedOutputsAlertProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/embeddedoutputs/view/EmbeddedOutputsAlert","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{requires:function(){return{createInstance:["rtc.embeddedoutputs","rtc.alert.model","rtc.diagnosticmessage","rtc.embeddedoutputs.syntaxerrors"]}},createInstance:function(d,
b,a,c){return new f(d._outputsModel,b,a,c)}})})},"MW/rtc/plugins/embeddedoutputs/view/EmbeddedOutputsAlert":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-class dojo/query MW/rtc/plugins/embeddedoutputs/model/RegionUtilities MW/rtc/plugins/language/matlab/alert/AlertTypeEnum mw-utils/Utils".split(" "),function(g,f,e,d,b,a,c,h){return g(null,{constructor:function(a,c,b,d){this._embeddedOutputsModel=a;this._alertModel=c;this._diagnosticMessageFormatter=b;this._syntaxErrorHandler=
d;this._aspectHandles=[e.after(this._embeddedOutputsModel,"onModelUpdated",f.hitch(this,"_updateAlerts")),e.after(this._syntaxErrorHandler,"onParseCompletedWithNoSyntaxErrors",f.hitch(this,"_handleEvaluationHasNoSyntaxErrors"),!0)];this._updateAlerts()},destroy:function(){this._aspectHandles.forEach(function(a){a.remove()});this._aspectHandles=[];this._alertModel.removeAllAlerts()},_updateAlerts:function(){var a=[],b=[],d=this._getAlertOutputsFromModel();d.forEach(function(e){var h=this._shouldBeStale(e,
d),f={type:"error"===e.type?c.ERROR:c.WARNING,line:e.codeLinePositions[0].getLineColumn().line,payload:{isStale:h},output:e};if(this._enableTooltips)if("error"===e.type){var g=this._diagnosticMessageFormatter.createErrorMessageWithStack(e.getHTML());f.payload.message=g.getDomNode().outerHTML;f.payload.isActive=!0}else g=this._diagnosticMessageFormatter.createWarningMessageWithStack(e.getHTML()),f.payload.message=g.getDomNode().outerHTML;(e=this._findMatchingAlert(e))&&!h?b.push(e):a.push(f)},this);
this._removeAllAlertsExceptFor(b);a.forEach(function(a){var c=this._alertModel.addAlert(a.type,a.line,a.payload);a.output.associatedAlertUid=c},this)},_shouldBeStale:function(a,c){var b=a.getDomElement(),b=d.contains(b,"typoFixApplied"),e=this._syntaxErrorHandler.isSyntaxError(a),h=this._syntaxErrorHandler.hasSyntaxError(c);return b||h&&!e},_getAlertOutputsFromModel:function(){return this._embeddedOutputsModel.getOutputs().filter(function(a){return"error"===a.type||"warning"===a.type})},_findMatchingAlert:function(a){var c=
null;this._alertModel.getAlerts().some(function(b){var d=a.associatedAlertUid===b.id;c=d?b:null;return d});return c},_removeAllAlertsExceptFor:function(a){var c=this._alertModel.getAlerts();a=h.differenceOfArrays(c,a).map(function(a){return a.id});0<a.length&&this._alertModel.removeAlerts(a)},_handleEvaluationHasNoSyntaxErrors:function(a){var c=a.regionNumbersToRun;if(void 0!==c&&0<c.length){a=c[0];var c=c[c.length-1],b=this._embeddedOutputsModel.getRegions();a=b[a];c=b[c];this._clearAllStale();this._setAlertsInRegionsAsStale(a,
c)}},_setAlertsInRegionsAsStale:function(c,b){this._alertModel.getAlerts().forEach(function(d){a.isPositionWithinRegionRange(d.position,c,b)&&this._alertModel.updateAlert(d.id,{payload:{isStale:!0}})},this)},_clearAllStale:function(){this._alertModel.getAlerts().forEach(function(a){var c={payload:{isStale:this._isAlertTypoFixed(a)}};this._alertModel.updateAlert(a.id,c)},this)},_isAlertTypoFixed:function(a){var c=!1;this._getAlertOutputsFromModel().some(function(b){if(b.codeLinePositions[0].line===
a.position.line)return b=b.getDomElement(),d.contains(b,"typoFixApplied")&&(c=!0),!0});return c},enableTooltips:function(a){this._enableTooltips=a}})})},"MW/rtc/plugins/language/matlab/alert/AlertTypeEnum":function(){define([],function(){return{ERROR:1,WARNING:2}})},"MW/rtc/plugins/embeddedoutputs/view/HitLineIndicatorProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/embeddedoutputs/view/HitLineIndicator"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.embeddedoutputs.statehandler rtc.view.decoration rtc.internaldocument matlab.tokens rtc.embeddedoutputs.model rtc.embeddedoutputs.executiondatamanager rtc.linenumberservice".split(" ")}},
createInstance:function(d,b,a,c,h,f,g){return new e(d,b,a,c,h,f,g)}})})},"MW/rtc/plugins/embeddedoutputs/view/HitLineIndicator":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities"],function(g,f,e,d,b){return g(d,{_NON_HIT_CODE_CLASS:"notHitCode",constructor:function(a,c,b,d,g,m,p){this._stateHandler=a;this._decorator=c.createDecorator();this._internalDocument=b;this._tokenizerService=
d;this._embeddedOutputsModel=g;this._executionDataManager=m;this._lineNumberService=p;this.own(e.after(this._stateHandler,"stateChanged",f.hitch(this,"_handleEvalType"),!0));this._ignoreOpacityLines={};this._continuationLines={};this._functionFirstLines={}},_handleEvalType:function(a,c){a===this._stateHandler.CHANGE_TYPE_ENUM.EVAL_INITIALIZED?(this._preProcessTokens(),this._setCodeOpacity(),this._addExecutionDataListener(),this._documentListener||this._addDocumentListener()):a===this._stateHandler.CHANGE_TYPE_ENUM.EVAL_COMPLETE&&
(this._executionDataListener&&(c.didRunToCompletion&&this._postProcessColoring(),this._removeExecutionDataListener()),this._ignoreOpacityLines={},this._continuationLines={},this._functionFirstLines={})},_setCodeOpacity:function(){for(var a=this._lineNumberService.getNumberOfCodeLines(),c=1;c<=a;c++){var b=this._lineNumberService.getLineNumberFromCodeLineNumber(c)+1,b=this._internalDocument.getRangeForLine(b);this._decorator.addClass(b,[this._NON_HIT_CODE_CLASS])}this._decorator.applyChanges()},_handleDocumentChange:function(){this._executionDataListener&&
this._removeExecutionDataListener();this._removeDocumentListener();for(var a=this._lineNumberService.getNumberOfCodeLines(),c=1;c<=a;c++){var b=this._lineNumberService.getLineNumberFromCodeLineNumber(c)+1,b=this._internalDocument.getRangeForLine(b);this._decorator.clearRange(b)}this._decorator.applyChanges()},_preProcessTokens:function(){this._mostRecentContinuationStart=1;var a=this._tokenizerService.getTokensData().tokens,c;for(c in a)a.hasOwnProperty(c)&&(a[c].forEach(function(a){var b=parseInt(c)+
1;this._locateEndsAndFunctions(a,b);this._locateFunctionFirstLines(a,b);this._locateContinuations(b)},this),this._locateStandaloneComments(a,c))},_locateEndsAndFunctions:function(a,c){if(b.isTokenEndOfBlock(a)||b.isFunctionToken(a))this._ignoreOpacityLines[c]=!0},_locateFunctionFirstLines:function(a,c){b.isFunctionToken(a)&&(this._functionFirstLines[this._lineNumberService.getLineNumberFromCodeLineNumber(c+1)]=c)},_locateContinuations:function(a){var c=this._tokenizerService.getLexStateForLine(a);
this._tokenizerService.isLineContinuation(c)&&(this._continuationLines.hasOwnProperty(a)||(this._mostRecentContinuationStart=a),this._continuationLines[a+1]=this._mostRecentContinuationStart)},_locateStandaloneComments:function(a,c){var b=a[c][0];"%"===b.getValue().trim().substring(0,1)&&(this._ignoreOpacityLines[b.getPositionInfo().line+1]=!0)},_handleLineData:function(a,c){for(var b=0;b<c.length;b++){var d=this._lineNumberService.getLineNumberFromCodeLineNumber(b+1)+1,e=this._internalDocument.getRangeForLine(d);
0<c[b]?(this._decorator.clearRange(e),this._handleFunctionHeaders(d)):(this._handleContinuations(e,c,d),this._handleEndsAndComments(e,c,d,a))}this._decorator.applyChanges()},_handleContinuations:function(a,c,b){this._continuationLines.hasOwnProperty(b)&&0<c[this._lineNumberService.getCodeLineNumberFromLineNumber(this._continuationLines[b]-1)-1]&&this._decorator.clearRange(a)},_handleFunctionHeaders:function(a){this._functionFirstLines.hasOwnProperty(a)&&(a=this._internalDocument.getRangeForLine(this._functionFirstLines[a]),
this._decorator.clearRange(a))},_handleEndsAndComments:function(a,c,b,d){(c=this._embeddedOutputsModel.getRegions()[d])&&b<=c.code.regionPositions[0].line&&this._ignoreOpacityLines.hasOwnProperty(b)&&this._decorator.clearRange(a)},_postProcessColoring:function(){Object.keys(this._ignoreOpacityLines).forEach(function(a){a=this._internalDocument.getRangeForLine(parseInt(a));this._decorator.clearRange(a)},this);this._decorator.applyChanges()},_addDocumentListener:function(){this._documentListener=e.after(this._internalDocument,
"onDocumentChanged",f.hitch(this,"_handleDocumentChange"),!0)},_removeDocumentListener:function(){this._documentListener.remove();this._documentListener=null},_addExecutionDataListener:function(){this._executionDataListener=e.after(this._executionDataManager,"onDataUpdate",f.hitch(this,"_handleLineData"),!0)},_removeExecutionDataListener:function(){this._executionDataListener.remove();this._executionDataListener=null},destroy:function(){this._removeExecutionDataListener();this._removeDocumentListener()}})})},
"MW/rtc/plugins/embeddedoutputs/ExecutionManagerViewServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./ExecutionManagerViewService"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.embeddedoutputs.executionmanager","rtc.embeddedoutputs.syntaxerrors","rtc.embeddedoutputs.statehandler"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/embeddedoutputs/ExecutionManagerViewService":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin","MW/rtc/plugins/debug/DebugServicesFactory"],function(g,f,e,d,b){return g(d,{_NEXT_REQUEST_TIMEOUT:500,constructor:function(a,c,d){this._executionManager=a;this._stateHandler=d;a=b.getInstance();this.own(e.after(a,"onDBStop",f.hitch(this,"_handleImmediateActions")));this.own(e.after(c,"onSyntaxError",f.hitch(this,"_handleImmediateActions")));this._isSilentExecution=!1;this._callbackQueue=[]},executeViewAction:function(a){this._isSilentExecution?
this._callbackQueue.push(a):a()},executeSectionWithVisualDelay:function(a,c,b,d,e){this._setTimeOuts(d);this._executionManager.executeSection(a,c,b,e)},executeAllSectionsWithVisualDelay:function(a,c,b){this._setTimeOuts(c);this._executionManager.executeAllSections(a,b)},_setTimeOuts:function(a){this._setNextRequestTimeout();this._setLiveEvalTimeout(a)},_setNextRequestTimeout:function(){this._nextRequestTimeout&&(window.clearTimeout(this._nextRequestTimeout),this._nextRequestTimeout=null);this._nextRequestTimeout=
window.setTimeout(f.hitch(this,function(){this._executeCallbacksAndClearTimer()}),this._NEXT_REQUEST_TIMEOUT)},_executeCallbacksAndClearTimer:function(){this._executeCallbacksIfRunning();this._clearTimer()},_clearTimer:function(){this._liveEvalTimeout&&(window.clearTimeout(this._liveEvalTimeout),this._liveEvalTimeout=null)},_setLiveEvalTimeout:function(a){this._isSilentExecution=!0;this._clearTimer();this._liveEvalTimeout=window.setTimeout(f.hitch(this,function(){this._executeCallbacksIfRunning()}),
a)},_handleImmediateActions:function(){this._executeCallbacks();this._clearState()},_executeCallbacksIfRunning:function(){this._stateHandler.isRunning()&&this._executeCallbacks();this._clearState()},_executeCallbacks:function(){this._isSilentExecution&&this._callbackQueue.forEach(function(a){a()},this)},_clearState:function(){this._isSilentExecution=!1;this._callbackQueue=[]},hasPendingRequests:function(){return this._executionManager.hasPendingRequests()}})})},"MW/rtc/plugins/embeddedoutputs/triggers/TriggersProvider":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/embeddedoutputs/triggers/Triggers","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{requires:function(){return{createInstance:"rtc.actionservice rtc.embeddedoutputs.statehandler rtc.cursor rtc.embeddedoutputs.executionmanager rtc.code.codechange rtc.keyhandler rtc.code.sections.model".split(" ")}},createInstance:function(d,b,a,c,e,g,l){return new f(d,b,a,c,e,g,l)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/embeddedoutputs/triggers/Triggers":function(){define("dojo/_base/declare dojo/_base/lang MW/rtc/plugins/debug/DebugServicesFactory ./EvalOnLineChangeTrigger ./LiveEvalTrigger ./ManualTrigger".split(" "),
function(g,f,e,d,b,a){return g(null,{_ACTION_STATES:{AUTO:"auto",MANUAL:"manual"},constructor:function(a,b,d,e,f,g,n){this._actionService=a;this._stateHandler=b;this._cursor=d;this._executionManager=e;this._codeChangeService=f;this._keyHandler=g;this._sectionModel=n;this.enableTriggers()},enableTriggers:function(){if(!this._enabled){var c=[{id:"rtc_embedded_outputs_auto",enabled:!0,selected:!1,callback:f.hitch(this,"setEvaluationState",this._ACTION_STATES.AUTO),isEvalOnLineChange:f.hitch(this,"_isEvalOnLineChange")},
{id:"rtc_embedded_outputs_manual",enabled:!0,selected:!1,callback:f.hitch(this,"setEvaluationState",this._ACTION_STATES.MANUAL)}];this._actionService.loadActions(c);this._liveEvalTrigger=new b(this._codeChangeService,this._executionManager);this._autoTrigger=this._evalOnLineChangeTrigger=new d(this._cursor,this._stateHandler,this._codeChangeService,this._executionManager);this.setEvaluationState(this._ACTION_STATES.MANUAL);this._manualTrigger=new a(this._cursor,this._actionService,this._keyHandler,
this._sectionModel,this._executionManager,e.getInstance());this._enabled=!0}},disableTriggers:function(){this._enabled&&(this._manualTrigger.destroy(),this._manualTrigger=null,this._liveEvalTrigger.destroy(),this._liveEvalTrigger=null,this._evalOnLineChangeTrigger.destroy(),this._evalOnLineChangeTrigger=null,this._actionService.removeAction("rtc_embedded_outputs_auto"),this._actionService.removeAction("rtc_embedded_outputs_manual"),this._enabled=!1)},_switchAutoEval:function(){this._autoTrigger.disable();
this._isEvalOnLineChange()?this._autoTrigger=this._liveEvalTrigger:this._autoTrigger=this._evalOnLineChangeTrigger;this._autoTrigger.enable()},_isEvalOnLineChange:function(){return this._autoTrigger===this._evalOnLineChangeTrigger},_updateActionStates:function(a){this._actionService.updateAction("rtc_embedded_outputs_auto",{selected:a});this._actionService.updateAction("rtc_embedded_outputs_manual",{selected:!a})},setEvaluationState:function(a){this._currentActionState=a;(a=a===this._ACTION_STATES.AUTO)?
this._autoTrigger.enable():this._autoTrigger.disable();this._updateActionStates(a)},getEvaluationState:function(){return this._currentActionState},destroy:function(){this.disableTriggers()}})})},"MW/rtc/plugins/embeddedoutputs/triggers/EvalOnLineChangeTrigger":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect"],function(g,f,e){return g(null,{constructor:function(d,b,a,c){this._cursor=d;this._stateHandler=b;this._codeChangeService=a;this._executionManager=c;this._aspectHandles=
[];this._onCodeRegionChangeHandle=null;this._priorCursorLine=1;this._isDirty=!1;this._stateHandler.attachListener(this._stateHandler.CHANGE_TYPE_ENUM.EVAL_INITIALIZED,f.hitch(this,"_clean"));this.disable()},destroy:function(){this.disable()},enable:function(){this._onCodeRegionChangeHandle||(this._onCodeRegionChangeHandle=e.after(this._codeChangeService,"onCodeChanged",f.hitch(this,"_setDirty")));this._onCursorChangeHandle||(this._onCursorChangeHandle=e.after(this._cursor,"onChange",f.hitch(this,
"_runIfDirtyAndLineChange")))},_clean:function(){this._isDirty=!1},_runIfDirtyAndLineChange:function(){var d=this._cursor.getLineColumn().line,b=d!==this._priorCursorLine;this._priorCursorLine=d;this._isDirty&&b&&this._evalNow()},disable:function(){this._onCodeRegionChangeHandle&&(this._onCodeRegionChangeHandle.remove(),this._onCodeRegionChangeHandle=null);this._onCursorChangeHandle&&(this._onCursorChangeHandle.remove(),this._onCursorChangeHandle=null);this._executionManager.interrupt()},_setDirty:function(){this._isDirty=
!0},_evalNow:function(){this._isDirty=!1;this._executionManager.executeAllSections()}})})},"MW/rtc/plugins/embeddedoutputs/triggers/LiveEvalTrigger":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect"],function(g,f,e){return g(null,{_LIVE_EVAL_DELAY:200,constructor:function(d,b){this._codeChangeService=d;this._executionManager=b;this._aspectHandles=[];this._fullEval=!1;this._liveAspectHandle=null},destroy:function(){this.disable()},enable:function(){this._liveAspectHandle||(this._liveAspectHandle=
e.after(this._codeChangeService,"onCodeChanged",f.hitch(this,"_resetTimer")));this._executionManager.executeAllSections()},disable:function(){this._liveAspectHandle&&(this._liveAspectHandle.remove(),this._liveAspectHandle=null);clearTimeout(this._updateTimer);this._executionManager.interrupt()},_resetTimer:function(){this._updateTimer&&(clearTimeout(this._updateTimer),this._updateTimer=null);this._updateTimer=setTimeout(f.hitch(this,"_evalNow"),this._LIVE_EVAL_DELAY)},_evalNow:function(){clearTimeout(this._updateTimer);
this._updateTimer=null;this._executionManager.executeAllSections()}})})},"MW/rtc/plugins/embeddedoutputs/triggers/ManualTrigger":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/i18n!l10n/nls/actions dojo/sniff dijit/Destroyable MW/rtc/plugins/language/matlab/functions/FunctionAttributeConstants".split(" "),function(g,f,e,d,b,a,c){return g(a,{constructor:function(a,c,b,g,p,n){this._actionService=c;this._cursor=a;this._keyHandler=b;this._sectionModel=g;this._executionManager=
p;this._debugServices=n;this._actions=[{id:"rtc_refresh_outputs",enabled:!0,callback:f.hitch(p,"executeAllSections")},{id:"rtc_refresh_all_outputs",enabled:!0,key:"f5",platformKey:{mac:"meta_alt_r"},callback:f.hitch(this,"_runAll")},{id:"rtc_run_section",enabled:!0,contextMenuGroup:"CodeSections",text:d.runSectionLabel,key:"ctrl_enter",platformKey:{mac:"meta_enter"},callback:f.hitch(this,"_runSection")},{id:"rtc_run_section_advance",enabled:!0,text:d.runSectionAndAdvanceLabel,key:"ctrl_shift_enter",
platformKey:{mac:"meta_shift_enter"},callback:f.hitch(this,"_runSectionAdvance")},{id:"rtc_run_section_end",enabled:!0,text:d.runSectionToEndLabel,callback:f.hitch(this,"_runSectionEnd")}];c.loadActions(this._actions);this._addOtherKeyBindings();this.own(e.after(this._sectionModel,"currentSectionChanged",f.hitch(this,"_updateActionState")));this.own(e.after(this._sectionModel,"onAttributesUpdated",f.hitch(this,"_updateActionState")));this.own(e.after(this._actionService,"onActionChange",f.hitch(this,
function(a){"rtc_embedded_outputs_manual"===a.id&&"selected"===a.key&&this._updateActionState()}),!0));this.own(e.after(this._debugServices,"onDebugModeChanged",f.hitch(this,"_updateActionState")));this._updateActionState()},_runSectionEnd:function(){var a=this._actionService.getAction("rtc_run_section_end");a&&a.enabled&&this._executionManager.executeCurrentSection(!0,!1)},_runSection:function(){var a=this._actionService.getAction("rtc_run_section");a&&a.enabled&&this._executionManager.executeCurrentSection(!1,
!1)},_runSectionAdvance:function(){var a=this._actionService.getAction("rtc_run_section");a&&a.enabled&&(this._executionManager.executeCurrentSection(!1,!0),this._actionService.executeAction("rtc_navigate_next_section"))},_runAll:function(){var a=this._actionService.getAction("rtc_refresh_all_outputs");a&&a.enabled&&this._executionManager.executeAllSections()},_updateActionState:function(){var a=this._actionService.getAction("rtc_embedded_outputs_manual"),a=a&&a.selected;this._isInLocalFunctionSection()&&
(a=!1);this._actionService.updateAction("rtc_run_section",{enabled:a});this._actionService.updateAction("rtc_run_section_advance",{enabled:a});this._actionService.updateAction("rtc_run_section_end",{enabled:a});this._actionService.updateAction("rtc_refresh_all_outputs",{enabled:!this._debugServices.isDebugging})},_isInLocalFunctionSection:function(){var a=this._sectionModel.getCurrentSection();return a&&a[c.LOCAL_FUNCTION_ATTRIBUTE]&&0<a[c.LOCAL_FUNCTION_ATTRIBUTE].length},_addOtherKeyBindings:function(){b("mac")&&
this._keyHandler.addBindings([{key:"f5",action:"rtc_refresh_all_outputs"}])},_removeOtherKeyBindings:function(){b("mac")&&this._keyHandler.removeBindings("f5")},destroy:function(){this.inherited(arguments);this._removeOtherKeyBindings();this._actions.forEach(function(a){this._actionService.updateAction(a.id,{enabled:!1});this._actionService.removeAction(a.id)},this)}})})},"MW/rtc/plugins/language/matlab/functions/FunctionAttributeConstants":function(){define([],function(){return{LOCAL_FUNCTION_ATTRIBUTE:"localFunctions",
TOP_LEVEL_FUNCTION_ATTRIBUTE:"topLevelFunctions",FUNCTION_ATTRIBUTE:"functions"}})},"MW/rtc/plugins/embeddedoutputs/triggers/InterruptActionProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/embeddedoutputs/triggers/InterruptAction","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{requires:function(){return{createInstance:["rtc.actionservice","rtc.cursorcontroller","rtc.embeddedoutputs.executionmanager"]}},createInstance:function(d,b,a){return new f(d,b,a)},destroyInstance:function(d){d.destroy()}})})},
"MW/rtc/plugins/embeddedoutputs/triggers/InterruptAction":function(){define(["dojo/_base/declare","dojo/_base/lang"],function(g,f){return g(null,{constructor:function(e,d,b){this._actionService=e;this._cursorController=d;this._executionManager=b;this._actions=[{id:"rtc_interrupt_embedded_outputs",enabled:!0,key:"ctrl_c",callback:f.hitch(this,"_interruptCallback")}];this._actionService.loadActions(this._actions)},_interruptCallback:function(){if(this._cursorController.hasSelection())return!1;this._executionManager.interrupt();
return!0},destroy:function(){this._actionService.removeAction("rtc_interrupt_embedded_outputs")}})})},"MW/rtc/plugins/export/ExportNotifierProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/export/ExportNotifier","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{requires:function(){return{createInstance:[]}},createInstance:function(){return new f}})})},"MW/rtc/plugins/export/ExportNotifier":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin"],function(g,
f){return g(f,{notifyExportStart:function(){this.onExportStart()},onExportStart:function(){}})})},"MW/rtc/plugins/folding/FoldingActionsProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./FoldingActions"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.actionservice","rtc.cursorcontroller","rtc.folding.foldingcontroller","rtc.folding.foldingmodel"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/plugins/folding/FoldingActions":function(){define(["dojo/_base/declare",
"dojo/aspect","MW/rtc/abstract/AbstractPlugin"],function(g,f,e){return g(e,{_FOLD_CURRENT_BLOCK:"rtc_fold_current_block",_UNFOLD_CURRENT_BLOCK:"rtc_unfold_current_block",_FOLD_ALL:"rtc_fold_all",_UNFOLD_ALL:"rtc_unfold_all",constructor:function(d,b,a,c){this._actionService=d;this._cursorController=b;this._foldingController=a;this._foldingModel=c;this._actionService.loadActions(this._getActions());this.own(f.after(this._cursorController,"onUpdate",this._updateActions.bind(this)))},_getActions:function(){return[{id:this._FOLD_CURRENT_BLOCK,
enabled:!0,key:"ctrl_.",callback:this._actionEnabledWrapper.bind(this,this._FOLD_CURRENT_BLOCK,this._collapseCurrentBlock.bind(this))},{id:this._UNFOLD_CURRENT_BLOCK,enabled:!0,key:"ctrl_shift_.",callback:this._actionEnabledWrapper.bind(this,this._UNFOLD_CURRENT_BLOCK,this._expandCurrentBlock.bind(this))},{id:this._FOLD_ALL,enabled:!0,key:"ctrl_,",callback:this._actionEnabledWrapper.bind(this,this._FOLD_ALL,this._collapseAll.bind(this))},{id:this._UNFOLD_ALL,enabled:!0,key:"ctrl_shift_,",callback:this._actionEnabledWrapper.bind(this,
this._UNFOLD_ALL,this._expandAll.bind(this))}]},_actionEnabledWrapper:function(d,b){return!this._actionService.getAction(d).enabled?!1:b()},_updateActions:function(){var d=this._cursorController.hasMultipleCursors();this._actionService.updateAction(this._FOLD_CURRENT_BLOCK,{enabled:!d});this._actionService.updateAction(this._UNFOLD_CURRENT_BLOCK,{enabled:!d})},_collapseCurrentBlock:function(){var d=this._getCandidateAtCursor();if(!d)return!1;this._foldingController.fold(d);return!0},_expandCurrentBlock:function(){var d=
this._getCandidateAtCursor();if(!d)return!1;this._foldingController.unfold(d);return!0},_getCandidateAtCursor:function(){var d=this._cursorController.getCursors()[0].getCursorPosition();return this._foldingModel.getFoldCandidateForDocumentLine(d.getLine()-1)},_collapseAll:function(){return this._foldingController.foldAll()},_expandAll:function(){return this._foldingController.unfoldAll()}})})},"MW/rtc/plugins/folding/FoldingControllerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"./FoldingController"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.cursorcontroller rtc.internaldocument rtc.view rtc.folding.foldingmodel rtc.view.hidden.hiddennodeservice rtc.document".split(" ")}},createInstance:function(d,b,a,c,h,f){return new e(d,b,a,c,h,f)}})})},"MW/rtc/plugins/folding/FoldingController":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/browsersupport/BrowserSupportUtilities MW/rtc/model/events/nodechange/NodeChangeEventTypes MW/rtc/model/DocumentUtilities MW/rtc/model/PositionUtilities".split(" "),
function(g,f,e,d,b,a,c,h){return g(d,{_ONSCREEN_LOWER_BOUND:5,_ONSCREEN_UPPER_BOUND:50,_SCROLL_TO_PERCENT:10,constructor:function(a,c,b,d,h,f){this._cursorController=a;this._internalDocument=c;this._view=b;this._foldingModel=d;this._hiddenNodeService=h;this.own(e.after(this._cursorController,"onUpdate",this._handleCursorChanged.bind(this)));this.own(e.after(this._internalDocument,"onNodeChange",this._queueInsertedNodes.bind(this),!0));this.own(e.after(this._internalDocument,"onDocumentChanged",this._flushInsertedNodes.bind(this),
!0));this.own(e.after(f,"onDirectedDeletion",this._handleDeletion.bind(this),!0));this.own(e.after(this._foldingModel,"onCandidatesRemoved",this._handleCandidatesRemoved.bind(this),!0));this._currentlyFolded=[];this._queuedInsertedNodes=[]},fold:function(a){this._foldCandidates([a])},foldAll:function(){var a=this._foldingModel.getAllFoldCandidates();return this._foldCandidates(a)},_foldCandidates:function(a){var c=!1,d=b.createSet(),e;a.forEach(function(a){a.isFolded()||(this._setFolded(a),c=!0,this._addNodesForCandidate(a,
d),!e&&this._isCursorInsideFoldCandidate(a)&&(e=a.getRange().getStartPosition()))},this);0<d.size&&this._hiddenNodeService.hideAll(d);e&&this._setPositionAndScrollIntoView(e);this.onCandidatesFolded(a);return c},_setPositionAndScrollIntoView:function(a){this._cursorController.suspendUpdates();this._cursorController.setPositions([a]);this._cursorController.emitUpdate(!0,!1);this._cursorController.activateUpdates()},onCandidatesFolded:function(a){},unfold:function(a){a=this._foldingModel.getCandidateLineage(a);
this._unfoldCandidates(a,!1)},unfoldAll:function(){var a=this._foldingModel.getAllFoldCandidates();return this._unfoldCandidates(a,!0)},_unfoldCandidates:function(a,c){var d=!1,e=b.createSet();a.forEach(function(a){a.isFolded()&&(this._setUnfolded(a),d=!0,this._addNodesForCandidate(a,e),c||this._getChildCandidates(a,this._isCandidateFolded).forEach(function(a){this._removeNodesForCandidate(a,e)},this))},this);0<e.size&&this._hiddenNodeService.showAll(e);this.onCandidatesUnfolded(a);return d},onCandidatesUnfolded:function(a){},
_isCandidateFolded:function(a){return a.isFolded()},_setUnfolded:function(a){a.setUnfolded();this._currentlyFolded.splice(this._currentlyFolded.indexOf(a),1)},_setFolded:function(a){a.setFolded();this._currentlyFolded.push(a)},_addNodesForCandidate:function(a,c){for(var b=a.getFoldableNodes(),d=0;d<b.length;d+=1)c.add(b[d])},_removeNodesForCandidate:function(a,c){for(var b=a.getFoldableNodes(),d=0;d<b.length;d+=1)c.delete(b[d])},toggle:function(a){a.isFolded()?this.unfold(a):this.fold(a)},_handleCandidatesRemoved:function(a){var c=
[];a.forEach(function(a){if(a.isFolded()){var b=this._foldingModel.getCandidateLineage(a);b.splice(b.indexOf(a),1);b.some(function(a){return a.isFolded()})?this._setUnfolded(a):c.push(a)}},this);0<c.length&&this._unfoldCandidates(c,!1)},_handleCursorChanged:function(){var a=null,b=this._cursorController.getCursors()[0].getCursorPosition();c.isAtEndOfFile(b)||(this._currentlyFolded.some(function(c){return this._isCursorInsideFoldCandidate(c)?(a=c,!0):!1},this),a&&(this.unfold(a),this._scrollCandidateIntoView(a)))},
_handleDeletion:function(a,c){var b=[];0<a&&c?b=this._currentlyFolded.filter(function(a){return c.endPosition.isEqualTo(a.getHiddenRange().getStartPosition())},this):0>a&&c&&(b=this._currentlyFolded.filter(function(a){return c.startPosition.isEqualTo(a.getHiddenRange().getEndPosition())},this));if(0<b.length)return this.unfold(b[0]),!0},_queueInsertedNodes:function(c){c.type===a.INSERT_NODE&&this._queuedInsertedNodes.push(c.newNode)},_flushInsertedNodes:function(a){a.some(function(a){return a.isUndoRedo})?
this._handleUndoRedoInsertion():this._handleInsertion();this._queuedInsertedNodes=[]},_handleInsertion:function(){var a=this._currentlyFolded.filter(function(a){return this._queuedInsertedNodes.some(function(c){return a.containsNode(c)})},this);0<a.length&&this._refoldCandidates(a)},_handleUndoRedoInsertion:function(){var a=this._queuedInsertedNodes.filter(function(a){return!this._currentlyFolded.some(function(c){return c.containsNode(a)})},this);this._hiddenNodeService.showAll(a)},_refoldCandidates:function(a){var c=
b.createSet();a.forEach(function(a){this._addNodesForCandidate(a,c)},this);0<c.size&&this._hiddenNodeService.hideAll(c)},_isCursorInsideFoldCandidate:function(a){var c=a.getHiddenRange();return!c?!1:this._cursorController.getCursors().some(function(a){return h.isPositionInRange(a.getCursorPosition(),c)},this)},_getChildCandidates:function(a,c){var b=a.getStartLine(),d=a.getEndLine();return this._foldingModel.getAllFoldCandidates().filter(function(e){if(a!==e&&(!c||c(e)))return e.getStartLine()>=b&&
e.getEndLine()<=d})},_scrollCandidateIntoView:function(a){a=a.getStartLine();!this._isLineInVisualBounds(a)&&!this._cursorController.isActionInProgress()&&this._view.scrollLineToPercent(a+1,this._SCROLL_TO_PERCENT)},_isLineInVisualBounds:function(a){a=this._view.getLinePercentScrolled(a+1,!0);return a>this._ONSCREEN_LOWER_BOUND&&a<this._ONSCREEN_UPPER_BOUND}})})},"MW/rtc/plugins/folding/FoldingModelProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./FoldingModel"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/folding/FoldingModel":function(){define(["dojo/_base/declare","mw-utils/Utils","MW/rtc/abstract/AbstractCachedModelQueryService"],function(g,f,e){return g(e,{constructor:function(d){this._foldCandidates=[];this._lookupCache=null},addFoldCandidates:function(d){d.forEach(function(b){this._foldCandidates.push(b)},this);this._lookupCache=null;
this.onCandidatesAdded(d)},removeFoldCandidates:function(d){d.forEach(function(b){this._foldCandidates.splice(this._foldCandidates.indexOf(b),1)},this);this._lookupCache=null;this.onCandidatesRemoved(d);d.forEach(function(b){b.destroy()},this)},onCandidatesAdded:function(d){},onCandidatesRemoved:function(d){},getFoldCandidateForDocumentLine:function(d){this._ensureBuilt();for(var b=null,a=d;!b&&-1!==a;){var c=this._lookupCache[a];this._isLineNumberInFoldCandidate(d,c)&&(b=c);a-=1}return b},getFoldCandidatesForDocumentLines:function(d){var b=
[];d.forEach(function(a){b.push(this.getFoldCandidateForDocumentLine(a))},this);b=b.filter(function(a){return null!==a});return f.unique(b)},getAllFoldCandidates:function(){return this._foldCandidates},getCandidateLineage:function(d){for(var b=[];d;)b.push(d),d=this.getOuterFoldCandidate(d);return b},getOuterFoldCandidate:function(d){d=d.getStartLine();for(var b=null,a=d-1;0<=a;a--){var c=this.getFoldCandidateForDocumentLine(a);if(this._isLineNumberInFoldCandidate(d,c)){b=c;break}c&&(a=c.getStartLine())}return b},
_ensureBuilt:function(){this.inherited(arguments);this._lookupCache||this._build()},_build:function(){this._lookupCache=[];this._foldCandidates.forEach(function(d){var b=d.getStartLine();this._lookupCache[b]||(this._lookupCache[b]=d)},this)},_isLineNumberInFoldCandidate:function(d,b){return!b?!1:d>=b.getStartLine()&&d<=b.getEndLine()}})})},"MW/rtc/plugins/export/html/HTMLExporterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/export/html/HTMLExporter"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.export.htmlwriters","rtc.internaldocument"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/export/html/HTMLExporter":function(){define("dojo/_base/declare dojo/_base/lang dojo/promise/all MW/rtc/model/io/MDocumentWriter MW/rtc/nodes/Node MW/rtc/plugins/export/AbstractExporter ./HTMLExportUtilities".split(" "),function(g,f,e,d,b,a,c){return g([a],{_DOCTYPE:'\x3c!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"\x3e\n',
_CONTENTDIV_CLASS:"rtcContent",constructor:function(a,c){this._internalDocument=c},_defineExportDocument:function(){return{addToBody:f.hitch(this,"_addToBody"),addToHead:f.hitch(this,"_addToHead"),addCSSToStyle:f.hitch(this,"_addStyleToCss"),getAttributesForStyle:f.hitch(this,"_getAttributesForStyle")}},reset:function(){this._contentParts=[];this._headParts=[];this._styleParts=[];this._contentFragment="";this._numOfStyles=0;this._styles={}},_addToBody:function(a){"string"===typeof a?this._contentFragment+=
a:(this._contentParts.push(this._contentFragment),this._contentFragment="",this._contentParts.push(a))},_addToHead:function(a){this._headParts.push(a)},_addStyleToCss:function(a){this._styleParts.push(a.trim())},_getAttributesForStyle:function(a,d){var e=a instanceof b?c.getDomNode(a):a,e=c.getStyleValuesForDomNode(e,d);return" class \x3d '"+this._getClassForStyle(e)+"'"},_processResults:function(a){this._contentParts.push(this._contentFragment);var c=e(this._contentParts).then(function(a){return"\x3cdiv class \x3d "+
this._CONTENTDIV_CLASS+"\x3e"+a.join("")+"\x3c/div\x3e"}.bind(this));this._addToHead(this._buildStyle(this._styleParts));var b=e(this._headParts).then(function(c){return this._buildHead(c,a)}.bind(this));return e({head:b,content:c}).then(function(c){return this._buildFullHTML(c,a)}.bind(this))},_buildStyle:function(a,c){return'\x3cstyle type\x3d"text/css"\x3e.'+this._CONTENTDIV_CLASS+" { padding: 30px; } "+this._styleParts.join("\n")+"\x3c/style\x3e"},_buildHead:function(a,c){var b;b='\x3chead\x3e\x3cmeta http-equiv\x3d"Content-Type" content\x3d"text/html; charset\x3dutf-8"\x3e\x3cmeta http-equiv\x3d"X-UA-Compatible" content\x3d"IE\x3dedge,IE\x3d9,chrome\x3d1"\x3e';
b+='\x3cmeta name\x3d"generator" content\x3d"MATLAB';c.MATLABRelease&&(b+=" "+c.MATLABRelease);b+='"\x3e';b+=a.join("");return b+="\x3c/head\x3e"},_buildFullHTML:function(a,c){return this._DOCTYPE+"\x3chtml\x3e"+a.head+"\x3cbody\x3e"+a.content+this._getMATLABCodeAsComment()+"\x3c/body\x3e\x3c/html\x3e"},_getClassForStyle:function(a){var c,b;for(b in this._styles)this._styles[b]===a&&(c=b);c||(c="S"+this._numOfStyles,this._numOfStyles+=1,this._styles[c]=a,this._addStyleToCss("."+c+" { "+a+" }\n"));
return c},_getMATLABCodeAsComment:function(){var a="\x3cbr\x3e",c=d.write(this._internalDocument);c&&(a+="\n\x3c!-- \n##### SOURCE BEGIN #####\n",a+=c.replace(/--/g,"REPLACE_WITH_DASH_DASH"),a+="\n##### SOURCE END #####\n",a+="--\x3e");return a}})})},"MW/rtc/plugins/export/AbstractExporter":function(){define(["dojo/_base/declare","mw-log/Log","MW/rtc/core/NodeMap","MW/rtc/model/io/NodeVisitorInterface","MW/rtc/model/SelectionTreeWalker"],function(g,f,e,d,b){return g([d],{constructor:function(a){this._nodeExporters=
new e(a);this._treeWalker=new b(this);this._exportDocument=this._defineExportDocument();this._results=[];this._context={}},_defineExportDocument:function(){f.assert(!1,"Subclasses must define an exportDocument.")},_reset:function(){this.reset();this._nodeExporters.forEach(function(a){a.reset()})},reset:function(){},_finalize:function(){this._nodeExporters.forEach(function(a){a.finalize(this._exportDocument)},this);this.finalize()},finalize:function(){},_processResults:function(a){f.assert(!1,"Subclasses must overwrite _processResults.")},
"export":function(a){this._context=a;this._reset();this._treeWalker.traverseRange(a.range,!0);this._finalize();return this._processResults(this._context)},enterInnerNode:function(a){var c=this._nodeExporters.get(a);return!c?!1:c.enter(this._exportDocument,a,this._context)},leaveInnerNode:function(a){var c=this._nodeExporters.get(a);c&&c.leave(this._exportDocument,a,this._context)},visitLeafNode:function(a,c,b){var d=this._nodeExporters.get(a);d&&d.visit(this._exportDocument,a,c,b,this._context)}})})},
"MW/rtc/plugins/export/html/LineNode2HTMLProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/export/html/LineNode2HTML"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.embeddedoutputs","rtc.export.htmloutputwriters"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/export/html/LineNode2HTML":function(){define("dojo/_base/declare dojo/dom-class MW/rtc/nodes/inner/LineNode MW/rtc/plugins/export/html/BaseInnerNode2HTML MW/rtc/plugins/export/html/HTMLExportUtilities MW/rtc/plugins/export/OutputExporter".split(" "),
function(g,f,e,d,b,a){return g([d],{_STYLES:"border-left border-right border-top border-bottom border-radius padding line-height min-height white-space color font-family font-size".split(" "),_CODEBLOCK_CSS:".CodeBlock { background-color: #F7F7F7; margin: 10px 0 10px 0;}",constructor:function(c,b){this._embeddedOutputsView=c.getEmbeddedOutputsView();this._outputexporter=new a(b)},getApplicableNodeClass:function(){return e},reset:function(){this._outputexporter.reset();this._firstVisit=!0},enter:function(a,
b,d){var f=this._getOutputParagraph(b);if(b.groupingType){var g=b.previousSibling();g&&g instanceof e||(a.addToBody('\x3cdiv class\x3d"CodeBlock"\x3e'),this._firstVisit&&(a.addCSSToStyle(this._CODEBLOCK_CSS),this._firstVisit=!1));f?a.addToBody('\x3cdiv class\x3d"inlineWrapper outputs"\x3e'):a.addToBody('\x3cdiv class\x3d"inlineWrapper"\x3e')}this.inherited(arguments)},leave:function(a,b,d){this.inherited(arguments);var f=this._getOutputParagraph(b);f&&this._outputexporter.export(f,a,d);b.groupingType&&
(a.addToBody("\x3c/div\x3e"),(f=b.nextSibling())&&f instanceof e||a.addToBody("\x3c/div\x3e"))},_getOutputParagraph:function(a){return(a=a.box.nextSibling)&&f.contains(a,"outputParagraph")?a:null}})})},"MW/rtc/plugins/export/OutputExporter":function(){define(["dojo/_base/array","dojo/_base/declare","mw-log/Log"],function(g,f,e){return f([],{_TEXTNODE_NAME:"#text",constructor:function(d){this._nodeExporters={};d.forEach(function(b){this._registerExportPlugin(b)},this)},_registerExportPlugin:function(d){d.getApplicableDomNodeClasses().forEach(function(b){e.assert(!this._nodeExporters[b],
"Writer for type '"+b+"'' already exists.");this._nodeExporters[b]=d},this)},_getWriterForNode:function(d){var b=null;g.some(d.classList,function(a){return b=this._nodeExporters[a]},this);return b},reset:function(){for(var d in this._nodeExporters)this._nodeExporters.hasOwnProperty(d)&&this._nodeExporters[d].reset()},"export":function(d,b,a){this._traverseElement(d,b,a)},_traverseElement:function(d,b,a){for(var c=d,e=!1;c;){c.nodeName===this._TEXTNODE_NAME?(this._enterTextNode(b,c,a),e=!1):e=this._enterNode(b,
c,a);if(c===this._endNode)break;if(!e&&c.firstChild)c=c.firstChild;else{if(c.nextSibling)c.nodeName!==this._TEXTNODE_NAME&&this._leaveNode(b,c,a);else{for(;!c.nextSibling&&!(this._leaveNode(b,c,a),c=c.parentNode,null===c||c===d););this._leaveNode(b,c,a)}c=c.nextSibling}}},_enterNode:function(d,b,a){var c=this._getWriterForNode(b);return!c?!1:c.enter(d,b,a)},_leaveNode:function(d,b,a){var c=this._getWriterForNode(b);c&&c.leave(d,b,a)},_enterTextNode:function(){}})})},"MW/rtc/plugins/export/html/OutputParagraph2HTMLProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/export/html/OutputParagraph2HTML"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/export/html/OutputParagraph2HTML":function(){define(["dojo/_base/declare","MW/rtc/plugins/export/OutputNodeExporterInterface"],function(g,f){return g([f],{_STYLES:"color padding background font-family font-size overflow-x line-height".split(" "),constructor:function(){},getApplicableDomNodeClasses:function(){return["outputParagraph"]},
enter:function(e,d,b){d=e.getAttributesForStyle(d,this._STYLES);b="\x3cdiv ";d&&(b+=d);e.addToBody(b+"\x3e")},leave:function(e,d,b){e.addToBody("\x3c/div\x3e")}})})},"MW/rtc/plugins/export/html/PlainTextNode2HTMLProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/export/html/PlainTextNode2HTML"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.view.decoration.viewmodel"]}},createInstance:function(d){return new e(d)}})})},
"MW/rtc/plugins/export/html/PlainTextNode2HTML":function(){define(["dojo/_base/declare","dojo/dom-construct","MW/rtc/nodes/leaf/PlainTextNode","MW/rtc/plugins/export/NodeExporterInterface","MW/rtc/view/decoration/DecorationUtilities"],function(g,f,e,d,b){return g([d],{constructor:function(a){this._decorationviewmodel=a},getApplicableNodeClass:function(){return e},visit:function(a,c,d,e,g){d=f.create("span");e=this._decorationviewmodel.getDecoration(c);if(c=c.getText())c=b.createViewForTextNode(c,
e,d),d.appendChild(c),d.style["white-space"]="pre",a.addToBody(d.outerHTML)}})})},"MW/rtc/plugins/folding/view/FoldingMarginProvider":function(){define(["dojo/_base/declare","dojo/aspect","dojo/dom-class","MW/rtc/core/provider/PluginProvider","MW/rtc/margin/DecoratableRangeMargin"],function(g,f,e,d,b){return g(d,{requires:function(){return{createInstance:["rtc.view","rtc.internaldocument","rtc.focusservice","rtc.folding.margin.decorator"]}},createInstance:function(a,c,d,f){a=new b(a,c,d,[f],0);e.add(a.getMarginElement(),
"foldMargin");return a}})})},"MW/rtc/margin/DecoratableRangeMargin":function(){define("dojo/aspect dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/_base/declare dojo/_base/lang mw-log/Log MW/rtc/margin/DecoratableMargin MW/rtc/view/ViewUtilities".split(" "),function(g,f,e,d,b,a,c,h,k){return b(h,{constructor:function(a,c,b,d,h,f,g){e.add(this._gutter,"rangeMargin");this._populateContainersMap();this._expansionHandler=null},_populateContainersMap:function(){this._containersMap={};this._decorators.forEach(function(a){var c=
d.create("div",{"class":"rangeDecoratorContainer"});f.set(c,"data-test-id",a.getId());this._gutter.appendChild(c);this._updateZIndex(a.getPriority(),c);this._containersMap[a.getId()]=c},this)},setExpansionHandler:function(a){this._expansionHandler=a},removeExpansionHandler:function(){this._expansionHandler=null},destroy:function(){this.inherited(arguments);this._containersMap={}},update:function(a,c){a?this._updateForDecorator(a,c):this._decorators.forEach(function(a){this._updateForDecorator(a,c)},
this)},_updateForDecorator:function(a,c){var b=this._containersMap[a.getId()];if(b){var d=b.cloneNode(!1);a.getRangeDescriptions(c).forEach(function(a){this._isValidDescription(a)&&this._placeDivForDescription(d,a)},this);this._gutter.replaceChild(d,b);this._containersMap[a.getId()]=d}},_isValidDescription:function(a){var c=this._internalDocument.getMaxLineNumber();return 0<a.startLine&&a.startLine<=c&&0<a.endLine&&a.endLine<=c},_updateZIndex:function(a,c){c.style["z-index"]=a},_placeDivForDescription:function(a,
c){this._updateDivDimensions(c);a.appendChild(c.div)},_updateDivDimensions:function(a){var c=a.startLine,b=a.endLine,d=a.div;a=a.shouldExpand;var e=this._calculateDivDimensions(c,b);a&&this._expansionHandler&&(e=this._expansionHandler.calculateUpdatedDivDimensions(e,c,b));this._setDimensionsForDiv(d,e)},_calculateDivDimensions:function(a,c){var b=this._internalDocument.getPositionForLineColumn(a,1),d=this._internalDocument.getPositionForLineColumn(c,1),d=k.getVerticalDimensionsBetweenPositions(b,
d,this._view),b=d.height,d=d.top,e=this._view.getScrollTop();return{top:d-e,height:b}},_setDimensionsForDiv:function(a,c){a.style.top=c.top+"px";a.style.height=c.height+"px"}})})},"MW/rtc/plugins/folding/view/FoldingDecoratorProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./FoldingDecorator"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.view","rtc.folding.foldingcontroller","rtc.folding.foldingmodel"]}},createInstance:function(d,
b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/folding/view/FoldingDecorator":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-attr dojo/dom-construct dojo/on MW/rtc/margin/AbstractRangeMarginDecorator MW/rtc/margin/MarginRangeDescription MW/rtc/view/ViewUtilities".split(" "),function(g,f,e,d,b,a,c,h,k){return g(c,{_WIDTH:20,constructor:function(a,c,b){this._view=a;this._foldingController=c;this._foldingModel=b;this.own(e.after(this._foldingModel,"onCandidatesAdded",f.hitch(this,
"onUpdate")));this.own(e.after(this._foldingModel,"onCandidatesRemoved",f.hitch(this,"onUpdate")))},getRangeDescriptions:function(a){return this._getFoldCandidatesInView(a).map(this._getDescriptionForFoldCandidate,this)},_getFoldCandidatesInView:function(a){a||(a=k.getZeroBasedVisibleLineNumbers(this._view));return this._foldingModel.getFoldCandidatesForDocumentLines(a)},_getDescriptionForFoldCandidate:function(a){var c=this._createDomStructureForCandidate(a),b=a.getRange();a=b.getStartPosition().getLine();
b=b.getEndPosition().getLine();return new h(c,a,b,this,!1)},_createDomStructureForCandidate:function(a){var c=b.create("div");c.classList.add("foldContainer");this._addToggleElement(a,c);this._addExtensionElementIfNeeded(a,c);return c},_addToggleElement:function(c,e){var h=b.create("div");h.classList.add("foldToggle");var g=c.getRange().getStartPosition().getLine()-1;d.set(h,"data-testid","gutterLine_"+g);g=b.create("div");g.classList.add("foldMinus");h.appendChild(g);c.isFolded()?(h.classList.add("foldClose"),
g=b.create("div"),g.classList.add("foldPlus"),h.appendChild(g)):h.classList.add("foldOpen");a(h,"click",f.hitch(this._foldingController,"toggle",c));e.appendChild(h)},_addExtensionElementIfNeeded:function(a,c){if(!a.isFolded()){var d=b.create("div");d.classList.add("foldExtension");c.appendChild(d)}},getWidth:function(){return this._WIDTH},getPriority:function(){return 1},getId:function(){return"Folds"}})})},"MW/rtc/margin/AbstractRangeMarginDecorator":function(){define(["dojo/_base/declare","MW/rtc/margin/AbstractMarginDecorator"],
function(g,f){return g(f,{getRangeDescriptions:function(e){throw Error("Unimplemented API: MW.rtc.margin.AbstractRangeMarginDecorator.createDecorationForLineNumber");},getPriority:function(){throw Error("Unimplemented API: MW.rtc.margin.AbstractRangeMarginDecorator.getPriority");},getId:function(){throw Error("Unimplemented API: MW.rtc.margin.AbstractRangeMarginDecorator.getId");}})})},"MW/rtc/margin/MarginRangeDescription":function(){define(["dojo/_base/declare"],function(g){return g(null,{constructor:function(f,
e,d,b,a){this.div=f;this.startLine=e;this.endLine=d;this.decorator=b;this.shouldExpand=a}})})},"MW/rtc/plugins/folding/view/FoldingEllipsesManagerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./FoldingEllipsesManager"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.view.decoration","rtc.folding.foldingcontroller","rtc.folding.foldingmodel"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/folding/view/FoldingEllipsesManager":function(){define("dojo/_base/declare dojo/aspect dojo/dom-construct dojo/on MW/rtc/abstract/AbstractPlugin MW/rtc/browsersupport/BrowserSupportUtilities MW/rtc/model/Range MW/rtc/view/decoration/DecorationUtilities".split(" "),
function(g,f,e,d,b,a,c,h){return g(b,{constructor:function(c,b,d){this._decorator=c.createDecorator(1);this._foldingController=b;this._foldingModel=d;this.own(f.after(this._foldingController,"onCandidatesFolded",this._addEllipsisForFoldCandidates.bind(this),!0));this.own(f.after(this._foldingController,"onCandidatesUnfolded",this._removeEllipsisForFoldCandidates.bind(this),!0));this.own(f.after(this._foldingModel,"onCandidatesRemoved",this._handleCandidatesRemoved.bind(this),!0));this._candidateToEllipsisMap=
a.createMap()},_addEllipsisForFoldCandidates:function(a){a.forEach(function(a){if(!this._foldCandidateHasEllipsis(a)){var c=this._createEllipsisForFoldCandidate(a);this._attachEllipsisNodeToFoldCandidate(c,a)}},this);this._decorator.applyChanges()},_removeEllipsisForFoldCandidates:function(a){a.forEach(function(a){var c=this._candidateToEllipsisMap.get(a);c&&(this._decorator.removeDomNode(c.ellipsis,c.range,h.PLACEMENT.AFTER),this._candidateToEllipsisMap.delete(a),c.onClick.remove(),c.range.destroy())},
this);this._decorator.applyChanges()},_createEllipsisForFoldCandidate:function(a){var c=this._getInsertionRangeForFoldCandidate(a),b=this._createEllipsisDomNode();a=d(b,"click",this._foldingController.unfold.bind(this._foldingController,a));return{ellipsis:b,range:c,onClick:a}},_attachEllipsisNodeToFoldCandidate:function(a,c){this._decorator.addDomNode(a.ellipsis,a.range,h.PLACEMENT.AFTER);this._candidateToEllipsisMap.set(c,a)},_createEllipsisDomNode:function(){var a=e.create("span");a.classList.add("foldEllipsis");
for(var c=0;3>c;c+=1){var b=e.create("div");b.classList.add("ellipseDot");e.place(b,a,"last")}return a},_getInsertionRangeForFoldCandidate:function(a){a=a.getRange().getStartPosition().getNode().rootContainer();var b=a.endPosition();b.setRightAligned(!0);a=new c(a.startPosition(),b);a.getStartPosition().setLive();a.getEndPosition().setLive();return a},_foldCandidateHasEllipsis:function(a){return this._candidateToEllipsisMap.has(a)},_handleCandidatesRemoved:function(a){this._removeEllipsisForFoldCandidates(a)}})})},
"MW/rtc/plugins/language/matlab/executablecode/ExecutableCodeServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./ExecutableCodeService"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document.executablecode.executablecodeconverter"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/language/matlab/executablecode/ExecutableCodeService":function(){define(["dojo/_base/declare"],function(g){return g(null,
{_internalDocument:null,_executableCodeConverter:null,constructor:function(f,e){this._internalDocument=f;this._executableCodeConverter=e},getEvalText:function(){return this._executableCodeConverter.getEvalTextFromNode(this._internalDocument.root)}})})},"MW/rtc/plugins/language/matlab/executablecode/executablecodeconverter/ExecutableCodeConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./ExecutableCodeConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document.executablecode.executablecodeconverter.converter"]}},
createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/language/matlab/executablecode/executablecodeconverter/ExecutableCodeConverter":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractRecursiveConverterPlugin"],function(g,f){return g(f,{CONVERTER_PLUGIN_NAME:"ExecutableCodeConverter",constructor:function(e){this._initializeRecursiveConverter(e)},getEvalTextFromNode:function(e){var d=this._getConverter(e);return d?d.getEvalTextFromNode(e):null}})})},"MW/rtc/plugins/language/matlab/executablecode/executablecodeconverter/RootNodeExecutableCodeConverterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./RootNodeExecutableCodeConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/language/matlab/executablecode/executablecodeconverter/RootNodeExecutableCodeConverter":function(){define(["dojo/_base/declare","./base/InnerNodeExecutableCodeConverter","MW/rtc/nodes/inner/RootNode"],function(g,f,e){return g(f,{getApplicableNodeClass:function(){return e}})})},"MW/rtc/plugins/language/matlab/executablecode/executablecodeconverter/base/InnerNodeExecutableCodeConverter":function(){define(["dojo/_base/declare",
"./AbstractExecutableCodeConverter"],function(g,f){return g(f,{constructor:function(){},getEvalTextFromNode:function(e){var d=this;return e.children.map(function(b){return d._mainConverter.getEvalTextFromNode(b)}).filter(function(b){return null!==b}).join(e.CHILD_TEXT_SEPARATOR)}})})},"MW/rtc/plugins/language/matlab/executablecode/executablecodeconverter/base/AbstractExecutableCodeConverter":function(){define(["dojo/_base/declare","mw-log/Log","MW/rtc/abstract/AbstractRecursiveConverter"],function(g,
f,e){return g(e,{getEvalTextFromNode:function(d){f.error("Unimplemented: getEvalTextFromNode")}})})},"MW/rtc/plugins/language/matlab/executablecode/executablecodeconverter/LineNodeExecutableCodeConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LineNodeExecutableCodeConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/language/matlab/executablecode/executablecodeconverter/LineNodeExecutableCodeConverter":function(){define(["dojo/_base/declare",
"./base/InnerNodeExecutableCodeConverter","MW/rtc/nodes/inner/LineNode"],function(g,f,e){return g(f,{getApplicableNodeClass:function(){return e}})})},"MW/rtc/plugins/language/matlab/executablecode/executablecodeconverter/PlainTextNodeExecutableCodeConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./PlainTextNodeExecutableCodeConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},
"MW/rtc/plugins/language/matlab/executablecode/executablecodeconverter/PlainTextNodeExecutableCodeConverter":function(){define(["dojo/_base/declare","./base/LeafNodeExecutableCodeConverter","MW/rtc/nodes/leaf/PlainTextNode"],function(g,f,e){return g(f,{getApplicableNodeClass:function(){return e}})})},"MW/rtc/plugins/language/matlab/executablecode/executablecodeconverter/base/LeafNodeExecutableCodeConverter":function(){define(["dojo/_base/declare","./AbstractExecutableCodeConverter"],function(g,f){return g(f,
{constructor:function(){},getEvalTextFromNode:function(e){return e.getCodeText()}})})},"MW/rtc/plugins/language/matlab/folding/MatlabCodeFoldingProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./MatlabMTreeFoldCandidateContributor"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.folding.foldingcontroller rtc.folding.foldingmodel matlab.code.mtree matlab.code.mtree.codeblocks.structure matlab.code.mtree.rangefactory rtc.document".split(" ")}},
createInstance:function(d,b,a,c,h,f){return new e(d,b,a,c,h,f)}})})},"MW/rtc/plugins/language/matlab/folding/MatlabMTreeFoldCandidateContributor":function(){define("dojo/_base/declare dojo/aspect MW/rtc/model/Range MW/rtc/model/RangeUtilities MW/rtc/plugins/folding/AbstractFoldCandidateContributor MW/rtc/plugins/folding/FoldCandidate MW/rtc/plugins/language/matlab/folding/FoldableMTreeNodeTypes".split(" "),function(g,f,e,d,b,a,c){return g(b,{constructor:function(a,c,b,d,e){this._codeBlockStructure=
d;this._mTreeRangeFactory=e;this.own(f.after(b,"onUpdate",this._handleMTreeUpdated.bind(this)))},_handleMTreeUpdated:function(){this._codeBlockStructure.whenSynchronized(this._updateFoldCandidates.bind(this))},_updateFoldCandidates:function(){var a=this._calculateFoldCandidatesToAddAndRemove();0<a.foldCandidatesToRemove.length&&this._removeFoldCandidates(a.foldCandidatesToRemove);0<a.foldCandidatesToAdd.length&&this._addFoldCandidates(a.foldCandidatesToAdd)},_calculateFoldCandidatesToAddAndRemove:function(){var a=
this._getFoldableRanges(),c=this._foldCandidates.slice();return{foldCandidatesToAdd:a.filter(function(a){var b=-1,e=c.some(function(c,e){b=e;return d.equivalent(c.getRange(),a)});e&&c.splice(b,1);return!e}).map(this._createFoldCandidateForRange),foldCandidatesToRemove:c}},_getFoldableRanges:function(){var a=this._getFoldableMTreeNodes();return this._getFoldableRangesFromMTreeNodes(a)},_getFoldableMTreeNodes:function(){return this._getCodeBlockMTreeNodes().filter(function(a){return c.isMTreeNodeFoldable(a)&&
a.getStartLine()<a.getEndLine()},c)},_getCodeBlockMTreeNodes:function(){return this._codeBlockStructure.getCodeBlocks().map(function(a){return a.mTreeNode})},_getFoldableRangesFromMTreeNodes:function(a){return a.map(this._mTreeRangeFactory.getRangeForMTreeNode,this._mTreeRangeFactory)},_createFoldCandidateForRange:function(c){return new a(c)}})})},"MW/rtc/plugins/folding/AbstractFoldCandidateContributor":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin"],function(g,f){return g(f,
{constructor:function(e,d){this._foldingController=e;this._foldingModel=d;this._foldCandidates=[]},_addFoldCandidates:function(e){e.forEach(function(d){this._foldCandidates.push(d)},this);this._foldingModel.addFoldCandidates(e)},_removeFoldCandidates:function(e){e.forEach(function(d){this._foldCandidates.splice(this._foldCandidates.indexOf(d),1)},this);this._foldingModel.removeFoldCandidates(e)}})})},"MW/rtc/plugins/folding/FoldCandidate":function(){define(["dojo/_base/declare","MW/rtc/model/NodeUtilities",
"MW/rtc/model/Range","MW/rtc/model/RangeUtilities"],function(g,f,e,d){return g(null,{constructor:function(b){this._range=b;this._folded=!1;this._setRangeAttributes()},destroy:function(){this._range.destroy()},getRange:function(){return this._range},getStartLine:function(){return this._range.getStartPosition().getLine()-1},getEndLine:function(){return this._range.getEndPosition().getLine()-1},isFolded:function(){return this._folded},setFolded:function(){this._folded=!0},setUnfolded:function(){this._folded=
!1},getFoldableNodes:function(){if(!this._isRangeValid())return[];var b=this._range.getStartPosition().getNode().rootContainer().nextSibling(),a=this._range.getEndPosition().getNode().rootContainer();return f.getParagraphNodesInRange(b,a)},getHiddenRange:function(){if(!this._isRangeValid())return null;var b=this._range.getStartPosition().getNode().rootContainer().nextSibling().startPosition(),a=this._range.getEndPosition().getNode().rootContainer().endPosition();return new e(b,a)},_setRangeAttributes:function(){this._range.getStartPosition().setRightAligned(!0);
this._range.getStartPosition().setLive();this._range.getEndPosition().setLive()},containsNode:function(b){b=b.rootContainer();return 0<=d.paragraphNodesInRange(this._range).indexOf(b)},_isRangeValid:function(){var b=this._range.getStartPosition().getNode().rootContainer(),a=this._range.getEndPosition().getNode().rootContainer();return b!==a}})})},"MW/rtc/plugins/language/matlab/folding/FoldableMTreeNodeTypes":function(){define("MW/rtc/plugins/language/matlab/syntax/mtree/nodes/BlockCommentMTreeNode MW/rtc/plugins/language/matlab/syntax/mtree/nodes/ClassdefMTreeNode MW/rtc/plugins/language/matlab/syntax/mtree/nodes/ClassdefSectionMTreeNode MW/rtc/plugins/language/matlab/syntax/mtree/nodes/ForMTreeNode MW/rtc/plugins/language/matlab/syntax/mtree/nodes/FunctionDeclarationMTreeNode MW/rtc/plugins/language/matlab/syntax/mtree/nodes/IfMTreeNode MW/rtc/plugins/language/matlab/syntax/mtree/nodes/StatementMTreeNode MW/rtc/plugins/language/matlab/syntax/mtree/nodes/SwitchMTreeNode MW/rtc/plugins/language/matlab/syntax/mtree/nodes/WhileMTreeNode".split(" "),
function(g,f,e,d,b,a,c,h,k){return{_FOLDABLE_MTREE_NODE_TYPES:[g,f,e,d,b,c,k],isMTreeNodeFoldable:function(a){return this._FOLDABLE_MTREE_NODE_TYPES.some(function(c){return a.isInstanceOf(c)})}}})},"MW/rtc/plugins/language/matlab/syntax/mtree/MTreeRangeFactoryProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./MTreeRangeFactory"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document"]}},createInstance:function(d){return new e(d)}})})},
"MW/rtc/plugins/language/matlab/syntax/mtree/MTreeRangeFactory":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin","MW/rtc/model/Range"],function(g,f,e){return g(f,{constructor:function(d){this._document=d},getRangeForMTreeNode:function(d){var b=this._makePosition(d.getStartLine(),d.getStartColumn());d=this._makePosition(d.getEndLine(),d.getEndColumn());return new e(b,d)},_makePosition:function(d,b){return this._document.createPositionAtLineColumn(d-1,b-1)}})})},"MW/rtc/plugins/language/matlab/syntax/mtree/MTreeServiceProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./MTreeService"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.editordataservice","rtc.document"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/language/matlab/syntax/mtree/MTreeService":function(){define(["./MTreeNodeFactory","dojo/Deferred","dojo/_base/declare","MW/rtc/abstract/AbstractPlugin"],function(g,f,e,d){return e(d,{_EDS_FEATURE_ID:"matlab.code.mtree",constructor:function(b,a){this._edsHandle=b.listenTo(this._EDS_FEATURE_ID,
this._handleEDSCallback.bind(this));this._document=a;this._fileType=this._tree=this._data=null;this._lastDocumentState=-1},destroy:function(){this.inherited(arguments);this._edsHandle.remove()},_handleEDSCallback:function(b){this._data=b;this._lastDocumentState=b.documentState;this._build();this._deferred&&this._document.getState()===this._lastDocumentState&&(this._deferred.resolve(this._tree),this._deferred=null);this.onUpdate()},_build:function(){this._tree=this._data.mTree?this._data.mTree.map(function(b){return g.create(b)}):
null;this._fileType=this._data.fileType||null},getMTree:function(){if(this._document.getState()===this._lastDocumentState)return this._tree;this._deferred||(this._deferred=new f);return this._deferred},getFileType:function(){return this._fileType},onUpdate:function(){}})})},"MW/rtc/plugins/language/matlab/syntax/mtree/MTreeNodeFactory":function(){define("./nodes/BlockCommentMTreeNode ./nodes/CellTitleMTreeNode ./nodes/ClassdefMTreeNode ./nodes/ClassdefSectionMTreeNode ./nodes/EqualsMTreeNode ./nodes/ForMTreeNode ./nodes/FunctionCallMTreeNode ./nodes/FunctionDeclarationMTreeNode ./nodes/FunctionIdentifierMTreeNode ./nodes/IfMTreeNode ./nodes/ProtoMTreeNode ./nodes/StatementMTreeNode ./nodes/SwitchMTreeNode ./nodes/VariableMTreeNode ./nodes/WhileMTreeNode".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r){return{_REGISTRY:{FunctionCallNode:c,FunctionDeclarationNode:h,ClassdefNode:e,EnumerationNode:d,PropertiesNode:d,MethodsNode:d,EventsNode:d,ProtoNode:m,FunctionIdentifierNode:k,VariableNode:q,ForNode:a,ParForNode:a,WhileNode:r,SPMDNode:p,TryNode:p,SwitchNode:n,IfNode:l,EqualsNode:b,BlockCommentNode:g,CellTitleNode:f},create:function(a){var c=this._REGISTRY[a.type],b=a.children?this.createMultiple(a.children):null;return new c(a,b)},createMultiple:function(a){return a.map(this.create,
this)}}})},"MW/rtc/plugins/language/matlab/syntax/mtree/nodes/CellTitleMTreeNode":function(){define(["dojo/_base/declare","./MTreeNode"],function(g,f){return g(f,{})})},"MW/rtc/plugins/language/matlab/syntax/mtree/nodes/EqualsMTreeNode":function(){define(["dojo/_base/declare","./MTreeNode","../MTreeUtils"],function(g,f,e){return g(f,{getLHSChildren:function(){return this._partitionChildren(!0)},getRHSChildren:function(){return this._partitionChildren(!1)},_partitionChildren:function(d){return this.getChildren().filter(function(b){b=
e.compareByPosition(b,this);return d?0>b:0<b},this)}})})},"MW/rtc/plugins/language/matlab/syntax/mtree/MTreeUtils":function(){define([],function(){return{compareByPosition:function(g,f){return this._xBeforeY(g,f)?-1:this._xBeforeY(f,g)?1:0},_xBeforeY:function(g,f){var e=g.getEndLine(),d=f.getStartLine();return e<d||e===d&&g.getEndColumn()<f.getStartColumn()?!0:!1}}})},"MW/rtc/plugins/language/matlab/syntax/mtree/nodes/FunctionCallMTreeNode":function(){define(["dojo/_base/declare","./MTreeNode","./FunctionIdentifierMTreeNode"],
function(g,f,e){return g(f,{constructor:function(d,b){this._functionName=new e(this._data.functionName)},getFunctionName:function(){return this._functionName}})})},"MW/rtc/plugins/language/matlab/syntax/mtree/nodes/ProtoMTreeNode":function(){define(["dojo/_base/declare","./FunctionDeclarationMTreeNode"],function(g,f){return g(f,{})})},"MW/rtc/plugins/language/matlab/syntax/mtree/codeblocks/MTreeCodeBlockServicesProvider":function(){define(["./MTreeCodeBlockServices","./MTreeCodeBlockStructure","dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider"],function(g,f,e,d){return e(d,{requires:function(){return{createInstance:["matlab.code.mtree.codeblocks.structure"]}},createInstance:function(b){return new g(b)}})})},"MW/rtc/plugins/language/matlab/syntax/mtree/codeblocks/MTreeCodeBlockServices":function(){define(["dojo/aspect","dojo/_base/declare","dojo/_base/lang","MW/rtc/abstract/AbstractPlugin","MW/rtc/plugins/language/matlab/syntax/mtree/codeblocks/BlockType"],function(g,f,e,d,b){return f(d,{constructor:function(a){this._codeBlockStructure=
a},whenSynchronized:function(a){this._codeBlockStructure.whenSynchronized(a)},isLineInFunction:function(a){return this._isLineInBlockOfType(a,b.FUNCTION_DEFINITION)},isLineInLoop:function(a){return this._isLineInBlockOfType(a,b.FOR_LOOP)||this._isLineInBlockOfType(a,b.WHILE_LOOP)},isLineInIfStatement:function(a){return this._isLineInBlockOfType(a,b.IF_STATEMENT)},getOutermostBlockOfType:function(a,c){return this._getEdgeBlockOfType(a,c?[c]:[],!0)},getInnermostBlockOfType:function(a,c){return this._getEdgeBlockOfType(a,
c?[c]:[],!1)},getOutermostLoop:function(a){return this._getEdgeBlockOfType(a,[b.FOR_LOOP,b.WHILE_LOOP],!0)},getInnermostLoop:function(a){return this._getEdgeBlockOfType(a,[b.FOR_LOOP,b.WHILE_LOOP],!1)},_getEdgeBlockOfType:function(a,c,b){a=this._codeBlockStructure.getBlocksForLine(a);if(!a)return null;b&&(a=a.reverse());return this._getLastBlockOfType(a,c)},_isLineInBlockOfType:function(a,c){var b=!1,d=this._codeBlockStructure.getBlocksForLine(a);d&&(b=d.some(function(a){return a.type===c},this));
return b},_getLastBlockOfType:function(a,c){if(0===c.length)return a[a.length-1];var b=null;a.forEach(function(a){c.some(function(c){return a.type===c})&&(b=a)},this);return b}})})},"MW/rtc/plugins/language/matlab/syntax/mtree/codeblocks/MTreeCodeBlockStructure":function(){define("dojo/aspect dojo/when dojo/Deferred dojo/_base/declare dojo/_base/lang MW/rtc/abstract/AbstractPlugin MW/rtc/plugins/language/matlab/syntax/mtree/codeblocks/BlockType".split(" "),function(g,f,e,d,b,a,c){return d(a,{constructor:function(a,
c,d){this._mTreeService=a;this._lineNumberService=c;this._isDirty=!0;this.own(g.after(d,"onDocumentChanged",b.hitch(this,"_handleDocumentChange")));this._reset()},_handleDocumentChange:function(){this._isDirty=!0},whenSynchronized:function(a){this._isDirty?this._build().then(a):a()},getBlocksForLine:function(a){return(a=this._lineBlockTypes[a])?a.slice():[]},getCodeBlocks:function(){return this._codeBlocks.slice()},_build:function(){var a=new e;f(this._mTreeService.getMTree(),b.hitch(this,function(c){this._reset();
c&&c.forEach(function(a){this._visitNodeAndItsChildren(a)},this);this._isDirty=!1;a.resolve()}));return a},_visitNodeAndItsChildren:function(a){this._visitNode(a);a.getChildren()&&a.getChildren().forEach(function(a){this._visitNodeAndItsChildren(a)},this)},_visitNode:function(a){this._currentBlockId++;var b=this._lineNumberService.getCodeLineNumberFromLineNumber(a.getStartLine()-1),d=this._lineNumberService.getCodeLineNumberFromLineNumber(a.getEndLine()-1),e=c.getBlockTypeForNode(a);this._markLinesAsType(e,
b,d,a)},_markLinesAsType:function(a,c,b,d){if(a){for(a=this._packageBlockData(a,c,b,d);c<=b;c++)this._addBlockDataToLine(c,a);this._codeBlocks.push(a)}},_packageBlockData:function(a,c,b,d){return{id:a+"_"+this._currentBlockId,type:a,startLine:c,endLine:b,mTreeNode:d}},_addBlockDataToLine:function(a,c){this._lineBlockTypes[a]?this._lineBlockTypes[a].push(c):this._lineBlockTypes[a]=[c]},_reset:function(){this._currentBlockId=0;this._lineBlockTypes={};this._codeBlocks=[]}})})},"MW/rtc/plugins/language/matlab/syntax/mtree/codeblocks/MTreeCodeBlockStructureProvider":function(){define(["./MTreeCodeBlockStructure",
"dojo/_base/declare","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return f(e,{requires:function(){return{createInstance:["matlab.code.mtree","rtc.linenumberservice","rtc.internaldocument"]}},createInstance:function(d,b,a){return new g(d,b,a)}})})},"MW/rtc/plugins/language/matlab/syntaxhighlighter/ServerSideSyntaxHighlighterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./ServerSideSyntaxHighlighterPlugin"],function(g,f,e){return g(f,{isApplicable:function(){return!0},
requires:function(){return{isApplicable:[],createInstance:["rtc.document","rtc.internaldocument","rtc.view","rtc.view.decoration"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/language/matlab/syntaxhighlighter/ServerSideSyntaxHighlighterPlugin":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/model/CodeUtilities MW/syntaxhighlighting/SyntaxHighlightingDataServiceFactory mw-utils/Utils mw-log/Log".split(" "),
function(g,f,e,d,b,a,c,h){return g(d,{constructor:function(c,b,d,h){this._document=c;this._internalDocument=b;this._view=d;this._decorator=h.createDecorator();this._dataService=a.getInstance();this._model={};this._requestID=null;this.own(e.after(this._dataService,"onTokenUpdate",f.hitch(this,this._onServerResponse),!0));this.own(e.after(this._internalDocument,"onDocumentChanged",f.hitch(this,"_updateSyntaxHighlighting"),!0));this.own(e.after(this._internalDocument,"onDocumentReset",f.hitch(this,"_updateSyntaxHighlighting")))},
_updateSyntaxHighlighting:function(){var a=this;clearTimeout(this._idleTimerID);this._idleTimerID=setTimeout(function(){a._serverRequest()},200)},_serverRequest:function(){this._requestID=c.generateUuid();var a=this._document.getCodeText();this._dataService.updateData(a,this._requestID,!0)},_onServerResponse:function(a,c,d,e){d=this._document.getCodeText();if(!(this._requestID!==a||0!==d.localeCompare(e))){a=this._processTokens(c,e);this._updateModel(a);a=this._internalDocument.getMaxLineNumber();
for(c=0;c<a;c+=1)e=this._internalDocument.getLineNode(c),b.isCodeContainer(e)&&(e=this._internalDocument.getRangeForLine(c+1),this._decorator.clearRange(e),this._decorateForTokens(this._model[c]));this._decorator.applyChanges()}},_decorateForTokens:function(a){a.forEach(function(a){var c=a.range.start,b=a.range.end,c=this._internalDocument.getRangeForLineColumn(c.row+1,c.column+1,b.row+1,b.column+1);this._decorator.setStyle(c,"color",a.color)},this)},_updateModel:function(a){this._model=a},_appendTokenToMap:function(a,
c,b){a.value&&void 0!==b&&c[b].push(a)},_convertTokenColor:function(a){return a=a.r||a.g||a.b?"rgb("+a.r+", "+a.g+", "+a.b+")":""},_createNewToken:function(a,c,b,d){return{value:a?a:"",color:c?c:"",range:{start:b?b:{row:0,column:0},end:d?d:{row:0,column:0}}}},_createRangeOfToken:function(a,c,b,d){return{start:{row:a,column:b-c},end:{row:a,column:d-c}}},_isValidToken:function(a){return 0<a.value.length&&!(0===a.color.r&&0===a.color.g&&0===a.color.b)},_processTokens:function(a,c){var b={},d=0,e=c.split("\n");
b[0]=[];var f=0,g,s,t,u,v;for(v=0;v<a.length;v+=1)u=a[v],"\n"===u.value?(d+=e[f].length+1,f+=1,b[f]=[]):this._isValidToken(u)&&(t=this._convertTokenColor(u.color),s=this._createRangeOfToken(f,d,u.startPosition,u.startPosition+u.value.length),g=s.start,s=s.end,h.assert(g.row===s.row,"Tokens should not span multiple lines"),t=this._createNewToken(u.value,t,g,s),this._appendTokenToMap(t,b,g.row));return b}})})},"MW/syntaxhighlighting/SyntaxHighlightingDataServiceFactory":function(){define(["dojo/_base/declare",
"dojo/aspect","mw-remote/Remote","MW/syntaxhighlighting/SyntaxHighlightingDataService"],function(g,f,e,d){var b;f.after(e,"reset",function(){b=null});return{getInstance:function(){return b=b||new d}}})},"MW/syntaxhighlighting/SyntaxHighlightingDataService":function(){define(["dojo/_base/declare","mw-remote/Remote","MW/rtc/plugins/language/matlab/syntaxhighlighter/MatlabTokenColorUtilities","mw-log/Log"],function(g,f,e,d){return g(null,{constructor:function(){f.registerResponseHandler("SyntaxHighlightingResponse",
this._handleSyntaxHighlightingResponse,this);f.registerFaultHandler("SyntaxHighlighting",this._handleSyntaxHighlightingError,this)},updateData:function(b,a,c,d){this._assertNotNullOrUndefined(b);this._rteMode=c||!1;0<b.length?f.sendMessage({SyntaxHighlighting:{matlabCode:b}},{uuid:a,matlabCode:b,contextID:d}):this._propagateResponse(a,[],[],[],!0,b)},onTokenUpdate:function(b,a,c,d){},onSectionLocationUpdate:function(b,a,c,d){},_assertNotNullOrUndefined:function(b){if(null===b||void 0===b)throw Error("MW.syntaxhighlighting.SyntaxHighlightingDataService: input parameter must not be null or undefined.");
},_handleSyntaxHighlightingResponse:function(b,a){dojo.forEach(b,function(c){this._propagateResponse(a.uuid,c.tokens,c.offsets,c.cellLocations,c.validTree,a.matlabCode,a.contextID)},this)},_getTokensFromArrays:function(b,a,c){var d,f,g=[];for(d=0;d<a.length;d+=1){var m=d+1>=a.length?b.length:c[d+1],p=a[d],n=e.getTokenTypeColor(p);this._rteMode&&(p=e.getTokenType(p));n=n||{r:0,g:0,b:0};f=b.substring(c[d],m);m=c[d];if(this._rteMode){var q=f.split("\n");if(1<f.length&&1<q.length)for(f=0;f<q.length;f+=
1)g.push({value:0<q[f].length?q[f]:"\n",color:n,type:String(p),startPosition:m}),m+=0<q[f].length?q[f].length:1;else g.push({value:f,color:n,type:String(p),startPosition:m})}else g.push({value:f,color:n,type:String(p),startPosition:m})}return g},_propagateResponse:function(b,a,c,e,f,g,m){d.assert(b,"No uuid property found in context.");a=this._getTokensFromArrays(g,a,c);this.onTokenUpdate(b,a,m,g);this.onSectionLocationUpdate(b,e,f,g)},_handleSyntaxHighlightingError:function(b){d.error("Error received while trying to receive syntax highlighting tokens.");
d.dir(b)}})})},"MW/rtc/plugins/language/matlab/syntaxhighlighter/MatlabTokenColorUtilities":function(){define(["mw-log/Log","MW/rtc/plugins/language/matlab/syntaxhighlighter/MatlabSyntaxHighlighterColorMap","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenConstants","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities","MW/syntaxhighlighting/ColorMapDefaults"],function(g,f,e,d,b){return{NULL_CATEGORY_COLOR:339,BEGIN_TYPE_INDEX:127,_inTypeSection:!1,getTokenTypeColor:function(a){a=f.getColorFromCategory(e.TOKEN_TO_CATEGORY[a]);
return!a?f.getColorFromCategory(this.NULL_CATEGORY_COLOR):a},getBeginTypeColor:function(){return f.getColorFromCategory(this.BEGIN_TYPE_INDEX)},getTokenTypeHTMLColor:function(a){a=f.getHTMLColorFromCategory(e.TOKEN_TO_CATEGORY[a]);return!a?f.getHTMLColorFromCategory(this.NULL_CATEGORY_COLOR):a},getTokenType:function(a){a=b.typeMapDefaults[e.TOKEN_TO_CATEGORY[a]];return!a?b.typeMapDefaults[this.NULL_CATEGORY_COLOR]:a},processTokens:function(a,c,b){for(var d={};c<=b;c++){this._inTypeSection=!1;var e=
a[c];if(e){d[c]=[];for(var f={valueBuffer:"",colorString:"",start:-1,end:-1},p=0;p<e.length;p++){var n=e[p],q=this._determineColorForToken(n),r=this._convertTokenColorToRgbString(q),s=this._createRangeOfToken(c,n.getColumn(),n.getColumn()+n.getLength()),t=s.start,s=s.end;g.assert(t.row===s.row,"Tokens should not span multiple lines");this._isValidToken(n,q)?r===f.colorString?(f.end=s,f.valueBuffer+=n.getValue()):(d=this._createNewTokenAndAppendToMap(f,d),f.start=t,f.end=s,f.colorString=r,f.valueBuffer=
n.getValue()):" "===n.getValue()?(f.end=s,f.valueBuffer+=n.getValue()):(d=this._createNewTokenAndAppendToMap(f,d),f={valueBuffer:"",colorString:"",start:-1,end:-1})}d=this._createNewTokenAndAppendToMap(f,d)}}return d},_createRangeOfToken:function(a,c,b){return{start:{row:a,column:c},end:{row:a,column:b}}},_isValidToken:function(a,c){return 0<a.getLength()&&!(0===c.r&&0===c.g&&0===c.b)},_createNewToken:function(a,c,b,d){return{value:a?a:"",color:c?c:"",range:{start:b?b:{row:0,column:0},end:d?d:{row:0,
column:0}}}},_createNewTokenAndAppendToMap:function(a,c){if(a.valueBuffer){var b=this._createNewToken(a.valueBuffer,a.colorString,a.start,a.end);this._appendTokenToMap(b,c,a.start.row)}return c},_appendTokenToMap:function(a,c,b){a.value&&void 0!==b&&c[b].push(a)},_isInTypeSection:function(){return this._inTypeSection},_determineColorForToken:function(a){this._isInTypeSection()?d.doesTokenMarkEndOfTypeSection(a)?(this._inTypeSection=!1,a=this.getTokenTypeColor(a.getType())):a=this.getBeginTypeColor():
(d.isBeginTypeToken(a)&&(this._inTypeSection=!0),a=this.getTokenTypeColor(a.getType()));return a},_convertTokenColorToRgbString:function(a){return a=a.r||a.g||a.b?"rgb("+a.r+", "+a.g+", "+a.b+")":""}}})},"MW/rtc/plugins/language/matlab/syntaxhighlighter/MatlabSyntaxHighlighterColorMap":function(){define(["MW/syntaxhighlighting/ColorMapDefaults"],function(g){var f={ERRORS:"ERRORS",COMMENTS:"COMMENTS",STRINGS:"STRINGS",TYPE_SECTION:"TYPE_SECTION",KEYWORDS:"KEYWORDS",UNTERMINATED_STRINGS:"UNTERMINATED_STRINGS",
SYSTEM_COMMANDS:"SYSTEM_COMMANDS",TEXT:"TEXT"},e={ERRORS:[122],COMMENTS:[105,106,107,108,109,110],STRINGS:[44,45],TYPE_SECTION:[127],KEYWORDS:[333],UNTERMINATED_STRINGS:[337],SYSTEM_COMMANDS:[338],TEXT:[339]},d=function(){return{ERRORS:b(f.ERRORS),COMMENTS:b(f.COMMENTS),STRINGS:b(f.STRINGS),TYPE_SECTION:b(f.TYPE_SECTION),KEYWORDS:b(f.KEYWORDS),UNTERMINATED_STRINGS:b(f.UNTERMINATED_STRINGS),SYSTEM_COMMANDS:b(f.SYSTEM_COMMANDS),TEXT:b(f.TEXT)}},b=function(a){return g.colorMapDefaults[e[a][0]]};return{_colorMap:d(),
SYNTAX_TYPE:f,_SYNTAX_TYPE_TO_CATEGORY:e,getDefaultColors:d,getDefaultColor:b,getColorFromCategory:function(a){return this.getColor(this._getSyntaxTypeFromCategory(a))},getHTMLColorFromCategory:function(a){return this.getHTMLColor(this._getSyntaxTypeFromCategory(a))},getColor:function(a){return this._colorMap[a]},getHTMLColor:function(a){return this._rgbToHex(this.getColor(a))},setColors:function(a){for(var c in a)a.hasOwnProperty(c)&&this.setColor(c,a[c])},setHTMLColors:function(a){for(var c in a)a.hasOwnProperty(c)&&
this.setHTMLColor(c,a[c])},getColors:function(){return this._colorMap},getHTMLColors:function(){for(var a={},c=Object.keys(this._colorMap),b=0;b<c.length;b++){var d=c[b];a[d]=this._rgbToHex(this._colorMap[d])}return a},setColor:function(a,c){this._colorMap[a]=c},setHTMLColor:function(a,c){"#"===c.charAt(0)&&(c=c.slice(1));this.setColor(a,this._hexToRgb(c))},_rgbToHex:function(a){return"#"+(16777216+(a.b|a.g<<8|a.r<<16)).toString(16).slice(1)},_hexToRgb:function(a){"#"===a.charAt(0)&&(a=a.slice(1));
a=parseInt(a,16);return{r:a>>16&255,g:a>>8&255,b:a&255}},_getSyntaxTypeFromCategory:function(a){for(var c=Object.keys(this._SYNTAX_TYPE_TO_CATEGORY),b=0;b<c.length;b++){var d=c[b];if(-1<this._SYNTAX_TYPE_TO_CATEGORY[d].indexOf(a))return d}return this.SYNTAX_TYPE.TEXT}}})},"MW/syntaxhighlighting/ColorMapDefaults":function(){define(["dojo/_base/declare"],function(g){return{typeMapDefaults:{122:"error",105:"comment",106:"comment",107:"comment",108:"comment",109:"comment",110:"comment",44:"string",45:"string",
127:"type sections",333:"keyword",337:"invalid",338:"system",339:"plain"},colorMapDefaults:{122:{r:255,g:0,b:0},105:{r:34,g:139,b:34},106:{r:34,g:139,b:34},107:{r:34,g:139,b:34},108:{r:34,g:139,b:34},109:{r:34,g:139,b:34},110:{r:34,g:139,b:34},44:{r:160,g:32,b:240},45:{r:160,g:32,b:240},127:{r:162,g:82,b:45},333:{r:0,g:0,b:255},337:{r:179,g:0,b:0},338:{r:179,g:140,b:0},339:{r:0,g:0,b:0}},HTMLColorMapDefaults:{122:"#ff0000",105:"#228b22",106:"#228b22",107:"#228b22",108:"#228b22",109:"#228b22",110:"#228b22",
44:"#a020f0",45:"#a020f0",127:"#a2522d",333:"#0000ff",337:"#b30000",338:"#b38c00",339:"#000000"}}})},"MW/rtc/plugins/equations/equationcontroller/EquationControllerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./EquationController"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.view","rtc.internaldocument","rtc.cursor","rtc.document"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/plugins/equations/equationcontroller/EquationController":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/equations/EquationRenderer MW/rtc/abstract/AbstractPlugin MW/rtc/model/DocumentConstants MW/rtc/model/DocumentUtilities MW/rtc/model/events/DeletionEvent MW/rtc/model/events/DocumentEvent MW/rtc/model/events/InsertBreakEvent MW/rtc/model/events/NumberOfLinesChangedEvent ./nodes/EquationNode ../tools/AutoDisplayStyle".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){return g(b,{constructor:function(a,c,b,h){this._view=a;this._internalDocument=c;this._cursor=b;this._document=h;d.loadFonts();this.own(e.after(this._document,"onDirectedDeletion",f.hitch(this,"_onDelete"),!0));this.own(e.after(this._internalDocument,"onDocumentChanged",f.hitch(this,"_handleDocumentChanged"),!0))},_handleDocumentChanged:function(a){n.autoStyle(a,this._view,this._internalDocument,this._cursor)},_isEquationNode:function(a){return a instanceof p},_isEquationOfType:function(a,
c){return this._isEquationNode(a)&&a.getEncoding()===c},_onDelete:function(a,c){if(!this._cursor.hasSelection()&&c.isLocal){var b=c.startNode;if(this._isEquationOfType(b,"tex")){if(-1===a&&this.onDelete(b))return!0;this._cursor.setPosition(this._cursor.selectionInfo2cursorPos(c));return!0}}},onDelete:function(a){},onActionsNeedUpdate:function(){},equationUnderCursor:function(c,b){var d=this._cursor.selectionInfo(),e=d.isLocal&&this._isEquationNode(d.startNode)&&d.startNode.getEncoding()===c?d.startNode:
null;if((!e||b===a.FORWARD_DELETE)&&d.isNull&&d.endPos===d.endNode.maxOffset())e=(d=d.endNode.nextSibling())&&this._isEquationNode(d)&&d.getEncoding()===c?d:null;return e},_canEditEquation:function(a){if(this._cursor.isCursorReadOnly())return!1;a=this.equationUnderCursor(a);if(this._cursor.hasSelection()&&!a)return!1;a=this._cursor.getNode();var b=this._cursor.getOffset();return c.isInTextLevelContainer(a)&&!c.isEdgeOfTextLevelContainer(a,b)||this._isEquationOfType(a,"mathml")&&0<b&&b<a.maxOffset()?
!1:!0},canEditMathMLEquation:function(){return this._canEditEquation("mathml")},canEditLaTeXEquation:function(){return this._canEditEquation("tex")},updateEquationNode:function(a,c){this._internalDocument.changeNodeAttributes(a,{encoding:c.encoding,displayStyle:c.displayStyle,mathmlString:c.mathmlString||"",texString:c.texString||""});"tex"===c.encoding&&this._cursor.setPosition(a,1)},_insertEquation:function(a){var c=this._internalDocument;a=new p(a);c=c.insertAtPosition(a,this._cursor.position);
this._cursor.setPosition(a,1);return c.events},convertRangeToEquation:function(a,c,b,d,e){this._document.deleteText(c,b,d,e);this.updateDocument({texString:a})},deleteEquation:function(a){var c=a.rootContainer(),b=this._cursor.getPosition(),d;d=this._internalDocument.getLineNumber(c);c=this._document.startEdit();this._internalDocument.deleteNodeAndMerge(a);this._cursor.setLineColumn(d+1,b.column);a=[k.create(d,d)];b=[h.create(d,d,b.column)];c.appendUndoEvents(a);c.appendRedoEvents(b);this._document.endEdit();
this._internalDocument.emitDocumentEvents(b);this.onActionsNeedUpdate()},updateDocument:function(a){var c=this._cursor.getNode().rootContainer(),c=this._internalDocument.getLineNumber(c),b=this._document.startEdit();a.currentNode?(this.updateEquationNode(a.currentNode,a),a.currentNode=null,a=[k.create(c,c)],b.appendUndoEvents(a)):(a=this._insertEquation(a),b.appendUndoEvents([m.create(c,c+1,-1)]));b.appendRedoEvents(a);this._document.endEdit();this._internalDocument.emitDocumentEvents(a)}})})},"MW/rtc/plugins/equations/equationcontroller/nodes/EquationNode":function(){define(["dojo/_base/declare",
"dojo/dom-class","MW/equations/renderer/model/utils/TeXUtils","MW/rtc/nodes/OpaqueNode","MW/rtc/plugins/equations/tools/EquationUtilities"],function(g,f,e,d,b){return g([d],{constructor:function(a){a=a||{};this._encoding=a.encoding||"tex";this._displayStyle=a.displayStyle;this._mathmlString=a.mathmlString||"";this._texString=a.texString||""},className:"EquationNode",maxOffset:function(){return"mathml"===this.getEncoding()?this._editorBridge?this._editorBridge.maxOffset()+2:b.isEmptyEquationEncoding(this._mathmlString)?
2:4:this.inherited(arguments)},posRightOfEquation:function(){return this.maxOffset()},posRightmostInsideEquation:function(){return this.maxOffset()-1},posLeftOfEquation:function(){return 0},posInsideOfEquation:function(){return this.maxOffset()/2},lineBorderOffset:function(a,c){return this.getPositionFromOffset(c)},getMathRootBox:function(){return this.box&&this.box.children&&this.box.children[0]&&this.box.children[0].children?f.contains(this.box.children[0],"mwEquationEditor")?this.box.children[0]:
this.box.children[0].children[0]:null},getEditor:function(){return this._editor},setEditor:function(a){this._editor=a},setEditorBridge:function(a){this._editorBridge=a},getEditorBridge:function(){return this._editorBridge},updateAttributes:function(a){var c={};a.hasOwnProperty("encoding")&&(c.encoding=this._encoding,this._encoding=a.encoding);a.hasOwnProperty("displayStyle")&&(c.displayStyle=this._displayStyle,this._displayStyle=a.displayStyle);a.hasOwnProperty("mathmlString")&&(c.mathmlString=this._mathmlString,
this._mathmlString=a.mathmlString);a.hasOwnProperty("texString")&&(c.texString=this._texString,this._texString=a.texString);return c},_sanitizeTeXString:function(){return this._texString=e.sanitzeLaTeXString(this._texString)},getTeXString:function(){return this._texString?this._sanitizeTeXString():this._editor&&this._editor.getEquation().toTeX()||""},getMathMLString:function(){return this._mathmlString?this._mathmlString:this._editor&&this._editor.getEquation().toMathML()||""},getEncoding:function(){return this._encoding},
setDisplayStyle:function(a){this._displayStyle=a;this._editor&&this._editor.getEquation().setDisplayStyle(a)},getDisplayStyle:function(){return this._displayStyle},getTop:function(){var a=this.getMathRootBox()||this.box;return a?a.offsetTop:0},getHeight:function(){var a=this.getMathRootBox()||this.box;return a?a.offsetHeight:0},getLeft:function(){var a=this.getMathRootBox()||this.box;return a?a.offsetLeft:0},getWidth:function(){var a=this.getMathRootBox()||this.box;return a?a.offsetWidth:0},getStyleAttributes:function(){return{}},
compareStyleAttributes:function(){return!1},getPlainText:function(a,c){var b=this.text;this._editorBridge&&(b=this._editorBridge.convertToText());return b},_serializeAttributes:function(a){a.text=this.getText();a.encoding=this._encoding;a.mathmlString=this.getMathMLString();a.displayStyle=this._displayStyle;a.texString=this.getTeXString()}})})},"MW/rtc/plugins/equations/tools/EquationUtilities":function(){define(["dojo/i18n!l10n/nls/equationEditor"],function(g){return{emptyEquationEncoding:'\x3cspan class\x3d"MathEquation emptyEquation"\x3e\x3cspan class\x3d"MathRoot"\x3e'+
g.emptyEquation+"\x3c/span\x3e\x3c/span\x3e",isEmptyEquationEncoding:function(f){return f.match(/<math[^<]+<mrow[^<]+<mi [^<>]+placeholder[^<]+<\/mi><\/mrow><\/math>/)}}})},"MW/rtc/plugins/equations/tools/AutoDisplayStyle":function(){define("dojo/_base/lang dojo/aspect MW/rtc/model/DocumentConstants MW/rtc/model/DocumentEventUtilities MW/rtc/model/DocumentUtilities MW/rtc/model/NodeUtilities MW/rtc/plugins/equations/equationcontroller/nodes/EquationNode".split(" "),function(g,f,e,d,b,a,c){function h(a){return a.type?
!0:!1}function k(a,c){var b;b=a.children?a.children.filter(l):[];return 0<b.length?(b.forEach(c.layoutNode,c),!0):!1}function l(b){return b instanceof c&&(b.getDisplayStyle()||a.isFreestandingOpaque(b))}return{autoStyle:function(a,c,f,g){var l=g.getNode().textContainer(),s=d.getEventsOfType(a,e.DELETION_EVENT),t=d.getEventsOfType(a,e.INSERT_TEXT),u=t.some(function(a){return a.endLine&&a.endLine>a.startLine});if(a.some(h)){var v=k(l,c),w={};a.forEach(function(a){var b;if(!a.hasOwnProperty("startLine")||
!a.hasOwnProperty("endLine"))return!1;var d=Math.min(a.endLine,f.getMaxLineNumber()-1);for(a=a.startLine;a<=d;a+=1)if(!w[a]){w[a]=!0;var e=f.getLineNode(a);e.childrenAreContainers?e.children.forEach(function(a){b=a.textContainer();v=k(b,c)||v}):(b=e.textContainer(),v=k(b,c)||v)}});if(0<s.length||u)b.isAtStartOfContainer(g.getCursorPosition())&&l.previousSibling()?v=k(l.previousSibling(),c)||v:b.isAtEndOfContainer(g.getCursorPosition())&&l.nextSibling()&&(v=k(l.nextSibling(),c)||v);if(1<t.length){var x=
t[0].position.getNode().rootContainer(),y=t[t.length-1].position.getNode().rootContainer();x&&(y&&x!==y)&&(c.layoutNode(x),c.layoutNode(y))}a=g.getCursorPosition().getNode().rootContainer();if(v&&(a===x||a===y))g.onUpdate(),c.onLayoutChange()}}}})},"MW/rtc/plugins/equations/equationcontroller/nodes/EquationNodeContentConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./EquationNodeContentConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},
createInstance:function(){return new e}})})},"MW/rtc/plugins/equations/equationcontroller/nodes/EquationNodeContentConverter":function(){define(["dojo/_base/declare","MW/rtc/nodes/contentconverter/base/LeafNodeContentConverter","./EquationNode"],function(g,f,e){return g(f,{getApplicableNodeClass:function(){return e}})})},"MW/rtc/plugins/equations/equationcontroller/view/EquationCoordinateConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./EquationCoordinateConverter"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.view.viewmodel"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/equations/equationcontroller/view/EquationCoordinateConverter":function(){define(["dojo/_base/declare","MW/rtc/model/Position","MW/rtc/plugins/equations/equationcontroller/nodes/EquationNode","MW/rtc/view/coordinateconverter/CoordinateConverterUtilities","MW/rtc/view/coordinateconverter/base/OpaqueBoxCoordinateConverter"],function(g,f,e,d,
b){return g(b,{constructor:function(a){this._viewModel=a},getApplicableNodeClass:function(){return e},getPositionFromCoordinate:function(a,c){var b=this._getClientRects(c)[0];if(!d.isCoordinateWithinRect(a,b))return null;if(c.getEditorBridge())return this._getPositionFromBridge(c,a);var e;"mathml"===c.getEncoding()?(e=a.x<=b.left?c.posLeftOfEquation():a.x>=b.right?c.posRightOfEquation():c.posInsideOfEquation(),c.lastClickCoordinates=d.convertFromClientToOffset(a,this._viewModel)):a.x>=b.left+b.width/
2&&(e=1);return new f(c,e)},_getPositionFromBridge:function(a,c){var b=this.getDomNode(a).getBoundingClientRect();c.x<=b.left?b=0:c.x>=b.right?b=a.maxOffset():(b=a.getEditorBridge().cursorOffsetFromXY(c.x-b.left,c.y-b.top)||0,b+=1);return new f(a,b)},getCoordinateFromPosition:function(a){var c=a.getNode(),b=a.getOffset(),d=c.getEditorBridge();return d&&0<b&&b<c.maxOffset()?d.caretCoordinatesFor(b-1):this.inherited(arguments)},getDomNode:function(a){return a.getMathRootBox()||a.box}})})},"MW/rtc/view/coordinateconverter/base/OpaqueBoxCoordinateConverter":function(){define(["dojo/_base/declare",
"dojo/dom-geometry","MW/rtc/model/Position","../CoordinateConverterUtilities","./BaseCoordinateConverter"],function(g,f,e,d,b){return g(b,{getPositionFromCoordinate:function(a,c){var b=this._getClientRects(c)[0];if(!d.isCoordinateWithinRect(a,b))return null;var f=0;a.x>=b.left+b.width/2&&(f=1);return new e(c,f)},getCoordinateFromPosition:function(a){var c=a.getNode();a=a.getOffset();var b=this.getDomNode(c),c=b?f.position(b):{x:0,w:0},b=b?d.getOffsetRectFromDomNode(b):{top:0,left:0,width:0,height:0};
return{x:a?b.right:b.left,y:b.top,width:b.width,height:b.height,pageX:c.x+(a?c.w:0)}},_getSubClientRects:function(a){return this.getClientRects(a)}})})},"MW/rtc/plugins/equations/equationcontroller/view/EquationLayouterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./EquationLayouter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/equations/equationcontroller/view/EquationLayouter":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct MW/equations/renderer/Renderer MW/rtc/model/NodeUtilities MW/rtc/plugins/equations/tools/EquationUtilities MW/rtc/plugins/richtext/HeadingUtilities MW/rtc/plugins/view/layoutmanager/abstract/AbstractLayouter ../nodes/EquationNode".split(" "),
function(g,f,e,d,b,a,c,h,k){function l(a,b){var e=r;a.parent&&c.isHeadingNode(a.parent)&&(e=c.getEquationHeightByLevel(a.parent.level));var e=f.mixin({},b,{pxPerEm:e}),h=JSON.stringify(e);u[h]||(u[h]=new d(e));return u[h]}function m(a,c,b,d){b=b.layoutInto(d,"span",{"class":"equationNode"});if(!c)return b;b.renderedEquationPromise=a.render(c,b,{displaystyle:d.getDisplayStyle()});return b}function p(a,b,d){b=b.layoutInto(d,"span",{"class":"equationNode"});var h=r;d.parent&&c.isHeadingNode(d.parent)&&
(h=c.getEquationHeightByLevel(d.parent.level));a.set("pxPerEm",h);e.empty(b);a.placeAt(b);window.setTimeout(function(){a.get("disabled")||a.focus()},0);return b}function n(a,c){c.setDisplayStyle(b.isFreestandingOpaque(c));var d=l(c,s),e=d.setDisplaystyleIfNeeded(c.getTeXString(),!0);c.getDisplayStyle()&&(c.textContainer().tempAlign=!0);d=m(d,e,a,c);d.setAttribute("data-test-source","tex");return d}function q(c,d){d.setDisplayStyle(b.isFreestandingOpaque(d));d.getDisplayStyle()&&(d.textContainer().tempAlign=
!0);var e=d.getEditor();if(e)return p(e,c,d);e=d.getMathMLString();if(a.isEmptyEquationEncoding(e))return e=c.layoutInto(d,"span",{"class":"equationNode"}),e.innerHTML=a.emptyEquationEncoding,e;var h=l(d,t);return m(h,e,c,d)}var r=14,s={cacheFontMetrics:!1,strictTeX:!0,equationFormat:"tex"},t={cacheFontMetrics:!1,equationFormat:"mathml"},u={};return g(h,{constructor:function(){},getApplicableNodeClass:function(){return k},layout:function(a,c){return("tex"===c.getEncoding()?n:q)(a,c)}})})},"MW/rtc/plugins/equations/equationeditor/EquationEditorProvider":function(){define(["dojo/_base/declare",
"dojo/_base/lang","./EquationEditor","MW/rtc/core/provider/PluginProvider"],function(g,f,e,d){return g(d,{requires:function(){return{createInstance:"rtc.focusservice rtc.cursor rtc.actionservice rtc.hyperlinkservice rtc.richtext.equationcontroller rtc.internaldocument rtc.eventhandler rtc.keyhandler rtc.clipboard rtc.contextmenu.generator rtc.document rtc.clipboardtempdirpath rtc.divcaret rtc.undoredo.controller rtc.undoredo.editblock rtc.view rtc.scrollpane".split(" ")}},createInstance:function(b,
a,c,d,f,g,m,p,n,q,r,s,t,u,v,w,x){var y={};y.focusService=b;y.cursor=a;y.actionService=c;y.hyperlinkService=d;y.equationController=f;y.internalDocument=g;y.eventHandler=m;y.keyHandler=p;y.clipboard=n;y.contextMenuGenerator=q;y.document=r;y.clipboardTempDirpath=s;y.divCaret=t;y.undoredoController=u;y.editBlockController=v;y.view=w;y.scrollpane=x;return new e(y)}})})},"MW/rtc/plugins/equations/equationeditor/EquationEditor":function(){define("dijit/focus dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-class MW/equations/editor/utils/ActionDataServiceProxy MW/equations/EquationEditor MW/rtc/model/DocumentConstants MW/rtc/model/DocumentUtilities MW/rtc/model/events/DocumentEvent MW/rtc/model/NodeUtilities MW/rtc/plugins/equations/equationcontroller/nodes/EquationNode MW/rtc/plugins/equations/equationeditor/EquationEditorBridge MW/rtc/plugins/equations/tools/EquationUtilities MW/rtc/RichTextComponentFeatureEnum".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r){return f(null,{constructor:function(a){a=a||{};this._focusService=a.focusService;this._cursor=a.cursor;this._actionService=a.actionService;this._hyperlinkService=a.hyperlinkService;this._equationController=a.equationController;this._internalDocument=a.internalDocument;this._eventHandler=a.eventHandler;this._keyHandler=a.keyHandler;this._clipboard=a.clipboard;this._contextMenuGenerator=a.contextMenuGenerator;this._document=a.document;this._clipboardTempDirpath=
a.clipboardTempDirpath;this._divCaret=a.divCaret;this._undoredoController=a.undoredoController;this._editBlockController=a.editBlockController;this._view=a.view;this._scrollpane=a.scrollpane;this._handles=[];this._handles.push(d.around(a.document,"deleteTextAtCurrentPosition",e.hitch(this,"_handleDelete")));this._actionService.addAction({id:r.EQUATIONS.WYSIWYG_EDITOR_ACTION,enabled:!0,key:"ctrl_shift_e",platformKey:{mac:"meta_shift_e"},callback:e.hitch(this,"_insertEquationCallback")});this._connections=
[];this._connections.push(d.after(this._cursor,"onChange",e.hitch(this,this._handleCursorChanges)));this._connections.push(d.after(this._equationController,"onActionsNeedUpdate",e.hitch(this,this._handleCursorChanges)))},_handleDelete:function(a){return e.hitch(this,function(c){var b=this._equationController.equationUnderCursor("mathml",c);if(this._cursor.hasSelection()||!b)return a.apply(this._document,arguments);var d=this._cursor.getPosition(),e=this._cursor.getNode();if(c===h.BACKWARD_DELETE&&
e===b&&d.posInNode===b.maxOffset())this._cursor.movePosition(this._cursor.LEFT);else if(c===h.FORWARD_DELETE&&(e===b.previousSibling()||e instanceof p&&0===d.posInNode))this._cursor.movePosition(this._cursor.RIGHT);else return a.apply(this._document,arguments)})},_handleCursorChanges:function(){this._cursor.hasSelection()&&this._expandSelectionOverEquations();var a=this._equationController.equationUnderCursor("mathml");this._actionService.updateAction(r.EQUATIONS.WYSIWYG_EDITOR_ACTION,{enabled:this._equationController.canEditMathMLEquation()});
a?this._handleCursorInsideEquation(a):this._handleCursorOutsideEquation()},_expandSelectionOverEquations:function(){var a=this._cursor.position,c=this._cursor.anchor,b=!1,d=!1,e=this._cursor.isReversed(),h=a.node;h.isInstanceOf(p)&&(0<a.offset&&a.offset<h.maxOffset())&&(b=!0);c.node&&(c.node.isInstanceOf(p)&&0<c.offset&&c.offset<c.node.maxOffset())&&(d=!0);if(!c||!(c.node===a.node&&b&&d)){if(b){if(!1===e&&a.offset===h.maxOffset()-1){this._cursor.setPosition(h,0);return}if(!0===e&&1===a.offset){this._cursor.setPosition(h,
h.maxOffset());return}this._cursor.setPosition(h,e?0:h.maxOffset())}d&&(this._cursor.anchor.offset=e?c.node.maxOffset():0,this._cursor.onUpdate())}},_handleCursorInsideEquation:function(a){var c=this._cursor.getPosition(),b=a.getEditor();if(!b){var d=a.posRightOfEquation(),e=a.posRightmostInsideEquation(),h=a.posInsideOfEquation(),b=this._createEditorInstance(a);c.posInNode===d?(d=a.endPosition(),c.posInNode=d.offset,this._cursor.releaseAnchor(),this._cursor.setPosition(a,c.posInNode)):c.posInNode===
e?(d=a.getPositionFromOffset(a.posRightmostInsideEquation()),c.posInNode=d.offset,this._cursor.releaseAnchor(),this._cursor.setPosition(a,c.posInNode)):c.posInNode===h&&a.lastClickCoordinates&&(d=this._view.getPositionFromCoordinate(a.lastClickCoordinates),c.posInNode=d.offset,this._cursor.releaseAnchor(),this._cursor.setPosition(a,c.posInNode),a.lastClickCoordinates=null)}0===c.posInNode||c.posInNode===a.maxOffset()||this._cursor.getNode()!==a?this._handleCursorOutsideEquation():(d=a.isReadOnly(),
b.get("readonly")!==d&&b.set("readonly",d),d?this._equationEditorActive&&this._disableActiveEditor():this._equationEditorActive!==b&&this._enableEditor(b),a.getEditorBridge().setCursor(c.posInNode-1,c.anchor&&c.anchor.posInNode?c.anchor.posInNode-1:void 0))},_handleCursorOutsideEquation:function(){this._equationEditorActive&&this._disableActiveEditor()},_enableEditor:function(a){this._equationEditorActive&&this._disableActiveEditor();this._equationEditorActive=a;this._triggerFocus(a);this._focusThief=
d.after(this._keyHandler,"onFocus",e.hitch(this,"_triggerFocus",a));this._cursor.resetAction();this._cursor.releaseAnchor();this._cursor.externalMouseDown()},_triggerFocus:function(a){this._focusTriggered!==a&&(this._focusTriggered=a,setTimeout(e.hitch(this,function(){if(this._equationEditorActive===a){var c=a.get("disabled");a.set("disabled",!1);(c||this._isRTC(g.curNode))&&a.focus()}this._focusTriggered=!1}),0))},_isRTC:function(a){for(;a&&a.parentNode;){if(b.contains(a,"mwRichTextComponent"))return!0;
a=a.parentNode}},_disableActiveEditor:function(){this._equationEditorActive.set("disabled",!0);this._equationEditorActive=null;this._focusThief.remove();this._focusService.setFocus()},_createEditorInstance:function(b){var d=new a(this._actionService);d.filterProperties(["contextMenuGroup"]);d.detach();d.addAction({id:"rtc.equationeditor-active",enabled:!0});d=new c({enable:["equationeditor.rtc-bridge"],disable:["action.undoredo","view.movekeycaptureonfocus"],inject:{"external.actionservice":d,"external.clipboard":this._clipboard,
"external.clipboardtempdirpath":this._clipboardTempDirpath,"external.contextmenugenerator":this._contextMenuGenerator,"controller.undoredo":{canUndo:function(){return!1},undo:function(){this._undoredoController.undo()}.bind(this),redo:function(){},canRedo:function(){return!1}},"rtc.divcaret":this._divCaret,"rtc.keyhandler":this._keyHandler,"rtc.cursor":this._cursor,"rtc.document":this._document,"rtc.equationnode":b,"rtc.undoredo.editblock":this._editBlockController,"rtc.updatenode":e.hitch(this,function(){var a=
this._document.startEdit();this._internalDocument.changeNodeAttributes(b,{mathmlString:"",texString:""});var c=b.rootContainer(),c=this._internalDocument.getLineNumber(c),c=[l.create(c,c)];a.appendRedoEvents(c);a.appendUndoEvents(c);this._document.endEdit();this._internalDocument.emitDocumentEvents(c)}),"rtc.deletenode":e.hitch(this,function(){this._equationController.deleteEquation(b)}),"rtc.scrollpane":this._scrollpane},registry:[n]});d.getEquation().fromMathML(b.getMathMLString());d.getCursor().hide();
d.set("disabled",!0);d.set("cacheFontMetrics",!1);d.set("pxPerEm",14);d.set("emptyEquation",q.emptyEquationEncoding);d.getEquation().setDisplayStyle(b.getDisplayStyle());b.setEditor(d);this._view.layoutNode(b);return d},_insertEquationCallback:function(){if(this._actionService.getAction(r.EQUATIONS.WYSIWYG_EDITOR_ACTION).enabled)return this._insertEquation()},_insertEquation:function(){if(this._equationController.canEditMathMLEquation()){var a=this._equationController.equationUnderCursor("mathml");
if(a){var c=this._cursor.position;if(c.node===a&&0<c.offset&&c.offset<a.maxOffset())return}this._equationController.updateDocument({encoding:"mathml",mathmlString:'\x3cmath\x3e\x3cmrow\x3e\x3cmi data-category\x3d"placeholder-atom"\x3e\x26nbsp;\x3c/mi\x3e\x3c/mrow\x3e\x3c/math\x3e'})}},dispose:function(){this._connections.forEach(function(a){a.remove()})}})})},"MW/equations/editor/utils/ActionDataServiceProxy":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/_base/lang","dojo/aspect"],
function(g,f,e,d){return f(null,{constructor:function(b){this._actionService=b;this._localActions={};this._attached=!0;this._handles=[];this._handles.push(d.after(this._actionService,"onActionChange",e.hitch(this,"_handleActionChange"),!0));this._previousActions={};this._filterProperties=[]},filterProperties:function(b){this._filterProperties=b},_handleActionChange:function(b){this._attached&&this._localActions[b.id]&&this._localActions[b.id][b.key]!==b.newValue&&(this._localActions[b.id][b.key]=
b.newValue,this.onRemoteActionChange(b))},onRemoteActionChange:function(b){},addAction:function(b){this._localActions[b.id]=b;this._attached&&this._actionService.addAction(this._filter(b))},_filter:function(b){var a=e.mixin({},b);this._filterProperties.forEach(function(c){delete a[c]});return a},executeAction:function(b,a){if(this._attached)return this._actionService.executeAction(b,a)},getAction:function(b){return this._localActions[b]?this._localActions[b]:this._actionService.getAction(b)},updateAction:function(b,
a){this._localActions[b]=e.mixin(this._localActions[b],a);this._attached&&this._actionService.updateAction(b,this._filter(a))},getAllActions:function(){return g.map(Object.keys(this._localActions),e.hitch(this,"getAction"))},loadActions:function(b){b.forEach(this.addAction,this)},attach:function(){this._attached||(this._attached=!0,Object.keys(this._localActions).forEach(function(b){var a=this._actionService.getAction(b);a?(this._previousActions[b]=e.mixin({},a),this._actionService.updateAction(b,
this._filter(this._localActions[b]))):this._actionService.addAction(this._filter(this._localActions[b]))},this))},detach:function(){this._attached&&(this._attached=!1,Object.keys(this._localActions).forEach(function(b){this._previousActions[b]?(this._actionService.updateAction(b,this._previousActions[b]),delete this._previousActions[b]):this._actionService.removeAction(b)},this))},destroy:function(){this._attached&&this.detach();this._handles.forEach(function(b){b.remove()});this._handles=[]}})})},
"MW/equations/EquationEditor":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/lang dojo/dom-construct mw-actiondataservice/ActionDataService MW/equations/editor/PluginRegistry MW/equations/utils/PluginService MW/rtc/clipboardservice/ClipboardService MW/rtc/plugins/contextmenu/DojoContextMenuGenerator".split(" "),function(g,f,e,d,b,a,c,h,k){return f(null,{constructor:function(d){d=d||{};var f=e.mixin({"external.clipboardtempdirpath":void 0},d.inject);f["external.actionservice"]=f["external.actionservice"]?
f["external.actionservice"]:new b;f["external.contextmenugenerator"]=f["external.contextmenugenerator"]||new k;f["external.clipboard"]=f["external.clipboard"]||h.getInternalClipboard();var p=a;d.registry&&(p=p.concat(d.registry));var n="api actions action.cursor action.delete action.undoredo controller.editmanager controller.caret controller.focus controller.contextmenu controller.mouse copypaste model.equation view.highlightactiverow view.movekeycaptureonfocus view.renderer view.keyhandler view.rootnode".split(" ");
d.enable&&(n=n.concat(d.enable));d.disable&&(n=g.filter(n,function(a){return 0>d.disable.indexOf(a)}));this._pluginService=new c({registry:p,inject:f,enable:n,disable:d.disable})},placeAt:function(a,c){var b=this._pluginService.get("view.rootnode");d.place(b,a,c);this._pluginService.get("view.renderer").redraw()},focus:function(){this._pluginService.get("controller.focus").focus()},get:function(a){return this._pluginService.get("api.attributes").get(a)},getEquation:function(){return this._pluginService.get("api.equation")},
getCursor:function(){return this._pluginService.get("api.cursor")},set:function(a,c){return this._pluginService.get("api.attributes").set(a,c)},destroy:function(){this._pluginService.destroy()}})})},"MW/equations/editor/PluginRegistry":function(){define("MW/equations/editor/actions/CaretAction MW/equations/editor/actions/CursorAction MW/equations/editor/actions/CutCopyPasteAction MW/equations/editor/actions/DeleteAction MW/equations/editor/actions/DragAndDropAction MW/equations/editor/actions/InsertTemplateAction MW/equations/editor/actions/InsertTextAction MW/equations/editor/actions/LaTeXCommandsAction MW/equations/editor/actions/LaTeXCompletionAction MW/equations/editor/actions/LineBreakAction MW/equations/editor/actions/MathMLFormattingAction MW/equations/editor/actions/MatrixAction MW/equations/editor/actions/MouseAction MW/equations/editor/actions/SmartEditingAction MW/equations/editor/actions/SmartParensAction MW/equations/editor/actions/SmartSymbolsAction MW/equations/editor/actions/TabAction MW/equations/editor/actions/TabLeavesStructureAction MW/equations/editor/actions/TextFormattingAction MW/equations/editor/actions/UndoRedoAction MW/equations/editor/actions/VisualCursorAction MW/equations/editor/api/AttributesAPI MW/equations/editor/api/CursorAPI MW/equations/editor/api/EquationAPI MW/equations/editor/controller/CaretController MW/equations/editor/controller/ContextMenuController MW/equations/editor/controller/CursorController MW/equations/editor/controller/EditManager MW/equations/editor/controller/FocusController MW/equations/editor/controller/KeyHandlerController MW/equations/editor/controller/LiveCursorController MW/equations/editor/controller/MouseController MW/equations/editor/controller/PlaceholderAtomController MW/equations/editor/controller/SelectionController MW/equations/editor/controller/UndoRedoController MW/equations/editor/helper/BackspaceToUndoHelper MW/equations/editor/helper/DeleteHelper MW/equations/editor/helper/ExportHTMLImage MW/equations/editor/helper/ExportImage MW/equations/editor/helper/ExportMathML MW/equations/editor/helper/ExportPlainText MW/equations/editor/helper/ImportHelper MW/equations/editor/helper/InsertHelper MW/equations/editor/helper/InsertTemplateHelper MW/equations/editor/helper/MimeTypeHelper MW/equations/editor/helper/PlainTextGenerator MW/equations/editor/model/Cursor MW/equations/editor/model/Equation MW/equations/editor/view/Caret MW/equations/editor/view/Helper MW/equations/editor/view/HighlightActiveRow MW/equations/editor/view/KeyHandler MW/equations/editor/view/MoveKeyCaptureOnFocus MW/equations/editor/view/RootNode MW/equations/editor/view/Renderer MW/equations/editor/view/Selection".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x,y,B,D,E,F,I,L,C,M,G,N,P,R,S,K,Q,U,T,X,$,V,ka,la,da,ma,ga,na,A,W,J,aa,oa,ea,wa,Ha){return Array.prototype.slice.call(arguments)})},"MW/equations/editor/actions/CaretAction":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/equations/editor/utils/CursorUtils","MW/equations/editor/utils/DirectedSearch","MW/equations/editor/utils/NodeUtils"],function(g,f,e,d,b){return g(null,{pluginId:"action.caret",pluginFamily:"actions",pluginDependencies:"controller.caret controller.cursor external.actionservice model.equation view.caret view.helper".split(" "),
constructor:function(a,c,b,d,e,g){this._caretController=a;this._cursorController=c;this._equation=d;this._caret=e;this._viewHelper=g;a=[{id:"equationeditor.up",enabled:!0,key:"up",callback:f.hitch(this,"_handleUp",!1)},{id:"equationeditor.selectup",enabled:!0,key:"shift_up",callback:f.hitch(this,"_handleUp",!0)},{id:"equationeditor.down",enabled:!0,key:"down",callback:f.hitch(this,"_handleDown",!1)},{id:"equationeditor.selectdown",enabled:!0,key:"shift_down",callback:f.hitch(this,"_handleDown",!0)}];
b.loadActions(a)},_handleUp:function(a){var c=this._caret.getGeometry(),h=this._cursorController.getPosition(),g=this._equation.getById(h.id);if(g=b.findStructure(g)){var l=this["_handleUp"+g.structure.className];if(l&&(g=l.call(this,g.structure,g.path)))return this._cursorController.setPosition(g,a),!0}(g=d.search(1,Math.floor(c.y),f.hitch(this,function(a){return(a=this._caretController.getPositionFromXY(c.x,c.y-a))&&!e.positionsEqual(a,h)&&a})))&&this._cursorController.setPosition(g.value,a);return!!g},
_handleUpMathScript:function(a,c){if(a.children[2]){var d=b.categorizeNode(a.children[2]);if(0===c[0]&&d===b.CATEGORY.PLACEHOLDER_ROW)return{id:a.children[2].id,offset:0}}},_handleUpMathFraction:function(a,c){if(1===c[0]&&b.categorizeNode(a.children[0])===b.CATEGORY.PLACEHOLDER_ROW){var d=this._caret.getGeometry(),e=this._viewHelper.getNodeGeometry(a.children[1]);if(d.x>e.relativeX+e.w-4)return{id:a.children[0].id,offset:a.children[0].children.length};if(d.x<e.relativeX+4)return{id:a.children[0].id,
offset:0}}},_handleDown:function(a){var c=this._caret.getGeometry(),h=this._cursorController.getPosition(),g=this._equation.getById(h.id);if(g=b.findStructure(g)){var l=this["_handleDown"+g.structure.className];if(l&&(g=l.call(this,g.structure,g.path)))return this._cursorController.setPosition(g,a),!0}(g=d.search(Math.ceil(c.y+c.h+1),this._viewHelper.getRootGeometry().h,f.hitch(this,function(a){return(a=this._caretController.getPositionFromXY(c.x,a))&&!e.positionsEqual(a,h)&&a})))&&this._cursorController.setPosition(g.value,
a);return!!g},_handleDownMathFraction:function(a,c){if(0===c[0]&&b.categorizeNode(a.children[1])===b.CATEGORY.PLACEHOLDER_ROW){var d=this._caret.getGeometry(),e=this._viewHelper.getNodeGeometry(a.children[0]);if(d.x>e.relativeX+e.w-4)return{id:a.children[1].id,offset:a.children[1].children.length};if(d.x<e.relativeX+4)return{id:a.children[1].id,offset:0}}},_handleDownMathScript:function(a,c){var d=b.categorizeNode(a.children[0]);if(2===c[0]&&d===b.CATEGORY.PLACEHOLDER_ROW){var d=this._caret.getGeometry(),
e=this._viewHelper.getNodeGeometry(a.children[2]);if(d.x<e.relativeX+e.w/2)return{id:a.children[0].id,offset:-1};d=this._equation.getParentAndIndex(a);return{id:d.parent.id,offset:d.index+1}}}})})},"MW/equations/editor/utils/CursorUtils":function(){define(["MW/equations/editor/utils/CursorPositionVisitor","MW/equations/editor/utils/NodeUtils"],function(g,f){function e(c,b){return"MathText"===c.className&&f.categorizeNode(b)===f.CATEGORY.ATOM&&(a[b.kind]||0)>(a[c.kind]||0)?!1:!0}function d(a){return"placeholder-atom"===
a["data-category"]?0:a.children?a.children.length:"MathText"===a.className?a.text.length:1}var b=new g,a={symbol:-1,mtext:-2};return{adaptPositionToAtoms:function(a,b,d){if(b){var g=f.categorizeNode(b);"atom"===g?(a.id=b.id,a.offset=b.text.length):"placeholder-atom"===g?(a.id=b.id,a.offset=0):b=null}d&&(g=f.categorizeNode(d),"atom"===g&&(!b||!e(b,d))?(a.id=d.id,a.offset=0):"placeholder-atom"===g&&(a.id=d.id,a.offset=0));return a},availableCursorPosition:function(a){b.visit(a);return b.visitedCounter()},
positionsEqual:function(a,b){return a.id===b.id&&a.offset===b.offset},logicalFromPosition:function(a,d){return b.visit(d,{atom:function(d){if(a.id===d.id)return b.visitedCounter()+a.offset},row:function(d,e){if(a.id===d.id&&e===a.offset)return b.visitedCounter()}})},nodeLength:d,positionFromLogical:function(a,h){return b.visit(h,{atom:function(h){var f=a-b.visitedCounter();if(f<d(h))return{id:h.id,offset:f};if(f===d(h)){var g=b.getNextSibling();if("placeholder"!==b.parentCategory()||!g||e(h,g))return{id:h.id,
offset:f}}},placeholder:function(d,e){if(a===b.visitedCounter())return{id:d.id,offset:e}}})},shouldCursorMergeToLeft:e}})},"MW/equations/editor/utils/CursorPositionVisitor":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/equations/editor/utils/NodeUtils"],function(g,f,e){return g(null,{constructur:function(){},visit:function(d,b){this._callbacks=f.mixin({atom:function(){},placeholder:function(){},row:function(){}},b);this._visitedCounter=0;return this._recurseTree(d)},visitedCounter:function(){return this._visitedCounter},
parentCategory:function(){return this._parentCategory},getNextSibling:function(){return this._currentParent.children[this._currentParentIndex+1]},_recurseTree:function(d){var b,a,c=e.categorizeNode(d);for(a=0;d.children&&a<d.children.length;a+=1){this._currentParent=d;this._currentParentIndex=a;this._parentCategory=c;var h=d.children[a];if(null!==h){if("placeholder"===this._parentCategory&&(b=this._callbacks.row(d,a),void 0===b&&this._placeHolderCanContainCursorAt(d,a)&&(b=this._callbacks.placeholder(d,
a),this._visitedCounter+=1),void 0!==b))return b;var f=e.categorizeNode(h);if("atom"===f){b=this._callbacks.atom(h);if(void 0!==b)return b;this._visitedCounter+=this._atomLength(h);this._visitedCounter+=1;a<d.children.length-1&&(h=this.getNextSibling(),"atom"===e.categorizeNode(h)&&(this._visitedCounter-=1))}else if("placeholder-atom"===f){b=this._callbacks.atom(h);if(void 0!==b)return b;this._visitedCounter+=1}else if("static"!==f&&(b=this._recurseTree(h),void 0!==b))return b}}if("placeholder"===
c){b=this._callbacks.row(d,d.children.length);if(void 0!==b)return b;0===d.children.length?(b=this._callbacks.placeholder(d,0),this._visitedCounter+=1):this._placeHolderCanContainCursorAt(d,d.children.length)&&(b=this._callbacks.placeholder(d,d.children.length),this._visitedCounter+=1)}return b},_atomLength:function(d){return"symbol"===d.kind?1:d.text.length},_placeHolderCanContainCursorAt:function(d,b){var a;if(b===d.children.length)return a=d.children[b-1],a=e.categorizeNode(a),"structure"===a;
a=d.children[b];a=e.categorizeNode(a);return"structure"!==a?!1:0===b?!0:"structure"===e.categorizeNode(d.children[b-1])}})})},"MW/equations/editor/utils/NodeUtils":function(){define("dojo/_base/array dojo/_base/lang MW/equations/editor/utils/MathVariant MW/equations/renderer/model/Symbols MW/equations/renderer/model/utils/NodeFactory mw-utils/Utils".split(" "),function(g,f,e,d,b,a){function c(a){if(a["data-category"])return a["data-category"];switch(a.className){case "MathRoot":return"structure-part";
case "MathAction":case "MathStyle":return"shallow";case "MathRow":return u.PLACEHOLDER_ROW;case "MathText":return u.ATOM}return"structure"}function h(a,c){a["data-category"]=c[0];for(var b=0;b<a.children.length&&b<c.length-1;b+=1)a.children[b]&&(a.children[b]["data-category"]=c[b+1])}function k(a,c,b,d){"undefined"!==typeof b?(c.children=a.children.slice(b,d),a.children.splice(b,d-b)):(c.children=a.children,a.children=[]);c.children.forEach(function(a){a&&(a.parent=c)})}function l(a,c){return g.every(Object.keys(c),
function(b){var d=c[b];return f.isArray(d)?d.length!==a[b].length?!1:g.every(d,function(c,b){var d=a.children[b];return!c?!d:l(d,c)}):d===a[b]})}function m(a,c){"MathText"===a.className&&(0<=r.indexOf(a.kind)&&!a.mathvariant&&""!==c)&&(a.mathvariant=c);if(!a.children)return a;for(var b=0;b<a.children.length;b+=1)if(a.children[b])if("MathStyle"===a.children[b].className){var d=e.add(c,a.children[b].mathvariant);a.children[b].children.forEach(function(c){c&&(c.parent=a,m(c,d))});var h=a.children[b].children.length;
a.children.splice.apply(a.children,[b,1].concat(a.children[b].children));b+=h-1}else a.children[b]=m(a.children[b],c);return a}function p(a){for(var c=0;c<F.length;){var b=(0,F[c])(a);b?(a=b,c=0):c+=1}return a}function n(d){if(!d)return d;d["data-category"]?"placeholder-atom"===d["data-category"]&&"placeholder"!==d.kind&&(d.kind="placeholder"):g.some(v,function(e){if(e=e(d)){if(e["data-category"]===u.STRUCTURE){var h=e,f=e.parent;if(!f||c(f)!==u.PLACEHOLDER_ROW){h=b.createNode("MathRow",{id:a.generateUuid()});
if(f){var g=h,k=f.children.indexOf(e);-1!==k&&(f.children[k]=g,g.parent=f)}h.children=[e];e.parent=h;h["data-category"]=u.PLACEHOLDER_ROW}e=h}d=e;return!0}return!1});d.children&&(d.children=g.map(d.children,n));return d=p(d)}function q(a){return"MathMatrix"===a.className&&a["data-category"]===u.STRUCTURE_PART}var r=["text","number","id"],s=["prod","contourintop","fpartintop","sum","intop"],t={SYMBOL:"symbol",DELIMITER:"delimiter",NUMBER:"number",IDENTIFIER:"id",TEXT:"mtext",WHITESPACE:"whitespace"},
u={ATOM:"atom",PLACEHOLDER_ATOM:"placeholder-atom",PLACEHOLDER_ROW:"placeholder",SHALLOW:"shallow",STATIC:"static",STRUCTURE:"structure",STRUCTURE_PART:"structure-part"},v=[],w={className:"MathScript"};v.push(function(a){if(l(a,w)){var c=!0===a.accent;"auto"===a.accent&&a.children[2]&&(c=null!==a.children[2].getAccent());if(c)return h(a,[u.STRUCTURE,u.PLACEHOLDER_ROW,u.STATIC,u.STATIC]),a}});var x={className:"MathRow",children:[{className:"MathDelimiter"},{},{className:"MathDelimiter"}]};v.push(function(a){if(l(a,
x)){var c=a.children[1];if("MathRow"===c.className&&1===c.children.length){c=c.children[0];if("MathMatrix"!==c.className)return;a.children.splice(1,1,c);c.parent=a}else if("MathMatrix"!==c.className)return;h(a,[u.STRUCTURE,u.STATIC,u.STRUCTURE_PART,u.STATIC]);return a}});v.push(function(c){if(!("MathRow"!==c.className||!c.children||3>c.children.length)){var d=c.children[0],e=c.children[c.children.length-1];if(!("MathDelimiter"!==d.className||"MathDelimiter"!==e.className))return c["data-category"]=
u.STRUCTURE,d["data-category"]=u.STATIC,e["data-category"]=u.STATIC,3<c.children.length||"MathRow"!==c.children[1].className?(d=b.createNode("MathRow",{id:a.generateUuid(),"data-category":u.PLACEHOLDER_ROW}),k(c,d,1,c.children.length-1),d.parent=c,c.children.splice(1,0,d)):(d=c.children[1],d["data-category"]=u.PLACEHOLDER_ROW),c}});v.push(function(a){if("MathRadical"===a.className&&a.children&&2===a.children.length)return h(a,[u.STRUCTURE,u.PLACEHOLDER_ROW,u.PLACEHOLDER_ROW]),a.children[1]&&("MathRow"===
a.children[1].className&&a.children[1].children&&0===a.children[1].children.length)&&(a.children[1]["data-category"]=u.STATIC),a});v.push(function(a){if("MathAction"===a.className&&a.children&&2===a.children.length)return h(a,[u.STRUCTURE,u.PLACEHOLDER_ROW,u.STATIC]),a});v.push(function(a){if("MathScript"===a.className&&a.children&&3===a.children.length&&a.children[1]&&a.children[1].children&&1===a.children[1].children.length&&"MathDelimiter"===a.children[1].children[0].className&&a.children[1].children[0].getAccent())return h(a,
[u.STRUCTURE,u.STRUCTURE_PART,u.STATIC]),a});var y={className:"MathRow",children:[{className:"MathScript",children:[{className:"MathRow",children:[{className:"MathText",kind:"symbol"}]},{},{}]},{className:"MathRow"}]},B={className:"MathScript",children:[{className:"MathRow",children:[{className:"MathText",kind:"symbol"}]},{},{}]};v.push(function(a){var c;if(l(a,y))c=a.children[0];else if(l(a,B))c=a;else return!1;var b;b=c.children[0];b="MathRow"===b.className&&b.children&&1===b.children.length?d.isLargeOpSymbol(b.children[0]):
b&&"MathText"===b.className&&"symbol"===b.kind&&0<=s.indexOf(b.symbolName);if(!b)return!1;h(c,[u.STRUCTURE_PART,u.STATIC,u.PLACEHOLDER_ROW,u.PLACEHOLDER_ROW]);a!==c?h(a,[u.STRUCTURE,u.STRUCTURE_PART,u.PLACEHOLDER_ROW]):h(a,[u.STRUCTURE]);return a});v.push(function(a){if(a.children&&("MathFraction"===a.className||"MathMultiScript"===a.className||"MathScript"===a.className)){a["data-category"]=u.STRUCTURE;var b;for(b=0;b<a.children.length;b+=1)a.children[b]&&c(a.children[b])===u.PLACEHOLDER_ROW&&(a.children[b]["data-category"]=
u.PLACEHOLDER_ROW);return a}});var D={className:"MathRow",children:[{className:"MathRow"},{},{className:"MathRow"}]};v.push(function(a){if(l(a,D)){var c=a.children[1],c=c&&"MathRow"===c.className&&1===c.children.length?c.children[0]:c;if("MathText"===c.className&&"symbol"===c.kind&&"slash"===c.symbolName)return h(a,[u.STRUCTURE,u.PLACEHOLDER_ROW,u.STATIC,u.PLACEHOLDER_ROW]),a}});var E=["contourintop","fpartintop","intop"];v.push(function(a){if(!a.parent||c(a.parent)!==u.PLACEHOLDER_ROW)return!1;if("MathRow"===
a.className&&a.children&&2===a.children.length){var b=a.children[0],b=b&&"MathRow"===b.className&&1===b.children.length?b.children[0]:b;if("MathText"===b.className&&"symbol"===b.kind&&0<=E.indexOf(b.symbolName))return h(a,[u.STRUCTURE,u.STATIC,u.PLACEHOLDER_ROW]),a}});var F=[];F.push(function(a){if(c(a)===u.PLACEHOLDER_ROW)for(var b=0;b<a.children.length;b+=1)if(a.children[b]&&c(a.children[b])===u.PLACEHOLDER_ROW)return a.children[b].children.forEach(function(c){c&&(c.parent=a)}),a.children.splice.apply(a.children,
[b,1].concat(a.children[b].children)),a});F.push(function(a){if(!("MathScript"!==a.className||!a.children||3!==a.children.length))if((!a.children[1]||"MathRow"===a.children[1].className&&0===a.children[1].children.length)&&(!a.children[2]||"MathRow"===a.children[2].className&&0===a.children[2].children.length))return a.children[0]});var I=["id","code","number"];return{CATEGORY:u,TEXT_KIND:t,isMatrix:q,categorizeNode:c,findStructure:function(a){for(var b=[],d,e;a;){if(c(a)===u.STRUCTURE)return{structure:a,
path:b};d=a.parent;if(!d)break;e=d.children.indexOf(a);a=d;b.unshift(e)}},qualifiesAsIdentifier:function(a){return a&&a.isIdentifier()},qualifiesAsOperator:function(a){return d.isOperator(a.symbolName)||d.isOperator(a.text)},isMultiLineEquation:function(a){a=a.children[0];return 1!==a.children.length?!1:"MathMatrix"===a.children[0].className},kindOfText:function(a){return a.match(/^\s+$/)?t.WHITESPACE:0<="~!+*\x3c\x3d\x3e/-,'".indexOf(a)?t.SYMBOL:0<="[](){}".indexOf(a)?t.DELIMITER:d.unicodeMap[a]?
t.SYMBOL:a.match(/^[0-9]+$/)?t.NUMBER:t.IDENTIFIER},categorizeTree:function(a){a=m(a,"");a=n(a);if(!("MathRoot"!==a.className||!a.children||1!==a.children.length)){var c=a.children[0];if(!("MathRow"!==c.className||!c.children||1!==c.children.length)&&"MathMatrix"===c.children[0].className)c["data-category"]=u.STRUCTURE_PART}"MathRoot"!==a.className||(!a.children||1!==a.children.length)||(c=a.children[0],"MathRow"===c.className&&c.children&&!c["data-category"]&&(c["data-category"]=u.PLACEHOLDER_ROW));
return a},isNonEmptyRow:function(a){return a&&"MathRow"===a.className&&a.children&&0<a.children.length},isMatrixWithDelimiters:function(a,c){if(!q(a))return!1;var b=a.parent;if(b&&b.children&&3===b.children.length){var e=b.children[0],b=b.children[2];if(d.isOpeningDelimiter(e.symbolName)&&e.symbolName===c+"left"&&d.isClosingDelimiter(b.symbolName)&&b.symbolName===c+"right")return!0}return!1},matchTemplate:l,isEmptyEquation:function(a){return"MathRoot"!==a.className||1!==a.children.length||1!==a.children[0].children.length||
c(a.children[0].children[0])!==u.PLACEHOLDER_ATOM?!1:!0},mergeIfCompatible:function(a,b,d){"atom"!==c(b)||"atom"!==c(d)||0>I.indexOf(b.kind)||0>I.indexOf(d.kind)||b.kind!==d.kind&&"number"===b.kind||a.mergeNodes(b.id,d.id)}}})},"MW/equations/editor/utils/MathVariant":function(){define([],function(){function g(e,d){var b=e.indexOf(d);0<=b&&e.splice(b,1);return e}function f(e){if(!e)return[];e=e.split("-");return g(e,"normal")}return{add:function(e,d){var b=f(e);0>b.indexOf(d)&&b.push(d);return 0===
b.length?"normal":b.sort().join("-")},remove:function(e,d){var b=f(e),b=g(b,d);return 0===b.length?"normal":b.sort().join("-")}}})},"MW/equations/editor/utils/DirectedSearch":function(){define([],function(){return{search:function(g,f,e){if(g>f){var d=this.search(-g,-f,function(a){return e(-a)});d&&(d.index=-d.index);return d}for(var d={},b=g,a=2,c=!1;g<b-1||!c;){var h=c?Math.round((g+b)/2):b,k=e(h);k?(d.index=h,d.value=k,b=h,c=!0):g=h;if(!c){if(b===f)break;a*=2;b=g+a;b>f&&(b=f)}}return c?d:void 0}}})},
"MW/equations/editor/actions/CursorAction":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/_base/lang","MW/equations/editor/utils/CursorUtils","MW/equations/editor/utils/NodeUtils"],function(g,f,e,d,b){return f(null,{pluginId:"action.cursor",pluginDependencies:["controller.cursor","controller.selection","external.actionservice","model.equation"],constructor:function(a,c,b,d){this._cursorController=a;this._selectionController=c;this._equation=d;a=[{id:"equationeditor.left",enabled:!0,
key:"left",callback:e.hitch(this,"_handleLinearMove",-1)},{id:"equationeditor.selectleft",enabled:!0,key:"shift_left",callback:e.hitch(this,"_handleLinearMove",-1,!0)},{id:"equationeditor.jumpleft",enabled:!0,key:"ctrl_left",callback:e.hitch(this,"_handleJump",-1)},{id:"equationeditor.selectjumpleft",enabled:!0,key:"ctrl_shift_left",callback:e.hitch(this,"_handleJump",-1,!0)},{id:"equationeditor.right",enabled:!0,key:"right",callback:e.hitch(this,"_handleLinearMove",1)},{id:"equationeditor.selectright",
enabled:!0,key:"shift_right",callback:e.hitch(this,"_handleLinearMove",1,!0)},{id:"equationeditor.jumpright",enabled:!0,key:"ctrl_right",callback:e.hitch(this,"_handleJump",1)},{id:"equationeditor.selectjumpright",enabled:!0,key:"ctrl_shift_right",callback:e.hitch(this,"_handleJump",1,!0)},{id:"equationeditor.home",enabled:!0,key:"home",platformKey:{mac:"meta_left"},callback:e.hitch(this,"_searchRowSide",-1,!1)},{id:"equationeditor.selefthome",enabled:!0,key:"shift_home",platformKey:{mac:"meta__shift_left"},
callback:e.hitch(this,"_searchRowSide",-1,!0)},{id:"equationeditor.end",enabled:!0,key:"end",platformKey:{mac:"meta_right"},callback:e.hitch(this,"_searchRowSide",1,!1)},{id:"equationeditor.selectend",enabled:!0,key:"shift_end",platformKey:{mac:"meta_shift_right"},callback:e.hitch(this,"_searchRowSide",1,!0)},{id:"equationeditor.selectall",enabled:!0,key:"ctrl_a",platformKey:{mac:"meta_a"},callback:e.hitch(this,"_selectAll")}];b.loadActions(a)},_handleJump:function(a,c){for(var d=this._cursorController.getPosition(),
e=this._equation.getById(d.id),d=d.offset;e;){var f=b.categorizeNode(e);if("placeholder"===f){var g=d+a;if(0<=g&&g<=e.children.length)return this._cursorController.setPosition({id:e.id,offset:g},c),!0}g="atom"===f&&e.text.length===d;f="atom"===f&&0===d;d=this._equation.getParentAndIndex(e);if(!d)break;e=d.parent;d=d.index;g?d+=1:!f&&-1===a&&(d+=1)}},_selectAll:function(){var a;this._cursorController.hasSelection()&&(a=this._selectionController.getSelectionSpan());this._cursorController.setLogical(0);
var c=this._cursorController.availableCursorPositions()-1;this._cursorController.setLogical(c,!0);return a?(c=this._selectionController.getSelectionSpan(),c.node!==a.node||c.left!==a.left||c.right!==a.right):!0},_handleLinearMove:function(a,c){if(this._cursorController.hasSelection()){var b=this._selectionController.getSelectionSpan();if(c){if(1===a===b.reversed)return b=this._selectionController.getSelectionShrinkPosition(),this._cursorController.setPosition(b,c),!0}else return this._cursorController.setPosition({id:b.id,
offset:-1===a?b.left:b.right}),!0}b=this._cursorController.getLogical();this._cursorController.setLogical(b+a,c);return-1===a?0<b:b<this._cursorController.availableCursorPositions()-1},_searchRowSide:function(a,c){for(var e=this._cursorController.getPosition(),f=e.node,g=-1===a?0:d.nodeLength(f),e=e.offset===g;f;){if("placeholder"===b.categorizeNode(f)){if(!e)return this._cursorController.setPosition({id:f.id,offset:-1===a?0:-1},c),!0;e=!1}f=this._equation.getParentAndIndex(f);if(!f)break;e&&(g=-1===
a?0:f.parent.children.length-1,e=e&&f.index===g);f=f.parent}this._cursorController.setLogical(-1===a?0:this._cursorController.availableCursorPositions()-1)}})})},"MW/equations/editor/actions/CutCopyPasteAction":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/lang dojo/aspect MW/equations/editor/utils/EquationPlugin MW/equations/editor/utils/NodeUtils MW/equations/editor/utils/Serializer MW/equations/renderer/model/utils/MathMLUtils MW/equations/renderer/model/utils/NodeFactory MW/equations/renderer/model/utils/TeXUtils mw-log/Log MW/rtc/plugins/cutcopypaste/MIMETypes dojo/i18n!l10n/nls/actions dojo/i18n!l10n/nls/equationEditorActions".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q){return f(b,{pluginId:"action.cutcopypaste",pluginFamily:"actions",pluginDependencies:"api.attributes controller.cursor controller.editmanager controller.selection external.actionservice external.clipboard helper.delete helper.import helper.inserttemplate helper.mimetype model.cursor model.equation view.keyhandler".split(" "),constructor:function(a,c,b,h,f,g,k,l,m,p,E,F,I){this._attributes=a;this._importHelper=l;this._insertTemplateHelper=m;this._mimeTypeHelper=
p;this._deleteHelper=k;this._cursorController=c;this._editmanager=b;this._selectionController=h;this._actionService=f;this._clipboard=g;this._equation=F;this._keyHandler=I;"function"===typeof this._clipboard.getCopyPasteHandlers?(c=this._clipboard.getCopyPasteHandlers(),this._keyHandler.enableBrowserCopyPaste(c)):(this._keyHandler.listenTo("copy",this._preventDefault),this._keyHandler.listenTo("cut",this._preventDefault),this._keyHandler.listenTo("paste",this._preventDefault));c=[{id:"equationeditor.cut",
enabled:!1,key:"ctrl_x",platformKey:{mac:"meta_x"},contextMenuGroup:"copyPaste",text:n.cutLabel,callback:e.hitch(this,"_handleCut")},{id:"equationeditor.copy",enabled:!1,key:"ctrl_c",platformKey:{mac:"meta_c"},contextMenuGroup:"copyPaste",text:n.copyLabel,callback:e.hitch(this,"_handleCopy")},{id:"equationeditor.copy.latex",enabled:!1,text:q.copyLaTeX,contextMenuGroup:"copyPaste",callback:e.hitch(this,"_handleCopyLaTeX")},{id:"equationeditor.copy.mathml",enabled:!1,text:q.copyMathML,contextMenuGroup:"copyPaste",
callback:e.hitch(this,"_handleCopyMathML")},{id:"equationeditor.paste",enabled:!0,key:"ctrl_v",platformKey:{mac:"meta_v"},contextMenuGroup:"copyPaste",text:n.pasteLabel,callback:e.hitch(this,"_handlePaste")},{id:"equationeditor.paste.latex",enabled:!0,contextMenuGroup:"copyPaste",text:q.pasteLaTeX,callback:e.hitch(this,"_handlePasteAs","tex")},{id:"equationeditor.paste.mathml",enabled:!0,contextMenuGroup:"copyPaste",text:q.pasteMathML,callback:e.hitch(this,"_handlePasteAs","mathml")}];f.loadActions(c);
this.own(a.observe("readonly",e.hitch(this,"_updateActions")));this.own(d.after(E,"onChange",e.hitch(this,"_updateActions")))},_updateActions:function(){var c=this._attributes.get("readonly"),b=this._cursorController.hasSelection(),d=a.isEmptyEquation(this._equation.getRoot());this._actionService.updateAction("equationeditor.cut",{enabled:b&&!c});this._actionService.updateAction("equationeditor.copy",{enabled:b});this._actionService.updateAction("equationeditor.copy.latex",{enabled:!d});this._actionService.updateAction("equationeditor.copy.mathml",
{enabled:!d});this._actionService.updateAction("equationeditor.paste",{enabled:!c});this._actionService.updateAction("equationeditor.paste.latex",{enabled:!c})},_preventDefault:function(a){a.preventDefault()},_handleCut:function(){m.assert(this._cursorController.hasSelection(),"Equation should have selection");this._handleCopy();this._editmanager.createBlock(e.hitch(this,function(a){this._deleteHelper.deleteSelection(a)}));return!0},_handleCopy:function(){var a=this._mimeTypeHelper.convertSelection();
this._clipboard.setClipboardData(a).then(function(){},function(){});return!0},_getSelectedNodes:function(){m.assert(!a.isEmptyEquation(this._equation.getRoot()),"Equation should not be empty");if(!this._cursorController.hasSelection())return[this._equation.getRoot()];var c=this._selectionController.getSelectionSpan();if("MathRow"===c.node.className)var b=c.node.children.slice(c.left,c.right);else"MathText"===c.node.className&&(b=[k.createNode("MathText",e.mixin(c.node.getContents(),{text:c.node.text.substring(c.left,
c.right)}))]);return b},_handleCopyLaTeX:function(){var a=l.exportLaTeX(this._getSelectedNodes(),{attribBlackList:["id","data-category"]});this._clipboard.setClipboardData([{flavor:p.TEXT,content:a}])},_handleCopyMathML:function(){var a=h.exportMathML(this._getSelectedNodes(),{attribBlackList:["id","data-category"]});this._clipboard.setClipboardData([{flavor:p.TEXT,content:a}])},_handlePaste:function(){if(!this._attributes.get("readonly")){var a=this._mimeTypeHelper.acceptedMimeTypes();this._clipboard.getClipboardData(a).then(e.hitch(this,
function(a){0!==g.filter(Object.keys(a),function(c){return a[c]}).length&&this._editmanager.createBlock(e.hitch(this,function(c){this._cursorController.hasSelection()&&this._deleteHelper.deleteSelection(c);this._mimeTypeHelper.insertContent(c,a)}))}));return!0}},_handlePasteAs:function(b){this._attributes.get("readonly")||this._clipboard.getClipboardData(["text/plain"]).then(e.hitch(this,function(d){if(d=this._importHelper.importModel(d["text/plain"],b)){d=a.categorizeTree(d);var h=c.serializeRange(d.children[0]);
this._editmanager.createBlock(e.hitch(this,function(a){this._insertTemplateHelper.insertTemplate(a,h)}))}}))}})})},"MW/equations/editor/utils/EquationPlugin":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect"],function(g,f,e){return g(null,{constructor:function(){},own:function(d){this._ownHandles||(this._ownHandles=[e.after(this,"destroy",f.hitch(this,function(){this._ownHandles.forEach(function(b){b.remove()})}))]);this._ownHandles.push(d)},destroy:function(){}})})},"MW/equations/editor/utils/Serializer":function(){define(["dojo/_base/array",
"dojo/_base/lang","MW/equations/editor/utils/NodeUtils"],function(g,f,e){function d(c){var b={};a.forEach(function(a){c.hasOwnProperty(a)&&(b[a]=c[a])});return b}function b(a){if(!a)return["Null"];var h=a.className,f=d(a),l=[];a.children&&(l=g.filter(a.children,function(a){return!a||e.categorizeNode(a)!==e.CATEGORY.PLACEHOLDER_ATOM}),l=g.map(l,function(a){return b(a)}));return[h,f,l]}var a="accent accentunder actiontype bevelled class close cols colspec data-category displaystyle inline kind length limitStyle linethickness mathsize mathvariant numPostPairs open rows style stretchy symbolName text".split(" ");
return{INTERESTING_ATTRIBUTES:a,serializeRange:function(a,h,g){var l=[],m=e.categorizeNode(a);h=h||0;if("atom"===m)"undefined"===typeof g&&(g=a.text.length),l.push(["MathText",f.mixin(d(a),{text:a.text.substr(h,g-h)})]);else if("placeholder"===m||"structure-part"===m){"undefined"===typeof g&&(g=a.children.length);for(;h<g;h+=1)m=e.categorizeNode(a.children[h]),m!==e.CATEGORY.PLACEHOLDER_ATOM&&l.push(b(a.children[h]))}return l}}})},"MW/equations/editor/actions/DeleteAction":function(){define("dojo/_base/declare dojo/_base/lang MW/equations/editor/utils/CursorUtils MW/equations/editor/utils/EquationPlugin MW/equations/editor/utils/IteratorConstants MW/equations/editor/utils/NodeUtils".split(" "),
function(g,f,e,d,b,a){return g(d,{pluginId:"action.delete",pluginDependencies:"api.attributes controller.editmanager controller.cursor controller.keyhandler external.actionservice helper.delete model.cursor model.equation".split(" "),constructor:function(a,b,d,e,g,p,n,q){this._attributes=a;this._deleteHelper=p;this._editmanager=b;this._cursor=n;this._equation=q;this._cursorController=d;a=[{id:"equationeditor.backspace",key:"backspace",keyPriority:-1,enabled:!0,callback:f.hitch(this,"_handleDelete",
-1)},{id:"equationeditor.delete",enabled:!0,key:"delete",callback:f.hitch(this,"_handleDelete",1)}];g.loadActions(a)},_handleDelete:function(a){if(!this._attributes.get("readonly")){if(!this._cursor.hasSelection()&&this._deleteHelper.handleDelete(a))return!0;this._editmanager.createBlock(f.hitch(this,function(b){if(this._cursor.hasSelection())return this._deleteHelper.deleteSelection(b);var d=this._cursor.getPosition(),e=this._equation.getById(d.id);this._delete(b,a,e,d.offset)}));return!0}},_delete:function(c,
b,d,f){var g=a.categorizeNode(d);f=-1===b?f-1:f;"atom"===g?0<=f&&f<d.text.length?this._deleteHelper.deleteInAtom(c,d,f,1):(g=-1===b?this._equation.getPreviousSibling(d):this._equation.getNextSibling(d))?(f=-1===b?e.nodeLength(g):0,this._delete(c,b,g,f)):this._findAndSelectStructure(d):"placeholder"===g&&0<=f&&f<d.children.length?this._delete(c,b,d.children[f],0):"structure"===g?this._shouldSelectStructure(d)?this._selectStructure(d):c.deleteNode(d.id):this._findAndSelectStructure(d)},_shouldSelectStructure:function(a){return"MathDelimiter"!==
a.className&&"MathText"!==a.className&&"MathSpace"!==a.className},_selectStructure:function(a){a=this._equation.getParentAndIndex(a);this._cursorController.setPosition({id:a.parent.id,offset:a.index});this._cursorController.setPosition({id:a.parent.id,offset:a.index+1},!0)},_findAndSelectStructure:function(a){(a=this._findStructure(a))&&this._selectStructure(a)},_findStructure:function(a){return this._equation.iterate({start:a,direction:b.UP,structure:function(a,c){c.stop(a)}})}})})},"MW/equations/editor/utils/IteratorConstants":function(){define([],
function(){return{UP:"up*",DOWN:"children",DOWN_RIGHT_UP:"children ((right + children)* up)*",RIGHT_LEFT_DOWN_UP:"((right + children)* (left + children)* up)*"}})},"MW/equations/editor/actions/DragAndDropAction":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/dom-geometry","dojo/on","MW/equations/editor/utils/EquationPlugin"],function(g,f,e,d,b){return g(b,{pluginId:"action.draganddrop",pluginFamily:"actions",pluginDependencies:"controller.caret controller.cursor controller.editmanager controller.mouse controller.selection helper.delete helper.mimetype view.selection view.keyhandler view.rootnode".split(" "),
constructor:function(a,c,b,e,g,m,p,n,q,r){this._deleteHelper=m;this._caretController=a;this._cursorController=c;this._editmanager=b;this._selectionController=g;this._mimeTypeHelper=p;this._rootNode=r;this._selectionView=n;this._keyHandler=q;this._selectionView.getNode().draggable="true";this._mouseController=e;this.own(this._mouseController.addMouseDown(f.hitch(this,"_handleMouseDown"),1));this.own(this._mouseController.addMouseMove(f.hitch(this,"_handleMouseMove"),1));this.own(d(r,"mouseup",f.hitch(this,
"_handleMouseUp")));this.own(d(r,"dragstart",f.hitch(this,"_handleDragStart")));this.own(d(r,"dragover",f.hitch(this,"_handleDragOver")));this.own(d(r,"drop",f.hitch(this,"_handleDrop")));this.own(d(r,"dragend",f.hitch(this,"_handleDragEnd")))},_handleDragStart:function(a){this._dragging?this._mimeTypeHelper.convertSelection().forEach(function(c){a.dataTransfer.setData(c.flavor,c.content)}):a.preventDefault()},_handleDragOver:function(a){var c=this._caretController.getPositionFromAbsoluteXY(a.pageX,
a.pageY);c&&(this._dragPosition=c,this._caretController.drawCaretAt(c),a.preventDefault())},_handleDrop:function(a){this._dragging=!1;a.stopPropagation();a.preventDefault();this._editmanager.createBlock(f.hitch(this,function(c){var b=this._cursorController.hasSelection()&&this._selectionController.getSelectionSpan();this._cursorController.setPosition(this._dragPosition);b&&!a.ctrlKey&&this._deleteHelper.deleteRange(c,b);var d={};this._mimeTypeHelper.acceptedMimeTypes().forEach(function(c){var b=a.dataTransfer.getData(c);
b&&(d[c]=b)});this._mimeTypeHelper.insertContent(c,d)}));window.setTimeout(f.hitch(this._keyHandler,"focus"),0)},_handleDragEnd:function(){this._dragging=!1;this._caretController.redraw()},_handleMouseDown:function(a){if(a.target&&"selection"===a.target.className&&0===a.button)return this._dragging=!0},_handleMouseMove:function(a){return this._dragging},_handleMouseUp:function(a){if(this._dragging){this._dragging=!1;var c=e.position(this._rootNode,!0);this._caretController.fromXY(a.pageX-c.x,a.pageY-
c.y,a.shiftKey);this._lastX=a.pageX;this._lastY=a.pageY}}})})},"MW/equations/editor/actions/InsertTemplateAction":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/_base/lang","MW/equations/editor/utils/Serializer","MW/equations/editor/utils/Templates"],function(g,f,e,d,b){return f(null,{pluginId:"action.inserttemplate",pluginFamily:"actions",pluginDependencies:["controller.editmanager","external.actionservice","helper.inserttemplate"],constructor:function(a,c,d){this._editmanager=
a;this._insertTemplateHelper=d;var f=b.getById();a=g.map(Object.keys(f),function(a){a=f[a];return e.mixin({enabled:!0,callback:e.hitch(this,"_insertTemplate",a.template)},a.attributes,{id:"equationeditor.insert."+a.attributes.id})},this);c.loadActions(a)},_insertTemplate:function(a){this._editmanager.createBlock(e.hitch(this,function(c){this._insertTemplateHelper.insertTemplate(c,a)}))}})})},"MW/equations/editor/utils/Templates":function(){define(["dojo/_base/array","MW/equations/utils/XMLParser",
"dojo/text!./Templates.xml"],function(g,f,e){function d(a){var c={};g.forEach(a.attributes,function(a){0<=p.indexOf(a.nodeName)?c[a.nodeName]=parseInt(a.nodeValue,10):0<=n.indexOf(a.nodeName)?c[a.nodeName]="true"===a.nodeValue:c[a.nodeName]=a.nodeValue});return c}function b(a){var c=g.filter(a.childNodes,function(a){return"#text"!==a.nodeName}),c=g.map(c,b);return[a.nodeName,d(a),c]}function a(a,c,b){b=b||[];return[a,c,b]}function c(){q.forEach(function(c){var b=c;c instanceof Array&&(b=c[0],c=c[1]);
b={id:b};c=a("MathText",{kind:"symbol",symbolName:c,"data-category":"structure"});r.push({attributes:b,template:c})})}function h(){if(!r){for(var h=[],g=(new f).parseString(e).documentElement.firstElementChild;g;){var k=d(g),p=b(g.firstElementChild);h.push({attributes:k,template:p});g=g.nextElementSibling}r=h;c();h=l;g=m;for(k=0;k<h;k+=1)for(p=0;p<g;p+=1){for(var n=k+1,q=p+1,s=void 0,t=void 0,u=[],s=0;s<n;s+=1)for(t=0;t<q;t+=1)u.push(a("MathRow",{"data-cursor":t+s*n,"data-category":"placeholder"}));
s=a("MathMatrix",{"data-category":"structure-part",rows:n,cols:q},u);t=a("MathDelimiter",{symbolName:"bracketleft","data-category":"static"});u=a("MathDelimiter",{symbolName:"bracketright","data-category":"static"});s=a("MathRow",{"data-category":"structure"},[t,s,u]);t={id:"matrix"+n+"x"+q};1===n&&1===q&&(t["command-id"]="matrix,matrix1x1");r.push({attributes:t,template:s})}}return r}function k(){t||(t={},u=[],h().forEach(function(a){a.attributes.hasOwnProperty("command-id")?a.attributes["command-id"].split(",").forEach(function(c){t[c]=
a;u.push(c)}):(t[a.attributes.id]=a,u.push(a.attributes.id))}));return t}var l=10,m=10,p=["data-cursor","cols","rows"],n=["accent","accentunder","bevelled","stretchy"],q=["alpha","beta","gamma","delta","epsilon","varepsilon","zeta","eta","theta","vartheta","iota","kappa","lambda","mu","nu","xi","omicron","pi","varpi","rho","varrho","sigma","varsigma","tau","upsilon","phi","varphi","chi","psi","omega","Alpha","Beta","Gamma","Delta","Epsilon","Zeta","Eta","Theta","Iota","Kappa","Lambda","Mu","Nu","Xi",
"Omicron","Pi","Rho","Sigma","Tau","Upsilon","Phi","Chi","Psi","Omega","pm","mp","times","div","cdot","ast","star","dagger","ddagger","amalg","cap","cup","uplus","sqcap","sqcup",["vee","lor"],["wedge","land"],"setminus","wr","circ","bullet","oslash","odot","bigcirc","bigtriangleup","bigtriangledown","triangleleft","triangleright","oplus","ominus","otimes",["bot","uptack"],["top","downtack"],["sumop","sum"],["prodop","prod"],"intop",["ointop","contourintop"],"biguplus","bigoplus","bigvee","bigcap",
"bigotimes","bigwedge","bigcup","bigodot","bigsqcup",["lt","\x3c"],["gt","\x3e"],"leq","geq","ll","gg","neq","noteq","doteq","sim","simeq","approx",["asymp","asympeq"],"cong","equiv","subset","supset","subseteq","supseteq","sqsubseteq","sqsupseteq","in","ni","notin","models","vdash","dashv","perp","mid","parallel","propto","bowtie","prec","preceq","succ","succeq","notlt","notgt","notleq","notgeq","notequiv","notapprox","notcong","notsim","notsimeq","notmodels","notni","notsucc","notsucceq","notprec",
"notpreceq","notparallel","notsubset","notsupset","notsubseteq","notsupseteq","leftarrow","rightarrow","uparrow","Leftarrow","Rightarrow","Uparrow","longleftarrow","longrightarrow","downarrow","Longleftarrow","Longrightarrow","Downarrow","hookleftarrow","hookrightarrow","updownarrow","leftharpoondown","rightharpoondown","Updownarrow","leftharpoonup","rightharpoonup","leftrightarrow","swarrow","nearrow","Leftrightarrow","nwarrow","searrow","longleftrightarrow","mapsto","longmapsto","Longleftrightarrow",
["lbrace","braceleft"],["rbrace","braceright"],["vert","verticalbar"],["lbrack","bracketleft"],["rbrack","bracketright"],["Vert","dblverticalbar"],["langle","anglebracketleft"],["rangle","anglebracketright"],"backslash",["lceil","ceilleft"],["rceil","ceilright"],["lfloor","floorleft"],["rfloor","floorright"],"aleph","infty","forall","wp","nabla","exists","angle","partial","emptyset","triangle","Im","imath","hbar","Re","jmath","prime","ldots","ell",["colon","colonPunct"],"cdots","neg","ddots","surd",
"ldotp","vdots",["to","rightarrow"],["gets","leftarrow"]],r,s,t,u;return{getById:function(){s||(s={},h().forEach(function(a){a.attributes.id&&(s[a.attributes.id]=a)}));return s},getByCommandId:k,getCommands:function(){t||k();return u}}})},"MW/equations/editor/actions/InsertTextAction":function(){define("dojo/_base/declare dojo/_base/lang MW/equations/editor/utils/EquationPlugin MW/equations/editor/utils/MathVariant MW/equations/editor/utils/NodeUtils MW/equations/renderer/model/Symbols".split(" "),
function(g,f,e,d,b,a){return g(e,{pluginId:"action.inserttext",pluginDependencies:"api.attributes controller.cursor controller.editmanager controller.keyhandler helper.delete helper.insert model.equation".split(" "),constructor:function(a,b,d,e,g,p,n){this._attributes=a;this._deleteHelper=g;this._insertHelper=p;this._editmanager=d;this._cursorController=b;this._equation=n;this.own(e.addTypeHandler(f.hitch(this,"insert")))},insert:function(c){if(!this._attributes.get("readonly")){var d;this._editmanager.createBlock(f.hitch(this,
function(e){this._cursorController.hasSelection()&&this._deleteHelper.deleteSelection(e);var f=this._cursorController.getPosition(),g=f.node,p=b.kindOfText(c);if(p===b.TEXT_KIND.WHITESPACE)p=b.TEXT_KIND.TEXT,c="\u2009";else if(p===b.TEXT_KIND.DELIMITER){f=this._insertHelper.getInsertPosition(e);d=e.insertNode(f.id,f.offset,"MathDelimiter",{symbolName:a.getSymbolName(c)});return}var n={kind:p,text:c},n=this._insertHelper.prepareTextAttributes(n,g,f.offset);"symbol"===n.kind&&(n.symbolName=a.getSymbolName(c));
this._nodeMatches(g,n)?(d=g,e.replaceText(f.id,f.offset,0,c)):("placeholder"===b.categorizeNode(g)&&(g=g.children[f.offset-1]),"mtext"!==p&&this._insertHelper.autoRemoveSpace(e,g,n),f=this._insertHelper.getInsertPosition(e),d=e.insertNode(f.id,f.offset,"MathText",n))}));this.onTextInserted(c,d)}},onTextInserted:function(a,b){},_nodeMatches:function(a,b){return"placeholder-atom"===a["data-category"]||"MathText"!==a.className||"symbol"===a.kind?!1:a.kind===b.kind||"code"===a.kind&&"id"===b.kind||"id"===
a.kind&&"code"===b.kind}})})},"MW/equations/editor/actions/LaTeXCommandsAction":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/lang dojo/aspect MW/equations/editor/utils/EquationPlugin MW/equations/editor/utils/NodeUtils MW/equations/editor/utils/Templates".split(" "),function(g,f,e,d,b,a,c){return f(b,{pluginId:"action.latexcommands",pluginFamily:"actions",pluginDependencies:"action.inserttext controller.cursor controller.editmanager controller.keyhandler external.actionservice helper.insert model.equation".split(" "),
constructor:function(a,b,f,g,p,n,q){this._insertHelper=n;this._insertTextAction=a;this._cursorController=b;this._actionService=p;this._editManager=f;this._equation=q;this.own(d.after(a,"onTextInserted",e.hitch(this,"_handleTextInserted"),!0));a=[{id:"equationeditor.enter",keyPriority:10,enabled:!0,key:"enter",callback:e.hitch(this,"_handleEnter")}];p.loadActions(a);this.own(g.add("{",e.hitch(this,"_handleCurlyBrace")),10);this._templates=c.getByCommandId()},_handleCurlyBrace:function(){return this._detectAndExecuteCommand()},
_handleEnter:function(){return this._detectAndExecuteCommand()},_handleTextInserted:function(c,b){var d=this._equation.getPreviousSibling(b);d&&"atom"===a.categorizeNode(d)&&this._executeCommand(d,b)},_detectAndExecuteCommand:function(){var c=this._cursorController.getPosition(),b=c.node;if("atom"===a.categorizeNode(b)&&c.offset===b.text.length)return this._executeCommand(b)},_executeCommand:function(a,c){var b=this._equation.getPreviousSibling(a);if(b&&"MathText"===b.className&&"backslash"===b.symbolName)return this.handleLaTeXCommand(a,
a.text,c),!0},getLaTeXCommands:function(){var a=Object.keys(this._templates);return g.filter(a,function(a){return a.match(/^[a-z]/i)}).sort(function(a,c){return a.toLowerCase()===c.toLowerCase()?a.localeCompare(c):a.toLowerCase().localeCompare(c.toLowerCase())})},handleLaTeXCommand:function(a,c,b){this._templates[c]&&this._editManager.createBlock(e.hitch(this,function(d){var e=this._templates[c].template;if("MathText"===a.className&&"backslash"!==a.symbolName){var f=this._equation.getPreviousSibling(a);
f&&d.deleteNode(f.id)}f=this._equation.getParentAndIndex(a);d.deleteNode(a.id);e=this._insertHelper.insertTemplate(d,e,f.parent,f.index);0<e.length&&b&&(f=this._equation.getParentAndIndex(b),d.moveChildren(e[0].id,0,f.parent.id,f.index,f.index+1))}))}})})},"MW/equations/editor/actions/LaTeXCompletionAction":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/Deferred MW/equations/editor/utils/EquationPlugin MW/rtc/plugins/completionpopup/CompletionPopup".split(" "),function(g,f,
e,d,b,a){return g(b,{pluginId:"action.latexcompletion",pluginFamily:"actions",pluginDependencies:"action.inserttext action.latexcommands controller.focus external.actionservice model.equation view.caret view.keyhandler".split(" "),constructor:function(a,b,d,g,m,p,n){this._equation=m;this._latexCommandsActions=b;this._focusController=d;this._insertTextAction=a;this._actionService=g;this._caret=p;this.own(e.after(a,"onTextInserted",f.hitch(this,"_handleTextInserted"),!0));this._keyHandler=n},_handleTextInserted:function(a,
b){"\\"===a&&this._showCompletion(b)},_getCompletions:function(a){var b=this._latexCommandsActions.getLaTeXCommands(),b=b.filter(function(b){return b.slice(0,a.length)===a});return b.map(function(a){return{popupCompletion:a}})},_showCompletion:function(c){var b="",d=f.hitch(this,function(){t.removePopup();var a=this._getCompletions(b);0===a.length?r():t.showPopup(a,e,b)}),e=f.hitch(this,function(a){var d=c;""!==b&&(d=this._equation.getNextSibling(c)||c);this._latexCommandsActions.handleLaTeXCommand(d,
a.popupCompletion);this._keyHandler.focus()}),g=f.hitch(this,function(){this._actionService.executeAction("equationeditor.backspace");""===b?r():(b=b.substr(0,b.length-1),d())}),p=f.hitch(this,function(a){b+=a;this._insertTextAction.insert(a);d()}),n,q=f.hitch(this,function(){n=n||this._focusController.add("popup")}),r=f.hitch(this,function(){n&&(n.remove(),n=null)}),s=this._caret.getNode(),t=new a(s,q,r,p,g);t.showPopup(this._getCompletions(""),e)}})})},"MW/rtc/plugins/completionpopup/CompletionPopup":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/event dojo/_base/lang dojo/dom-class dojo/i18n!l10n/nls/tabcompletion dojo/keys dojo/on mw-log/Log ./CompletionPopupMenu".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return f(null,{_TAB_COMPLETION_POPUP_ID:"tabCompletionDijitPopup",STATUS_ENUM:{STATUS_TOO_MANY_MATCHES:"TOO_MANY_MATCHES",STATUS_NO_MATCHES:"NO_MATCHES"},_isMenuCreated:!1,DISMISSAL_CHARS:" (.'",constructor:function(a,c,b,d,e){this._charKeyTypedCallback=d;this._backspaceTypedCallback=e;this._popupArguments={around:a,openCallback:c,closeCallback:b,orient:["below","above"]}},showStatusPopup:function(a){this._isMenuCreated||(this._popup=this._buildPopupMenu(),a===this.STATUS_ENUM.STATUS_NO_MATCHES?
this._popup=this._addStatusMessage(this._popup,"noCompletionsFound"):a===this.STATUS_ENUM.STATUS_TOO_MANY_MATCHES&&(this._popup=this._addStatusMessage(this._popup,"tooManyCompletionsFound")),this._displayPopup())},showPopup:function(a,c,b){this._isMenuCreated||(this._popup=this._buildPopupMenu(b),this._popup=this._addCompletionEntries(this._popup,a,c),this._displayPopup())},removePopup:function(){this._isMenuCreated&&this._popup&&(this._isMenuCreated=!1,this.suffix=null,this._popup.closePopup(),this._popup.destroyRecursive())},
_displayPopup:function(){this._popup.openPopup(this._popupArguments);this._popup.reorient();this._popup.domNode.parentElement&&(this._popup.domNode.parentElement.setAttribute("data-popupID","tabCompletionPopup"),b.add(this._popup.domNode.parentElement,"layeredNode"))},_addStatusMessage:function(b,f){var g=a[f],k=b.createPopupItem(g,"popupItem message");b.addChild(g,k);b.own(h(k,"keydown, click",d.hitch(this,function(a){this.removePopup();(a.keyCode===c.TAB||!a.ctrlKey&&a.keyCode===c.ENTER)&&e.stop(a)})));
return b},_handleKeyDown:function(a,b,d){if(d.keyCode===c.TAB||!d.ctrlKey&&d.keyCode===c.ENTER)this.removePopup(),b.getSelectedChild()&&a(),e.stop(d)},_addCompletionEntries:function(a,c,b){c.forEach(function(c){var e=a.createPopupItem(c.popupCompletion,"popupItem code"),f=d.hitch(this,b,c);a.own(h(e,"keydown",d.hitch(this,"_handleKeyDown",f,a)));a.own(h(e,"click",f));a.addChild(c.popupCompletion,e)},this);return a},_ignoreTabs:function(a){a.keyCode===c.TAB&&e.stop(a)},_handleCharTyped:function(a,
c,b){this.suffix=this.suffix?this.suffix+b:b;this._updateSelection(a,c,this.suffix);this._charKeyTypedCallback&&this._charKeyTypedCallback(b)},_handleBackspace:function(a,c){if(!this.suffix||0===this.suffix.length)a.onExecute();else this.suffix=this.suffix.substring(0,this.suffix.length-1),this._updateSelection(a,c,this.suffix);this._backspaceTypedCallback&&this._backspaceTypedCallback()},_buildPopupMenu:function(a){var b=a||"";this.suffix=null;this._isMenuCreated=!0;var f=new l({popupId:this._TAB_COMPLETION_POPUP_ID,
focusCallBack:this._popupArguments.closeCallback,positionArgs:this._popupArguments});f.startup();h(f,"keypress",d.hitch(this,function(a){this._isKeyCharPrintable(a.keyChar)&&(this._handleCharTyped(f,b,a.keyChar),e.stop(a))}));h(f.domNode,"keydown",d.hitch(this,function(a){var d=a.keyCode;this._isKeyNotPrintable(a)?e.stop(a):this._isKeyBackspace(d)?(this._handleBackspace(f,b),e.stop(a)):this._isKeySpace(d)?(this._handleCharTyped(f,b," "),e.stop(a)):d===c.ENTER&&e.stop(a)}));h(f,"keyup",d.hitch(this,
function(a){var b=a.keyCode;b===c.LEFT_ARROW||b===c.RIGHT_ARROW?this.removePopup():this._isKeyNotPrintable(a)&&e.stop(a)}));f.connect(f,"closePopup",d.hitch(this,function(){this.removePopup()}));return f},_updateSelection:function(a,c,b){var d=(c+b).toLowerCase();c=!1;-1!==this.DISMISSAL_CHARS.indexOf(d.charAt(d.length-1))&&(d=d.substring(0,d.length-1),c=!0);var e;g.forEach(a.getChildren(),function(c){!e&&c.label.toLowerCase().substring(0,d.length)===d&&(a.focusChild(c),e=c)},this);if(e&&e.label.length===
d.length&&c)a.onExecute();(c||!e)&&a.closePopup()},_isKeyBackspace:function(a){return a===c.BACKSPACE},_isKeySpace:function(a){return a===c.SPACE},_isKeyCharPrintable:function(a){return void 0!==a&&""!==a},_isShiftPressAndInvalidKey:function(a){return a.shiftKey&&void 0===a.keyCode},_isKeyNotPrintable:function(a){return a.ctrlKey||a.altKey||a.metaKey||a.keyCode===c.DELETE&&""===a.keyChar||this._isShiftPressAndInvalidKey(a)}})})},"MW/rtc/plugins/completionpopup/CompletionPopupMenu":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/event dojo/_base/lang dojo/_base/window dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/i18n!l10n/nls/tabcompletion dojo/keys dojo/window dojo/query dojo/on dojo/text!./CompletionPopupMenu.html dijit/_TemplatedMixin dijit/layout/ContentPane dijit/popup dijit/registry mw-log/Log".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x,y){return f([v,u],{_savedFocusNode:null,_focusCallback:null,_popupMenuClosed:!1,_selectedItem:null,_positionArgs:null,_NUMBER_OF_ELEMENTS_IN_MENU:9,_ELEMENT_HEIGHT_IN_MENU:21,constructor:function(a){this._setTemplate(a);this._cleanupOldPopups();this.id="tabCompletionPopupMenu";this._popupId=a&&a.popupId||null;this._dijitPopup=w;this._items=[];this._positionArgs=a&&a.positionArgs;this._focusCallback=a&&a.closeCallback},_setTemplate:function(a){this._maxHeight=
a&&a.maxHeight||this._NUMBER_OF_ELEMENTS_IN_MENU*this._ELEMENT_HEIGHT_IN_MENU;this.tabIndex=0;this.templateString="\x3cdiv\x3e"+t+"\x3c/div\x3e"},_cleanupOldPopups:function(){var a=r('[widgetid^\x3d"tabCompletionPopupMenu"]');g.forEach(a,function(a){x.byNode(a).destroyRecursive()},this)},_injectPopup:function(a){this._dijitPopup=a},postCreate:function(){this.inherited(arguments);this.connect(this,"onClose",d.hitch(this,function(){this._popupMenuClosed=!0}));this.own(s(this.domNode,"keydown",d.hitch(this,
function(a){var c;if(a.keyCode===n.UP_ARROW)c=this._getNextItemByOffset(-1);else if(a.keyCode===n.DOWN_ARROW)c=this._getNextItemByOffset(1);else if(a.keyCode===n.PAGE_UP)c=this._getNextItemByOffset(-this._NUMBER_OF_ELEMENTS_IN_MENU);else if(a.keyCode===n.PAGE_DOWN)c=this._getNextItemByOffset(this._NUMBER_OF_ELEMENTS_IN_MENU);else if(a.keyCode===n.ESCAPE){e.stop(a);this.closePopup();return}c&&(this.focusChild(c),a.preventDefault())})));h.add(this.domNode,"dijit dijitMenu dijitMenuPassive dijitReset tabCompletionPopupMenu");
m.set(this.domNode,{maxHeight:this._maxHeight+"px"});c.set(this.domNode,"tabindex",0)},openPopup:function(a){y.assert(a,"Please specify the 'around' and 'orient' arguments");a.around?a.orient||y.error("'Orient' parameter not specified, default will be used"):y.error("Specify the 'around' parameter for positioning the popup.");this._popupMenuClosed=!1;this._openCallback=(this._positionArgs=a)&&a.openCallback;this._closeCallback=a&&a.closeCallback;this._scheduleOpen(a);this.focusFirstChild()},reorient:function(){this._popupMenuClosed||
(this._closeAndRestoreFocus(),this._openMyself(this._positionArgs),this._popupMenuClosed=!1,this.focusFirstChild())},_ignoreTabs:function(a){a.keyCode===n.TAB&&e.stop(a)},_lookup:function(a){this._localization||(this._localization=p);return this._localization[a]},_scheduleOpen:function(a){this._openTimer||(this._openTimer=setTimeout(d.hitch(this,function(){delete this._openTimer;this._openMyself(a)}),1))},_getRelativePopupPosition:function(a){var c=q.getBox(),b=l.position(a.around);a.orient=a.orient||
["below","above"];b.y+this._maxHeight<c.h||(a.orient=["above","below"]);return a},onExecute:function(){this.closePopup()},onCancel:function(){this.closePopup()},_openMyself:function(c){if(this.domNode){var b=this._focusManager.get("prevNode"),e=this._focusManager.get("curNode");this._savedFocusNode=!e||a.isDescendant(e,this.domNode)?b:e;c=this._getRelativePopupPosition(c);this._dijitPopup.open({popup:this,around:c.around,onExecute:d.hitch(this,"closePopup"),onCancel:d.hitch(this,"closePopup"),orient:c.orient});
this._popupId&&this._dijitPopup.getTopPopup().wrapper&&h.add(this._dijitPopup.getTopPopup().wrapper,this._popupId);this.focus();this._openCallback&&this._openCallback()}},_onBlur:function(){this.inherited("_onBlur",arguments);this.closePopup()},_closeAndRestoreFocus:function(){this._savedFocusNode&&this._savedFocusNode.focus&&this._savedFocusNode.focus();this._dijitPopup&&this._dijitPopup.close(this);this._closeCallback&&this._closeCallback()},closePopup:function(){this._closeAndRestoreFocus()},focus:function(){this._selectedItem?
this.focusChild(this._selectedItem):this.focusFirstChild()},focusChild:function(a){a&&!(0>this._items.indexOf(a))&&(a.domNode.focus(),this.unSelectChild(this._selectedItem),this.selectChild(a))},focusFirstChild:function(){this._items.length&&this.focusChild(this._items[0])},blurChild:function(a){a&&!(0>this._items.indexOf(a))&&(a.domNode.blur(),this.unSelectChild(a))},unSelectChild:function(a){a&&(h.remove(a.domNode,"selected"),this._selectedItem=null,this._backupItem=a)},selectChild:function(a){a&&
(h.add(a.domNode,"selected"),this._selectedItem=a)},addChild:function(a,c){this._items.push({label:a,domNode:c});k.place(c,this.containerNode,"last")},_getIndexByOffset:function(a,c,b){a+=c;return a>b-1?b-1:0>a?0:a},_getNextItemByOffset:function(a){var c=this._items.length,b=this._items.indexOf(this._selectedItem||this._backupItem);a=this._getIndexByOffset(b,a,c);return this._items[a]},getChildren:function(){return this._items},getSelectedChild:function(){return this._selectedItem},createPopupItem:function(a,
c){return k.toDom('\x3ctr class\x3d"'+c+'" tabindex\x3d"-1"\x3e\x3ctd\x3e'+a+"\x3c/td\x3e\x3c/tr\x3e")}})})},"MW/equations/editor/actions/LineBreakAction":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/equations/editor/utils/EquationPlugin MW/equations/editor/utils/NodeUtils MW/equations/editor/utils/Serializer MW/equations/editor/utils/Templates MW/equations/renderer/model/Symbols".split(" "),function(g,f,e,d,b,a,c,h){return g(d,{pluginId:"action.linebreak",pluginFamily:"actions",
pluginDependencies:"api.attributes controller.cursor controller.editmanager external.actionservice helper.delete helper.insert model.equation".split(" "),constructor:function(a,c,b,d,e,h,g){this._attributes=a;this._cursorController=c;this._editmanager=b;this._equation=g;this._deleteHelper=e;this._insertHelper=h;a=[{id:"equationeditor.linebreak",enabled:!0,key:"enter",callback:f.hitch(this,"_handleLineBreak",!1)},{id:"equationeditor.linebreak_alt",enabled:!0,key:"shift_enter",callback:f.hitch(this,
"_handleLineBreak",!1)}];d.loadActions(a);this.own(e.addDeleteHandler(f.hitch(this,"_handleDelete")))},_handleDelete:function(a){var c=this._detectLine();if(c&&-1===a&&c.left)return this._mergeLines(c.left,c.line),!0;if(c&&1===a&&c.right)return this._mergeLines(c.line,c.right),!0},_mergeLines:function(a,c){var d=a.parent;this._editmanager.createBlock(f.hitch(this,function(e){e.moveChildren(a.id,a.children.length,c.id);e.deleteNode(c.id);var f=d.rows,f=f-1;1===f?(f=this._equation.getParentAndIndex(d),
e.moveChildren(f.parent.id,f.index,a.id),e.updateAttributes(f.parent.id,{"data-category":b.CATEGORY.PLACEHOLDER_ROW}),e.deleteNode(d.id)):e.updateAttributes(d.id,{rows:f})}))},_detectLine:function(){var a=this._cursorController.getPosition(),c={},d=!0,e=!0,f=a.node;b.categorizeNode(f)===b.CATEGORY.ATOM||b.categorizeNode(f)===b.CATEGORY.PLACEHOLDER_ATOM?(d=0===a.offset,e=a.offset===f.text.length,a=this._equation.getParentAndIndex(f),f=a.parent,d=d&&0===a.index,e=e&&a.index===f.children.length-1):(d=
0===a.offset,e=a.offset===f.children.length);a=this._equation.getParentAndIndex(f);f=a.parent;if(!("MathMatrix"!==f.className||1!==f.cols))if(d=d&&0<a.index,e=e&&a.index<f.children.length,d||e){var h=f.parent;"MathRow"===h.className&&(h=h.parent);if("MathRoot"===h.className)return c.line=f.children[a.index],d&&(c.left=f.children[a.index-1]),e&&(c.right=f.children[a.index+1]),c}},_handleLineBreak:function(){if(!this._attributes.get("readonly")){var c=this._cursorController.getPosition(),d=c.node;b.categorizeNode(d)===
b.CATEGORY.ATOM&&(d=this._equation.getParent(d));var e=this._equation.getParentAndIndex(d),h=e.parent;if("MathMatrix"===h.className){var g=h,h=h.parent;"MathRow"===h.className&&(h=h.parent);"MathRoot"===h.className&&this._insertAdditionalNewline(g,e.index);return!0}if("MathRoot"===h.className)return this._editmanager.createBlock(f.hitch(this,function(b){var e=this._insertHelper.getInsertPosition(b,c),f=a.serializeRange(e.node,0,e.offset),h=a.serializeRange(e.node,e.offset);this._deleteHelper.deleteRange(b,
{node:e.node,left:0,right:e.node.children.length});b.updateAttributes(d.id,{"data-category":"structure-part"});var g=b.insertNode(d.id,0,"MathMatrix",{cols:1,rows:2,colspec:"l"}),e=b.insertNode(g.id,0,"MathRow",{"data-category":"placeholder"}),g=b.insertNode(g.id,1,"MathRow",{"data-category":"placeholder"});this._insertHelper.insertTemplate(b,f,e,0);this._insertHelper.insertTemplate(b,h,g,0);this._cursorController.setPosition({id:g.id,offset:0})})),!0}},_insertAdditionalNewline:function(a,c){var b=
this._cursorController.getPosition();this._editmanager.createBlock(f.hitch(this,function(d){var e=this._insertHelper.getInsertPosition(d,b);d.updateAttributes(a.id,{rows:a.rows+1});var f=d.insertNode(a.id,c+1,"MathRow",{"data-category":"placeholder"});d.moveChildren(f.id,0,e.node.id,e.offset)}))}})})},"MW/equations/editor/actions/MathMLFormattingAction":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/equations/editor/utils/EquationPlugin MW/equations/editor/utils/MathVariant MW/equations/editor/utils/NodeUtils".split(" "),
function(g,f,e,d,b,a){return g(d,{pluginId:"action.mathmlformatting",pluginFamily:"actions",pluginDependencies:["helper.insert","model.equation"],constructor:function(a,b){this._insertHelper=a;this._equation=b;this.own(e.after(a,"prepareTextAttributes",f.hitch(this,"_handlePrepareTextAttributes")));this.own(e.after(b,"beforeUpdateAttributes",f.hitch(this,"_handleUpdateAttributes"),!0));this.own(e.after(b,"beforeReplaceText",f.hitch(this,"_handleReplaceText"),!0))},_handlePrepareTextAttributes:function(a,
d){if("id"!==a.kind)return a;if(!d||!d.mathvariant)a.mathvariant=1===a.text.length?b.add(a.mathvariant,"italic"):b.remove(a.mathvariant,"italic");return a},_handleReplaceText:function(a,b,d,e,f){b=this._equation.getById(b);this._isAutoUpdateNode(b)&&this._handleTextChange(a,b,b.text.length,b.text.length-e+f.length)},_handleUpdateAttributes:function(a,b,d){d.hasOwnProperty("text")&&(b=this._equation.getById(b),this._isAutoUpdateNode(b)&&this._handleTextChange(a,b,b.text.length,d.text.length))},_isAutoUpdateNode:function(a){return"id"===
a.kind},_handleTextChange:function(a,d,e,f){f=1===f;1===e!==f&&(e=f?b.add(d.mathvariant,"italic"):b.remove(d.mathvariant,"italic"),a.updateAttributes(d.id,{mathvariant:e}))}})})},"MW/equations/editor/actions/MatrixAction":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/equations/editor/utils/EquationPlugin MW/equations/editor/utils/IteratorConstants MW/equations/editor/utils/NodeUtils dojo/i18n!l10n/nls/equationEditorActions".split(" "),function(g,f,e,d,b,a,c){return g(d,{pluginId:"action.matrix",
pluginFamily:"actions",pluginDependencies:"action.inserttext api.attributes controller.cursor controller.editmanager external.actionservice model.cursor model.equation".split(" "),constructor:function(a,b,d,g,p,n,q){this._insertTextAction=a;this._attributes=b;this._cursorController=d;this._actionService=p;this._editManager=g;this._equation=q;this.own(b.observe("readonly",f.hitch(this,"_updateActions")));this.own(e.after(a,"onTextInserted",f.hitch(this,"_handleTextInserted"),!0));a=[{id:"equationeditor.matrix.insertcolumnleft",
enabled:!1,contextMenuGroup:"matrix",text:c.matrixInsertColumnLeft,callback:f.hitch(this,"_handleInsertColumn",-1)},{id:"equationeditor.matrix.insertcolumnright",enabled:!1,contextMenuGroup:"matrix",text:c.matrixInsertColumnRight,callback:f.hitch(this,"_handleInsertColumn",1)},{id:"equationeditor.matrix.deletecolumn",enabled:!1,contextMenuGroup:"matrix",text:c.matrixDeleteColumn,callback:f.hitch(this,"_handleDeleteColumn")},{id:"equationeditor.matrix.insertrowabove",enabled:!1,contextMenuGroup:"matrix",
text:c.matrixInsertRowAbove,callback:f.hitch(this,"_handleInsertRow",-1)},{id:"equationeditor.matrix.insertrowbelow",enabled:!1,contextMenuGroup:"matrix",text:c.matrixInsertRowBelow,callback:f.hitch(this,"_handleInsertRow",1)},{id:"equationeditor.matrix.deleterow",enabled:!1,contextMenuGroup:"matrix",text:c.matrixDeleteRow,callback:f.hitch(this,"_handleDeleteRow")},{id:"equationeditor.matrix.removerdelimiters",enabled:!1,contextMenuGroup:"matrix",text:c.matrixRemoveDelimiters,callback:f.hitch(this,
"_handleRemoveDelimiters")},{id:"equationeditor.matrix.usebrackets",enabled:!1,contextMenuGroup:"matrix",text:c.matrixUseBrackets,callback:f.hitch(this,"_handleDelimiters","bracket")},{id:"equationeditor.matrix.useparentheses",enabled:!1,contextMenuGroup:"matrix",text:c.matrixUseParentheses,callback:f.hitch(this,"_handleDelimiters","paren")}];p.loadActions(a);this.own(e.after(n,"onChange",f.hitch(this,"_updateActions")));this._updateActions()},_updateActions:function(){var c=!this._attributes.get("readonly")&&
this._equation.iterate({start:this._cursorController.getPosition().node,direction:b.UP,MathMatrix:function(c,b){a.isMatrix(c)&&b.stop(c)}}),d=!!c;"equationeditor.matrix.deletecolumn equationeditor.matrix.insertcolumnleft equationeditor.matrix.insertcolumnright equationeditor.matrix.insertrowbelow equationeditor.matrix.insertrowabove equationeditor.matrix.deleterow".split(" ").forEach(function(a){this._actionService.updateAction(a,{enabled:d,hideInContextMenu:!d})},this);var e=d&&a.isMatrixWithDelimiters(c,
"bracket"),c=d&&a.isMatrixWithDelimiters(c,"paren"),f=e||c;this._actionService.updateAction("equationeditor.matrix.removerdelimiters",{enabled:f,hideInContextMenu:!f});this._actionService.updateAction("equationeditor.matrix.useparentheses",{enabled:d&&!c,hideInContextMenu:!d||c});this._actionService.updateAction("equationeditor.matrix.usebrackets",{enabled:d&&!e,hideInContextMenu:!d||e})},_handleDeleteColumn:function(){var a=this._findMatrix();this._editManager.createBlock(f.hitch(this,function(c){var b=
a.matrix,d=a.row,e=a.column;if(1===b.cols)c.deleteNode(a.fullStructure.id);else{c.updateAttributes(b.id,{cols:b.cols-1});for(var f=0;f<b.rows;f+=1)c.deleteNode(b.children[b.cols*f+e].id);this._cursorController.setPosition({id:b.children[d*b.cols+Math.min(e,b.cols-1)].id,offset:0})}}))},_handleDeleteRow:function(){var a=this._findMatrix();this._editManager.createBlock(f.hitch(this,function(c){var b=a.matrix,d=a.row,e=a.column;if(1===b.rows)c.deleteNode(a.fullStructure.id);else{c.updateAttributes(b.id,
{rows:b.rows-1});for(var f=b.cols-1;0<=f;f-=1)c.deleteNode(b.children[b.cols*d+f].id);this._cursorController.setPosition({id:b.children[Math.min(d,b.rows-1)*b.cols+e].id,offset:0})}}))},_handleInsertColumn:function(a){var c=this._findMatrix();this._editManager.createBlock(f.hitch(this,function(b){var d=c.matrix,e=c.row,f=c.column+(-1===a?0:1);this._insertColumn(b,d,f,e);this._cursorController.setPosition({id:d.children[e*d.cols+f].id,offset:0})}))},_handleInsertRow:function(a){var c=this._findMatrix();
this._editManager.createBlock(f.hitch(this,function(b){var d=c.matrix,e=c.column,f=c.row+(-1===a?0:1);this._insertRow(b,d,e,f);this._cursorController.setPosition({id:d.children[f*d.cols+e].id,offset:0})}))},_findMatrix:function(){return this._equation.iterate({start:this._cursorController.getPosition().node,direction:b.UP,MathRow:f.hitch(this,function(a,c){var b=c.getParent();if("MathMatrix"===b.className){var d=c.getParentIndex(),e=d%b.cols,f=(d-e)/b.cols,g=this._equation.getParent(b);c.stop({fullStructure:g,
matrix:b,index:d,row:f,column:e})}})})},_handleTextInserted:function(c,b){if(!(","!==c&&";"!==c)){var d=this._equation.getParentAndIndex(b);if(!("MathRow"!==d.parent.className||d.parent.children.length!==d.index+1))if(d=this._equation.getParentAndIndex(d.parent),"MathMatrix"===d.parent.className){var e=d.parent;if(a.isMatrix(e)){var g=d.index%e.cols,n=(d.index-g)/e.cols;this._editManager.createBlock(f.hitch(this,function(a){a.deleteNode(b.id);","===c?(g===e.cols-1&&this._insertColumn(a,e,g+1,n),this._cursorController.setPosition({id:e.children[n*
e.cols+g+1].id,offset:0})):";"===c&&n===e.rows-1&&(this._insertRow(a,e,g,n+1),this._cursorController.setPosition({id:e.children[(n+1)*e.cols].id,offset:0}))}))}}}},_insertColumn:function(a,c,b,d){a.updateAttributes(c.id,{cols:c.cols+1});for(d=0;d<c.rows;d+=1)a.insertNode(c.id,c.cols*d+b,"MathRow",{"data-category":"placeholder"})},_insertRow:function(a,c,b,d){a.updateAttributes(c.id,{rows:c.rows+1});for(b=0;b<c.cols;b+=1)a.insertNode(c.id,c.cols*d+b,"MathRow",{"data-category":"placeholder"})},_maybeRemoveDelimiters:function(a,
c){var b=c.fullStructure;3===b.children.length&&(a.deleteNode(b.children[2].id),a.deleteNode(b.children[0].id))},_handleRemoveDelimiters:function(){var a=this._findMatrix();this._editManager.createBlock(f.hitch(this,function(c){this._maybeRemoveDelimiters(c,a)}))},_handleDelimiters:function(a){var c=this._findMatrix();this._editManager.createBlock(f.hitch(this,function(b){this._maybeRemoveDelimiters(b,c);var d=c.fullStructure;b.insertNode(d.id,0,"MathDelimiter",{"data-category":"static",symbolName:a+
"left"});b.insertNode(d.id,2,"MathDelimiter",{"data-category":"static",symbolName:a+"right"})}))}})})},"MW/equations/editor/actions/MouseAction":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-geometry dojo/has dojo/on MW/equations/editor/utils/EquationPlugin MW/equations/editor/utils/NodeUtils MW/equations/editor/utils/PriorityHandlerChain".split(" "),function(g,f,e,d,b,a,c,h){return g(a,{pluginId:"action.mouse",pluginFamily:"actions",pluginDependencies:"controller.caret controller.cursor controller.mouse model.equation view.keyhandler view.rootnode".split(" "),
constructor:function(a,c,b,d,e,h){this._caretController=a;this._cursorController=c;this._equation=d;this._rootNode=h;this._keyHandler=e;b.addMouseDown(f.hitch(this,"_handleMouseDown"),-1);b.addMouseUp(f.hitch(this,"_handleMouseUp"),10);b.addMouseMove(f.hitch(this,"_handleMouseMove"),-1);b.addMouseDoubleClick(f.hitch(this,"_handleDoubleClick"),-1)},_handleDoubleClick:function(a){a=this._cursorController.getPosition();if("atom"===c.categorizeNode(a.node)){if(0===a.offset){var b=this._equation.getPreviousSibling(a.node);
if(b)return this._makeSelection(b,a.node)}else if(a.offset===a.node.text.length&&(b=this._equation.getNextSibling(a.node)))return this._makeSelection(a.node,b);this._cursorController.setPosition({id:a.id,offset:0});this._cursorController.setPosition({id:a.id,offset:a.node.text.length},!0)}},_makeSelection:function(a,b){var d=this._equation.getParentAndIndex(a),e=d.index,f=d.index+1;0<e&&c.qualifiesAsOperator(a)&&(e-=1);f<d.parent.children.length-1&&c.qualifiesAsOperator(b)&&(f+=1);this._cursorController.setPosition({id:d.parent.id,
offset:e});this._cursorController.setPosition({id:d.parent.id,offset:f+1},!0)},_handleMouseDown:function(a){var c=e.position(this._rootNode,!0);this._caretController.fromXY(a.pageX-c.x,a.pageY-c.y,a.shiftKey);0===a.button&&(this._primaryButtonPressed=d("safari"))},_handleMouseMove:function(a){if(this._primaryButtonPressed||1===(a.buttons&1))a.preventDefault(),(a=this._caretController.getPositionFromAbsoluteXY(a.pageX,a.pageY))&&this._cursorController.setPosition(a,!0)},_handleMouseUp:function(a){window.setTimeout(f.hitch(this._keyHandler,
"focus"),0);0===a.button&&(this._primaryButtonPressed=!1)}})})},"MW/equations/editor/utils/PriorityHandlerChain":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/_base/lang"],function(g,f,e){return f(null,{constructor:function(){this._handlers=[]},add:function(d,b){var a={handler:d,priority:b||0};this._handlers.push(a);this._handlers.sort(function(a,b){return b.priority-a.priority});return{remove:e.hitch(this,function(){var c=this._handlers.indexOf(a);0<=c&&this._handlers.splice(c,
1)})}},fire:function(){var d=arguments;return g.some(this._handlers,function(b){return b.handler.apply(void 0,d)})}})})},"MW/equations/editor/actions/SmartEditingAction":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/equations/editor/utils/EquationPlugin MW/equations/editor/utils/NodeUtils MW/equations/editor/utils/Templates".split(" "),function(g,f,e,d,b,a){var c={"^":{templateName:"superscript"},_:{templateName:"subscript"},"/":{templateName:"frac"},"'":{templateName:"derivativePrime",
needsTransferPart:!0}};return g(d,{pluginId:"action.smartediting",pluginFamily:"actions",pluginDependencies:"action.inserttext api.attributes controller.cursor controller.editmanager controller.keyhandler helper.backspacetoundo helper.inserttemplate model.equation".split(" "),constructor:function(b,d,g,m,p,n,q,r){this._attributes=d;this._insertTemplateHelper=q;this._cursorController=g;this._editmanager=m;this._equation=r;this._backspaceToUndoHelper=n;Object.keys(c).forEach(function(a){this.own(p.add(a,
f.hitch(this,"_handleSmartEdit",a)))},this);this.own(e.after(b,"onTextInserted",f.hitch(this,"_handleTextInserted"),!0));this._templates=a.getById()},_handleSmartEdit:function(a){if(!this._cursorController.hasSelection()||this._attributes.get("readonly"))return!1;var b=c[a];this._editmanager.createBlock(f.hitch(this,function(a){1===this._insertTemplateHelper.insertTemplate(a,this._templates[b.templateName].template).length&&this._cursorController.setLogical(this._cursorController.getLogical()+1)}));
return!0},_handleTextInserted:function(a,d){var e=c[a];e&&(this._editmanager.createBlock(f.hitch(this,function(f){var g=e.templateName,n=this._findTransferPart(d);if(n||!c[a].needsTransferPart){if(n&&n.left===n.right-1){var q=n.node.children[n.left];if("MathScript"===q.className){var r={subscript:1,superscript:2}[g];if(r&&!q.children[r]){f.updateAttributes(q.id,{children:q.children.slice(0,r).concat(q.children.slice(r+1))});n=f.insertNode(q.id,r,"MathRow",{"data-category":b.CATEGORY.PLACEHOLDER_ROW});
this._cursorController.setPosition({id:n.id,offset:0});f.deleteNode(d.id);return}}}g=this._templates[g].template;f.deleteNode(d.id);1===this._insertTemplateHelper.insertTemplate(f,g,n).length&&this._cursorController.setLogical(this._cursorController.getLogical()+1)}})),this._backspaceToUndoHelper.start())},_findTransferPart:function(a){var c=this._equation.getParentAndIndex(a),d=this._equation.getPreviousSibling(a);if(d)return a=c.index-1,this._isParenthesis(d)&&(d=this._equation.getPreviousSibling(d),
b.qualifiesAsIdentifier(d)&&(a-=1)),{node:c.parent,left:a,right:c.index}},_isParenthesis:function(a){return"MathRow"===a.className&&2<a.children.length&&"MathDelimiter"===a.children[0].className&&"parenleft"===a.children[0].symbolName&&"MathDelimiter"===a.children[a.children.length-1].className&&"parenright"===a.children[a.children.length-1].symbolName}})})},"MW/equations/editor/actions/SmartParensAction":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/equations/editor/utils/EquationPlugin MW/equations/editor/utils/IteratorConstants MW/equations/editor/utils/NodeUtils MW/equations/editor/utils/Templates".split(" "),
function(g,f,e,d,b,a,c){var h={"(":["parenleft","parenright"],"[":["bracketleft","bracketright"],"{":["braceleft","braceright"]};return g(d,{pluginId:"action.smartparens",pluginFamily:"actions",pluginDependencies:"action.inserttext api.attributes controller.cursor controller.editmanager controller.keyhandler helper.backspacetoundo helper.insert helper.inserttemplate model.cursor model.equation".split(" "),constructor:function(a,b,d,h,g,q,r,s,t,u){this._attributes=b;this._insertTextAction=a;this._insertTemplateHelper=
s;this._backspaceToUndoHelper=q;this._insertHelper=r;this._cursorController=d;this._editmanager=h;this._equation=u;this.own(e.after(a,"onTextInserted",f.hitch(this,"_handleTextInserted"),!0));this.own(e.after(t,"onChange",f.hitch(this,"_handleCursorMove")));this._templates=c.getById();this.own(g.add("(",f.hitch(this,"_handleParen","(")));this.own(g.add("[",f.hitch(this,"_handleParen","[")));this.own(g.add("{",f.hitch(this,"_handleParen","{")));this._smartLeave=[]},_handleParen:function(a){if(!this._cursorController.hasSelection()||
this._attributes.get("readonly"))return!1;var c={"(":"parentheses","[":"brackets","{":"braces"}[a];this._editmanager.createBlock(f.hitch(this,function(a){a=this._insertTemplateHelper.insertTemplate(a,this._templates[c].template);a=this._findStructure(this._equation.getById(a[0].id));this._enableSmartLeave(a)}));return!0},_handleTextInserted:function(a,c){var b=h[a];if(b)return this._insertAutoCompleteParen(b,c);"MathDelimiter"===c.className&&this._checkAutoSkipParen(c)},_handleCursorMove:function(){if(0!==
this._smartLeave.length){var a=this._cursorController.getPosition();this._equation.iterate({from:a.node,direction:b.UP,structure:f.hitch(this,function(a,c){var b=this._smartLeave.indexOf(a.id);0<=b&&(this._smartLeave.splice(b+1),c.stop())}),MathRoot:f.hitch(this,function(){this._smartLeave=[]})})}},_enableSmartLeave:function(a){this._smartLeave.push(a.id)},_checkAutoSkipParen:function(a){if(0!==this._smartLeave.length){var c=this._equation.getParentAndIndex(a);if(c.index===c.parent.children.length-
1){var b=c.parent.parent;this._smartLeave[this._smartLeave.length-1]===b.id&&(this._smartLeave.pop(),this._editmanager.createBlock(f.hitch(this,function(d){d.deleteNode(a.id);c=this._equation.getParentAndIndex(b);this._cursorController.setPosition({id:c.parent.id,offset:c.index+1})})))}}},_insertAutoCompleteParen:function(a,c){this._editmanager.createBlock(f.hitch(this,function(b){var d=this._equation.getParentAndIndex(c),d=this._insertHelper.insertTemplate(b,["MathRow",{"data-category":"structure"},
[["MathDelimiter",{symbolName:a[0],"data-category":"static"}],["MathRow",{"data-category":"placeholder","data-cursor":0}],["MathDelimiter",{symbolName:a[1],"data-category":"static"}]]],d.parent,d.index),d=this._findStructure(this._equation.getById(d[0].id));this._enableSmartLeave(d);b.deleteNode(c.id)}));this._backspaceToUndoHelper.start()},_findStructure:function(a){return this._equation.iterate({from:a,direction:b.UP,structure:function(a,c){c.stop(a)}})}})})},"MW/equations/editor/actions/SmartSymbolsAction":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/equations/editor/utils/EquationPlugin MW/equations/editor/utils/Templates MW/equations/renderer/model/Symbols".split(" "),
function(g,f,e,d,b,a){var c={mid:{mid:"parallel","\x3d":"models","-":"vdash"},"~":{"\x3d":"neq"},"-":{"\x3e":"rightarrow",mid:"dashv"},"\x3c":{"\x3d":"leq","\x3e":"neq","-":"leftarrow"},"\x3d":{"\x3e":"Rightarrow"},"\x3e":{"\x3d":"geq"},leq:{"\x3e":"Leftrightarrow"},"!":{"\x3d":"neq","\x3c":"notlt","\x3e":"notgt"},notlt:{"\x3d":"notleq"},notgt:{"\x3d":"notgeq"},leftarrow:{"-":"longleftarrow","\x3e":"leftrightarrow"},longleftarrow:{"\x3e":"longleftrightarrow"}};return g(d,{pluginId:"action.smartsymbols",
pluginFamily:"actions",pluginDependencies:["action.inserttext","controller.editmanager","model.equation"],constructor:function(a,c,d){this._editmanager=c;this._equation=d;this.own(e.after(a,"onTextInserted",f.hitch(this,"_handleTextInserted"),!0));this._templates=b.getById()},_handleTextInserted:function(a,b){if("symbol"===b.kind){var d=this._equation.getPreviousSibling(b);if(d&&"symbol"===d.kind){var e=d.symbolName||d.text,g=c[e],e=b.symbolName||b.text;(g=g&&g[e])&&this._editmanager.createBlock(f.hitch(this,
function(a){a.deleteNode(b.id);a.updateAttributes(d.id,{symbolName:g})}))}}}})})},"MW/equations/editor/actions/TabAction":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/_base/lang","MW/equations/editor/utils/EquationPlugin","MW/equations/editor/utils/NodeUtils"],function(g,f,e,d,b){return f(d,{pluginId:"action.tab",pluginFamily:"actions",pluginDependencies:["controller.cursor","controller.keyhandler","external.actionservice","model.equation"],constructor:function(a,c,b,d){this._cursorController=
a;this._equation=d;a=[{id:"equationeditor.jumptoplaceholder",key:"tab",keyPriority:-1,enabled:!0,callback:e.hitch(this,"_handleTab",!0)},{id:"equationeditor.jumptopreviousplaceholder",key:"shift_tab",keyPriority:-1,enabled:!0,callback:e.hitch(this,"_handleTab",!1)}];b.loadActions(a)},_handleTab:function(a){if(a=this._searchPlaceholderAtom(a))return this._cursorController.setPosition({id:a.id,offset:0}),!0},_searchPlaceholderAtom:function(a){var c,b,d=this._cursorController.getPosition();this._equation.iterate({"placeholder-atom":function(e,
f){if(d.id!==e.id){if(b||!a)c=e;b&&a?f.stop():c||(c=e)}},all:function(e,f){d.id===e.id&&(b=!0,c&&!a&&f.stop())}});return c}})})},"MW/equations/editor/actions/TabLeavesStructureAction":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/lang MW/equations/editor/utils/EquationPlugin MW/equations/editor/utils/IteratorConstants MW/equations/editor/utils/NodeUtils".split(" "),function(g,f,e,d,b,a){return f(d,{pluginId:"action.tableavesstructure",pluginFamily:"actions",pluginDependencies:["controller.cursor",
"controller.keyhandler","external.actionservice","model.equation"],constructor:function(a,b,d,f){this._cursorController=a;this._equation=f;a=[{id:"equationeditor.leavestructure",enabled:!0,callback:e.hitch(this,"_leaveStructure")}];d.loadActions(a);this.own(b.add("tab",e.hitch(this,"_leaveStructure"),-5))},_leaveStructure:function(){var a=this._cursorController.getPosition();this._equation.iterate({start:a.node,direction:b.UP,structure:e.hitch(this,function(a,c){this._cursorController.setPosition({id:c.getParent().id,
offset:c.getParentIndex()+1});c.stop()})});return!0}})})},"MW/equations/editor/actions/TextFormattingAction":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/equations/editor/utils/EquationPlugin MW/equations/editor/utils/MathVariant MW/equations/editor/utils/NodeUtils".split(" "),function(g,f,e,d,b,a){return g(d,{pluginId:"action.textformatting",pluginFamily:"actions",pluginDependencies:"action.inserttext controller.cursor controller.editmanager controller.selection external.actionservice helper.insert model.cursor model.equation".split(" "),
constructor:function(a,b,d,g,m,p,n,q){this._insertHelper=p;this._cursorController=b;this._editmanager=d;this._selectionController=g;this._actionService=m;this._equation=q;a=[{id:"equationeditor.format.bold",enabled:!1,key:"ctrl_b",platformKey:{mac:"meta_b"},callback:f.hitch(this,"_handleBold")},{id:"equationeditor.format.italic",enabled:!1,key:"ctrl_i",platformKey:{mac:"meta_i"},callback:f.hitch(this,"_handleItalic")}];m.loadActions(a);this.own(e.after(p,"prepareTextAttributes",f.hitch(this,"_handlePrepareTextAttributes")));
this.own(e.after(n,"onChange",f.hitch(this,"_handleCursorMove")));this.own(e.after(m,"onRemoteActionChange",f.hitch(this,"_handleActionChange"),!0))},_handleActionChange:function(a){if("selected"===a.key)switch(a.id){case "equationeditor.format.bold":this._applyStyle("bold",!a.newValue);break;case "equationeditor.format.italic":this._applyStyle("italic",!a.newValue)}},_handleCursorMove:function(){var c=!1,b=!1,d=!1,e=!1,f=!1;if(this._cursorController.hasSelection())this._selectionController.iterateSelection({atom:function(a,
g){if("id"===a.kind){var p=a.mathvariant?a.mathvariant.split("-"):[];b=(c=c||0<=p.indexOf("bold"))||0<=p.indexOf("italic");d=d||0>p.indexOf("bold");e=e||0>p.indexOf("italic");c&&d&&(b&&e)&&g.stop();f=!0}}}),c=!d,b=!e;else{var g=this._cursorController.getPosition().node;"atom"===a.categorizeNode(g)&&"id"===g.kind&&(g=g.mathvariant?g.mathvariant.split("-"):[],c=0<=g.indexOf("bold"),b=0<=g.indexOf("italic"),f=!0)}this._actionService.updateAction("equationeditor.format.bold",{enabled:f,selected:c&&f});
this._actionService.updateAction("equationeditor.format.italic",{enabled:f,selected:b&&f})},_handlePrepareTextAttributes:function(a,b){if("id"!==a.kind)return a;a.mathvariant=a.mathvariant||b&&b.mathvariant||"italic";return a},_handleBold:function(){this._applyStyleFromAction("equationeditor.format.bold","bold");return!0},_handleItalic:function(){this._applyStyleFromAction("equationeditor.format.italic","italic");return!0},_applyStyleFromAction:function(a,b){var d=this._actionService.getAction(a),
e=d.selected;this._actionService.updateAction(a,{selected:!d.selected});this._applyStyle(b,e)},_applyStyle:function(a,b){var d=this._cursorController.hasSelection();this._editmanager.createBlock(f.hitch(this,function(e){if(d)this._applyStyleToSelection(e,a,b);else{var f=this._cursorController.getPosition();this._applyStyleToAtom(e,a,b,f.node)}}))},_applyStyleToSelection:function(a,b,d){this._selectionController.iterateSelection({atom:f.hitch(this,"_applyStyleToAtom",a,b,d)})},_applyStyleToAtom:function(a,
d,e,f){if("id"===f.kind){var g=f.mathvariant,g=e?b.remove(g,d):b.add(g,d);a.updateAttributes(f.id,{mathvariant:g})}}})})},"MW/equations/editor/actions/UndoRedoAction":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/equations/editor/utils/EquationPlugin"],function(g,f,e,d){return g(d,{pluginId:"action.undoredo",pluginDependencies:["controller.undoredo","external.actionservice"],constructor:function(b,a){this._undoRedoController=b;this._actionService=a;var c=[{id:"equationeditor.undo",
enabled:b.canUndo(),key:"ctrl_z",platformKey:{mac:"meta_z"},callback:function(){b.undo();return!0}},{id:"equationeditor.redo",enabled:b.canRedo(),key:"ctrl_y",platformKey:{mac:"meta_shift_z"},callback:function(){b.redo();return!0}}];a.loadActions(c);this.own(e.after(b,"onChange",f.hitch(this,"_updateAttributes")))},_updateAttributes:function(){this._actionService.updateAction("equationeditor.undo",{enabled:this._undoRedoController.canUndo()});this._actionService.updateAction("equationeditor.redo",
{enabled:this._undoRedoController.canRedo()})}})})},"MW/equations/editor/actions/VisualCursorAction":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/_base/lang","MW/equations/editor/utils/CursorUtils","MW/equations/editor/utils/NodeUtils"],function(g,f,e,d,b){return f(null,{pluginId:"action.visualcursor",pluginFamily:"actions",pluginDependencies:["controller.cursor","controller.selection","external.actionservice","model.equation"],constructor:function(a,c,b,d){this._cursorController=
a;this._selectionController=c;this._equation=d;a=[{id:"equationeditor.left.visual",enabled:!0,keyPriority:1,key:"left",callback:e.hitch(this,"_handleLinearMove",-1)},{id:"equationeditor.selectleft.visual",enabled:!0,keyPriority:1,key:"shift_left",callback:e.hitch(this,"_handleLinearMove",-1,!0)},{id:"equationeditor.right.visual",enabled:!0,keyPriority:1,key:"right",callback:e.hitch(this,"_handleLinearMove",1)},{id:"equationeditor.selectright.visual",enabled:!0,keyPriority:1,key:"shift_right",callback:e.hitch(this,
"_handleLinearMove",1,!0)}];b.loadActions(a)},_handleLinearMove:function(a,c){if(this._cursorController.hasSelection())return!1;var d,e=this._cursorController.getPosition(),f;d=e.node;e=e.offset;b.categorizeNode(d)===b.CATEGORY.ATOM?-1===a&&0===e?(d=this._equation.getParentAndIndex(d),f=d.parent,e=d.index):1===a&&e===d.text.length&&(d=this._equation.getParentAndIndex(d),f=d.parent,e=d.index+1):b.categorizeNode(d)===b.CATEGORY.PLACEHOLDER_ATOM?(d=this._equation.getParentAndIndex(d),f=d.parent,e=-1===
a?0:1):b.categorizeNode(d)===b.CATEGORY.PLACEHOLDER_ROW&&(f=d);var g;f&&(g=this._moveInRow(f,e,a));if(g)this._cursorController.setPosition(g,c);else return!1;return!0},_moveInRow:function(a,c,d){var e;if(-1===d&&0===c||1===d&&c===a.children.length){c=this._equation.getParentAndIndex(a);a=c.parent;var f=c.index;a&&(c="_leaveRowIn"+a.className,this[c]&&(e=this[c].call(this,a,d,f)));return e}c+=-1===d?-1:0;e=a.children[c];if(b.categorizeNode(e)===b.CATEGORY.STATIC)return 1===d&&(c+=1),this._moveInRow(a,
c,d);c="_enter"+e.className;if(this[c])return this[c].call(this,e,d)},_enterMathRow:function(a,c){return b.categorizeNode(a)===b.CATEGORY.PLACEHOLDER_ROW?{id:a.id,offset:1===c?0:-1}:this._moveInRow(a,-1===c?a.children.length:0,c)},_leaveRowInMathRow:function(a,c,d){1===c&&(d+=1);return b.categorizeNode(a)===b.CATEGORY.PLACEHOLDER_ROW?{id:a.id,offset:d}:this._moveInRow(a,d,c)},_enterMathFraction:function(a,c){return this._tryChildren(a,c,[0,1])},_leaveRowInMathFraction:function(a,c,b){return a.bevelled&&
(1===c&&0===b||-1===c&&1===b)?this._tryChildren(a,c,[1-b]):this._leaveNode(a,c)},_enterMathScript:function(a,c){return a.isStacked()||1===c?this._tryChildren(a,c,[0,2,1]):this._tryChildren(a,c,[2,1,0])},_leaveRowInMathScript:function(a,c,b){if(a.isStacked())return this._leaveNode(a,c);if(1===c)return 0===b?this._tryChildren(a,c,[2,1]):this._leaveNode(a,c);if(-1===c)return 0!==b?this._tryChildren(a,c,[0]):this._leaveNode(a,c)},_enterMathRadical:function(a,c){return-1===c?this._tryChildren(a,c,[0,1]):
this._tryChildren(a,c,[1,0])},_leaveRowInMathRadical:function(a,c,b){return 1===c?1===b?this._tryChildren(a,c,[0]):this._leaveNode(a,c):0===b?this._tryChildren(a,c,[1]):this._leaveNode(a,c)},_enterMathMultiScript:function(a,c){var b=this._getMultiScriptPositions(a,c);return this._tryChildren(a,c,b)},_leaveRowInMathMultiScript:function(a,c,b){var d=this._getMultiScriptPositions(a,c);b=d.lastIndexOf(b);return this._tryChildren(a,c,d.slice(b+2))},_getMultiScriptPositions:function(a,c){for(var b=[],d=
2*a.numPostPairs+1;d<a.children.length;d+=2)b.push(d+1),b.push(d);b.push(0);b.push(0);for(d=1;d<2*a.numPostPairs;d+=2)b.push(d),b.push(d+1);-1===c&&b.reverse();return b},_leaveNode:function(a,c){var d=this._equation.getParentAndIndex(a),e=d.index+(-1===c?0:1),d=d.parent;return b.categorizeNode(d)!==b.CATEGORY.PLACEHOLDER_ROW?this._moveInRow(d,e,c):{id:d.id,offset:e}},_tryChildren:function(a,c,d){for(var e=0;e<=d.length;e+=1){var f=a.children[d[e]];if(f&&b.categorizeNode(f)!==b.CATEGORY.STATIC)return this._enterMathRow(f,
c)}return this._leaveNode(a,c)}})})},"MW/equations/editor/api/AttributesAPI":function(){define(["dojo/_base/declare","dojo/aspect"],function(g,f){return g(null,{pluginId:"api.attributes",pluginFamily:"api",pluginDependencies:[],constructor:function(){this._values={}},set:function(e,d){this._values[e]!==d&&this._set(e,d)},get:function(e){return this._values[e]},_set:function(e,d){this._values[e]=d},observe:function(e,d){return f.after(this,"_set",function(b,a){b===e&&d.call(null,a)},!0)}})})},"MW/equations/editor/api/CursorAPI":function(){define(["dojo/_base/declare",
"dojo/aspect"],function(g,f){return g(null,{pluginId:"api.cursor",pluginFamily:"api",pluginDependencies:["view.caret"],constructor:function(e){this._caret=e},hide:function(){this._caret.hide("api")},show:function(e){this._caret.show("api")}})})},"MW/equations/editor/api/EquationAPI":function(){define(["dojo/_base/declare"],function(g){return g(null,{pluginId:"api.equation",pluginFamily:"api",pluginDependencies:["controller.editmanager","model.equation"],constructor:function(f,e){this._editController=
f;this._equation=e},fromMathML:function(f){this._editController.setEquation(f)},fromTeX:function(f){this._editController.setEquation(f,"tex")},toMathML:function(){return this._equation.serializeToMathMl()},toTeX:function(){return this._equation.serializeToTeX()},setDisplayStyle:function(f){this._equation.getRoot().inline!==!f&&(this._equation.getRoot().inline=!f,this._equation.changed())},getDisplayStyle:function(){return!this._equation.getRoot().inline}})})},"MW/equations/editor/controller/CaretController":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/query MW/equations/editor/utils/CaretUtilities MW/equations/editor/utils/EquationPlugin MW/equations/editor/utils/IteratorConstants MW/equations/editor/utils/NodeUtils".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p){return f(l,{pluginId:"controller.caret",pluginDependencies:"api.attributes controller.cursor controller.selection model.cursor model.equation view.caret view.helper view.renderer view.rootnode view.selection".split(" "),constructor:function(a,c,b,f,h,g,k,l,m,p){this._attributes=a;this.own(a.observe("active",e.hitch(this,"_handleActiveChange")));this.own(a.observe("disabled",e.hitch(this,"_handleDisabledChange")));this.own(a.observe("readonly",e.hitch(this,"_handleReadonlyChange")));
this._cursorController=c;this._selectionController=b;this._cursor=f;this._equation=h;this._caret=g;this._rootNode=m;this._viewHelper=k;this._selection=p;this.own(d.after(this._cursor,"onChange",e.hitch(this,"redraw")));this.own(d.after(l,"onRedraw",e.hitch(this,"redraw")))},_handleActiveChange:function(a){a?this._caret.show("blurred"):this._caret.hide("blurred")},_handleDisabledChange:function(a){a?(this._caret.hide("disabled"),this._selection.hide()):(this._caret.show("disabled"),this.redraw())},
_handleReadonlyChange:function(a){this._caret.setReadonly(a)},beforeCaretRedraw:function(){},fromXY:function(a,c,b){(a=this.getPositionFromXY(a,c))&&this._cursorController.setPosition(a,b)},getPositionFromXY:function(a,b){var d=c.position(this._rootNode,!0);return this.getPositionFromAbsoluteXY(a+d.x,b+d.y)},_getScrollOffset:function(){return{x:window.hasOwnProperty("scrollX")?window.scrollX:document.documentElement.scrollLeft,y:window.hasOwnProperty("scrollY")?window.scrollY:document.documentElement.scrollTop}},
getPositionFromAbsoluteXY:function(a,c){var d=this._viewHelper.getRootGeometry();a<d.x?a=d.x:a>d.x+d.w-1&&(a=d.x+d.w-1);c<d.y?c=d.y:c>d.y+d.h-1&&(c=d.y+d.h-1);d=this._getScrollOffset();if(d=document.elementFromPoint(a-d.x,c-d.y)){if(b.contains(d,"selection")||b.contains(d,"cursor")){var e=d.style.display;d.style.display="none";var f=this.getPositionFromAbsoluteXY(a,c);d.style.display=e;return f}if(this._rootNode.contains(d)){if(p.isEmptyEquation(this._equation.getRoot()))return{id:this._equation.getRoot().children[0].children[0].id,
offset:0};this._searched=[];d=this._searchFromNode(d,a,c);this._searched=void 0;return d&&this._cursorController.fixPosition(d)}}},drawCaretAt:function(a){if(this._viewHelper.isAttachedToDocument())return a=this._getCoordinatesFromPosition(a),this._caret.setXY(a.x,a.y,a.height),a},_searchFromNode:function(a,b,d){for(var e=[];a&&a!==this._rootNode;){e=e.concat(this._searchChildren(a,b,d));if(0<e.length){var f=c.position(a,!0);if(b>f.x&&d>f.y&&b<f.x+f.w&&d<f.y+f.h)break}this._searched.push(a);a=a.parentNode}if(0<
e.length)return a.id&&(a=this._equation.getById(a.id),"placeholder"!==p.categorizeNode(a)&&(a=this._equation.iterate({from:a,direction:m.UP,placeholder:function(a,c){c.stop(a)}}))&&e.push(this._findCursorPositionInRow(a,b,d))),e=e.sort(function(a,c){return a.distance-c.distance}),{id:e[0].id,offset:e[0].offset}},_searchChildren:function(a,c,b){var d,e,f=[];if(a.id){e=this._equation.getById(a.id);if(!this._nodeClickable(e))return[];d=p.categorizeNode(e);if("atom"===d)return[this._findCursorPositionInAtom(e,
c,b)];"placeholder"===d&&f.push(this._findCursorPositionInRow(e,c,b))}0<=a.children.length&&(a=this._getSearchableChildren(a),a=this._sortByDistance(a,c,b),g.forEach(a,function(a){f=f.concat(this._searchChildren(a.node,c,b))},this));return f},_getSearchableChildren:function(a){return g.filter(a.children,function(a){if(0<=this._searched.indexOf(a))return!1;if(!a.id)return!0;a=this._equation.getById(a.id);return this._nodeClickable(a)},this)},_sortByDistance:function(a,b,d){return g.map(a,function(a){var e=
c.position(a,!0);return{node:a,distance:this._distanceTo(e,b,d)}},this).sort(function(a,c){return a.distance-c.distance})},_distanceTo:function(a,c,b){var d=0,e=0;c<=a.x?d=a.x-c:c>=a.x+a.w&&(d=c-(a.x+a.w));b<=a.y?e=a.y-b:b>=a.y+a.h&&(e=b-(a.y+a.h));return d+e},_nodeClickable:function(a){for(;a;){if("static"===p.categorizeNode(a))return!1;a=this._equation.getParent(a)}return!0},_findCursorPositionInRow:function(a,c,b){if(0===a.children.length){var d=this._viewHelper.getNodeGeometry(a);return{id:a.id,
offset:0,distance:this._distanceTo(e.mixin(d,{w:1}),c,b)}}var f;for(f=0;f<a.children.length&&!(d=this._viewHelper.getNodeGeometry(a.children[f]),c<d.x+d.w/2);f+=1);return{id:a.id,offset:f,distance:this._distanceTo(e.mixin(d,{w:1,x:f<a.children.length?d.x:d.x+d.w}),c,b)}},_findCursorPositionInAtom:function(a,c,b){var d=this._viewHelper.getNodeGeometry(a),f=c-d.x,f=Math.min(Math.max(0,0<d.w?f/d.w:0),1),h=Math.max(0,Math.floor((a.text.length+1)*f));h>a.text.length&&(h=a.text.length);return{id:a.id,offset:h,
distance:this._distanceTo(e.mixin(d,{w:1,x:d.x+d.w*f}),c,b)}},redraw:function(){if(!this._attributes.get("disabled")){this.beforeCaretRedraw();var a=this._cursor.getPosition();if((a=this.drawCaretAt(a))&&this._cursor.hasSelection()){var c=this._selectionController.getSelectionSpan(),b=k.coordinatesFromSelection(c,this._rootNode);c.reversed?(b.w=b.w+b.x-(a.x-1),b.x=a.x+1):b.w=a.x-b.x;this._selection.show();this._selection.set(b.x,b.y,b.w,b.h)}else this._selection.hide()}},_getCoordinatesFromPosition:function(a){return k.coordinatesFromPosition(a,
this._rootNode)||{x:0,y:0,height:0}}})})},"MW/equations/editor/utils/CaretUtilities":function(){define(["dojo/dom-construct","dojo/dom-geometry","dojo/dom-style","dojo/query","MW/equations/editor/utils/NodeUtils"],function(g,f,e,d,b){function a(a,c){var b=d("*[id\x3d'"+a.id+"']",c);if(0!==b.length){var b=b[0],e=a.offset;if(0<b.children.length||0===b.childNodes.length)0===e?b=0===b.childNodes.length?h(b):h(b.firstElementChild):(b=b.childNodes[e-1])?(b=g.place("\x3cspan\x3e\x26#x200b;\x3c/span\x3e",
b,"after"),e=h(b),g.destroy(b),b=e):b=void 0;else if(0===e)b=h(b);else{var n=b,b=n.cloneNode();n.parentNode.replaceChild(b,n);b.innerHTML="";var q=g.create("span",{textContent:n.textContent.substr(0,e)},b);g.create("span",{textContent:n.textContent.substr(e)},b);e=h(q,!0);b.parentNode.replaceChild(n,b);b=e}b&&(e=f.position(c,!0),b.x-=e.x,b.y-=e.y);return b}}function c(a,c){var b=d("*[id\x3d'"+a.id+"']",c);if(0!==b.length){var b=h(b[0]),e=f.position(c,!0);b.x-=e.x;b.y-=e.y;return b}}function h(a,c){var b=
a;a=b;var d=!1;0===a.childNodes.length&&(d=!0,a=b.cloneNode(),b.parentNode.replaceChild(a,b),a.innerHTML="\x26nbsp;");var h=f.position(a,!0);d&&(a.parentNode.replaceChild(b,a),a=b);b=e.getComputedStyle(a);h.x+=parseInt(b.paddingLeft,10);h.w-=parseInt(b.paddingLeft,10);d&&(h.w=0);h.w+=parseInt(b.marginLeft,10);h.x-=parseInt(b.marginLeft,10);return{x:h.x+(c?h.w:0),y:h.y,w:h.w,h:h.h,height:h.h}}return{coordinatesFromNode:c,coordinatesFromPosition:a,coordinatesFromSelection:function(d,e){var f=d.node;
if("atom"===b.categorizeNode(f)){var h=a({id:d.id,offset:d.left},e)||{x:0,y:0,height:0},g=a({id:d.id,offset:d.right},e)||{x:0,y:0,height:0},f=Math.min(h.x,g.x),q=Math.min(h.y,g.y),r=Math.max(h.height,g.height),h=Math.max(h.x,g.x)-f;return{x:f,y:q,w:h,h:r}}for(var f=f.children,r=[],h=[],g=[],s=[],t=d.left;t<d.right&&t<f.length;t+=1)q=c(f[t],e),r.push(q.x),g.push(q.x+q.w),h.push(q.y),s.push(q.y+q.h);q={x:Math.min.apply(void 0,r),y:Math.min.apply(void 0,h)};q.w=Math.max.apply(void 0,g)-q.x;q.h=Math.max.apply(void 0,
s)-q.y;return q}}})},"MW/equations/editor/controller/ContextMenuController":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-class MW/equations/editor/utils/CursorUtils MW/equations/editor/utils/EquationContextMenuModel MW/equations/editor/utils/EquationPlugin".split(" "),function(g,f,e,d,b,a,c){return g(c,{pluginId:"controller.contextmenu",pluginDependencies:"controller.caret controller.focus controller.mouse controller.selection external.actionservice external.contextmenugenerator model.equation view.rootnode".split(" "),
constructor:function(c,b,d,g,p,n,q,r){this._caretController=c;this._focusController=b;this._actionService=p;this._selectionController=g;this._equation=q;this._rootNode=r;d.addMouseDown(f.hitch(this,"_handleMouseDown"),1);if(this._contextMenu=n.createContextMenu(this._rootNode,new a(this._actionService))){var s;e.after(this._contextMenu,"onOpen",f.hitch(this,function(){s=s||this._focusController.add("context-menu")}));e.after(this._contextMenu,"onClose",function(){s&&s.remove();s=null})}},_handleMouseDown:function(a){if(2===
(a.button&2)&&this._selectionController.hasSelection()&&(a=this._caretController.getPositionFromAbsoluteXY(a.pageX,a.pageY))){a=b.logicalFromPosition(a,this._equation.getRoot());var c=this._selectionController.getSelectionLogical();return c.left<=a||a<=c.right}},destroy:function(){this._contextMenu&&this._contextMenu.destroy()}})})},"MW/equations/editor/utils/EquationContextMenuModel":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/plugins/contextmenu/DocumentContextMenuModel"],
function(g,f,e){return g(e,{_getActionInfo:function(d){var b=this._actionService.getAction(d);if(b&&!b.hideInContextMenu)return this.inherited(arguments)}})})},"MW/equations/editor/controller/CursorController":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/lang MW/equations/editor/utils/CursorUtils MW/equations/editor/utils/IteratorConstants MW/equations/editor/utils/NodeUtils".split(" "),function(g,f,e,d,b,a){return f(null,{pluginId:"controller.cursor",pluginDependencies:["controller.selection",
"model.cursor","model.equation"],constructor:function(a,b,d){this._selectionController=a;this._cursor=b;this._equation=d;this.setLogical(0)},availableCursorPositions:function(){var a=this._equation.getRoot();return d.availableCursorPosition(a)},setLogical:function(a,b){0>a&&(a=0);var e=this._equation.getRoot(),f=d.positionFromLogical(a,e);f||(a=d.availableCursorPosition(e)-1,f=d.positionFromLogical(a,e));this.setPosition(f,b)},getLogical:function(){var a=this._cursor.getPosition();return d.logicalFromPosition(a,
this._equation.getRoot())},getAnchorLogical:function(){var a=this._cursor.getAnchor();return a&&d.logicalFromPosition(a,this._equation.getRoot())},hasSelection:function(){return this._cursor.hasSelection()},setPosition:function(c,b){c={id:c.id,offset:c.offset};var e=this._equation.getById(c.id);0>c.offset&&(c.offset+=d.nodeLength(e)+1);b&&(a.isMultiLineEquation(this._equation.getRoot())&&(c=this._fixPositionInLine(c)),e=this._cursor.hasSelection()?this._cursor.getAnchor():this._cursor.getPosition(),
e=this._selectionController.getSpan(e,c),c={id:e.id,offset:e.reversed?e.left:e.right},this._equation.getById(c.id));c=this.fixPosition(c);this._cursor.setPosition(c,b)},setSelectionLogical:function(a,b){this._cursor.pauseEvents("selecting");this.setLogical(a);this.setLogical(b,!0);this._cursor.unpauseEvents("selecting")},_fixPositionInLine:function(a){var b=this.getPosition(),d=this._equation.getById(a.id),b=this._getLineOf(b.node),d=this._getLineOf(d);if(b!==d){var e=this._equation.getRoot().children[0].children[0].children[b];
a.id=e.id;a.offset=b<d?e.children.length:0;a=this.fixPosition(a)}return a},_getLineOf:function(a){return this._equation.iterate({from:a,direction:b.UP,MathMatrix:e.hitch(this,function(a,c){var b=this._equation.getParentAndIndex(a);"MathRoot"===this._equation.getParent(b.parent).className&&(b=this._equation.getParentAndIndex(c.getLastNode()),c.stop(b.index))})})||0},fixPosition:function(c){var b=this._equation.getById(c.id),e=a.categorizeNode(b);if("placeholder"===e)c=d.adaptPositionToAtoms(c,b.children[c.offset-
1],b.children[c.offset]);else if("atom"===e)if(0===c.offset){if((e=this._equation.getPreviousSibling(b))&&"atom"===a.categorizeNode(e)&&d.shouldCursorMergeToLeft(e,b))c.id=e.id,c.offset=e.text.length}else if(c.offset===b.text.length&&(e=this._equation.getNextSibling(b))&&"atom"===a.categorizeNode(e)&&!d.shouldCursorMergeToLeft(b,e))c.id=e.id,c.offset=0;return c},getPosition:function(){var a=this._cursor.getPosition();a.node=this._equation.getById(a.id);return a}})})},"MW/equations/editor/controller/EditManager":function(){define(["dojo/_base/declare",
"MW/equations/editor/controller/EditBlock","MW/equations/editor/model/UndoRedoStep","mw-log/Log"],function(g,f,e,d){return g(null,{pluginId:"controller.editmanager",pluginDependencies:["controller.cursor","model.cursor","model.equation","controller.placeholderatomcontroller","controller.livecursor"],constructor:function(b,a,c){this._cursorController=b;this._equationModel=c;this._cursor=a},createBlock:function(b){this.beforeBlock();var a=this._cursor.getState();this._equationModel.pauseEvents();this._cursor.pauseEvents();
var c=[],h=new f(this._equationModel,c);try{b.call(void 0,h)}catch(g){d.error("Error while executing block: "+g)}this._equationModel.unpauseEvents();this._cursor.unpauseEvents();0<c.length&&(b=new e(c,a,this._cursor.getState(),this._cursor,this._equationModel),this.onNewStep(b));this.afterBlock()},beforeBlock:function(){},afterBlock:function(){},onNewStep:function(b){},onReset:function(){},setEquation:function(b,a){this._equationModel.pauseEvents();this._cursor.pauseEvents();this.onReset();this._equationModel.setEquation(b,
a);this._cursorController.setLogical(0);this._equationModel.unpauseEvents();this._cursor.unpauseEvents()}})})},"MW/equations/editor/controller/EditBlock":function(){define("dojo/_base/declare dojo/_base/lang MW/equations/editor/commands/DeleteNodeCommand MW/equations/editor/commands/InsertNodeCommand MW/equations/editor/commands/MoveChildrenCommand MW/equations/editor/commands/ReplaceTextCommand MW/equations/editor/commands/UpdateAttributesCommand".split(" "),function(g,f,e,d,b,a,c){return g(null,
{constructor:function(a,c){this._equation=a;this._actions=c},deleteNode:function(a){this._equation.beforeDeleteNode(this,a);this._storeAndExecute(new e(a))},insertNode:function(a,c,b,e){e=f.mixin({},e);b=this._storeAndExecute(new d(a,c,b,e));this._equation.afterNodeInserted(this,a,c,b);return b},replaceNode:function(a,c,b){var d=this._equation.getById(a),d=this._equation.getParentAndIndex(d);this.deleteNode(a);return this.insertNode(d.parent.id,d.index,c,b)},replaceText:function(c,b,d,e){this._equation.beforeReplaceText(this,
c,b,d,e);this._storeAndExecute(new a(c,b,d,e))},updateAttributes:function(a,b){this._equation.beforeUpdateAttributes(this,a,b);this._storeAndExecute(new c(a,b))},moveChildren:function(a,c,d,e,f){e=e||0;f=f||this._equation.getById(d).children.length;this._storeAndExecute(new b(a,c,d,e,f));this._equation.afterChildrenMoved(this,a,c,d,e,f)},mergeNodes:function(a,c){this._equation.beforeMergeNodes(this,a,c);var b=this._equation.getById(a),d=this._equation.getById(c);this.updateAttributes(b.id,{text:b.text+
d.text});this.deleteNode(c)},_storeAndExecute:function(a){var c=a.execute(this._equation);this._actions.push(a);return c}})})},"MW/equations/editor/commands/DeleteNodeCommand":function(){define(["dojo/_base/declare"],function(g){return g(null,{constructor:function(f){this._targetId=f},execute:function(f){this._removedNode=f.getById(this._targetId);var e=f.getParent(this._removedNode);this._parentId=e.id;this._deletedIndex=e.children.indexOf(this._removedNode);e.children.splice(this._deletedIndex,
1);f.changed()},unexecute:function(f){f.getById(this._parentId).children.splice(this._deletedIndex,0,this._removedNode);f.changed()}})})},"MW/equations/editor/commands/InsertNodeCommand":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/equations/renderer/model/utils/NodeFactory","MW/rtc/model/importers/Base","mw-utils/Utils"],function(g,f,e,d,b){return g(null,{constructor:function(a,c,d,e){this._targetId=a;this._offset=c;this._name=d;this._attributes=e||{};this._attributes.id||(this._attributes.id=
b.generateUuid())},execute:function(a){var c=a.getById(this._targetId),b=this._createNode();b&&(b.parent=c);c.children.splice(this._offset,0,b);a.changed();return b},unexecute:function(a){a.getById(this._targetId).children.splice(this._offset,1);a.changed()},_createNode:function(){return e.createNode(this._name,this._attributes)}})})},"MW/equations/editor/commands/MoveChildrenCommand":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/equations/renderer/model/utils/NodeFactory","MW/rtc/model/importers/Base",
"mw-utils/Utils"],function(g,f,e,d,b){return g(null,{constructor:function(a,c,b,d,e){this._targetId=a;this._targetOffset=c;this._sourceId=b;this._start=d||0;this._end=e},execute:function(a){var c=a.getById(this._targetId),b=a.getById(this._sourceId),d=b.children.slice(this._start,this._end);b.children.splice(this._start,this._end-this._start);d.forEach(function(a){a&&(a.parent=c)});b=[this._targetOffset,0].concat(d);c.children.splice.apply(c.children,b);a.changed()},unexecute:function(a){var c=a.getById(this._targetId),
b=a.getById(this._sourceId),d=c.children.slice(this._targetOffset,this._targetOffset-this._start+this._end);c.children.splice(this._targetOffset,this._end-this._start);d.forEach(function(a){a&&(a.parent=b)});c=[this._start,0].concat(d);b.children.splice.apply(b.children,c);a.changed()}})})},"MW/equations/editor/commands/ReplaceTextCommand":function(){define(["dojo/_base/declare"],function(g){return g(null,{constructor:function(f,e,d,b){this._targetId=f;this._offset=e;this._length=d;this._text=b},
execute:function(f){var e=f.getById(this._targetId);this._replacement=e.text.substr(this._offset,this._length);e.text=e.text.substr(0,this._offset)+this._text+e.text.substr(this._offset+this._length);f.changed();return e},unexecute:function(f){var e=f.getById(this._targetId);e.text=e.text.substr(0,this._offset)+this._replacement+e.text.substr(this._offset+this._text.length);f.changed();return e}})})},"MW/equations/editor/commands/UpdateAttributesCommand":function(){define(["dojo/_base/declare"],function(g){return g(null,
{constructor:function(f,e){this._targetId=f;this._newAttributes=e},execute:function(f){var e=f.getById(this._targetId);this._oldAttributes={};for(var d in this._newAttributes)this._newAttributes.hasOwnProperty(d)&&(this._oldAttributes[d]=e[d],e[d]=this._newAttributes[d]);f.changed()},unexecute:function(f){var e=f.getById(this._targetId),d;for(d in this._oldAttributes)this._oldAttributes.hasOwnProperty(d)&&(e[d]=this._oldAttributes[d]);f.changed()}})})},"MW/equations/editor/model/UndoRedoStep":function(){define(["dojo/_base/declare"],
function(g){return g(null,{constructor:function(f,e,d,b,a){this._commands=f;this._cursorStart=e;this._cursorEnd=d;this._cursor=b;this._equation=a},execute:function(){this._equation.pauseEvents();this._cursor.pauseEvents();this._commands.forEach(function(f){f.execute(this._equation)},this);this._cursor.setState(this._cursorEnd);this._equation.unpauseEvents();this._cursor.unpauseEvents()},unexecute:function(){this._equation.pauseEvents();this._cursor.pauseEvents();for(var f=this._commands.length-1;0<=
f;f-=1)this._commands[f].unexecute(this._equation);this._cursor.setState(this._cursorStart);this._equation.unpauseEvents();this._cursor.unpauseEvents()}})})},"MW/equations/editor/controller/FocusController":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/lang dojo/aspect dojo/on MW/equations/editor/utils/EquationPlugin".split(" "),function(g,f,e,d,b,a){return f(a,{pluginId:"controller.focus",pluginDependencies:["api.attributes","view.keyhandler"],constructor:function(a,b){this._attributes=
a;this._keyHandler=b;this._focusStack=[];this.own(d.after(b,"onBlur",e.hitch(this,"_handleBlur")));this.own(d.after(b,"onFocus",e.hitch(this,"_handleFocus")));this._windowblurred=!1;this.own(d.after(window,"onfocus",e.hitch(this,"_handleWindowFocus")));this.own(d.after(window,"onblur",e.hitch(this,"_handleWindowBlur")))},_handleWindowFocus:function(){this._focused=!0;this._windowblurred=!1;this._enqueueFocusCheck()},_handleWindowBlur:function(){this._focused=!1;this._windowblurred=!0;this._enqueueFocusCheck()},
focus:function(){this._attributes.set("active",!0);0===this._focusStack.length&&this._keyHandler.focus()},add:function(a){this._attributes.set("active",!0);(0===this._focusStack.length||this._focusStack[0].group!==a)&&this._focusStack.unshift({group:a});return{remove:e.hitch(this,function(){g.some(this._focusStack,e.hitch(this,function(b,d){if(b.group===a)return this._focusStack.splice(d,1),!0}))&&(!this._windowblurred&&0===this._focusStack.length&&this._attributes.get("active"))&&this._keyHandler.focus()})}},
_handleFocus:function(){this._focused=!0;this._enqueueFocusCheck()},_handleBlur:function(){this._focused=!1;this._enqueueFocusCheck()},_enqueueFocusCheck:function(){this._focusCheckEnqueued||(this._focusCheckEnqueued=!0,window.setTimeout(e.hitch(this,function(){this._focusCheckEnqueued=!1;this._attributes.set("active",!this._windowblurred&&(this._focused||0<this._focusStack.length))}),0))}})})},"MW/equations/editor/controller/KeyHandlerController":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/lang dojo/aspect dojo/has MW/equations/editor/utils/EquationPlugin MW/equations/editor/utils/PriorityHandlerChain".split(" "),
function(g,f,e,d,b,a,c){return f(a,{pluginId:"controller.keyhandler",pluginDependencies:["api.attributes","external.actionservice"],constructor:function(a,b){this._attributes=a;this._bindings={};this._typeHandlers=new c;this._actionService=b;b.getAllActions().forEach(function(a){(a.key||a.platformKey)&&this._addAction(a)},this);this.own(d.after(this._actionService,"addAction",e.hitch(this,"_addAction"),!0));this.own(d.after(this._actionService,"removeAction",e.hitch(this,"_removeAction"),!0))},add:function(a,
c,d){var e=a;if("string"!==typeof a&&(e=a.key,a.platformKey))for(var f in a.platformKey)if(a.platformKey.hasOwnProperty(f)&&b(f)){e=a.platformKey[f];break}this._ensureBinding(e);return this._bindings[e].add(c,d)},addTypeHandler:function(a,c){return this._typeHandlers.add(a,c)},registerView:function(a){this._keyHandler=a;Object.keys(this._bindings).forEach(e.hitch(this,"_makeBinding"))},handleType:function(a){!this._attributes.get("disabled")&&(!(1===a.length&&this._bindings[a])||!this._bindings[a].fire())&&
this._typeHandlers.fire(a)},_ensureBinding:function(a){this._bindings[a]||(this._bindings[a]=new c,this._makeBinding(a))},_makeBinding:function(a){this._keyHandler&&this._keyHandler.addBinding({key:a,callback:e.hitch(this,"_handleKey",a)})},_handleKey:function(a){this._bindings[a]&&(this._attributes.get("disabled")||!this._bindings[a].fire()&&1===a.length&&this._typeHandlers.fire(a))},_addAction:function(a){(a.key||a.platformKey)&&this.add(a,e.hitch(this,function(){var c=this._actionService.getAction(a.id);
if(c&&c.enabled&&c.callback)return c.callback.call(void 0)}),a.keyPriority)},_removeAction:function(a){}})})},"MW/equations/editor/controller/LiveCursorController":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/equations/editor/utils/CursorUtils MW/equations/editor/utils/EquationPlugin MW/equations/editor/utils/IteratorConstants MW/equations/editor/utils/NodeUtils".split(" "),function(g,f,e,d,b,a,c){return g(b,{pluginId:"controller.livecursor",pluginDependencies:["controller.cursor",
"model.cursor","model.equation"],constructor:function(a,c,b){this._cursorController=a;this._cursor=c;this._equation=b;this.own(e.before(this._equation,"beforeDeleteNode",f.hitch(this,"_handleDeleteNode")));this.own(e.before(this._equation,"afterNodeInserted",f.hitch(this,"_handleNodeInserted")));this.own(e.before(this._equation,"beforeReplaceText",f.hitch(this,"_handleReplaceText")));this.own(e.before(this._equation,"afterChildrenMoved",f.hitch(this,"_handleChildrenMoved"),!0));this.own(e.before(this._equation,
"beforeMergeNodes",f.hitch(this,"_handleBeforeMergeNodes"),!0))},_handleBeforeMergeNodes:function(a,c,b){a=this._cursorController.getPosition();a.id===b&&(b=this._equation.getById(c),this._cursor.setPosition({id:c,offset:a.offset+b.text.length}))},_handleNodeInserted:function(a,c,b){this._cursor.clearSelection();a=this._cursorController.getPosition();if(a.id!==c){var d=this._equation.getParentAndIndex(a.node),e=d.parent,d=d.index;"MathText"===a.node.className&&e.id===c&&(d===b-1&&a.offset===a.node.text.length?
this._cursorController.setPosition({id:e.id,offset:d+2}):d===b+1&&0===a.offset&&this._cursorController.setPosition({id:e.id,offset:d}))}else a.offset>=b&&this._cursorController.setPosition({id:a.id,offset:a.offset+1})},_handleDeleteNode:function(a,b){this._cursor.clearSelection();var e=this._cursor.getPosition();if(e.id!==b){var f=this._equation.getById(b),f=this._equation.getParentAndIndex(f),g=f.parent,n=f.index;if(g.id===e.id){if(e.offset>n){var n=e.offset-1,q={id:g.id,offset:n},q=d.adaptPositionToAtoms(q,
g.children[n-(f.index===e.offset-1?1:0)],g.children[n+1]);this._cursor.setPosition(q)}}else for(e=this._equation.getById(e.id);e;){f=this._equation.getParentAndIndex(e);if(!f)break;e=f.parent;if(e.id===b){f=this._equation.getParentAndIndex(e);g=f.parent;n=f.index;if("placeholder"!==c.categorizeNode(g))return this._findCursorPosition(e);e={id:g.id,offset:n};e=d.adaptPositionToAtoms(e,g.children[n-1],g.children[n+1]);this._cursor.setPosition(e);break}}}else f=this._equation.getById(e.id),f=this._equation.getParentAndIndex(f),
g=f.parent,n=f.index,e={id:g.id,offset:n},e=d.adaptPositionToAtoms(e,g.children[n-1],g.children[n+1]),this._cursor.setPosition(e)},_findCursorPosition:function(c){this._equation.iterate({start:c,direction:a.RIGHT_LEFT_DOWN_UP,skipFirst:!0,placeholder:f.hitch(this,function(a,c){var b=0;"left"===c.getDirection()&&(b=-1);this._cursorController.setPosition({id:a.id,offset:b});c.stop()})})},_handleReplaceText:function(a,c,b,d,e){this._cursor.clearSelection();a=this._cursor.getPosition();a.id!==c||a.offset<
b||(a=a.offset,a=(a<b+d?b:a-d)+e.length,this._cursorController.setPosition({id:c,offset:a}))},_handleChildrenMoved:function(a,b,d,e,f,g){a=this._cursorController.getPosition();a.id===e&&a.offset>=f&&a.offset<=g&&this._cursorController.setPosition({id:b,offset:d+a.offset-f});g=c.categorizeNode(a.node);var q=this._equation.getParentAndIndex(a.node),r=q.parent;"atom"===g&&r.id===e&&a.offset===a.node.text.length&&q.index===f-1&&this._cursorController.setPosition({id:b,offset:d})}})})},"MW/equations/editor/controller/MouseController":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/on","MW/equations/editor/utils/EquationPlugin","MW/equations/editor/utils/PriorityHandlerChain"],function(g,f,e,d,b){return g(d,{pluginId:"controller.mouse",pluginDependencies:["api.attributes","controller.focus","view.rootnode"],_DOUBLE_CLICK_TIME:400,constructor:function(a,c,d){this._attributes=a;this._rootNode=d;this._focusController=c;this._mouseDownHandlers=new b;this._mouseMoveHandlers=new b;this._mouseUpHandlers=new b;this._mouseDoubleClickHandlers=new b;this.own(e(d,
"mousedown",f.hitch(this,"_handleMouseDown")));this.own(e(d,"mousemove",f.hitch(this,"_handleMouseMove")));this.own(e(d,"mouseup",f.hitch(this,"_handleMouseUp")))},addMouseUp:function(a,c){return this._mouseUpHandlers.add(a,c)},addMouseDown:function(a,c){return this._mouseDownHandlers.add(a,c)},addMouseDoubleClick:function(a,c){return this._mouseDoubleClickHandlers.add(a,c)},addMouseMove:function(a,c){return this._mouseMoveHandlers.add(a,c)},_addWindowMouseMoveHandler:function(){this._windowMouseMoveHandler||
(this._windowMouseMoveHandler=e(window,"mousemove",f.hitch(this,"_handleWindowMouseMove")))},_handleWindowMouseMove:function(a){1!==(a.buttons&1)?(this._windowMouseMoveHandler.remove(),this._windowMouseMoveHandler=null):this._rootNode.contains(a.target)||this._mouseMoveHandlers.fire(a)},_addWindowMouseUpHandler:function(){this._windowMouseUpHandler||(this._mouseDownFocus=this._focusController.add("mouse-down"),this._windowMouseUpHandler=e(window,"mouseup",f.hitch(this,"_handleWindowMouseUp")))},_handleWindowMouseUp:function(a){this._windowMouseUpHandler.remove();
this._windowMouseUpHandler=null;this._mouseDownFocus.remove()},_handleMouseMove:function(a){!this._attributes.get("disabled")&&!(a.pageX===this._lastX&&a.pageY===this._lastY)&&(this._lastX=a.pageX,this._lastY=a.pageY,this._mouseMoveHandlers.fire(a))},_handleMouseDown:function(a){if(!this._attributes.get("disabled")){this._addWindowMouseMoveHandler();this._addWindowMouseUpHandler();var c=a.timeStamp;if(c-this._lastClickTime<this._DOUBLE_CLICK_TIME&&0===a.button&&a.pageX===this._lastX&&a.pageY===this._lastY)return this._mouseDoubleClickHandlers.fire(a),
!0;this._lastX=a.pageX;this._lastY=a.pageY;this._lastClickTime=c;this._mouseDownHandlers.fire(a)}},_handleMouseUp:function(a){this._windowMouseUpHandler&&this._handleWindowMouseUp(a);this._attributes.get("disabled")||this._mouseUpHandlers.fire(a)}})})},"MW/equations/editor/controller/PlaceholderAtomController":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/equations/editor/utils/CursorUtils","MW/equations/editor/utils/EquationPlugin"],function(g,f,e,d,b){return g(b,{pluginId:"controller.placeholderatomcontroller",
pluginDependencies:["model.equation"],constructor:function(a){this._equation=a;this.own(e.after(this._equation,"beforeDeleteNode",f.hitch(this,"_handleDeleteNode"),!0));this.own(e.after(this._equation,"afterNodeInserted",f.hitch(this,"_handleNodeInserted"),!0));this.own(e.after(this._equation,"afterChildrenMoved",f.hitch(this,"_handleChildrenMoved"),!0))},_handleNodeInserted:function(a,c,b,d){c=this._equation.getById(c);2===c.children.length&&c.children[1]&&"placeholder-atom"===c.children[1]["data-category"]?
a.deleteNode(c.children[1].id):d&&"placeholder"===d["data-category"]&&this._insertPlaceholderAtom(a,d.id)},_handleDeleteNode:function(a,c){var b=this._equation.getParent(this._equation.getById(c));"placeholder"===b["data-category"]&&1===b.children.length&&this._insertPlaceholderAtom(a,b.id)},_handleChildrenMoved:function(a,c,b,d,e,f){c=this._equation.getById(c);1<c.children.length&&(c.children[c.children.length-1]&&"placeholder-atom"===c.children[c.children.length-1]["data-category"]&&a.deleteNode(c.children[c.children.length-
1].id),1<c.children.length&&(b<c.children.length-1&&c.children[b]&&"placeholder-atom"===c.children[b]["data-category"])&&a.deleteNode(c.children[b].id),1<c.children.length&&(c.children[0]&&"placeholder-atom"===c.children[0]["data-category"])&&a.deleteNode(c.children[0].id));b=this._equation.getById(d);"placeholder"===b["data-category"]&&0===b.children.length&&this._insertPlaceholderAtom(a,b.id)},_insertPlaceholderAtom:function(a,c){a.insertNode(c,0,"MathText",{"data-category":"placeholder-atom",text:""})}})})},
"MW/equations/editor/controller/SelectionController":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/_base/lang","MW/equations/editor/utils/CursorUtils","MW/equations/editor/utils/NodeUtils"],function(g,f,e,d,b){return f(null,{pluginId:"controller.selection",pluginDependencies:["model.cursor","model.equation"],constructor:function(a,c){this._cursor=a;this._equation=c},getSelectionStartLogical:function(){if(this._cursor.hasSelection()){var a=this.getSelectionSpan();return d.logicalFromPosition({id:a.id,
offset:a.reversed?a.right:a.left},this._equation.getRoot())}},getSelectionLogical:function(){if(this._cursor.hasSelection()){var a=this.getSelectionSpan(),c=d.logicalFromPosition({id:a.id,offset:a.left},this._equation.getRoot()),b=d.logicalFromPosition({id:a.id,offset:a.right},this._equation.getRoot());return{left:c,right:b,reversed:a.reversed}}},hasSelection:function(){return this._cursor.hasSelection()},iterateSelection:function(a){var c=this.getSelectionSpan(),d={},d="atom"===b.categorizeNode(c.node)?
[c.node]:c.node.children.slice(c.left,c.right);this._equation.iterate(e.mixin({},a,{start:d}))},getSelectionSpan:function(){var a=this._cursor.getSelection();return this.getSpan(a[0],a[1])},getSelectionShrinkPosition:function(){var a=this._cursor.getSelection(),a=this._analyzeAncestors(a[0],a[1]),c=b.categorizeNode(a.lastCommon.node);if("placeholder"===c||"atom"===c){var c=a.lastCommon.minLeftOffset,e=a.lastCommon.minRightOffset,f=a.length,f=a.lastCommonIndex===f-1||a.lastCommonIndex===f-2&&a[f-1].leftOffset===
a[f-1].rightOffset;if(c<e-1||f)return{id:a.lastCommon.id,offset:a.reversed?c+1:e-1}}for(e=a.lastCommonIndex;e+1<a.length&&!(e+=1,c=b.categorizeNode(a[e].node),"atom"===c||"placeholder"===c););return{id:a[e].id,offset:a.reversed?0:d.nodeLength(a[e].node)}},getSpan:function(a,c){if(a.id===c.id)return{id:a.id,left:Math.min(a.offset,c.offset),right:Math.max(a.offset,c.offset),reversed:a.offset>c.offset,node:this._equation.getById(a.id)};for(var d=this._analyzeAncestors(a,c),e=d.lastCommonIndex,f=d.lastCommonIndex;0<=
e;){var g=b.categorizeNode(d[e].node);if("atom"===g||"placeholder"===g){f=e;break}e-=1}return{id:d[f].id,left:d[f].minLeftOffset,node:d[f].node,right:d[f].minRightOffset,reversed:d.reversed}},_analyzeAncestors:function(a,c){for(var b=this._getAncestors(a),d=this._getAncestors(c),e=0;e<b.length&&e<d.length&&b[e].id===d[e].id;)b[e].minLeftOffset=Math.min(b[e].leftOffset,d[e].leftOffset),b[e].minRightOffset=Math.max(b[e].rightOffset,d[e].rightOffset),e+=1;var e=e-1,f={lastCommonIndex:e,lastCommon:b[e],
length:b.length,reversed:b[e].leftOffset>d[e].leftOffset||b[e].rightOffset>d[e].rightOffset};b.forEach(function(a,c){f[c]=a});return f},_getAncestors:function(a){var c=this._equation.getById(a.id),b=a.offset,d=a.offset;for(a=[];c;)if(a.unshift({id:c.id,leftOffset:b,rightOffset:d,node:c}),d=this._equation.getParentAndIndex(c)){var e="MathText"===c.className&&b===c.text.length,f="MathText"===c.className&&0===b,c=d.parent,b=d.index,d=d.index+1;e?b=d:f&&(d=b)}else break;return a}})})},"MW/equations/editor/controller/UndoRedoController":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/aspect","MW/equations/editor/utils/EquationPlugin"],function(g,f,e,d){return g(d,{pluginId:"controller.undoredo",pluginDependencies:["controller.editmanager","model.cursor","model.equation"],constructor:function(b,a,c){this._undoStack=[];this._redoStack=[];this._equationModel=c;this._cursorModel=a;this.own(e.after(b,"onNewStep",f.hitch(this,"_insert"),!0));this.own(e.after(b,"onReset",f.hitch(this,"_clear"),!0))},onChange:function(){},_clear:function(){this._undoStack=[];this._redoStack=
[];this.onChange()},canUndo:function(){return 0<this._undoStack.length},canRedo:function(){return 0<this._redoStack.length},undo:function(){if(this.canUndo()){var b=this._undoStack.pop();b.unexecute();this._redoStack.push(b);this.onChange()}},redo:function(){if(this.canRedo()){var b=this._redoStack.pop();b.execute();this._undoStack.push(b);this.onChange()}},_insert:function(b){this._undoStack.push(b);this._redoStack=[];this.onChange()}})})},"MW/equations/editor/helper/BackspaceToUndoHelper":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/aspect","MW/equations/editor/utils/EquationPlugin"],function(g,f,e,d){return g(d,{pluginId:"helper.backspacetoundo",pluginDependencies:["controller.undoredo","controller.keyhandler","model.cursor","model.equation"],constructor:function(b,a,c,d){this._undoRedoController=b;this.own(a.add("backspace",f.hitch(this,"_handleBackspace",-1),10));this.own(e.after(c,"onChange",f.hitch(this,"_reset")));this.own(e.after(d,"onChange",f.hitch(this,"_reset")))},start:function(){this._mapBackspaceToUndo=
!0},_reset:function(){this._mapBackspaceToUndo=!1},_handleBackspace:function(){if(this._mapBackspaceToUndo)return this._undoRedoController.undo(),this._mapBackspaceToUndo=!1,!0}})})},"MW/equations/editor/helper/DeleteHelper":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/_base/lang","MW/equations/editor/utils/NodeUtils"],function(g,f,e,d){return f(null,{pluginId:"helper.delete",pluginDependencies:["controller.selection","model.equation"],constructor:function(b,a){this._selectionController=
b;this._equation=a;this._deleteHandlers=[]},addDeleteHandler:function(b){this._deleteHandlers.push(b);return{remove:e.hitch(this,function(){var a=this._deleteHandlers.indexOf(b);0<=a&&this._deleteHandlers.splice(a,1)})}},handleDelete:function(b){return g.some(this._deleteHandlers,function(a){return a(b)})},deleteSelection:function(b){this.deleteRange(b,this._selectionController.getSelectionSpan())},deleteRange:function(b,a){var c=a.node,e=d.categorizeNode(c);if("atom"===e)this.deleteInAtom(b,c,a.left,
a.right-a.left);else if("placeholder"===e){for(e=a.right-1;e>=a.left;e-=1)b.deleteNode(c.children[e].id);e=c.children[a.left-1];c=c.children[a.left];e&&c&&d.mergeIfCompatible(b,e,c)}},deleteInAtom:function(b,a,c,e){a.text.length===e?(c=this._equation.getPreviousSibling(a),e=this._equation.getNextSibling(a),b.deleteNode(a.id),c&&e&&d.mergeIfCompatible(b,c,e)):b.replaceText(a.id,c,e,"")}})})},"MW/equations/editor/helper/ExportHTMLImage":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-style MW/equations/editor/utils/EquationPlugin MW/equations/renderer/model/utils/MathMLUtils MW/rtc/misc/ImageURIUtilities MW/rtc/plugins/cutcopypaste/MIMETypes".split(" "),
function(g,f,e,d,b,a,c){return g(d,{pluginId:"helper.exporthtmlimage",pluginFamily:"copypaste",pluginDependencies:["external.clipboardtempdirpath","helper.mimetype","model.equation","view.renderer","view.rootnode"],constructor:function(a,c,b,d,e){this._equation=b;this._clipboardTempDirpath=a;this._renderer=d;this._rootNode=e;this.own(c.addExportContributor(f.hitch(this,"_convertToImage")))},_convertToImage:function(d){if("MathText"===d.node.className)return[];var f=e.getComputedStyle(this._rootNode).fontSize;
d=d.node.children.slice(d.left,d.right);d=b.exportMathML(d,{attribBlackList:["id","data-category"],inline:this._equation.getRoot().inline});f=this._renderer.getEquationRenderer().renderToImageURLSynch(d,f,2);d="\x3cspan "+('style\x3d"vertical-align: '+Math.round(f.verticalAlign)+'"\x3e');d+="\x3cimg ";var g=[];if(this._clipboardTempDirpath){var m=a.pushImageAndGetPathFromURI(f.dataURL,this._clipboardTempDirpath,g);d+='src\x3d"'+m+'"'}else d+='src\x3d"'+f.dataURL+'"';d+=' width\x3d"'+f.width/2+'" height\x3d"'+
f.height/2+'"';return[{flavor:c.HTML,content:d+"\x3e\x3c/span\x3e"}].concat(0<g.length?[{flavor:c.IMAGE_LIST,content:g}]:[])}})})},"MW/equations/editor/helper/ExportImage":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-style MW/equations/editor/utils/EquationPlugin MW/equations/renderer/model/utils/MathMLUtils MW/equations/renderer/model/utils/NodeFactory MW/rtc/plugins/cutcopypaste/MIMETypes".split(" "),function(g,f,e,d,b,a,c){return g(d,{pluginId:"helper.exportimage",pluginFamily:"copypaste",
pluginDependencies:["helper.mimetype","model.equation","view.renderer","view.rootnode"],constructor:function(a,c,b,d){this._equation=c;this._renderer=b;this._rootNode=d;this.own(a.addExportContributor(f.hitch(this,"_convertToImage")))},_convertToImage:function(d){var g=e.getComputedStyle(this._rootNode).fontSize,l=[];d.node.children?l=d.node.children.slice(d.left,d.right):"MathText"===d.node.className?l.push(a.createNode("MathText",f.mixin(d.node.getContents(),{text:d.node.text.substring(d.left,d.right)}))):
l.push(d.node);d=b.exportMathML(l,{attribBlackList:["id","data-category"],inline:this._equation.getRoot().inline});g=this._renderer.getEquationRenderer().renderToImageURLSynch(d,g,1);return[{flavor:c.IMAGE,content:g.dataURL}]}})})},"MW/equations/editor/helper/ExportMathML":function(){define("dojo/_base/declare dojo/_base/lang MW/equations/editor/utils/EquationPlugin MW/equations/renderer/model/utils/MathMLUtils MW/equations/renderer/model/utils/NodeFactory MW/rtc/plugins/cutcopypaste/MIMETypes".split(" "),
function(g,f,e,d,b,a){return g(e,{pluginId:"helper.exportmathml",pluginFamily:"copypaste",pluginDependencies:["helper.mimetype"],constructor:function(a){this.own(a.addExportContributor(f.hitch(this,"_generateMathMLContent")))},_generateMathMLContent:function(c){var e=[];c.node.children?e=c.node.children.slice(c.left,c.right):"MathText"===c.node.className?e.push(b.createNode("MathText",f.mixin(c.node.getContents(),{text:c.node.text.substring(c.left,c.right)}))):e.push(c.node);c=d.exportMathML(e,{attribBlackList:["id",
"data-category"]});return[{flavor:a.MATHML_PRESENTATION,content:c}]}})})},"MW/equations/editor/helper/ExportPlainText":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/equations/editor/utils/EquationPlugin","MW/rtc/plugins/cutcopypaste/MIMETypes"],function(g,f,e,d){return g(e,{pluginId:"helper.exportplaintext",pluginFamily:"copypaste",pluginDependencies:["helper.mimetype","helper.plaintextgenerator"],constructor:function(b,a){this._plainTextGeneratorHelper=a;this.own(b.addExportContributor(f.hitch(this,
"_generateTextMIMEType")))},_generateTextMIMEType:function(b){b=this._plainTextGeneratorHelper.convertSelection(b);return[{flavor:d.TEXT,content:b},{flavor:d.COPY_FOR_COMMAND_WINDOW,content:b}]}})})},"MW/equations/editor/helper/ImportHelper":function(){define(["dojo/_base/declare","MW/equations/editor/utils/EquationPlugin","MW/equations/renderer/Renderer"],function(g,f,e){return g(f,{pluginId:"helper.import",pluginDependencies:[],constructor:function(d,b){this._renderer={}},importModel:function(d,
b){var a=this._rendererFor(b||"mathml");"tex"===b&&(d=a.setDisplaystyleIfNeeded(d));return a.getModel(d)},_rendererFor:function(d){this._renderer[d]||(this._renderer[d]=new e({equationFormat:d,cacheFontMetrics:!1}));return this._renderer[d]}})})},"MW/equations/editor/helper/InsertHelper":function(){define("dojo/_base/declare dojo/_base/lang MW/equations/editor/utils/MathVariant MW/equations/editor/utils/NodeUtils MW/equations/renderer/model/SpacingClasses MW/equations/renderer/model/Symbols".split(" "),
function(g,f,e,d,b,a){return g(null,{pluginId:"helper.insert",pluginDependencies:["controller.cursor","model.equation"],constructor:function(a,b){this._cursorController=a;this._equation=b},getInsertPosition:function(a,b){b=b||this._cursorController.getPosition();var e=this._equation.getById(b.id),f=d.categorizeNode(e);if("atom"===f||"placeholder-atom"===f){var g=this._equation.getParentAndIndex(e),f=g.parent,g=g.index;if(0===b.offset)return{id:f.id,node:f,offset:g};b.offset<e.text.length&&this._splitNode(a,
e,b.offset);return{id:f.id,node:f,offset:g+1}}return b},insertTemplate:function(a,b,e,g){this._cursorPositions=[];var m=g?e.children[g-1]:null,p=g<e.children.length?e.children[g]:null;f.isArray(b[0])?b.forEach(function(b,d){this._insertRecursive(a,b,e,g+d)},this):this._insertRecursive(a,b,e,g);if(m){if(b=this._equation.getNextSibling(m))d.mergeIfCompatible(a,m,b),b=this._equation.getNextSibling(m);this.autoRemoveSpace(a,m,b)}p&&(m=this._equation.getPreviousSibling(p))&&d.mergeIfCompatible(a,m,p);
return this._cursorPositions},_insertRecursive:function(a,b,d,e){if(0!==b.length){var f=a.insertNode(d.id,e,b[0],b[1]);b[2]&&b[2].forEach(function(b,d){this._insertRecursive(a,b,f,d)},this);b[1]&&b[1].hasOwnProperty("data-cursor")&&(d={id:f.id,offset:0},this._cursorPositions[b[1]["data-cursor"]]=d,0===b[1]["data-cursor"]&&this._cursorController.setPosition(d))}},autoRemoveSpace:function(a,b,e){if(b&&!("MathText"!==b.className||"mtext"!==b.kind)){var f=this._equation.getPreviousSibling(b);f&&e&&!("atom"===
d.categorizeNode(f)&&"symbol"!==f.kind&&"symbol"!==e.kind)&&(f=(f=this._hasSpacingRight(f))||this._hasSpacingLeft(e))&&("\u2009"===b.text?a.deleteNode(b.id):b.text.match(/^\u2009+$/)&&a.replaceText(b.id,0,1,""))}},_hasSpacingRight:function(c){return"symbol"!==c.kind||!a.symbolMap[c.symbolName]?!1:0<=[b.OP,b.BIN,b.REL,b.PUNCT,b.INNER].indexOf(a.symbolMap[c.symbolName].spacing)},_hasSpacingLeft:function(c){return"symbol"!==c.kind||!a.symbolMap[c.symbolName]?!1:0<=[b.OP,b.BIN,b.REL,b.INNER].indexOf(a.symbolMap[c.symbolName].spacing)},
prepareTextAttributes:function(a,b,d){"number"===a.kind&&(b&&"id"===b.kind&&0<d)&&(a.kind="id");return a},_splitNode:function(a,b,e){var f=this._equation.getParentAndIndex(b),g={text:b.text.substr(e),kind:b.kind,mathvariant:b.mathvariant};"number"===d.kindOfText(g.text)&&(g.kind="number");a.insertNode(f.parent.id,f.index+1,"MathText",this.prepareTextAttributes(g));a.replaceText(b.id,e,b.text.length-e,"")}})})},"MW/equations/editor/helper/InsertTemplateHelper":function(){define(["dojo/_base/declare",
"MW/equations/editor/utils/Serializer"],function(g,f){return g(null,{pluginId:"helper.inserttemplate",pluginDependencies:["controller.cursor","controller.selection","helper.delete","helper.insert","model.equation"],constructor:function(e,d,b,a,c){this._deleteHelper=b;this._insertHelper=a;this._selectionController=d;this._equation=c;this._cursorController=e},insertTemplate:function(e,d,b){var a=null;b?(a=this._serializeRange(b),this._deleteHelper.deleteRange(e,b)):this._cursorController.hasSelection()&&
(a=this._serializeRange(this._selectionController.getSelectionSpan()),this._deleteHelper.deleteSelection(e));b=this._insertHelper.getInsertPosition(e);var c=this._equation.getById(b.id);d=this._insertHelper.insertTemplate(e,d,c,b.offset);a&&(0<a.length&&d[0])&&(b=this._insertHelper.getInsertPosition(e),c=this._equation.getById(b.id),this._insertHelper.insertTemplate(e,a,c,b.offset),d[1]&&this._cursorController.setPosition(d[1]));return d},_serializeRange:function(e){return f.serializeRange(e.node,
e.left,e.right)}})})},"MW/equations/editor/helper/MimeTypeHelper":function(){define("dojo/_base/declare dojo/_base/lang MW/equations/editor/utils/NodeUtils MW/equations/editor/utils/PlainTextParser MW/equations/editor/utils/Serializer MW/rtc/plugins/cutcopypaste/MIMETypes".split(" "),function(g,f,e,d,b,a){return g(null,{pluginId:"helper.mimetype",pluginDependencies:["controller.selection","helper.import","helper.insert"],constructor:function(a,b,d){this._selectionController=a;this._importHelper=b;
this._insertHelper=d;this._exportContributor=[]},addExportContributor:function(a){this._exportContributor.push(a);return{remove:f.hitch(this,function(){var b=this._exportContributor.indexOf(a);0<=b&&this._exportContributor.splice(b,1)})}},acceptedMimeTypes:function(){return["application/matlab_json_equation",a.TEXT,a.MATHML_PRESENTATION]},convertSelection:function(){var a=this._selectionController.getSelectionSpan();return this.convertRange(a)},convertRange:function(a){var d=[],e=JSON.stringify(b.serializeRange(a.node,
a.left,a.right));d.push({flavor:"application/matlab_json_equation",content:e});this._exportContributor.forEach(function(b){d=d.concat(b.call(null,a))});return d},insertContent:function(c,f){var g;if(f["application/matlab_json_equation"])try{var l=JSON.parse(f["application/matlab_json_equation"]);g=this._insertHelper.getInsertPosition(c);this._insertHelper.insertTemplate(c,l,g.node,g.offset)}catch(m){}else if(f[a.MATHML_PRESENTATION]){if(g=this._importHelper.importModel(f[a.MATHML_PRESENTATION],"mathml"))g=
e.categorizeTree(g),l=b.serializeRange(g.children[0]),g=this._insertHelper.getInsertPosition(c),this._insertHelper.insertTemplate(c,l,g.node,g.offset)}else if(f[a.TEXT]||f[a.UNICODE_STRING])l=d.parse(f[a.TEXT]||f[a.UNICODE_STRING]),g=this._insertHelper.getInsertPosition(c),this._insertHelper.insertTemplate(c,l,g.node,g.offset)}})})},"MW/equations/editor/utils/PlainTextParser":function(){define(["MW/equations/editor/utils/NodeUtils","MW/equations/renderer/model/Symbols"],function(g,f){function e(b,
a){if("delimiter"===b)return["MathDelimiter",{symbolName:f.getSymbolName(a)},[]];var c={kind:b,text:a};"symbol"===b&&(c.symbolName=f.getSymbolName(a));return["MathText",c,[]]}var d=[g.TEXT_KIND.IDENTIFIER,g.TEXT_KIND.NUMBER];return{parse:function(b){for(var a=[],c=0,f,k;c<b.length;){var l=b.substr(c,1),l=g.kindOfText(l);f===g.TEXT_KIND.IDENTIFIER&&l===g.TEXT_KIND.NUMBER&&(l=g.TEXT_KIND.IDENTIFIER);if(l!==f||0>d.indexOf(l))f&&f!==g.TEXT_KIND.WHITESPACE&&a.push(e(f,b.substring(k,c))),f=l,k=c;c+=1}f&&
f!==g.TEXT_KIND.WHITESPACE&&a.push(e(f,b.substr(k)));return a}}})},"MW/equations/editor/helper/PlainTextGenerator":function(){define(["dojo/_base/declare","MW/equations/editor/utils/EquationPlugin","MW/equations/renderer/model/Symbols"],function(g,f,e){var d={symbol:["id","number","delimiter"],number:["id","number"],id:["id","number"]};return g(f,{pluginId:"helper.plaintextgenerator",pluginDependencies:["model.equation"],constructor:function(b){this._equation=b},convertSelection:function(b){function a(a,
b){if(d[f]&&0<=d[f].indexOf(a)||d[a]&&0<=d[a].indexOf(f))c+=" ";f=a;c+=b}if("MathText"===b.node.className)return b.node.symbolName?e.serializeSymbol(b.node.symbolName):b.node.text.slice(b.left,b.right);var c="",f="";this._equation.iterate({start:b.node.children.slice(b.left,b.right),MathText:function(c){c.symbolName?a(c.kind,e.serializeSymbol(c.symbolName)):a(c.kind,c.text)},MathDelimiter:function(c){c.symbolName&&a("delimiter",e.serializeSymbol(c.symbolName))}});return c}})})},"MW/equations/editor/model/Cursor":function(){define(["dojo/_base/declare",
"dojo/_base/lang"],function(g,f){return g(null,{pluginId:"model.cursor",constructor:function(){this._position={};this._paused={}},clearSelection:function(){this._anchor=void 0},getPosition:function(){return f.mixin({},this._position)},getAnchor:function(){return this._anchor&&f.mixin({},this._anchor)},setPosition:function(e,d){d?(this._anchor=this._anchor||this.getPosition(),this._anchor.id===e.id&&this._anchor.offset===e.offset&&(this._anchor=void 0)):this._anchor=void 0;this._position=e;this._onChange()},
hasSelection:function(){return!!this._anchor},getSelection:function(){return[f.mixin({},this._anchor),f.mixin({},this._position)]},getState:function(){return[this._anchor?f.mixin({},this._anchor):void 0,this.getPosition()]},setState:function(e){this.setPosition(e[1]);e[0]&&(this._anchor=f.mixin({},e[0]))},pauseEvents:function(e){this._paused[e||"default"]=!0},unpauseEvents:function(e){delete this._paused[e||"default"];this._shouldFire&&!this._isPaused()&&this._onChange()},_isPaused:function(){return 0<
Object.keys(this._paused).length},onChange:function(){},_onChange:function(){this._isPaused()?this._shouldFire=!0:(this.onChange(),this._shouldFire=!1)}})})},"MW/equations/editor/model/Equation":function(){define("dojo/_base/array dojo/_base/declare MW/equations/editor/utils/Iterator MW/equations/editor/utils/NodeUtils MW/equations/renderer/model/utils/TeXUtils MW/equations/renderer/model/utils/MathMLUtils mw-utils/Utils".split(" "),function(g,f,e,d,b,a,c){return f(null,{pluginId:"model.equation",
pluginDependencies:["helper.import"],constructor:function(a){this._importHelper=a;this.setEquation('\x3cmath\x3e\x3cmrow\x3e\x3cmi data-category\x3d"placeholder-atom"\x3e\x3c/mi\x3e\x3c/mrow\x3e\x3c/math\x3e')},changed:function(){this._eventsPaused?this._triggered=!0:(this._triggered=!1,this.onChange())},pauseEvents:function(){this._eventsPaused=!0},unpauseEvents:function(){this._eventsPaused=!1;this._triggered&&this.changed()},getRoot:function(){return this._root},getById:function(a){return this._searchById(a,
this._root)},_searchById:function(a,c){var b;if(c.id===a)return c;g.some(c.children,function(c){if(c)return b=this._searchById(a,c)},this);return b},getParent:function(a){return(a=this.getParentAndIndex(a))&&a.parent},getParentAndIndex:function(a){return this._getParentAndIndex(a,this._root)},_getParentAndIndex:function(a){var c=a.parent;if(c)return{parent:c,index:c.children.indexOf(a)}},getPreviousSibling:function(a){if((a=this.getParentAndIndex(a))&&0<a.index)return a.parent.children[a.index-1]},
getNextSibling:function(a){if((a=this.getParentAndIndex(a))&&a.index<a.parent.children.length-1)return a.parent.children[a.index+1]},onChange:function(){},beforeDeleteNode:function(a,c){},afterNodeInserted:function(a,c,b,d){},afterChildrenMoved:function(a,c,b,d,e,f){},beforeReplaceText:function(a,c,b,d,e){},beforeUpdateAttributes:function(a,c,b){},beforeMergeNodes:function(a,c,b){},setEquation:function(a,c){this._root=this._importHelper.importModel(a,c);this._prepareEquation(this._root);d.categorizeTree(this._root);
this.changed()},serializeToMathMl:function(){return a.exportMathML([this._root],{attribBlackList:["id","data-category"]})},serializeToTeX:function(){return b.exportLaTeX([this._root],{attribBlackList:["id","data-category"]})},iterate:function(a){a=new e(this,a);a.iterate();return a.getResult()},_prepareEquation:function(a){a.id||(a.id=c.generateUuid());a.children&&a.children.forEach(function(c){c&&(c.parent=a,this._prepareEquation(c))},this)}})})},"MW/equations/editor/utils/Iterator":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/lang MW/equations/editor/utils/IteratorConstants MW/equations/editor/utils/IteratorResolver MW/equations/editor/utils/NodeUtils".split(" "),
function(g,f,e,d,b,a){return f(null,{constructor:function(a,b){this._equation=a;this._options=e.mixin({start:b.from||a.getRoot(),direction:d.DOWN},b)},stop:function(a){this._result=a;this._stopped=!0},isStopped:function(){return this._stopped},getResult:function(){return this._result},getParent:function(){return this._equation.getParent(this._currentNode)},getParentIndex:function(){var a=this._equation.getParentAndIndex(this._currentNode);return a&&a.index},getLastNode:function(){return this._lastNode},
getCurrentNode:function(){return this._currentNode},getDirection:function(){return this._moveDirection||"down"},iterate:function(){var a=this._options.start;e.isArray(a)||(a=[a]);g.some(a,e.hitch(this,function(a){this._iterateNode(a);return this.isStopped()}))},_iterateNode:function(a){var d=b.build(this._options.direction,a,this._equation);if(this._options.skipFirst){var e=d.getNext();a=e.node;this._moveDirection=e.direction}for(;a;){this._lastNode=this._currentNode;this._currentNode=a;this._handleNode();
if(this.isStopped()||!d.hasNext())break;e=d.getNext();a=e.node;this._moveDirection=e.direction}},_handleNode:function(){var c=a.categorizeNode(this._currentNode);this._options[c]&&this._options[c].call(void 0,this._currentNode,this);this._options[this._currentNode.className]&&this._options[this._currentNode.className].call(void 0,this._currentNode,this);this._options.all&&this._options.all.call(void 0,this._currentNode,this)}})})},"MW/equations/editor/utils/IteratorResolver":function(){define(["dojo/_base/array",
"dojo/_base/declare"],function(g,f){function e(a){for(var c=[["direction","[a-z]+"],["repeat","\\*"],["paren","[()]"],["require","\\+"]],b=RegExp("(?:("+g.map(c,function(a){return a[1]}).join(")|(")+")|(.))","g"),d,e=[];d=b.exec(a);)for(var f=0;f<c.length;f+=1)if(d[f+1]){e.push({type:c[f][0],match:d[f+1]});break}return e}function d(a){var c=[],b={},d=[];a.forEach(function(a){if(0<Object.keys(b).length&&("paren"===a.type||b[a.type]))c.push(b),b={};switch(a.type){case "direction":b.direction=a.match;
break;case "repeat":case "require":b[a.type]=!0;break;case "paren":"("===a.match?(d.push(c),c=[]):(a=c,c=d.pop(),b={direction:"sequence",children:a})}});0<Object.keys(b).length&&c.push(b);return c}var b=f(null,{constructor:function(a,c,b){this._state={current:a,sequence:b,index:0};this._stateStack=[];this._visitStack=[];this._equationModel=c;this._resolveNext()},_resolveNext:function(){this._next=null;if(this._state.index>=this._state.sequence.length)return this._currentSequenceEnded();var a=this._state.sequence[this._state.index],
c,b=a.repeat,d=!0;switch(a.direction){case "children":0===this._visitStack.length&&this._state.current.children&&(this._visitStack=this._state.current.children.slice(0));for(;!c&&0<this._visitStack.length;)c=this._visitStack.shift();c&&c.children&&(this._visitStack=c.children.concat(this._visitStack));b=0<this._visitStack.length;d=!1;break;case "up":c=this._equationModel.getParent(this._state.current);break;case "right":c=this._equationModel.getNextSibling(this._state.current);break;case "left":c=
this._equationModel.getPreviousSibling(this._state.current);break;case "sequence":return this._state.index+=1,this._stateStack.push(this._state),this._state={current:this._state.current,sequence:a.children,repeat:a.repeat,index:0},this._resolveNext()}c?(this._state.foundNode=!0,this._next={node:c,direction:a.direction},b||(this._state.index+=1),d&&(this._state.current=c)):(this._next=null,this._state.index+=1,a.require&&(this._state.index=this._state.sequence.length+1),this._resolveNext())},_currentSequenceEnded:function(){if(this._state.repeat&&
this._state.foundNode&&(this._state.index=0,this._state.foundNode=!1,this._resolveNext(),this._next))return;0<this._stateStack.length&&(this._state=this._stateStack.pop(),this._resolveNext())},hasNext:function(){return!!this._next},getNext:function(){var a=this._next;this._resolveNext();return a}});return{build:function(a,c,f){a=e(a);a=d(a);return new b(c,f,a)}}})},"MW/equations/editor/view/Caret":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/dom-construct","dojo/dom-style","MW/rtc/plugins/view/divcaret/DivCaretPlugin"],
function(g,f,e,d,b){return g(null,{pluginId:"view.caret",pluginDependencies:["view.rootnode"],constructor:function(a){this._hidden={};this._rtcCursorAdapter={position:void 0,onUpdate:function(a){},isSelectionHidden:function(){},isHidden:f.hitch(this,"isHidden"),getNode:f.hitch(this,function(){return{isReadOnly:f.hitch(this,function(){return this._isReadonly})}})};this._rtcCursorViewAdapter={onUpdate:function(){}};this._cursorControllerAdapter={getCursors:f.hitch(this,function(){return[this._rtcCursorAdapter]})};
var c={addLayer:f.hitch(this,function(c){e.place(c,a);this._node=c.children[0]}),scrollPositionIntoView:function(){},getCoordinateForPosition:f.hitch(this,function(a){return{x:this._x||0.1,y:this._y,height:this._h}})};this._divCaret=new b(this._rtcCursorViewAdapter,c,this._cursorControllerAdapter)},isHidden:function(){return 0<Object.keys(this._hidden).length},setReadonly:function(a){this._isReadonly=a;this._rtcCursorAdapter.onUpdate()},getGeometry:function(){return{x:this._x,y:this._y,h:this._h,
w:1}},getNode:function(){return this._divCaret.getBox()},hide:function(a){this._hidden[a||"default"]=!0;this._rtcCursorViewAdapter.onUpdate()},show:function(a){delete this._hidden[a||"default"];this._rtcCursorViewAdapter.onUpdate()},setXY:function(a,c,b){this._x=a;this._y=c;this._h=b||16;this._rtcCursorViewAdapter.onUpdate()}})})},"MW/rtc/plugins/view/divcaret/DivCaretPlugin":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-construct dojo/dom-style dojo/has MW/rtc/abstract/AbstractPlugin".split(" "),
function(g,f,e,d,b,a,c){return g(c,{ACTIV_COLOR:"rgba(0, 0, 0, 1)",INACTIV_COLOR:"rgba(0, 0, 0, 0.3)",constructor:function(a,c,b){this._rtcView=c;this._cursorController=b;this._layer=d.create("span",{"class":"cursorGroup"});this._permanentLayer=document.createElement("span");this._permanentLayer.className="cursor";this._layer.appendChild(this._permanentLayer);this._rtcView.addLayer(this._layer);this._paddingLeft=this._rtcView.paddingLeft;this._layers=[];this._blinkAllTimer=null;this._hidden=!1;this.own(e.after(a,
"onUpdate",f.hitch(this,"_handleCursorViewUpdate")));this.own(e.after(a,"onScrollCursorIntoView",f.hitch(this,"_handleScrollIntoView")))},_handleCursorViewUpdate:function(){this._layout()},_handleScrollIntoView:function(){this._rtcView.scrollPositionIntoView(this._cursorController.getScrollIntoViewPosition())},getBox:function(){return this._permanentLayer},_hide:function(a){b.set(a,{visibility:"hidden"});this._hidden=!0},_layout:function(){this._removeAllCarets();this._cursorController.getCursors().forEach(function(a,
c){var b;b=0===c?this._permanentLayer:this._addCursorLayer();var d=this._rtcView.getCoordinateForPosition(a.position);this.updateCaretGeometry(b,d);a.isSelectionHidden()||a.isHidden()?this._hide(b):(this._hidden=!1,d=(d=a.getNode())&&!d.isReadOnly(),b.style.visible=!0,b.style.visibility="visible",b.style.borderColor=d?this.ACTIV_COLOR:this.INACTIV_COLOR,d?b.removeAttribute("inactive"):b.setAttribute("inactive",""))},this);this._blinkAll();this._addAllLayers()},updateCaretGeometry:function(a,c){var b=
c.y+"px",d=c.height-1+"px";a.style.left=(c.x||this._paddingLeft)+"px";a.style.top=b;a.style.height=d},_blinkAll:function(){this._blinkAllTimer&&clearTimeout(this._blinkAllTimer);this._blinkAllTimer=setTimeout(f.hitch(this,this._blink),600)},_blink:function(){this._hidden||(this._layers.forEach(function(a){"hidden"===b.get(a,"visibility")?b.set(a,"visibility","visible"):a.hasAttribute("inactive")||b.set(a,"visibility","hidden")},this),"hidden"===b.get(this._permanentLayer,"visibility")?b.set(this._permanentLayer,
"visibility","visible"):this._permanentLayer.hasAttribute("inactive")||b.set(this._permanentLayer,"visibility","hidden"),this._blinkAllTimer=setTimeout(f.hitch(this,this._blink),600))},_removeAllCarets:function(){this._layers.forEach(function(a){this._layer.removeChild(a)},this);this._layers=[]},_addAllLayers:function(){var a=document.createDocumentFragment();this._layers.forEach(function(c){a.appendChild(c)});this._layer.appendChild(a)},_addCursorLayer:function(){var a=document.createElement("span");
a.className="cursor";this._layers.push(a);return a},destroy:function(){this.inherited(arguments);clearTimeout(this._blinkAllTimer)}})})},"MW/equations/editor/view/Helper":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-geometry dojo/query MW/equations/editor/utils/EquationPlugin".split(" "),function(g,f,e,d,b,a){return g(a,{pluginId:"view.helper",pluginDependencies:["view.renderer","view.rootnode"],constructor:function(a,b){this._rootNode=b;this.own(e.after(a,"onRedraw",
f.hitch(this,"_handleRedraw")))},getNodeGeometry:function(a){return this._getNodeGeometryById(a.id)},isAttachedToDocument:function(){for(var a=this._rootNode;a&&!a.body;)a=a.parentNode;return!!a},getRootGeometry:function(){return d.position(this._rootNode.querySelector(".render-target")||this._rootNode,!0)},_getNodeGeometryById:function(a){var e=d.position(this._rootNode,!0);if(!this._cache[a]){var g=b("*[id\x3d'"+a+"']",this._rootNode)[0],g=d.position(g,!0);this._cache[a]={relativeX:g.x-e.x,relativeY:g.y-
e.y,h:g.h,w:g.w}}return f.mixin({x:this._cache[a].relativeX+e.x,y:this._cache[a].relativeY+e.y},this._cache[a])},_handleRedraw:function(){this._cache={}}})})},"MW/equations/editor/view/HighlightActiveRow":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-class dojo/query MW/equations/editor/utils/EquationPlugin".split(" "),function(g,f,e,d,b,a){return g(a,{pluginId:"view.highlightactiverow",pluginDependencies:["api.attributes","model.cursor","controller.caret","view.rootnode"],
constructor:function(a,b,d,g){this._attributes=a;this._cursor=b;this._rootnode=g;this.own(a.observe("disabled",f.hitch(this,"_highlightRow")));this.own(e.after(d,"beforeCaretRedraw",f.hitch(this,"_highlightRow")))},_highlightRow:function(){for(var a=b(".MathRow",this._rootnode),e=0;e<a.length;e+=1)d.remove(a[e],"highlight");if(!this._cursor.hasSelection()&&!this._attributes.get("disabled")&&(a=this._cursor.getPosition(),a=b('*[id\x3d"'+a.id+'"]',this._rootnode),0<a.length)){for(a=a[0];a&&!a.className.match(/MathRow/);)if(a=
a.parentNode,!this._rootnode.contains(a))return;a&&!a.parentNode.className.match(/MathRoot/)&&d.add(a,"highlight")}}})})},"MW/equations/editor/view/KeyHandler":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/on MW/equations/editor/utils/EquationPlugin MW/rtc/events/KeyHandler".split(" "),function(g,f,e,d,b,a){return g(b,{pluginId:"view.keyhandler",pluginDependencies:["controller.keyhandler","external.actionservice","view.rootnode"],constructor:function(c,b,e){this._actionService=
b;this._rtcKeyHandler=new a({insertTextAtCurrentPosition:f.hitch(c,"handleType")},{getAllActions:function(){return[]},addAction:function(){},removeAction:function(){}},e);c.registerView(this);this.own(d(this._rtcKeyHandler.keyCapture,"blur",f.hitch(this,"onBlur")));this.own(d(this._rtcKeyHandler.keyCapture,"focus",f.hitch(this,"onFocus")))},getKeyCapture:function(){return this._rtcKeyHandler.keyCapture},enableBrowserCopyPaste:function(a){this._rtcKeyHandler.enableBrowserCopyPaste(a)},addBinding:function(a){this._rtcKeyHandler.addBinding(a)},
listenTo:function(a,b){this._rtcKeyHandler.listenTo(a,b)},focus:function(){this.getKeyCapture().style.visibility="visible";this._rtcKeyHandler.focus()},onBlur:function(){this.getKeyCapture().style.visibility="hidden"},onFocus:function(){}})})},"MW/equations/editor/view/MoveKeyCaptureOnFocus":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","dojo/dom-style","MW/equations/editor/utils/EquationPlugin"],function(g,f,e,d,b){return g(b,{pluginId:"view.movekeycaptureonfocus",pluginDependencies:["view.caret",
"view.keyhandler"],constructor:function(a,c){this._caret=a;this._keyHandlerView=c;this.own(e.before(c,"focus",f.hitch(this,"_beforeFocus")))},_beforeFocus:function(){var a=this._caret.getGeometry(),c=this._keyHandlerView.getKeyCapture();d.set(c,{top:a.y+"px",left:a.x+"px",position:"absolute"})}})})},"MW/equations/editor/view/RootNode":function(){define(["dojo/_base/declare","dojo/dom-construct"],function(g,f){return g(null,{pluginId:"view.rootnode",pluginResolver:"getNode",constructor:function(){this._rootNode=
f.create("div",{className:"mwEquationEditor",style:{position:"relative",display:"inline-block"}})},getNode:function(){return this._rootNode},destroy:function(){f.destroy(this._rootNode)}})})},"MW/equations/editor/view/Renderer":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-class dojo/dom-construct MW/equations/editor/utils/EquationPlugin MW/equations/editor/utils/NodeUtils MW/equations/renderer/Renderer".split(" "),function(g,f,e,d,b,a,c,h){return g(a,{pluginId:"view.renderer",
pluginDependencies:["api.attributes","model.equation","view.rootnode"],constructor:function(a,c,d){this._attributes=a;this._rootNode=d;this._renderTarget=b.create("div",{className:"render-target"},this._rootNode);this._equation=c;this.own(e.after(c,"onChange",f.hitch(this,"redraw")));this._createRenderer();["pxPerEm","cacheFontMetrics"].forEach(function(c){this.own(a.observe(c,f.hitch(this,"_handleRendererAttributeChange",c)))},this);this.own(a.observe("disabled",f.hitch(this,"_handleAttributeChange",
"disabled","enabled")));this.own(a.observe("readonly",f.hitch(this,"_handleAttributeChange","readonly","writable")));this.own(a.observe("emptyEquation",f.hitch(this,"_handleEmptyEquationChanged")))},getEquationRenderer:function(){return this._renderer},_handleAttributeChange:function(a,c){this._attributes.get(a)?(d.add(this._rootNode,a),d.remove(this._rootNode,c)):(d.add(this._rootNode,c),d.remove(this._rootNode,a))},_handleEmptyEquationChanged:function(a){this._isEmptyEquation()&&this.redraw()},
_createRenderer:function(){var a={equationFormat:"mathml",cacheFontMetrics:this._attributes.get("cacheFontMetrics")||!1};this._attributes.get("pxPerEm")&&(a.pxPerEm=this._attributes.get("pxPerEm"));this._renderer=new h(a)},_handleRendererAttributeChange:function(){this._createRenderer();this._renderTarget&&this.redraw()},onRedraw:function(){},redraw:function(){if(this._isEmptyEquation()){var a=this._attributes.get("emptyEquation");if("string"===typeof a){var c=this._equation.getRoot().children[0].children[0].id;
b.empty(this._renderTarget);this._renderTarget.innerHTML=a;if(a=this._renderTarget.firstElementChild)a.id=c;return}}this._renderer.draw(this._equation.getRoot(),this._renderTarget).then(f.hitch(this,function(){this.onRedraw()}))},_isEmptyEquation:function(){return c.isEmptyEquation(this._equation.getRoot())}})})},"MW/equations/editor/view/Selection":function(){define(["dojo/_base/declare","dojo/dom-construct","dojo/dom-style"],function(g,f,e){return g(null,{pluginId:"view.selection",pluginDependencies:["view.rootnode"],
constructor:function(d){this._node=f.create("span",{"class":"selection",style:{display:"none",position:"absolute",width:"1px",backgroundColor:"rgba(0,132,230,.35)",height:"16px",zIndex:999}},d);this._hidden={}},getNode:function(){return this._node},hide:function(d){this._hidden[d||"default"]=!0;this._node.style.display="none"},show:function(d){delete this._hidden[d||"default"];this.isHidden()||(this._node.style.display="inline-block")},getGeometry:function(){return{x:this._x,y:this._y,h:this._h,w:this._w}},
isHidden:function(){return 0<Object.keys(this._hidden).length},set:function(d,b,a,c){this._x=d;this._y=b;this._h=c;this._w=a;e.set(this._node,{left:d+"px",display:this.isHidden()?"none":"inline-block",top:b+"px",height:c+"px",width:a+"px"})}})})},"MW/equations/utils/PluginService":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/_base/lang"],function(g,f,e){return f(null,{constructor:function(d){d=d||{};this._disable=d.disable||[];this._dependencies=e.mixin({},d.inject);this._dependencies["core.resolver"]=
this;this._destroyOrder=[];this._byPluginId={};this._byPluginFamily={};this._registry=d.registry||[];this._resolveNames();this._resolveDependencies(d.enable||[])},get:function(d){return this._dependencies[d]},inject:function(d,b){this._dependencies[d]=b},destroy:function(){this._destroyOrder.forEach(function(d){e.isObject(d)&&e.isFunction(d.destroy)&&d.destroy()},this);this._destroyOrder=[];this._dependencies=[]},_resolveNames:function(){this._registry.forEach(function(d){var b=d.prototype,a=b.pluginId,
b=b.pluginFamily;a&&(this._byPluginId[a]||(this._byPluginId[a]=[]),this._byPluginId[a].push(d),b&&(this._byPluginFamily[b]||(this._byPluginFamily[b]=[]),this._byPluginFamily[b].push(a)))},this)},_resolveDependencies:function(d){d.forEach(function(b){this._getOrCreate(b)},this)},_getOrCreate:function(d){if(this._dependencies.hasOwnProperty(d))return this._dependencies[d];if(this._byPluginId[d])return this._createById(d);if(this._byPluginFamily[d]){var b;this._byPluginFamily[d].forEach(e.hitch(this,
function(a){0>this._disable.indexOf(a)&&(b=this._getOrCreate(a))}));return b}},_createById:function(d){var b=this._byPluginId[d][0],a=[];b.prototype.pluginDependencies&&(a=g.map(b.prototype.pluginDependencies,e.hitch(this,"_getOrCreate")));a=new (Function.prototype.bind.apply(b,[null].concat(a)));this._destroyOrder.unshift(a);(b=b.prototype.pluginResolver)&&(a=a[b]());this.inject(d,a);return a}})})},"MW/rtc/plugins/equations/equationeditor/EquationEditorBridge":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/has dojo/on MW/equations/editor/utils/CaretUtilities MW/equations/editor/utils/CursorUtils MW/equations/editor/utils/EquationPlugin MW/equations/editor/utils/NodeUtils".split(" "),
function(g,f,e,d,b,a,c,h,k){var l="up down left right home end ctrl_a meta_a meta_shift_left meta_shift_right meta_left meta_right".split(" "),m="alt_delete alt_backspace shift_delete shift_backspace ctrl_delete ctrl_backspace meta_delete meta_backspace".split(" ");return g(h,{pluginId:"equationeditor.rtc-bridge",pluginDependencies:"api.attributes controller.caret controller.cursor controller.editmanager controller.focus controller.keyhandler controller.mouse controller.selection external.actionservice helper.plaintextgenerator helper.mimetype model.cursor model.equation rtc.divcaret rtc.cursor rtc.deletenode rtc.document rtc.equationnode rtc.keyhandler rtc.undoredo.editblock rtc.updatenode rtc.scrollpane view.caret view.helper view.keyhandler view.rootnode view.selection".split(" "),
constructor:function(a,c,b,d,h,g,k,l,m,x,y,B,D,E,F,I,L,C,M,G,N,P,R,S,K,Q,U){this._attributes=a;this._caretController=c;this._cursorController=b;this._editManager=d;this._selectionController=l;this._actionService=m;this._plainTextGeneratorHelper=x;this._mimeTypeHelper=y;this._cursor=B;this._deleteNode=I;this._equation=D;this._rtcCursor=F;this._rtcDocument=L;this._equationnode=C;this._viewHelper=S;this._updateNode=N;this._scrollPane=P;this._focusController=h;this._keyHandlerView=K;this._rootNode=Q;
this._mouseController=k;this._keyHandler=M;this._rtcEditBlockController=G;this._keyHandlerController=g;U.hide("rtc");this._equationnode.setEditorBridge(this);this._rtcOffset=0;this._installMouseTrap();this.own(e.after(R,"getNode",function(){return E.getBox()}));m.loadActions([{id:"equation-editor-bridge.backspace",key:"backspace",enabled:!0,keyPriority:5,callback:f.hitch(this,"_handleDelete")},{id:"equation-editor-bridge.backspace",key:"delete",enabled:!0,keyPriority:5,callback:f.hitch(this,"_handleDelete")},
{id:"equation-editor-bridge.escape",key:"escape",enabled:!0,callback:f.hitch(this,"_handleESC")},{id:"equation-editor-bridge.enter",enabled:!0,key:"enter",keyPriority:-5,callback:f.hitch(this,"_handleLineBreak")}]);this.own(e.after(d,"beforeBlock",f.hitch(this,"_handleBeforeBlock")));this.own(e.after(d,"afterBlock",f.hitch(this,"_handleAfterBlock")));this.own(e.after(d,"onNewStep",f.hitch(this,"_handleNewUndoStep"),!0));this.own(e.after(B,"onChange",f.hitch(this,"_handleEquationCursorChange")));this.own(a.observe("disabled",
f.hitch(this,"_handleDisabledChange")));this._installKeyDelegates();this.own(e.after(K,"onFocus",f.hitch(this,"_showCursor")));this.own(a.observe("active",function(c){a.get("disabled")||(c?this._showCursor():this._hideCursor())}.bind(this)))},_showCursor:function(){this._rtcCursor.show()},_hideCursor:function(){this._rtcCursor.hide()},convertToText:function(){return this._plainTextGeneratorHelper.convertSelection({node:this._equation.getRoot(),left:0,right:1})},handlePaste:function(a){var c={};this._mimeTypeHelper.acceptedMimeTypes().forEach(function(b){var d=
a(b);d&&(c[b]=d)});this._editManager.createBlock(f.hitch(this,function(a){this._mimeTypeHelper.insertContent(a,c)}))},convertSelection:function(){if(!this._cursorController.hasSelection()){var a=this._equation.getRoot().children[0];return this._mimeTypeHelper.convertRange({node:a,left:0,right:a.children.length})}return this._mimeTypeHelper.convertSelection()},_handleDelete:function(){if(1===this._cursorController.availableCursorPositions())return this._deleteNode.call(null),!0},_handleESC:function(){k.isEmptyEquation(this._equation.getRoot())?
this._deleteNode.call(null):this._rtcCursor.setPosition(this._equationnode.endPosition())},_handleLineBreak:function(){var a=this._cursorController.getPosition();if(k.categorizeNode(a.node)===k.CATEGORY.PLACEHOLDER_ATOM){var a=this._equation.getParentAndIndex(a.node.parent),c=a.parent;if(!("MathMatrix"!==c.className||1!==c.cols||a.index!==c.children.length-1))if(a=c.parent,"MathRow"===a.className&&"MathRoot"===a.parent.className)return this._actionService.executeAction("equationeditor.backspace"),
this._rtcCursor.setPosition(this._equationnode.endPosition()),this._rtcDocument.insertBreak(),!0}},cursorOffsetFromXY:function(a,b){var d=this._caretController.getPositionFromXY(a,b);return d&&c.logicalFromPosition(d,this._equation.getRoot())||0},caretCoordinatesFor:function(b){var d;if(b===this._rtcAnchorOffset&&this._cursor.hasSelection()){d=this._selectionController.getSelectionSpan();var e=a.coordinatesFromSelection(d,this._rootNode);d={y:e.y,height:e.h,x:d.reversed?e.x+e.w:e.x}}d||(b=c.positionFromLogical(b,
this._equation.getRoot()),d=a.coordinatesFromPosition(b,this._rootNode));d||(d={height:10,x:0,y:0});d.width=1;d.pageX=this._viewHelper.getRootGeometry().x+d.x;d.x+=this._equationnode.getLeft();d.y+=this._equationnode.getTop();return d},maxOffset:function(){return this._cursorController.availableCursorPositions()-1},setCursor:function(a,c){this._rtcOffset===a&&this._rtcAnchorOffset===c||("undefined"===typeof c?this._cursorController.setLogical(a):this._cursorController.setSelectionLogical(c,a),this._rtcOffset=
a,this._rtcAnchorOffset=c)},_installMouseTrap:function(){var a=!1;this.own(this._mouseController.addMouseDown(f.hitch(this,function(c){this._rtcCursor.externalMouseDown();c.stopPropagation();a=!0}),12));this.own(this._mouseController.addMouseDoubleClick(function(c){c.stopPropagation();a=!0},12));this.own(this._mouseController.addMouseMove(function(c){a&&c.stopPropagation()},12));this.own(this._mouseController.addMouseUp(function(c){a&&(c.stopPropagation(),a=!1)},12))},_installKeyDelegates:function(){Object.keys(this._keyHandler.keyMap).forEach(function(a){this._keyHandlerController.add(a,
f.hitch(this,function(){1!==this._keyHandlerController._bindings[a]._handlers.length&&0>l.indexOf(a)||0<=m.indexOf(a)||this._keyHandler.keyMap[a].forEach(function(a){a.call(null)})}))},this)},_handleBeforeBlock:function(){this._rtcEditBlockController.startEdit()},_handleNewUndoStep:function(a){var c=this._rtcEditBlockController.getActiveBlock();c.addCommands([a]);this._updateNode();c.pushAndExecuteCommand({execute:f.hitch(this._focusController,"focus"),unexecute:function(){}})},_handleAfterBlock:function(){this._rtcEditBlockController.endEdit();
this._handleEquationCursorChange();this._rtcCursor.onUpdate(!1,!1)},_handleDisabledChange:function(){this._attributes.get("disabled")?(this._cursor.clearSelection(),this._rtcAnchorOffset=this._rtcOffset=void 0,this._actionService.detach()):this._actionService.attach()},_handleEquationCursorChange:function(){var a=this._cursorController.getLogical(),c=this._cursorController.getAnchorLogical();if(!(this._rtcOffset===a&&c===this._rtcAnchorOffset)){"undefined"!==typeof c?(this._rtcOffset=c,this._rtcAnchorOffset=
void 0,this._rtcCursor.releaseAnchor(),this._rtcCursor.setPosition(this._equationnode,{posInNode:c+1}),this._rtcCursor.fixAnchor(!0)):this._rtcCursor.releaseAnchor();this._rtcOffset=a;this._rtcAnchorOffset=c;this._rtcCursor.setPosition(this._equationnode,{posInNode:a+1},!0);var b,e;d("safari")&&(b=this._scrollPane.scrollLeft,e=this._scrollPane.scrollTop);this._focusController.focus();d("safari")&&(this._scrollPane.scrollLeft=b,this._scrollPane.scrollTop=e)}}})})},"MW/rtc/plugins/equations/equationeditor/MathMLMimeConverterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/equations/equationeditor/MathMLMimeConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cutcopypaste.converter"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/equations/equationeditor/MathMLMimeConverter":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/model/PositionUtilities","MW/rtc/plugins/cutcopypaste/MIMETypes","MW/rtc/plugins/equations/equationcontroller/nodes/EquationNode"],
function(g,f,e,d,b){return g(null,{_PRIORITY:95,constructor:function(a){a.registerMimeHandler(d.MATHML_PRESENTATION,f.hitch(this,"_convertFromMimeData"),this._PRIORITY);a.registerNodeConverter(b,f.hitch(this,"_convertFromEquationNode"));a.registerPasteHandler(b,f.hitch(this,"_handlePaste"))},_handlePaste:function(a,c,b){if(a&&(0===a.getStartPosition().getOffset()||a.getEndPosition().getOffset()===a.getEndPosition().getNode().maxOffset())||c&&(0===c.getOffset()||c.getOffset()===c.getNode().maxOffset()))return!1;
(a?a.getStartPosition().getNode():c.getNode()).getEditorBridge().handlePaste(b);return!0},_convertFromEquationNode:function(a){var c=a.getStartPosition().getNode();if(c.isInstanceOf(b)){var f=a.getStartPosition();a=a.getEndPosition();if(0===e.comparePositions(f,a))return[];if(c=c.getEditorBridge())return c=c.convertSelection(),c.push({flavor:d.MATLAB_RICHTEXT,content:void 0}),c}return[]},_convertFromMimeData:function(a){return[(new b({className:"EquationNode",encoding:"mathml",mathmlString:a})).serialize()]},
priority:function(){return 55}})})},"MW/rtc/plugins/equations/export/Equation2HTMLProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/equations/export/Equation2HTML"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/equations/export/Equation2HTML":function(){define(["dojo/_base/declare","MW/rtc/plugins/equations/equationcontroller/nodes/EquationNode","MW/rtc/plugins/equations/equationcontroller/view/EquationViewUtilities",
"MW/rtc/plugins/export/NodeExporterInterface"],function(g,f,e,d){return g([d],{_SCALING:2,constructor:function(){},getApplicableNodeClass:function(){return f},visit:function(b,a,c,d,e){this._writeImageURI(b,a);return!0},_writeImageURI:function(b,a){var c=e.exportDomnodeToImageURL(a.box,this._SCALING);if(c.simpleEquation)b.addToBody(e.simpleEquationToHTML(c.simpleEquation));else{var d=c.dataURL,c='\x3cspan style\x3d"vertical-align:'+Math.round(c.verticalAlign)+'px"\x3e\x3cimg src\x3d"'+d+'" width\x3d"'+
c.width/this._SCALING+'" height\x3d"'+c.height/this._SCALING+'" /\x3e\x3c/span\x3e';b.addToBody(c)}}})})},"MW/rtc/plugins/equations/latexeditor/LaTeXEditorProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","./LaTeXEditor","MW/rtc/core/provider/PluginProvider"],function(g,f,e,d){return g(d,{requires:function(){return{createInstance:["rtc.focusservice","rtc.cursor","rtc.actionservice","rtc.hyperlinkservice","rtc.richtext.equationcontroller"]}},createInstance:function(b,a,c,d,f){var g=
{};g.focusService=b;g.cursor=a;g.actionService=c;g.hyperlinkService=d;g.equationController=f;return new e(g)}})})},"MW/rtc/plugins/equations/latexeditor/LaTeXEditor":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/model/DocumentUtilities MW/rtc/RichTextComponentFeatureEnum ./view/EquationDialog".split(" "),function(g,f,e,d,b,a){return g(null,{constructor:function(a){a=a||{};this._focusService=a.focusService;this._cursor=a.cursor;this._actionService=a.actionService;this._hyperlinkService=
a.hyperlinkService;this._equationController=a.equationController;this._actionService.loadActions([{id:b.EQUATIONS.LATEX_EDITOR_ACTION,enabled:!0,key:"ctrl_shift_l",platformKey:{mac:"meta_shift_l"},callback:f.hitch(this,"_editLaTeXEquation")}]);this._connections=[];this._connections.push(e.after(this._cursor,"onChange",f.hitch(this,this._updateActions)));this._connections.push(e.after(this._equationController,"onActionsNeedUpdate",f.hitch(this,this._updateActions)));this._connections.push(e.after(this._cursor,
"onDoubleClick",f.hitch(this,this._doubleClick)))},_updateActions:function(){this._actionService.updateAction(b.EQUATIONS.LATEX_EDITOR_ACTION,{enabled:this._equationController.canEditLaTeXEquation()})},_doubleClick:function(){this._equationController.equationUnderCursor("tex")&&(this._cursor.resetAction(),this._editLaTeXEquation())},_dlgClose:function(){this.eqnDlg=null;this._focusService.setFocus()},_dlgAccept:function(a){this._equationController.updateDocument(a);setTimeout(f.hitch(this,function(){this._focusService.setFocus()}),
0)},_editLaTeXEquation:function(){if(this._actionService.getAction(b.EQUATIONS.LATEX_EDITOR_ACTION).enabled&&this._equationController.canEditLaTeXEquation()){var c=this._equationController.equationUnderCursor("tex"),c={encoding:"tex",currentNode:c,texString:c?c.getTeXString():this._cursor.selectedText(),displayStyle:c?c.getDisplayStyle():""===this._cursor.getNode().getText().trim()};this.eqnDlg=new a(f.hitch(this,this._dlgClose),f.hitch(this,this._dlgAccept),this._hyperlinkService,c)}},dispose:function(){this._connections.forEach(function(a){a.remove()})}})})},
"MW/rtc/plugins/equations/latexeditor/view/EquationDialog":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/query dojo/aspect dojo/dom-construct dojo/dom-style dojo/keys dojo/on dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dijit/form/SimpleTextarea dojo/i18n!l10n/nls/dialog dojo/i18n!l10n/nls/equationDialog mw-dialog-utils/DialogUtils MW/equations/renderer/Renderer mw-form/PushButton dojo/text!./EquationDialogTemplate.html".split(" "),function(g,f,e,d,b,a,
c,h,k,l,m,p,n,q,r,s,t,u){return g([k,l,m],{templateString:u,constructor:function(a,c,b,d){this._closeCallBack=a;this._acceptCallBack=c;this._hyperlinkService=b;this._info=d},postCreate:function(){this.inherited(arguments);this.okButton.set("label",n.ok);this.cancelButton.set("label",n.cancel);this.helpButton.set("label",q.helpLabel);this.equationCodeLabel.innerHTML=q.codeLabel;this.previewLabel.innerHTML=q.previewLabel;this.codeTextInput.set("value",this._info.texString);h(this.codeTextInput,"input",
f.hitch(this,"onInput"));var a=this;setTimeout(function(){a.codeTextInput.focus()},0);this.keyUpHandler=h(this.okButton,"click",f.hitch(this,"onOK"));h(this.cancelButton,"click",f.hitch(this,"onCancel"));h(this.helpButton,"click",f.hitch(this,"onHelp"));this._equationDialogWidget=r.displayModalDialog(this,q.title,[]);this.renderer=new s({equationFormat:"tex",strictTeX:!0});this._renderPreview(!0)},onTextKeyup:function(a){},onInput:function(){if(!this.textDirty){var a=this;setTimeout(function(){a._renderPreview()},
250);this.textDirty=!0}},_renderPreview:function(a){if(!this._closing&&(this.textDirty||a)){a=!1;b.empty(this.previewTextInput);var c=this.codeTextInput.get("value");c.length&&(a=this.renderer.render(this.renderer.setDisplaystyleIfNeeded(c,!0),this.previewTextInput,{displaystyle:this._info.displayStyle}));this.textDirty=!1;this.okButton.set("Disabled",!a)}},onClose:function(){this._closing=!0;this._closeCallBack()},onCancel:function(){this._closing=!0;this._equationDialogWidget.onClose()},onHelp:function(){this._hyperlinkService.openUrl("matlab:helpview(fullfile(docroot,'matlab','helptargets.map'),'edit_equation')")},
onOK:function(){this._closing=!0;this._info.texString=this.codeTextInput.get("value");this._acceptCallBack(this._info);this.keyUpHandler.remove();this._equationDialogWidget.onClose()}})})},"dojo/_base/query":function(){define(["../query","./NodeList"],function(g){return g})},"MW/rtc/plugins/events/EventHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/events/DefaultEventHandler"],function(g,f,e){return g(f,{isApplicable:function(){return!0},
requires:function(){return{isApplicable:[],createInstance:["rtc.view","rtc.cursor","rtc.cursorcontroller"]}},createInstance:function(d,b,a){return new e(d,b,a)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/events/DefaultEventHandler":function(){define("dojo/_base/declare dojo/_base/event dojo/_base/lang dojo/_base/window dojo/aspect dojo/has dojo/on dojo/touch mw-gesture/GestureDetector mw-gesture/GestureRegistry mw-gesture/util/PointerTypes mw-gesture/util/ButtonValues MW/rtc/plugins/events/EventHandler ./EventHandlerUtilities".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q){return g(n,{constructor:function(b,d,f){this._cursor=d;this._cursorController=f;this._view=b;this._isGestureEnabled=!0;b=b.getDomtarget();this._gestureDetector=new k(b);d=l.tapmove({options:{pointerTypes:[m.MOUSE,m.PEN],numTaps:0},callbacks:{began:e.hitch(this,function(c,b){a("mac")&&c.srcEvent.ctrlKey?this._handleGesture(c.srcEvent,b,e.hitch(this,"_handleSecondaryDown")):this._handleGesture(c.srcEvent,b,e.hitch(this,"_handleSingleDown"));this.onMouseDown(c.srcEvent)}),
recognized:e.hitch(this,function(a){this.onMouseUp(a.srcEvent)})}});f=l.tapmove({options:{pointerTypes:[m.MOUSE,m.PEN],numTaps:0,button:p.RIGHT},callbacks:{began:e.hitch(this,function(a,c){this._handleGesture(a.srcEvent,c,e.hitch(this,"_handleSecondaryDown"));this.onMouseDown(a.srcEvent)}),recognized:e.hitch(this,function(a){this.onMouseUp(a.srcEvent)})}});var h=l.tap({options:{pointerTypes:[m.TOUCH],numTaps:1},callbacks:{recognized:e.hitch(this,function(a,c){this._handleGesture(a.srcEvent,c,e.hitch(this,
"_onTap"))})}}),g=l.tapmove({options:{pointerTypes:[m.MOUSE,m.PEN],numTaps:1},callbacks:{began:e.hitch(this,function(a,c){this._handleGesture(a.srcEvent,c,e.hitch(this,"_onTapDown"));this.onMouseDown(a.srcEvent)}),recognized:e.hitch(this,function(a){this.onMouseUp(a.srcEvent)})}}),q=l.tapmove({options:{pointerTypes:[m.MOUSE,m.PEN],numTaps:2},callbacks:{began:e.hitch(this,function(a,c){this._handleGesture(a.srcEvent,c,e.hitch(this,"_onDoubleTapDown"));this.onMouseDown(a.srcEvent)}),recognized:e.hitch(this,
function(a){this.onMouseUp(a.srcEvent)})}});q.getCoordinator().prevents(g);q.getCoordinator().prevents(d);g.getCoordinator().prevents(d);d.getCoordinator().prevents(f);this._gestureDetector.add([q,g,d,h,f]);this.own(c(b,"selectstart",e.hitch(this,"_handleSelectStart")));this._focusHandle=c.pausable(b,"focus",e.hitch(this,"onFocus"));this.own(this._focusHandle);a("chrome")||this.own(c.pausable(b,"focusin",e.hitch(this,this.onFocus)))},destroy:function(){this.inherited(arguments);this._gestureDetector.destroy();
this._gestureDetector=null},_handleGesture:function(a,c,b){if(this.isGestureEnabled()){var d;d=this._view.fixEvent(a);this._view.isFixedEventOutside(d)||(this._cursor.show(),d=this._view.getPositionFromEvent(d),b(a,c,d),q.collapseBrowserSelection())}},_handleSingleDown:function(a,c,b){this._view.isDraggable()&&this._cursorController.isEventInSelection(a)?this._startDragAction(a,c,b):(this.onFocus(),this._startSelectionAction(a,c,b),f.stop(a))},_onTapDown:function(a,c,b){this._startWordSelectionAction(a,
c,b,!0);q.preventDefaultIfTouchEvent(a)},_onDoubleTapDown:function(a,c,b){this._startLineSelectionAction(a,c,b);q.preventDefaultIfTouchEvent(a)},_handleSecondaryDown:function(a,c,b){this._startSecondarySelectionAction(a,c,b)},_onTap:function(a,c,b){this._cursor.resetAction();this._cursor.setCursorToEvent(a)},_startDragAction:function(a,c,b){var d=this;this._focusHandle.pause();q.startDragActionForGesture(c,this._cursorController,this._view);c.onTemp({after:function(){d._focusHandle.resume();d.onFocus()}})},
_startSelectionAction:function(a,c,b){var d=this;q.startSelectionActionForGesture(c,this._cursorController,this._view,a,b);c.onTemp({after:function(){d.onFocus()}})},_startWordSelectionAction:function(a,c,b){var d=this;q.startWordSelectionActionForGesture(c,this._cursorController,this._view,a,b);c.onTemp({after:function(){d.onFocus()}})},_startLineSelectionAction:function(a,c,b){var d=this;q.startLineSelectionActionForGesture(c,this._cursorController,this._view,a,b);c.onTemp({after:function(){d.onFocus()}})},
_startSecondarySelectionAction:function(a,c,b){q.startSecondarySelectionActionForGesture(c,this._cursorController,this._view,a,b)},_handleSelectStart:function(a){var c=a.target.tagName;"TEXTAREA"===c||"INPUT"===c||a.preventDefault()},disableGesture:function(){this._isGestureEnabled=!1},enableGesture:function(){this._isGestureEnabled=!0},isGestureEnabled:function(){return this._isGestureEnabled},onMouseDown:function(a){},onMouseUp:function(a){},onFocus:function(a){},onBlur:function(a){}})})},"MW/rtc/plugins/events/EventHandler":function(){define(["dojo/_base/declare",
"MW/rtc/abstract/AbstractPlugin"],function(g,f){return g(f,{onMouseDown:function(e){throw Error("Unimplemented API: onMouseDown");},onMouseUp:function(e){throw Error("Unimplemented API: onMouseUp");},onFocus:function(e){throw Error("Unimplemented API: onFocus");},onBlur:function(e){throw Error("Unimplemented API: onBlur");}})})},"MW/rtc/plugins/events/EventHandlerUtilities":function(){define(["dojo/_base/window","dojo/has","mw-gesture/input/PointerInputUtil"],function(g,f,e){var d=function(a,c,b){var d;
c=a.fixEvent(c);f("mozilla")&&0===c.layerX&&0===c.layerY?d=void 0:(a.isFixedEventOutside(c)?(d=a.getFixedEventDirectionOutside(c),a=a.getFixedEventPositionAtBorder(c)):a=a.getPositionFromEvent(c),d={diffXY:d,position:a});if(d)b.onMove(d.position,d.diffXY,c.layerY,c.offsetX)},b=function(){var a=g.global.getSelection();a.isCollapsed||a.collapseToStart()};return{startSelectionActionForGesture:function(a,c,e,f,g){var m=e.fixEvent(f),p;p=f.altKey?c.startBlockSelectionAction(g,f.shiftKey,m.layerY,m.offsetX):
c.startSelectionAction(g,f.shiftKey,f.layerY);var n=f.altKey;a.onTemp({progress:function(a){a=a.srcEvent;var r=a.altKey;n===r?d(e,a,p):(n=r,p=a.altKey?c.startBlockSelectionAction(g,f.shiftKey,m.layerY,m.offsetX):c.startSelectionAction(g,f.shiftKey,f.layerY));b()},recognized:function(a){p.resolve();b()},cancelled:function(){p.cancel()},after:function(){b()}})},startWordSelectionActionForGesture:function(a,c,e,f,g){var m=c.startGroupedSelectionAction(g,f.shiftKey,f.layerY,!0);a.onTemp({progress:function(a){d(e,
a.srcEvent,m);b()},recognized:function(a){m.resolve();b()},cancelled:function(){m.cancel()},after:function(){b()}})},startLineSelectionActionForGesture:function(a,c,e,f,g){var m=c.startGroupedSelectionAction(g,f.shiftKey,f.layerY,!1);a.onTemp({progress:function(a){d(e,a.srcEvent,m);b()},recognized:function(a){m.resolve();b()},cancelled:function(){m.cancel()},after:function(){b()}})},startSecondarySelectionActionForGesture:function(a,c,d,e,f){var g=c.startSecondarySelectionAction(f,e.shiftKey,e.layerY);
a.onTemp({recognized:function(){g.resolve()},cancelled:function(){g.cancel()},after:function(){b()}})},startDragActionForGesture:function(a,c,d){d.setDomTargetDraggable(!0);var e=c.startDragAction();a.onTemp({recognized:function(a){a=d.fixEvent(a.srcEvent);if(!d.isFixedEventOutside(a))e.onUp(d.getPositionFromEvent(a));e.resolve()},cancelled:function(){e.cancel()},after:function(){d.setDomTargetDraggable(!1);b()}})},preventDefaultIfTouchEvent:function(a){e.isTouchEvent(a)&&a.preventDefault()},collapseBrowserSelection:b}})},
"MW/rtc/plugins/execution/ExecutionActionsProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/debug/DebugServicesFactory","MW/rtc/plugins/execution/ExecutionActions"],function(g,f,e,d){return g(f,{requires:function(){return{createInstance:"rtc.actionservice rtc.embeddedoutputs.executionmanager rtc.code.matlabfiletype matlab.services.busyidle debug.breakpoint.temporary debug.documentdirtyservice rtc.cursorcontroller rtc.embeddedoutputs.statehandler rtc.execution.controlc rtc.keyhandler rtc.embeddedoutputs rtc.linenumberservice".split(" ")}},
createInstance:function(b,a,c,f,g,l,m,p,n,q,r,s){var t=e.getInstance();return new d(b,a,c,f,g,l,m,t,p,n,q,r,s)}})})},"MW/rtc/plugins/execution/ExecutionActions":function(){define("dojo/aspect dojo/_base/declare dojo/_base/lang dojo/i18n!l10n/nls/execution MW/rtc/abstract/AbstractPlugin MW/rtc/plugins/execution/RunToLineEventData".split(" "),function(g,f,e,d,b,a){return f(b,{CONTINUE_ACTION_ID:"rtc_continue",STEP_ACTION_ID:"rtc_step",STOP_ACTION_ID:"rtc_stop_execution",PAUSE_ACTION_ID:"rtc_pause",
RUN_TO_LINE_ACTION_ID:"rtc_run_to_line",CONTINUE_TO_LINE_ACTION_ID:"rtc_continue_to_line",constructor:function(a,b,d,f,m,p,n,q,r,s,t,u,v){this._actionService=a;this._executionManager=b;this._fileTypeService=d;this._busyIdleService=f;this._temporaryBreakpointManager=m;this._documentDirtyService=p;this._cursorController=n;this._debugServices=q;this._stateHandler=r;this._controlC=s;this._keyHandler=t;this._embeddedOutputs=u;this._lineNumberService=v;this._createActions();this._isBusy=this._busyIdleService.isBusy();
this._isDebugging=this._debugServices.isDebugging;this._isScriptFile=this._fileTypeService.isScript();this._cursorHasSelection=this._isDirtyWhileDebugging=!1;this._isExecutionEnabled=this._embeddedOutputs.isEmbeddedOutputsEnabled();this._refreshActions(this._isBusy,this._isDebugging,this._isScriptFile,this._isDirtyWhileDebugging,this._cursorHasSelection,this._isExecutionEnabled);this.own(g.after(this._fileTypeService,"onFileTypeChange",e.hitch(this,"_handleFileTypeChange")));this.own(g.after(this._busyIdleService,
"onIdleBusyStatusChange",e.hitch(this,"_handleBusyIdleChange"),!0));this.own(g.after(this._documentDirtyService,"onDocumentDirtiedWhileDebugging",e.hitch(this,"_handleDocumentDirtiedWhileDebugging"),!0));this.own(g.after(this._cursorController,"onUpdate",e.hitch(this,"_handleCursorControllerUpdate")));this.own(g.after(this._debugServices,"onDebugModeChanged",e.hitch(this,"_handleDebugModeChanged"),!0));this.own(g.after(this._embeddedOutputs,"onEmbeddedOutputsStateChange",e.hitch(this,"_handleEOEnablementStateChanged"),
!0))},_createActions:function(){var a=[{id:this.CONTINUE_ACTION_ID,enabled:!1,key:"f5",platformKey:{mac:"f5"},shortcut:d.continueShortcut,text:d.continueLabel,description:d.continueDescription,callback:e.hitch(this,"_performContinue")},{id:this.STOP_ACTION_ID,enabled:!1,key:"shift+f5",platformKey:{mac:"shift+f5"},shortcut:d.stopShortcut,text:d.stopLabel,description:d.stopDescription,callback:e.hitch(this,"_performStop")},{id:this.STEP_ACTION_ID,enabled:!0,key:"f10",platformKey:{mac:"f10"},text:d.stepLabel,
shortcut:d.stepShortcut,description:d.stepDescription,callback:e.hitch(this,"_performStep")},{id:this.PAUSE_ACTION_ID,enabled:!1,key:"ctrl_f5",platformKey:{mac:"meta_f5"},shortcut:d.pauseShortcut,text:d.pauseLabel,description:d.pauseDescription,callback:e.hitch(this,"_performPause")},{id:this.RUN_TO_LINE_ACTION_ID,enabled:!0,text:d.runToLineLabel,description:d.runToLineDescription,callback:e.hitch(this,"_performRunToLine")},{id:this.CONTINUE_TO_LINE_ACTION_ID,enabled:!1,text:d.continueToLineLabel,
description:d.continueToLineDescription,callback:e.hitch(this,"_performContinueToLine")}];this._actionService.loadActions(a);this._addAdditionalKeyBindings()},_addAdditionalKeyBindings:function(){this._keyHandler.addBindings([{platformKey:{mac:"meta_shift_o"},action:this.STEP_ACTION_ID}])},_performContinue:function(){return this._isDebugging?(this._debugServices.debugContinue(),!0):!1},_performStep:function(){if(this._isDebugging)this._debugServices.debugStep();else return this._stepToFirstLine();
return!0},_stepToFirstLine:function(){var c=0<this._lineNumberService.getNumberOfCodeLines();return!this._stateHandler.isRunning()&&c?(this._performRunToLine(new a(0)),!0):!1},_performStop:function(){var a=this._stateHandler.isRunning();this._isDebugging&&!this._isBusy?this._debugServices.debugExit():this._isBusy&&a?this._executionManager.interrupt():this._controlC.interrupt();return!0},_performPause:function(){this._debugServices.debugPause();this._actionService.updateAction(this.PAUSE_ACTION_ID,
{enabled:!1,text:d.pausingLabel,description:d.pausingDescription});return!0},_performRunToLine:function(a){this._temporaryBreakpointManager.setBreakpoint(a.lineNumber).then(e.hitch(this._actionService,"executeAction","rtc_refresh_outputs"))},_performContinueToLine:function(a){this._temporaryBreakpointManager.setBreakpoint(a.lineNumber).then(e.hitch(this._debugServices,"debugContinue"))},_handleBusyIdleChange:function(a){this._isBusy=a;this._refreshActions(this._isBusy,this._isDebugging,this._isScriptFile,
this._isDirtyWhileDebugging,this._cursorHasSelection,this._isExecutionEnabled)},_handleDocumentDirtiedWhileDebugging:function(){this._isDirtyWhileDebugging=!0;this._refreshActions(this._isBusy,this._isDebugging,this._isScriptFile,this._isDirtyWhileDebugging,this._cursorHasSelection,this._isExecutionEnabled)},_handleCursorControllerUpdate:function(){var a=this._cursorController.hasSelection();this._cursorHasSelection!==a&&(this._cursorHasSelection=a,this._refreshActions(this._isBusy,this._isDebugging,
this._isScriptFile,this._isDirtyWhileDebugging,this._cursorHasSelection,this._isExecutionEnabled))},_handleDebugModeChanged:function(a){this._isDebugging=a;this._isDirtyWhileDebugging=!1;this._refreshActions(this._isBusy,this._isDebugging,this._isScriptFile,this._isDirtyWhileDebugging,this._cursorHasSelection,this._isExecutionEnabled)},_handleDBCont:function(){this._isBusy=!0;this._refreshActions(this._isBusy,this._isDebugging,this._isScriptFile,this._isDirtyWhileDebugging,this._cursorHasSelection,
this._isExecutionEnabled)},_handleEOEnablementStateChanged:function(a){this._isExecutionEnabled=a;this._refreshActions(this._isBusy,this._isDebugging,this._isScriptFile,this._isDirtyWhileDebugging,this._cursorHasSelection,this._isExecutionEnabled)},_handleFileTypeChange:function(){this._isScriptFile=this._fileTypeService.isScript();this._refreshActions(this._isBusy,this._isDebugging,this._isScriptFile,this._isDirtyWhileDebugging,this._cursorHasSelection,this._isExecutionEnabled)},_refreshActions:function(a,
b,e,f,g,p){this._actionService.updateAction(this.STEP_ACTION_ID,{enabled:!a&&b||p&&!a&&e});this._actionService.updateAction(this.PAUSE_ACTION_ID,{enabled:a});this._actionService.updateAction(this.STOP_ACTION_ID,{enabled:a||b});this._actionService.updateAction(this.RUN_TO_LINE_ACTION_ID,{enabled:!a&&!b&&e&&!g&&p});this._actionService.updateAction(this.CONTINUE_TO_LINE_ACTION_ID,{enabled:!a&&b&&!f&&!g});this._actionService.updateAction(this.CONTINUE_ACTION_ID,{enabled:!a&&b});a||this._actionService.updateAction(this.PAUSE_ACTION_ID,
{text:d.pauseLabel,description:d.pauseDescription})}})})},"MW/rtc/plugins/execution/ControlCServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/execution/ControlCService"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.editordataservice"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/execution/ControlCService":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin"],function(g,
f){return g(f,{_CONTROL_C_FEATURE_ID:"rtc.execution.controlc",constructor:function(e){this._editorDataService=e},interrupt:function(){this._editorDataService.request(this._CONTROL_C_FEATURE_ID).then(function(){},function(){})}})})},"MW/rtc/plugins/execution/BusyIdleServicesProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/execution/BusyIdleServices"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.editordataservice"]}},
createInstance:function(d){return new e(d)},priority:function(){return 1}})})},"MW/rtc/plugins/execution/BusyIdleServices":function(){define(["dojo/aspect","dojo/_base/declare","dojo/_base/lang","mw-messageservice/MessageService","MW/rtc/plugins/execution/AbstractBusyIdleService"],function(g,f,e,d,b){return f(b,{_BUSY_IDLE_FEATURE_ID:"matlab.busyidle",_channel:"/editor/busy-idle-state-change",constructor:function(a,c){this._isBusy=!1;this._listener=a.listenTo(this._BUSY_IDLE_FEATURE_ID,e.hitch(this,
"_handleBusyIdleChange"));this.messageService=c||d;this.messageService.subscribe(this._channel,"_handleBusyIdleChange",this)},isBusy:function(){return this._isBusy},_handleBusyIdleChange:function(a){this._isBusy=a.data.isBusy;this.onIdleBusyStatusChange(this._isBusy)},destroy:function(){this.inherited(arguments);this._listener.remove();this.messageService.unsubscribe(this._channel,"_handleBusyIdleChange",this)}})})},"MW/rtc/plugins/execution/AbstractBusyIdleService":function(){define(["dojo/aspect",
"dojo/_base/declare","dojo/_base/lang","mw-log/Log","MW/rtc/abstract/AbstractPlugin"],function(g,f,e,d,b){return f(b,{constructor:function(){},onIdleBusyStatusChange:function(a){},isBusy:function(){d.error("AbstractBusyIdleService.isBusy Unimplemented")}})})},"MW/rtc/plugins/execution/margin/DecoratableExecutionMarginProvider":function(){define(["dojo/dom-attr","dojo/dom-class","dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/margin/DecoratableRangeMargin"],function(g,f,e,d,b){return e(d,
{requires:function(){return{isApplicable:[],createInstance:"rtc.view rtc.internaldocument rtc.linenumberservice rtc.focusservice margin.statusactionbar.sectionsdecorator margin.statusactionbar.stalesectionsdecorator margin.statusactionbar.stalesectionsbackgrounddecorator".split(" ")}},createInstance:function(a,c,d,e,g,m,p){a=new b(a,c,e,[g,m,p],500,null,null);f.add(a.getMarginElement(),"executionMargin");return a}})})},"MW/rtc/plugins/find/FindProvider":function(){define(["dojo/_base/declare","dojo/_base/lang",
"MW/rtc/plugins/language/matlab/utilities/MatlabPluginUtilities","MW/rtc/plugins/find/FindHandler","MW/rtc/core/provider/PluginProvider"],function(g,f,e,d,b){return g(b,{requires:function(){return{createInstance:"rtc.focusservice rtc.document rtc.internaldocument rtc.cursor rtc.actionservice rtc.view.visibility".split(" ")}},createInstance:function(a,c,b,e,f,g){return new d(a,c,b,e,f,g)},destroyInstance:function(a){a.cleanup();a.destroy()}})})},"MW/rtc/plugins/find/FindHandler":function(){define("dojo/_base/array dojo/aspect dojo/_base/declare dojo/_base/lang dojo/dom-style dojo/window MW/rtc/abstract/AbstractPlugin MW/rtc/plugins/find/FindUtilities MW/rtc/plugins/find/view/FindDialog MW/rtc/plugins/find/FindPreference MW/rtc/RichTextComponentFeatureEnum".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m){return e(c,{constructor:function(a,c,b,e,h,g){this._focusService=a;this._document=c;this._internalDocument=b;this._cursor=e;this._actionService=h;this._visibilityNotifier=g;this._dialogInstance=null;this._withReplaceOption=!1;a=[{id:m.FIND_STRING.FIND_ACTION,enabled:!0,key:"ctrl_f",platformKey:{mac:"meta_f"},callback:d.hitch(this,"_createFindDialogCallback")},{id:m.FIND_STRING.FIND_NEXT_ACTION,enabled:!1,key:"f3",platformKey:{mac:"meta_g"},callback:d.hitch(this,"_findNextCallback")},
{id:m.FIND_STRING.FIND_PREVIOUS_ACTION,enabled:!1,key:"shift_f3",platformKey:{mac:"meta_shift_g"},callback:d.hitch(this,"_findPreviousCallback")},{id:m.FIND_STRING.FIND_SELECTION_ACTION,enabled:!1,key:"ctrl_f3",platformKey:{mac:"meta_e"},callback:d.hitch(this,"_findSelectionCallback")}];this._actionService.loadActions(a);var k=this;this.own(f.after(this._cursor,"onChange",d.hitch(this,function(){var a=0!==k._cursor.selectedText().length;k._actionService&&k._actionService.updateAction(m.FIND_STRING.FIND_SELECTION_ACTION,
{enabled:a})})));this.own(f.after(this._visibilityNotifier,"onHide",d.hitch(this,"cleanup")))},_createFindDialogCallback:function(){if(this._actionService.getAction(m.FIND_STRING.FIND_ACTION).enabled)return this.createFindDialog()},_findNextCallback:function(){if(this._actionService.getAction(m.FIND_STRING.FIND_NEXT_ACTION).enabled)return this.find({backward:!1,keyFind:!0})},_findPreviousCallback:function(){if(this._actionService.getAction(m.FIND_STRING.FIND_PREVIOUS_ACTION).enabled)return!!this.find({backward:!0,
keyFind:!0})},_findSelectionCallback:function(){if(this._actionService.getAction(m.FIND_STRING.FIND_SELECTION_ACTION).enabled)return this.find({backward:!1,selectionKey:!0})},registerReplaceFeature:function(){this._withReplaceOption=!0},createFindDialog:function(){var a=null;if(null!==this._dialogInstance)return this._dialogInstance.findTextInput.focus(),this._dialogInstance;this._resizeHandle=f.after(window,"onresize",d.hitch(this,"_resize"));var c=this._cursor.selectedText(),b=this._internalDocument.isReadOnly();
""!==c.trim()&&l.setFindText(c);l.setReadOnlyFileStatus(b);this._withReplaceOption&&(a=d.hitch(this,this._replace));this._dialogInstance=new k(d.hitch(this,this.find),a,d.hitch(this,this._close),l);this._resize();return this._dialogInstance},_resize:function(){var c=a.getBox(),d=this._dialogInstance.getParent().domNode,e=b.get(d,"width"),f=b.get(d,"height"),e=c.w/2-parseInt(e,10)/2,c=c.h/2-parseInt(f,10)/2;b.set(d,{top:c+"px",left:e+"px"})},_findOnce:function(a){var c={};a.keyFind?c=l.getLastSearchOptions():
a.selectionKey?(c.text=this._cursor.selectedText(),c.caseSensitive=!1,c.wholeWords=!1):c=this._getFindObject();c.backward=a.backward;if(a.continueAtStart||null!==a.continueAtStart&&void 0!==a.continueAtStart&&!1===a.continueAtStart)c.continueAtStart=a.continueAtStart;a=null;this._cursor.hasSelection()&&(a=this._cursor.getCoordinatesOfSelection(),this._cursor.internalCollapseSelection(c.backward?this._cursor.LEFT:this._cursor.RIGHT),this._cursor.onUpdate());var b=this._cursor.getPosition();c.startAt=
b;var d=h.find(this._internalDocument,c.text,c);l.setLastSearchOptions(c.text,c.caseSensitive,c.wholeWords);this._actionService.updateAction(m.FIND_STRING.FIND_NEXT_ACTION,{enabled:!0});this._actionService.updateAction(m.FIND_STRING.FIND_PREVIOUS_ACTION,{enabled:!0});return(!d||d.line===b.line&&d.column===b.column)&&a?(this._cursor.setSelectionFromCoordinates(a),!1):d},_findWithoutScrollingView:function(a){if(a=this._findOnce(a))this._cursor.setPosition(a),this._cursor.onUpdate(!0);return a},find:function(a){a=
this._findOnce(a);this._setPositionAndScrollView(a);return a},_getFindObject:function(){return{text:l.getFindText(),caseSensitive:l.getMatchCaseChecked(),wholeWords:l.getWholeWordChecked(),isFileReadOnly:l.getReadOnlyFileStatus()}},_setPositionAndScrollView:function(a){if(a)return this._cursor.setPosition(a),this._cursor.onUpdate(),!0},_replace:function(a,c){var b=this._getFindObject();if(!(""===b.text||b.text===a||this._internalDocument.isReadOnly())){var d=this._document.startBlockEdit();c?this._replaceAllOccurrence(b,
a):this._replaceOccurrence(b,a);this._document.endBlockEdit(d)}},_replaceOccurrence:function(a,c){var b=this._cursor.selectedText().toLowerCase()===a.text.toLowerCase();return this._cursor.hasSelection()&&b||this.find({backward:!1})?(this._document.insertTextAtCurrentPosition(c),!0):!1},_replaceAllOccurrence:function(a,c){var b=this._cursor.getPosition();this._cursor.setLineColumn(1,1);for(var d=this._findWithoutScrollingView({backward:!1,continueAtStart:!1});d;)this._cursor.isCursorReadOnly()||this._document.insertTextAtCurrentPosition(c),
d=this._findWithoutScrollingView({backward:!1,continueAtStart:!1});this._setPositionAndScrollView(b)},_close:function(){this._resizeHandle.remove();this._focusService.setFocus();this._dialogInstance&&(this._dialogInstance=null)},cleanup:function(){this._dialogInstance&&(this._dialogInstance.onClose(),this._dialogInstance=null)}})})},"MW/rtc/plugins/find/FindUtilities":function(){define([],function(){return{_REGEX_SPECIAL_CHARS:"!\\(\\)\\[\\]\\{\\}\\-\\+\\*,\x3d\\.\\?\\/\\:;%'\"\x26\x3c\x3e\\|\\^",
find:function(g,f,e){return e.hasOwnProperty("findAll")&&e.findAll?(e.findAll=!1,e.startAt={line:0,column:0},e.backwards=!1,this._findAll(g,f,e)):this._findOne(g,f,e)},adjustMatch:function(g,f){var e=g[0].length-f.length,d=g[0].length-1;if(1===e){for(var b=!1,a=0;a<f.length;a++)if(f.charAt(a)!==g[0].charAt(a)){g[0]=g[0].substring(1);g.index+=1;b=!0;break}b||(g[0]=g[0].substring(0,d))}2==e&&(g[0]=g[0].substring(0,d),g[0]=g[0].substring(1),g.index+=1)},_findOne:function(g,f,e){var d=0,b=0;e=e||{};e.startAt&&
(d=e.startAt.line,b=e.startAt.column);var a=d,c=b,h=g.getLineNode(d),h=h.getTextForPositioning(),k=!(e.hasOwnProperty("backward")&&e.backward),l=e.hasOwnProperty("caseSensitive")&&e.caseSensitive||!1,m=e.hasOwnProperty("wholeWords")&&e.wholeWords||!1,p=e.hasOwnProperty("regexp")&&e.regexp||!1,n=e.hasOwnProperty("continueAtStart")?e.continueAtStart:!0;e=f.length;k?h=h.substring(b):(h=h.substring(0,b),b=0);l||(h=h.toLowerCase(),p||(f=f.toLowerCase()));var q=f,r=RegExp("[\\s"+this._REGEX_SPECIAL_CHARS+
"]").exec(q);!p&&(m&&!r)&&(p=!0,f="(?:^|\\s|["+this._REGEX_SPECIAL_CHARS+"])"+f+("(?:$|\\s|["+this._REGEX_SPECIAL_CHARS+"])"));for(r=!1;;){if(p){var s=RegExp(f,"g"+(!l?"i":"")),t=s.exec(h);if(t){g=t.index;t[0].length>e&&m&&(s.lastIndex-=1,this.adjustMatch(t,q),g=t.index);if(!k&&0<t[0].length)for(k=t;k;)if(k=s.exec(h))t=k,t[0].length>e&&m&&(s.lastIndex-=1,this.adjustMatch(t,q),g=t.index);return{anchor:{line:d,column:b+g},line:d,column:b+g+t[0].length}}}else if(r&&(h=h.substring(0,h.length)),s=-1,s=
k?h.indexOf(f):h.lastIndexOf(f),0<=s)return{anchor:{line:d,column:b+s},line:d,column:b+s+f.length};if(r)return null;d=k?d+1:d-1;b=0;h=g.getLineNode(d);if(!h){if(!n)return null;d=k?0:g.getMaxLineNumber()-1;h=g.getLineNode(d)}if(d===a){if(k&&0===c||!k&&c===g.getLineNode(d).getText().length)return null;r=!0}h=h.getTextForPositioning();l||(h=h.toLowerCase())}},_findAll:function(g,f,e){for(var d=[],b=0,a=this._findOne(g,f,e);null!==a;)d[b]=a,e.startAt={line:a.line,column:a.column+1},a=this._findOne(g,
f,e),b+=1;return d}}})},"MW/rtc/plugins/find/view/FindDialog":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/query dojo/aspect dojo/dom-construct dojo/dom-style dojo/keys dojo/on dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!./FindDialogTemplate.html dijit/form/Button dijit/form/TextBox dijit/form/CheckBox dojo/i18n!l10n/nls/dialog dojo/i18n!l10n/nls/findDialog mw-dialog-utils/DialogUtils".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u){return g([k,
l,m],{templateString:p,constructor:function(a,c,b,d){this._findCallBack=a;this._replaceCallBack=c;this._closeCallBack=b;this._findDialogWidget=null;this._replaceSearchString=this._findSearchString=this.findTextInput="";this._wholeWordSet=this._matchCaseSet=!1;this._findDialogPreferences=d},postCreate:function(){this.inherited(arguments);var a=t.findAndReplaceTitle;this.findNextButton.set("label",t.findNextButton);this.replaceButton.set("label",t.replaceButton);this.replaceAllButton.set("label",t.replaceAllButton);
this.findPreviousButton.set("label",t.findPreviousButton);this.matchCaseLabel.innerHTML=t.matchCaseLabel;this.wholeWordLabel.innerHTML=t.wholeWordLabel;this.findTextLabel.innerHTML=t.findTextLabel;this.replaceTextLabel.innerHTML=t.replaceTextLabel;this.findTextInput.set("value",this._findDialogPreferences.getFindText());this.replaceTextInput.set("value",this._findDialogPreferences.getReplaceText());this.matchCaseCheckBox.set("checked",this._findDialogPreferences.getMatchCaseChecked());this.wholeWordCheckBox.set("checked",
this._findDialogPreferences.getWholeWordChecked());this._matchCaseSet=this.matchCaseCheckBox.checked;this._wholeWordSet=this.wholeWordCheckBox.checked;this._findDialogPreferences.getReadOnlyFileStatus()&&(this.replaceButton.set("Disabled",!0),this.replaceAllButton.set("Disabled",!0),this.replaceTextInput.set("Disabled",!0));h(this.findTextInput,"onkeyup",f.hitch(this,"onTextKeyup"));h(this.findTextInput,"change",f.hitch(this,"_handleTextChange"));var c=this;setTimeout(function(){c.findTextInput&&
c.findTextInput.focus()},0);this.findNextButton.set("data-findNextButtonId","findNextButton");this.findPreviousButton.set("data-findPreviousButtonId","findPreviousButton");this.replaceButton.set("data-replaceButtonId","replaceButton");this.replaceAllButton.set("data-replaceAllButtonId","replaceAllButton");this.findTextInput.set("data-findTextInputId","findTextInput");this.replaceTextInput.set("data-replaceTextInputId","replaceTextInput");this.matchCaseCheckBox.set("data-matchCaseCheckBoxId","matchCaseCheckBox");
this.wholeWordCheckBox.set("data-wholeWordCheckBoxId","wholeWordCheckBox");this.matchCaseLabel.setAttribute("data-matchCaseLabelId","matchCaseLabel");this.wholeWordLabel.setAttribute("data-wholeWordLabelId","wholeWordLabel");h(this.findNextButton,"click",f.hitch(this,"onFind",!1));h(this.findPreviousButton,"click",f.hitch(this,"onFind",!0));h(this.matchCaseCheckBox,"click",f.hitch(this,"onCheckBoxClick",!1));h(this.wholeWordCheckBox,"click",f.hitch(this,"onCheckBoxClick",!0));h(this.replaceButton,
"click",f.hitch(this,"onReplace",!1));h(this.replaceAllButton,"click",f.hitch(this,"onReplace",!0));var b={"data-testid":"rteFindDialog",layoutId:"rteFindDialog",closeCallBack:f.hitch(this,this.onClose),resizable:!1};this._replaceCallBack||(a=t.findTitle,this.replace.style.display="none");this._findDialogWidget=u.displayNonModalDialog(a,this,b);this._findDialogWidget.findTextInput.focusNode.select();d.before(this._findDialogWidget,"onClose",f.hitch(this,this.saveDialogState));this._findDialogWidget.domNode.addEventListener("click",
f.hitch(this,function(a){"replaceTextInput"!==a.target.name&&this.findTextInput.focus()}))},saveDialogState:function(){this._findDialogPreferences.setFindText(this._findSearchString);this._findDialogPreferences.setReplaceText(this._replaceSearchString);this._findDialogPreferences.setMatchCaseChecked(this._matchCaseSet);this._findDialogPreferences.setWholeWordChecked(this._wholeWordSet)},onTextKeyup:function(a){this._handleTextChange();if(a.keyCode===c.ENTER)this.onFind(!1),this.findTextInput.focus();
else if(a.keyCode===c.ESCAPE)this.onClose()},_handleTextChange:function(a){this._findSearchString=this.findTextInput.get("value");this._replaceSearchString=this.replaceTextInput.get("value")},onClose:function(){this._closeCallBack()},onCheckBoxClick:function(){this._matchCaseSet=this.matchCaseCheckBox.checked;this._wholeWordSet=this.wholeWordCheckBox.checked},onFind:function(a){this.saveDialogState();this._findCallBack({backward:a});a?this.findPreviousButton.focus():this.findNextButton.focus()},onReplace:function(a){this.saveDialogState();
var c=this.replaceTextInput.get("value");this._replaceCallBack(c,a);a?this.replaceAllButton.focus():(this._findCallBack({backward:!1}),this.replaceButton.focus())}})})},"MW/rtc/plugins/find/FindPreference":function(){define([],function(){return{_findTextHistory:"",_replaceTextHistory:"",_matchCaseHistory:!1,_wholeWordHistory:!1,_isFileReadOnly:!1,_lastSearchedText:"",_lastMatchCase:!1,_lastWholeWord:!1,setFindText:function(g){g=g.split("\n");this._findTextHistory=0<g.length?g[0]:""},getFindText:function(){return this._findTextHistory},
setReplaceText:function(g){this._replaceTextHistory=g.trim()},getReplaceText:function(){return this._replaceTextHistory},setMatchCaseChecked:function(g){this._matchCaseHistory=g},getMatchCaseChecked:function(){return this._matchCaseHistory},setWholeWordChecked:function(g){this._wholeWordHistory=g},getWholeWordChecked:function(){return this._wholeWordHistory},setReadOnlyFileStatus:function(g){this._isFileReadOnly=g},getReadOnlyFileStatus:function(){return this._isFileReadOnly},setLastSearchOptions:function(g,
f,e){this._lastSearchedText=g;this._lastMatchCase=f;this._lastWholeWord=e},getLastSearchOptions:function(){return{text:this._lastSearchedText,caseSensitive:this._lastMatchCase,wholeWords:this._lastWholeWord}}}})},"MW/rtc/plugins/find/ReplaceProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/plugins/find/ReplaceHandler","MW/rtc/core/provider/PluginProvider"],function(g,f,e,d){return g(d,{requires:function(){return{createInstance:["rtc.actionservice","rtc.navigate.find"]}},
createInstance:function(b,a){return new e(b,a)}})})},"MW/rtc/plugins/find/ReplaceHandler":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/RichTextComponentFeatureEnum"],function(g,f,e){return g(null,{constructor:function(d,b){this._findHandler=b;this._actionService=d;this._findHandler.registerReplaceFeature();var a=[{id:e.FIND_STRING.REPLACE_ACTION,enabled:!0,key:"ctrl_h",callback:f.hitch(this,"_openFindDialogWithReplace")}];d.loadActions(a)},_openFindDialogWithReplace:function(){this._actionService.getAction(e.FIND_STRING.REPLACE_ACTION).enabled&&
this._findHandler.createFindDialog()}})})},"MW/rtc/plugins/formatcode/FormatCodePluginProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/language/matlab/utilities/MatlabPluginUtilities","MW/rtc/plugins/formatcode/FormatCode","MW/rtc/core/provider/PluginProvider"],function(g,f,e,d){return g(d,{isApplicable:function(b){return f.isMatlabCodeFileOrBuffer(b)},requires:function(){return{isApplicable:["rtc.backingstore"],createInstance:"rtc.indentutilities rtc.document rtc.internaldocument rtc.cursor rtc.actionservice rtc.code.autoindent".split(" ")}},
createInstance:function(b,a,c,d,f,g){return new e(b,a,c,d,f,g)},destroyInstance:function(b){b.destroy()}})})},"MW/rtc/plugins/formatcode/FormatCode":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/formatcode/FormatCodeDataService MW/rtc/abstract/AbstractPlugin MW/rtc/EditorUtilities MW/rtc/RichTextComponentFeatureEnum MW/rtc/model/DocumentUtilities MW/rtc/model/DocumentConstants MW/rtc/model/events/DocumentEvent MW/rtc/model/CodeUtilities MW/rtc/model/NodeUtilities MW/rtc/model/Position dojo/i18n!l10n/nls/actions".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q){return g(b,{constructor:function(a,c,b,h,g,k){this._indentUtilities=a;this._internalDocument=b;this._document=c;this._cursor=h;this._formatCodeDataService=new d;this._documentContent="";this._actionService=g;this._autoIndent=k;this._addActions();this.own(e.after(this._cursor,"onChange",f.hitch(this,"_updateActionState")));this.own(e.after(this._document,"onChange",f.hitch(this,"_updateActionsOnDocumentChange"),!0))},_addActions:function(){this._actions=[{id:c.FORMAT_CODE.SMART_INDENT_ACTION,
enabled:!0,contextMenuGroup:"Default",text:q.smartIndentLabel,description:q.smartIndentDescription,key:"ctrl_i",platformKey:{mac:"meta_i"},callback:f.hitch(this,"_checkAndFormatCode")}];this._actionService.loadActions(this._actions)},_updateActionsOnDocumentChange:function(a){a&&f.isArray(a)&&a.some(function(a){if(a.type===k.READONLY_STATE_CHANGE_EVENT)return this._updateActionState(),!0},this)},_updateActionState:function(){var a=this._isCodeInSelection(),b=this._isSelectionReadOnly(),d=this._document.isReadOnly();
this._actionService.updateAction(c.FORMAT_CODE.SMART_INDENT_ACTION,{enabled:a&&!b&&!d})},_isSelectionReadOnly:function(){var a=this._cursor.selectionInfo(),a=this._indentUtilities.getRangeFromSelection(a),a=p.getParagraphNodesInRange(a.start,a.end);return 0==h.getWritableChunksInRange(this._internalDocument,a).length},_isCodeInSelection:function(){var a=this._cursor.selectionInfo();return m.isCodeInRange(a.startNode,a.endNode)},_checkAndFormatCode:function(){this._actionService.getAction(c.FORMAT_CODE.SMART_INDENT_ACTION).enabled&&
this.formatCode()},formatCode:function(){this._documentContent=this._document.getCodeText();0!==this._documentContent.length&&(this._cursorPos=this._cursor.getPosition(),this._selectionInfo=this._cursor.selectionInfo(),this._rangeToFormat=a.getRangeOfCodeToFormat(this._documentContent,this._cursorPos),this._formatCodeServerRequest())},_formatCodeServerRequest:function(){this._formatCodeDataService.getFormattedCode(this._documentContent,this._rangeToFormat.start,this._rangeToFormat.end,"file.m",this._rangeToFormat.cursor,
f.hitch(this,"_formatCodeCallback"),f.hitch(this,"_formatErrorCallback"))},_formatErrorCallback:function(){this._internalDocument.setReadOnly(!1,!0)},_adjustCursorPosition:function(a,c,b,d,e){var f={line:a.line,anchor:{}},h=c.length-1;d?(f.anchor={line:a.anchor.line,column:Math.max(0,a.anchor.column+c[b.isReversed?h:0])},f.column=Math.max(0,a.column+c[b.isReversed?0:h])):f.column=Math.max(0,a.column+c[a.line-e]);return f},_getMockCursorPosition:function(a,c){return{line:a.endLine,column:c.maxOffset(),
anchor:{line:a.startLine,column:0}}},_isCursorInCurrentChunk:function(a,c){var b=this._internalDocument.getLineNumber(a),d=this._internalDocument.getLineNumber(c)>=this._cursorPos.line;return b<=this._cursorPos.line&&d},_formatCodeCallback:function(c){var b=this._documentContent.substring(this._rangeToFormat.start,this._rangeToFormat.end);if(b!==c){b=b.split("\n");c=c.split("\n");var d=this._cursorPos,e=this._selectionInfo,f=!e.isNull;f||(e.startNode=this._internalDocument.startNode(),e.startPos=
0,e.endNode=this._internalDocument.endNode(),e.endPos=e.endNode.maxOffset(),e.isNull=!1,e.isLocal=!1);var g=this._indentUtilities.getRangeFromSelection(e),e=this._internalDocument.getLineNumber(e.startNode.rootContainer()),k=p.getParagraphNodesInRange(g.start,g.end),g=h.getWritableChunksInRange(this._internalDocument,k);this._autoIndent.disable();this._internalDocument.onPreDocumentChanged({});for(var m=this._internalDocument.getLineNumber(k[0]),k=this._internalDocument.getLineNumber(k[k.length-1]),
m=l.create(m,k),k=this._document.startEdit(),q=0;q<g.length;q++){var n=g[q],E=this._internalDocument.getLineNode(n.startLine),F=this._internalDocument.getLineNode(n.endLine),I=this._getMockCursorPosition(n,F),I=this._cursor.cursorPos2selectionInfo(I),L=n.startLine-e,C=n.endLine-e,M=b.slice(L,C+1),L=c.slice(L,C+1),M=this._indentUtilities.getIndentArray(M,L),L=M.pop();this._indentUtilities.blockDeltaIndent(E,F,M,a.getWhiteSpaces(L))&&this._isCursorInCurrentChunk(E,F)&&(n=this._adjustCursorPosition(d,
M,I,f,n.startLine),this._cursor.setPosition(n))}k.appendUndoEvents([m]);k.appendRedoEvents([m]);this._document.endEdit();this._cursor.onUpdate();this._internalDocument.emitDocumentEvents([m]);this._autoIndent.enable()}},destroy:function(){this._actions.forEach(function(a){this._actionService.removeAction(a.id)},this)}})})},"MW/formatcode/FormatCodeDataService":function(){define(["dojo/_base/declare","dojo/_base/array","mw-log/Log","mw-remote/Remote"],function(g,f,e,d){return g(null,{constructor:function(){d.registerResponseHandler("FormatCodeResponse",
this._handleFormatCodeResponse,this);d.registerFaultHandler("FormatCode",this._handleFormatCodeError,this)},getFormattedCode:function(b,a,c,e,f,g,m){d.sendMessage({FormatCode:{code:b,startOfSelection:a,endOfSelection:c,filename:e,cursorPosition:f}},{responseCallback:g,errorCallback:m})},_handleFormatCodeResponse:function(b,a){f.forEach(b,function(c){a.responseCallback(c.formattedCode,c.startOfFormattedCode,c.endOfFormattedCode,c.adjustedStartOfSelection,c.adjustedEndOfSelection,c.adjustedCursorPosition)},
this)},_handleFormatCodeError:function(b,a){e.assert(!1,"Received the following error: "+b);a.errorCallback&&a.errorCallback()}})})},"MW/rtc/plugins/goto/GotoProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/plugins/goto/GotoHandler","MW/rtc/core/provider/PluginProvider"],function(g,f,e,d){return g(d,{requires:function(){return{createInstance:"rtc.focusservice rtc.internaldocument rtc.linenumberservice rtc.cursor rtc.actionservice rtc.code.matlabfiletype rtc.functionservice rtc.navigate.goto.sectionservice".split(" ")}},
createInstance:function(b,a,c,d,f,g,m,p){return new e(b,a,c,d,f,g,m,p)}})})},"MW/rtc/plugins/goto/GotoHandler":function(){define("dojo/_base/declare dojo/has dojo/topic dojo/_base/lang dijit/registry dijit/focus mw-log/Log MW/rtc/plugins/goto/GotoPreferences MW/rtc/plugins/goto/view/GotoDialog MW/uiframework/UIBuilderFactory MW/rtc/RichTextComponentFeatureEnum MW/rtc/plugins/goto/GotoUtilities".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p){var n=!1,q=!1,r=!1,s=!1,t;return g(null,{_focusService:null,
constructor:function(a,c,b,d,e,f,h,g){this._focusService=a;this._internalDocument=c;this._lineNumberService=b;this._cursor=d;this._actionService=e;this._goToActions=[];this._goToDialog=null;this._createGoToDialogAction();e.loadActions(this._goToActions);this._sectionPopupId=this._functionPopupId=null;this._fileType=f;this._functionService=h;this._gotoSectionService=g},_createGoToDialogAction:function(){this._goToActions=[{id:m.GOTO_LINE.GOTO_ACTION,enabled:!0,key:f("safari")?"":"ctrl_g",platformKey:{mac:f("safari")?
"":"meta_l"},callback:d.hitch(this,"_gotoActionCallback")}]},_gotoActionCallback:function(){if(this._actionService.getAction(m.GOTO_LINE.GOTO_ACTION).enabled)return this._goToLineDialog()},_goToLineDialog:function(){return this._goToDialog=new k(d.hitch(this,this._goToCodeLine),d.hitch(this,this._close))},_goToCodeLine:function(a){p.gotoCodeLineColumn(this._internalDocument,this._lineNumberService,this._cursor,a,1)},goToCodeLine:function(a){this._goToCodeLine(a);this._focusEditor()},goToDocumentLineColumn:function(a,
c){p.gotoDocumentLineColumn(this._internalDocument,this._cursor,a,c);this._focusEditor()},_close:function(){this._focusEditor()},_focusEditor:function(){setTimeout(d.hitch(this,function(){this._focusService.setFocus()}),1)},setupGoToToolStripButton:function(){var a=l.getInstance(),c=a.tagToId("motwToolstrip.editorTab.navigate.goTo");c&&this._addDropdownCallbackOnButton(a,c,this._gotoSectionService.PLAIN_EDITOR);(c=a.tagToId("motwToolstrip.liveEditorTab.navigate.goTo"))&&this._addDropdownCallbackOnButton(a,
c,this._gotoSectionService.LIVE_EDITOR)},_addDropdownCallbackOnButton:function(a,c,b){return a.addEventCallback(c,d.hitch(this,function(d){if("dropDownPerformed"===d.eventType){d=this._getActiveGoToHandlerInstance();var e=d.getGotoSectionsService().getSections(b),f=d.getFunctions();r=s=n=!1;0<f.length&&0===e.length?n=!0:0===f.length&&0<e.length?n=!1:0<f.length&&0<e.length&&(r=s=!0);d=this._populateGoToDropDownList(a,d,f,e);a.showPopup(c,d)}}),this)},getGotoSectionsService:function(){return this._gotoSectionService},
getFunctions:function(){return this._functionService.getAllFunctionDeclarations()},_populateGoToDropDownList:function(a,c,b,d){var e={};a&&(e.popupId=a.tagToId("motwToolstrip.editorTab.navigate.goTo.goToList"),e.sectionHeaderId=a.tagToId("motwToolstrip.editorTab.navigate.goTo.goToList.sectionHeader"),e.functionHeaderId=a.tagToId("motwToolstrip.editorTab.navigate.goTo.goToList.functionHeader"),e.popupListPanelId=a.tagToId("motwToolstrip.editorTab.navigate.goTo.goToList.goToListPanel"));this._destroyPopupList(a,
e);n?this._createFunctionsPopupListPanel(c,a,e,b):s?this._createFunctionsAndSectionsPopupListPanel(c,a,e,q,b,d):this._createSectionsPopupListPanel(c,a,e,d);return e.popupId},_createFunctionsAndSectionsPopupListPanel:function(a,c,b,d,e,f){this._createFunctionsPopupListPanel(a,c,b,e);this._functionPopupId=b.popupListPanelId;this._createSectionsPopupListPanel(a,c,b,f);this._sectionPopupId=b.popupListPanelId;d?h.setPopupStyle(this._functionPopupId,b.functionHeaderId,"none"):h.setPopupStyle(this._sectionPopupId,
b.sectionHeaderId,"none")},_createSectionsPopupListPanel:function(c,f,g,k){0<k.length&&(g.sectionHeaderId=h.createSectionHeader(f),f.add(g.sectionHeaderId,g.popupId,0),g.popupListPanelId=h.createPopupListPanel(f),f.add(g.popupListPanelId,g.popupId,1),r&&(h.createFunctionToggleSwitch(f).onclick=d.hitch(this,function(){h.setPopupStyle(this._sectionPopupId,g.sectionHeaderId,"none");var c=b.byId(f.tagToId("motwToolstrip.editorTab.navigate.goTo.goToList.goToLine"));a.focus(c.domNode);h.setPopupStyle(this._functionPopupId,
g.functionHeaderId,"");q=!1;e.publish("/toolstrip/popUpList/render")})),k.forEach(function(a,b){var d=a[this._gotoSectionService.SECTION_TITLE];d&&(d=h.createGoToListItem(c,f,a[this._gotoSectionService.SECTION_ROW],1,d),f.add(d,g.popupListPanelId,b))},this))},_createFunctionsPopupListPanel:function(c,f,g,k){if(!(1>k.length)){g.functionHeaderId=h.createFunctionHeader(f);f.add(g.functionHeaderId,g.popupId,0);r&&(h.createSectionToggleSwitch(f).onclick=d.hitch(this,function(){h.setPopupStyle(this._functionPopupId,
g.functionHeaderId,"none");var c=b.byId(f.tagToId("motwToolstrip.editorTab.navigate.goTo.goToList.goToLine"));a.focus(c.domNode);h.setPopupStyle(this._sectionPopupId,g.sectionHeaderId,"");q=!0;e.publish("/toolstrip/popUpList/render")}));g.popupListPanelId=h.createPopupListPanel(f);f.add(g.popupListPanelId,g.popupId,1);var l=this._fileType.getFileType()===this._fileType.FILE_TYPE.ClassDefinitionFile;p.sortFunctionDeclarations(k,!l).forEach(function(a,b){var d=h.createGoToFunctionListItem(c,f,a.getStartLine(),
a.getStartColumn(),a.getName());f.add(d,g.popupListPanelId,b)})}},_destroyPopupList:function(a,c){a.exists(this._sectionPopupId)&&a.destroy(this._sectionPopupId);a.exists(this._functionPopupId)&&a.destroy(this._functionPopupId);Object.keys(c).map(function(b){"popupId"!==b&&a.exists(c[b])&&a.destroy(c[b])})},setActiveGoToHandlerInstance:function(a){t=a},_getActiveGoToHandlerInstance:function(){return t}})})},"MW/rtc/plugins/goto/GotoPreferences":function(){define("dojo/_base/lang dojo/dom-attr dojo/dom-construct dojo/dom-style dojo/i18n!l10n/nls/gotoDialog dijit/registry MW/toolstrip/constants/TypeConstants MW/toolstrip/hashes/listOfNewWidgets".split(" "),
function(g,f,e,d,b,a,c,h){return{_lastSelectedLine:"",_EMPTY_SECTION_PREFIX:b.section,createGoToListItem:function(a,b,d,e,f){f=b.create({type:c.LIST_ITEM,tag:"SectionListItem"+d,text:f});b.addEventCallback(f,g.hitch(a,function(c){"itemPushed"===c.eventType&&a.goToDocumentLineColumn(d,e)}));return f},createGoToFunctionListItem:function(a,b,d,e,f){f=b.create({type:c.LIST_ITEM,tag:"FunctionListItem"+d,text:f});b.addEventCallback(f,g.hitch(a,function(c){"itemPushed"===c.eventType&&a.goToDocumentLineColumn(d,
e)}));return f},createPopupListPanel:function(a){return a.create({tag:"motwToolstrip.editorTab.navigate.goTo.goToList.goToListPanel",type:c.POPUP_LIST_PANEL,maxHeight:440})},createSectionHeader:function(a){return a.create({tag:"motwToolstrip.editorTab.navigate.goTo.goToList.sectionHeader",type:c.POPUP_LIST_HEADER,title:"SECTIONS"})},createFunctionHeader:function(a){return a.create({tag:"motwToolstrip.editorTab.navigate.goTo.goToList.functionHeader",type:c.POPUP_LIST_HEADER,title:"FUNCTIONS"})},createSectionToggleSwitch:function(c){var b=
a.byId(c.tagToId("motwToolstrip.editorTab.navigate.goTo.goToList.functionHeader"));if(-1===h.indexOf(b.type)){var d=b.domNode;c=d.querySelector("td")}else c=b.domNode;var g=e.create("div",{innerHTML:"SHOW SECTIONS"});f.set(g,"style","float:right; font-family:Arial; font-size:8px; margin-top:3px; margin-right:3px; color:white;  cursor: pointer; padding:1px; ");e.place(g,c,"last");-1===h.indexOf(b.type)&&d.appendChild(c);return g},createFunctionToggleSwitch:function(c){var b=a.byId(c.tagToId("motwToolstrip.editorTab.navigate.goTo.goToList.sectionHeader"));
if(-1===h.indexOf(b.type)){var d=b.domNode;c=d.querySelector("td")}else c=b.domNode;var g=e.create("div",{innerHTML:"SHOW FUNCTIONS"});f.set(g,"style","float:right; font-family:Arial; font-size:8px; margin-top:3px; margin-right:3px; color:white;  cursor: pointer; padding:1px; ");e.place(g,c,"last");-1===h.indexOf(b.type)&&d.appendChild(c);return g},formatSectionTitle:function(a,c){var b=a.replace(/^\s*%%/,"").trim();0===b.length&&(b=this._EMPTY_SECTION_PREFIX+" "+c,c+=1);return[b,c]},setGotoLine:function(a){this._lastSelectedLine=
a},getGotoLine:function(){return this._lastSelectedLine},setPopupStyle:function(c,b,e){c=a.byId(c);b=a.byId(b);d.set(c.domNode,"display",e);d.set(b.domNode,"display",e)},getValidLiveEditorSectionTitle:function(a,c){var b=a.trim();0===b.length&&(b=this._EMPTY_SECTION_PREFIX+" "+(c+1));return b}}})},"MW/rtc/plugins/goto/view/GotoDialog":function(){define("dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dijit/form/Button dijit/form/NumberTextBox dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/keys dojo/on dojo/aspect dojo/text!./GotoDialogTemplate.html dojo/i18n!l10n/nls/dialog dojo/i18n!l10n/nls/gotoDialog mw-dialog-utils/DialogUtils MW/rtc/plugins/goto/GotoPreferences".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s){g=a([g,f,e],{templateString:p,widgetsInTemplate:!0,constructor:function(a,c){this._goToLineCallback=a;this._closeCallBack=c;this._goToDialogWidget=null},postCreate:function(){this.inherited(arguments);this.okButton.set("Disabled",!0);var a=this;this.okButton.set("label",n.ok);this.cancelButton.set("label",n.cancel);this.lineNumberLabel.innerHTML=q.line;var b=s.getGotoLine(),b=""===b||isNaN(b);this.okButton.set("Disabled",b);this.lineNumberInput.set("value",
s.getGotoLine());l(this.okButton,"click",c.hitch(this,"onOK"));l(this.cancelButton,"click",c.hitch(this,"onCancel"));l(this.lineNumberInput,"keyup",c.hitch(this,"onTextKeyup"));this.okButton.set("data-okButtonId","okButton");this.cancelButton.set("data-cancelButtonId","cancelButton");this.lineNumberInput.set("data-lineNumberInputId","lineNumberInput");setTimeout(function(){a.lineNumberInput.focus()},0);this._goToDialogWidget=r.displayModalDialog(this,q.title,[],{"data-testid":"rteGoToDialog",dialogClass:"rteGoToDialog"});
m.before(this._goToDialogWidget,"onClose",c.hitch(this,this._saveGoToDialogState))},_saveGoToDialogState:function(){s.setGotoLine(this.lineNumberInput.get("value"))},onTextKeyup:function(a){var c=this.lineNumberInput.get("value");void 0===c||""===c||isNaN(c)||0>c?this.okButton.set("disabled",!0):this.okButton.set("disabled",!1);if(a.keyCode===k.ENTER&&!this.okButton.get("disabled"))if(this.onOK)this.onOK();else if(a.keyCode===k.ESCAPE)this.onCancel()},onCancel:function(){this._goToDialogWidget.onClose()},
onOK:function(){var a=this.getLineNumber();this._goToLineCallback(a);this.onCancel()},onClose:function(){this._closeCallBack()},getLineNumber:function(){return this.lineNumberInput.get("value")}});g.getEmptySectionTitle=function(){return q.section};return g})},"MW/rtc/plugins/goto/GotoUtilities":function(){define(["MW/rtc/plugins/richtext/HeadingUtilities"],function(g){return{LABEL:"label",LINE:"line",COLUMN:"column",gotoCodeLineColumn:function(f,e,d,b,a){var c=e.getNumberOfCodeLines();0!=c&&(b=this._getCorrectedLineOrColumn(b,
c),e=e.getLineNumberFromCodeLineNumber(b)+1,f=f.getLineNode(e-1).getText().length+1,a=this._getCorrectedLineOrColumn(a,f),d.setLineColumn(e,a,!0))},gotoDocumentLineColumn:function(f,e,d,b){var a=f.getMaxLineNumber();d=this._getCorrectedLineOrColumn(d,a);f=f.getLineNode(d-1).getText().length+1;b=this._getCorrectedLineOrColumn(b,f);e.setLineColumn(d,b,!0)},_getCorrectedLineOrColumn:function(f,e){f=Math.max(f,1);return Math.min(f,e)},sortFunctionDeclarations:function(f,e){var d=f.map(function(a,c){return{elem:a,
idx:c}}),b=e?d.shift():null;d.sort(function(a,c){var b=a.elem.getName().toLocaleLowerCase(),d=c.elem.getName().toLocaleLowerCase(),b=b.localeCompare(d);return 0!==b?b:a.idx-c.idx});b&&d.unshift(b);return d.map(function(a){return a.elem})},getSectionInfo:function(f,e,d){for(var b="",a=1;f;){if(!f.isEmpty()||f===e){g.isHeadingNode(f)&&(b=f.getText());a=d.getLineNumber(f)+1;break}f=f.nextSibling()}e={};e[this.LABEL]=b;e[this.LINE]=a;e[this.COLUMN]=1;return e}}})},"MW/rtc/plugins/goto/GotoSectionServiceProvider":function(){define(["dojo/_base/declare",
"dojo/_base/lang","MW/rtc/plugins/goto/GotoSectionService","MW/rtc/core/provider/PluginProvider"],function(g,f,e,d){return g(d,{requires:function(){return{createInstance:["rtc.document","rtc.internaldocument","rtc.code.sections.model"]}},createInstance:function(b,a,c){return new e(b,a,c)},destroyInstance:function(b){b.destroy()}})})},"MW/rtc/plugins/goto/GotoSectionService":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin","MW/rtc/plugins/goto/GotoPreferences","MW/rtc/plugins/goto/GotoUtilities",
"MW/rtc/plugins/language/matlab/section/SectionsList"],function(g,f,e,d,b){return g(null,{PLAIN_EDITOR:1,LIVE_EDITOR:2,SECTION_TITLE:"title",SECTION_ROW:"row",constructor:function(a,c,d){this._document=a;this._internalDocument=c;this._plainEditorSectionsPlugin=new b(c,a);this._liveEditorSectionsPlugin=d},getSections:function(a){var c=[];a===this.LIVE_EDITOR?c=this._getLiveEditorSections():a===this.PLAIN_EDITOR&&(c=this._getPlainEditorSections());return c},_getPlainEditorSections:function(){var a=
1;return this._plainEditorSectionsPlugin.getSections().map(function(c){var d={};c=c.startPosition.getRow();var f=this._plainEditorSectionsPlugin.getTextInLine(c);b.hasSectionTitle(f)&&(f=e.formatSectionTitle(f,a),d[this.SECTION_TITLE]=f[0],d[this.SECTION_ROW]=c+1,a=f[1]);return d},this)},_getLiveEditorSections:function(){var a=[],c=this._liveEditorSectionsPlugin.getSections();2<=c.length&&(a=c.map(function(a,c){var b=d.getSectionInfo(a.start.node,a.end.node,this._internalDocument),f={};f[this.SECTION_TITLE]=
e.getValidLiveEditorSectionTitle(b[d.LABEL],c);f[this.SECTION_ROW]=b[d.LINE];return f},this));return a},destroy:function(){this._plainEditorSectionsPlugin.destroy()}})})},"MW/rtc/plugins/language/matlab/section/SectionsList":function(){define("dojo/aspect dojo/_base/declare dojo/_base/lang dojo/Evented MW/rtc/plugins/language/matlab/section/Position MW/syntaxhighlighting/SyntaxHighlightingDataServiceFactory mw-utils/Utils".split(" "),function(g,f,e,d,b,a,c){f=f([d],{constructor:function(c,b){this._internalDocument=
c;this._document=b;this._dataService=a.getInstance();this._sections=[];this._handles=[];this._handles.push(g.after(this._dataService,"onSectionLocationUpdate",e.hitch(this,this._updateModel),!0))},_updateCells:function(){var a=this;clearTimeout(this._idleTimerID);this._idleTimerID=setTimeout(function(){a._serverRequest()},200)},_serverRequest:function(){this._requestID=c.generateUuid();var a=this._document.getCodeText(!0);this._dataService.updateData(a,this._requestID,!0)},updateCells:function(){this._updateCells()},
onUpdateModel:function(a,c,b,d){},getSections:function(){return this._sections},destroy:function(){this._handles.forEach(function(a){a.remove()});this._handles=[]},_updateModel:function(a,c,d,e){if(this._document.getText()===e&&d){var f;this._sections.forEach(function(a){a.startPosition.destroy();a.endPosition.destroy()});this._sections=[];var g=this._internalDocument.getMaxLineNumber()-1;0<c.length&&0<c[0]&&this._sections.push({startPosition:new b(0,0,this._internalDocument),endPosition:new b(g,
this._getMaxColumnOnLine(g),this._internalDocument)});for(f=0;f<c.length-1;f+=2){var q=c[f+1];this._sections.push({startPosition:new b(c[f],0,this._internalDocument),endPosition:new b(q,this._getMaxColumnOnLine(q),this._internalDocument)})}q=0;for(f=1;f<this._sections.length;f+=1)this._sections[f].endPosition.getRow()>this._sections[q].endPosition.getRow()&&(q=f);0<this._sections.length&&this._sections[q].endPosition.getRow()<g&&(f=this._sections[q],this._sections[q].startPosition.destroy(),this._sections[q].endPosition.destroy(),
this._sections[q]={startPosition:new b(f.startPosition.getRow(),0,this._internalDocument),endPosition:new b(g,this._getMaxColumnOnLine(g),this._internalDocument)});this.onUpdateModel(a,c,d,e);this.emit("sectionsChangedEvent")}},_getMaxColumnOnLine:function(a){return this._internalDocument.getLineNode(a).getText().length},getTextInLine:function(a){return this._internalDocument.getLineNode(a).getText()}});f.hasSectionTitle=function(a){var c=!0;a.match(/^\s*%%(\s|$)/)||(c=!1);return c};return f})},"MW/rtc/plugins/language/matlab/section/Position":function(){define(["dojo/_base/declare",
"dojo/aspect","dojo/_base/lang","MW/rtc/model/DocumentConstants"],function(g,f,e,d){return g(null,{constructor:function(b,a,c){this._row=b;this._column=a;0>this._column&&(this._column=0);this._connection=f.after(c,"onPreDocumentChanged",e.hitch(this,this._updatePosition),!0)},getRow:function(){return this._row},_updatePosition:function(b){if(b)if(b.type===d.INSERT_BREAK_EVENT){var a=b.line,c=b.column;if(this._row>a||this._row===a&&c<=this._column)this._row+=b.numberOfLines}else b.type===d.DELETION_EVENT&&
(a=b.startLine,b=b.endLine,c=b-a,0!==c&&(!(this._row<a)&&this._row!==a&&this._row>a)&&(this._row>b?this._row-=c:this._row<b?this._row=a:this._row===b&&(this._row-=c)))},destroy:function(){this._connection.remove()}})})},"MW/rtc/plugins/htmlmime/HTMLMimeConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./HTMLMimeConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/htmlmime/HTMLMimeConverter":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/lang dojo/dom-construct MW/rtc/plugins/cutcopypaste/MIMETypes MW/rtc/plugins/cutcopypaste/mime/MimeConverter MW/rtc/plugins/htmlmime/DocumentBuilder".split(" "),
function(g,f,e,d,b,a,c){return f(a,{_PRIORITY:50,SKIP_NODES:["META","LINK","#comment","STYLE"],constructor:function(){this._handlers=[];this._textHandlers=[];this._preprocessors=[]},getType:function(){return b.HTML},priority:function(){return this._PRIORITY},setDefaultParagraphFactory:function(a){this._defaultParagraphFactory=a},registerDocumentPreprocessor:function(a){this._preprocessors.push(a)},registerNodeHandler:function(a,c,b){"string"===typeof a&&(a=[a]);this._handlers.push(e.mixin({acceptedNodeNames:a,
convertNode:c,priority:b||0},c));this._handlers=this._handlers.sort(function(a,c){return c.priority-a.priority})},registerTextHandler:function(a,c){this._textHandlers.push({convertText:a,priority:c||0});this._textHandlers=this._textHandlers.sort(function(a,c){return c.priority-a.priority})},convertFromMimeData:function(a){if(this._defaultParagraphFactory){a=a.replace(/<\/html>[\s\S]*/,"\x3c/html\x3e");var b=document.createElement("iframe");b.style.visibility="hidden";document.body.appendChild(b);
b.sandbox="allow-same-origin";b.contentDocument.documentElement.innerHTML=a;a=b.contentDocument.documentElement.querySelector("head");d.create("style",{type:"text/css",textContent:"pre {font-family: monospace }\nbody {font-family: 'Arial', 'Helvetica', sans-serif}"},a,"first");var e=b.contentDocument.body;this._preprocessors.forEach(function(a){a(e)});this._builder=new c(this._defaultParagraphFactory);this._traverseDOM(e);document.body.removeChild(b);b=this._builder.getDocumentFragment();return 0===
b.length?void 0:b}},_traverseDOM:function(a){var c=this._builder.getActiveNode();this._enterNode(a);a=a.firstChild;for(var b;a;)"#text"===a.nodeName?(b=a.textContent)&&this._callTextConverter(a):0>this.SKIP_NODES.indexOf(a.nodeName)&&this._traverseDOM(a),a=a.nextSibling;c?this._builder.popTo(c):this._builder.getActiveNode()&&(this._builder.isImplicitParagraph()?this._builder.setActiveNode(this._builder.getLastParagraph()):this._builder.leaveParagraph())},_callTextConverter:function(a){this._textHandlers.forEach(function(c){c.convertText(a,
this._builder)},this)},_enterNode:function(a){g.some(this._handlers,function(c){if(!c.convertNode||0>c.acceptedNodeNames.indexOf(a.nodeName))return!1;c.convertNode(a,this._builder)},this)}})})},"MW/rtc/plugins/htmlmime/DocumentBuilder":function(){define(["dojo/_base/array","dojo/_base/declare"],function(g,f){return f(null,{constructor:function(e){this._defaultParagraphFactory=e;this._content=[];this._isImplicitParagraph=!1},getDocumentFragment:function(){this.leaveParagraph();return g.map(this._content,
function(e){return e.serialize()})},getActiveNode:function(){return this._activeNode},isInParagraph:function(){return!!this.getActiveNode()},getLastParagraph:function(){return this._content[this._content.length-1]},appendNode:function(e){this._activeNode||(this.appendParagraph(),this._isImplicitParagraph=!0);this._activeNode.children.push(e)},appendInnerNode:function(e){this.appendNode(e);this._activeNode=e},setActiveNode:function(e){this._activeNode!==e&&(this._activeNode&&0===this._activeNode.children.length&&
this._removeNode(this._activeNode),this._activeNode=e)},appendParagraph:function(e){this._isImplicitParagraph=!1;var d=this.getLastParagraph();d&&0===d.children.length&&this._removeNode(d);this._activeNode=e||this._defaultParagraphFactory();this._content.push(this._activeNode)},_removeNode:function(e){var d,b=this.getParent(e);b?(d=b.children.indexOf(e),b.children.splice(d,1)):(d=this._content.indexOf(e))&&this._content.splice(d,1);this._activeNode===e&&(this._activeNode=null)},getParent:function(e){var d;
g.some(this._content,function(b){return d=this._searchParent(e,b)},this);return d},isImplicitParagraph:function(){return this._isImplicitParagraph},_searchParent:function(e,d){if(!d.children)return!1;if(0<=d.children.indexOf(e))return d;var b;g.some(d.children,function(a){return b=this._searchParent(e,a)},this);return b},leaveParagraph:function(){this.setActiveNode(null)},popTo:function(e){for(var d=this._activeNode;d&&d!==e;)d=this.getParent(d);this.setActiveNode(d)}})})},"MW/rtc/plugins/hyperlink/HyperlinkProvider":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/hyperlink/Hyperlink","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{requires:function(){return{createInstance:"rtc.internaldocument rtc.document rtc.eventhandler rtc.view rtc.cursor rtc.internalhyperlinkservice rtc.textnodeservice".split(" ")}},createInstance:function(d,b,a,c,e,g,l){return new f(d,b,a,c,e,g,l)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/hyperlink/Hyperlink":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/has dojo/mouse dojo/on mw-log/Log MW/rtc/model/DocumentUtilities MW/rtc/model/DocumentEventUtilities MW/rtc/model/events/DeletionEvent MW/rtc/model/events/DocumentEvent MW/rtc/model/Position MW/rtc/plugins/richtext/nodes/leaf/RichTextNode ./model/HyperlinkNode".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q){return g(null,{constructor:function(c,b,d,h,g,k,l){this._internalDocument=c;this._document=b;this._eventHandler=d;this._view=h;this._cursor=g;this._hyperlinkService=k;this._textNodeService=l;this._handles=[];this._handles.push(a(h.getDomtarget(),"a.hyperlinkNode:auxclick",f.hitch(this,this._handleAuxClick)));this._handles.push(a(h.getDomtarget(),"a.hyperlinkNode:click",f.hitch(this,this._handleClick)));this._handles.push(e.after(this._document,"onDirectedDeletion",
f.hitch(this,"_onDelete"),!0))},_handleAuxClick:function(a){a.stopPropagation();a.preventDefault()},_handleClick:function(a){var c;a.preventDefault();(d("mac")?!a.ctrlKey:a.ctrlKey)?this._cursor.hasSelection()||b.isRight(a)||a.altKey?(a.stopPropagation(),a.preventDefault()):(c=this._view.getCoordinateFromEvent(this._view.fixEvent(a)),c=this._view.getPositionFromCoordinate(c),c=c.getNode().parent.hyperlink,!c&&a.selectorTarget&&(c=a.selectorTarget.href),c&&(this._hyperlinkService.openUrl(c),a.stopPropagation(),
a.preventDefault())):(a.stopPropagation(),a.preventDefault())},_onDelete:function(a,c){if(!this._cursor.hasSelection()&&c.isLocal){var b=this._getHyperlinkByTextNode(c.startNode);if(b){if(-1===a&&c.endNode===b.endNode()&&c.endPos===c.endNode.maxOffset())return this.performEditAction({nodeBeingEdited:b}),!0;if(1===a&&c.startNode===b.startNode()&&0===c.startPos)return this._cursor.setPosition(b,b.maxOffset()),this._cursor.fixAnchor(),this._cursor.setPosition(b),!0}}},hyperlinkUnderCursor:function(){var a=
this._cursor.selectionInfo(),c=a.startNode,b=this._getHyperlinkByTextNode(c);return b&&c.parent===a.endNode.parent?a.isNull&&h.isEdgeOfTextLevelContainer(c,a.startPos)?null:b:null},_getHyperlinkByTextNode:function(a){return!a.isTextNode()?null:(a=a.parent)&&a instanceof q?a:null},_buildHyperlink:function(a){var c=new n({text:a.displayText});return new q([c],{hyperlink:a.targetUrl})},_removeHyperlink:function(a){var c,b;a||(a=this.hyperlinkUnderCursor());if(a){c=this._cursor.getPosition();b=a.startPosition();
var d=this._textNodeService.createTextNodeForPosition("",b);b=this._internalDocument.insertAtPosition(d,b);b=b.insertedRange.getStartPosition();d=this._internalDocument.removeChildren(a);this._internalDocument.deleteNode(a,b);this._internalDocument.insertAtPosition(d,b);this._cursor.setPosition(c)}},_openHyperlink:function(){var a;if(a=this.hyperlinkUnderCursor())a=a.hyperlink,this._hyperlinkService.openUrl(a)},performEditAction:function(a){c.assert(a,"Hyperlink.performEditAction called without linkData!");
var b=this._cursor.getNode().rootContainer(),d=this._internalDocument.getLineNumber(b),b=this._document.startEdit(),e=[],f=[];if(""===a.targetUrl||!a.displayText)this._removeHyperlink(a.nodeBeingEdited),e=f=[m.create(d,d)];else if(a.nodeBeingEdited)e=this._cursor.position.getNode().offsetInContainer(a.nodeBeingEdited)+this._cursor.position.getOffset(),this._cursor.collapseSelection(),this._replaceDisplayText(a.nodeBeingEdited,a.displayText),e>a.displayText.length&&(e=a.displayText.length),this._internalDocument.changeNodeAttributes(a.nodeBeingEdited,
{hyperlink:a.targetUrl}),this._cursor.setPosition(a.nodeBeingEdited.children[0],e),e=f=[m.create(d,d)];else{d=this._cursor.hasSelection();f=this._cursor.selectionInfo();a=this._buildHyperlink(a);var h=new p(f.endNode,f.endPos),g=this._internalDocument.insertAtPosition(a,h),e=e.concat(g.events),h=a.rootContainer()!==h.node.rootContainer();d&&!h&&this._internalDocument.deleteSelection(f);this._cursor.releaseAnchor(!0);d&&(this._cursor.releaseAnchor(!0),this._cursor.setPosition(a,0),this._cursor.fixAnchor());
this._cursor.setPosition(a,-1);a=k.finalLineRangeFromEvents(e);f=[l.create(a.startLine,a.endLine)]}b.appendUndoEvents(f);b.appendRedoEvents(e);this._document.endEdit();this._internalDocument.emitDocumentEvents(e);this._cursor.onUpdate()},_replaceDisplayText:function(a,c){this._internalDocument.removeChildren(a,1);this._internalDocument.changeNodeAttributes(a.firstChild(),{text:c})},applyHyperlinkInLineColumn:function(a,c,b,d,e){var f=this._cursor.getLineColumn(),h=f.line,g=f.column;this._cursor.setSelectionLineColumn(b,
d,b,e);this.performEditAction({targetUrl:a,displayText:c,nodeBeingEdited:null});a=e-d-c.length;b===f.line&&0<a&&(g-=a);this._cursor.setLineColumn(h,g)},isAtHyperlink:function(a){return null!==this._getHyperlinkByTextNode(a.getNode())},destroy:function(){this._handles.forEach(function(a){a.remove()});this._handles=[]}})})},"MW/rtc/plugins/hyperlink/HyperlinkEditorProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/hyperlink/HyperlinkEditor","MW/rtc/core/provider/PluginProvider"],function(g,
f,e){return g(e,{requires:function(){return{createInstance:"rtc.actionservice rtc.cursor rtc.richtext.hyperlink rtc.internaldocument rtc.view rtc.eventhandler rtc.richtext.anchor rtc.focusservice".split(" ")}},createInstance:function(d,b,a,c,e,g,l,m){return new f(d,b,a,c,e,g,l,m)}})})},"MW/rtc/plugins/hyperlink/HyperlinkEditor":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/on MW/rtc/abstract/AbstractPlugin MW/rtc/RichTextComponentFeatureEnum MW/rtc/model/Selection ./model/DocumentTargetSelector ./view/HyperlinkDialog dojo/i18n!l10n/nls/richtext_actions ./model/HyperlinkNode".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m){return g(b,{_NON_WORD_CHARACTER:"[\\!\u00a7\\$\\%\\\x26\\/\\(\\)\\\x3d\\?\\,\\.\\-_\\:;\\]\\+\\*\\~\x3c\x3e\\|\"'\u00b4`\u00b0# ]",constructor:function(a,c,b,d,h,g,k,l){this._actionService=a;this._cursor=c;this._hyperlink=b;this._internalDocument=d;this._view=h;this._eventHandler=g;this._anchor=k;this._focusService=l;a.loadActions(this._actions());this.own(e.after(this._cursor,"onChange",f.hitch(this,"_updateActions")))},_actions:function(){return[{id:a.HYPERLINK.HYPERLINK_ACTION,
key:"ctrl_k",platformKey:{mac:"meta_k"},enabled:!1,callback:f.hitch(this,"_hyperlinkCallback")},{id:"rtc_general_hyperlink",enabled:!0,contextMenuGroup:"RichText",description:l.generalHyperlink,callback:f.hitch(this,"_generalHyperlinkCallback")}]},_hyperlinkCallback:function(){if(this._actionService.getAction(a.HYPERLINK.HYPERLINK_ACTION).enabled)return this._editHyperlink()},_generalHyperlinkCallback:function(){if(this._actionService.getAction("rtc_general_hyperlink").enabled){var a=this._cursor.getNode(),
b=a instanceof m?a:null;(b=!b&&a.parent instanceof m?a.parent:b)&&this._cursor.setSelection(new c(b.getPositionFromOffset(0),b.getPositionFromOffset(b.maxOffset())));return this._editHyperlink()}},_updateActions:function(){var c=this._canEditHyperlink();this._actionService.updateAction(a.HYPERLINK.HYPERLINK_ACTION,{enabled:c});this._actionService.updateAction("rtc_general_hyperlink",{enabled:c})},_canEditHyperlink:function(){var a;if(!this._cursor||this._cursor.isCursorReadOnly())return!1;a=this._cursor.selectionInfo();
return!a.isInTextContainer||a.fileEndSelected?!1:!0},_editHyperlink:function(){if(!this.dialog&&this._canEditHyperlink()){var a={displayText:"",targetUrl:""};(this._nodeBeingEdited=this._hyperlink.hyperlinkUnderCursor())?(a.displayText=this._nodeBeingEdited.getText(),a.targetUrl=this._nodeBeingEdited.hyperlink):(a.displayText=this._cursor.selectedText(),!a.displayText&&(!this._checkChar(this._cursor.charAtCursor())&&!this._checkChar(this._cursor.charAtCursor(-1)))&&(this._cursor.selectWordUnderCursor(),
a.displayText=this._cursor.selectedText()));this._oldCursorPosition=this._cursor.getPosition();this._oldCursorSelection=this._cursor.getSelection();this._cursor.hideSelection();this._documentTargetSelector=new h(this._internalDocument,this._view,this._anchor,this._eventHandler);this.dialog=new k(f.hitch(this,this._dlgClose),f.hitch(this,this._dlgAccept),a,this._documentTargetSelector);this._internalDocument.setReadOnly(!0);this._cursor.onChange()}},_dlgClose:function(a){this._focusService.setFocus();
this.dialog.destroy();this.dialog=void 0;this._documentTargetSelector.destroy();this._documentTargetSelector=void 0;this._internalDocument.setReadOnly(!1);this._revertCursor()},_dlgAccept:function(a){var c=/^\S*:/;""!==a.targetUrl&&!c.test(a.targetUrl)&&(a.targetUrl="http://"+a.targetUrl);a.nodeBeingEdited=this._nodeBeingEdited;this._nodeBeingEdited=null;this._hyperlink.performEditAction(a);setTimeout(f.hitch(this,function(){this._focusService.setFocus()}),0)},_revertCursor:function(){this._cursor.setPosition(this._oldCursorPosition);
this._cursorSelection&&this._cursor.setSelection(this._oldCursorSelection);this._cursor.showSelection();this._cursor.onChange()},_checkChar:function(a){return null===a||""===a||a.match(this._NON_WORD_CHARACTER)?!0:!1},destroy:function(){this.dialog&&this.dialog.close();this._documentTargetSelector&&this._documentTargetSelector.destroy()}})})},"MW/rtc/plugins/hyperlink/model/DocumentTargetSelector":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect ./HyperlinkUtilities mw-dialogs/ButtonEnum MW/rtc/model/CodeUtilities".split(" "),
function(g,f,e,d,b,a){return g(null,{_CSS_HOVER_STYLE:"internalTargetLine",_CSS_TARGET_SELECTED:"internalTargetLineSelected",constructor:function(a,b,d,e){this._internalDocument=a;this._view=b;this._anchor=d;this._eventhandler=e},enableTargetSelector:function(){this._handler||(this._handler=e.before(this._eventhandler,"onMouseDown",this._handleMouseEvent.bind(this)));this._eventhandler.disableGesture();this._lastSelectedTarget&&this._styleLineOrBlockForNode(this._lastSelectedTarget,this._CSS_TARGET_SELECTED);
this._createHoverClasses()},disableTargetSelector:function(){this._removeHoverClasses();this._removeStyleLineOrBlockForNode(this._lastSelectedTarget,this._CSS_TARGET_SELECTED);this.destroy()},updateSelectedTarget:function(a){this._lastSelectedTarget=d.getNodeForInternalUrl(this._internalDocument.root,a)},getUrlForSelectedTarget:function(){return this._lastSelectedTarget?(this._anchor.createNodeId(this._lastSelectedTarget),d.INTERNAL+this._lastSelectedTarget.anchorId):null},_handleMouseEvent:function(a){var b=
this._view.fixEvent(a),e=this._view.getPositionFromEvent(b);this._view.getClientWidth()-16>=b.layerX&&(this._removeStyleLineOrBlockForNode(this._lastSelectedTarget,this._CSS_TARGET_SELECTED),this._lastSelectedTarget=d.getPossibleTarget(e.getNode().rootContainer()),this._styleLineOrBlockForNode(this._lastSelectedTarget,this._CSS_TARGET_SELECTED),this.onSelectedTargetChange(this._lastSelectedTarget));a.stopPropagation()},onSelectedTargetChange:function(){},_createHoverClasses:function(){this._internalDocument.root.children.forEach(function(a){this._styleLineOrBlockForNode(a,
this._CSS_HOVER_STYLE)},this)},_removeHoverClasses:function(){this._internalDocument.root.children.forEach(function(a){this._removeStyleLineOrBlockForNode(a,this._CSS_HOVER_STYLE);this._removeStyleLineOrBlockForNode(a,this._CSS_TARGET_SELECTED)},this)},_styleLineOrBlockForNode:function(c,b){if(a.isCodeContainer(c))!a.isCodeContainer(c.previousSibling())&&(c.box.parentElement&&c.box.parentElement.parentElement)&&c.box.parentElement.parentElement.classList.add(b);else{var d=this._internalDocument.getLineNumber(c);
this._view.applyClassToLine(d,b)}},_removeStyleLineOrBlockForNode:function(c,b){if(a.isCodeContainer(c))!a.isCodeContainer(c.previousSibling())&&(c.box.parentElement&&c.box.parentElement.parentElement)&&c.box.parentElement.parentElement.classList.remove(b);else{var d=this._internalDocument.getLineNumber(c);this._view.removeClassFromLine(d,b)}},destroy:function(){this._lastSelectedTarget=void 0;this._handler&&(this._handler.remove(),this._handler=void 0);this._eventhandler.enableGesture()}})})},"MW/rtc/plugins/hyperlink/view/HyperlinkDialog":function(){define("dijit/_TemplatedMixin dijit/_WidgetBase dijit/_WidgetsInTemplateMixin dojo/_base/declare dojo/_base/lang dojo/aspect dojo/keys dojo/on mw-dialogs/ButtonEnum mw-dialogs/Dialogs mw-form/RadioButton mw-form/TextField ../model/HyperlinkUtilities dojo/i18n!l10n/nls/hyperlinkDialog dojo/text!./HyperlinkDialogTemplate.html".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r){return d([f,g,e],{_DIALOG_HEIGHT:"235px",_DIALOG_MIN_WIDTH:"205px",_DIALOG_WIDTH:"300px",_DIALOG_LEFT:37,_DIALOG_TOP:50,_DIALOG_ELEMENT_WIDTH:"100%",_DONE_TYPING_INTERVAL:500,templateString:r,widgetsInTemplate:!0,constructor:function(c,d,e,f){this._acceptCallBack=d;this._closeCallBack=c;this._displayText=e.displayText;this._dialogTitle=(this._targetUrl=e.targetUrl)?q.editTitle:q.createTitle;this._documentTargetSelector=f;this.own(a.after(this._documentTargetSelector,
"onSelectedTargetChange",b.hitch(this,"_selectTargetCallback"),!0))},postCreate:function(){this.inherited(arguments);this._hyperlinkDialogWidget=l.createDialog({title:this._dialogTitle,content:this,buttons:[k.OK,k.CANCEL,{type:k.REVERT.type,label:q.remove,"data-test-id":k.REVERT["data-test-id"]}],dialogType:l.MODAL,draggable:!0});this._createTextFields();this._createRadioButtons();this._updateTarget();this.displayTextLabel.innerHTML=q.displayText;this.urlTextLabel.innerHTML=q.targetURL;this.internalTextLabel.innerText=
q.internalDescription;this._hyperlinkDialogWidget.addButtonEventListener(k.OK,b.hitch(this,"_handleOK"),!1);this._hyperlinkDialogWidget.addButtonEventListener(k.CANCEL,b.hitch(this,"_handleCancel"),!1);this._hyperlinkDialogWidget.addButtonEventListener(k.REVERT,b.hitch(this,"_handleRemove"),!1);this._hyperlinkDialogWidget.on("close",b.hitch(this,"_handleClose"));this._hyperlinkDialogWidget.domNode.style.height=this._DIALOG_HEIGHT;this._hyperlinkDialogWidget.domNode.style.minWidth=this._DIALOG_MIN_WIDTH;
this._hyperlinkDialogWidget.domNode.style.width=this._DIALOG_WIDTH;this._hyperlinkDialogWidget.domNode.style.top=parseInt(this._hyperlinkDialogWidget.domNode.style.top,10)-this._DIALOG_LEFT+"px";this._hyperlinkDialogWidget.domNode.style.left=parseInt(this._hyperlinkDialogWidget.domNode.style.left,10)+this._DIALOG_TOP+"px";this._hyperlinkDialogWidget._contentArea.style.overflow="hidden";this._targetUrl||this._hyperlinkDialogWidget.disableButton(k.REVERT);this._hyperlinkDialogWidget.disableButton(k.OK);
this.underlay=this._hyperlinkDialogWidget._underlay;0===this._targetUrl.indexOf(n.INTERNAL)&&(this.radioButtonInternalHyperlink.set("checked",!0),this._onChangeInternalRadio())},_selectTargetCallback:function(){this.urlTextInput.setValueInDom(q.internalLinkText);this._hyperlinkDialogWidget.enableButton(k.OK)},_updateTarget:function(){0===this._targetUrl.indexOf(n.INTERNAL)?(this._documentTargetSelector.updateSelectedTarget(this._targetUrl),this.urlTextInput.setValueInDom(q.internalLinkText)):this.urlTextInput.setValueInDom(this._targetUrl)},
_createTextFields:function(){this.urlTextInput=new p({placeholder:q.defaultUrl});this.urlTextInput.placeAt(this._hyperlinkDialogWidget.domNode.querySelector(".hyperlinkUrlInput"));this.urlTextInput.on("onkeyup",b.hitch(this,"onTextKeyup"));this.urlTextInput.startup();this.urlTextInput.domNode.style.width=this._DIALOG_ELEMENT_WIDTH;this.urlTextInput.inputNode.focus();this.displayTextInput=new p({placeholder:q.mathworksPlaceholder,value:this._displayText});this.displayTextInput.placeAt(this._hyperlinkDialogWidget.domNode.querySelector(".hyperlinkTextInput"));
this.displayTextInput.on("onkeyup",b.hitch(this,"onTextKeyup"));this.displayTextInput.startup();this.displayTextInput.domNode.style.width=this._DIALOG_ELEMENT_WIDTH},_createRadioButtons:function(){var a=this._hyperlinkDialogWidget.domNode.id;this.radioButtonExternalURL=new m({text:q.external,buttonGroup:"radioButtonGroup"+a,checked:!0});this.radioButtonExternalURL.placeAt(this._hyperlinkDialogWidget.domNode.querySelector(".toggleRadioButtonExternalURL"));this.radioButtonExternalURL.on("change",function(a){a.mwEventData.newValue&&
this._onChangeExternalRadio()}.bind(this));this.radioButtonExternalURL.startup();this.radioButtonExternalURL.focusNode.focus=function(){};this.radioButtonInternalHyperlink=new m({text:q.internal,buttonGroup:"radioButtonGroup"+a});this.radioButtonInternalHyperlink.placeAt(this._hyperlinkDialogWidget.domNode.querySelector(".toggleRadioButtonInternalHyperlink"));this.radioButtonInternalHyperlink.on("change",function(a){a.mwEventData.newValue&&this._onChangeInternalRadio()}.bind(this));this.radioButtonInternalHyperlink.startup();
this.radioButtonInternalHyperlink.focusNode.focus=function(){}},_onChangeInternalRadio:function(){this.underlay.style.display="none";this._documentTargetSelector.enableTargetSelector();this._hyperlinkDialogWidget.disableButton(k.OK);this.displayTextInput.inputNode.focus();this.targetUrlTable.classList.add("hidden");this.targetInternalHyperlinkTable.classList.remove("hidden")},_onChangeExternalRadio:function(){this.underlay.style.display="block";this.underlay.style.opacity="";this._documentTargetSelector.disableTargetSelector();
this.urlTextInput.inputNode.value="";this.onTextKeyup();this._hyperlinkDialogWidget.disableButton(k.OK);this.targetInternalHyperlinkTable.classList.add("hidden");this.targetUrlTable.classList.remove("hidden");this.urlTextInput.inputNode.focus()},onTextKeyup:function(a){clearTimeout(this._timeout);this._timeout=setTimeout(function(){var b=this.displayTextInput.inputNode.value,d=this.urlTextInput.inputNode.value;this.radioButtonExternalURL.get("checked")?""===d?(this.urlTextInput.set("validationState",
"warning"),this.urlTextInput.set("warningText",q.emptyURL),this._hyperlinkDialogWidget.disableButton(k.OK)):!n.isHyperlinkValid(d)&&!this._documentTargetSelector.getUrlForSelectedTarget()?(this.urlTextInput.set("validationState","error"),this.urlTextInput.set("errorText",q.wrongURL),this._hyperlinkDialogWidget.disableButton(k.OK)):(this.urlTextInput.set("validationState","normal"),this._hyperlinkDialogWidget.enableButton(k.OK),a.keyCode===c.ENTER&&("text"===a.target.type&&b&&d)&&this._handleOK()):
this._documentTargetSelector.getUrlForSelectedTarget()&&this._hyperlinkDialogWidget.enableButton(k.OK)}.bind(this),this._DONE_TYPING_INTERVAL)},_handleRemove:function(){this._targetUrl="";this._finalize()},_handleCancel:function(){this._hyperlinkDialogWidget.close()},_handleOK:function(){var a=this._documentTargetSelector.getUrlForSelectedTarget();if(a)this._targetUrl=a;else if(this._targetUrl=this.urlTextInput.inputNode.value,!n.isHyperlinkValid(this._targetUrl))return;this._finalize()},_finalize:function(){var a=
this.displayTextInput.inputNode.value?this.displayTextInput.inputNode.value:this._targetUrl;0===a.indexOf(n.INTERNAL)&&(a=q.internalLinkText);a={displayText:a,targetUrl:this._targetUrl};this._hyperlinkDialogWidget.close();this._acceptCallBack(a)},_handleClose:function(){this._documentTargetSelector.disableTargetSelector();clearTimeout(this._timeout);this._closeCallBack()},close:function(){this._hyperlinkDialogWidget.close()}})})},"MW/rtc/plugins/hyperlink/HTMLHyperlinkElementHandlerProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/hyperlink/HTMLHyperlinkElementHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cutcopypaste.htmlmimeconverter"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/hyperlink/HTMLHyperlinkElementHandler":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/plugins/hyperlink/model/HyperlinkNode"],function(g,f,e){return g(null,{constructor:function(d){d.registerNodeHandler("A",f.hitch(this,
"_convertHyperlinkNode"))},_convertHyperlinkNode:function(d,b){d.hasAttribute("href")&&b.appendInnerNode(new e([],{hyperlink:d.getAttribute("href")}))}})})},"MW/rtc/plugins/hyperlink/HyperlinkMIMEConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/hyperlink/HyperlinkMIMEConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cutcopypaste.converter"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/hyperlink/HyperlinkMIMEConverter":function(){define("dojo/_base/declare dojo/_base/lang MW/rtc/model/DocumentUtilities MW/rtc/model/PositionUtilities MW/rtc/plugins/cutcopypaste/MIMETypes MW/rtc/plugins/hyperlink/model/HyperlinkNode".split(" "),
function(g,f,e,d,b,a){return g(null,{constructor:function(c){c.registerNodeConverter(a,f.hitch(this,"_convertFromHyperlinkNode"))},_convertFromHyperlinkNode:function(a){var f=a.getStartPosition();a=a.getEndPosition();return e.isInTextLevelContainer(f.getNode())&&f.getNode().parent===a.getNode().parent&&e.isEdgeOfTextLevelContainer(f.getNode(),f.getOffset())&&e.isEdgeOfTextLevelContainer(a.getNode(),a.getOffset())&&0!==d.comparePositions(f,a)?[{flavor:b.MATLAB_RICHTEXT,content:JSON.stringify([f.getNode().parent.serialize()])}]:
[]}})})},"MW/rtc/plugins/hyperlink/HyperlinkTooltipProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/plugins/hyperlink/HyperlinkTooltip","MW/rtc/core/provider/PluginProvider"],function(g,f,e,d){return g(d,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.eventhandler","rtc.view"]}},createInstance:function(b,a,c){return new e(b,a,c)},destroyInstance:function(b){b.destroy()}})})},"MW/rtc/plugins/hyperlink/HyperlinkTooltip":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-style dojo/has dojo/query MW/rtc/plugins/view/tooltip/Tooltip mw-html-utils/HtmlUtils dojo/i18n!l10n/nls/richtext_actions".split(" "),
function(g,f,e,d,b,a,c,h,k){return g(null,{_LINE_BREAK:"\x3cbr\x3e",constructor:function(a,d,h){this._tooltip=new c(h,a,{timeout:500});this._view=h;this._aspectHandles=[];this._aspectHandles.push(e.after(this._tooltip,"onTooltip",f.hitch(this,"_displayTooltip"),!0));this._aspectHandles.push(e.after(d,"onMouseDown",f.hitch(this,"_onMouseDown"),!0));this._clickHintText=b("mac")?"":k.ctrlClickHint},_onMouseDown:function(a){this._tooltip&&this._tooltip.hideTooltip()},_isActiveWindow:function(){return!!a(".layeredNode").every(function(a){return"none"===
d.get(a,"display")})},_displayTooltip:function(a){if(a&&a.box&&a.parent&&this._isActiveWindow()&&"HyperlinkNode"===a.parent.className){var c=0!==a.parent.hyperlink.indexOf("internal")?a.parent.hyperlink:"",b=(c=c?h.escapeHtml(c):"")&&this._clickHintText?this._LINE_BREAK+this._clickHintText:this._clickHintText;(c||b)&&this._isElementInView(a.box)&&this._tooltip.showTooltip(c+b,{domNode:a.box})}},_isElementInView:function(a){a=a.getBoundingClientRect();var c=this._view.getDomtarget().getBoundingClientRect();
return a.top>=c.top&&a.bottom<=c.bottom},destroy:function(){this._aspectHandles.forEach(function(a){a.remove()});this._aspectHandles=[]}})})},"MW/rtc/plugins/view/tooltip/Tooltip":function(){define("dijit/Destroyable dojo/_base/declare dojo/_base/lang dojo/aspect ./TooltipEventHandler ./view/TooltipView".split(" "),function(g,f,e,d,b,a){return f(g,{constructor:function(c,f,g){this._tooltipView=new a(c);this.own(this._tooltipView);this._tooltipEventHandler=new b(c,g);this.own(d.after(this._tooltipEventHandler,
"onTooltip",e.hitch(this,"_onTooltip"),!0));this.own(d.after(this._tooltipEventHandler,"onHideTooltip",e.hitch(this,"hideTooltip"),!0));this.own(d.after(f,"onDocumentChanged",e.hitch(this,"_handleOnDocumentChanged")));this.own(d.after(c,"onLinesDOMUpdated",e.hitch(this,"_handleOnLinesDOMUpdated"),!0))},onTooltip:function(a,b){},_onTooltip:function(a,b){!a.rteNode&&a.parentNode&&a.parentNode.rteNode&&(a=a.parentNode);this.onTooltip(a.rteNode||null,b)},showTooltip:function(){this._tooltipView.show.apply(this._tooltipView,
arguments)},hideTooltip:function(){this._tooltipView.hide()},_handleOnDocumentChanged:function(){this.clearTooltip(!1)},_handleOnLinesDOMUpdated:function(a,b,d){this.clearTooltip(d)},clearTooltip:function(a){a||(this._tooltipEventHandler.clear(),this.hideTooltip())}})})},"MW/rtc/plugins/view/tooltip/TooltipEventHandler":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/on"],function(g,f,e){return g(null,{_TIMEOUT:780,_AUTOHIDE:0,constructor:function(d,b){b&&b.timeout&&(this._TIMEOUT=
b.timeout);b&&b.autohide&&(this._AUTOHIDE=b.autohide);this._tooltipTimer=null;var a=d.getDomtarget();e(a,"mousemove",f.hitch(this,"_onMousemove"))},onTooltip:function(d,b){},onHideTooltip:function(){},_onTooltipTimeout:function(d){this.onTooltip(d.target,d);if(this._AUTOHIDE){var b=f.hitch(this,this.onHideTooltip);this._tooltipTimer=setTimeout(function(){b()},this._AUTOHIDE)}},_onMousemove:function(d){if(d&&"mousemove"===d.type){this.clear();if(this._domNode!==d.target)this.onHideTooltip();this._domNode=
d.target;var b=f.hitch(this,this._onTooltipTimeout);this._tooltipTimer=setTimeout(function(){b(d)},this._TIMEOUT)}},clear:function(){this._tooltipTimer&&(clearTimeout(this._tooltipTimer),this._tooltipTimer=null)}})})},"MW/rtc/plugins/view/tooltip/view/TooltipView":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/dom-style dojo/on dijit/popup dijit/Destroyable dijit/TooltipDialog MW/uiframework/FocusManager".split(" "),function(g,f,e,d,b,a,c,h,k){return g(c,{_ORIENT_BELOW_FIRST:["below-centered",
"above-centered"],_ORIENT_ABOVE_FIRST:["above-centered","below-centered"],constructor:function(c){var b=this;this._view=c;this._offsetNode=null;this.tooltip=new h({"class":"rtcTooltip",onMouseLeave:function(){b.hide()}});this.own(this.tooltip);a.moveOffScreen(this.tooltip)},show:function(c,b){this.tooltip.set("content",c);var d=b.domNode;b.hasOwnProperty("xOffset")&&!isNaN(b.xOffset)&&(this._createOffsetDiv(b.domNode,b.xOffset),d=this._offsetNode);this._popupInfo={popup:this.tooltip,around:d,orient:b.orient||
this._ORIENT_BELOW_FIRST};a.open(this._popupInfo);this._registerResizeHandler(c);this._deriveProperOrientation(c);this._handleOverflowRendering();k.refuseFocus(this.tooltip.domNode)},hide:function(){this._destroyOffsetDiv();a.close(this.tooltip);this._popupInfo=null},_registerResizeHandler:function(a){this._isDomElement(a)&&a.addEventListener("onResized",f.hitch(this,"_reposition"))},_reposition:function(){this._popupInfo&&(a.open(this._popupInfo),this._handleOverflowRendering())},_deriveProperOrientation:function(a){if(this._isDomElement(a)){b.emit(a,
"onAdjustingOrientation",{bubbles:!1,cancelable:!0});var c=this._popupInfo.around.getBoundingClientRect();1>=this.tooltip.domNode.parentNode.getBoundingClientRect().bottom-c.top&&(this._popupInfo.orient=this._ORIENT_ABOVE_FIRST);b.emit(a,"onReadyToDisplay",{bubbles:!1,cancelable:!0})}},_handleOverflowRendering:function(){var a=this.tooltip.domNode.getBoundingClientRect().height,c=this.tooltip._popupWrapper.getBoundingClientRect().height;a>c+0.1&&this._correctOverflowRendering(a,c)},_correctOverflowRendering:function(a,
c){this.tooltip._popupWrapper.style.overflowY="visible";"dijitTooltipAbove"===this.tooltip._currentOrientClass&&(this.tooltip._popupWrapper.style.height=a+"px",this.tooltip._popupWrapper.style.top=c-a+"px")},_isDomElement:function(a){return a&&a.nodeType===Node.ELEMENT_NODE},_createOffsetDiv:function(a,c){this._offsetNode&&this._destroyOffsetDiv();var b=this._view.getCoordinateForDomNode(a);this._offsetNode=e.create("div",{style:{position:"absolute",left:b.x+c+"px",top:b.y+"px",width:"0px",height:b.height+
"px"}},this._view.getDomtarget())},_destroyOffsetDiv:function(){this._offsetNode&&(e.destroy(this._offsetNode),this._offsetNode=null)}})})},"MW/rtc/plugins/hyperlink/export/Hyperlink2HTMLProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/hyperlink/export/Hyperlink2HTML"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/hyperlink/export/Hyperlink2HTML":function(){define(["dojo/_base/declare",
"mw-utils/HtmlUtils","MW/rtc/plugins/export/NodeExporterInterface","MW/rtc/plugins/hyperlink/model/HyperlinkNode"],function(g,f,e,d){return g([e],{_INTERNAL_SCHEME:"internal:",constructor:function(){},getApplicableNodeClass:function(){return d},enter:function(b,a,c){a='\x3ca href \x3d "'+this._normalizeUrl(f.escapeHtml(a.hyperlink))+'"\x3e';b.addToBody(a);return!1},leave:function(b,a,c){b.addToBody("\x3c/a\x3e")},_normalizeUrl:function(b){0===b.indexOf(this._INTERNAL_SCHEME)&&(b=b.replace(this._INTERNAL_SCHEME,
"#"));return b.replace(/"/g,"\x26quot;")}})})},"MW/rtc/plugins/hyperlink/model/HyperlinkNodeContentConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./HyperlinkNodeContentConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/hyperlink/model/HyperlinkNodeContentConverter":function(){define(["dojo/_base/declare","MW/rtc/nodes/contentconverter/base/InnerNodeContentConverter",
"./HyperlinkNode"],function(g,f,e){return g(f,{getApplicableNodeClass:function(){return e}})})},"MW/rtc/plugins/hyperlink/view/HyperlinkCoordinateConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./HyperlinkCoordinateConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/hyperlink/view/HyperlinkCoordinateConverter":function(){define("dojo/_base/declare dojo/has MW/rtc/model/Position MW/rtc/plugins/hyperlink/model/HyperlinkNode MW/rtc/view/coordinateconverter/CoordinateConverterUtilities MW/rtc/view/coordinateconverter/base/BaseCoordinateConverter".split(" "),
function(g,f,e,d,b,a){return g(a,{constructor:function(){},getApplicableNodeClass:function(){return d},getCoordinateFromPosition:function(a){return null},getDelegatedPositionForCoordinate:function(a){var b=a.getNode();a=a.getOffset();a=b.findChildIndexForPosInNode(a);return new e(b.children[a.n],a.posInNode)},_getClientRects:function(a){var d=document.createRange();a=this.getDomNode(a);try{d.selectNodeContents(a)}catch(e){return[]}d=d.getClientRects();a=[];for(var g=0;g<d.length;g++)if(!f("trident")||
!(0===d[g].width&&1<d.length))a[a.length]=d[g];0===a.length&&(a=d);return b.getClientRectsArray(a)}})})},"MW/rtc/plugins/hyperlink/view/HyperlinkLayouterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./HyperlinkLayouter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/hyperlink/view/HyperlinkLayouter":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/view/layoutmanager/abstract/AbstractLayouter","../model/HyperlinkNode"],function(g,f,e){return g(f,{constructor:function(){},getApplicableNodeClass:function(){return e},layout:function(d,b){return d.layoutInto(b,"a",{"class":"hyperlinkNode",target:"_blank",rel:"noreferrer noopener",href:b.hyperlink})}})})},"MW/rtc/plugins/images/HTMLImageElementHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/images/HTMLImageElementHandler"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cutcopypaste.htmlmimeconverter"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/images/HTMLImageElementHandler":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/plugins/images/model/ImageNode"],function(g,f,e){return g(null,{_IMG_URI_DATA_ATTRIBUTE:"data-imguri",_IMG_WIDTH_ATTRIBUTE:"width",_IMG_HEIGHT_ATTRIBUTE:"height",_REGEXP_VALID_DIM:/^\d+(\.\d+)?(px)?$/,constructor:function(d){this._styleStack=
[{}];this._fromhtml=d;this._fromhtml.registerNodeHandler("IMG",f.hitch(this,"_convertImageNode"))},_convertImageNode:function(d,b){var a;d.src.match(/^data:image\/\S+;base64,/)?a=new e({imgSrc:d.src}):d.hasAttribute(this._IMG_URI_DATA_ATTRIBUTE)&&(a=new e({imgSrc:d.getAttribute("data-imguri")}));if(a){var c;d.hasAttribute(this._IMG_WIDTH_ATTRIBUTE)&&(c=d.getAttribute(this._IMG_WIDTH_ATTRIBUTE),c.match(this._REGEXP_VALID_DIM)&&(a.width=parseInt(c,10)));d.hasAttribute(this._IMG_HEIGHT_ATTRIBUTE)&&(c=
d.getAttribute(this._IMG_HEIGHT_ATTRIBUTE),c.match(this._REGEXP_VALID_DIM)&&(a.height=parseInt(c,10)));b.appendNode(a)}}})})},"MW/rtc/plugins/images/model/ImageNode":function(){define(["dojo/_base/declare","MW/rtc/nodes/OpaqueNode"],function(g,f){return g([f],{constructor:function(e){this.width=e.width||-1;this.height=e.height||-1;this.align=e.align||"baseline";e.imgSrc&&(this.imgSrc=e.imgSrc.replace(/\n|\r/g,""));this.altText=e.altText||"";this.originalWidth=this.width},className:"ImageNode",_serializeAttributes:function(e){e.width=
this.width;e.height=this.height;e.align=this.align;e.altText=this.altText;e.imgSrc=this.imgSrc;e.text=this.getText()}})})},"MW/rtc/plugins/images/ImagesProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/images/Images","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.view","rtc.cursor"]}},createInstance:function(d,b,a,c){return new f(d,b,a,c)}})})},"MW/rtc/plugins/images/Images":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/model/DocumentUtilities MW/rtc/model/events/DocumentEvent MW/rtc/model/events/InsertBreakEvent MW/rtc/model/events/NumberOfLinesChangedEvent ./model/ImageNode".split(" "),
function(g,f,e,d,b,a,c,h,k){return g(d,{_IMAGE_MIN_SIZE:18,_IMAGE_SCALING_FACTOR:0.9,constructor:function(a,c,b,d){this._cursor=d;this._internalDocument=a;this._document=c;this._view=b;this.own(e.after(this._document,"onDirectedDeletion",f.hitch(this,"_onDelete"),!0))},_onDelete:function(a,c){if(!this._cursor.hasSelection()&&c.isLocal&&this._isImageNode(c.startNode))return this._cursor.setPosition(this._cursor.selectionInfo2cursorPos(c)),!0},_isImageNode:function(a){return a&&a instanceof k},canInsertImage:function(){if(this._cursor.isCursorReadOnly()||
this._cursor.hasSelection()&&!this.imageUnderCursor())return!1;var a=this._cursor.getNode();return b.isInTextLevelContainer(a)&&!b.isEdgeOfTextLevelContainer(a,this._cursor.getOffset())?!1:!0},imageUnderCursor:function(){var a;a=this._cursor.selectionInfo();var c=a.isLocal&&this._isImageNode(a.startNode)?a.startNode:null;!c&&(a.isNull&&a.endPos===a.endNode.maxOffset())&&(a=a.endNode.nextSibling(),c=this._isImageNode(a)?a:null);return c},imageFromDOMNode:function(a){a=a.rteNode;return this._isImageNode(a)?
a:null},insertImageFromData:function(a){a=this._createImageNode(a);this._insertImageNode(a);return a},startImageChange:function(a){var c=this._document.startEdit(),b=this._cursor.getNode().rootContainer();this._savedState={imageNode:a,container:b,editBlock:c,lineNum:this._internalDocument.getLineNumber(b)}},endImageChange:function(b){if(this._savedState){var d=this._savedState.lineNum,e=[a.create(d,d)];b.rootContainer()!==this._savedState.container&&(e.push(c.create(d,d+1,0,1)),e.push(h.create(d,
d+1,-1)));this._savedState.editBlock.appendUndoEvents(e);this._savedState.editBlock.appendRedoEvents(e);this._internalDocument.emitDocumentEvents(e);if(!this._savedState.imageNode)this.onImageInserted(b);this._document.endEdit();this._savedState=null}},onImageInserted:function(a){},_createImageNode:function(a){return new k({imgSrc:a.imgSrc,width:a.width||-1,height:a.height||-1,altText:a.altText,align:a.align})},_insertImageNode:function(a){this._internalDocument.insertAtPosition(a,this._cursor.position);
this._cursor.setPosition(a,1)},getWidthToFitOnScreen:function(){var a=this._view.getDocumentDimension();return Math.max(this._IMAGE_SCALING_FACTOR*a.width,this._IMAGE_MIN_SIZE)}})})},"MW/rtc/plugins/images/ImageMimeConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/images/ImageMimeConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/images/ImageMimeConverter":function(){define(["dojo/_base/declare",
"dojo/_base/lang","MW/rtc/plugins/cutcopypaste/mime/MimeConverter","MW/rtc/plugins/images/model/ImageNode"],function(g,f,e,d){return g(e,{_PRIORITY:1,constructor:function(){},getType:function(){return"image/x-java-image"},convertFromMimeData:function(b){return[(new d({className:"ImageNode",imgSrc:b.src,width:b.width,height:b.height})).serialize()]},priority:function(){return this._PRIORITY}})})},"MW/rtc/plugins/images/ImageNodeConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"MW/rtc/plugins/images/ImageNodeConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cutcopypaste.converter"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/images/ImageNodeConverter":function(){define("dojo/_base/declare dojo/_base/lang MW/rtc/model/PositionUtilities MW/rtc/plugins/cutcopypaste/MIMETypes MW/rtc/plugins/images/model/ImageNode mw-log/Log".split(" "),function(g,f,e,d,b,a){return g(null,{constructor:function(a){a.registerNodeConverter(b,
f.hitch(this,"_convertFromImageNode"))},_convertFromImageNode:function(c){c=c.getStartPosition().getNode();a.assert(c.isInstanceOf(b),"_convertFromImageNode should be called for selections with an ImageNode.");return[{flavor:d.IMAGE,content:c.imgSrc}]}})})},"MW/rtc/plugins/images/InsertImageProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/images/InsertImage"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument",
"rtc.cursor","rtc.actionservice","rtc.richtext.images","rtc.focusservice"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/images/InsertImage":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/RichTextComponentFeatureEnum ./view/ImageDialog dojo/i18n!l10n/nls/richtext_actions".split(" "),function(g,f,e,d,b,a,c){return g(d,{constructor:function(a,c,d,g,p){this._cursor=c;this._focusService=p;this._internalDocument=
a;this._imagesPlugin=g;this._actionService=d;this._actionService.loadActions([{id:b.IMAGES.IMAGE_ACTION,enabled:!1,key:"ctrl_alt_z",callback:f.hitch(this,"_imageAction")}]);this.own(e.after(this._cursor,"onDoubleClick",f.hitch(this,"_doubleClick")));this.own(e.after(this._cursor,"onChange",f.hitch(this,"_updateActions")))},_updateActions:function(){this._actionService.updateAction(b.IMAGES.IMAGE_ACTION,{enabled:this._canInsertImage()});this._actionService.updateAction("rtc_insert_image",{enabled:this._canInsertImage()&&
!this._imagesPlugin.imageUnderCursor()});this._actionService.updateAction("rtc_edit_image",{enabled:this._canInsertImage()&&!!this._imagesPlugin.imageUnderCursor()})},_canInsertImage:function(){return this._imagesPlugin.canInsertImage()},_doubleClick:function(){if(!this._cursor.isCursorReadOnly()){var a=this._imagesPlugin.imageUnderCursor();a&&(this._cursor.resetAction(),this._openDialog(a))}},_imageAction:function(){if(this._actionService.getAction(b.IMAGES.IMAGE_ACTION).enabled&&this._canInsertImage()){var a=
this._imagesPlugin.imageUnderCursor();this._openDialog(a)}},_openDialog:function(c){this._dialog=new a(f.hitch(this,this._dlgAccept),f.hitch(this,this._dlgClose),c)},_dlgClose:function(){this._focusService.setFocus()},_dlgAccept:function(a){this._imagesPlugin.startImageChange();var c=a.node;c?(this._internalDocument.changeNodeAttributes(c,a),this._cursor.onUpdate()):c=this._imagesPlugin.insertImageFromData(a);this._imagesPlugin.endImageChange(c)}})})},"MW/rtc/plugins/images/view/ImageDialog":function(){define("dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-class dojo/on dojo/text!./ImageDialogTemplate.html dojo/i18n!l10n/nls/dialog dojo/i18n!l10n/nls/insertImageDialog mw-dialog-utils/DialogUtils dijit/form/RadioButton dijit/form/ComboBox dijit/form/Button dijit/form/TextBox".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p){return d([g,f,e],{templateString:k,widgetsInTemplate:!0,TRIANGLE_COLLAPSED_CLASS:"detailTriangleCollapsed",TRIANGLE_EXPANDED_CLASS:"detailTriangleExpanded",ALIGNMENT_DEFAULT:"bottom",constructor:function(a,c,b){this._acceptCallBack=a;this._closeCallBack=c;this.dataUri=this.url="";this.settingsStore={altText:"",size:100,align:this.ALIGNMENT_DEFAULT};this._imgNode=b||null},postCreate:function(){this.inherited(arguments);this.okButton.set("label",l.ok);h(this.okButton,
"click",b.hitch(this,"onOK"));this.cancelButton.set("label",l.cancel);h(this.cancelButton,"click",b.hitch(this,"onCancel"));this.fileRadioLabel.innerHTML=m.fromLocalFile;this.urlRadioLabel.innerHTML=m.fromWeb;a.after(this.urlRadioBut,"onChange",b.hitch(this,"_onInputModeChanged"));h(this.imageFileInput,"change",b.hitch(this,"onFileChange"));h(this.imageUrlTextInput,"input",b.hitch(this,"onUrlChange"));this.urlField.style.display="none";this.own(h(this.imagePreview,"load",b.hitch(this,"_previewLoad")),
h(this.imagePreview,"error",b.hitch(this,"_previewLoad")));this.detailArea.style.display="none";this.detailsLabel.innerHTML=m.displaySettings;h(this.detailsTriangle,"click",b.hitch(this,"_detailsToggle"));h(this.detailsLabel,"click",b.hitch(this,"_detailsToggle"));this.altTextInputLabel.innerHTML=m.altText;this.sizeInputLabel.innerHTML=m.sizeInPercent;this.alignInputLabel.innerHTML=m.alignment;this._init();a.after(this.sizeTextInput,"onChange",b.hitch(this,"_sizeUpdate"));this._goToDialogWidget=p.displayModalDialog(this,
this._imgNode?m.editTitle:m.insertTitle,[])},_init:function(){var a=1;this._imgNode&&(this.alignInput.value=this._imgNode.align,this.altTextInput.setValue(this._imgNode.altText),this.imagePreview.src=this._imgNode.imgSrc,0<this._imgNode.width&&this.imagePreview.naturalWidth&&(a=this.imagePreview.naturalWidth/this._imgNode.width),this.sizeTextInput.setValue(Math.round(100/a)),this._isDataUri(this._imgNode.imgSrc)?(this.dataUri=this._imgNode.imgSrc,this.fileDataPath=this.altTextInput.value):(this.urlRadioBut.set("checked",
!0),this.fileRadioBut.set("checked",!1),this.imageUrlTextInput.setValue(this._imgNode.imgSrc),this._onInputModeChanged()),this._detailsToggle());this._renderPreview()},_previewLoad:function(a){"load"===a.type?(this.okButton.set("Disabled",!1),this._altTextUpdate(!0)):0>=this.imagePreview.naturalWidth&&0>=this.imagePreview.naturalHeight&&this.okButton.set("Disabled",!0);this._sizeUpdate()},_detailsToggle:function(){"none"===this.detailArea.style.display?(this.detailArea.style.display="inline",c.replace(this.detailsTriangle,
this.TRIANGLE_EXPANDED_CLASS,this.TRIANGLE_COLLAPSED_CLASS)):(this.detailArea.style.display="none",c.replace(this.detailsTriangle,this.TRIANGLE_COLLAPSED_CLASS,this.TRIANGLE_EXPANDED_CLASS))},_onInputModeChanged:function(){this.fileField.style.display=this.urlRadioBut.checked?"none":"inline";this.urlField.style.display="none"===this.fileField.style.display?"inline":"none";var a;a=this.altTextInput.value;this.altTextInput.setValue(this.settingsStore.altText);this.settingsStore.altText=a;a=this.sizeTextInput.value;
this.sizeTextInput.setValue(this.settingsStore.size);this.settingsStore.size=a;a=this.alignInput.value;this.alignInput.value=this.settingsStore.align;this.settingsStore.align=a;this.imageUrlTextInput.focus();this._renderPreview()},_altTextUpdate:function(a){if(""===this.altTextInput.value||a)this.altTextInput.setValue(this._fileNameFromPath(this.urlRadioBut.checked?this.url:this.fileDataPath))},_sizeUpdate:function(){var a="";if(this.imagePreview.naturalWidth||this.imagePreview.naturalHeight)a=this._calcWidth(),
a=a.width+" x "+a.height;this.origSize.innerHTML=a},_renderPreview:function(){var a="";a=this.urlRadioBut.checked?this.url=this.imageUrlTextInput.get("value"):this.dataUri;this.imagePreview.src=a;""===a?(this.imagePreview.style.display="none",this.noPreview.style.display="inline-block"):(this.imagePreview.style.display="inline-block",this.noPreview.style.display="none");this._sizeUpdate()},onUrlChange:function(a){var c=this;setTimeout(function(){c._destroyed||c._renderPreview()},0)},onFileChange:function(){this.dataUri=
"";this.imagePreview.src="";var a=this.imageFileInput.value;if(a){var c=new FileReader;c.readAsDataURL(this.imageFileInput.files[0]);var b=this;c.onloadend=function(c){b.dataUri=c.target.result;b.fileDataPath=a;b._renderPreview();b._altTextUpdate()}}else this.dataUri="",this._renderPreview(),this._altTextUpdate()},onClose:function(){this._closeCallBack()},onCancel:function(){this.onClose();this._goToDialogWidget.onClose()},onOK:function(){var a={},a={},c=parseInt(this.sizeTextInput.value,10);isNaN(c)||
100===c||(a=this._calcWidth());var b;this._imgNode?b=this.alignInput.value!==this._imgNode.align?this.alignInput.value:this._imgNode.align:this.alignInput.value!==this.ALIGNMENT_DEFAULT&&(b=this.alignInput.value);a={node:this._imgNode,imgSrc:this.urlRadioBut.checked?this.url:this.dataUri,altText:this.altTextInput.value,align:b,width:a.width||-1,height:a.height||-1};this._acceptCallBack(a);this.onClose();this._goToDialogWidget.onClose()},_fileNameFromPath:function(a){return!a||this._isDataUri(a)?"":
a.replace(/^.*(\\|\/|\:)/,"")},_calcWidth:function(){var a={},c=parseInt(this.sizeTextInput.value,10);a.width=Math.round(this.imagePreview.naturalWidth*c/100);a.height=Math.round(this.imagePreview.naturalHeight*c/100);return a},_isDataUri:function(a){return a&&a.substring&&a.substring(0,25).match(/^data:image.+;base64/)?!0:!1},onTextKeyup:function(a){}})})},"MW/rtc/plugins/images/InlineResizeImageProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/images/InlineResizeImage"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.richtext.images rtc.view rtc.internaldocument rtc.cursor rtc.richtext.resizer rtc.actionservice".split(" ")}},createInstance:function(d,b,a,c,f,g){return new e(d,b,a,c,f,g)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/images/InlineResizeImage":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/has dojo/on mw-log/Log MW/rtc/model/events/DocumentEvent dojo/i18n!l10n/nls/richtext_actions".split(" "),
function(g,f,e,d,b,a,c,h){return g(null,{constructor:function(a,c,d,g,n,q){this._imagePlugin=a;this._cursor=g;this._internalDocument=d;this._actionService=q;this._view=c;this._resizer=n;this._temporaryListeners=[];this._listeners=[];this._listeners.push(b(c.getDomtarget(),"click",f.hitch(this,this._handleClick)));this._listeners.push(e.after(this._cursor,"onChange",f.hitch(this,"_cursorChanged")));this._listeners.push(e.after(this._imagePlugin,"onImageInserted",f.hitch(this,"_imageInserted"),!0));
this._actionService.loadActions([{id:"rtc_reset_image",enabled:!1,contextMenuGroup:"RichText",description:h.resetImage,callback:f.hitch(this,"_resetImageSize")},{id:"rtc_deactivate_image",enabled:!1,key:"escape",callback:f.hitch(this,"_escapePressed")}])},destroy:function(){this._deactivateImage();this._listeners.forEach(function(a){a.remove()});this._listeners=[];this._actionService.removeAction("rtc_reset_image");this._actionService.removeAction("rtc_deactivate_image")},_imageInserted:function(a){this._cursor.setPosition(a,
{posInNode:1});this._cursor.movePosition(this._cursor.LEFT,!0)},_updateActions:function(){this._actionService.updateAction("rtc_reset_image",{enabled:this._canResetImage()})},_escapePressed:function(){return this._activeImage?(this._cursor.collapseSelection(),!0):!1},_cursorChanged:function(){var a,c;if(!this._activeImage&&(a=this._imagePlugin.imageUnderCursor(),c=this._cursor.selectionInfo(),a&&!c.isNull)){this._tryActivateImage(a);return}this._resizer.deactivate()},_handleClick:function(a){if(a=
this._imagePlugin.imageFromDOMNode(a.target)){var c=this._cursor.getNode()===a?this._cursor.getOffset():1;this._cursor.setPosition(a,{posInNode:c?0:1});this._cursor.movePosition(c?this._cursor.RIGHT:this._cursor.LEFT,!0)}else this._resizer.deactivate()},_canResetImage:function(){if(this._cursor.isCursorReadOnly())return!1;var a=this._activeImage||this._imagePlugin.imageUnderCursor();return a&&a.width!==a.originalWidth?!0:!1},_resetImageSize:function(){if(this._cursor.isCursorReadOnly())return!1;var a=
this._activeImage||this._imagePlugin.imageUnderCursor();a&&(this._imagePlugin.startImageChange(),this._internalDocument.changeNodeAttributes(a,{width:a.originalWidth,height:-1}),this._view.layoutNode(a),this._cursor.onUpdate(!1,!0),this._imagePlugin.endImageChange(a),this._activateImage(a))},_tryActivateImage:function(a){7<=d("trident")?(this._activateImage(a),a.box.addEventListener("load",f.hitch(this,function(){this._view.onLayoutChange()}),{once:!0})):a.box.complete?this._activateImage(a):a.box.addEventListener("load",
f.hitch(this,function(){this._activateImage(a);this._view.onLayoutChange()}),{once:!0})},_activateImage:function(a){if(!this._cursor.isCursorReadOnly()&&this._activeImage!==a){this._activeImage=a;this._cursor.hideSelection();var c=1;-1<this._activeImage.width?(a=this._activeImage.width,c=this._activeImage.width/this._activeImage.box.naturalWidth):a=this._activeImage.box.naturalWidth;this._resizer.activate({top:this._activeImage.box.offsetTop,left:this._activeImage.box.offsetLeft,width:a,height:-1<
this._activeImage.height?this._activeImage.height:Math.round(c*this._activeImage.box.naturalHeight)},{startDrag:f.hitch(this,"_startResize"),endDrag:f.hitch(this,"_endResize"),drag:f.hitch(this,"_trackResize"),closed:f.hitch(this,"_deactivateImage")});this._temporaryListeners.push(e.after(this._view,"onResize",f.hitch(this,"_handleViewChange")));this._temporaryListeners.push(e.after(this._view,"onLayoutChange",f.hitch(this,"_handleViewChange")));this._temporaryListeners.push(e.after(this._internalDocument,
"onDocumentChanged",f.hitch(this,"_documentChanged"),!0));this._updateActions()}},_deactivateImage:function(){this._activeImage=null;this._temporaryListeners.forEach(function(a){a.remove()});this._temporaryListeners=[];this._cursor.showSelection();this._updateActions()},_handleViewChange:function(){this._resizer.moveTo(this._activeImage.box.offsetTop,this._activeImage.box.offsetLeft)},_documentChanged:function(){!this._activeImage.box.offsetTop||!this._activeImage.box.offsetLeft||!this._activeImage.box.offsetWidth||
!this._activeImage.box.offsetHeight?this._resizer.deactivate():(this._resizer.moveTo(this._activeImage.box.offsetTop,this._activeImage.box.offsetLeft),this._resizer.resize(this._activeImage.box.offsetWidth,this._activeImage.box.offsetHeight))},_startResize:function(){this._savedSizeAttributes={width:this._activeImage.width,height:this._activeImage.height};this._imagePlugin.startImageChange(this._activeImage)},_endResize:function(a,c){this._activeImage.updateAttributes(this._savedSizeAttributes);this._internalDocument.changeNodeAttributes(this._activeImage,
{width:a,height:c});this._imagePlugin.endImageChange(this._activeImage);this._view.layoutNode(this._activeImage);this._updateActions()},_trackResize:function(a,c){this._activeImage.updateAttributes({width:a,height:c});this._view.layoutNode(this._activeImage);this._view.onLayoutChange();return!0}})})},"MW/rtc/plugins/images/export/Image2HTMLProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/images/export/Image2HTML"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},
createInstance:function(){return new e}})})},"MW/rtc/plugins/images/export/Image2HTML":function(){define(["dojo/_base/declare","MW/rtc/plugins/export/NodeExporterInterface","MW/rtc/plugins/images/model/ImageNode"],function(g,f,e){return g([f],{constructor:function(){},getApplicableNodeClass:function(){return e},visit:function(d,b,a,c,e){d.addToBody('\x3cimg src \x3d "'+b.imgSrc+'" width \x3d "'+b.width+'" height \x3d "'+b.height+'" alt \x3d "'+b.altText+'" style \x3d "vertical-align: '+b.align+'"\x3e\x3c/img\x3e')}})})},
"MW/rtc/plugins/images/model/ImageNodeContentConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./ImageNodeContentConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/images/model/ImageNodeContentConverter":function(){define(["dojo/_base/declare","MW/rtc/nodes/contentconverter/base/LeafNodeContentConverter","./ImageNode"],function(g,f,e){return g(f,{getApplicableNodeClass:function(){return e}})})},
"MW/rtc/plugins/images/view/ImageCoordinateConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./ImageCoordinateConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/images/view/ImageCoordinateConverter":function(){define(["dojo/_base/declare","MW/rtc/plugins/images/model/ImageNode","MW/rtc/view/coordinateconverter/base/OpaqueBoxCoordinateConverter"],function(g,
f,e){return g(e,{constructor:function(){},getApplicableNodeClass:function(){return f},getCoordinateFromPosition:function(d){var b=this.inherited(arguments),a=d.getOffset();b.x-=a?0:1;return b}})})},"MW/rtc/plugins/images/view/ImageLayouterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./ImageLayouter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},
"MW/rtc/plugins/images/view/ImageLayouter":function(){define(["dojo/_base/declare","MW/rtc/model/NodeUtilities","MW/rtc/plugins/view/layoutmanager/abstract/AbstractLayouter","../model/ImageNode"],function(g,f,e,d){return g(e,{constructor:function(){},getApplicableNodeClass:function(){return d},layout:function(b,a){var c={"class":"imageNode"};0<=a.width&&(c.width=a.width);0<=a.height&&(c.height=a.height);c.style=a.align?"vertical-align: "+a.align:"vertical-align: baseline";a.imgSrc&&(c.src=a.imgSrc.replace(/\n|\r/g,
""));a.altText&&(c.alt=a.altText);a.textContainer().tempAlign=f.isFreestandingOpaque(a);return b.layoutInto(a,"img",c)}})})},"MW/rtc/plugins/imeinput/IMEInputProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./IMEInput"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.cursor rtc.document rtc.internaldocument rtc.keyhandler rtc.shadowtextservice rtc.view.movehiddenkeycapture".split(" ")}},createInstance:function(d,b,a,c,f,g){return new e(d,
b,a,c,f,g)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/imeinput/IMEInput":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-class dojo/dom-construct dojo/dom-style dojo/has dojo/on MW/rtc/model/DocumentConstants".split(" "),function(g,f,e,d,b,a,c,h,k){return g(null,{constructor:function(a,c,b,d,e,g){this._cursor=a;this._document=c;this._internalDocument=b;this._keyhandler=d;this._keyCapture=this._keyhandler.keyCapture;this._shadowtextservice=e;this._moveHiddenkeyCapture=
g;this._handlers=[];this._handlers.push(h(this._keyCapture,"compositionstart",f.hitch(this,"_handleCompositionstart")));this._handlers.push(h(this._keyCapture,"compositionend",f.hitch(this,"_handleCompositionend")));this._IMEnodeHandle=null;this._currentText=""},destroy:function(){this._handlers.forEach(function(a){a.remove()});this._handlers=[]},_handleServiceUpdate:function(a){a.update(this._currentText)},_inputHandlerIME:function(a){this._currentText=a;this._IMEnodeHandle.update(a)},_handleCompositionstart:function(c){this._cursor.isCursorReadOnly()?
this._keyCapture.value="":(this._cursor.hasSelection()&&this._document.deleteTextAtCurrentPosition(k.FORWARD_DELETE),this._keyhandler.setInputHandler(f.hitch(this,"_inputHandlerIME")),this._currentText="",c={text:"",cssClass:"composingInIME",updateCallback:f.hitch(this,"_handleServiceUpdate"),caretRightAligned:!0},this._IMEnodeHandle=this._shadowtextservice.requestTextAfterCursor(c),c=a.getComputedStyle(this._cursor.getNode().box),a.set(this._keyCapture,"fontSize",c.fontSize),this._moveHiddenkeyCapture.moveHiddenKeyCaptureToCaret(!0))},
_handleCompositionend:function(a){this._IMEnodeHandle.remove();this._IMEnodeHandle=null;this._currentText="";this._keyhandler.setDefaultInputHandler();(c("trident")||54<c("chrome"))&&this._keyhandler.handleInput({});this._moveHiddenkeyCapture.moveHiddenKeyCaptureToCaret(!1)}})})},"MW/rtc/plugins/indentation/IndentationProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./Indentation"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cursor",
"rtc.actionservice","rtc.internaldocument","rtc.keyhandler","rtc.indentutilities"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/indentation/Indentation":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/model/CodeUtilities MW/rtc/model/DocumentConstants MW/rtc/model/DocumentUtilities MW/rtc/model/NodeUtilities MW/rtc/model/RangeUtilities MW/rtc/RichTextComponentFeatureEnum dojo/i18n!l10n/nls/actions".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m){return g(d,{constructor:function(a,c,b,d,h){this._cursor=a;this._actionService=c;this._internalDocument=b;this._keyhandler=d;this._indentUtilities=h;this._addActions();this._addKeyBindings();this.own(e.after(this._cursor,"onChange",f.hitch(this,this._updateActiveSection)));this.own(e.after(this._internalDocument,"onDocumentChanged",f.hitch(this,this._updateActionsOnDocumentChange),!0))},_addActions:function(){this._actions=[{id:l.INDENT.INDENT_ACTION,enabled:!0,key:"ctrl_]",
platformKey:{mac:"meta_]"},description:m.indentDescription,callback:f.hitch(this,"_indentCallback")},{id:l.INDENT.OUTDENT_ACTION,enabled:!0,key:"ctrl_[",platformKey:{mac:"meta_["},description:m.outdentDescription,callback:f.hitch(this,"_unindentCallback")},{id:"rtc_format_code_tab",key:"tab",enabled:!0,callback:f.hitch(this,"_tabIndentCallback")}];this._actionService.loadActions(this._actions)},_indentCallback:function(){if(this._actionService.getAction(l.INDENT.INDENT_ACTION).enabled)return this._indentCode(f.hitch(this._indentUtilities,
"indentSelection"))},_unindentCallback:function(){if(this._actionService.getAction(l.INDENT.OUTDENT_ACTION).enabled)return this._indentCode(f.hitch(this._indentUtilities,"unindentSelection"))},_tabIndentCallback:function(){if(this._actionService.getAction(l.INDENT.OUTDENT_ACTION).enabled)return this._tabIndent()},_addKeyBindings:function(){this._keyhandler.addBindings([{key:"shift_tab",action:l.INDENT.OUTDENT_ACTION}])},_indentCode:function(a){if(this._isCodeInSelection())return a(c.DEFAULT_TAB_STRING),
!0},_tabIndent:function(){if(!this._cursor.hasSelection()||k.rangeIsInsideOneTextContainer(this._cursor.getSelection()))return!1;this._indentCode(f.hitch(this._indentUtilities,"indentSelection"));return!0},_updateActionsOnDocumentChange:function(c){c&&f.isArray(c)&&c.some(function(c){if(c.type===a.READONLY_STATE_CHANGE_EVENT)return this._updateActiveSection(),!0},this)},_updateActiveSection:function(){var a=!this._cursor.isCursorReadOnly(),a=this._isCodeInSelection()&&a;this._actionService.updateAction(l.INDENT.INDENT_ACTION,
{enabled:a});this._actionService.updateAction(l.INDENT.OUTDENT_ACTION,{enabled:a});this._actionService.updateAction("rtc_format_code_tab",{enabled:a})},_isCodeInSelection:function(){var a=this._cursor.selectionInfo();return b.isCodeInRange(a.startNode,a.endNode)},destroy:function(){this._actions.forEach(function(a){this._actionService.removeAction(a.id)},this)}})})},"MW/rtc/plugins/indentutilities/IndentUtilitiesProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"MW/rtc/model/Document","MW/rtc/plugins/indentutilities/IndentUtilities"],function(g,f,e,d){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.cursor","rtc.internaldocument","rtc.document","rtc.textnodeservice","matlab.tokens"]}},createInstance:function(b,a,c,e,f){return new d(b,a,c,e,f)}})})},"MW/rtc/plugins/indentutilities/IndentUtilities":function(){define("dojo/_base/declare dojo/_base/lang mw-log/Log MW/rtc/model/DocumentConstants MW/rtc/model/DocumentUtilities MW/rtc/model/CodeUtilities MW/rtc/model/NodeUtilities MW/rtc/model/Position MW/rtc/model/events/DocumentEvent MW/rtc/plugins/language/matlab/autoindent/preferences/FunctionIndentingPreferences MW/rtc/plugins/undoredo/EditBlockConstants MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities mw-utils/Utils".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){return g(null,{_INDENT_AMOUNT:4,_UNDOREDO_BLOCK_NAME:"AutoIndent",constructor:function(a,c,b,d,e){this._cursor=a;this._textNodeService=d;this._internalDocument=c;this._document=b;this._tokenizerService=e;this.setIndentingStyle(l.MixedFunctionIndenting)},indentSelection:function(a,c){this._indentSelection(1,a,c)},unindentSelection:function(a){this._internalDocument.root.getTextForPositioning().length&&this._indentSelection(-1,a)},setIndentingStyle:function(a){this._indentingStyle=
a},_indentSelection:function(a,c,b){var d=this._document.startEdit(m.INDENT),e=this._cursor.selectionInfo(),f=this._internalDocument.getLineNumber(e.startNode.rootContainer()),h=this._internalDocument.getLineNumber(e.endNode.rootContainer());if(a=this._doIndentOrUnindentOnSelection(a,c,e,b))this._generateAndEmitEvents(d,f,h),this._cursor.setPosition(a)},_doIndentOrUnindentOnSelection:function(a,c,b,d){var e=this.getRangeFromSelection(b),f=this._cursor.selectionInfo2cursorPos(b),h=c.length;if(0<a)this.blockIndent(e.start,
e.end,c,d),b=this._adjustSelectionForIndent(b,f,c,d);else{a=this.blockUnindent(e.start,e.end,"",h);if(0===a.length)return this._document.endEdit(),null;b=this._adjustSelectionForUnindent(b,f,a)}return b},_adjustSelectionForIndent:function(c,b,d,e){var f=c.isReversed;d=d.length;var h=this._internalDocument.getLineNode(b.line),g=this._internalDocument.getLineNode(b.anchor.line),k=this._cursor.getNode().parent,l=h.children;if(g)var m=this._cursor.anchor.getNode().parent,p=g.children;var n=1,F=n=0;if(c.isNull){if(a.isCodeContainer(h)||
e)b.column+=f||void 0!==b.column?d:0}else{if(a.isCodeContainer(h)||e)h.childrenAreContainers?f?b.column+=f||b.column?d:0:(n=l.indexOf(k),F=l.indexOf(m),n=n-(-1===F?0:F)+(b.posInNode?1:0),b.column+=f||b.column?d*n:0):b.column+=f||b.column?d:0;if(a.isCodeContainer(g)||e)g.childrenAreContainers?f?(F=p.indexOf(m),n=p.indexOf(k),n=F-(-1===n?0:n)+(b.anchor.posInNode?1:0),b.anchor.column+=!f||b.anchor.column?d*n:0):b.anchor.column+=!f||b.anchor.column?d:0:b.anchor.column+=!f||b.anchor.column?d:0}return b},
_adjustSelectionForUnindent:function(c,b,d){c=c.isReversed;var e=this._internalDocument.getLineNode(b.line),f=this._internalDocument.getLineNode(b.anchor.line);a.isCodeContainer(e)&&(b.column-=c?d[0]:d[1],b.column=Math.max(0,b.column));a.isCodeContainer(f)&&(b.anchor.column-=!c?d[0]:d[1],b.anchor.column=Math.max(0,b.anchor.column));return b},_generateAndEmitEvents:function(a,c,b){c=[k.create(c,b)];a.appendUndoEvents(c);a.appendRedoEvents(c);this._document.endEdit();this._internalDocument.emitDocumentEvents(c)},
getRangeFromSelection:function(a){var c=a.startNode.textContainer(),b=a.endNode.textContainer(),d=0;0===a.endPos&&c!==b?(b=b.prevNode().textContainer(),d=0):d=b.maxOffset();return{start:c,end:b,endLength:d}},_shouldProcessContainer:function(a,c,b){return a&&(c!==b||!c)},blockIndent:function(c,b,d,e){for(var f=null;this._shouldProcessContainer(c,f,b);)!c.isAutoGenerated&&(a.isCodeContainer(c)||e)&&this.indentContainer(c,d),f=c,c=this._getNextContainer(c)},blockDeltaIndent:function(c,b,d,e){for(var f=
null,h=0,g=!1,k=0;this._shouldProcessContainer(c,f,b);)a.isCodeContainer(c)&&!c.isReadOnly()&&(f=d[h],0<f?(this.indentContainer(c,e.substring(0,f)),g=!0):0>f&&(k=this.unindentContainer(c,-f))&&(g=!0),n.isWhitespace(c.getText())||0!==this.rightTrimContainer(c)&&(g=!0)),f=c,c=c.nextSibling(),h+=1;return g},blockUnindent:function(c,b,d,e){for(var f=null,h=-1,g=!1,k=0,l=0<d.length;!f||f!==b;)a.isCodeContainer(c)&&!c.isReadOnly()&&(k=l?this.unindentContainerByString(c,d,e):this.unindentContainer(c,e),
0>h&&(h=k),k&&(g=!0)),f=c,c=this._getNextContainer(c);return!g?[]:[h,k]},_getNextContainer:function(a){return(a=a.nextSibling()||a.rootContainer().nextSibling())&&a.childrenAreContainers?a.children[0]:a},indentContainer:function(a,c){var b=a.startNode();if(b){var b=new h(b,0),d=this._textNodeService.createTextNodeForPosition(c,b);this._internalDocument.insertAtPosition(d,b)}},unindentContainer:function(a,c){var b=a.getText(),d=0;if(c&&0<c)if((b=b.substr(d,c).match(/\s*/))&&b[0])d+=b[0].length;else return 0;
return this._internalDocument.deleteTextRange(a,d,!1,!0)},unindentContainerByString:function(a,c,b){var d=a.getText(),e=d.indexOf(c);if(0>e)return 0;c=c.length;b&&0<b&&(b=d.substr(e+c,b).match(/\s*/))&&b[0]&&(c+=b[0].length);return this._internalDocument.deleteTextRange(a,c,e,!0)},rightTrimContainer:function(a){var c=0,b=0;if((c=a.getText().match(/\s*$/))&&c[0])b=c.index,c=c[0].length;else return 0;return this._internalDocument.deleteTextRange(a,c,b,!0)},skipWhiteSpaces:/\S|$/,_indentDelta:function(a,
c){var b=a.search(this.skipWhiteSpaces);return c.search(this.skipWhiteSpaces)-b},getIndentLevel:function(a){return a.getText().search(this.skipWhiteSpaces)},getIndentForLineNumber:function(a){a=this._internalDocument.getLineNode(a);return this.getIndentLevel(a)},getIndentArray:function(a,c){var b=[],d,e=0;for(d=0;d<a.length;d+=1){var f=this._indentDelta(a[d],c[d]);b.push(f);e<f&&(e=f)}b.push(e);return b},changeLineIndent:function(a,c){e.assert(0!==c,"Delta should not be zero");var b=this._internalDocument.getLineNode(a),
d=this._document.startEdit(),f;0<c?f=this._indentContainer(b,c):0>c&&(f=this._unindentContainer(b,-c));this._cursor.setPosition(f);b=k.create(a,a);d.appendUndoEvents([b]);d.appendRedoEvents([b]);this._document.endEdit();this._internalDocument.emitDocumentEvents([b])},_indentContainer:function(a,c){e.assert(0<c,"Amount to indent should be greater than zero");var d=b.getWhitespaceStringOfLength(c);this.indentContainer(a,d);var f=this._cursor.getPosition();f.column<d.length&&(f.column+=d.length);return f},
_unindentContainer:function(a,c){e.assert(0<c,"Amount to un-indent should be greater than zero");this.unindentContainer(a,c);return this._cursor.getPosition()},format:function(a){var c=this._tokenizerService.getLexStateForLine(a),b=0;c&&this._tokenizerService.isLineContinuation(c)?b=this.processLineContinuations(a):c&&!this._tokenizerService.isLineContinuation(c)&&(b=this.processNonLineContinuations(a));c=this.findFirstNonWhitespaceTokenInLine(a);b=this._findIndentLevel(c,a,b);c=this.getDeltaOfIndent(a,
b);0!==c&&this._document.undoable(f.hitch(this,"changeLineIndent",a,c),this._UNDOREDO_BLOCK_NAME);return b},processLineContinuations:function(a){var c=0,b=null;0<a&&(b=this._tokenizerService.getLexStateForLine(a-1));a=!0;b&&this._tokenizerService.isLineContinuation(b)&&(a=!1);a&&(c=this._INDENT_AMOUNT);return c},processNonLineContinuations:function(a){for(var c=null,b=0,d=!1,e=a;!d;){var f=this._isCodeLineEmpty(e-1);0<a&&(c=this._tokenizerService.getLexStateForLine(e-1));if(c&&this._tokenizerService.isLineContinuation(c))b=
-this._INDENT_AMOUNT,d=!0;else if(!f||!c)d=!0;e-=1}return b},_isCodeLineEmpty:function(a){if(0<=a)return!this._document.isLineCode(a+1)||""===this._document.getLineText(a+1)},findFirstNonWhitespaceTokenInLine:function(a){for(a=this._tokenizerService.getFirstTokenOnLine(a);null!==a&&p.isWhitespaceToken(a);)a=this._tokenizerService.getNextTokenOf(a);return a},_findIndentLevel:function(a,c,b){var d=-1;if(null!==a){var e=this._findStartTokenForMidBlock(a,c);null!==e?d=this._getIndentLevelForMidToken(e):
p.isTokenEndOfBlock(a)?d=this._getIndentLevelForEndToken(a,c):p.isFunctionToken(a)&&this._isTokenNestedFunction(a)&&(d=this._getIndentLevelForFunctionToken(a,c))}if(0>d){a=this._findNonWhitespaceAndComment(a,null,!0,c);if(null!==a)if(c=this.findFirstNonWhitespaceTokenInLine(a.getLineNumber()),p.isTokenEndOfBlock(a)&&a.equals(c)){if(d=this.getTokenIndent(a),this._indentingStyle===l.MixedFunctionIndenting||this._indentingStyle===l.ClassicFunctionIndenting)(a=this.findCorrespondingStartToken(a,a._line))&&
this._isTokenNestedFunction(a,a._line&&this._indentingStyle===l.ClassicFunctionIndenting)&&(d-=this._INDENT_AMOUNT)}else null!==c&&(d=this.searchBackAndCalculateIndent(a,c));d+=b}0>d&&(d=0);return d},_findStartTokenForMidBlock:function(a,c){var b=null;p.isTokenStartOfMidBlock(a)&&(b=this.findCorrespondingStartToken(a,c));return b},findCorrespondingStartToken:function(a,c){var b=0;for(a=this._findToken(a,c);null!==a;){if(p.isTokenStartOfBlock(a))if(0===b)break;else{if(0>(b-=1))return null}else p.isTokenEndOfBlock(a)&&
(b+=1);a=this._findToken(a,c)}return a},_findToken:function(a,c){e.assert(null!==a,"Input token should not be null");for(var b=this._tokenizerService.getPreviousTokenOf(a,c);null!==b;){if(p.isTokenStartOfBlock(b)||p.isTokenEndOfBlock(b)||p.isTokenStartOfMidBlock(b))return b;b=this._tokenizerService.getPreviousTokenOf(b,c)}return null},_isTokenNestedFunction:function(a,c){return p.isFunctionToken(a)&&null!==this._findMatchingFunctionToken(a,c)},searchBackAndCalculateIndent:function(a,c){for(var b=
0,d=a;null!==d;){a=d;if(p.isTokenStartOfBlockIndent(a)){if(!p.isFunctionToken(a)||this._indentingStyle===l.AllFunctionIndent||p.isIndentableFunction(a)&&this._indentingStyle===l.MixedFunctionIndenting)if(a.equals(c)||p.isTokenStartOfBlock(a))b+=1}else p.isTokenEndOfBlock(a)&&!a.equals(c)&&(b-=1,this._indentingStyle===l.MixedFunctionIndenting&&(d=this.findCorrespondingStartToken(a,a._line))&&this._isTokenNestedFunction(d)&&b--);d=this._findNonWhitespaceAndComment(a,c,!0)}return this.getTokenIndent(a)+
b*this._INDENT_AMOUNT},_findMatchingFunctionToken:function(a,c){var b=null;if(p.isFunctionToken(a)||p.isNestedToken(a))b=this.findCorrespondingStartToken(a,c);return b},_getIndentLevelForMidToken:function(a){var c=this.getTokenIndent(a);p.isSwitchToken(a)&&(c+=this._INDENT_AMOUNT);return c},_getIndentLevelForEndToken:function(a,c){var b=-1,d=this.findCorrespondingStartToken(a,c);null!==d&&(b=this.getTokenIndent(d));return b},_getIndentLevelForFunctionToken:function(a,c){var b=-1,d=this._findMatchingFunctionToken(a,
c);null!==d&&(b=this.getTokenIndent(d)+this._INDENT_AMOUNT);return b},getTokenIndent:function(a){return this.getIndentForLineNumber(a.getLineNumber())},getDeltaOfIndent:function(a,c){e.assert(0<=c,"Indent should be greater than or equal to zero");var b=this.getIndentForLineNumber(a);return c-b},_findNonWhitespaceAndComment:function(a,c,b,d){if(b){if(null!==a&&a.equals(c))return null;a=this._tokenizerService.getPreviousTokenOf(a,d);null!==c&&(c=this._tokenizerService.getPreviousTokenOf(c,d))}for(;null!==
a&&!a.equals(c);){if(this.isNotWhitespaceOrComment(a))return a;a=b?this._tokenizerService.getPreviousTokenOf(a,d):this._tokenizerService.getNextTokenOf(a)}return null},isNotWhitespaceOrComment:function(a){e.assert(null!==a,"Token passed in cannot be null");return p.isWhitespaceToken(a)&&!p.isSectionTitleToken(a)||p.isBlockCommentToken(a)||p.isCommentToken(a)&&!this.findFirstNonWhitespaceTokenInLine(a.getLineNumber()).equals(a)?!1:!0}})})},"MW/rtc/plugins/language/matlab/autoindent/preferences/FunctionIndentingPreferences":function(){define([],
function(){return{AllFunctionIndent:"AllFunctionIndent",MixedFunctionIndenting:"MixedFunctionIndent",ClassicFunctionIndenting:"ClassicFunctionIndent"}})},"MW/rtc/plugins/hyperlink/HyperlinkInsertionRulesProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./HyperlinkInsertionRules"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/hyperlink/HyperlinkInsertionRules":function(){define("dojo/_base/declare mw-log/Log MW/rtc/plugins/hyperlink/model/HyperlinkNode MW/rtc/plugins/insertionrules/BaseInsertionRules MW/rtc/plugins/insertionrules/InsertionRuleConstants MW/rtc/plugins/insertionrules/receivinginstructions/ContinueUpInstruction MW/rtc/plugins/insertionrules/receivinginstructions/InsertIfCompatibleInstruction MW/rtc/plugins/richtext/nodes/inner/RichTextParagraphNode".split(" "),
function(g,f,e,d,b,a,c,h){return g([d],{_compatibleParents:[h],constructor:function(){},destroy:function(){},getApplicableNodeClass:function(){return e},getReceivingInstruction:function(b){return b.isAtEdge()?new a:new c},getTopLevelInsertionInstruction:function(a,c,d,e,f){return{insertInRoot:{relationToPosition:b.RELATION.AFTER,containerConstructor:h}}}})})},"MW/rtc/plugins/insertionrules/InsertionRuleServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"./InsertionRuleService"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.insertionrule"]}},createInstance:function(d){return new e(d)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/insertionrules/InsertionRuleService":function(){define(["dojo/_base/declare","MW/rtc/core/NodeMap","MW/rtc/plugins/insertionrules/InsertionRuleConstants"],function(g,f,e){return g(null,{RECEIVING_INSTRUCTION:e.RECEIVING_INSTRUCTION,RELATION:e.RELATION,constructor:function(d){this._rules=
new f(d)},destroy:function(){},getRulesForNode:function(d){var b=this._rules.get(d);if(!b)throw Error("MW.rtc.plugins.insertionrules.InsertionRuleService: No rule for node of type: "+d.className);return b},isInstructionOfType:function(d,b){return d.getType()===b}})})},"MW/rtc/plugins/lists/model/ListParagraphContentConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./ListParagraphContentConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},
createInstance:function(){return new e}})})},"MW/rtc/plugins/lists/model/ListParagraphContentConverter":function(){define(["dojo/_base/declare","MW/rtc/nodes/contentconverter/base/InnerNodeContentConverter","./ListParagraph"],function(g,f,e){return g(f,{getApplicableNodeClass:function(){return e}})})},"MW/rtc/plugins/lists/model/ListParagraph":function(){define(["dojo/_base/declare","MW/rtc/nodes/InnerNode"],function(g,f){return g([f],{constructor:function(e,d){d&&(this.type=d.type,this.anchorId=
d.anchorId);this.type=this.type||"unordered";this.wrappable=!0},className:"ListParagraph",CHILD_TEXT_SEPARATOR:"\n",containerType:function(){return this.type},getDefaultChild:function(){return{className:"ListItem"}},isEmpty:function(){return 1<this.children.length?!1:this.inherited(arguments)},resetUniqueAttributes:function(){},isSameTypeAs:function(e){return this.className===e.className&&this.type===e.type},isTextContainerNode:function(){return!0},canSpliceContainers:function(e,d){return"ordered"===
e.type&&"ordered"===d.type||"ordered"!==e.type&&"ordered"!==d.type},canMergeContainerWithSibling:function(e,d){return"ordered"===e.type&&"ordered"===d.type||"ordered"!==e.type&&"ordered"!==d.type},_serializeAttributes:function(e){e.type=this.type;this.anchorId&&(e.anchorId=this.anchorId)},childrenAreContainers:!0})})},"MW/rtc/plugins/lists/model/ListItemContentConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./ListItemContentConverter"],function(g,
f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/lists/model/ListItemContentConverter":function(){define(["dojo/_base/declare","MW/rtc/plugins/richtext/nodes/inner/RichTextParagraphNodeContentConverter","./ListItem"],function(g,f,e){return g(f,{getApplicableNodeClass:function(){return e}})})},"MW/rtc/plugins/richtext/nodes/inner/RichTextParagraphNodeContentConverter":function(){define(["dojo/_base/declare","MW/rtc/nodes/contentconverter/base/InnerNodeContentConverter",
"./RichTextParagraphNode"],function(g,f,e){return g(f,{getApplicableNodeClass:function(){return e}})})},"MW/rtc/plugins/lists/model/ListItem":function(){define(["dojo/_base/declare","MW/rtc/plugins/richtext/nodes/inner/RichTextParagraphNode"],function(g,f){return g([f],{constructor:function(e,d){d&&(this.bullet=d.bullet)},className:"ListItem",containerType:function(){return this.parent.type},isTextContainerNode:function(){return!0},offsetInContainer:function(e){var d,b=0;e=e||this.rootContainer();
for(var a=0;a<e.children.length;a++){d=e.children[a];if(this===d)return b;b=b+d.maxOffset()+e.CHILD_TEXT_SEPARATOR.length}return-1},_serializeAttributes:function(e){this.inherited(arguments);this.bullet&&(e.bullet=this.bullet)}})})},"MW/rtc/plugins/lists/ListParagraphInsertionRulesProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./ListParagraphInsertionRules"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},
destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/lists/ListParagraphInsertionRules":function(){define(["dojo/_base/declare","MW/rtc/plugins/insertionrules/BaseInsertionRules","MW/rtc/plugins/insertionrules/InsertionRuleConstants","MW/rtc/plugins/lists/model/ListParagraph"],function(g,f,e,d){return g([f],{_compatibleParents:[],constructor:function(){},destroy:function(){},getApplicableNodeClass:function(){return d},getTopLevelInsertionInstruction:function(b,a,c,f,g){a=b.getNode();return a.isInstanceOf(d)&&
!b.isAtEdge()&&a.containerType()===f.containerType()?{insertAlternateNodes:f.children}:{insertInRoot:{relationToPosition:e.RELATION.AT}}}})})},"MW/rtc/plugins/lists/ListItemInsertionRulesProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./ListItemInsertionRules"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/lists/ListItemInsertionRules":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/insertionrules/BaseInsertionRules","MW/rtc/plugins/insertionrules/InsertionRuleConstants","MW/rtc/plugins/lists/model/ListItem","MW/rtc/plugins/lists/model/ListParagraph"],function(g,f,e,d,b){return g([f],{_compatibleParents:[b],constructor:function(){},destroy:function(){},getApplicableNodeClass:function(){return d},getTopLevelInsertionInstruction:function(a,c,d,f,g){return{insertInRoot:{relationToPosition:e.RELATION.AT,containerConstructor:b}}}})})},"MW/rtc/plugins/codeexample/export/CodeExampleBlock2HTMLProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/codeexample/export/CodeExampleBlock2HTML"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/codeexample/export/CodeExampleBlock2HTML":function(){define(["dojo/_base/declare","MW/rtc/plugins/codeexample/CodeExampleEnum","MW/rtc/plugins/codeexample/model/CodeExampleBlockNode","MW/rtc/plugins/export/html/HTMLExportUtilities","MW/rtc/plugins/export/NodeExporterInterface"],
function(g,f,e,d,b){return g([b],{_STYLES:["margin","padding"],constructor:function(){},getApplicableNodeClass:function(){return e},enter:function(a,c,b){b=d.getStyleValuesForNode(c,this._STYLES);a.addToBody("\x3cdiv class \x3d '"+(c.type===f.MATLAB?"preformatted-matlab":"preformatted-plain")+"' style \x3d '"+b+"'\x3e")},leave:function(a,c,b){a.addToBody("\x3c/div\x3e")}})})},"MW/rtc/plugins/codeexample/model/CodeExampleBlockNodeContentConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"MW/rtc/plugins/codeexample/model/CodeExampleBlockNodeContentConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/codeexample/model/CodeExampleBlockNodeContentConverter":function(){define(["dojo/_base/declare","MW/rtc/nodes/contentconverter/base/InnerNodeContentConverter","MW/rtc/plugins/codeexample/model/CodeExampleBlockNode"],function(g,f,e){return g(f,{getApplicableNodeClass:function(){return e}})})},
"MW/rtc/plugins/codeexample/model/CodeExampleLineNodeContentConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/codeexample/model/CodeExampleLineNodeContentConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/codeexample/model/CodeExampleLineNodeContentConverter":function(){define(["dojo/_base/declare","MW/rtc/nodes/contentconverter/base/InnerNodeContentConverter",
"MW/rtc/plugins/codeexample/model/CodeExampleLineNode"],function(g,f,e){return g(f,{getApplicableNodeClass:function(){return e}})})},"MW/rtc/plugins/codeexample/model/CodeExampleLineNode":function(){define(["dojo/_base/declare","MW/rtc/nodes/inner/LineNode","MW/rtc/plugins/view/layoutmanager/rules/DefaultRule"],function(g,f,e){return g([f],{constructor:function(d){this.wrappable=!1;this.groupingType=e().groupingType},className:"CodeExampleLineNode",containerType:function(){return this.parent.type},
offsetInContainer:function(d){var b,a=0;d=d||this.rootContainer();for(var c=0;c<d.children.length;c++){b=d.children[c];if(this===b)return a;a=a+b.maxOffset()+d.CHILD_TEXT_SEPARATOR.length}return-1},getIndexInContainer:function(){return this.parent.children.indexOf(this)},_serializeAttributes:function(d){}})})},"MW/rtc/plugins/view/layoutmanager/rules/DefaultRule":function(){define(["dojo/_base/declare","MW/rtc/model/DocumentUtilities","MW/rtc/plugins/view/layoutmanager/abstract/BaseRule"],function(g,
f,e){return g(e,{constructor:function(){},getOperationsForLayout:function(d,b,a){return{nodeToPlace:d}},getOperationsForRemove:function(d,b){return{nodeToRemove:this._getDomNode(d)}},priority:function(){return 0}})})},"MW/rtc/plugins/codeexample/view/CodeExampleBlockLayouterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./CodeExampleBlockLayouter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},
destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/codeexample/view/CodeExampleBlockLayouter":function(){define(["dojo/_base/declare","MW/rtc/plugins/codeexample/model/CodeExampleBlockNode","MW/rtc/plugins/view/layoutmanager/abstract/AbstractLayouter"],function(g,f,e){return g(e,{constructor:function(){},getApplicableNodeClass:function(){return f},layout:function(d,b){var a=b.isFocused()?" "+b.getFocusedCssClass():"";return d.layoutInto(b,"div",{"class":"CodeExampleBlock "+b.type+a})}})})},
"MW/rtc/plugins/codeexample/view/CodeExampleLineLayouterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./CodeExampleLineLayouter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/codeexample/view/CodeExampleLineLayouter":function(){define(["dojo/_base/declare","MW/rtc/plugins/codeexample/model/CodeExampleLineNode","MW/rtc/plugins/view/layoutmanager/abstract/AbstractLayouter"],
function(g,f,e){return g(e,{constructor:function(){},getApplicableNodeClass:function(){return f},layout:function(d,b){return d.layoutInto(b,"div",{"class":"CodeExampleLine"})}})})},"MW/rtc/plugins/codeexample/view/CodeExampleBlockCoordinateConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./CodeExampleBlockCoordinateConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/codeexample/view/CodeExampleBlockCoordinateConverter":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/codeexample/model/CodeExampleBlockNode","MW/rtc/view/coordinateconverter/base/VerticalAlignCoordinateConverter"],function(g,f,e){return g(e,{constructor:function(){},getApplicableNodeClass:function(){return f}})})},"MW/rtc/plugins/codeexample/CodeExampleBlockInsertionRulesProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./CodeExampleBlockInsertionRules"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},
destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/codeexample/CodeExampleBlockInsertionRules":function(){define(["dojo/_base/declare","MW/rtc/nodes/inner/LineNode","MW/rtc/plugins/codeexample/model/CodeExampleBlockNode","MW/rtc/plugins/insertionrules/BaseInsertionRules","MW/rtc/plugins/insertionrules/InsertionRuleConstants"],function(g,f,e,d,b){return g([d],{_compatibleParents:[],constructor:function(){},destroy:function(){},getApplicableNodeClass:function(){return e},getTopLevelInsertionInstruction:function(a,
c,d,e,g){return a.isAtRightEdge()&&a.isAtLeftEdge()?{insertInRoot:{relationToPosition:b.RELATION.AT}}:g.isAtRightEdge()&&!d?{insertInRoot:{relationToPosition:b.RELATION.AFTER,insertSibling:!0,siblingConstructor:f}}:{insertInRoot:{insertionPosition:g}}}})})},"MW/rtc/plugins/codeexample/CodeExampleLineInsertionRulesProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./CodeExampleLineInsertionRules"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},
createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/codeexample/CodeExampleLineInsertionRules":function(){define("dojo/_base/declare MW/rtc/nodes/leaf/PlainTextNode MW/rtc/plugins/codeexample/model/CodeExampleBlockNode MW/rtc/plugins/codeexample/model/CodeExampleLineNode MW/rtc/plugins/insertionrules/BaseInsertionRules MW/rtc/plugins/insertionrules/InsertionRuleConstants MW/rtc/plugins/insertionrules/receivinginstructions/ContinueUpInstruction".split(" "),
function(g,f,e,d,b,a,c){return g([b],{_compatibleParents:[e],constructor:function(){},destroy:function(){},getApplicableNodeClass:function(){return d},getReceivingInstruction:function(a,b){return!(b instanceof f)?new c:this.inherited(arguments)},getTopLevelInsertionInstruction:function(c,b,d,f,g){return{insertInRoot:{relationToPosition:a.RELATION.AT,containerConstructor:e}}}})})},"MW/rtc/model/io/serializers/providers/containers/CodeExampleBlockContainerSerializerProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/model/io/serializers/containers/CodeExampleBlockContainerSerializer"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/model/io/serializers/containers/CodeExampleBlockContainerSerializer":function(){define("dojo/_base/declare dojo/_base/lang MW/rtc/model/io/DocumentTag MW/rtc/model/io/serializers/containers/ContainerSerializer MW/rtc/model/io/XmlUtils MW/rtc/plugins/codeexample/CodeExampleEnum".split(" "),
function(g,f,e,d,b,a){return g(d,{_INTRODUCED_VERSION:"R2018a",write:function(a,b,d){var e=document.createElement(this.getNodeType());a.forEach(function(a){this._writeCodeExample(a,e,b,d)},this);return e},read:function(a,d,e,f){var g=!0,p={className:this.getNodeType(),children:[]};p.type=this.getXMLType(f);for(f=0;f<a.childNodes.length;f++){g=a.childNodes[f];g=e.getSerializer(b.getAttribute(g)).read(g,d,e);p.children=p.children.concat(g.readObject);var g=g.readStatus,n=b.getBookmarkStart(a.parentNode);
n&&n.id&&(p.anchorId=n.id)}return{readObject:[p],readStatus:g}},_writeCodeExample:function(a,d,f,g){var m=b.createXMLElement(e.SDT_TAG),p=b.createSdtAliasPropertyElement(b.createXMLElement(e.SDT_PROPERTY_TAG),this.getXMLType(a.type));m.appendChild(p);var n=b.createXMLElement(e.SDT_CONTENT_TAG);m.appendChild(n);a.anchorId&&(p=b.createBookmarkStart(e.BOOKMARK_PREFIX+a.anchorId,a.anchorId),m.appendChild(p));a.children.forEach(function(a){a=g.getSerializer(a.className).write([a],f,g).children;for(var c=
0;c<a.length;c++)n.appendChild(a[c])},this);a.anchorId&&(a=b.createBookmarkEnd(a.anchorId),m.appendChild(a));a=b.createTextParagraph("");m=b.createAlternateContent(this._INTRODUCED_VERSION,m,a);d.appendChild(m)},getXMLType:function(c){if(!c)return"none";for(var b in a)if(a.hasOwnProperty(b)&&a[b]===c)return c;return"none"},getNodeType:function(){return"CodeExampleBlockNode"}})})},"MW/rtc/model/io/serializers/providers/containers/CodeExampleLineContainerSerializerProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/model/io/serializers/containers/CodeExampleLineContainerSerializer"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/model/io/serializers/containers/CodeExampleLineContainerSerializer":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/model/io/DocumentTag","MW/rtc/model/io/serializers/containers/ContainerSerializer","MW/rtc/model/io/XmlUtils"],function(g,f,
e,d,b){return g(d,{_CHILD_TYPE:"PlainTextNode",write:function(a,c,d){var e=document.createElement(this.getXMLType());a.forEach(function(a){var f=b.createXMLElement(),g=b.createParagraphProperty(this.getXMLType());f.appendChild(g);a.children.forEach(function(a){a=d.getSerializer(a.className).write(a,c,d);f.appendChild(a)});e.appendChild(f)},this);return e},read:function(a,c,b){a=b.getSerializer(this._CHILD_TYPE).read([a]);return{readObject:a.readObject.map(function(a){return{className:this.getNodeType(),
children:[a]}},this),readStatus:a.readStatus}},getXMLType:function(){return"CodeExampleLine"},getNodeType:function(){return"CodeExampleLineNode"}})})},"MW/rtc/plugins/codeexample/CodeExampleBlockKeyHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/codeexample/CodeExampleBlockKeyHandler","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{requires:function(){return{createInstance:["rtc.document","rtc.internaldocument","rtc.cursor","rtc.actionservice"]}},createInstance:function(d,
b,a,c){return new f(d,b,a,c)}})})},"MW/rtc/plugins/codeexample/CodeExampleBlockKeyHandler":function(){define("dojo/_base/declare dojo/_base/lang MW/rtc/abstract/AbstractPlugin MW/rtc/model/DocumentUtilities MW/rtc/model/events/DeletionEvent MW/rtc/model/events/NumberOfLinesChangedEvent MW/rtc/model/Position MW/rtc/model/PositionUtilities MW/rtc/model/SelectionUtilities MW/rtc/plugins/codeexample/model/CodeExampleBlockNode MW/rtc/plugins/richtext/ParagraphFormatsEnum".split(" "),function(g,f,e,d,b,
a,c,h,k,l,m){return g(e,{_REPLACE_CONTAINER_TYPE:m.NORMAL,_DELETE:"delete",_BACKSPACE:"backspace",constructor:function(a,c,b,d){this._document=a;this._internalDocument=c;this._cursor=b;this._actionService=d;d.loadActions([{id:"codeexampleblock.backspace",key:"backspace",enabled:!0,callback:f.hitch(this,"_performBackspaceOrDeleteSequence",this._BACKSPACE)},{id:"codeexampleblock.delete",key:"delete",enabled:!0,callback:f.hitch(this,"_performBackspaceOrDeleteSequence",this._DELETE)},{id:"codeexampleblock.escape",
key:"escape",enabled:!0,callback:f.hitch(this,"_handleEscape")},{id:"codeexampleblock.selectall",enabled:!0,key:"ctrl_a",platformKey:{mac:"meta_a"},callback:f.hitch(this,"_handleSelectAll")}])},_performBackspaceOrDeleteSequence:function(a){if(this._internalDocument.isReadOnly())return!1;var c=this._cursor.getNode().rootContainer();if(this._cursor.hasSelection())return c instanceof l&&this._isContainerSelected(c)?(this._replaceWithDefaultTextContainer(c),!0):!1;var b=null;a===this._BACKSPACE?b=c.previousSibling():
a===this._DELETE&&(b=c.nextSibling());if(b&&!b.firstChild()||a===this._BACKSPACE&&!d.isAtStartOfContainer(this._cursor.position,c)||a===this._DELETE&&!d.isAtEndOfContainer(this._cursor.position,c))return!1;a=null;c instanceof l?a=c:b instanceof l&&(a=b);if(a){if(a.isEmpty())return this._replaceWithDefaultTextContainer(a),!0;c=this._document.startBlockEdit();a.nextNode()?k.setContainerSelection(this._cursor,this._internalDocument,a):(this._cursor.anchor.setPosition(a.startNode(),0),this._cursor.setPosition(a.endNode(),
a.endNode().maxOffset(),!0));this._document.endBlockEdit(c);return!0}return!1},_isContainerSelected:function(a){var c=this._cursor.getSelection(),b=d.isAtStartOfContainer(c.getStartPosition(),a);if(a=a.nextSibling()){if(b&&d.isAtStartOfContainer(c.getEndPosition(),a))return!0}else if(b&&this._cursor.isFileEndSelected())return!0;return!1},_replaceWithDefaultTextContainer:function(d){var e=this._internalDocument.createContainerForType(this._REPLACE_CONTAINER_TYPE).container,f=this._internalDocument.createNode(e.getDefaultChild());
e.addChild(f);var f=this._document.startEdit(),h=new c(d,0),g=this._internalDocument.getLineNumber(d);this._internalDocument.insertAtPosition(e,h);this._internalDocument.deleteNode(d,{node:e,offset:0});this._cursor.releaseAnchor();d=[b.create(g,g+1)];f.appendUndoEvents([a.create(g,g+1,1)]);f.appendRedoEvents(d);this._document.endEdit();this._internalDocument.emitDocumentEvents(d);this._cursor.onUpdate(!1,!0)},_handleEscape:function(){var a=this._cursor.getNode().rootContainer();return!this._cursor.hasSelection()&&
a instanceof l&&(a=a.nextNode()?a.nextNode().rootContainer():null)?(this._cursor.setPosition(a.startNode(),0,!0),!0):!1},_handleSelectAll:function(){var a=this._cursor.getNode().rootContainer();if(a instanceof l){var c=!1,b=!1,d=a.startNode(),e=a.endNode();if(this._cursor.hasSelection()){var b=!0,a=this._cursor.getSelectionStartNode().rootContainer(),f=this._cursor.getSelectionEndNode().rootContainer();if(a===f){var a=d.startPosition(),f=e.endPosition(),g=this._cursor.getSelection(),k=g.getStartPosition(),
g=g.getEndPosition();if(0!==h.comparePositions(a,k)||0!==h.comparePositions(f,g))c=!0}}else a.isEmpty()||(c=!0);if(c)return b&&this._cursor.internalCollapseSelection(!1),this._cursor.setPosition(d,0),this._cursor.fixAnchor(),this._cursor.setPosition(e,e.maxOffset(),!0),!0}return!1}})})},"MW/rtc/plugins/codeexample/CodeExampleProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/codeexample/CodeExample","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{requires:function(){return{createInstance:"rtc.document rtc.internaldocument rtc.view rtc.cursor rtc.cursor.view rtc.actionservice".split(" ")}},
createInstance:function(d,b,a,c,e,g){return new f(d,b,a,c,e,g)}})})},"MW/rtc/plugins/codeexample/CodeExample":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect mw-log/Log MW/rtc/abstract/AbstractPlugin MW/rtc/model/DocumentConstants MW/rtc/model/DocumentUtilities MW/rtc/model/events/NumberOfLinesChangedEvent MW/rtc/model/NodeUtilities MW/rtc/plugins/codeexample/CodeExampleEnum MW/rtc/plugins/codeexample/model/CodeExampleBlockNode MW/rtc/plugins/codeexample/model/CodeExampleLineNode MW/rtc/RichTextComponentFeatureEnum".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){return g(b,{constructor:function(a,c,b,d,h,g){this._document=a;this._internalDocument=c;this._view=b;this._cursor=d;this._actionService=g;a=[{name:l.MATLAB,method:f.hitch(this,this.formatTemplate,l.MATLAB)},{name:l.PLAIN,method:f.hitch(this,this.formatTemplate,l.PLAIN)}];c.registerFormatTemplates(a);this.own(e.after(h,"onChange",f.hitch(this,"_updateView")));this.own(e.after(this._cursor,"onChange",f.hitch(this,this._updateActions)));this.own(e.after(this._cursor,
"onChange",f.hitch(this,this._fixPartialSelection)));g.loadActions(this._actions())},formatTemplate:function(a){var c={};c.container=new m([],{type:a});c.textContainer=new p([]);c.container.addChild(c.textContainer,0);return c},_actions:function(){return[{id:n.CODE_EXAMPLE.DEFAULT_ACTION,enabled:!1,selected:!1,callback:f.hitch(this,"_insertDefaultCallback")},{id:n.CODE_EXAMPLE.MATLAB_ACTION,key:"ctrl_alt_m",platformKey:{mac:"ctrl_alt_m"},enabled:!1,selected:!1,callback:f.hitch(this,"_insertMatlabCallback")},
{id:n.CODE_EXAMPLE.PLAIN_ACTION,key:"ctrl_alt_k",platformKey:{mac:"ctrl_alt_k"},enabled:!1,selected:!1,callback:f.hitch(this,"_insertPlainCallback")}]},_insertDefaultCallback:function(){if(this._actionService.getAction(n.CODE_EXAMPLE.DEFAULT_ACTION).enabled)return this._insertCodeExample(l.MATLAB)},_insertMatlabCallback:function(){if(this._actionService.getAction(n.CODE_EXAMPLE.MATLAB_ACTION).enabled)return this._insertCodeExample(l.MATLAB)},_insertPlainCallback:function(){if(this._actionService.getAction(n.CODE_EXAMPLE.PLAIN_ACTION).enabled)return this._insertCodeExample(l.PLAIN)},
_updateActions:function(){var a=this._getParagraphFormat();this._actionService.updateAction(n.CODE_EXAMPLE.DEFAULT_ACTION,{enabled:this._canSetFormat(),selected:a===l.MATLAB});this._actionService.updateAction(n.CODE_EXAMPLE.MATLAB_ACTION,{enabled:this._canSetFormat(),selected:a===l.MATLAB});this._actionService.updateAction(n.CODE_EXAMPLE.PLAIN_ACTION,{enabled:this._canSetFormat(),selected:a===l.PLAIN})},_fixedSelectionInfo:function(){var a=this._cursor.selectionInfo();a.isNull||(a=this._cursor.adjustSelection(a,
!0),this._cursor.setPosition(a.startNode,a.startPos),this._cursor.fixAnchor(!0),this._cursor.setPosition(a.endNode,a.endPos),a=this._cursor.selectionInfo());return a},_treatSelection:function(){var c;this._cursor.hasSelection()&&(c=this._cursor.selectedText(),this._document.deleteTextAtCurrentPosition(a.BACKWARD_DELETE));return c},_insertEmptyCodeExample:function(a){var c=this._cursor.position;this._cursor.hasSelection()&&d.assert("_insertEmptyCodeExample: Selection must be empty!");var b=this._internalDocument.createContainerForType(a);
a=b.container;var e=b.textContainer,b=this._internalDocument.createNode(e.getDefaultChild());e.addChild(b);c=this._internalDocument.insertAtPosition(a,c);this._cursor.setPosition(b.startPosition());this._cursor.onUpdate(!1,!0);return c.events},_insertCodeExample:function(a){var b=this._getParagraphFormat();if(this._canSetFormat()&&b!==a){var b=this._cursor.isReversed(),d=this._fixedSelectionInfo(),e=d.startPosition.getLineColumn().line-1,f=d.endPosition.getLineColumn().line-1;this._internalDocument.onPreDocumentChanged({});
var g=this._document.startBlockEdit(),k=this._treatSelection();a=this._insertEmptyCodeExample(a);k&&(k=c.textToContent(k,this._cursor.getNode()),this._document.insertContent(k,this._cursor.position,this._cursor));d.isNull||(k=this._cursor.getNode().rootContainer(),d=k.startPosition().getLineColumn(),k=k.endPosition().getLineColumn(),b?this._cursor.setSelectionLineColumn(k.line,k.column,d.line,d.column):this._cursor.setSelectionLineColumn(d.line,d.column,k.line,k.column));g.appendUndoEvents([h.create(e,
f,-1)]);g.appendRedoEvents(a);this._internalDocument.emitDocumentEvents(a);this._document.endBlockEdit(g);this._cursor.onUpdate(!1,!0);return!0}},_updateView:function(){var a=this._cursor.getSelectionStartContainer();this._prevActiveContainer!==a&&(this._blur(this._prevActiveContainer),this._focus(a),this._prevActiveContainer=a)},_focus:function(a){a instanceof m&&(a.focus(),this._view.applyClassToLine(this._internalDocument.getLineNumber(a),a.getFocusedCssClass()))},_blur:function(a){a instanceof
m&&(a.blur(),this._view.removeClassFromLine(this._internalDocument.getLineNumber(a),a.getFocusedCssClass()))},_fixPartialSelection:function(){if(this._cursor.hasSelection()){var a=this._cursor.getNode().rootContainer(),b=this._cursor.anchor.getNode().rootContainer();if(a!==b){if(b instanceof m)if(this._cursor.isReversed()){if(c.isAtStartOfContainer(this._cursor.anchor,b))return;c.isAtStartOfContainer(this._cursor.anchor,b.nextNode())||(b.nextNode()?this._cursor.anchor.setPosition(b.nextNode().startNode(),
0):this._cursor.anchor.setPosition(b.endNode(),b.endNode().maxOffset()))}else c.isAtStartOfContainer(this._cursor.anchor,b)||this._cursor.anchor.setPosition(b.startNode(),0);a instanceof m&&(this._cursor.suspendChangeEvent(),this._cursor.isReversed()?c.isAtStartOfContainer(this._cursor.position,a)||this._cursor.setPosition(a.startNode(),0,!0):c.isAtStartOfContainer(this._cursor.position,a.nextNode())||(a.nextNode()?this._cursor.setPosition(a.nextNode(),0,!0):this._cursor.setPosition(a.endNode(),a.endNode().maxOffset(),
!0)),this._cursor.activateChangeEvent(!0))}}},_getParagraphFormat:function(){if(!this._cursor)return"none";var a=this._cursor.getSelectionStartNode(),c=this._cursor.getSelectionEndNode();return k.getParagraphFormat({startNode:a,endNode:c})},_canSetFormat:function(){return this._isReadOnly()?!1:!this._isCodeExample()},_isReadOnly:function(){return this._internalDocument&&this._internalDocument.isReadOnly()||this._cursor&&this._cursor.isCursorReadOnly()?!0:!1},_isCodeExample:function(){var a=this._getParagraphFormat(),
c;for(c in l)if(l.hasOwnProperty(c)&&l[c]===a)return!0;return!1}})})},"MW/rtc/plugins/codeexample/syntaxhighlighter/matlab/SyntaxHighlighterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/codeexample/syntaxhighlighter/matlab/SyntaxHighlighter"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.internaldocument","rtc.view.decoration"]}},createInstance:function(d,b){return new e(d,
b)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/codeexample/syntaxhighlighter/matlab/SyntaxHighlighter":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/_base/array MW/rtc/abstract/AbstractPlugin MW/rtc/model/DocumentConstants MW/rtc/model/DocumentEventUtilities MW/rtc/model/NodeUtilities MW/rtc/model/Range MW/rtc/plugins/codeexample/CodeExampleEnum MW/rtc/plugins/codeexample/model/CodeExampleBlockNode MW/rtc/plugins/language/matlab/syntaxhighlighter/MatlabTokenColorUtilities MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenizer".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){return g(b,{constructor:function(a,c){this._internalDocument=a;this._decorator=c.createDecorator();this._tokenizer=new n;this._previousTouchedCodeExampleContainer=null;this.own(e.after(a,"onDocumentChanged",f.hitch(this,"_handleDocumentChanged"),!0));this.own(e.after(a,"onDocumentReset",f.hitch(this,"_handleDocumentReset"),!0))},_handleDocumentChanged:function(a){for(var b=c.finalLineRangeFromEvents(a),d=[],e=b.startLine;e<=b.endLine;e++){var f=this._internalDocument.getLineNode(e);
f&&this._isCodeExampleMATLAB(f)&&d.push(f)}d.forEach(function(c){var b=this._getStartLineToRedrawFrom(c,a);this._redrawSyntaxHighlighting(c,b)},this)},_getStartLineToRedrawFrom:function(a,c){var b=h.getLineNumberForNode(a,this._internalDocument),e=d.filter(c,function(a){if(a.startLine===b&&a.endLine===b)return a});return this._getStartLineByEvent(e[0],a)},_getStartLineByEvent:function(c,b){var d=0;if(!c)return 0;switch(c.type){case a.INSERT_TEXT:var e=c.position.node.textContainer();this._isCodeExampleMATLAB(e)?
d=0:this._isDescendantOfCodeExampleMatlab(e)&&(d=Math.max(e.getIndexInContainer()-1,0));break;case a.INSERT_BREAK_EVENT:for(var f=e=0;f<b.children.length;f++){var h=b.children[f],e=e+(h.getText().length+1);if(e>=c.column){d=h.getIndexInContainer();break}}}return d},_handleDocumentReset:function(){this._updatePreviousTouchedCodeExampleContainer(null);this._tokenizer.initializeLines("");h.getContainersOfNodeType(m,this._internalDocument).filter(this._isCodeExampleMATLAB,this).forEach(function(a){this._redrawSyntaxHighlighting(a,
0)},this)},_redrawSyntaxHighlighting:function(a,c){this._getPreviousTouchedCodeExampleContainer()!==a&&this._tokenizer.initializeLines(a.getText());var b=a.children.length-1;this._tokenizer.retokenize(a.getText(),c,b);var d=this._tokenizer.getTokenMap(),d=p.processTokens(d,c,b),d=this._flattenProcessedTokensRange(d,a),e=a.children[c].startPosition(),f=a.lastChild().endPosition();this._decorator.clearRange(new k(e,f));for(e=c;e<=b;e++)this._decorateLines(d[e]);this._decorator.applyChanges();this._updatePreviousTouchedCodeExampleContainer(a)},
_flattenProcessedTokensRange:function(a,c){var b=h.getLineNumberForNode(c,this._internalDocument);Object.keys(a).forEach(function(d){var e=c.children[d].offsetInContainer();a[d].forEach(function(a){a.range.start.row=b;a.range.end.row=b;a.range.start.column+=e;a.range.end.column+=e},this)},this);return a},_isCodeExampleMATLAB:function(a){return a instanceof m&&a.containerType()===l.MATLAB},_isDescendantOfCodeExampleMatlab:function(a){return this._isCodeExampleMATLAB(a)?!0:a.parent?this._isDescendantOfCodeExampleMatlab(a.parent):
!1},_decorateLines:function(a){a.forEach(function(a){var c=a.range.start,b=a.range.end,c=this._internalDocument.getRangeForLineColumn(c.row+1,c.column+1,b.row+1,b.column+1);this._decorator.setStyle(c,"color",a.color)},this)},_updatePreviousTouchedCodeExampleContainer:function(a){this._previousTouchedCodeExampleContainer=a},_getPreviousTouchedCodeExampleContainer:function(){return this._previousTouchedCodeExampleContainer}})})},"MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenizer":function(){define("dojo/_base/declare dojo/_base/lang mw-log/Log ./MatlabToken ./MatlabTokenGenerator ./MatlabTokenUtilities".split(" "),
function(g,f,e,d,b,a){return g(null,{SHIFT_FOR_LENGTH:8,AND_FOR_TYPE:255,constructor:function(){this._tokenizer=b;this._tokenizer.initialize();this._resetTokenStates()},initializeLines:function(a){a=a.split("\n");var b;this._resetTokenStates();a=this._addNewLineCharacter(a);a.forEach(function(a,c){b=this._tokenizeCode(a,c,this.getLexStateForLine(c));this._replaceLineHandle(c,b)},this)},retokenize:function(a,b,d){var e=Object.keys(this._tokenMap).length;this._assertValidLines(b,d);this._isMultiLineDocumentChange=
d>b;a=a.split("\n");a=this._addNewLineCharacter(a);var f=a.length;b>e&&(b=e);var g=d;e>f?(this._deleteTokenPlaceHolders(d,e,e-f,f),this._deleteLineHandles(b,d)):e<f&&(this._insertTokenPlaceHolders(b,d,f-e),this._insertLineHandles(a,b,d));1<this.getNumberOfSavedStates()&&(g=this._rippleThroughLines(a,b,d));return g},resetStartingTokenizerStateForLine:function(a){var b=this._tokenizer.make_lex_state();this._replaceLineHandle(a-1,b)},_assertValidLines:function(a,b){e.assert(0<=a,"Invalid start line");
e.assert(0<=b,"Invalid end line")},_isMultiLineChange:function(){return this._isMultiLineDocumentChange},_addNewLineCharacter:function(a){for(var b=a.length,d=0;d<b-1;d++)a[d]+="\n";return a},_resetTokenStates:function(){this._tokenMap={};this._lexState=this._tokenizer.make_lex_state();this._savedLexStates=[this._lexState];this._isLineExecutable=[];this._tokensOnLine=[];this._isMultiLineDocumentChange=!1},_deleteTokenPlaceHolders:function(a,b,d,e){for(var f,g=a;g<b;g++)if(this._tokenMap[g]){a=this._tokenMap[g];
for(var n=0;n<a.length;n++)f=a[n],f.setLine(Math.max(0,f.getLineNumber()-d));this._tokenMap[Math.max(0,g-d)]=this._tokenMap[g]}Object.keys(this._tokenMap).reverse().forEach(function(a){a=parseInt(a,10);a>=e&&delete this._tokenMap[a]},this)},_deleteLineHandles:function(a,b){for(var d=b-1;d>=a;d--)this._removeLineHandle(d),this._isLineExecutable.splice(d,1),this._tokensOnLine.splice(d,1)},_removeLineHandle:function(a){a+1<this.getNumberOfSavedStates()&&this._savedLexStates.splice(a+1,1)},_insertTokenPlaceHolders:function(a,
b,d){for(var e=[],f=Object.keys(this._tokenMap).reverse(),g,n=parseInt(f[0],10);n>=a;n--){for(var f=this._tokenMap[n],q=0;q<f.length;q++)g=f[q],g.setLine(g.getLineNumber()+d);this._tokenMap[n+d]=this._tokenMap[n];this._tokensOnLine[n+d]=JSON.stringify(this._tokenMap[n]);this._isLineExecutable[n+d]=this._isLineExecutable[n]}for(n=a;n<=b;n++)this._tokenMap[n]=e},_insertLineHandles:function(a,b,d){var e=[],f=this._createStateHandle(a,b);d=Math.min(d,a.length-1);for(var g=b;g<d;g++)e[g-b]={},this._tokenizer.copy_lex_state(e[g-
b],f),f=this._createStateHandleUsingPreviousHandle(a,g+1,f);for(g=b;g<d;g++)this._insertLineHandle(g,e[g-b])},_insertLineHandle:function(a,b){a+1<this.getNumberOfSavedStates()?this._savedLexStates.splice(a+1,0,b):this._replaceLineHandle(a,b)},_replaceLineHandle:function(a,b){this._savedLexStates[a+1]={};this._tokenizer.copy_lex_state(this._savedLexStates[a+1],b)},_rippleThroughLines:function(a,b,d){this._assertValidLines(b,d);for(var e=!1,f=-1,g=a.length,n,q=!1;!e;)n=this._createStateHandle(a,b),
q=this._isLineUnchanged(b,n),q||(f=b,this._replaceLineHandle(b,n)),b>=d&&q&&(e=!0),b++,b===g&&(e=!0);-1===f&&(f=d);return f},_createStateHandle:function(a,b){var d=this.getLexStateForLine(b);return this._createStateHandleUsingPreviousHandle(a,b,d)},_createStateHandleUsingPreviousHandle:function(a,b,d){return this._tokenizeCode(a[b],b,d)},_tokenizeCode:function(a,b,d){var e=a.length+3,f=[],g=this._tokenizer.lex_line(f,e,d,a,a.length);this._notEnoughRoom(g)&&(g=this._tokenizer.lex_line(f,2*e,d,a,a.length));
this._isLineExecutable[b]=g.isExecutable;this._parseTokens(f,a,b);this._tokensChanged=this._tokensOnLine[b]!==JSON.stringify(this._tokenMap[b]);this._tokensOnLine[b]=JSON.stringify(this._tokenMap[b]);return g.newState},_isLineUnchanged:function(a,b){var d=this.areStatesEqual(b,this.getLexStateForLine(a+1));return this._isMultiLineChange()?d:d&&!this._tokensChanged},_notEnoughRoom:function(a){return-1===a.numTokens},getLexStateForLine:function(a){return this._savedLexStates[a]},getExecutableLineData:function(){return this._isLineExecutable},
isLineContinuation:function(a){return this._tokenizer.is_contin(a)},areStatesEqual:function(a,b){if(a&&b)return this._tokenizer.are_states_equal(a,b)},getNumberOfSavedStates:function(){return this._savedLexStates.length},getTokenMap:function(){return this._tokenMap},getLastToken:function(c){var b=null;(c=this._tokenMap[c])&&c.forEach(function(c){a.isEndOfLineToken(c)||(b=c)},this);return b},getFirstToken:function(c){var b=null;if((c=this._tokenMap[c])&&0<c.length)b=c[0],a.isEndOfLineToken(b)&&(b=
null);return b},getTokenOnLineColumn:function(a,b){for(var d=this.getFirstToken(a);d&&!this.isTokenAtColumn(d,b);)d=this.getNextToken(d);return d},isTokenAtColumn:function(a,b){var d=this.getTokenColumn(a),e=this.getTokenLength(a);return d<=b&&b<=d+e-1},getTokenColumn:function(a){return a._column},getTokenLength:function(a){return a._length},getNextToken:function(c){var b=null,d=this._tokenMap[c.getLineNumber()];c=c.getIndex();d&&(d[c+1]&&!a.isEndOfLineToken(d[c+1]))&&(b=d[c+1]);return b},getPreviousToken:function(a,
b){if(null===a)return this._searchBackForToken(b-1);var d=null;b=a.getLineNumber();var d=this._tokenMap[b],e=a.getIndex();return d&&d[e-1]?d=d[e-1]:this._searchBackForToken(b-1)},getNumberOfTokensOnLine:function(a){return!this._tokenMap[a]?null:this._tokenMap[a].length},_searchBackForToken:function(a){for(var b=this.getLastToken(a);!b&&0<=a;)b=this.getLastToken(a-=1);return b},_parseTokens:function(a,b,e){var f,g=[],p,n,q=a.length,r=0;for(f=0;f<q;f+=1)p=this._extractTokenInfo(a[f]),n=b.substr(r,p.length),
n=new d(f,p.type,e,r,p.length,n),g.push(n),r+=p.length;this._tokenMap[e]=g},_extractTokenInfo:function(a){var b={};b.type=a&this.AND_FOR_TYPE;b.length=a>>this.SHIFT_FOR_LENGTH;return b},destroy:function(){this._tokenMap={};this._tokenizer={};this._lexState={};this._savedLexStates=[];this._isLineExecutable=[]}})})},"MW/rtc/plugins/language/matlab/tokenizer/MatlabToken":function(){define(["dojo/_base/declare"],function(g){return g(null,{constructor:function(f,e,d,b,a,c){this._index=f;this._type=e;this._line=
d;this._column=b;this._length=a;this._value=c},getIndex:function(){return this._index},getLength:function(){return this._length},equals:function(f){return f&&this._index===f._index&&this._type===f._type&&this._line===f._line&&this._column===f._column&&this._length===f._length&&this._value===f._value},getColumn:function(){return this._column},getPositionInfo:function(){return{line:this._line,column:this._column}},getLineNumber:function(){return this._line},setLine:function(f){this._line=f},getType:function(){return this._type},
getValue:function(){return this._value}})})},"MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenGenerator":function(){define(["./MatlabTokenConstants"],function(g){var f,e,d,b,a,c,h,k,l;function m(a,c){a+=E[c&127];a=a+" ("+(c>>8);return a+=") "}var p=0,n=1,q=2,r=3,s=4,t=5,u=6,v=7,w=0,x=1,y=2,B=3,D=4,E=[null,"FUNCTION","NESTED","IF","SWITCH","TRY","WHILE","FOR","END","ELSE","ELSEIF","BREAK","RETURN","PARFOR",null,"GLOBAL","PERSISTENT",null,null,null,"CATCH","CONTINUE","CASE","OTHERWISE",null,"CLASSDEF",
null,null,"PROPERTIES",null,"METHODS","EVENTS","ENUMERATION","SPMD","PARSECTION","SECTION",null,null,null,null,"ID","EEND","INT","FLOAT","STRING","DUAL","BANG","QUEST",null,null,"SEMI","COMMA","LP","RP","LB","RB","LC","RC","FEEND",null,"TRANS","DOTTRANS","NOT","AT","DOLLAR","BACKQUOTE","DOUBLEQUOTE",null,null,null,"PLUS","MINUS","MUL","DIV","LDIV","EXP","COLON",null,null,null,"DOT","DOTMUL","DOTDIV","DOTLDIV","DOTEXP","AND","OR","ANDAND","OROR","LT","GT","LE","GE","EQ","NE","EQUALS","CNE","ARROW",
null,null,"EOL","SEOL","CEOL","IEOL",null,"COMMENT","BLKSTART","BLKCOM","BLKEND","CPAD","PRAGMA","DOTDOTDOT","DOTDOT","DEEP_NEST","DEEP_STMT",null,"WHITE",null,"NEGERR","SEMERR","EOLERR","UNTERM","BADCHAR","DEEP_PAREN","FP_ERR","RES_ERR","DEEP_COM","BEGIN_TYPE","END_TYPE","STRING_LITERAL","UNTERM_STRING_LITERAL","LAST_TOKEN"];f=0;e=1;d=2;b=3;a=4;c=5;h=6;k=7;l=8;return function(){function E(){return{cstate:w,lstate:p,indent:0,infun:0,npars:0,ncoms:0,ldsv:0,atlp:0,contin:0,elist:0,haveends:0,begin:1,
spare:0,stack:0,propParseState:-1}}function I(a,c){a.cstate=c.cstate;a.lstate=c.lstate;a.indent=c.indent;a.infun=c.infun;a.npars=c.npars;a.ncoms=c.ncoms;a.ldsv=c.ldsv;a.atlp=c.atlp;a.contin=c.contin;a.elist=c.elist;a.haveends=c.haveends;a.begin=c.begin;a.spare=c.spare;a.stack=c.stack;a.propParseState=c.propParseState}function L(a){a.lstate=p;a.cstate=w;a.atlp=a.contin=a.elist=a.haveends=0;a.indent=a.infun=0;a.npars=a.ncoms=a.stack=0;a.begin=1;a.ldsv=0;a.spare=0}function C(a){if(a>=W)return ca;a=aa.charCodeAt(a);
return!(a&-128)?bb[a]:H}function M(){for(;C(A)!==ca;++A);}function G(){for(;C(A)!==ca;++A);if(A+1<W){var a=aa[A],c=aa[A+1];("\n"===a&&"\r"===c||"\r"===a&&"\n"===c)&&++A}A<W&&++A}function N(a,c,b,d){3===arguments.length&&(d=0);if(a.length+d<b)return 0;for(;0<b;--b)if(a.charCodeAt(d+b-1)!==c.charCodeAt(b-1))return 0;return 1}function P(a,c,b,d){a=a.slice(c);switch(b){case 2:if(N(a,"if",2))return g.TOKENS.IF;break;case 3:if(N(a,"for",3))return g.TOKENS.FOR;if(N(a,"end",3))return g.TOKENS.END;if(N(a,
"try",3))return g.TOKENS.TRY;break;case 4:if(N(a,"case",4))return g.TOKENS.CASE;if(N(a,"else",4))return g.TOKENS.ELSE;if(N(a,"spmd",4))return g.TOKENS.SPMD;break;case 5:if(N(a,"catch",5))return g.TOKENS.CATCH;if(N(a,"while",5))return g.TOKENS.WHILE;if(N(a,"break",5))return g.TOKENS.BREAK;break;case 6:if(N(a,"elseif",6))return g.TOKENS.ELSEIF;if(N(a,"switch",6))return g.TOKENS.SWITCH;if(N(a,"global",6))return g.TOKENS.GLOBAL;if(N(a,"return",6))return g.TOKENS.RETURN;if(d&&N(a,"events",6))return g.TOKENS.EVENTS;
if(N(a,"parfor",6))return g.TOKENS.PARFOR;break;case 7:if(d&&N(a,"methods",7))return g.TOKENS.METHODS;break;case 8:if(N(a,"function",8))return g.TOKENS.FUNCTION;if(N(a,"continue",8))return g.TOKENS.CONTINUE;if(N(a,"classdef",8))return g.TOKENS.CLASSDEF;break;case 9:if(N(a,"otherwise",9))return g.TOKENS.OTHERWISE;break;case 10:if(N(a,"persistent",10))return g.TOKENS.PERSISTENT;if(d&&N(a,"properties",10))return g.TOKENS.PROPERTIES;break;case 11:if(d&&N(a,"enumeration",11))return g.TOKENS.ENUMERATION}return g.TOKENS.ID}
function R(a,c){var b=A===J?g.TOKENS.IEOL:g.TOKENS.EOL;if(z.npars){if(z.stack&1)return a[c]=A-J<<8|g.TOKENS.SEOL,1;a[c+0]=0|g.TOKENS.EOLERR;a[c+1]=A-J<<8|b;return 2}a[c]=A-J<<8|b;return 1}function S(){if(C(J+1)===Sa){var a;for(a=2;C(J+a)===ba;++a);if(C(J+a)===O)return g.TOKENS.PRAGMA}return g.TOKENS.COMMENT}function K(a,c){var b=0;J=A;A+=3;a[c+b++]=A-J<<8|g.TOKENS.DOTDOTDOT;J=A;M();J!=A&&(a[c+b++]=A-J<<8|g.TOKENS.COMMENT,J=A);G();a[c+b++]=A-J<<8|g.TOKENS.CEOL;return b}function Q(a,c){switch(C(A)){case ba:for(++A;C(A)===
ba;++A);a[c]=A-J<<8|g.TOKENS.WHITE;return 1;case ja:return M(),a[c]=A-J<<8|S(),J=A,G(),R(a,c+1)+1;case Y:return C(A+1)===Y&&C(A+2)===Y?K(a,c):0;case ca:return G(),R(a,c);case ra:return++A,a[c]=A-J<<8|g.TOKENS.SEMI,z.lstate=p,1;case sa:return++A,a[c]=A-J<<8|g.TOKENS.COMMA,z.lstate=p,1;default:return 0}}function U(){if(A>=W)return 0;switch(C(A)){case Ia:case Ja:return C(A+1)===ba?0:1;case Ka:return C(A+1)===fa?0:1;case Y:return C(A+1)===Z?1:0;case O:case Z:case ta:case pa:case xa:case ha:case ia:case qa:case La:case Ta:return 1;
default:return 0}}function T(a){return a>>8}function X(){for(;A<W&&(C(A)===O||C(A)===Z||C(A)===ta);)++A;return z.lstate!==v?P(aa+J,J,A-J,z.cstate===y||z.cstate===D):g.TOKENS.ID}function $(d,m){var p=C(A);if(z.propParseState===e){if(p!==O&&p!==pa&&p!==ha&&p!==ba&&p!==Y)return z.propParseState=l,0}else if(z.propParseState===a){if(p!==O&&p!==ha&&p!==ba&&p!==Y)return d[m+0]=0|g.TOKENS.END_TYPE,1}else if(z.propParseState===c){if(p!==O&&p!==ha&&p!==ba&&p!==Y)return d[m+0]=0|g.TOKENS.END_TYPE,1}else if(z.propParseState===
h&&p!==ha&&p!==ba&&p!==Y)return d[m+0]=0|g.TOKENS.END_TYPE,1;switch(p){case ja:return z.propParseState!==f&&z.propParseState!==l?(d[m+0]=0|g.TOKENS.END_TYPE,1):0;case ba:return z.propParseState===c&&(z.propParseState=h),0;case ca:return z.propParseState!==f&&z.propParseState!==l?(d[m+0]=0|g.TOKENS.END_TYPE,1):0;case O:if(z.propParseState===e){p=X();if(p===g.TOKENS.ID)return d[m+0]=0|g.TOKENS.BEGIN_TYPE,d[m+1]=A-J<<8|g.TOKENS.ID,2;z.propParseState=l;d[m+0]=A-J<<8|p;return 1}if(z.propParseState===c){p=
X();if(p===g.TOKENS.ID)return d[m+0]=A-J<<8|g.TOKENS.ID,1;d[m+0]=0|g.TOKENS.END_TYPE;d[m+1]=A-J<<8|p;return 2}return z.propParseState===h?(X(),d[m+0]=0|g.TOKENS.END_TYPE,2):0;case Y:if(z.propParseState===c){if(C(A+1)===O)return++A,d[m+0]=A-J<<8|g.TOKENS.DOT,1;if(C(A+1)===Y&&C(A+2)===Y)z.propParseState=h;else return d[m+0]=0|g.TOKENS.END_TYPE,1}return 0;case fa:switch(z.propParseState){case f:case l:case b:case k:return 0;default:return d[m+0]=0|g.TOKENS.END_TYPE,1}case sa:switch(z.propParseState){case h:case a:case c:return d[m+
0]=0|g.TOKENS.END_TYPE,1;default:return 0}case ra:switch(z.propParseState){case h:case a:case c:return d[m+0]=0|g.TOKENS.END_TYPE,1;default:return 0}case pa:return z.propParseState===e?(d[m+0]=0|g.TOKENS.BEGIN_TYPE,1):z.propParseState===h||z.propParseState===c?(d[m+0]=0|g.TOKENS.END_TYPE,1):0;case ha:if(z.propParseState===c)z.propParseState=h;else if(z.propParseState===e)return d[m+0]=0|g.TOKENS.BEGIN_TYPE,1;return 0;case ua:return 0===z.npars&&z.propParseState!==f&&z.propParseState!==l?(d[m+0]=0|
g.TOKENS.END_TYPE,1):1===z.npars&&z.propParseState===b?(++A,d[m+0]=A-J<<8|g.TOKENS.RP,1):0;case va:if(0===z.npars){if(z.propParseState!==f&&z.propParseState!==l)return d[m+0]=0|g.TOKENS.END_TYPE,1}else if(1===z.npars&&z.propParseState===k)return++A,d[m+0]=A-J<<8|g.TOKENS.RC,d[m+1]=0|g.TOKENS.END_TYPE,2;return 0;default:return 0}}function V(a,c){var b;if(A>=W)return wa&&!z.begin?(J=A=W,R(a,c)):0;J=A;if(z.begin&&(b=ga(a,c)))return b;if(z.cstate===D){if(b=$(a,c),0<b)return b}else if(z.lstate===n){a:{var d;
b=Q(a,c);if(!b){for(d=b=0;A<W;++A){switch(C(A)){case ia:if(b)continue;if(1===d)if(A+1>=W||C(A+1)!==ia)d=0;else{++A;continue}else d=1;continue;case pa:case xa:case ha:d||++b;continue;case ua:case Ea:case va:d||--b;continue;case ba:if(d||b)continue;break;case ra:if(d)continue;break;case ca:break;case ja:if(d)continue;break;case Y:if(d)continue;if(C(A+1)===Y&&C(A+2)===Y)break;continue;case sa:if(d||b)continue;break;default:continue}break}if(d&&!b)a[c]=A-J<<8|g.TOKENS.UNTERM;else{if(z.ldsv===Ra&&C(J)===
O){for(b=J+1;b<A&&!(C(b)!==O&&C(b)!==Z&&C(b)!==ta);++b);if(b===A){a[c]=A-J<<8|g.TOKENS.ID;b=1;break a}}a[c]=A-J<<8|g.TOKENS.DUAL}b=1}}return b}if(1===z.begin&&z.stack&1&&z.contin&&(z.lstate===r||z.lstate===q)&&U()){if(A>J)return a[c+0]=A-J<<8|g.TOKENS.WHITE,J=A,a[c+1]=A-J<<8|g.TOKENS.COMMA,2;a[c]=A-J<<8|g.TOKENS.COMMA;return 1}switch(C(A)){case Xa:return A=W,a[c]=A-J<<8|g.TOKENS.WHITE,1;case ba:for(++A;C(A)==ba;++A);if(z.stack&1&&(z.lstate==r||z.lstate==q)&&U())return a[c+0]=A-J<<8|g.TOKENS.WHITE,
J=A,a[c+1]=A-J<<8|g.TOKENS.COMMA,2;a[c]=A-J<<8|g.TOKENS.WHITE;return 1;case ca:return G(),R(a,c);case O:for(b=A+1;b<W&&!(C(b)!=O&&C(b)!=Z&&C(b)!=ta);++b);A=b;b=z.lstate==v?g.TOKENS.ID:P(aa,J,A-J,z.cstate===y||z.cstate===D);if(b==g.TOKENS.ID||b==g.TOKENS.END&&(z.npars||z.lstate==u))return b==g.TOKENS.END&&(b=z.npars?g.TOKENS.EEND:g.TOKENS.FEEND),a[c]=A-J<<8|b,1;switch(b){case g.TOKENS.FUNCTION:if(z.infun&&(z.haveends||!z.begin)||z.cstate==y||z.cstate==B)b=g.TOKENS.NESTED}if(z.npars)return a[c+0]=0|
g.TOKENS.RES_ERR,a[c+1]=A-J<<8|b,2;a[c]=A-J<<8|b;return 1;case Z:for(++A;C(A)==Z;++A);if(C(A)==Y)switch(C(A+1)){case ya:case za:case Aa:case Ba:case ia:break;default:return++A,b=ka(),a[c]=A-J<<8|b,1}if(C(A)==O)return b=ka(),a[c]=A-J<<8|b,1;a[c]=A-J<<8|g.TOKENS.INT;return 1;case Y:if(C(A+1)==Y&&C(A+2)==Y)return K(a,c);++A;switch(C(A)){case Z:return b=ka(),a[c]=A-J<<8|b,1;case ya:return++A,a[c]=A-J<<8|g.TOKENS.DOTMUL,1;case za:return++A,a[c]=A-J<<8|g.TOKENS.DOTDIV,1;case Aa:return++A,a[c]=A-J<<8|g.TOKENS.DOTLDIV,
1;case Ba:return++A,a[c]=A-J<<8|g.TOKENS.DOTEXP,1;case ia:return++A,a[c]=A-J<<8|g.TOKENS.DOTTRANS,1;case Y:return++A,a[c]=A-J<<8|g.TOKENS.DOTDOT,1;default:return a[c]=A-J<<8|g.TOKENS.DOT,1}case ja:if(!aa[J]&&J>=W-1)return W=J,0;M();a[c]=A-J<<8|S();J=A;G();return 1+R(a,c+1);case Ka:++A;if(C(A)==fa)return++A,a[c]=A-J<<8|g.TOKENS.NE,1;a[c]=A-J<<8|g.TOKENS.NOT;return 1;case fa:++A;if(C(A)==fa)return++A,a[c]=A-J<<8|g.TOKENS.EQ,1;a[c]=A-J<<8|g.TOKENS.EQUALS;return 1;case Oa:++A;if(C(A)==fa)return++A,a[c]=
A-J<<8|g.TOKENS.LE,1;a[c]=A-J<<8|g.TOKENS.LT;return 1;case Pa:++A;if(C(A)==fa)return++A,a[c]=A-J<<8|g.TOKENS.GE,1;a[c]=A-J<<8|g.TOKENS.GT;return 1;case Fa:++A;if(C(A)==Fa)return++A,a[c]=A-J<<8|g.TOKENS.ANDAND,1;a[c]=A-J<<8|g.TOKENS.AND;return 1;case Ga:++A;if(C(A)==Ga)return++A,a[c]=A-J<<8|g.TOKENS.OROR,1;a[c]=A-J<<8|g.TOKENS.OR;return 1;case sa:return++A,a[c]=A-J<<8|g.TOKENS.COMMA,1;case ra:++A;if(z.npars&&!(z.stack&1))return a[c+0]=0|g.TOKENS.SEMERR,a[c+1]=A-J<<8|g.TOKENS.SEMI,2;a[c]=A-J<<8|g.TOKENS.SEMI;
return 1;case Qa:return++A,a[c]=A-J<<8|g.TOKENS.COLON,1;case pa:++A;if(z.npars==Da)return a[c+0]=0|g.TOKENS.DEEP_PAREN,a[c+1]=A-J<<8|g.TOKENS.LP,2;a[c]=A-J<<8|g.TOKENS.LP;return 1;case ha:++A;if(z.npars==Da)return a[c+0]=0|g.TOKENS.DEEP_PAREN,a[c+1]=A-J<<8|g.TOKENS.LC,2;a[c]=A-J<<8|g.TOKENS.LC;return 1;case xa:++A;if(z.npars==Da)return a[c+0]=0|g.TOKENS.DEEP_PAREN,a[c+1]=A-J<<8|g.TOKENS.LB,2;a[c]=A-J<<8|g.TOKENS.LB;return 1;case ua:++A;if(0==z.npars)return a[c+0]=0|g.TOKENS.NEGERR,a[c+1]=A-J<<8|g.TOKENS.RP,
2;a[c]=A-J<<8|g.TOKENS.RP;return 1;case Ea:++A;if(0==z.npars)return a[c+0]=0|g.TOKENS.NEGERR,a[c+1]=A-J<<8|g.TOKENS.RB,2;a[c]=A-J<<8|g.TOKENS.RB;return 1;case va:++A;if(0==z.npars)return a[c+0]=0|g.TOKENS.NEGERR,a[c+1]=A-J<<8|g.TOKENS.RC,2;a[c]=A-J<<8|g.TOKENS.RC;return 1;case Ta:return++A,a[c]=A-J<<8|g.TOKENS.QUEST,1;case Sa:return++A,a[c]=A-J<<8|g.TOKENS.SHARP,1;case Ya:return++A,a[c]=A-J<<8|g.TOKENS.DOLLAR,1;case Za:return++A,a[c]=A-J<<8|g.TOKENS.BACKQUOTE,1;case La:return++A,a[c]=A-J<<8|g.TOKENS.AT,
1;case Ia:return++A,a[c]=A-J<<8|g.TOKENS.PLUS,1;case Ja:return++A,a[c]=A-J<<8|g.TOKENS.MINUS,1;case ya:return++A,a[c]=A-J<<8|g.TOKENS.MUL,1;case za:return++A,a[c]=A-J<<8|g.TOKENS.DIV,1;case Aa:return++A,a[c]=A-J<<8|g.TOKENS.LDIV,1;case Ba:return++A,a[c]=A-J<<8|g.TOKENS.EXP,1;case ia:if(0<A&&z.lstate!=s&&z.lstate!=u)switch(C(A-1)){case ua:if(z.atlp)break;case O:case Z:case ta:case Y:case va:case Ea:case ia:case qa:return++A,a[c]=A-J<<8|g.TOKENS.TRANS,1}for(++A;C(A)!=ca;++A)if(C(A)==ia)if(C(A+1)==ia)++A;
else return++A,a[c]=A-J<<8|g.TOKENS.STRING,1;a[c]=A-J<<8|g.TOKENS.UNTERM;return 1;case qa:for(++A;C(A)!=ca;++A)if(C(A)==qa)if(C(A+1)==qa)++A;else return++A,a[c]=A-J<<8|g.TOKENS.STRING_LITERAL,1;a[c]=A-J<<8|g.TOKENS.UNTERM_STRING_LITERAL;return 1;case Ua:if(z.lstate!=p&&C(A+1)==fa)return A+=2,a[c]=A-J<<8|g.TOKENS.CNE,1;M();a[c+0]=A-J<<8|g.TOKENS.BANG;J=A;G();return 1+R(a,c+1);case ta:case H:for(++A;;){switch(C(A)){case ta:case H:++A;continue}break}a[c]=A-J<<8|g.TOKENS.BADCHAR;return 1;default:return++A,
a[c]=A-J<<8|g.TOKENS.BADCHAR,1}}function ka(){for(;A<W&&C(A)==Z;++A);if(A<W&&C(A)==O)switch(aa.charAt(A)){case "d":case "D":case "e":case "E":++A;if(A>=W)return g.TOKENS.FP_ERR;if(C(A)==Ia||C(A)==Ja)if(++A,A>=W)return g.TOKENS.FP_ERR;if(C(A)!=Z)return g.TOKENS.FP_ERR;for(;A<W&&C(A)==Z;)++A}A<W&&(C(A)==O&&("i"==aa.charAt(A)||"j"==aa.charAt(A)))&&++A;return g.TOKENS.FLOAT}function la(a,c){var b,d=0,e=0,f=0,d=!1;if(C(A)!=ba)return q;for(b=A;C(b)==ba;++b);if(b>=W)return q;if(Ha&&c&&(N(aa,"load",4,a)||
N(aa,"save",4,a)))d=!0;switch(C(b)){case Y:if(C(b+1)==Y&&C(b+2)==Y)return q;switch(C(b+1)){case Z:return n;case ba:break;case Ba:case ya:case za:case Aa:case ia:case pa:return da(b+2);case O:break;default:return n}break;case fa:if(C(b+1)==fa)return da(b+2);case pa:case ua:return q;case ca:case ra:case sa:case ja:case qa:return q;case ha:break;case Fa:return C(b+1)==Fa?da(b+2):da(b+1);case Ga:return C(b+1)==Ga?da(b+2):da(b+1);case Ka:return C(b+1)==fa?da(b+2):n;case Oa:case Pa:case Ua:return C(b+1)==
fa?da(b+2):da(b+1);case Qa:case Ia:case Ja:case ya:case za:case Aa:case Ba:case La:return da(b+1);case xa:if(d||z.ldsv==Ma)return s;default:return n}for(f=e=d=0;b<W;++b){switch(C(b)){case fa:if(!e&&!f&&C(b+1)!=fa)return d?n:q;continue;case sa:if(!e&&!f&&!d)break;continue;case Y:if(C(b+1)==Y&&C(b+2)==Y)break;continue;case ra:if(!e||!f||!d)break;continue;case ja:if(!e&&!f)break;continue;case ca:break;case ia:e^=1;continue;case qa:f^=1;continue;case pa:case ha:case xa:!e&&!f&&++d;continue;case ua:case va:case Ea:!e&&
!f&&--d;continue;default:continue}break}return n}function da(a){if(C(a)==ba){for(;C(a)==ba;)++a;switch(C(a)){case Y:if(C(a+1)==Y&&C(a+2)==Y||C(a+1)==Z)return q;break;case sa:case ra:case ca:case ua:case va:case Ea:case ja:case Fa:case Ga:case Oa:case Pa:case fa:case Qa:case ya:case za:case Aa:case La:case Ba:break;default:return q}}return n}function T(a){return a>>8}function ma(a){for(;a<W;++a){if(C(a)===ca)return A=C(a+1)===ca&&"\r"===aa.charAt(a)?a+1:a,1;if(C(a)!==ba)return 0}A=W;return 1}function ga(a,
c){var b=A;J=A;if(A>=W)return 0;for(;C(b)==ba;)++b;if(0!==z.ncoms){var d=g.TOKENS.BLKCOM;if(C(b)===ja&&(C(b+1)===ha||C(b+1)===va)&&ma(b+2))d=C(b+1)===ha?z.ncoms>=Wa?g.TOKENS.DEEP_COM:g.TOKENS.BLKSTART:g.TOKENS.BLKEND;G();a[c]=A-J<<8|d;return 1}if(C(b)===ca)return 0;if(C(b)===ja){if(C(b+1)===ja&&(C(b+2)===ca||C(b+2)===ba))return M(),a[c]=A-J<<8|g.TOKENS.CPAD,1;if(C(b+1)===ha&&ma(b+2))return G(),a[c]=A-J<<8|g.TOKENS.BLKSTART,1}return 0}function na(m,E){z.lstate===p&&ea===Na&&(ea=Va);a:{var F,L=E>>8;
z.begin=0;if(z.cstate===D)switch(E&255){case g.TOKENS.EOL:case g.TOKENS.IEOL:z.propParseState===l&&(z.propParseState=f);break;case g.TOKENS.BEGIN_TYPE:z.propParseState=d;break;case g.TOKENS.END_TYPE:z.propParseState=l;break;case g.TOKENS.ID:if(z.propParseState===f)z.propParseState=e;else if(z.propParseState===a||z.propParseState===d)z.propParseState=c;break;case g.TOKENS.COMMA:z.propParseState===l&&0===z.npars&&(z.propParseState=f);break;case g.TOKENS.SEMI:if(z.propParseState===l&&(0===z.npars||!(z.stack&
1)))z.propParseState=f;break;case g.TOKENS.RP:1===z.npars&&z.propParseState===b&&(z.propParseState=a);break;case g.TOKENS.LP:z.propParseState===d&&(z.propParseState=b);break;case g.TOKENS.LC:if(z.propParseState===h||z.propParseState===a||z.propParseState===d)z.propParseState=k}switch(E&255){case g.TOKENS.COMMENT:case g.TOKENS.DOTDOTDOT:break;case g.TOKENS.BLKSTART:case g.TOKENS.BLKCOM:case g.TOKENS.BLKEND:z.begin=1;break;case g.TOKENS.EOL:case g.TOKENS.IEOL:z.begin=1;z.contin=0;break;case g.TOKENS.SEOL:case g.TOKENS.CEOL:z.contin=
1;z.begin=1;break;case g.TOKENS.LP:z.lstate==t&&(z.atlp=1);case g.TOKENS.ID:case g.TOKENS.EEND:case g.TOKENS.FEEND:z.lstate==t&&(z.lstate=s);default:z.contin=0}if(z.cstate==w)switch(E&255){case g.TOKENS.WHITE:case g.TOKENS.COMMENT:case g.TOKENS.BLKSTART:case g.TOKENS.BLKCOM:case g.TOKENS.BLKEND:case g.TOKENS.DOTDOTDOT:case g.TOKENS.EOL:case g.TOKENS.IEOL:case g.TOKENS.CEOL:break;case g.TOKENS.CLASSDEF:z.cstate=y;break;default:z.cstate=x}switch(E&255){case g.TOKENS.ID:case g.TOKENS.EEND:case g.TOKENS.FEEND:switch(z.lstate){case p:F=
A-(E>>8);var I;b:{I=E>>8;var M=aa.slice(F),K="pi eps nan NaN inf Inf i j ans".split(" "),G=[2,3,3,3,3,3,1,1,3],S;if(0===M.length)I=1;else{for(S=0;S<K.length;++S)if(I==G[S]&&N(M,K[S],I)){I=1;break b}I=0}}if(I){z.lstate=q;break}z.lstate=la(F,4===E>>8);if(Ha&&4===E>>8&&z.lstate!==q&&(N(m,"load",4,L)||N(m,"save",4,L)))z.ldsv=Ma;break;case v:case s:case u:z.lstate=q}break;case g.TOKENS.TRY:++z.indent;case g.TOKENS.ELSE:case g.TOKENS.OTHERWISE:case g.TOKENS.CATCH:case g.TOKENS.RETURN:case g.TOKENS.BREAK:case g.TOKENS.CONTINUE:z.npars=
0;z.stack=0;z.lstate=p;break;case g.TOKENS.FUNCTION:z.npars=0;z.stack=0;z.indent=1;z.cstate===y&&(z.cstate=B,z.indent=3);z.infun=z.indent;z.lstate=s;break;case g.TOKENS.NESTED:z.npars=0;z.stack=0;z.indent<ab&&(z.infun=++z.indent);z.cstate===y&&(z.cstate=B,z.indent=3);z.haveends=1;z.lstate=s;break;case g.TOKENS.END:z.npars=0;z.stack=0;0<z.indent&&--z.indent;if(z.cstate===B&&2===z.indent||z.cstate===D){z.cstate=y;z.lstate=s;break}z.cstate===y&&0===z.indent&&(z.cstate=x,z.infun=0);z.indent<z.infun&&
(z.haveends=1,--z.infun);z.lstate=p;break;case g.TOKENS.PROPERTIES:z.cstate=D,z.propParseState=f;case g.TOKENS.METHODS:case g.TOKENS.EVENTS:case g.TOKENS.ENUMERATION:z.npars=0;z.stack=0;++z.indent;z.lstate=s;break;case g.TOKENS.IF:case g.TOKENS.WHILE:case g.TOKENS.FOR:case g.TOKENS.PARFOR:case g.TOKENS.SPMD:case g.TOKENS.PARSECTION:case g.TOKENS.SECTION:case g.TOKENS.SWITCH:++z.indent;case g.TOKENS.ELSEIF:case g.TOKENS.CASE:z.npars=0;z.stack=0;z.lstate=s;break;case g.TOKENS.GLOBAL:case g.TOKENS.PERSISTENT:z.npars=
0;z.stack=0;z.elist=1;z.lstate=s;break;case g.TOKENS.BLKSTART:z.ncoms<Wa&&++z.ncoms;break;case g.TOKENS.BLKEND:0<z.ncoms&&--z.ncoms;break;case g.TOKENS.COMMA:z.npars?z.lstate=s:(z.ldsv=0,z.stack=0,z.lstate=z.cstate===y?s:p);z.elist=0;break;case g.TOKENS.SEMI:z.npars?z.stack&1?z.lstate=s:(z.elist=0,z.npars=0,z.stack=0,z.ldsv=0,z.lstate=z.cstate===y?s:p):(z.ldsv=0,z.stack=0,z.lstate=z.cstate===y?s:p);break;case g.TOKENS.RB:0<z.npars&&(z.npars--,z.stack>>=1);z.ldsv===Ma&&0===z.npars?(z.lstate=n,z.ldsv=
Ra):z.lstate=r;break;case g.TOKENS.RC:0<z.npars&&(z.npars--,z.stack>>=1);z.lstate=q;break;case g.TOKENS.RP:0<z.npars&&(z.npars--,z.stack>>=1);z.lstate=q;z.atlp&&(z.lstate=s,z.atlp=0);break;case g.TOKENS.LP:z.npars<Da&&(z.npars++,z.stack<<=1);z.lstate=s;break;case g.TOKENS.LB:z.npars<Da&&(z.npars++,z.stack<<=1,z.stack|=1);z.lstate=s;break;case g.TOKENS.LC:z.npars<Da&&(z.npars++,z.stack<<=1,z.lstate!==q&&(z.stack|=1));z.lstate=s;break;case g.TOKENS.COMMENT:case g.TOKENS.WHITE:case g.TOKENS.PRAGMA:case g.TOKENS.CPAD:case g.TOKENS.DOTDOTDOT:switch(z.lstate){case q:case r:if(z.npars||
z.elist||z.cstate==y)break a;switch(C(A)){case O:case Z:case ia:case qa:case xa:case Ka:z.lstate=p;break;case Y:C(A+1)===Z&&(z.lstate=p)}}break;case g.TOKENS.AT:switch(z.lstate){case q:case r:z.elist=1;break;default:z.lstate=t}break;case g.TOKENS.PLUS:case g.TOKENS.MINUS:case g.TOKENS.MUL:case g.TOKENS.DIV:case g.TOKENS.LDIV:case g.TOKENS.EXP:case g.TOKENS.COLON:case g.TOKENS.AND:case g.TOKENS.ANDAND:case g.TOKENS.OR:case g.TOKENS.OROR:case g.TOKENS.NOT:case g.TOKENS.LT:case g.TOKENS.LE:case g.TOKENS.GT:case g.TOKENS.GE:case g.TOKENS.EQ:case g.TOKENS.NE:case g.TOKENS.CNE:case g.TOKENS.DOTMUL:case g.TOKENS.DOTDIV:case g.TOKENS.DOTLDIV:case g.TOKENS.DOTEXP:z.lstate=
s;break;case g.TOKENS.EQUALS:z.lstate=u;z.elist=0;break;case g.TOKENS.DOTTRANS:case g.TOKENS.FLOAT:case g.TOKENS.INT:case g.TOKENS.STRING:case g.TOKENS.STRING_LITERAL:case g.TOKENS.TRANS:z.lstate=r;break;case g.TOKENS.DOT:z.lstate=v;break;case g.TOKENS.SEOL:z.elist=0;z.lstate=s;break;case g.TOKENS.EOL:case g.TOKENS.IEOL:z.elist=0;z.npars=0;z.stack=0;z.ldsv=0;z.lstate=z.cstate===y?s:p;break;case g.TOKENS.CEOL:z.contin=1;break;case g.TOKENS.BANG:z.lstate=p;break;case g.TOKENS.SEMERR:case g.TOKENS.EOLERR:z.stack=
0;z.npars=0;z.elist=0;z.lstate=p;break;case g.TOKENS.NEGERR:z.stack=0;z.npars=0;z.elist=0;z.lstate=r;break;case g.TOKENS.DEEP_PAREN:case g.TOKENS.DEEP_COM:case g.TOKENS.DEEP_NEST:case g.TOKENS.DEEP_STMT:z.stack=0;z.npars=0;z.elist=0;z.lstate=s;break;case g.TOKENS.RES_ERR:case g.TOKENS.FP_ERR:case g.TOKENS.UNTERM:case g.TOKENS.UNTERM_STRING_LITERAL:case g.TOKENS.BADCHAR:case g.TOKENS.SHARP:case g.TOKENS.DOLLAR:case g.TOKENS.BACKQUOTE:z.lstate=r;break;case g.TOKENS.CLASSDEF:z.cstate=y;z.lstate=s;z.indent=
1;z.haveends=1;break;case g.TOKENS.DUAL:z.ldsv===Ma&&"-"!==m[L+0]&&(z.ldsv=Ra)}}switch(E&255){case g.TOKENS.COMMENT:case g.TOKENS.BLKSTART:case g.TOKENS.BLKCOM:case g.TOKENS.BLKEND:case g.TOKENS.WHITE:case g.TOKENS.DOTDOTDOT:case g.TOKENS.CPAD:case g.TOKENS.PRAGMA:case g.TOKENS.EOL:case g.TOKENS.SEOL:case g.TOKENS.IEOL:case g.TOKENS.CEOL:break;case g.TOKENS.FUNCTION:case g.TOKENS.NESTED:case g.TOKENS.CLASSDEF:case g.TOKENS.UNTERM:case g.TOKENS.UNTERM_STRING_LITERAL:case g.TOKENS.DEEP_PAREN:case g.TOKENS.DEEP_COM:case g.TOKENS.DEEP_NEST:case g.TOKENS.DEEP_STMT:case g.TOKENS.FP_ERR:case g.TOKENS.RES_ERR:case g.TOKENS.SEMERR:case g.TOKENS.EOLERR:case g.TOKENS.NEGERR:case g.TOKENS.SHARP:case g.TOKENS.DOLLAR:case g.TOKENS.BACKQUOTE:ea=
$a;break;default:ea===Va&&(ea=Ca)}}var A=0,W=0,J=0,aa=null,oa=null,ea=0,wa=0,Ha=0,z=E(),Ma=1,Ra=2,Na=0,Va=1,Ca=2,$a=3,Da=32,ab=7,Wa=7,H=0,O=1,Z=2,ta=3,pa=4,ua=5,ha=6,va=7,xa=8,Ea=9,La=10,Ia=11,Ja=12,ya=13,za=14,Aa=15,Ba=16,Qa=17,Y=18,Fa=19,Ga=20,Oa=21,Pa=22,Ka=23,ia=24,ra=25,sa=26,ca=27,fa=28,ja=29,Sa=30,ba=31,Ua=32,Ta=33,Ya=34,Za=35,qa=36,Xa=37,bb=[ja,H,H,H,H,H,H,H,H,ba,ca,ca,ca,ca,H,H,H,H,H,H,H,H,H,H,H,H,Xa,H,H,H,H,H,ba,Ua,qa,Sa,Ya,ja,Fa,ia,pa,ua,ya,Ia,sa,Ja,Y,za,Z,Z,Z,Z,Z,Z,Z,Z,Z,Z,Qa,ra,Oa,fa,
Pa,Ta,La,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,xa,Aa,Ea,Ba,ta,Za,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,O,ha,Ga,va,Ka,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H,H];return{lex_line:function(a,c,b,d,e){ea=Na;I(z,b);aa=d;A=0;W=e;J=0;wa=!0;d=0;var h,k;oa=aa;if(0===e){h=
R(a,0);for(e=0;e<h;++e)na(oa,a[e]);return{numTokens:h,newState:z,isExecutable:ea===Ca}}if(k=z.cstate===D&&z.propParseState!==f&&z.propParseState!==l)if(3<c)a[0]=0|g.TOKENS.BEGIN_TYPE,d=1;else return{numTokens:-1,newState:b,isExecutable:ea===Ca};for(;d<c-3;){h=V(a,d);if(!h)break;for(e=0;e<h;++e,++d)if(na(oa,a[d]),(a[d]&255)===g.TOKENS.FEEND){var m=a,p=d+e,n=T(a[d+e]);m[p]=n<<8|g.TOKENS.EEND}}if(d>=c-3&&!z.begin)return{numTokens:-1,newState:b,isExecutable:ea===Ca};k&&(1<d&&(a[1]&255)===g.TOKENS.WHITE)&&
(c=a[0],a[0]=a[1],a[1]=c);return{numTokens:d,newState:z,isExecutable:ea===Ca}},lex_file:function(a,c,b,d,e){ea=Na;I(z,b);aa=d;A=0;W=e;wa=!1;J=0;oa=aa;for(b=0;b<c-3;b+=e){e=V(a,b);if(!e)break;for(d=0;d<e;++d)na(oa,a[b+d]),(a[b+d]&127)===g.TOKENS.FEEND&&(a[b+d]=a[b+d]>>8<<8|g.TOKENS.EEND)}return{isExecutable:ea===Ca,newState:z}},make_lex_state:E,copy_lex_state:I,dump_token:m,set_state:function(a){I(z,a)},initialize:function(a,c,b){z=E();L(z);oa=aa=a;A=0;W=c;wa=b;ea=Na},initialize_state:L,in_block_comment:function(a){a||
(a=z);return 0<a.ncoms},are_states_equal:function(a,c){return a.lstate!==c.lstate||a.cstate!==c.cstate||a.indent!==c.indent||a.contin!==c.contin||a.atlp!==c.atlp||a.begin!==c.begin||a.infun!==c.infun||a.ldsv!==c.ldsv||a.ncoms!==c.ncoms||a.elist!==c.elist||a.npars!==c.npars||a.stack!==c.stack||a.haveends!==c.haveends?0:1},is_contin:function(a){return a.contin}}}()})},"MW/rtc/plugins/resizer/ResizerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/resizer/Resizer"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.view"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/resizer/Resizer":function(){define("dijit/popup dijit/TooltipDialog dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-construct dojo/dom-style dojo/on dojo/touch mw-log/Log".split(" "),function(g,f,e,d,b,a,c,h,k,l){return e(null,{_MINIMUM_SIZE:18,constructor:function(a){this._view=a;this._handlers=[]},activate:function(c,b){this._resizer||(l.assert(c,
"Missing initial rectangle!"),this._callbacks=b,this._resizer=this._makeResizer(c),a.place(this._resizer,this._view.getDomtarget()),this._tooltip=new f({"class":"rtcTooltip"}),this._handlers.push(h(this._resizer,"click",function(a){a.preventDefault();a.stopPropagation()})))},deactivate:function(){this._resizer&&(a.destroy(this._resizer),this._resizer=null,this._handlers.forEach(function(a){a.remove()}),this._handlers=[],this._callbacks.closed&&this._callbacks.closed())},moveTo:function(a,b){null!==
a&&c.set(this._resizer,"top",a+"px");null!==b&&c.set(this._resizer,"left",b+"px")},resize:function(a,b){null!==a&&c.set(this._resizer,"width",a+"px");null!==b&&c.set(this._resizer,"height",b+"px")},_trackResize:function(a,c){this._tooltip.set("content",a+" x "+c+"px");return this._callbacks.drag?this._callbacks.drag(a,c):!1},_pointerMove:function(a){if(this._resizer){var b=a.clientX-this._lastClickState.startX,d=a.clientY-this._lastClickState.startY,e=this._lastClickState.currentWidth,f=this._lastClickState.currentHeight,
h=e/f,g=this._lastClickState.dir,b=b*g[0],d=d*g[1],k;g[0]&&g[1]&&!a.altKey?b>d*h?(k=e+b,b=(e+b)/h):(b=f+d,k=(f+d)*h):(k=e+b,b=f+d);k>this._MINIMUM_SIZE&&b>this._MINIMUM_SIZE&&(c.set(this._resizer,"width",k+"px"),c.set(this._resizer,"height",b+"px"));this._tracking||(this._tracking=!0,this._callbacks.startDrag());this._trackResize(this._resizer.clientWidth,this._resizer.clientHeight)||(0>g[0]&&c.set(this._resizer,"left",this._lastClickState.currentLeft+e-k+"px"),0>g[1]&&c.set(this._resizer,"top",this._lastClickState.currentTop+
f-b+"px"));a.preventDefault();a.stopPropagation()}},_pointerUp:function(a){a.preventDefault();a.stopPropagation();this._moveHandle.remove();this._upHandle.remove();g.close(this._tooltip);this._tracking&&(this._resizer&&this._callbacks.endDrag&&this._callbacks.endDrag(this._resizer.clientWidth,this._resizer.clientHeight),this._tracking=!1)},_pointerDown:function(a,c){c.preventDefault();c.stopPropagation();this._lastClickState={startX:c.clientX,startY:c.clientY,currentWidth:this._resizer.clientWidth,
currentHeight:this._resizer.clientHeight,currentTop:this._resizer.offsetTop,currentLeft:this._resizer.offsetLeft,dir:a};this._moveHandle=h(window,k.move,d.hitch(this,"_pointerMove"));this._upHandle=h(window,k.release,d.hitch(this,"_pointerUp"));this._tooltip.set("content",this._resizer.clientWidth+" x "+this._resizer.clientHeight+"px");g.open({popup:this._tooltip,around:c.target})},_makeResizer:function(c){var b,e,f={"class":"gripperFrame"};f.style="width: "+c.width+"px; height: "+c.height+"px; top: "+
c.top+"px; left: "+c.left+"px;";b=a.create("div",f);var g={"top-right":[1,-1],"middle-right":[1,0],"bottom-right":[1,1],"top-center":[0,-1],"bottom-center":[0,1],"top-left":[-1,-1],"middle-left":[-1,0],"bottom-left":[-1,1]};Object.keys(g).forEach(function(c){e=a.create("div",{"class":"gripper "+c});a.place(e,b);this._handlers.push(h(e,k.press,d.hitch(this,"_pointerDown",g[c])))},this);return b}})})},"MW/rtc/plugins/richtext/RichTextNodeInsertionRulesProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./RichTextNodeInsertionRules"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/richtext/RichTextNodeInsertionRules":function(){define(["dojo/_base/declare","MW/rtc/plugins/insertionrules/BaseInsertionRules","MW/rtc/plugins/richtext/nodes/inner/RichTextContainerNode","MW/rtc/plugins/richtext/nodes/inner/RichTextParagraphNode","MW/rtc/plugins/richtext/nodes/leaf/RichTextNode"],
function(g,f,e,d,b){return g([f],{_compatibleParents:[e],constructor:function(){},destroy:function(){},getApplicableNodeClass:function(){return b},getTopLevelInsertionInstruction:function(a,c,b,e,f){return{insertInRoot:{insertionPosition:f,containerConstructor:d}}}})})},"MW/rtc/plugins/richtext/RichTextParagraphInsertionRulesProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./RichTextParagraphInsertionRules"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},
createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/richtext/RichTextParagraphInsertionRules":function(){define(["dojo/_base/declare","MW/rtc/plugins/insertionrules/BaseInsertionRules","MW/rtc/plugins/richtext/nodes/inner/RichTextParagraphNode"],function(g,f,e){return g([f],{_compatibleParents:[],constructor:function(){},destroy:function(){},getApplicableNodeClass:function(){return e},getTopLevelInsertionInstruction:function(d,b,a,c,e){return{insertInRoot:{insertionPosition:e}}}})})},
"MW/rtc/plugins/richtext/view/HeadingLayouterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./HeadingLayouter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/richtext/view/HeadingLayouter":function(){define(["dojo/_base/declare","dojo/dom-class","MW/rtc/plugins/view/layoutmanager/abstract/AbstractLayouter","../nodes/inner/HeadingNode"],
function(g,f,e,d){return g(e,{constructor:function(){},getApplicableNodeClass:function(){return d},layout:function(b,a){var c={"class":"heading-"+a.level};a.align&&(c.style="text-align: "+a.align+";");return b.layoutInto(a,"h"+a.level,c)}})})},"MW/rtc/plugins/richtext/view/RichTextLayouterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./RichTextLayouter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.view.decoration.viewmodel"]}},
createInstance:function(d){return new e(d)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/richtext/view/RichTextParagraphLayouterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./RichTextParagraphLayouter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/richtext/view/RichTextParagraphLayouter":function(){define(["dojo/_base/declare",
"dojo/dom-class","MW/rtc/plugins/view/layoutmanager/abstract/AbstractLayouter","../nodes/inner/RichTextParagraphNode"],function(g,f,e,d){return g(e,{constructor:function(){},getApplicableNodeClass:function(){return d},layout:function(b,a){var c={"class":"paragraphNode"};a.align&&(c.style="text-align: "+a.align+";");return b.layoutInto(a,"div",c)}})})},"MW/rtc/plugins/richtext/nodes/inner/RichTextParagraphNodeContentConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"./RichTextParagraphNodeContentConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/richtext/nodes/inner/HeadingNodeContentConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./HeadingNodeContentConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/richtext/nodes/inner/HeadingNodeContentConverter":function(){define(["dojo/_base/declare",
"MW/rtc/nodes/contentconverter/base/InnerNodeContentConverter","./HeadingNode"],function(g,f,e){return g(f,{getApplicableNodeClass:function(){return e}})})},"MW/rtc/plugins/richtext/nodes/leaf/RichTextNodeContentConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./RichTextNodeContentConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/richtext/nodes/leaf/RichTextNodeContentConverter":function(){define(["dojo/_base/declare",
"MW/rtc/nodes/contentconverter/base/LeafNodeContentConverter","./RichTextNode"],function(g,f,e){return g(f,{getApplicableNodeClass:function(){return e}})})},"MW/rtc/plugins/save/SaveReadyManagerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/save/SaveReadyManager"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{createInstance:["rtc.saveready"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/save/SaveReadyManager":function(){define("dojo/aspect dojo/Deferred dojo/_base/declare dojo/_base/lang MW/rtc/abstract/AbstractPlugin MW/rtc/misc/Synchronizer".split(" "),
function(g,f,e,d,b,a){return e([b],{_SAVE_TIMEOUT:5E3,constructor:function(a){this._saveReadyPlugins=a;this._currentTimeout=this._saveReadyPromise=null},getReadyPromise:function(){if(this._saveReadyPromise)return this._saveReadyPromise;this._saveReadyPromise=new f;(new a(this._saveReadyPlugins)).whenAllReady(d.hitch(this,"_resolveSaveReady"));this._currentTimeout=setTimeout(d.hitch(this,"_resolveSaveReady"),this._SAVE_TIMEOUT);return this._saveReadyPromise},_resolveSaveReady:function(){this._saveReadyPromise&&
(this._saveReadyPromise.resolve(),this._saveReadyPromise=null);this._currentTimeout&&(clearTimeout(this._currentTimeout),this._currentTimeout=null)}})})},"MW/rtc/plugins/sectionbreak/SectionBreakInsertionRulesProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./SectionBreakInsertionRules"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/sectionbreak/SectionBreakInsertionRules":function(){define("dojo/_base/declare MW/rtc/model/Position MW/rtc/nodes/inner/LineNode MW/rtc/plugins/insertionrules/BaseInsertionRules MW/rtc/plugins/insertionrules/InsertionRuleConstants MW/rtc/plugins/insertionrules/receivinginstructions/ContinueUpInstruction MW/rtc/plugins/sectionbreak/model/SectionBreakNode".split(" "),
function(g,f,e,d,b,a,c){return g([d],{_compatibleParents:[],constructor:function(){},destroy:function(){},getApplicableNodeClass:function(){return c},getReceivingInstruction:function(c){return new a},getTopLevelInsertionInstruction:function(a,d,f,g,p){if(a.isAtRightEdge()&&a.isAtLeftEdge())return this._getInstructionForInsertingIntoEmptyLine(d,f);a=a.isAtEdge()||a.node.isUnique?e:a.getNode().constructor;return p.isAtRightEdge()&&(!f||f.isInstanceOf(c))?{insertInRoot:{relationToPosition:b.RELATION.AFTER,
insertSibling:!0,siblingConstructor:a}}:p.isAtLeftEdge()&&(!d||d.isInstanceOf(c))?{insertInRoot:{relationToPosition:b.RELATION.BEFORE,insertSibling:!0,siblingConstructor:a}}:{insertInRoot:{insertionPosition:p}}},_getInstructionForInsertingIntoEmptyLine:function(a,d){return a&&!a.isInstanceOf(c)?{insertInRoot:{relationToPosition:b.RELATION.BEFORE}}:d&&!d.isInstanceOf(c)?{insertInRoot:{relationToPosition:b.RELATION.AFTER}}:{insertInRoot:{relationToPosition:b.RELATION.AFTER,insertSibling:!0,siblingConstructor:e}}}})})},
"MW/rtc/plugins/undoredo/UndoRedoControllerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/undoredo/UndoRedoController"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.undoredo.editblock","rtc.cursor","rtc.cursorcontroller"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/plugins/undoredo/UndoRedoController":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/plugins/undoredo/EditBlockConstants MW/rtc/RichTextComponentFeatureEnum".split(" "),
function(g,f,e,d,b,a){return g(d,{constructor:function(a,b,d,g){this._undoStack=[];this._redoStack=[];this._transientBlock=null;this._internalDocument=a;this._cursor=d;this._cursorController=g;this.own(e.after(b,"onEndBlock",f.hitch(this,"_insert"),!0));this.own(e.after(a,"onDocumentReset",f.hitch(this,"clear"),!0))},_update:function(){this.onUndoRedoStackUpdated({isUndoable:this.canUndo(),isRedoable:this.canRedo()})},onUndoRedoStackUpdated:function(a){},clear:function(){this._undoStack=[];this._redoStack=
[];this._transientBlock=null;this._update()},canUndo:function(){return 0<this._undoStack.length&&!this._internalDocument.isReadOnly()},canRedo:function(){return 0<this._redoStack.length&&!this._internalDocument.isReadOnly()},undo:function(){if(this.canUndo()){var a=this._suspendCursor();this._transientBlock&&(this._transientBlock.unexecute(),this._transientBlock=null);var b=this._undoStack.pop();b.unexecute();var d=b.getUndoEvents();d.length&&this._internalDocument.emitDocumentEvents(d);this._resumeCursor(a);
this._redoStack.push(b);this._update()}},redo:function(){if(this.canRedo()){var a=this._suspendCursor();this._transientBlock&&(this._transientBlock.unexecute(),this._transientBlock=null);var b=this._redoStack.pop();b.execute();var d=b.getRedoEvents();d.length&&this._internalDocument.emitDocumentEvents(d);this._resumeCursor(a);this._undoStack.push(b);this._update()}},_insert:function(a){if(!(0===this._undoStack.length&&0===this._redoStack.length&&a.getType()===b.AUTO))if(0<this._redoStack.length&&
a.getType()===b.AUTO)this._transientBlock?a.mergeWith(this._transientBlock):this._transientBlock=a;else{var d=this._undoStack[this._undoStack.length-1];d&&this._transientBlock&&this._transientBlock.mergeWith(d);this._transientBlock=null;d&&a.canMergeWith(d)?a.mergeWith(d):(this._undoStack.push(a),this._redoStack=[],this._update());this._mergeAndAdvance(a.getBlockTypesForMergeAndAdvance())}},_mergeAndAdvance:function(a){for(;0<a.length;){var b=this._undoStack[this._undoStack.length-1],d=this._undoStack[this._undoStack.length-
2];if(!b||!d)break;b.mergeWith(d);this._undoStack.pop();if(0>a.indexOf(d.getType()))break}},_suspendCursor:function(){this._cursorController.suspendUpdates();return!this._cursor.isSelectionHidden()?(this._cursor.hideSelection(),!0):!1},_resumeCursor:function(a){a&&this._cursor.showSelection();this._cursorController.emitUpdate(!0,!0);this._cursorController.activateUpdates(!0)}})})},"MW/rtc/plugins/undoredo/EditBlockControllerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"MW/rtc/plugins/undoredo/EditBlockController"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/undoredo/EditBlockController":function(){define(["dojo/_base/declare","dojo/aspect","MW/rtc/plugins/undoredo/EditBlock","MW/rtc/plugins/undoredo/EditBlockConstants"],function(g,f,e,d){return g(null,{constructor:function(){this._block=null},startEdit:function(b){this._block?this._block.incrementReferenceCount():(this._block=
new e(b),this.onStartBlock(this._block));return this._block},endEdit:function(){this._block.decrementReferenceCount()&&(this._block.hasCommands()&&(this.onBeforeEndBlock(this._block),this.onEndBlock(this._block)),this._block=null)},getActiveBlock:function(){return this._block},onStartBlock:function(b){},onEndBlock:function(b){},onBeforeEndBlock:function(b){}})})},"MW/rtc/plugins/undoredo/EditBlock":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/_base/lang","MW/rtc/plugins/undoredo/EditBlockConstants"],
function(g,f,e,d){return f(null,{constructor:function(b){this._commands=[];this._undoEvents=[];this._redoEvents=[];this._type=b;this._references=1;this._blockTypesForMergeAndAdvance=[]},setType:function(b){this._type||(this._type=b)},getType:function(){return this._type},appendUndoEvents:function(b){b=this._copyEvents(b);this._undoEvents=this._undoEvents.concat(b)},getUndoEvents:function(){var b=this._undoEvents.slice(0);b.reverse();return b},appendRedoEvents:function(b){b=this._copyEvents(b);this._redoEvents=
this._redoEvents.concat(b)},getRedoEvents:function(){return this._redoEvents},_copyEvents:function(b){return g.map(b,function(a){return!a?a:e.mixin({},a,{isUndoRedo:!0})})},appendCommand:function(b){this._commands.push(b)},hasCommands:function(){return 0<this._commands.length},execute:function(){this._commands.forEach(function(b){b.execute()},this)},unexecute:function(){for(var b=this._commands.length-1;0<=b;b-=1)this._commands[b].unexecute()},pushAndExecuteCommand:function(b){this._commands.push(b);
return b.execute()},preventMerge:function(){this._preventMerge=!0},canMergeWith:function(b){return!this._type?!1:this._type===d.AUTO?!0:this._preventMerge||this._type!==b.getType()?!1:!0},setBlockTypesForMergeAndAdvance:function(b){this._blockTypesForMergeAndAdvance=b},getBlockTypesForMergeAndAdvance:function(){return this._blockTypesForMergeAndAdvance},mergeWith:function(b){b.addCommands(this._commands);b.appendRedoEvents(this._redoEvents);b.appendUndoEvents(this._undoEvents)},addCommands:function(b){this._commands=
this._commands.concat(b)},incrementReferenceCount:function(){this._references+=1},decrementReferenceCount:function(){this._references-=1;return 0===this._references}})})},"MW/rtc/plugins/undoredo/UndoRedoActionProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/undoredo/UndoRedoAction"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.actionservice","rtc.undoredo.controller"]}},createInstance:function(d,b){return new e(d,
b)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/undoredo/UndoRedoAction":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/RichTextComponentFeatureEnum"],function(g,f,e,d){return g(null,{constructor:function(b,a){this._actionService=b;this._undoRedoController=a;var c=[{id:d.UNDO_REDO.UNDO_ACTION,enabled:a.canUndo(),key:"ctrl_z",platformKey:{mac:"meta_z"},callback:f.hitch(this._undoRedoController,"undo")},{id:d.UNDO_REDO.REDO_ACTION,enabled:a.canRedo(),
key:"ctrl_y",platformKey:{mac:"meta_shift_z"},callback:f.hitch(this._undoRedoController,"redo")},{id:d.UNDO_REDO.CLEAR_ACTION,enabled:!0,callback:f.hitch(this._undoRedoController,"clear")}];b.loadActions(c);this.aspectHandler=e.after(a,"onUndoRedoStackUpdated",f.hitch(this,"_updateActions"),!0)},_updateActions:function(b){this._actionService.updateAction(d.UNDO_REDO.UNDO_ACTION,{enabled:b.isUndoable});this._actionService.updateAction(d.UNDO_REDO.REDO_ACTION,{enabled:b.isRedoable})},destroy:function(){this.aspectHandler.remove()}})})},
"MW/rtc/plugins/undoredo/UndoRedoCursorProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/undoredo/UndoRedoCursor"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.undoredo.editblock","rtc.cursorcontroller"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/undoredo/UndoRedoCursor":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/plugins/undoredo/commands/SetCursorCommand MW/rtc/plugins/undoredo/EditBlockConstants".split(" "),
function(g,f,e,d,b,a){return g(d,{constructor:function(a,b){this._cursorController=b;this._lastPosition=null;this.own(e.after(a,"onStartBlock",f.hitch(this,"_onStartBlock"),!0));this.own(e.after(a,"onBeforeEndBlock",f.hitch(this,"_onEndBlock"),!0))},_onStartBlock:function(c){c.getType()!==a.AUTO&&((this._cursorController.hasSelection()||!this._matchesLastPosition())&&c.preventMerge(),c.appendCommand(new b(this._cursorController)))},_onEndBlock:function(c){c.getType!==a.AUTO&&(this._lastPosition=this._getPositions(),
c.appendCommand(new b(this._cursorController,!0)))},_matchesLastPosition:function(){var a=this._getPositions();return this._lastPosition&&a.length===this._lastPosition.length&&a.every(function(a,c){return a.line===this._lastPosition[c].line&&a.column===this._lastPosition[c].column},this)},_getPositions:function(){return this._cursorController.getCursors(!0).map(function(a){return a.getPosition()})}})})},"MW/rtc/plugins/undoredo/commands/SetCursorCommand":function(){define(["dojo/_base/declare","mw-log/Log",
"MW/rtc/plugins/undoredo/commands/CommandInterface"],function(g,f,e){return g(e,{constructor:function(d,b){this._cursorController=d;this._positions=this._cursorController.getPositions();this._onRedo=b},execute:function(){this._onRedo&&this._cursorController.setPositions(this._positions)},unexecute:function(){this._onRedo||this._cursorController.setPositions(this._positions)}})})},"MW/rtc/plugins/language/matlab/alert/AlertControllerProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/language/matlab/alert/AlertController",
"MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.alert.model","rtc.internaldocument"]}},createInstance:function(d,b){return new f(d,b)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/language/matlab/alert/AlertController":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect"],function(g,f,e){return g(null,{constructor:function(d,b){this._alertModel=d;
this._aspectHandle=e.before(b,"onDocumentReset",f.hitch(this,"_handleDocumentReset"))},_handleDocumentReset:function(){this._alertModel.removeAllAlerts();this.onAlertsReset()},onAlertsReset:function(){},destroy:function(){this._aspectHandle&&(this._aspectHandle.remove(),this._aspectHandle=null);this._alertModel.removeAllAlerts()}})})},"MW/rtc/plugins/language/matlab/alert/AlertModelProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/language/matlab/alert/AlertModel","MW/rtc/core/provider/PluginProvider"],
function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.document"]}},createInstance:function(d){return new f(d)}})})},"MW/rtc/plugins/language/matlab/alert/AlertModel":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/on","mw-utils/Utils","MW/rtc/plugins/language/matlab/alert/AlertModelBase"],function(g,f,e,d,b){return g(b,{constructor:function(a){this._document=a;this._alerts=[]},getAlerts:function(){return this._alerts},
addAlert:function(a,c,b){a=this._addAlert(a,c,b);this.onModelChanged();return a},addAlerts:function(a){a=a.map(function(a){return this._addAlert(a.type,a.line,a.payload)},this);this.onModelChanged();return a},updateAlert:function(a,c){var b=this._getAlertById(a);this._copyAlertProperties(c,b);c.isActive&&this._clearActiveAlert();this.onModelChanged()},removeAlerts:function(a){var c=Array.isArray(a)?a:[a];this._alerts=this._alerts.filter(function(a){var b=c.some(function(c){return c===a.id});b&&this._document.deletePosition(a.position);
return!b},this);this.onModelChanged()},removeAllAlerts:function(){this._alerts=this._alerts.filter(function(a){this._document.deletePosition(a.position)},this);this.onModelChanged()},_addAlert:function(a,c,b){var e=d.generateUuid();b.isActive&&this._clearActiveAlert();c=this._document.createLinePositionInLine(c-1,!0);this._alerts.push({id:e,type:a,position:c,payload:b});return e},_getAlertById:function(a){for(var c=0;c<this._alerts.length;c++)if(this._alerts[c].id===a)return this._alerts[c];throw Error("Alert with ID "+
a+" not found.");},_copyAlertProperties:function(a,c){for(var b in a)"object"===typeof a[b]?this._copyAlertProperties(a[b],c[b]):c[b]=a[b]},_clearActiveAlert:function(){this._alerts.forEach(function(a){a.payload.isActive&&(a.payload.isActive=!1)})}})})},"MW/rtc/plugins/language/matlab/alert/AlertModelBase":function(){define(["dojo/_base/declare"],function(g){return g(null,{getAlerts:function(){throw Error("Unimplemented API: MW.rtc.plugins.language.matlab.alert.getAlerts");},onModelChanged:function(){}})})},
"MW/rtc/plugins/language/matlab/alert/AlertViewProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/language/matlab/alert/AlertView","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{createInstance:"rtc.document rtc.view rtc.view.visibility rtc.alert.model rtc.alert.widgetfactory rtc.internaldocument".split(" ")}},createInstance:function(d,b,a,c,e,g){return new f(d,b,a,c,e,g)},destroyInstance:function(d){d.destroy()}})})},
"MW/rtc/plugins/language/matlab/alert/AlertView":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/on MW/rtc/model/CodeUtilities MW/rtc/model/DocumentConstants MW/rtc/model/DocumentEventUtilities MW/rtc/plugins/language/matlab/alert/AlertTypeEnum".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p,n){return g(null,{_HORIZONTAL_OFFSET_PX:43,_ALERT_HEIGHT:15,constructor:function(c,b,d,h,g,k){this._document=c;this._view=
b;this._visibliltyNotifier=d;this._alertModel=h;this._alertWidgetFactory=g;this._internalDocument=k;this._alertLayerNode=a.create("div",{className:"alertPluginLayer"});this._view.addLayer(this._alertLayerNode);this._alertLinesMap={};this._rightMarginCache=this._leftPositionCache=NaN;this._transientAspectHandles=[];this._permanentAspectHandles=[e.after(this._visibliltyNotifier,"onShow",f.hitch(this,"_enable")),e.after(this._visibliltyNotifier,"onHide",f.hitch(this,"_disable"))];this._enable()},destroy:function(){this._removeTransientAspectHandles();
this._permanentAspectHandles.forEach(function(a){a.remove()});this._permanentAspectHandles=[];this._clearAlertLines()},_removeTransientAspectHandles:function(){this._transientAspectHandles.forEach(function(a){a.remove()});this._transientAspectHandles=[]},_enable:function(){0===this._transientAspectHandles.length&&(this._transientAspectHandles=[e.after(this._alertModel,"onModelChanged",f.hitch(this,"_layout")),e.after(this._view,"onViewUpdated",f.hitch(this,"_handleOnViewUpdated"))]);this._layout()},
_disable:function(){this._removeTransientAspectHandles();this._clearAlertLines()},_layout:function(){this._clearAlertLines();var a=this._alertModel.getAlerts();this._updateLeftPositionCache();var c=this._calculateViewPositions(a);a.forEach(function(a,b){var d=a.position,e=d.getLineColumn().line,f=this._alertLinesMap[e];f?this._mergeAlertIntoAlertLine(a,f):(f=this._createAlertLine(d),this._alertLinesMap[e]=f,this._updateAlertLineInDom(f,c[b]),this._addAlertToAlertLine(a,f,"last"))},this)},_clearAlertLines:function(){this._getAlertLines().forEach(function(c){c.alerts.forEach(function(a){a.destroy()},
this);c.alerts=[];c.positionListeners.forEach(function(a){a.remove()},this);c.domNode&&a.destroy(c.domNode)},this);this._alertLinesMap={}},_mergeAlertIntoAlertLine:function(a,c){var b=a.type,d=c.alerts.filter(function(a){return a.getType()===b},this);if(0<d.length){if(d=d[0],d.payload.isActive=d.payload.isActive||a.payload.isActive,a.payload.message&&d.setMessage(d.getMessage()+"\x3chr\x3e"+a.payload.message),void 0!==d.payload.isStale||void 0!==a.payload.isStale)d.payload.isStale=!(!d.payload.isStale||
!a.payload.isStale),d.setStaleness(d.payload.isStale)}else this._addAlertToAlertLine(a,c,b===n.WARNING?"first":"last")},_createAlertLine:function(c){var b={alerts:[],domNode:a.create("div",{className:"alertPlugin-alertLine"}),position:c,positionListeners:null};b.positionListeners=[e.after(c,"onChange",f.hitch(this,"_handleAlertLinePositionOnChange",b)),e.after(this._internalDocument,"onDocumentChanged",f.hitch(this,"_handleOnDocumentChanged",b),!0)];return b},_addAlertToAlertLine:function(c,b,d){c=
this._alertWidgetFactory.createAlert(c.type,c.position,c.payload);a.place(c.domNode,b.domNode,d);b.alerts.push(c);this._updateAlertLineVisibility(b);c.startup()},_handleAlertLinePositionOnChange:function(a){var c=a.position,b=c.getLineColumn().line;this._getAlertLines().some(function(a){a=a.position;var d=a.getLineColumn().line;return b===d&&c!==a},this)?this._layout():this._updateAlertLinesInDom([a]);this._updateAlertLineVisibility(a)},_handleOnViewUpdated:function(){this._updateRightMarginCache();
this._updateLeftPositionCache();this._updateAlertLinesInDom(this._getAlertLines())},_updateAlertLinesInDom:function(a){var c=this._calculateViewPositions(a);a.forEach(function(a,b){this._updateAlertLineInDom(a,c[b])},this)},_updateAlertLineInDom:function(a,c){null===c?this._removeAlertLineIfNeeded(a):(this._placeAlertIfNeeded(a),a.domNode.style.top=c.top+"px",a.domNode.style.left=c.left+"px")},_removeAlertLineIfNeeded:function(a){a.domNode.parentElement&&a.domNode.parentElement.removeChild(a.domNode)},
_placeAlertIfNeeded:function(c){c.domNode.parentElement||a.place(c.domNode,this._alertLayerNode,"last")},_handleOnDocumentChanged:function(a,c){p.hasEventType(c,m.FORMAT_CHANGE_EVENT)&&this._updateAlertLineVisibility(a)},_updateAlertLineVisibility:function(a){var c=!l.isCodeContainer(a.position.node);b.toggle(a.domNode,"alertPlugin-onTextLine",c)},_getAlertLines:function(){return Object.keys(this._alertLinesMap).map(function(a){return this._alertLinesMap[a]},this)},_calculateViewPositions:function(a){return a.map(function(a){var c=
a.position.getNode();a=this._view.getCoordinateForPosition(c.startPosition());if(!this._view.isValidCoordinate(a))return null;c=c.children[0].getHeight()-this._ALERT_HEIGHT;return{top:a.y+Math.floor(c/2),left:this._leftPositionCache}},this)},_updateLeftPositionCache:function(){var a=this._view.getDomTargetPosition();this._leftPositionCache=a.scrollLeft+a.clientWidth-this._rightMarginCache-this._HORIZONTAL_OFFSET_PX},_updateRightMarginCache:function(){if(!isFinite(this._rightMarginCache)){var a=this._view.getDomtarget().querySelector(".lineNode");
if(a&&d.isDescendant(a,document.body)){var b=this._view.getDomTargetPosition(),e=h.getComputedStyle(a),a=c.getMarginBox(a,e);this._rightMarginCache=b.scrollWidth-a.w-a.l}}}})})},"MW/rtc/plugins/language/matlab/alert/AlertWidgetFactoryProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/language/matlab/alert/AlertWidgetFactory","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{createInstance:["rtc.view","rtc.cursor"]}},
createInstance:function(d,b){return new f(d,b)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/language/matlab/alert/AlertWidgetFactory":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-construct MW/rtc/plugins/language/matlab/alert/AlertTypeEnum MW/rtc/plugins/language/matlab/alert/ErrorAlert MW/rtc/plugins/language/matlab/alert/WarningAlert".split(" "),function(g,f,e,d,b,a,c){return g(null,{constructor:function(a,c){this._view=a;this._cursor=c},destroy:function(){},
createAlert:function(d,e,f){switch(d){case b.ERROR:d=new a({view:this._view,position:e,payload:f});break;case b.WARNING:d=new c({view:this._view,position:e,payload:f});break;default:throw Error("Unable to construct alert widget. Unknown alert widget type.");}return d}})})},"MW/rtc/plugins/language/matlab/alert/ErrorAlert":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/aspect dojo/on dijit/_TemplatedMixin dojo/text!./templateErrorAlert.html MW/rtc/plugins/language/matlab/alert/AlertWidgetBase MW/rtc/plugins/language/matlab/alert/AlertTypeEnum".split(" "),
function(g,f,e,d,b,a,c,h,k){return g([h,a],{templateString:c,baseClass:"alertPlugin-errorElement",constructor:function(a){this._payload=a.payload},startup:function(){this.inherited(arguments);this.setStaleness(this._payload.isStale);this.setMessage(this._payload.message)},destroy:function(){this.inherited(arguments)},getType:function(){return k.ERROR}})})},"MW/rtc/plugins/language/matlab/alert/AlertWidgetBase":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-class dojo/dom-construct dojo/dom-style dojo/on dijit/_WidgetBase dijit/popup dijit/TooltipDialog MW/rtc/view/ViewEventUtilities".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m){return g([h],{_STALE_CLASS:"alertPlugin-isStale",_HAS_TOOLTIP_CLASS:"alertPlugin-hasTooltip",_MOUSE_DOWN_EVENT:window.PointerEvent?"pointerdown":"mousedown",_MOUSE_UP_EVENT:window.PointerEvent?"pointerup":"mouseup",statics:{onAlertBecameActive:function(a){}},constructor:function(a){this._message="";this._tooltip=null;this._isTooltipVisible=!1;this._view=a.view;this._position=a.position;this._tooltipPosition="after-centered below below-alt below-centered above above-alt above-centered".split(" ");
this._mouseListeners=[];this._tooltipListeners=[];this._blockedMouseDown=!1},startup:function(){this.inherited(arguments)},destroy:function(){this._removeMouseListeners();this._removeTooltipAndListeners();this.inherited(arguments)},getType:function(){throw Error("Unimplemented API: MW.rtc.plugins.language.matlab.alert.AlertWidgetBase.getType");},setMessage:function(a){this._message=a;this._removeMouseListeners();this._removeTooltipAndListeners();this._isTooltipEnabled()&&(this._addMouseListeners(),
d.add(this.domNode,this._HAS_TOOLTIP_CLASS),this._updateTooltipVisibility())},getMessage:function(){return this._message},_showMessage:function(){this._tooltip||this._initializeTooltips();this._tooltip.connectorNode.style.top="";this._tooltip.connectorNode.style.left="";k.open({parent:this,popup:this._tooltip,around:this.domNode,orient:this._tooltipPosition,maxHeight:Infinity,onClose:f.hitch(this,"_onTooltipClose")});this._adjustTooltipZIndex("99");this._tooltip.set("data-testid","alertPluginTooltip_visible");
this._isTooltipVisible=this._payload.isActive=!0;this.statics.onAlertBecameActive(this)},_hideMessage:function(a){if(this._tooltip){var c=this._payload.isActive;k.close(this._tooltip);this._tooltip.set("data-testid","alertPluginTooltip_hidden");a&&(this._payload.isActive=c)}},_onTooltipClose:function(){this._isTooltipVisible=this._payload.isActive=!1},setStaleness:function(a){d.toggle(this.domNode,this._STALE_CLASS,a||!1)},onMouseDown:function(a){a.stopPropagation();this._blockedMouseDown=!0},onMouseUp:function(a){this._blockedMouseDown&&
(a.stopPropagation(),this._payload.isActive=!this._payload.isActive,this._updateTooltipVisibility());this._blockedMouseDown=!1},onWindowMouseUp:function(){this._blockedMouseDown=!1},_handleOtherAlertBecameActive:function(a){a!==this&&(this._payload.isActive=!1)},_wrapMessage:function(a){return b.create("div",{className:"alertPlugin-alertMessage",innerHTML:a})},_isTooltipEnabled:function(){return this._message&&0<this._message.length},_initializeTooltips:function(){this._tooltip=new l({"class":"rtcTooltip",
content:this._wrapMessage(this._message)});k.moveOffScreen(this._tooltip);this._addTooltipListeners()},_addMouseListeners:function(){this._mouseListeners=[c(this.domNode,this._MOUSE_DOWN_EVENT,f.hitch(this,"onMouseDown")),c(this.domNode,this._MOUSE_UP_EVENT,f.hitch(this,"onMouseUp")),c(window,this._MOUSE_UP_EVENT,f.hitch(this,"onWindowMouseUp"))]},_removeMouseListeners:function(){this._mouseListeners.forEach(function(a){a.remove()});this._mouseListeners=[]},_addTooltipListeners:function(){this._tooltipListeners=
[e.after(this._view,"onViewUpdated",f.hitch(this,"_updateTooltipVisibilityOnViewChange"),!0),e.after(this._position,"onChange",f.hitch(this,"_updateTooltipVisibility")),e.after(this.statics,"onAlertBecameActive",f.hitch(this,"_handleOtherAlertBecameActive"),!0)]},_removeTooltipAndListeners:function(){null!==this._tooltip&&(this._tooltipListeners.forEach(function(a){a.remove()}),this._tooltipListeners=[],this._hideMessage(!0),this._tooltip.destroy(),this._tooltip=null);d.remove(this.domNode,this._HAS_TOOLTIP_CLASS)},
_updateTooltipVisibility:function(){if(this._isTooltipEnabled()){if(this._payload.isActive){var a=this._position.getLineColumn();if(this._view.isLineInView(a.line)){this._showMessage();return}}this._hideMessage(!0)}},_updateTooltipVisibilityOnViewChange:function(a){(m.hasScrollEvent(a)||m.hasSizingEvent(a))&&this._updateTooltipVisibility()},_adjustTooltipZIndex:function(c){for(var b=this._tooltip.domNode;b&&!d.contains(b,"dijitTooltipDialogPopup");)b=b.parentNode;a.set(b,"zIndex",c)}})})},"MW/rtc/plugins/language/matlab/alert/WarningAlert":function(){define("dojo/_base/declare dojo/dom-construct dijit/_TemplatedMixin dojo/text!./templateWarningAlert.html MW/rtc/plugins/language/matlab/alert/AlertWidgetBase MW/rtc/plugins/language/matlab/alert/AlertTypeEnum".split(" "),
function(g,f,e,d,b,a){return g([b,e],{templateString:d,baseClass:"alertPlugin-warningElement",constructor:function(a){this._payload=a.payload},startup:function(){this.inherited(arguments);this.setStaleness(this._payload.isStale);this.setMessage(this._payload.message)},destroy:function(){this.inherited(arguments)},getType:function(){return a.WARNING}})})},"MW/rtc/plugins/language/matlab/diagnosticmessage/DiagnosticMessageFormatterProvider":function(){define(["dojo/_base/declare","./DiagnosticMessageFormatter",
"MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{createInstance:[]}},createInstance:function(){return new f},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/language/matlab/diagnosticmessage/DiagnosticMessageFormatter":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/plugins/language/matlab/diagnosticmessage/ErrorMessageContent","MW/rtc/plugins/language/matlab/diagnosticmessage/WarningMessageContent"],
function(g,f,e,d,b){return g(null,{constructor:function(){},destroy:function(){},createErrorMessageWithStack:function(a){return new d(a)},createWarningMessageWithStack:function(a){return new b(a)}})})},"MW/rtc/plugins/language/matlab/diagnosticmessage/ErrorMessageContent":function(){define(["dojo/_base/declare","MW/rtc/plugins/language/matlab/diagnosticmessage/MessageContentBase"],function(g,f){return g([f],{_SECTION_SEPARATOR:"\x3cbr\x3e\x3cbr\x3e",_ERROR_CLASS:"diagnosticMessage-errorType",constructor:function(){},
getClass:function(){return this._ERROR_CLASS},getSectionSeparator:function(){return this._SECTION_SEPARATOR}})})},"MW/rtc/plugins/language/matlab/diagnosticmessage/MessageContentBase":function(){define(["dojo/_base/declare","dojo/dom-construct"],function(g,f){return g(null,{_LINEBREAK:"\x3cbr\x3e",constructor:function(e){this._rawReport=e},getClass:function(){throw Error("Unimplemented API: MW.rtc.plugins.language.matlab.diagnosticmessage.MessageContentBase.getClass");},getSectionSeparator:function(){throw Error("Unimplemented API: MW.rtc.plugins.language.matlab.diagnosticmessage.MessageContentBase.getSectionSeparator");
},getDomNode:function(){var e,d,b=this._rawReport,b=b.replace(/\n/g,this._LINEBREAK);d=b.indexOf(this.getSectionSeparator());1<d?(e=b.substring(0,d),d=b.substring(d+this._LINEBREAK.length)):(e=b,d="");b={className:"diagnosticMessage-wrapper "+this.getClass()};d={innerHTML:d,className:"diagnosticMessage-stackPart"};e={innerHTML:e,className:"diagnosticMessage-messagePart"};b=f.create("div",b);f.create("div",e,b);f.create("div",d,b);return b}})})},"MW/rtc/plugins/language/matlab/diagnosticmessage/WarningMessageContent":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/language/matlab/diagnosticmessage/MessageContentBase"],function(g,f){return g([f],{_SECTION_SEPARATOR:"\x3cbr\x3e\x3e ",_WARNING_CLASS:"diagnosticMessage-warningType",constructor:function(){},getClass:function(){return this._WARNING_CLASS},getSectionSeparator:function(){return this._SECTION_SEPARATOR}})})},"MW/rtc/plugins/language/matlab/autoindent/AutoIndentProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/language/matlab/autoindent/AutoIndent","MW/rtc/core/provider/PluginProvider"],
function(g,f,e){return g(e,{requires:function(){return{createInstance:"rtc.internaldocument rtc.document rtc.cursor matlab.tokens rtc.indentutilities rtc.cursorcontroller".split(" ")}},createInstance:function(d,b,a,c,e,g){return new f(d,b,a,c,e,g)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/language/matlab/autoindent/AutoIndent":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/model/CodeUtilities MW/rtc/model/DocumentConstants MW/rtc/model/DocumentEventUtilities MW/rtc/model/DocumentUtilities MW/rtc/model/NodeUtilities MW/rtc/plugins/language/matlab/autoindent/ExchangeService MW/rtc/plugins/language/matlab/autoindent/Formatter MW/rtc/plugins/language/matlab/autoindent/FormatSupport mw-utils/Utils".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){return g(d,{constructor:function(a,c,b,d,h,g){this._document=c;this._internalDocument=a;this._cursor=b;this._tokenizerService=d;this._indentUtilities=h;this._cursorController=g;this._formatter=new m(this._cursor,this._document,this._internalDocument,d,h);this._notifyAutoIndentEnablement();this._formatSupport=new p(this._formatter,this._document);this.own(e.after(this._internalDocument,"onDocumentChanged",f.hitch(this,"_handleDocumentChanged"),!0));this.own(e.after(this._cursorController,
"onUpdate",f.hitch(this,"_handleCursorControllerOnUpdate")));this._isEnabled=!0},_handleCursorControllerOnUpdate:function(){this._cursorController.hasMultipleCursors()?this.disable():this.enable()},_notifyAutoIndentEnablement:function(){l.notifyAutoIndentEnablement()},_handleDocumentChanged:function(c){if(this._isEnabled&&c){var d=c[0],d=d||{},e=this._cursor.getNode();if(!d.isUndoRedo)switch(d.type){case a.INSERT_TEXT:if(!b.isCodeContainer(e))break;this._handleInsertTextEvent(c);break;case a.INSERT_BREAK_EVENT:this._handleLineBreakEvent(c);
break;case a.DELETION_EVENT:if(!b.isCodeContainer(e))break;this._handleDeleteEvent();break;case a.FORMAT_CHANGE_EVENT:b.isCodeContainer(e)&&this._shouldFormatChangeTriggerIndent(d)&&this._handleFormatChangeEvent(d)}}},enable:function(){this._isEnabled=!0},disable:function(){this._isEnabled=!1},_handleInsertTextEvent:function(a){if(!c.isMultiLineEvent(a,this._internalDocument)){a=a[0].text;var b=this._cursor.getLineColumn();b.line-=1;b.column-=1;this._formatIfNecessary(a,b)}},_handleLineBreakEvent:function(a){l.resetNumberOfWhiteSpaces();
l.resetIndentLevel();a=c.finalLineRangeFromEvents(a);var d=a.startLine;a=a.endLine;var e=this._internalDocument.getLineNode(d),f=this._internalDocument.getLineNode(a);if(e&&f&&b.isCodeRange(e,f)){for(;d<a;d+=1)e={line:d,column:this._document.getLineText(d+1).length},this._formatIfNecessary("\n",e);d=this._indentUtilities.getIndentForLineNumber(a);0<d&&l.setNumberOfWhiteSpaces(d);a=this._formatter.format(a);0<a&&l.setIndentLevel(a);d=this._cursor.getPosition().line;e=this._document.getLineText(d+1);
this._adjustCursorPosition(e,d,a)}},_handleDeleteEvent:function(){var a=this._cursor.getLineColumn();a.line-=1;a.column-=1;this._formatIfNecessary("\b",a)},_handleFormatChangeEvent:function(a){this._formatter.format(a.startLine)},_adjustCursorPosition:function(a,c,b){n.isWhitespace(a)?this._cursor.movePosition(this._cursor.LINE_END):this._cursor.setPosition(null,{line:c,column:b},!0)},_formatIfNecessary:function(a,c){this._formatSupport.shouldKeyTriggerFormat(a,c)&&this._formatter.format(c.line)},
_shouldFormatChangeTriggerIndent:function(a){return"code"===a.newFormat&&a.startLine===a.endLine},destroy:function(){this.inherited(arguments);this._formatSupport=this._formatter=null}})})},"MW/rtc/plugins/language/matlab/autoindent/ExchangeService":function(){define([],function(){return{_latestNumberOfWhiteSpaces:0,_latestIndentLevel:0,_autoIndentEnablement:!1,getLatestNumberOfWhiteSpaces:function(){return this._latestNumberOfWhiteSpaces},setNumberOfWhiteSpaces:function(g){this._latestNumberOfWhiteSpaces=
g},resetNumberOfWhiteSpaces:function(){this._latestNumberOfWhiteSpaces=0},getLatestIndentLevel:function(){return this._latestIndentLevel},setIndentLevel:function(g){this._latestIndentLevel=g},resetIndentLevel:function(){this._latestIndentLevel=0},notifyAutoIndentEnablement:function(){this._autoIndentEnablement=!0},isAutoIndentEnabled:function(){return this._autoIndentEnablement}}})},"MW/rtc/plugins/language/matlab/autoindent/Formatter":function(){define(["dojo/_base/declare","dojo/_base/lang","mw-log/Log"],
function(g,f,e){return g(null,{_INDENT_AMOUNT:4,_UNDOREDO_BLOCK_NAME:"AutoIndent",constructor:function(d,b,a,c,e){this._cursor=d;this._document=b;this._internalDocument=a;this._tokenizerService=c;this._indentUtilities=e},findFirstNonWhitespaceTokenInLine:function(d){return this._indentUtilities.findFirstNonWhitespaceTokenInLine(d)},processLineContinuations:function(d){return this._indentUtilities.processLineContinuations(d)},processNonLineContinuations:function(d){return this._indentUtilities.processNonLineContinuations(d)},
format:function(d){return this._indentUtilities.format(d)},_isNotWhitespaceOrComment:function(d){return this._indentUtilities.isNotWhitespaceOrComment(d)},_findCorrespondingStartToken:function(d,b){return this._indentUtilities.findCorrespondingStartToken(d,b)},_searchBackAndCalculateIndent:function(d,b){return this._indentUtilities.searchBackAndCalculateIndent(d,b)},_getTokenIndent:function(d){return this._indentUtilities.getTokenIndent(d)},_getDeltaOfIndent:function(d,b){return this._indentUtilities.getDeltaOfIndent(d,
b)}})})},"MW/rtc/plugins/language/matlab/autoindent/FormatSupport":function(){define(["dojo/_base/array","dojo/_base/declare","mw-utils/Utils"],function(g,f,e){return f(null,{constructor:function(d,b){this.KEYWORD_MAP=this._createOutdentKeywordMap();this._formatter=d;this._document=b},shouldKeyTriggerFormat:function(d,b){var a=this._checkTextMatchesToken(d,b);!1===a&&1===d.length&&(a=this._checkPreviousChar(d,b));return a},_checkTextMatchesToken:function(d,b){var a=!1;if(this._isStringAtEndOfKeyword(d)){var c=
this._formatter.findFirstNonWhitespaceTokenInLine(b.line),e=this._getKeywordsEndingInString(d),f;if(c)for(f=0;f<e.length;f+=1)if(this._doesTokenMatch(c,e,f,b)){a=!0;break}}return a},_checkPreviousChar:function(d,b){var a=!1;e.isWhitespace(d)?(a=this._goBackUntilNoWhitespace(d,b),a=this._checkTextMatchesToken(a.typedText,a.cursorPosition)):this._didDeletionOccur(b,d)?a=this._checkCursorPositionForToken(b):1<b.column&&(b.column-=1,a=this._checkCursorPositionForToken(b));return a},_checkCursorPositionForToken:function(d){var b=
this._document.getTextCharacters(d.line,d.column-1,1);return this._checkTextMatchesToken(b,d)},_didDeletionOccur:function(d,b){return 0<d.column&&this._document.getTextCharacters(d.line,d.column-1,1)!==b},_goBackUntilNoWhitespace:function(d,b){for(;d&&e.isWhitespace(d)&&1<b.column;)b.column-=1,d=this._document.getTextCharacters(b.line,b.column,1);return{typedText:d,cursorPosition:b}},_getKeywordsEndingInString:function(d){return this.KEYWORD_MAP[d]},_isStringAtEndOfKeyword:function(d){return void 0!==
this.KEYWORD_MAP[d]},_createOutdentKeywordMap:function(){return{e:["else","case","otherwise"],f:["elseif"],n:["function"],h:["catch"],d:["end"]}},_doesTokenMatch:function(d,b,a,c){d=d.getColumn();return!(0<=d)?!1:this._document.getTextCharacters(c.line,d,b[a].length)===b[a]}})})},"MW/rtc/plugins/language/matlab/autoindent/preferences/AutoIndentPreferenceProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/language/matlab/autoindent/preferences/AutoIndentPreference","MW/rtc/core/provider/PluginProvider"],
function(g,f,e){return g(e,{requires:function(){return{createInstance:["rtc.preferences.service","rtc.indentutilities"]}},createInstance:function(d,b){return new f(d,b)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/language/matlab/autoindent/preferences/AutoIndentPreference":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/preferences/PreferenceKeysEnum ./FunctionIndentingPreferences".split(" "),function(g,f,e,d,b,a){return g(d,
{constructor:function(a,b){this._preferenceService=a;this._indentUtilities=b;this.own(e.after(this._preferenceService,"onPreferencesChanged",f.hitch(this,"_handlePreferenceChanged")));this._setIndentingStyle()},_handlePreferenceChanged:function(){this._setIndentingStyle()},_setIndentingStyle:function(){var c=this._preferenceService.getValue(b.INDENTING,a.MixedFunctionIndenting);this._indentUtilities.setIndentingStyle(c)}})})},"MW/rtc/plugins/language/matlab/code/CodeChangeServiceProvider":function(){define(["dojo/_base/declare",
"dojo/_base/lang","./CodeChangeService","MW/rtc/core/provider/PluginProvider"],function(g,f,e,d){return g(d,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.cursor","rtc.internaldocument","rtc.linenumberservice"]}},createInstance:function(b,a,c){return new e(b,a,c)},destroyInstance:function(b){b.destroy()}})})},"MW/rtc/plugins/language/matlab/code/CodeChangeService":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/model/CodeUtilities MW/rtc/model/DocumentConstants MW/rtc/model/DocumentEventUtilities MW/rtc/model/NodeUtilities".split(" "),
function(g,f,e,d,b,a,c){return g(null,{constructor:function(a,c,b){this._cursor=a;this._internalDocument=c;this._lineNumberService=b;this._numberOfCodeLines=0;this._aspectHandles=[];this._aspectHandles.push(e.after(this._internalDocument,"onDocumentChanged",f.hitch(this,"_checkCodeChange"),!0));this._aspectHandles.push(e.after(this._internalDocument,"onDocumentReset",f.hitch(this,"_checkCodeChangeOnReset")))},destroy:function(){this._aspectHandles.forEach(function(a){a.remove()});this._aspectHandles=
[]},onCodeChanged:function(a){},onNumberOfCodeLinesChanged:function(a){},_checkCodeChange:function(b){if(!b||0===b.length)this.onCodeChanged([this._cursor.getNode().rootContainer()]);else{var e=a.getLineNodesFromEvents(b,this._internalDocument).filter(d.isCodeContainer,c);b=this._getFormerCodeLineNodes(b);e=e.concat(b);this._checkNumberOfCodeLinesChanged();if(e.length)this.onCodeChanged(e)}},_getFormerCodeLineNodes:function(c){c=a.getEventsOfType(c,b.FORMAT_CHANGE_EVENT);c=c.filter(function(a){return"code"===
a.oldFormat});return a.getLineNodesFromEvents(c,this._internalDocument)},_checkCodeChangeOnReset:function(){var a=d.getCodeLineNodes(this._internalDocument);this._checkNumberOfCodeLinesChanged();if(a.length)this.onCodeChanged(a)},_checkNumberOfCodeLinesChanged:function(){var a=this._lineNumberService.getNumberOfCodeLines();this._numberOfCodeLines!==a&&(this._numberOfCodeLines=a,this.onNumberOfCodeLinesChanged(this._numberOfCodeLines))}})})},"MW/rtc/plugins/language/matlab/codecontent/CodeContentProvider":function(){define(["dojo/_base/declare",
"dojo/_base/lang","MW/rtc/core/provider/PluginProvider","./CodeContent","MW/rtc/plugins/language/matlab/utilities/MatlabPluginUtilities"],function(g,f,e,d,b){return g(e,{isApplicable:function(a){return b.isMatlabCodeFileOrBuffer(a)},requires:function(){return{isApplicable:["rtc.backingstore"],createInstance:[]}},createInstance:function(){return new d}})})},"MW/rtc/plugins/language/matlab/codecontent/CodeContent":function(){define(["dojo/_base/declare","mw-string-utils/StringUtils"],function(g,f){return g(null,
{_FUNCTION_KEYWORD:"function ",_CLASSDEF_KEYWORD:"classdef ",_COMMENT_SYMBOL:"%",_BLOCK_COMMENT_START_SYMBOL:"%{",_BLOCK_COMMENT_END_SYMBOL:"%}",TYPE_ENUM:{SCRIPT:0,FUNCTION:1,CLASS:2},constructor:function(){},getCodeType:function(e){var d=this.TYPE_ENUM.SCRIPT;(e=this._findFirstCodeLine(e))&&(d=this._checkLineForCodeType(e));return d},_checkLineForCodeType:function(e){var d=f.leftTrim(e.getText());e=0===d.indexOf(this._FUNCTION_KEYWORD);d=0===d.indexOf(this._CLASSDEF_KEYWORD);return e?this.TYPE_ENUM.FUNCTION:
d?this.TYPE_ENUM.CLASS:this.TYPE_ENUM.SCRIPT},lineNodesContainCode:function(e){return!!this._findFirstCodeLine(e)},_findFirstCodeLine:function(e){for(var d=0;d<e.length;d++){var b=e[d],a=b.getText().trim();if(0!==a.length)if(0===a.indexOf(this._BLOCK_COMMENT_START_SYMBOL)){if(d=this._findEndOfBlockLine(d,e),-1===d)break}else if(0!==a.indexOf(this._COMMENT_SYMBOL))return b}return null},_findEndOfBlockLine:function(e,d){for(var b=e+1;b<d.length;b++){var a=d[b].getText().trim();if(0===a.indexOf(this._BLOCK_COMMENT_START_SYMBOL))this._findEndOfBlockLine(b,
d);else if(0===a.indexOf(this._BLOCK_COMMENT_END_SYMBOL))return b}return-1}})})},"MW/rtc/plugins/language/matlab/codeanalyzer/model/CodeAnalyzerModelProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/plugins/language/matlab/codeanalyzer/model/CodeAnalyzerModel","MW/rtc/core/provider/PluginProvider"],function(g,f,e,d){return g(d,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.editordataservice","rtc.document"]}},createInstance:function(b,
a){return new e(b,a)}})})},"MW/rtc/plugins/language/matlab/codeanalyzer/model/CodeAnalyzerModel":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/abstract/AbstractDocumentSynchronizableMixin","MW/rtc/abstract/AbstractPlugin","MW/rtc/plugins/language/matlab/codeanalyzer/CodeAnalyzerUtils"],function(g,f,e,d,b){return g([d,e],{constructor:function(a,c){this._editorDataService=a;this._document=c;this._modelData=null;this._model={};this._processedMessages=[];this._linePropertiesArray=
[];this.initializeSynchronizable(c);this._handles=[this._editorDataService.listenTo("matlab.code.codeanalyzer",f.hitch(this,"_handleResponse"))]},_handleResponse:function(a){a&&(this._lastDocumentState=a.documentState,this._shouldModelBeUpdated(a)&&(this._updateForModelData(a),this.onModelChange()),this._checkForSyntaxErrors())},_shouldModelBeUpdated:function(a){if(!this.isModelUpToDate())return!1;if(!this._modelData)return!0;var c=JSON.stringify(this._modelData.messages)+JSON.stringify(this._modelData.extendedHelpMessageMap);
a=JSON.stringify(a.messages)+JSON.stringify(a.extendedHelpMessageMap);return c!==a},_updateForModelData:function(a){this._modelData=a;this._model=this._processMessages(a.messages,a.extendedHelpMessageMap)},_processMessages:function(a,c){var d={};this._linePropertiesArray=this._document.getLinePropertiesArray();this._processedMessages=[];for(var e=0;e<a.length;e+=1){var f=a[e],g=this._linePropertiesArray[f.lineNumber];if(!g||!g.readOnly||b.isError(f.severity))f.extendedHelpMessage=c[f.messageTag],
g=this._createNewToken(f),this._processedMessages.push(g),this._appendTokenToMap(d,f.lineNumber,g)}return d},_appendTokenToMap:function(a,c,b){a[c]||(a[c]=[]);a[c].push(b)},_createNewToken:function(a){var c=this._linePropertiesArray[a.lineNumber],c=c&&c.readOnly;return{message:a.message,severity:a.severity,range:{start:{row:a.lineNumber,column:a.startColumn},end:{row:a.lineNumber,column:a.endColumn}},autoFix:{autoFixMessage:c?null:a.autoFixMessage,autoFixChanges:c?null:a.autoFixChanges},extendedHelpMessage:a.extendedHelpMessage}},
_checkForSyntaxErrors:function(){if(this.isModelUpToDate()){var a=this._processedMessages;1>a.length?(this.onDocumentChangeWithNoSyntaxErrors(),this.markClean()):a.some(function(a){return b.isError(a.severity)})||(this.onDocumentChangeWithNoSyntaxErrors(),this.markClean())}},isModelUpToDate:function(){return this._document.getState()===this._lastDocumentState},onDocumentChangeWithNoSyntaxErrors:function(){},onModelChange:function(){},hasMessages:function(){return!!this._model},getMessages:function(a){return this._model[a]||
[]},getAllMessages:function(){return this._processedMessages},destroy:function(){this._handles.forEach(function(a){a.remove()});this.inherited(arguments)}})})},"MW/rtc/abstract/AbstractDocumentSynchronizableMixin":function(){define(["dojo/_base/declare","dojo/aspect","dojo/_base/lang","MW/rtc/abstract/AbstractSynchronizableMixin"],function(g,f,e,d){return g(d,{constructor:function(){},initializeSynchronizable:function(b){this._document=b;this.own(f.after(b,"onChange",e.hitch(this,"markDirty")))}})})},
"MW/rtc/plugins/language/matlab/codeanalyzer/CodeAnalyzerUtils":function(){define([],function(){return{CSSCLASSES:{ERROR:"error_squiggle_rte",WARNING:"warning_squiggle_rte",WARNING_HIGHLIGHT:"warningHighlight"},isError:function(g){return void 0===g||1<g||-99===g},hasHigherSeverity:function(g,f){return g.severity>f.severity?!0:g.severity===f.severity?Boolean(g.autoFix.autoFixMessage&&!f.autoFix.autoFixMessage):!1},generateRangeToMessageMap:function(g){var f={};g.forEach(function(e){var d=JSON.stringify(e.range);
if(!f[d]||this.hasHigherSeverity(e,f[d]))f[d]=e},this);return f}}})},"MW/rtc/plugins/language/matlab/codeanalyzer/preferences/CodeAnalyzerPreferencesProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/language/matlab/codeanalyzer/preferences/CodeAnalyzerPreferences"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.preferences.service"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/language/matlab/codeanalyzer/preferences/CodeAnalyzerPreferences":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/plugins/language/matlab/codeanalyzer/preferences/UnderlineModesEnum MW/rtc/preferences/PreferenceKeysEnum".split(" "),
function(g,f,e,d,b,a){return g(d,{constructor:function(a){this._preferencesService=a;this._displayEnabled=!0;this._underlineMode=b.UNDERLINE_ALL;this._setInitialPreferences();this.own(e.after(this._preferencesService,"onPreferencesChanged",f.hitch(this,"_onPreferencesChanged")))},_onPreferencesChanged:function(){var a=this._getDisplayValueFromPreferences(),b=this.isDisplayEnabled();a!==b&&this._setDisplayEnabled(a);a=this._getUnderliningModeFromPreferences();b=this.getUnderlineMode();a!==b&&this._setUnderlineMode(a)},
_getDisplayValueFromPreferences:function(){return this._preferencesService.getValue(a.CODE_ANALYZER_DISPLAY,!0)},_getUnderliningModeFromPreferences:function(){return this._preferencesService.getValue(a.CODE_ANALYZER_UNDERLINING,b.UNDERLINE_ALL)},isDisplayEnabled:function(){return this._displayEnabled},_setDisplayEnabled:function(a){this._displayEnabled=a;this.onDisplayPreferenceChange(a)},onDisplayPreferenceChange:function(a){},getUnderlineMode:function(){return this._underlineMode},_setUnderlineMode:function(a){this._underlineMode=
a;this.onUnderlineModeChange(this._displayEnabled)},onUnderlineModeChange:function(a){},_setInitialPreferences:function(){this._setDisplayEnabled(this._getDisplayValueFromPreferences());this._setUnderlineMode(this._getUnderliningModeFromPreferences())}})})},"MW/rtc/plugins/language/matlab/codeanalyzer/preferences/UnderlineModesEnum":function(){define([],function(){return{UNDERLINE_NONE:0,UNDERLINE_ERRORS_ONLY:1,UNDERLINE_ALL:2}})},"MW/rtc/plugins/language/matlab/codeanalyzer/tooltip/CodeAnalyzerTooltipProvider":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/language/matlab/codeanalyzer/tooltip/CodeAnalyzerTooltip","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.code.codeanalyzermodel","rtc.code.codeanalyzerautofix","rtc.code.codeanalyzerpreferences","rtc.hyperlinkservice","rtc.focusservice"]}},createInstance:function(d,b,a,c,e){return new f(d,b,a,c,e)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/language/matlab/codeanalyzer/tooltip/CodeAnalyzerTooltip":function(){define("dojo/_base/declare dojo/_base/lang MW/rtc/plugins/tooltip/HoverableTooltipPlugin MW/rtc/plugins/language/matlab/codeanalyzer/CodeAnalyzerUtils MW/rtc/plugins/language/matlab/codeanalyzer/preferences/UnderlineModesEnum MW/rtc/plugins/language/matlab/codeanalyzer/tooltip/CodeAnalyzerTooltipContent".split(" "),
function(g,f,e,d,b,a){return g(e,{constructor:function(a,b,d,e,f){this._codeAnalyzerModel=a;this._codeAnalyzerAutoFix=b;this._hyperlinkService=e;this._focusService=f;this._codeAnalyzerPreferences=d},priority:function(){return 5},_generateToolTipContent:function(c){c={messageInfo:c,callback:f.hitch(this,function(a){this._codeAnalyzerAutoFix.fixLine(a);this.onTooltipClose();this._focusService.setFocus()}),hyperlinkService:this._hyperlinkService};return(new a(c)).tooltipContentNode},onTooltipClose:function(){},
getTooltipContent:function(a,b,e){if(this._codeAnalyzerPreferences.isDisplayEnabled()){var f;if(b&&(a=b.getLineColumn(),b=this._codeAnalyzerModel.getMessages(a.line-1))){b=d.generateRangeToMessageMap(b);for(var g in b)if(b.hasOwnProperty(g)){var p=b[g];if(p.autoFix.autoFixChanges||this._isMessageUnderlined(p))this._isEventPositionWithinMessageRange(a,p)&&(f=this._generateToolTipContent(p))}}e(f)}},_isMessageUnderlined:function(a){var e=this._codeAnalyzerPreferences.getUnderlineMode();return d.isError(a.severity)?
e!==b.UNDERLINE_NONE:e!==b.UNDERLINE_ERRORS_ONLY&&e!==b.UNDERLINE_NONE},_isEventPositionWithinMessageRange:function(a,b){var d=a.column,e=b.range;return e.start.column<=d&&d<=e.end.column+1},destroy:function(){}})})},"MW/rtc/plugins/language/matlab/codeanalyzer/tooltip/CodeAnalyzerTooltipContent":function(){define("dojo/_base/declare dojo/dom dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-style dojo/_base/lang dojo/on dijit/_WidgetBase dijit/_TemplatedMixin dijit/form/Button dojo/text!MW/rtc/plugins/language/matlab/codeanalyzer/tooltip/templates/CodeAnalyzerTooltipContent.html dojo/i18n!l10n/nls/actions mw-utils/Utils require dojo/domReady!".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q){return g([k,l],{templateString:p,constructor:function(a){this._callBack=a.callback;this._codeAnlayzerMessage=a.messageInfo.message;this._autoFixObject=a.messageInfo.autoFix;this._extendedHelpMessage=a.messageInfo.extendedHelpMessage;this._hyperlinkService=a.hyperlinkService;this._widgetId=q.generateUuid()},postCreate:function(){this.tooltipContentNode.innerHTML=this._codeAnlayzerMessage;this.tooltipContentNode.setAttribute("data-testid","codeAnalyzerTooltip");
d.add(this.tooltipContentNode,"codeAnalyzerTooltip");var a=b.create("div",{className:"hoverFix"});this.tooltipContentNode.appendChild(a);null!=this._extendedHelpMessage&&(a=new m({label:n.detailsButtonLabel}),this._extendedHelpButtonDomNode=a.domNode,a.set("data-testid","extendedHelpButton"),e.set(a.domNode,"id","extendedHelpButton_"+this._widgetId),d.add(a.domNode,"tooltipInlineButton extendedHelp"),h(a,"click",c.hitch(this,"_extendedHelpButtonClick")),a.placeAt(this.tooltipContentNode));this._autoFixObject.autoFixMessage&&
(a=new m({label:n.fixButtonLabel}),a.set("data-testid","autoFixButton"),h(a,"click",c.hitch(this,function(){this._callBack(this._autoFixObject.autoFixChanges)})),d.add(a.domNode,"tooltipInlineButton autoFixButton"),a.placeAt(this.tooltipContentNode));this.inherited(arguments);this.tooltipContentNode.addEventListener("onAdjustingOrientation",c.hitch(this,"_handleAdjustingOrientation"));this.tooltipContentNode.addEventListener("onReadyToDisplay",c.hitch(this,"_handleReadyToDisplay"))},_handleAdjustingOrientation:function(){this._extendedHelpButtonDomNode&&
this._expandExtendedHelp(this._extendedHelpButtonDomNode)},_handleReadyToDisplay:function(){this._extendedHelpButtonDomNode&&this._collapseExtendedHelp(this._extendedHelpButtonDomNode)},_extendedHelpButtonClick:function(){d.contains(this._extendedHelpButtonDomNode,"extendedHelpExpanded")?this._collapseExtendedHelp(this._extendedHelpButtonDomNode):this._expandExtendedHelp(this._extendedHelpButtonDomNode)},_expandExtendedHelp:function(c){d.toggle(c,"extendedHelpExpanded",!0);this.tooltipContentNode.appendChild(b.create("hr",
{id:"exthelpdivider"+this._widgetId}));c=b.create("div",{id:"exthelptextnode"+this._widgetId,innerHTML:this._extendedHelpMessage,className:"extendedHelpTextNode","data-testid":"extendedHelpDialog"});a.set(c,"width",this.tooltipContentNode.clientWidth+"px");this.tooltipContentNode.appendChild(c);this._emitResizeEvent()},_collapseExtendedHelp:function(a){d.toggle(a,"extendedHelpExpanded",!1);b.destroy("exthelptextnode"+this._widgetId);b.destroy("exthelpdivider"+this._widgetId);this._emitResizeEvent()},
_emitResizeEvent:function(){h.emit(this.tooltipContentNode,"onResized",{bubbles:!1,cancelable:!0})},getWidgetId:function(){return this._widgetId}})})},"MW/rtc/plugins/language/matlab/codeanalyzer/view/CodeAnalyzerViewProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/language/matlab/codeanalyzer/view/CodeAnalyzerView","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.code.codeanalyzermodel",
"rtc.code.codeanalyzerpreferences","rtc.internaldocument","rtc.view.decoration"]}},createInstance:function(d,b,a,c){return new f(d,b,a,c)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/language/matlab/codeanalyzer/view/CodeAnalyzerView":function(){define("dojo/_base/declare MW/rtc/abstract/AbstractPlugin MW/rtc/model/CodeUtilities MW/rtc/plugins/language/matlab/codeanalyzer/CodeAnalyzerUtils MW/rtc/plugins/language/matlab/codeanalyzer/preferences/UnderlineModesEnum MW/rtc/view/decoration/DecorationUtilities".split(" "),
function(g,f,e,d,b,a){return g(f,{constructor:function(a,b,d,e){this._codeAnalyzerModel=a;this._codeAnalyzerPreferences=b;this._internalDocument=d;this._decorator=e.createDecorator()},updateMarkers:function(){a.decorateAllCodeLines(function(a,b){var d=this._codeAnalyzerModel.getMessages(a);this._updateMarkersOnRange(b,d)}.bind(this),this._decorator,this._internalDocument)},_updateMarkersOnRange:function(a,b){var d=this._getDecorationInfo(b);this._decorator.updateClasses(a,d)},clearAllMarkers:function(){a.decorateAllCodeLines(function(a,
b){this._decorator.clearRange(b)}.bind(this),this._decorator,this._internalDocument)},_getErrorOrWarningClass:function(a){var e=this._codeAnalyzerPreferences.getUnderlineMode();if(d.isError(a)){if(e!==b.UNDERLINE_NONE)return d.CSSCLASSES.ERROR}else if(e!==b.UNDERLINE_ERRORS_ONLY&&e!==b.UNDERLINE_NONE)return d.CSSCLASSES.WARNING},_getDecorationInfo:function(a){var b=[];if(!(a&&0<a.length))return b;a=d.generateRangeToMessageMap(a);for(var e in a)if(a.hasOwnProperty(e)){var f=a[e];b.push({range:this._getRangeFromMessage(f),
classList:this._getClassListFromMessage(f)})}return b},_getClassListFromMessage:function(a){var b=[this._getErrorOrWarningClass(a.severity)];a.autoFix&&a.autoFix.autoFixMessage&&b.push(d.CSSCLASSES.WARNING_HIGHLIGHT);return b},_getRangeFromMessage:function(a){var b=a.range.start;a=a.range.end;return this._internalDocument.getRangeForLineColumn(b.row+1,b.column+1,a.row+1,a.column+1)},_isParentElementValid:function(a){return e.isCodeContainer(a.parent)},destroy:function(){this._tooltip&&this._tooltip.hideTooltip()}})})},
"MW/rtc/plugins/language/matlab/codeanalyzer/CodeAnalyzerPluginProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/plugins/language/matlab/utilities/MatlabPluginUtilities","MW/rtc/plugins/language/matlab/codeanalyzer/CodeAnalyzerPlugin","MW/rtc/core/provider/PluginProvider"],function(g,f,e,d,b){return g(b,{isApplicable:function(a){return e.isMatlabCodeFileOrBuffer(a)},requires:function(){return{isApplicable:["rtc.backingstore"],createInstance:["rtc.document","rtc.internaldocument",
"rtc.code.codeanalyzermodel","rtc.code.codeanalyzerpreferences","rtc.code.codeanalyzerview"]}},createInstance:function(a,c,b,e,f){return new d(a,c,b,e,f)}})})},"MW/rtc/plugins/language/matlab/codeanalyzer/CodeAnalyzerPlugin":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin"],function(g,f,e,d){return g(d,{constructor:function(b,a,c,d,g){this._document=b;this._internalDocument=a;this._codeAnalyzerModel=c;this._codeAnalyzerPreferences=d;this._codeAnalyzerView=
g;this._WAIT_TIME=900;this._modelHasBeenChanged=!1;this.own(e.after(this._document,"onChange",f.hitch(this,"_handleDocumentChange"),!0));this.own(e.after(this._internalDocument,"onDocumentReset",f.hitch(this,"_handleDocumentChange"),!0));this.own(e.after(this._codeAnalyzerModel,"onModelChange",f.hitch(this,"_handleModelChange")));this.own(e.after(this._codeAnalyzerPreferences,"onDisplayPreferenceChange",f.hitch(this,"_onDisplayPreferenceChange"),!0));this.own(e.after(this._codeAnalyzerPreferences,
"onUnderlineModeChange",f.hitch(this,"_onDisplayPreferenceChange"),!0))},_handleDocumentChange:function(){this._timer&&clearTimeout(this._timer);this._timer=setTimeout(f.hitch(this,"_handleTimeout"),this._WAIT_TIME)},_handleTimeout:function(){this._timer=null;this._modelHasBeenChanged&&this._redrawMessages()},_handleModelChange:function(){this._modelHasBeenChanged=!0;this._timer||this._redrawMessages()},_onDisplayPreferenceChange:function(b){b?this._timer||this._redrawMessages():this._codeAnalyzerView.clearAllMarkers()},
_redrawMessages:function(){this._codeAnalyzerModel.hasMessages()&&this._codeAnalyzerModel.isModelUpToDate()&&this._codeAnalyzerPreferences.isDisplayEnabled()&&(this._codeAnalyzerView.updateMarkers(),this._modelHasBeenChanged=!1)}})})},"MW/rtc/plugins/language/matlab/codeanalyzer/CodeAnalyzerAutoFixProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/plugins/language/matlab/utilities/MatlabPluginUtilities","MW/rtc/plugins/language/matlab/codeanalyzer/CodeAnalyzerAutoFix","MW/rtc/core/provider/PluginProvider"],
function(g,f,e,d,b){return g(b,{isApplicable:function(a){return e.isMatlabCodeFileOrBuffer(a)},requires:function(){return{isApplicable:["rtc.backingstore"],createInstance:["rtc.document","rtc.cursor","rtc.eventhandler","rtc.actionservice","rtc.code.codeanalyzermodel"]}},createInstance:function(a,c,b,e,f){return new d(a,c,b,e,f)}})})},"MW/rtc/plugins/language/matlab/codeanalyzer/CodeAnalyzerAutoFix":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect"],function(g,f,e){return g(null,
{constructor:function(d,b,a,c,h){this._document=d;this._cursor=b;this._codeAnalyzerModel=h;this._actionService=c;this._evtListener=e.after(a,"onMouseDown",f.hitch(this,"_updateContextMenuLabel"));this._addActions()},destroy:function(){this._evtListener.remove()},_findAndExecuteAutoFix:function(){var d=this._cursor.getLineColumn(),b=d.line-1,d=d.column-1,a=this._codeAnalyzerModel.getMessages(b);if(a)for(var c=0;c<a.length;c+=1){var e=a[c];if(this._isWithinRangeOfAutoFix(e,b,d))return this.fixLine(e.autoFix.autoFixChanges),
!0}},_addActions:function(){var d=[{id:"rtc_autofix",enabled:!0,contextMenuGroup:"Autofix",text:"",callback:f.hitch(this,"_findAndExecuteAutoFix")}];this._actionService.loadActions(d)},_updateContextMenuLabel:function(){var d="",b=this._cursor.getLineColumn(),a=b.column-1;if(b=this._codeAnalyzerModel.getMessages(b.line-1))for(var c=0;c<b.length;c+=1){var e=b[c],f=e.range.end.column;a>=e.range.start.column&&a<=f&&e.autoFix.autoFixMessage&&(d=e.autoFix.autoFixMessage,d=d.bold())}this._actionService.updateAction("rtc_autofix",
{text:d})},_isWithinRangeOfAutoFix:function(d,b,a){var c=d.range.start.row,e=d.range;return d.autoFix.autoFixChanges&&c===b&&e.start.column<=a&&e.end.column>=a},fixLine:function(d){this._document.startEdit();d.forEach(function(b){this._replace(b)},this);this._document.endEdit()},_replace:function(d){this._isEndOfLineAddition(d)?this._document.insertText(d.fText,d.fStartLine,d.fStartColumn+1):this._isEndOfLineDeletion(d)?this._document.replaceText(d.fText,d.fStartLine,d.fStartColumn,d.fEndLine+1,1):
this._document.replaceText(d.fText,d.fStartLine,d.fStartColumn,d.fEndLine,d.fEndColumn+1)},_isEndOfLineAddition:function(d){return d.fStartColumn>d.fEndColumn&&d.fStartLine===d.fEndLine||d.fStartLine>d.fEndLine},_isEndOfLineDeletion:function(d){var b=this._document.getLineText(d.fEndLine);return d.fEndColumn===b.length+1},isAutoFixAvailable:function(){return!this._document.isReadOnly()}})})},"MW/rtc/plugins/language/matlab/codeanalyzer/messagebar/AlertMessageLayerProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./AlertMessageLayer"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.alert.model","rtc.internaldocument"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/language/matlab/codeanalyzer/messagebar/AlertMessageLayer":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/plugins/language/matlab/alert/AlertTypeEnum","MW/rtc/plugins/messagebar/MessageBarLayer"],
function(g,f,e,d,b){return g(b,{_ALERT_LAYER:"alertLayer",_ERROR:"errorMarker",_WARNING:"warningMarker",constructor:function(a,c){this._alertModel=a;this._internalDocument=c;this.own(e.after(this._alertModel,"onModelChanged",f.hitch(this,"_updateMessages")));this.own(e.after(this._internalDocument,"onDocumentChanged",f.hitch(this,"_updateMessages")))},getLayerName:function(){return this._ALERT_LAYER},_updateMessages:function(){this.clearLayer(this._ALERT_LAYER);this._alertModel.getAlerts().forEach(function(a){if(a.position.isValid()){var c=
a.position.getLineColumn(),b=c.line,c=c.column;a.type===d.ERROR?this.addMessage(this._ALERT_LAYER,this._ERROR,null,!0,b,c):this.addMessage(this._ALERT_LAYER,this._WARNING,null,!1,b,c)}},this);this.updateLayer(this._ALERT_LAYER)}})})},"MW/rtc/plugins/messagebar/MessageBarLayer":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin"],function(g,f){return g(f,{getLayerName:function(){throw Error("Unimplemented API: MW.rtc.plugins.messagebar.MessageBarLayer.getLayerName");},addMessage:function(e,
d,b,a,c,f){},clearLayer:function(e){},updateLayer:function(){},onTooltipClose:function(){}})})},"MW/rtc/plugins/language/matlab/codeanalyzer/messagebar/CodeAnalyzerMessageLayerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./CodeAnalyzerMessageLayer"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:"rtc.document rtc.code.codeanalyzermodel rtc.code.codeanalyzerautofix rtc.code.codeanalyzerpreferences rtc.hyperlinkservice rtc.focusservice".split(" ")}},
createInstance:function(d,b,a,c,f,g){return new e(d,b,a,c,f,g)}})})},"MW/rtc/plugins/language/matlab/codeanalyzer/messagebar/CodeAnalyzerMessageLayer":function(){define("dojo/_base/declare dojo/_base/lang dijit/registry dojo/aspect dojo/query MW/rtc/plugins/language/matlab/codeanalyzer/tooltip/CodeAnalyzerTooltipContent MW/rtc/plugins/messagebar/MessageBarLayer".split(" "),function(g,f,e,d,b,a,c){return g(c,{_CODE_ANALYZER_LAYER:"codeAnalyzerLayer",_ERROR:"errorMarker",_WARNING:"warningMarker",_TIMER_LENGTH:900,
constructor:function(a,c,b,e,g,n){this._codeAnalyzerModel=c;this._codeAnalyzerAutoFix=b;this._codeAnalyzerPreferences=e;this._hyperlinkService=g;this._focusService=n;this._timer=null;this._layerIsUpdating=!1;this.own(d.after(this._codeAnalyzerPreferences,"onDisplayPreferenceChange",f.hitch(this,"_handlePreferenceChange"),!0));this.own(d.after(this._codeAnalyzerModel,"onModelChange",f.hitch(this,"_updateMessages")));this.own(d.after(a,"onChange",f.hitch(this,"_handleDocumentChange")))},getLayerName:function(){return this._CODE_ANALYZER_LAYER},
_handleDocumentChange:function(){this.onTooltipClose()},_updateMessages:function(){this._codeAnalyzerPreferences.isDisplayEnabled()&&(this._resetTimeout(),this._layerIsUpdating=!0,this._timer=setTimeout(f.hitch(this,function(){this.clearLayer(this._CODE_ANALYZER_LAYER);this._codeAnalyzerModel.getAllMessages().forEach(function(c){var b=c.range.start.row+1,d=c.range.start.column+1,e={messageInfo:c,hyperlinkService:this._hyperlinkService,callback:f.hitch(this,function(a){this._codeAnalyzerAutoFix.fixLine(a);
this.onTooltipClose();this._focusService.setFocus()})},g=f.hitch(this,function(){var c=new a(e);this._updateAutofixButtonState(c);return c});2<=c.severity?this.addMessage(this._CODE_ANALYZER_LAYER,this._ERROR,g,!0,b,d):this.addMessage(this._CODE_ANALYZER_LAYER,this._WARNING,g,!1,b,d)},this);this._layerIsUpdating=!1;this.updateLayer(this._CODE_ANALYZER_LAYER)}),this._TIMER_LENGTH))},_handlePreferenceChange:function(a){this._resetTimeout();a?this._updateMessages():this.clearLayer(this._CODE_ANALYZER_LAYER)},
_resetTimeout:function(){this._timer&&clearTimeout(this._timer)},_updateAutofixButtonState:function(a){(a=e.getEnclosingWidget(b(".tooltipInlineButton.autoFixButton",a.domNode)[0]))&&a.set("disabled",!this._codeAnalyzerModel.isModelUpToDate()||this._layerIsUpdating)},destroy:function(){this.inherited(arguments);this._resetTimeout()}})})},"MW/rtc/plugins/language/matlab/codingui/CodingUIActionHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./CodingUIActionHandler"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.document rtc.actionservice rtc.code.codingui.view rtc.code.codingui.eventbus rtc.code.codingui.contextmanager rtc.code.codingui.requesthandler rtc.embeddedoutputs.statehandler rtc.view rtc.focusservice rtc.helpservice rtc.cursorcontroller rtc.code.codingui.tabhandler".split(" ")}},createInstance:function(d,b,a,c,f,g,l,m,p,n,q,r){return new e(d,b,a,c,f,g,l,m,p,n,q,r)}})})},"MW/rtc/plugins/language/matlab/codingui/CodingUIActionHandler":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/keys MW/rtc/abstract/AbstractPlugin MW/rtc/model/CodeUtilities ./CodingUIActivities ./CodingUIContextEvents ./utilities/CodingUIActionHandlerUtilities ./utilities/CodingUIWidgetUtilities".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return g(b,{constructor:function(a,c,b,h,g,k,l,u,v,w,x,y){this._document=a;this._uiView=b;this._contextManager=g;this._requestHandler=k;this._stateHandler=l;this._rtcView=u;this._helpService=w;this._cursorController=x;this._cursor=x.getCursors()[0];this._tabHandler=y;this._actions=[{id:"codingui_tab",enabled:!0,key:"tab",callback:f.hitch(this,"_complete",{keyCode:d.TAB})},{id:"codingui_escape",enabled:!0,key:"escape",callback:f.hitch(this,"_escape",{keyCode:d.ESCAPE})},
{id:"codingui_enter",enabled:!0,key:"enter",callback:f.hitch(this,"_select")},{id:"codingui_up",enabled:!0,key:"up",callback:f.hitch(this,"_navigate",{keyCode:d.UP_ARROW})},{id:"codingui_down",enabled:!0,key:"down",callback:f.hitch(this,"_navigate",{keyCode:d.DOWN_ARROW})},{id:"codingui_open_signature_dropdown",enabled:!0,key:"ctrl_down",platformKey:{mac:"meta_down"},callback:f.hitch(this,"_navigate",{keyCode:d.DOWN_ARROW,ctrlKey:!0,metaKey:!0})},{id:"codingui_right",enabled:!0,key:"right",callback:f.hitch(this,
"_rightNavigate",{keyCode:d.RIGHT_ARROW})},{id:"rtc_codingui_move_left_arg",enabled:!0,key:"ctrl_left",platformKey:{mac:"meta_left"},callback:f.hitch(this,"_navigate",{keyCode:d.LEFT_ARROW,ctrlKey:!0,metaKey:!0})},{id:"rtc_codingui_move_right_arg",enabled:!0,key:"ctrl_right",platformKey:{mac:"meta_right"},callback:f.hitch(this,"_navigate",{keyCode:d.RIGHT_ARROW,ctrlKey:!0,metaKey:!0})},{id:"codingui_pageup",enabled:!0,key:"pageup",callback:f.hitch(this,"_navigate",{keyCode:d.PAGE_UP})},{id:"codingui_pagedown",
enabled:!0,key:"pagedown",callback:f.hitch(this,"_navigate",{keyCode:d.PAGE_DOWN})},{id:"codingui_show_widget",enabled:!0,key:"ctrl_f1",platformKey:{mac:"ctrl_f1"},callback:f.hitch(this,"_handleCtrlF1",{keyCode:d.F1,ctrlKey:!0,metaKey:!0})},{id:"codingui_home",enabled:!0,key:"home",callback:f.hitch(this,"_navigate",{keyCode:d.HOME})},{id:"codingui_end",enabled:!0,key:"end",callback:f.hitch(this,"_navigate",{keyCode:d.END})}];c.loadActions(this._actions);this.own(e.after(h,"onCompleteText",f.hitch(this,
"completeText"),!0));this.own(e.after(h,"onSelectBounds",f.hitch(this,"_selectBoundsRequest"),!0));this.own(e.after(h,"onRequestHelp",f.hitch(this,"_requestHelp")));this.own(e.after(l,"stateChanged",f.hitch(this,"_stateChangeListener"),!0));this.own(e.after(v,"onBlur",f.hitch(this,"_handleBlur")));this.own(e.after(v,"onFocus",f.hitch(this,"_handleFocus")));this.own(e.after(g,"onContextUpdated",f.hitch(this,"_handleOnContextUpdated"),!0));this._isRightArrowQueued=this._isTabQueued=!1;this._inFocus=
!0},_handleOnContextUpdated:function(a){if(a===h.CONTEXT_RESET||a===h.CONTEXT_SWITCHED)this._fulfilQueuedAction(),this._isRightArrowQueued=this._isTabQueued=!1},_fulfilQueuedAction:function(){this._isTabQueued?this._complete({keyCode:d.TAB})||this._doDefaultTab():this._isRightArrowQueued&&(this._rightNavigate({keyCode:d.RIGHT_ARROW})||this._cursor.movePosition(this._cursor.WORD_RIGHT))},_doDefaultTab:function(){this._tabHandler.doDefaultTab()},_stateChangeListener:function(a){switch(a){case this._stateHandler.CHANGE_TYPE_ENUM.EVAL_INITIALIZED:this._closeView()}},
completeText:function(a,b){if(!this._requestHandler.hasPendingRequest()){var d=this._contextManager.getContext();if(d&&!this._contextManager.isContextCompleted()){this._contextManager.setContextToCompleted();var e=d.currentBounds,f=d.position.getLineColumn().line,h=!1,g=d.metaData,l="",v=g.getPresentingSignature();v&&(l=k.additionalCharToInsert(b,v.callingSyntax));e=this._getReplacementBounds(e,f);l&&(v=this._document.getLineText(f).substr(e.right-1),/^\s*,/.test(v)||(a+=l,h=!0));e=k.updateBoundsForFolderAndMessageId(g,
e,a);this._document.replaceText(a,f,e.left,f,e.right);!h&&(!g.isFileOrFolderName()&&!g.isMessageId())&&(d.widget.set("showWidgets",!1),this._requestHandler.request(c.COMPLETE))}}},_getReplacementBounds:function(a,c){var b={left:a.left,right:a.right};if(this._cursor.hasSelection()){var d=this._cursor.getSelectionLineColumn();if(d.start.line!==d.end.line)return b;var e=d.start.column,d=d.end.column;e<d?(b.left=e,b.right=d):(b.left=d,b.right=e);e=this._document.getTextCharacters(c-1,b.right-1,1);if("'"===
e||'"'===e)b.left--,b.right++}return b},_selectBoundsRequest:function(a){var b=this._contextManager.getContext();b&&(this._selectBounds(a,b),this._requestHandler.request(c.ACTIVE_REQUEST,{line:a.endLine,column:a.right}))},_selectBounds:function(a,c){var b=c.position.getLineColumn().column,d=a.left,e=a.right,f=a.startLine,h=a.endLine,g={start:{line:f,column:d},end:{line:h,column:e}},k=this._cursor.hasSelection()&&this._cursor.getSelectionLineColumn();if((!k||!(JSON.stringify(k)===JSON.stringify(g)||
a.startLine===k.start.line&&(a.left===k.start.column||a.left===k.end.column)))&&!(d===b&&d===e))this._rtcView.scrollLineColumnIntoView(f,d),this._cursor.setSelectionLineColumn(f,d,h,e)},_requestHelp:function(){var a=this._contextManager.getContext();if(a){var c=a.widget.domNode.getBoundingClientRect();if(a=a.metaData.getFunctionName()){var b=this._rtcView.getCoordinateForPosition(this._cursor.position),c={currentLineCode:this._cursor.getNode().rootContainer().getText(),caretX:c.left+c.width+100,caretY:c.top,
lineHeight:b.height,endCaretPosition:this._cursor.getPosition().column};this._helpService.showInHelpBrowser(a,c)}}},_select:function(){if(!this._uiView.isTopViewDisplayed()||!this._contextManager.getContext())return!1;var a=this._navigate({keyCode:d.ENTER});a||this._closeView();return a},_complete:function(c){if(this._cursorController.hasMultipleCursors())return!1;if(this._requestHandler.hasPendingRequest()&&a.isCodeContainer(this._cursor.position.getNode()))return c.keyCode===d.TAB?this._isTabQueued=
!0:c.keyCode===d.RIGHT_ARROW&&(this._isRightArrowQueued=!0),!0;c=this._contextManager.getContext();if(!c)return!1;if(this._tabKeyHandled(c))return!0;this._contextManager.setContextTabMode(!1);return this._uiView.sendEventToTopView({keyCode:d.TAB})},_tabKeyHandled:function(a){var c=a.widget,b=l.getSelectedCompletion(c),c=l.getNumberOfChoices(c),d=this._uiView.isTopViewDisplayed(),e=b===a.code;a=this._cursor.getLineColumn().column===a.currentBounds.right;var f=!1;d&&e?(this._closeView(),f=!0):!d&&(!e&&
a&&1===c)&&(this.completeText(b),f=!0);return f},_escape:function(a){this._requestHandler.stopPendingRequest();a=this._navigate(a);return!a?(this._contextManager.setContextTabMode(!0),this._closeView()):a},_navigate:function(a){if(!this._contextManager.getContext())return!1;var c=!1;this._uiView.isTopViewDisplayed()&&(c=this._uiView.sendEventToTopView(a));return c},_rightNavigate:function(a){return this._uiView.isShadowTextViewDisplayed()&&this._uiView.isTopViewDisplayed()?(this._complete(a),!0):
!1},_handleBlur:function(){this._inFocus=!1;this._closeView();this._contextManager.reset()},_handleFocus:function(){this._inFocus||(this._inFocus=!0,this._requestHandler.request(c.SILENT_UPDATE))},_handleCtrlF1:function(a){if(this._cursorController.hasMultipleCursors())return!1;var c=this._contextManager.getContext();return!c||!c.metaData.hasSignatures()?!1:this._uiView.sendEventToTopView(a)},_closeView:function(){return this._uiView.close()}})})},"MW/rtc/plugins/language/matlab/codingui/CodingUIActivities":function(){define([],
function(){return{SILENT_UPDATE:1,CURSOR_SELECTION:2,INSERT_DELETE_TEXT:3,ACTIVE_REQUEST:4,COMPLETE:5}})},"MW/rtc/plugins/language/matlab/codingui/CodingUIContextEvents":function(){define([],function(){return{CONTEXT_SWITCHED:1,CONTEXT_RESET:2,LEAVING_RANGE:3,SILENT_RESET:4}})},"MW/rtc/plugins/language/matlab/codingui/utilities/CodingUIActionHandlerUtilities":function(){define([],function(){return{_NAMEVALUE_PAIR_SEPERATOR:",",_NAMEVALUE_PAIR_SEPERATOR_COMMAND_SYNTAX:" ",_METADATA_CALLING_SYNTAX_COMMAND:"command",
_METADATA_ARGUMENT_KIND_NAME:"name",updateBoundsForFolderAndMessageId:function(g,f,e){g=g.getFunctionPresentingArgument();if(!g)return f;var d=g.value,b=d.length;if(d&&1>=b)return f;d=d.charAt(b-1);if(!("'"===d||'"'===d))return f;e=this._getMatchingChoice(g,e);return!e?f:this._getBoundsForMatchingChoice(e,f)},_getMatchingChoice:function(g,f){if(!g.widgetData)return null;var e=g.widgetData.choices;if(!e)return null;for(var d=0;d<e.length;d++){var b=e[d];if(b.completion===f)return b}return null},_getBoundsForMatchingChoice:function(g,
f){var e=g.matchType;if("folder"!==e&&"messageId"!==e)return f;var d=g.completion,b=d.length;if(1>=b)return f;e=d.charAt(0);d=d.charAt(b-1);("'"===e&&"'"!==d||'"'===e&&'"'!==d)&&f.right--;return f},additionalCharToInsert:function(g,f){return g&&g.mwEventData.kind===this._METADATA_ARGUMENT_KIND_NAME?f===this._METADATA_CALLING_SYNTAX_COMMAND?this._NAMEVALUE_PAIR_SEPERATOR_COMMAND_SYNTAX:this._NAMEVALUE_PAIR_SEPERATOR:""}}})},"MW/rtc/plugins/language/matlab/codingui/utilities/CodingUIWidgetUtilities":function(){define(["dojo/_base/lang",
"MW/rtc/plugins/language/matlab/codingui/programmingaids/WidgetTypes","MW/rtc/plugins/language/matlab/codingui/programmingaids/manifest"],function(g,f,e){return{isSuggestionWidget:function(d){d=d.widgetType;return d===f.COMPLETION||d===f.FILE_NAME},isFunctionAssistantWidget:function(d){return(d=d.signatures)&&0<d.length},getNumberOfChoices:function(d){return!d?0:d.get("numberOfChoices")},getSelectedCompletion:function(d){if(!d)return null;var b=d.get("value");return b?b:d.get("valueOfFirstChoice")},
getCompletionChoices:function(d){return!d?[]:d.get("choices")},createWidget:function(d){var b=d.getData(),a=null,c=b.signatures,h=b.shared;if(c&&0<c.length)h=!d.isCallingSyntaxObjectOrCell(),a=new e[f.FUNCTION_ASSISTANT]({data:b}),a.set("showHelp",h);else if(d=null,h?d=h:b.widgetType&&(d=b),d&&e[d.widgetType]&&(b=e[d.widgetType]))a=g.mixin({},d.widgetData),a=new b(a);return a}}})},"MW/rtc/plugins/language/matlab/codingui/programmingaids/WidgetTypes":function(){define({FUNCTION_ASSISTANT:"functionAssistant",
COMPLETION:"completion",FILE_NAME:"filename",FOLDER_NAME:"foldername",SCALAR:"scalar"})},"MW/rtc/plugins/language/matlab/codingui/programmingaids/manifest":function(){define(["dojo/_base/lang","MW/rtc/plugins/language/matlab/codingui/programmingaids/atomicManifest","MW/rtc/plugins/language/matlab/codingui/programmingaids/widgets/FunctionAssistant","MW/rtc/plugins/language/matlab/codingui/programmingaids/WidgetTypes"],function(g,f,e,d){var b={};b[d.FUNCTION_ASSISTANT]=e;g.mixin(b,f);return b})},"MW/rtc/plugins/language/matlab/codingui/programmingaids/atomicManifest":function(){define(["MW/rtc/plugins/language/matlab/codingui/widgets/Completion",
"MW/rtc/plugins/language/matlab/codingui/programmingaids/WidgetTypes"],function(g,f){var e={};e[f.FILE_NAME]=g;e[f.FOLDER_NAME]=g;e[f.COMPLETION]=g;e[f.SCALAR]=g;return e})},"MW/rtc/plugins/language/matlab/codingui/widgets/Completion":function(){define("dojo/_base/declare dojo/_base/lang dojo/keys dojo/on dijit/_WidgetBase MW/rtc/plugins/language/matlab/codingui/widgets/WidgetsUtility".split(" "),function(g,f,e,d,b,a){function c(a,c){var b=null,d=a.parentNode.children,e=d.length,f=null,h;for(h=0;h<
e;h+=1)if(d[h]===a){f=h;break}null!==f&&(b=0<c?d[Math.min(e-1,f+c)]:d[Math.max(0,f+c)]);return b}var h=["mwCompletion__choiceContainer__choice--hover","mwCompletion__choiceContainer__choice--selected","mwCompletion__choiceContainer__choice--default"];g=g(b,{baseClass:"mwCompletion",presenting:!1,attachedAt:"none",value:"",constructor:function(){this.choices=[];this._choiceClass="mwCompletion__choiceContainer__choice--hover"},buildRendering:function(){this.inherited(arguments);this.completionContainer=
a.buildNode("div",{className:"choiceContainer",parent:this.domNode},"mwCompletion")},postCreate:function(){this.inherited(arguments);this.domNode.setAttribute("data-focus","refuse");this.on("mousemove",f.hitch(this,this._handleMouseMove));this.own(d(this.completionContainer,"scroll",f.hitch(this,this._handleScroll)));this.on("click",f.hitch(this,this._handleClick));this._displayInactiveFirstChoice()},_handleMouseMove:function(a){var c,b=a.target;if((this._previousPageX!==a.pageX||this._previousPageY!==
a.pageY)&&!b.classList.contains("mwCompletion")&&!b.classList.contains("mwCompletion__choiceContainer"))c=b.classList.contains("mwCompletion__choiceContainer__choice")?b:b.parentNode,c.classList.contains("mwCompletion__choiceContainer__choice--hover")||(c=c.getAttribute("data-completion"),this._choiceClass="mwCompletion__choiceContainer__choice--hover",this.set("value",c)),this._hideExistingTooltip(),(b.classList.contains("mwCompletion__choiceContainer__choice__purpose")||b.classList.contains("mwCompletion__choiceContainer__choice__text"))&&
this._createTooltip(b);this._previousPageX=a.pageX;this._previousPageY=a.pageY},_hideExistingTooltip:function(){var a=this.domNode.querySelector(".mwCompletion__choiceContainer__choice__purpose--showTooltip");a&&a.classList.remove("mwCompletion__choiceContainer__choice__purpose--showTooltip");(a=this.domNode.querySelector(".mwCompletion__choiceContainer__choice__text--showTooltip"))&&a.classList.remove("mwCompletion__choiceContainer__choice__text--showTooltip")},_createTooltip:function(c){if(c.offsetWidth<
c.scrollWidth){var b,d;b=c.classList.contains("mwCompletion__choiceContainer__choice__purpose")?"mwCompletion__choiceContainer__choice__purpose":"mwCompletion__choiceContainer__choice__text";d=c.classList.contains("mwCompletion__choiceContainer__choice__purpose")?"purposeTooltip":"choiceTooltip";c.classList.add(b+"--showTooltip");0===c.children.length?(b=c.textContent,c=a.buildNode("span",{className:d,text:b,parent:c},"mwCompletion")):c=c.children[0];d=this.domNode.querySelector(".mwCompletion__choiceContainer__choice--hover");
b=this.completionContainer.getBoundingClientRect().top;d=d.getBoundingClientRect().top-b;c.style.top=d+"px"}},_displayInactiveFirstChoice:function(){var a=this._getFirstChoiceNode();a&&a.classList.add("mwCompletion__choiceContainer__choice--default")},_handleScroll:function(){this._hideExistingTooltip()},_handleClick:function(){this._triggerChangeEvent(this.get("value"),this.get("value"))},_triggerChangeEvent:function(a,c){this.emit("change",{mwEventData:{propertyName:"value",oldValue:a,newValue:c}})},
_triggerSelectEvent:function(a,c){this.emit("select",{mwEventData:{propertyName:"value",oldValue:a,newValue:c}})},_removeChoiceClasses:function(a){h.forEach(function(c){a.classList.remove(c)})},_setValueAttr:function(a){if(void 0===a)throw Error("Invalid Value. Value can only be a string");var c=this._getChoiceNode(this.get("value")),b=this._getFirstChoiceNode(),d=c?c:b,b="";c&&(b=c.getAttribute("data-completion"));this._removeChoiceClasses(d);if(""===a)this._triggerSelectEvent(b,""),this._displayInactiveFirstChoice();
else if(c=this._getChoiceNode(a)){c.classList.add(this._choiceClass);d=c.getAttribute("data-completion");this._triggerSelectEvent(b,d);var b=this.completionContainer,c=c.getBoundingClientRect(),d=b.getBoundingClientRect(),e=c.bottom>d.bottom;c.top<d.top?b.scrollTop-=d.top-c.top+1:e&&(b.scrollTop+=c.bottom-d.bottom+1)}this._set("value",a)},_setPresentingAttr:function(a){a?this.domNode.classList.add("mwCompletion--presenting"):this.domNode.classList.remove("mwCompletion--presenting");this._set("presenting",
a)},_setAttachedAtAttr:function(a){-1!==["none","top","bottom"].indexOf(a)&&(this.domNode.classList.remove("mwCompletion--top"),this.domNode.classList.remove("mwCompletion--bottom"),"top"===a?this.domNode.classList.add("mwCompletion--top"):"bottom"===a&&this.domNode.classList.add("mwCompletion--bottom"),this._set("attachedAt",a))},_setNumberOfChoicesAttr:function(){throw Error("numberOfChoices is a read-only property!");},_getNumberOfChoicesAttr:function(){return this.domNode.querySelectorAll(".mwCompletion__choiceContainer__choice").length},
_setValueOfFirstChoiceAttr:function(){throw Error("valueOfFirstChoice is a read-only property!");},_getValueOfFirstChoiceAttr:function(){var a=this._getFirstChoiceNode(),c=null;a&&(c=a.getAttribute("data-completion"));return c},_setAlignmentXOffsetAttr:function(){throw Error("alignmentXOffset is a read-only property!");},_getAlignmentXOffsetAttr:function(){var a=this._getFirstChoiceNode(),c=0;if(a&&(a=a.querySelector(".mwCompletion__choiceContainer__choice__text")))c=a.getBoundingClientRect().left,
a=this.domNode.getBoundingClientRect().left,c-=a;return c},_setChoicesAttr:function(c){for(;this._getFirstChoiceNode();)this.completionContainer.removeChild(this._getFirstChoiceNode());var b=!0;c.forEach(function(c){var d=a.buildNode("div",{className:"choice",parent:this.completionContainer},"mwCompletion");this.renderItem(d,c)||(b=!1);d.setAttribute("data-completion",c.completion)},this);b?this.domNode.classList.add("mwCompletion--hideIcons"):this.domNode.classList.remove("mwCompletion--hideIcons");
this.domNode.style.display=0===c.length?"none":null;this._set("choices",c)},renderItem:function(c,b){var d=!0;b.matchType&&"unknown"!==b.matchType&&("mFile"===b.matchType?b.matchType="function":"pathItem"===b.matchType&&(b.matchType="filename"),d=!1);b.separated&&c.classList.add("mwCompletion__choiceContainer__choice--separated");a.buildNode("div",{className:"icon",parent:c},"mwCompletion").classList.add("mwCompletion__icon--"+b.matchType);var e=b.hasOwnProperty("displayString")?b.displayString:b.completion;
a.buildNode("div",{className:"text",text:e,parent:c},"mwCompletion");a.buildNode("div",{className:"purpose",text:b.purpose,parent:c},"mwCompletion");return d},navigate:function(a){var b=this._getChoiceNode(this.get("value")),d=this._getFirstChoiceNode(),f,h=!1;switch(a.keyCode){case e.DOWN_ARROW:if(b){var g;b.nextSibling&&(g=b.nextSibling);f=g}else f=d;h=!0;break;case e.UP_ARROW:if(b){var r;b.previousSibling&&(r=b.previousSibling);f=r;h=!0}break;case e.HOME:f=b?d:f;break;case e.END:f=b?this.completionContainer.lastChild:
f;break;case e.PAGE_DOWN:f=b?c(b,7):f;break;case e.PAGE_UP:f=b?c(b,-7):f;break;case e.TAB:h=b?b:d;this._triggerChangeEvent(this.get("value"),h.getAttribute("data-completion"));h=!0;break;case e.ENTER:b&&(this._triggerChangeEvent(this.get("value"),this.get("value")),h=!0)}void 0!==f&&(f=f.getAttribute("data-completion"),h=!0,this._choiceClass="mwCompletion__choiceContainer__choice--selected",this.set("value",f),this._choiceClass="mwCompletion__choiceContainer__choice--hover");return h},_getChoiceNode:function(a){for(var c=
null,b=this.completionContainer.children.length,d=0;d<b;d++)if(this.completionContainer.children[d].getAttribute("data-completion")===a){c=this.completionContainer.children[d];break}return c},_getFirstChoiceNode:function(){return this.completionContainer.firstChild},startup:function(){this.inherited(arguments)}});g.BASE_CLASS="mwCompletion";g.CHOICE_CLASS="mwCompletion__choiceContainer__choice";g.SELECTED_CHOICE_CLASS="mwCompletion__choiceContainer__choice--selected";g.HOVER_SELECTED_CHOICE_CLASS=
"mwCompletion__choiceContainer__choice--hover";g.DEFAULT_CHOICE_CLASS="mwCompletion__choiceContainer__choice--default";g.CHOICE_TEXT_CLASS="mwCompletion__choiceContainer__choice__text";g.CHOICE_TOOLTIP_CLASS="mwCompletion__choiceContainer__choice__text__choiceTooltip";g.PURPOSE_CLASS="mwCompletion__choiceContainer__choice__purpose";g.PURPOSE_TOOLTIP_CLASS="mwCompletion__choiceContainer__choice__purpose__purposeTooltip";g.SEPARATED_CHOICE_CLASS="mwCompletion__choiceContainer__choice--separated";g.HIDE_ICON_CLASS=
"mwCompletion--hideIcons";g.PRESENTING_CLASS="mwCompletion--presenting";g.BOTTOM_ATTACHED_CLASS="mwCompletion--bottom";g.TOP_ATTACHED_CLASS="mwCompletion--top";return g})},"MW/rtc/plugins/language/matlab/codingui/widgets/WidgetsUtility":function(){define([],function(){return{buildNode:function(g,f,e){f=f||{};var d=document.createElement(g),b="";f.parent&&!f.useOwnClass?b=f.parent.classList[0]:f.useOwnClass||(b=e);f.className&&(""===b?d.classList.add(f.className):d.classList.add(b+"__"+f.className));
f.classModifiers&&f.classModifiers.forEach(function(a){""===b?d.classList.add(f.className+"--"+a):d.classList.add(b+"__"+f.className+"--"+a)},this);f.text&&(d.textContent=f.text);f.parent&&f.parent.appendChild(d);f.title&&d.setAttribute("title",f.title);return d}}})},"MW/rtc/plugins/language/matlab/codingui/programmingaids/widgets/FunctionAssistant":function(){define("dojo/_base/declare dojo/_base/lang dojo/has dojo/keys dojo/on dojo/string dijit/registry dijit/_WidgetBase MW/rtc/plugins/language/matlab/codingui/programmingaids/atomicManifest MW/rtc/plugins/language/matlab/codingui/programmingaids/WidgetTypes MW/rtc/plugins/language/matlab/codingui/widgets/WidgetsUtility dojo/i18n!l10n/nls/tabcompletion".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p){g=g(h,{baseClass:"mwFunctionAssistant",showWidgets:!0,showSignatures:!1,position:"bottom",showHelp:!0,constructor:function(){this.data={signatures:[]}},buildRendering:function(){this.inherited(arguments);this.domNode.setAttribute("data-focus","refuse");this._createChildDomNodes()},_setShowSignaturesAttr:function(a){if(a){if(1<this._signatureCompletion.get("numberOfChoices")){this._previousSignature=this._currentSignature;this.domNode.classList.add("mwFunctionAssistant--showSignatures");
var c=this._indexOfSignature(this._currentSignature);-1<c&&this._signatureCompletion.set("value",c+"");this.emit("size-change",{});this._set("showSignatures",a)}}else this.domNode.classList.remove("mwFunctionAssistant--showSignatures"),this.emit("size-change",{}),this._set("showSignatures",a)},_setPositionAttr:function(a){this.domNode.classList.remove(this.baseClass+"--"+this.position);this.domNode.classList.add(this.baseClass+"--"+a);this.position!==a&&this._set("position",a)},_setShowWidgetsAttr:function(a){a?
this.domNode.classList.remove("mwFunctionAssistant--widgetsHidden"):this.domNode.classList.add("mwFunctionAssistant--widgetsHidden");this._set("showWidgets",a)},_setValueAttr:function(){throw Error("value is a read-only property!");},_getValueAttr:function(){var a="",b=this._signatureContainer.querySelector(".mwCompletion__choiceContainer__choice--selected"),d=this._signatureContainer.querySelector(".mwCompletion__choiceContainer__choice--hover");(b=b?b:d)&&(a=c.getEnclosingWidget(b).get("value"));
return a},_setNumberOfChoicesAttr:function(){throw Error("numberOfChoices is a read-only property!");},_getNumberOfChoicesAttr:function(){var a=0,c=this._signatureContainer.querySelector(".mwFunctionAssistant__signatureContainer__argumentContainer__argument--current");c&&(a=c.querySelectorAll(".mwCompletion__choiceContainer__choice").length);return a},_setAlignmentXOffsetAttr:function(){throw Error("alignmentXOffset is a read-only property!");},_getAlignmentXOffsetAttr:function(){var a=this._argumentContainer.getBoundingClientRect().left,
c=this.domNode.getBoundingClientRect().left;return a-c},_setValueOfFirstChoiceAttr:function(){throw Error("valueOfFirstChoice is a read-only property!");},_getValueOfFirstChoiceAttr:function(){var a=this.domNode.querySelector(".mwFunctionAssistant__signatureContainer__argumentContainer__argument--current"),c=null;a.widget&&(a=a.widget.completionContainer.firstChild)&&(c=a.getAttribute("data-completion"));return c},_setDataAttr:function(a){this._signaturesBeforePromotion=JSON.parse(JSON.stringify(a.signatures));
a=this._sortPromotedSignatures(a);this._set("data",a);this.data.signatures&&0<this.data.signatures.length&&(this._setCurrentSignatureIndex(),2>this.data.signatures.length?this.domNode.classList.add("mwFunctionAssistant--noSignatureCompletions"):this.domNode.classList.remove("mwFunctionAssistant--noSignatureCompletions"));this._setAppropriateSignature();0!==this.data.signatures.length&&(this._filterArgsForObjectOrCellSyntax(this.data.signatures),this._buildArgumentContainer(),this._setTotalSignaturesNode(this.data.signatures),
this._buildSignatureCompletion(this.data.signatures));this.domNode.style.display=0===this.data.signatures.length?"none":null;this._dropDownContainer.style.display=1===this.data.signatures.length?"none":null},_setShowHelpAttr:function(a){a?this.domNode.classList.add("mwFunctionAssistant--helpAvailable"):this.domNode.classList.remove("mwFunctionAssistant--helpAvailable");this._set("showHelp",a)},postCreate:function(){this.inherited(arguments);this._hookupDomNodeListeners()},_createChildDomNodes:function(){this._signatureContainer=
m.buildNode("div",{className:"signatureContainer",parent:this.domNode},"mwFunctionAssistant");this._createHelpNode();this._argumentContainer=m.buildNode("div",{className:"argumentContainer",parent:this._signatureContainer},"mwFunctionAssistant");this._createDropDownNode()},_createHelpNode:function(){this._helpContainer=m.buildNode("div",{className:"helpContainer",parent:this._signatureContainer,title:p.help},"mwFunctionAssistant");this._helpNode=m.buildNode("div",{parent:this._helpContainer,className:"help"},
"mwFunctionAssistant")},_createDropDownNode:function(){var a=e("mac")?p.moreSignatures+" (\u2318\u2193)":p.moreSignatures+" (Ctrl + Down)";this._dropDownContainer=m.buildNode("div",{className:"dropDownContainer",parent:this._signatureContainer,title:a},"mwFunctionAssistant");this._currentSignatureIndexNode=m.buildNode("div",{className:"currentSignatureIndex",parent:this._dropDownContainer},"mwFunctionAssistant");m.buildNode("div",{className:"signatureLabel",parent:this._dropDownContainer,text:"of"},
"mwFunctionAssistant");this._totalSignaturesNode=m.buildNode("div",{className:"totalSignatures",parent:this._dropDownContainer},"mwFunctionAssistant");m.buildNode("div",{className:"dropDown",parent:this._dropDownContainer},"mwFunctionAssistant")},_hookupDomNodeListeners:function(){this._handleDocumentBodyClick=f.hitch(this,function(a){this.domNode.classList.contains("mwFunctionAssistant--showSignatures")&&!this._dropDownContainer.contains(a.target)&&this.set("showSignatures",!1)});document.body.addEventListener("click",
this._handleDocumentBodyClick,!0);this.domNode.addEventListener("change",this._handleChange.bind(this));this.domNode.addEventListener("select",this._handleSelect.bind(this));this.domNode.addEventListener("click",this._handleClick.bind(this));this.domNode.addEventListener("mouseover",this._handleMouseOver.bind(this));this.domNode.addEventListener("mouseout",this._handleMouseOut.bind(this))},_handleChange:function(a){var b=c.getEnclosingWidget(a.target);b===this._signatureCompletion?a.mwEventData.type=
"signatureChange":b&&b._argumentNode&&(a.mwEventData.kind=b._argumentNode.kind,this._findOriginalSignature(b))},_handleSelect:function(a){c.getEnclosingWidget(a.target)===this._signatureCompletion&&(a.stopImmediatePropagation(),a.stopPropagation())},_handleClick:function(a){var c=a.target;if(c===this._helpNode)this.emit("help");else if(this._dropDownContainer.contains(c))this._toggleSignatureCompletion();else if(c.classList.contains("leftArrow")||c.classList.contains("rightArrow")){var b=c.classList.contains("leftArrow")?
-1:1;a=this._argumentContainer.querySelector(".mwFunctionAssistant__signatureContainer__argumentContainer__argument--current");c=Array.prototype.slice.call(this._argumentContainer.querySelectorAll(".mwFunctionAssistant__signatureContainer__argumentContainer__argument--present"));b=c.indexOf(a)+b;this._updateCurrentArgumentOnNavigation(a,c[b])}else if(this._argumentContainer.contains(c)&&(a=this._findArgument(a))&&a.classList.contains("mwFunctionAssistant__signatureContainer__argumentContainer__argument--present"))c=
this._argumentContainer.querySelector(".mwFunctionAssistant__signatureContainer__argumentContainer__argument--current"),this._updateCurrentArgumentOnNavigation(c,a)},_handleMouseOver:function(a){this._argumentContainer.contains(a.target)&&(a=this._findArgument(a))&&this.emit("argument-over",{mwEventData:{argumentName:a.name,bounds:a.bounds}})},_handleMouseOut:function(a){this._argumentContainer.contains(a.target)&&(a=this._findArgument(a))&&this.emit("argument-out",{mwEventData:{argumentName:a.name,
bounds:a.bounds}})},_findOriginalSignature:function(a){var c=a.domNode.parentNode.parentNode,c=Array.prototype.slice.call(this._argumentContainer.querySelectorAll(".mwFunctionAssistant__signatureContainer__argumentContainer__argument")).indexOf(c),b=a.get("value")?a.get("value"):a.get("valueOfFirstChoice");a=this.data.signatures[this._currentSignatureIndex].inputArguments[c];if(void 0!==a.widgetData){var d;a.widgetData.choices.some(function(a){if(a.completion===b)return d=a,!0});if(d&&0<=d.originalSignature){a=
this._signaturesBeforePromotion[d.originalSignature];for(var e,c=0;c<this.data.signatures.length;c++)if(this._isSameArgumentArray(a.inputArguments,this.data.signatures[c].inputArguments)){e=c;break}e!==this._currentSignatureIndex&&(this._currentSignature=this.data.signatures[e].inputArguments)}}},_setCurrentSignatureIndex:function(){for(var a=this.data.signatures,c=null,b=0;b<a.length;b++)if(0!==a[b].inputArguments.length){c=b;break}this._currentSignatureIndex=c},_setAppropriateSignature:function(){if(this._currentSignature)for(var a=
0;a<this.data.signatures.length;a++)if(this._isSameArgumentArray(this._currentSignature,this.data.signatures[a].inputArguments)){this._currentSignatureIndex=a;break}if(!(2>this.data.signatures.length)&&(a=this._findCurrentArgumentIndex(),-1!==a)){var c=this.data.signatures[this._currentSignatureIndex].inputArguments[a];c&&c.value&&(c=c.value,0!==c.length&&(c&&"''"!==c)&&(c=c.replace(/'/g,""),a=this._findMatchingSignature(a,c),this._currentSignatureIndex=-1==a?this._currentSignatureIndex:a))}},_isArgumentMatching:function(a,
c,b){if((a=this.data.signatures[a].inputArguments[c])&&a.widgetData&&a.widgetData.choices&&0!==a.widgetData.choices.length){a=a.widgetData.choices;b=b.toLowerCase();for(c=0;c<a.length;c++){if(a[c].displayString){var d=a[c].displayString;0<=b.lastIndexOf("\\")&&b.lastIndexOf("\\")<b.length?b=b.substring(b.lastIndexOf("\\")+1):0<=b.lastIndexOf("/")&&b.lastIndexOf("/")<b.length&&(b=b.substring(b.lastIndexOf("/")+1))}else d=a[c].completion;d=d.replace(/'/g,"");d=d.toLowerCase();if(0===d.indexOf(b))return!0}}return!1},
_findMatchingSignature:function(a,c){if(this._isArgumentMatching(this._currentSignatureIndex,a,c))return this._currentSignatureIndex;for(var b=0;b<this.data.signatures.length;b++)if(b!==this._currentSignatureIndex&&this._isArgumentMatching(b,a,c))return b;return-1},_findCurrentArgumentIndex:function(){var a=this._argumentContainer.querySelector(".mwFunctionAssistant__signatureContainer__argumentContainer__argument--current");return Array.prototype.slice.call(this._argumentContainer.querySelectorAll(".mwFunctionAssistant__signatureContainer__argumentContainer__argument")).indexOf(a)},
_findArgument:function(a){var c=null;a.target.parentNode.classList.contains("mwFunctionAssistant__signatureContainer__argumentContainer__argument")?c=a.target.parentNode:a.target.classList.contains("mwFunctionAssistant__signatureContainer__argumentContainer__argument")&&(c=a.target);return c},_isSameArgumentArray:function(a,c){var b=a.map(function(a){return a.name}).sort(),d=c.map(function(a){return a.name}).sort();return b.join(",")===d.join(",")},_indexOfSignature:function(a){for(var c=this.data.signatures,
b=c.length,d=-1,e=0;e<b;e+=1)if(this._isSameArgumentArray(a,c[e].inputArguments)){d=e;break}return d},_sortPromotedSignatures:function(a){var c=[],b=[];a=JSON.parse(JSON.stringify(a));a.signatures.forEach(function(a){"primary"===a.promotion?c.push(a):b.push(a)});a.signatures=c.concat(b);return a},_setCurrentSignatureIndexNode:function(a){0<=a&&(this._currentSignatureIndexNode.textContent=a+1)},_setTotalSignaturesNode:function(a){this._totalSignaturesNode.textContent=a.length},_checkForCallingSyntax:function(a,
c){return this.data.signatures[c].callingSyntax===a},_checkBracketType:function(){var a="(";this._checkForCallingSyntax("command",this._currentSignatureIndex)?a=" ":this._checkForCallingSyntax("cell",this._currentSignatureIndex)&&(a="{");return a},_findHeaderText:function(a){var c="";a.purpose?c=a.purpose:"name"===a.kind?c="name-value pairs":"value"===a.kind&&(c=a.name+" value");return c},_buildSignatureCompletion:function(a){this._signatureCompletion&&this._signatureCompletion.destroyRecursive();
a=JSON.parse(JSON.stringify(a));this._signatureCompletion=new k[l.COMPLETION]({choices:a.map(function(a,c){return{data:a.inputArguments,completion:c+"",functionName:a.functionName}}),renderItem:f.hitch(this,function(a,c){var b=this._checkForCallingSyntax("command",this._currentSignatureIndex);m.buildNode("span",{text:c.functionName,parent:a},"mwFunctionAssistant");m.buildNode("span",{text:b?" ":"(",parent:a},"mwFunctionAssistant");c.data.forEach(function(c,d){var e=this._prepareClassModifiers(c);
if(0<d){var f=this._prepareCommaClassModifiers(e);m.buildNode("span",{parent:a,text:b?" ":",",className:"comma",useOwnClass:!0,classModifiers:f},"mwFunctionAssistant")}m.buildNode("span",{parent:a,text:c.repeatedCount?c.name+c.repeatedCount:c.name,className:"mwFunctionAssistant__signatureCompletion__mwCompletion__choice__argument",useOwnClass:!0,classModifiers:e})},this);m.buildNode("span",{text:b?" ":")",parent:a},"mwFunctionAssistant")})});this._signatureCompletion.domNode.classList.add("mwFunctionAssistant__signatureCompletion");
this._signatureCompletion.placeAt(this.domNode);this._signatureCompletion.startup();this._signatureCompletion.on("change",f.hitch(this,this._handleSignatureChange))},_handleSignatureChange:function(a){this._currentSignatureIndex=parseInt(a.mwEventData.newValue,10);this.set("showSignatures",!1);this._buildArgumentContainer()},_buildArgumentContainer:function(){this._setCurrentSignatureIndexNode(this._currentSignatureIndex);this._updateCurrentSignature(this.data.signatures[this._currentSignatureIndex].inputArguments);
this._buildNavigationArrowsInToolTip();this._setCurrentArgument()},_updateCurrentSignature:function(a){this._currentSignature=a;this._buildCurrentSignature(a)},_updateCurrentArgument:function(a){this._currentArgument=a},_buildCurrentSignature:function(a){var c=a.length;this._cleanupOldDOM();m.buildNode("span",{text:this.data.signatures[0].functionName,parent:this._argumentContainer},"mwFunctionAssistant");if(0!==c){var b=this._checkBracketType();m.buildNode("span",{text:b,parent:this._argumentContainer},
"mwFunctionAssistant");a.forEach(function(a,b){this._buildArgumentsAndWidget(a,b,c)},this)}},_buildArgumentsAndWidget:function(a,c,b){c=this._buildArgument(a,c,b);b=this._buildCorrespondingWidget(a,this.data.shared);var d=m.buildNode("div",{className:"widgetContainer",parent:c},"mwFunctionAssistant"),e=this._findHeaderText(a),e=this._buildHeaderNode(e,d,c,!!b);b?(b.placeAt(d),b.startup(),b._argumentNode=c,c.widget=b,c.classList.add("mwFunctionAssistant__signatureContainer__argumentContainer__argument--hasWidget")):
this._buildSubHeadNode(a,e)},_buildHeaderNode:function(c,b,d,e){var f=!1;if(""===c){if(!e){c=p.argumentHeader;var h=c.split("${0}")}f=!0}e=m.buildNode("div",{className:"header",parent:b},"mwFunctionAssistant");var g=m.buildNode("div",{className:"text",parent:e},"mwFunctionAssistant"),k=m.buildNode("div",{parent:g,useOwnClass:!0,className:"headerValue"},"mwFunctionAssistant");h?(""!==h[0]&&""!==h[1]&&(h.push(h[1]),h[1]=""),h.forEach(function(a){""!==a?m.buildNode("span",{parent:k,text:a,useOwnClass:!0},
"mwFunctionAssistant"):m.buildNode("span",{parent:k,text:d.name,useOwnClass:!0,className:"argumentName"},"mwFunctionAssistant")}),c=a.substitute(p.argumentHeader,[d.name])):c&&m.buildNode("span",{parent:k,text:c,useOwnClass:!0},"mwFunctionAssistant");""===c&&f&&(m.buildNode("span",{parent:k,text:d.name,useOwnClass:!0,className:"argumentName"},"mwFunctionAssistant"),c+=d.name);""!==c?b.classList.add("mwFunctionAssistant__signatureContainer__argumentContainer__argument__widgetContainer--headerAvailable"):
b.classList.remove("mwFunctionAssistant__signatureContainer__argumentContainer__argument__widgetContainer--headerAvailable");b=m.buildNode("div",{parent:g,useOwnClass:!0,className:"optionalDiv"},"mwFunctionAssistant");21<c.length&&k.setAttribute("title",c);!d.classList.contains("mwFunctionAssistant__signatureContainer__argumentContainer__argument--required")&&!d.classList.contains("mwFunctionAssistant__signatureContainer__argumentContainer__argument--value")&&(b.textContent="("+p.optionalArgument+
")");return e},_findNavigationTooltipText:function(a,c){var b;switch(c){case "first":b=a?p.nextArgument+" (\u2318\u2192)":p.nextArgument+" (Ctrl + Right)";break;case "middle":b=a?p.nextArgument+" (\u2318\u2192).\n"+p.previousArgument+" (\u2318\u2190)":p.nextArgument+" (Ctrl + Right).\n"+p.previousArgument+" (Ctrl + Left)";break;case "last":b=a?p.previousArgument+" (\u2318\u2190)":p.previousArgument+" (Ctrl + Left)"}return b},_buildNavigationArrowsInToolTip:function(){var a=Array.prototype.slice.call(this._argumentContainer.querySelectorAll(".mwFunctionAssistant__signatureContainer__argumentContainer__argument")).filter(function(a){return a.classList.contains("mwFunctionAssistant__signatureContainer__argumentContainer__argument--present")}),
c=a.length;1<c&&a.forEach(function(a,b){var d=a.querySelector(".mwFunctionAssistant__signatureContainer__argumentContainer__argument__widgetContainer__header").firstChild;d.classList.add("mwFunctionAssistant__signatureContainer__argumentContainer__argument__widgetContainer__header--hasNavigationArrows");var f;f=0===b?this._findNavigationTooltipText(e("mac"),"first"):b===c-1?this._findNavigationTooltipText(e("mac"),"last"):this._findNavigationTooltipText(e("mac"),"middle");d=m.buildNode("div",{className:"argNavigationContainer",
parent:d,useOwnClass:!0,title:f},"mwFunctionAssistant");0!==b&&m.buildNode("div",{className:"leftArrow",parent:d,useOwnClass:!0},"mwFunctionAssistant");f=m.buildNode("div",{className:"presentingArgIndexContainer",parent:d,useOwnClass:!0,title:f},"mwFunctionAssistant");m.buildNode("div",{className:"currentArg",parent:f,text:b+1,useOwnClass:!0},"mwFunctionAssistant");m.buildNode("div",{className:"argumentLabel",parent:f,text:"of",useOwnClass:!0},"mwFunctionAssistant");m.buildNode("div",{className:"totalArguments",
parent:f,text:c,useOwnClass:!0},"mwFunctionAssistant");b!==c-1&&m.buildNode("div",{className:"rightArrow",parent:d,useOwnClass:!0},"mwFunctionAssistant")},this)},_buildSubHeadNode:function(a,c){if(a.valueSummary){if(26<a.valueSummary.length)var b=a.valueSummary;m.buildNode("div",{className:"valueSummary",parent:c,text:a.valueSummary,title:b},"mwFunctionAssistant")}},_isValueOfTypeString:function(a){var c=!1;0<a.length&&-1!==a.indexOf("'")&&(c=!0);return c},_filterArgsForObjectOrCellSyntax:function(a){a.forEach(function(a,
c){arguments=a.inputArguments;(this._checkForCallingSyntax("object",c)||this._checkForCallingSyntax("cell",c))&&Array.prototype.splice.call(arguments,0,1)},this)},_setCurrentArgument:function(){var a,c=0,b=!0;a=this.data.signatures[this._currentSignatureIndex].inputArguments.filter(function(a){return"presenting"===a.status});if(0!==a.length){var d=a[c];if(this._currentArgument&&(a.forEach(function(a,b){a.name===this._currentArgument.name&&(c=b)},this),d=a[c],d.widgetData&&d.widgetData.choices&&d.widgetData.choices.length||
"none"===d.widgetType))b=!1;a=this._signatureContainer.querySelectorAll(".mwFunctionAssistant__signatureContainer__argumentContainer__argument--present");var e=Array.prototype.slice.call(this._signatureContainer.querySelectorAll(".mwFunctionAssistant__signatureContainer__argumentContainer__argument"));if(this._isValueOfTypeString(d.value)&&b){var f=!0;"none"===d.widgetType&&(f=!1);b=d.value;b=b.toLowerCase();0===b.indexOf("'")&&(b=b.substring(1));b.lastIndexOf("'")===b.length-1&&(b=b.substring(0,
b.lastIndexOf("'")));if(!(""===b||"required"===d.kind||!f))for(d=0;d<a.length;d++)if(a[d].classList.contains("mwFunctionAssistant__signatureContainer__argumentContainer__argument--hasWidget")&&(f=e.indexOf(a[d]),this._isArgumentMatching(this._currentSignatureIndex,f,b))){c=d;break}}a=a[c];a.classList.add("mwFunctionAssistant__signatureContainer__argumentContainer__argument--current");this.moveWidgetIntoView()}},moveWidgetIntoView:function(){var a=this._argumentContainer.querySelector(".mwFunctionAssistant__signatureContainer__argumentContainer__argument--current");
if(a){var c=a.querySelector(".mwFunctionAssistant__signatureContainer__argumentContainer__argument__widgetContainer");if(c&&(0>c.getBoundingClientRect().left&&a.classList.add("mwFunctionAssistant__signatureContainer__argumentContainer__argument--moveIntoView"),e("ff")&&(a=c.getBoundingClientRect().width)))a=Math.round(a),a%2&&(c.style.width=a+1+"px")}},_cleanupOldDOM:function(){for(;this._argumentContainer.children.length;){var a=this._argumentContainer.lastChild;this._argumentContainer.removeChild(a);
(a=a.widget)&&a.destroy()}},_prepareClassModifiers:function(a){var c=[];"presenting"===a.status&&c.push("present");a.bounds||c.push("future");a.kind&&(c.push(a.kind),"required"!==a.kind&&"value"!==a.kind&&c.push("optional"));return c},_prepareCommaClassModifiers:function(a){var c=[];-1!==a.indexOf("optional")&&(c.push("optional"),-1!==a.indexOf("present")?c.push("present"):-1!==a.indexOf("future")&&c.push("present"));return c},_buildArgument:function(a,c,b){var d=this._prepareClassModifiers(a);if(0<
c){var e=this._prepareCommaClassModifiers(d),f=this._checkForCallingSyntax("command",this._currentSignatureIndex)?" ":",";m.buildNode("span",{text:f,parent:this._argumentContainer,className:"comma",useOwnClass:!0,classModifiers:e},"mwFunctionAssistant")}e=a.name;a.repeatedCount&&(e=a.name+a.repeatedCount);e="value"===a.kind?"value":e;d=m.buildNode("div",{parent:this._argumentContainer,className:"argument",classModifiers:d},"mwFunctionAssistant");m.buildNode("span",{parent:d,text:e,className:"argumentText",
useOwnClass:!0});d.status=a.status;d.name=a.originalName?a.originalName:a.name;d.bounds=a.bounds;d.kind=a.kind;a=this._checkBracketType();"("===a?a=")":"{"===a&&(a="}");c===b-1&&m.buildNode("span",{text:a,parent:this._argumentContainer},"mwFunctionAssistant");return d},_buildCorrespondingWidget:function(a,c){var b=null;if(void 0===a.widgetType||"scalar"===a.widgetType)a.widgetType=l.COMPLETION,a.widgetData={choices:[]};if("presenting"===a.status&&(a.widgetData||c)){var d=k[l.COMPLETION];if(d){var e=
a.widgetData?a.widgetData.choices:[];if(c&&c.widgetData&&c.widgetData.choices&&0<c.widgetData.choices.length){var f=c.widgetData.choices.filter(function(a){return!e.some(function(c){return c.completion===a.completion})});0<e.length&&0<f.length&&(f[0].separated=!0);e=e.concat(f)}0<e.length&&(b=new d({choices:e,autoSelect:!1,selectionScope:this._signatureContainer,attachedAt:"bottom",presenting:!0}),b.domNode.classList.add(a.kind))}}return b},_toggleSignatureCompletion:function(){this.set("showSignatures",
!this.get("showSignatures"))},_updateCurrentArgumentOnNavigation:function(a,c){if(a!==c){a.classList.remove("mwFunctionAssistant__signatureContainer__argumentContainer__argument--current");var b=a.widget,d="";b&&(d=b.get("value")?b.get("value"):b.get("valueOfFirstChoice"),b.set("value",""));c.classList.add("mwFunctionAssistant__signatureContainer__argumentContainer__argument--current");var e=c.widget,b="";e&&(b=e.get("valueOfFirstChoice"));e=Array.prototype.slice.call(this.domNode.querySelectorAll(".mwFunctionAssistant__signatureContainer__argumentContainer__argument")).indexOf(c);
this._updateCurrentArgument(this.data.signatures[this._currentSignatureIndex].inputArguments[e]);this.moveWidgetIntoView();this.emit("argument-change",{mwEventData:{oldValue:d,newValue:b}})}},_signatureCompletionNavigate:function(a){if(-1<[d.UP_ARROW,d.DOWN_ARROW,d.HOME,d.END,d.PAGE_UP,d.PAGE_DOWN].indexOf(a.keyCode))return this._signatureCompletion.navigate(a);if(a.keyCode===d.ENTER)return this._signatureCompletion.navigate(a),this.set("showSignatures",!1),!0;if(a.keyCode===d.ESCAPE)return this.set("showSignatures",
!1),!0},_navigateWithinArgumentCompletion:function(a){var c=this.domNode.querySelector(".mwFunctionAssistant__signatureContainer__argumentContainer__argument--current");if(c.widget)return c.widget.navigate(a)},_navigateBetweenPresentingArguments:function(a){var c=Array.prototype.slice.call(this._argumentContainer.querySelectorAll(".mwFunctionAssistant__signatureContainer__argumentContainer__argument")),b=Array.prototype.slice.call(this._argumentContainer.querySelectorAll(".mwFunctionAssistant__signatureContainer__argumentContainer__argument--present")),
e=this._argumentContainer.querySelector(".mwFunctionAssistant__signatureContainer__argumentContainer__argument--current"),f=c.indexOf(e);if(1===b.length)return!1;if((a.metaKey||a.ctrlKey)&&a.keyCode===d.LEFT_ARROW)var h=-1;else if((a.metaKey||a.ctrlKey)&&a.keyCode===d.RIGHT_ARROW)h=1;for(a=f;;){a+=h;if(0>a||a>=c.length)return!1;if(c[a].classList.contains("mwFunctionAssistant__signatureContainer__argumentContainer__argument--present"))break}(c=c[a])&&(c.classList.contains("mwFunctionAssistant__signatureContainer__argumentContainer__argument--present")&&
a!==f)&&this._updateCurrentArgumentOnNavigation(e,c);return!0},navigate:function(a){if((a.metaKey||a.ctrlKey)&&a.keyCode===d.DOWN_ARROW)return this._toggleSignatureCompletion(),!0;if(this.domNode.classList.contains("mwFunctionAssistant--showSignatures"))return this._signatureCompletionNavigate(a);if(this.showWidgets)return(a.metaKey||a.ctrlKey)&&(a.keyCode===d.LEFT_ARROW||a.keyCode===d.RIGHT_ARROW)?this._navigateBetweenPresentingArguments(a):this._navigateWithinArgumentCompletion(a)},startup:function(){this.inherited(arguments);
this.moveWidgetIntoView()},destroy:function(){for(;this._signatureContainer.firstChild;){var a=this._signatureContainer.firstChild;this._signatureContainer.removeChild(a);(a=a.widget)&&a.destroy()}document.body.removeEventListener("click",this._handleDocumentBodyClick,!0);this.domNode.removeEventListener("change",this._handleChange.bind(this));this.domNode.removeEventListener("select",this._handleSelect.bind(this));this.domNode.removeEventListener("click",this._handleClick.bind(this));this.domNode.removeEventListener("mouseover",
this._handleMouseOver.bind(this));this.domNode.removeEventListener("mouseout",this._handleMouseOut.bind(this));this.inherited(arguments)}});g.BASE_CLASS="mwFunctionAssistant";g.SIGNATURE_CONTAINER_CLASS="mwFunctionAssistant__signatureContainer";g.CURRENT_SIGNATURE_INDEX_CLASS="mwFunctionAssistant__signatureContainer__dropDownContainer__currentSignatureIndex";g.HELP_AVAILABLE_CLASS="mwFunctionAssistant--helpAvailable";g.SIGNATURE_COMPLETION_CLASS="mwFunctionAssistant__signatureCompletion";g.COMPLETION_CLASS=
"mwCompletion";g.CHOICE_CLASS="mwCompletion__choiceContainer__choice";g.SELECTED_CHOICE_CLASS="mwCompletion__choiceContainer__choice--selected";g.SHOW_SIGNATURE_CLASS="mwFunctionAssistant--showSignatures";g.ARGUMENT_CONTAINER_CLASS="mwFunctionAssistant__signatureContainer__argumentContainer";g.ARGUMENT_CLASS="mwFunctionAssistant__signatureContainer__argumentContainer__argument";g.PRESENT_ARGUMENT_CLASS="mwFunctionAssistant__signatureContainer__argumentContainer__argument--present";g.CURRENT_ARGUMENT_CLASS=
"mwFunctionAssistant__signatureContainer__argumentContainer__argument--current";g.WIDGET_CONTAINER_CLASS="mwFunctionAssistant__signatureContainer__argumentContainer__argument__widgetContainer";g.HAS_WIDGET_CLASS="mwFunctionAssistant__signatureContainer__argumentContainer__argument--hasWidget";g.WIDGETS_HIDDEN_CLASS="mwFunctionAssistant--widgetsHidden";g.MOVE_INTO_VIEW_CLASS="mwFunctionAssistant__signatureContainer__argumentContainer__argument--moveIntoView";g.SIGNATURE_COMPLETION_ARGUMENT_CLASS="mwFunctionAssistant__signatureCompletion__mwCompletion__choice__argument";
g.NO_SIGNATURE_COMPLETIONS_CLASS="mwFunctionAssistant--noSignatureCompletions";g.ARGUMENT_HEADER_CLASS="mwFunctionAssistant__signatureContainer__argumentContainer__argument__widgetContainer__header";g.HELP_BUTTON_CLASS="mwFunctionAssistant__signatureContainer__helpContainer";g.DROPDOWN_BUTTON_CLASS="mwFunctionAssistant__signatureContainer__dropDownContainer";g.REQUIRED_ARGUMENT_CLASS="mwFunctionAssistant__signatureContainer__argumentContainer__argument--required";g.OPTIONAL_ARGUMENT_CLASS="mwFunctionAssistant__signatureContainer__argumentContainer__argument--optional";
return g})},"MW/rtc/plugins/language/matlab/codingui/CodingUIContextManagerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./CodingUIContextManager"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cursorcontroller","rtc.internaldocument"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/language/matlab/codingui/CodingUIContextManager":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin ./CodingUIContext ./CodingUIContextEvents ./utilities/CodingUIContextManagerUtilities ./utilities/CodingUIContextUtilities".split(" "),
function(g,f,e,d,b,a,c,h){return g(d,{constructor:function(a,c){this._cursor=a.getCursors()[0];this.own(e.after(this._cursor,"onChange",f.hitch(this,"_handleCursorChanged")));this.own(e.before(c,"onDocumentReset",f.hitch(this,"reset")));this._context=null;this._contextDataStack=[]},createContextAndSetup:function(a){this._cleanupOldContext();a=new b(a);this._updateContextAndStack(a);this._setContext(a);var c=this._contextDataStack.length;this._shouldCacheWidget&&0<c&&(this._contextDataStack[c-1].widget=
a.widget,this._shouldCacheWidget=!1)},_cleanupOldContext:function(){this._context&&(this._context.position.destroy(),this._context.range.destroy(),this._context=null)},_setContext:function(c){this._context=c;this.onContextUpdated(a.CONTEXT_SWITCHED)},_updateContextAndStack:function(a){var b=c.getPresentingSignature(a);if(b){var d;for(d=this._contextDataStack.length-1;0<=d;d--){var e=this._contextDataStack[d];if(c.isNewContextSameAsOldContext(a,b,e)){a.widget=e.widget;break}}if(-1===d)this._addContextDataToStack(a,
b);else for(a=this._contextDataStack.length-1;a>d;a--)this._contextDataStack.pop()}},_addContextDataToStack:function(a,c){var b=a.widget;this._contextDataStack.push({functionName:c.functionName,leftBounds:a.leftMostBounds.left,widget:b});b||(this._shouldCacheWidget=!0)},isWidgetHeld:function(a){return this._contextDataStack.some(function(c){return a===c.widget})},getContext:function(){return this._context},reset:function(){this._clearStack();this._cleanupOldContext();this.onContextUpdated(a.CONTEXT_RESET)},
setContextToCompleted:function(){this._context.setCompleted()},isContextCompleted:function(){return this._context.isCompleted()},setContextTabMode:function(a){this._context&&this._context.setTabMode(a)},isContextInTabMode:function(){return this._context?this._context.isInTabMode():!1},onContextUpdated:function(a){},_handleCursorChanged:function(){if(this.getContext()){var c=h.checkLeavingContext(this._context,this._cursor.position);c&&(c===a.LEAVING_RANGE?this._clearLastElementInStack():c===a.SILENT_RESET&&
this._clearStack(),c&&(this._cleanupOldContext(),this.onContextUpdated(c)))}},_clearLastElementInStack:function(){var a=this._contextDataStack[this._contextDataStack.length-1];a&&(a.widget&&a.widget.domNode)&&(a.widget.destroy(),a.widget=null,this._contextDataStack.pop())},_clearStack:function(){this._contextDataStack.forEach(function(a){a.widget&&a.widget.domNode&&(a.widget.destroy(),a.widget=null)});this._contextDataStack=[]},destroy:function(){this._clearStack();this._cleanupOldContext()}})})},
"MW/rtc/plugins/language/matlab/codingui/CodingUIContext":function(){define(["mw-utils/Utils","dojo/_base/declare"],function(g,f){return f(null,{constructor:function(e){this.uid=g.generateUuid();this.position=e.position;this.range=e.range;this.activity=e.activity;this.widget=e.widget;this.metaData=e.metaData;this.completed=!1;this.isWidgetReUsed=e.isWidgetReUsed;this.tabMode=e.tabMode||!1;this.isStale=!1;this.code=this.metaData.getCode();this.leftMostBounds=this.metaData.getLeftMostBounds(this.position);
this.currentBounds=this.metaData.getCurrentBounds(this.position)},setCompleted:function(){this.completed=!0},isCompleted:function(){return this.completed},setTabMode:function(e){this.tabMode=e},isInTabMode:function(){return this.tabMode}})})},"MW/rtc/plugins/language/matlab/codingui/utilities/CodingUIContextManagerUtilities":function(){define([],function(){return{getPresentingSignature:function(g){g=g.metaData;return!g?null:g.getPresentingSignature()},isNewContextSameAsOldContext:function(g,f,e){return!e?
!1:f.functionName===e.functionName&&g.leftMostBounds.left===e.leftBounds}}})},"MW/rtc/plugins/language/matlab/codingui/utilities/CodingUIContextUtilities":function(){define(["MW/rtc/model/PositionUtilities","MW/rtc/nodes/OpaqueNode","../CodingUIContextEvents"],function(g,f,e){return{_METADATA_WIDGET_TYPE_PROPERTY:"widgetType",checkLeavingContext:function(d,b){return this._checkLeavingRange(d,b)||this._isInvalidPosition(b)},_isInvalidPosition:function(d){if(1===d.getLineColumn().column)return e.SILENT_RESET},
_checkLeavingRange:function(d,b){return!g.isPositionInRange(b,d.range)?e.LEAVING_RANGE:null},isInSameContext:function(d,b,a){return!b||b.leftMostBounds.left!==d.getLeftMostBounds(a).left||d.hasSignatures()!==b.metaData.hasSignatures()||d.hasOwnProperty(this._METADATA_WIDGET_TYPE_PROPERTY)?!1:!0},getLineColumnForOffsetBounds:function(d,b,a){if(!d)return null;var c=d.right;d=this.getLineColumnForOffsetPosition(d.left,b,a);b=this.getLineColumnForOffsetPosition(c,b,a);return{startLine:d.line,startColumn:d.column,
endLine:b.line,endColumn:b.column}},getLineColumnForOffsetPosition:function(d,b,a){var c=a.getLineColumn(),e=c.line,f=c.column;a=a.getNode().rootContainer();c=a.getTextForPositioning().length;b=b-f+1;var f=b+c,g=0;for(d<b?g=-1:d>f&&(g=1);!(d>=b&&d<=f);){e+=g;a=-1===g?a.previousSibling():a.nextSibling();if(!a)return null;c=a.getTextForPositioning().length;-1===g?(f=b-1,b=f-c):1===g&&(b=f+1,f=b+c)}return{column:c-(f-d)+1,line:e}},isContextInOpaqueNode:function(d,b){var a=d.currentBounds,c=b.createPositionAtLineColumn(a.startLine-
1,a.left-1),a=b.createPositionAtLineColumn(a.endLine-1,a.right-1),e=c.getNode(),g=!1,l=a.getNode();for(l instanceof f&&(g=!0);e!==l;)e instanceof f&&(g=!0),e=e.nextNode();c.destroy();a.destroy();return g}}})},"MW/rtc/plugins/language/matlab/codingui/CodingUIProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./CodingUI"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.internaldocument rtc.code.codingui.view rtc.code.codingui.requesthandler rtc.code.codingui.contextmanager rtc.eventhandler rtc.document rtc.cursorcontroller".split(" ")}},
createInstance:function(d,b,a,c,f,g,l){return new e(d,b,a,c,f,g,l)}})})},"MW/rtc/plugins/language/matlab/codingui/CodingUI":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/model/CodeUtilities MW/rtc/model/DocumentConstants ./CodingUIActivities ./utilities/CodingUIUtilities".split(" "),function(g,f,e,d,b,a,c,h){return g(d,{constructor:function(a,c,b,d,h,g,r){this._internalDocument=a;this._cursor=r.getCursors()[0];this._eventHandler=h;this._document=
g;this._cursorController=r;this._uiView=c;this._requestHandler=b;this._contextManager=d;this.own(e.after(this._internalDocument,"onDocumentReset",f.hitch(this,"_initialize")));this._initialized=!1;this._prefAutomatic=!0},_initialize:function(){this._initialized||(this._setListeners(),this._initialized=!0)},setMode:function(a){this._prefAutomatic=a},_setListeners:function(){this.own(e.after(this._internalDocument,"onDocumentChanged",f.hitch(this,"_handleDocumentChanged"),!0));this.own(e.after(this._cursor,
"onChange",f.hitch(this,"_handleCursorChanged")));this.own(e.after(this._cursor,"movePosition",f.hitch(this,"_checkAndEmitSelectionEvent")));this.own(e.after(this._eventHandler,"onMouseUp",f.hitch(this,"_checkAndEmitSelectionEvent")));this.own(e.after(this._document,"deleteTextAtCurrentPosition",f.hitch(this,"_handleInsertDeleteText")));this.own(e.after(this._document,"insertTextAtCurrentPosition",f.hitch(this,"_handleInsertDeleteText")))},_isSilentViewUpdate:function(){var a=this._contextManager&&
this._contextManager.isContextInTabMode();return!this._prefAutomatic&&!this._uiView.isTopViewDisplayed()||a},_updateViewForDocChange:function(){var a=this._isSilentViewUpdate()?c.SILENT_UPDATE:c.INSERT_DELETE_TEXT;this._requestHandler.request(a)},_handleDocumentChanged:function(b){if(!this._isCursorReadOnly()&&!this._cursorController.hasMultipleCursors()&&b&&0<b.length)if(b=b[b.length-1],b.isUndoRedo)this._uiView.close();else switch(b.type){case a.INSERT_BREAK_EVENT:this._updateViewForDocChange();
break;case a.FORMAT_CHANGE_EVENT:this._contextManager.reset(),this._requestHandler.request(c.SILENT_UPDATE)}},_handleInsertDeleteText:function(){!this._isCursorReadOnly()&&!this._cursorController.hasMultiplePendingCursors()&&this._updateViewForDocChange()},_handleCursorChanged:function(){if(this._cursorController.hasMultipleCursors())this._uiView.close();else if(!this._isCursorReadOnly()){var a=this._cursor.position.getLineColumn(),b=this._requestHandler.getLastRequestPosition();h.isSamePositionAsLast(a,
b)||this._requestHandler.request(c.SILENT_UPDATE,null)}},_checkAndEmitSelectionEvent:function(){this._cursorController.hasMultipleCursors()?this._uiView.close():this._isCursorReadOnly()||this._cursor.hasSelection()&&this._requestHandler.request(this._prefAutomatic?c.CURSOR_SELECTION:c.SILENT_UPDATE)},_isCursorReadOnly:function(){return this._cursor.isCursorReadOnly()}})})},"MW/rtc/plugins/language/matlab/codingui/utilities/CodingUIUtilities":function(){define([],function(){return{isSamePositionAsLast:function(g,
f){return f.line===g.line&&f.column===g.column},isMatlabString:function(g){return"'"===g.slice(0,1)&&"'"===g.slice(-1)||'"'===g.slice(0,1)&&'"'===g.slice(-1)},isArgumentSelected:function(g,f,e){if(!(g.startLine===g.endLine&&f.start.line===f.end.line&&g.startLine===f.start.line))return!1;var d=f.start.column;f=f.end.column;if(d>f){var b=d,d=f;f=b}b=g.startColumn;g=g.endColumn;return b===d&&g===f||this.isMatlabString(e)&&b+1===d&&g-1===f?!0:!1}}})},"MW/rtc/plugins/language/matlab/codingui/CodingUIRequestHandlerProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./CodingUIRequestHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cursorcontroller","rtc.document","rtc.internaldocument","rtc.code.codingui.contextmanager","rtc.code.codingui.backendservice"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/language/matlab/codingui/CodingUIRequestHandler":function(){define("dojo/_base/declare dojo/_base/lang mw-utils/Utils MW/rtc/abstract/AbstractPlugin MW/rtc/model/CodeUtilities MW/rtc/model/Range ./CodingUIActivities ./CodingUIMetaData ./utilities/CodingUIContextUtilities ./utilities/CodingUIUtilities".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return g(d,{_TIMER:150,_FEATURE_ID:"matlab.code.codingui",constructor:function(a,c,b,d,e){this._cursor=a.getCursors()[0];this._document=c;this._internalDocument=b;this._contextManager=d;this._serviceProvider=e;this._lastRequestPosition={};this._lastClientPacket={};this._requestMadeForCurrentPosition=this._isBusy=!1},request:function(a,c){this.stopPendingRequest();this._setLastRequestPosition(this._cursor.getLineColumn());this._isBusy=!0;this._requestTimeout=window.setTimeout(f.hitch(this,
"_requestCodingUI",a,c),this._TIMER)},stopPendingRequest:function(){this.hasPendingRequest()&&this._serviceProvider.cancelRequest();this._requestTimeout&&(window.clearTimeout(this._requestTimeout),this._requestTimeout=null);this._isBusy=!1},hasPendingRequest:function(){return this._isBusy||this._serviceProvider.isBusy()},_setLastRequestPosition:function(a){this._lastRequestPosition={id:e.generateUuid(),line:a.line,column:a.column}},getLastRequestPosition:function(){return this._lastRequestPosition},
_requestCodingUI:function(a,c){c=c||this._cursor.getLineColumn();this._setLastRequestPosition(c);if(this._isInvalidPosition(c))this._isBusy=!1;else{this._lastClientPacket={activity:a,requestId:this._lastRequestPosition.id,position:c,documentState:this._internalDocument.getState()};var b=f.hitch(this,"_handleResponse",this._lastClientPacket),d=this._contextManager.getContext();d&&(d.isStale=!0);this._serviceProvider.requestMetaData(this._FEATURE_ID,b,c)}},_handleResponse:function(a,c){this._isBusy=
!1;if(!(a.requestId!==this._lastRequestPosition.id||a.documentState!==this._internalDocument.getState())){var b=new h(c);if(b.hasSuggestion())if(!this._requestMadeForCurrentPosition&&!this._isSilentUpdate(a.activity)&&this._continuousRequest(a,b))this._requestMadeForCurrentPosition=!0;else{this._requestMadeForCurrentPosition=!1;var d=this._contextManager.getContext(),e,f=!1,g=this._document.createPositionAtLineColumn(a.position.line-1,a.position.column-1),l=k.isInSameContext(b,d,g);l&&(e=this._contextManager.getContext().widget,
f=d.tabMode);this._contextManager.createContextAndSetup({position:g,range:this._getSignatureBoundsAsRange(b,g),activity:a.activity,widget:e,metaData:b,isWidgetReUsed:l,tabMode:f})}else this._contextManager.reset()}},_getSignatureBoundsAsRange:function(c,b){var d=c.getMetaDataBounds();if(!d)return null;var e=c.getCursorPosition(),f=k.getLineColumnForOffsetPosition(d.left-1,e,b),d=k.getLineColumnForOffsetPosition(d.right-1,e,b);")"===this._document.getTextCharacters(d.line-1,d.column-2,1)&&(d.column-=
1);f=this._document.createPositionAtLineColumn(f.line-1,f.column-1);d=this._document.createPositionAtLineColumn(d.line-1,d.column-1,!0);return new a(f,d)},_continuousRequest:function(a,c){var b;b=this._getRequestForSelection(a,c);if(!b)return!1;this.request(b.activity,b.position);return!0},_getRequestForSelection:function(a,b){if(!this._cursor.hasSelection()||!this._presentingArgumentIsSelected(b))return null;var d=this._cursor.getSelectionLineColumn(),e=d.start.column,d=d.end.column;return{activity:c.ACTIVE_REQUEST,
position:{line:a.position.line,column:e>d?e:d}}},_presentingArgumentIsSelected:function(a){var c=a.getFunctionPresentingArgument();if(!c)return!1;a=k.getLineColumnForOffsetBounds(c.bounds,a.getCursorPosition(),this._cursor.position);var b=this._cursor.getSelectionLineColumn();return l.isArgumentSelected(a,b,c.value)},_isInvalidPosition:function(a){var c=this._internalDocument.getLineNode(a.line-1);return!b.isCodeContainer(c)||1===a.column},_isSilentUpdate:function(a){return a===c.SILENT_UPDATE},destroy:function(){this.stopPendingRequest()}})})},
"MW/rtc/plugins/language/matlab/codingui/CodingUIMetaData":function(){define(["dojo/_base/declare","./programmingaids/WidgetTypes","./utilities/CodingUIContextUtilities"],function(g,f,e){return g(null,{_METADATA_PRESENTING_STATUS:"presenting",_METADATA_KIND_REQUIRED:"required",_METADATA_WIDGET_TYPE_NONE:"none",_METADATA_CALLING_SYNTAX_OBJECT:"object",_METADATA_CALLING_SYNTAX_COMMAND:"command",_METADATA_CALLING_SYNTAX_CELL:"cell",_METADATA_SIGNATURES_PROPERTY:"signatures",_METADATA_MATCHTYPE_MESSAGE_ID:"messageId",
constructor:function(d){this._data=d},_getFirstSignatureWithInputArgs:function(){var d=this._getSignatures();if(!d)return null;var b=null;d.some(function(a){if(a.inputArguments&&0<a.inputArguments.length)return b=a,!0});return b},_getSignatures:function(){var d=this._data.signatures;if(!d)return null;Array.isArray(d)||(d=[d]);return d},getPresentingArgument:function(){var d=this.getFunctionPresentingArgument();!d&&this._data.widgetType!==this._METADATA_WIDGET_TYPE_NONE&&(d=this._data);return d},getFunctionPresentingArgument:function(){var d=
null,b=this._getSignatures();b&&b.some(function(a){if(a.status===this._METADATA_PRESENTING_STATUS)return a.inputArguments.some(function(a){if(a.status===this._METADATA_PRESENTING_STATUS)return d=a,!0},this)},this);return d},getPresentingSignature:function(){var d=this._getSignatures(),b=null;d&&d.some(function(a){if(a.status===this._METADATA_PRESENTING_STATUS)return b=a,!0},this);return b},getMetaDataBounds:function(){var d=this._getFirstSignatureWithInputArgs(),b,a=0;d?(b=d.bounds,a=d.functionName.length+
1):b=this._data.bounds;return b?{left:b.left+a+1,right:b.right+1}:null},getLeftMostBounds:function(d){var b=this._getFirstSignatureWithInputArgs();if(!b)return this.getCurrentBounds(d);d=b.callingSyntax===this._METADATA_CALLING_SYNTAX_OBJECT||b.callingSyntax===this._METADATA_CALLING_SYNTAX_CELL?this._getArgument(b,1):this._getArgument(b,0);var a=b.bounds.left+1;return d&&d.wsbounds?{left:a,right:a+b.functionName.length}:null},getFunctionName:function(){var d=this.getPresentingSignature();return!d?
null:d.functionName},getCurrentBounds:function(d){var b,a,c=this.getPresentingArgument();if(c&&(b=(b=this._data.shared)?b.bounds:c.widgetData&&c.widgetData.bounds?c.widgetData.bounds:c.bounds,b=e.getLineColumnForOffsetBounds(b,this.getCursorPosition(),d),(d=c.widgetData)&&d.choices&&0<d.choices.length)){c=d.choices[0];d=c.completion;var c=c.displayString,f=d.length;c&&(f-=c.length);0<=f&&0<=d.indexOf(c,f)&&(a=f)}return b?{left:b.startColumn,right:b.endColumn,startLine:b.startLine,endLine:b.endLine,
offset:a||0}:null},getNextBounds:function(d){var b=this._getNextNonPresentingArgument();if(b)var b=b.widgetData&&b.widgetData.bounds?b.widgetData.bounds:b.bounds,a=e.getLineColumnForOffsetBounds(b,this.getCursorPosition(),d);return a?{left:a.startColumn,right:a.endColumn,startLine:a.startLine,endLine:a.endLine}:null},_getNextNonPresentingArgument:function(){for(var d=this.getPresentingArgument(),b=this._getInputArguments(),a,d=b.indexOf(d)+1;d<b.length;d+=1){var c=b[d];if(c.status!==this._METADATA_PRESENTING_STATUS){a=
c;break}}return a},_getInputArguments:function(){return this.getPresentingSignature().inputArguments},getCode:function(){var d="",b=this._data.signatures;if(b&&0<b.length){arguments=b[0].inputArguments;if(!arguments)return d;arguments.some(function(a){if(a.status&&a.status===this._METADATA_PRESENTING_STATUS)return d=a.value,!0},this)}else this._data.widgetType!==this._METADATA_WIDGET_TYPE_NONE&&(d=this._data.value);return d},hasSuggestion:function(){if(!this._data)return!1;var d=this._data.widgetType,
b=this._data.signatures,b=b&&0<b.length;return d&&d!==this._METADATA_WIDGET_TYPE_NONE||b},hasSignatures:function(){return this._data.hasOwnProperty(this._METADATA_SIGNATURES_PROPERTY)},_getArgument:function(d,b){arguments=d.inputArguments;return!arguments||b>=arguments.length?null:arguments[b]},isCallingSyntaxObjectOrCell:function(){var d=this.getPresentingSignature();return null===d?!1:d.callingSyntax===this._METADATA_CALLING_SYNTAX_OBJECT||d.callingSyntax===this._METADATA_CALLING_SYNTAX_CELL?!0:
!1},getData:function(){return this._data},isFileOrFolderName:function(){var d=this.getPresentingArgument().widgetType;return d===f.FILE_NAME||d==f.FOLDER_NAME},isMessageId:function(){var d=this.getPresentingArgument().widgetData;if(d&&(d=d.choices)&&0<d.length)return d[0].matchType===this._METADATA_MATCHTYPE_MESSAGE_ID},getCursorPosition:function(){return this._data.cursorPosition}})})},"MW/rtc/plugins/language/matlab/codingui/CodingUITabHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"./CodingUITabHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cursor","rtc.document"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/language/matlab/codingui/CodingUITabHandler":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin","MW/rtc/plugins/smarttab/SmartTabUtilities"],function(g,f,e){return g(f,{constructor:function(d,b){this._cursor=d;this._document=b},doDefaultTab:function(){e.doSmartTab(this._cursor,this._document)}})})},
"MW/rtc/plugins/smarttab/SmartTabUtilities":function(){define(["MW/rtc/model/CodeUtilities","MW/rtc/model/DocumentUtilities"],function(g,f){return{doSmartTab:function(e,d){var b;if(e.hasSelection()){b=e.selectionInfo();if(!g.isCodeRange(b.startNode,b.endNode)||!b.isInTextContainer)return!1;b=e.getSelectionLineColumn();b=Math.min(b.start.column,b.end.column)-1}else b=e.getPosition().column;var a=f.DEFAULT_TAB_STRING.length;b=f.getWhitespaceStringOfLength(a-b%a);d.insertTextAtCurrentPosition(b);return!0}}})},
"MW/rtc/plugins/language/matlab/codingui/CodingUIViewEventBusProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./CodingUIViewEventBus"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/language/matlab/codingui/CodingUIViewEventBus":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin"],function(g,f){return g(f,{constructor:function(){},onCompleteText:function(e,
d){},onSelectBounds:function(e){},onRequestHelp:function(){}})})},"MW/rtc/plugins/language/matlab/codingui/preferences/CodingUIPreferenceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./CodingUIPreference"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.preferences.service","rtc.code.codingui.plugin"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/language/matlab/codingui/preferences/CodingUIPreference":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin"],function(g,f,e,d){return g(d,{_LIVE_EDITOR_PROGRAMMING_AIDS_PREFERENCE_KEY:"LiveEditorProgrammingAids",constructor:function(b,a){this._preferencesService=b;this._codingUI=a;this.own(e.after(this._preferencesService,"onPreferencesChanged",f.hitch(this,"_onPreferencesChanged")))},_onPreferencesChanged:function(){var b=this._preferencesService.getValue(this._LIVE_EDITOR_PROGRAMMING_AIDS_PREFERENCE_KEY,1);this._codingUI.setMode(1===b)}})})},
"MW/rtc/plugins/language/matlab/codingui/view/CodingUIViewProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./CodingUIView"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.cursorcontroller rtc.view rtc.domnode rtc.internaldocument rtc.code.codingui.contextmanager rtc.shadowtextservice rtc.code.codingui.eventbus rtc.tooltipservice rtc.document matlab.tokens".split(" ")}},createInstance:function(d,b,a,c,f,g,l,m,p,n){return new e(d,b,
a,c,f,g,l,m,p,n)}})})},"MW/rtc/plugins/language/matlab/codingui/view/CodingUIView":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/keys MW/rtc/abstract/AbstractPlugin MW/rtc/view/ViewEventUtilities ./CodingUIFunctionAssistantView ./CodingUIShadowTextView ./CodingUISuggestionView ./CodingUIViewProxy ../CodingUIContextEvents ../utilities/CodingUIContextUtilities ../utilities/CodingUIWidgetUtilities".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p,n){return g(b,{_LAYER_CSS:"mwCodingUILayer",
constructor:function(a,b,d,g,m,p,n,x,y,B){this._cursor=a.getCursors()[0];this._rtcView=b;this._contextManager=m;this._document=y;this._topView=new l;this._shadowTextView=new h(this._cursor,y,m,p);this._functionAssistantView=new c(b,m,d,n,this._shadowTextView,x,this._cursor,g,B,y);this._suggestionView=new k(b,this._cursor,m,d,g,n,this._shadowTextView,x,y,B);this.own(e.after(this._contextManager,"onContextUpdated",f.hitch(this,"_handleContextUpdated"),!0));this.own(e.after(b,"onViewUpdated",f.hitch(this,
"_handleViewUpdated"),!0));this._scrolledIntoViewNow=!1},_handleContextUpdated:function(a){switch(a){case m.CONTEXT_RESET:case m.LEAVING_RANGE:case m.SILENT_RESET:this._updateViewOnInvalidContext();break;case m.CONTEXT_SWITCHED:this._updateViewOnContextChanged()}},_handleViewUpdated:function(c){if(a.hasHeightEvent(c)||a.hasWidthEvent(c)||a.hasScrollEvent(c)){var b=this._contextManager.getContext();if(b&&this._topView.isDisplayed()){var d=b.position.isValid()&&this._rtcView.isLineInView(b.position.getLineColumn().line,
!0);!d&&this._shouldCloseView(b,c)?this.close():(d&&(this._scrolledIntoViewNow=!1),this._topView.reposition())}}},_shouldCloseView:function(c,b){return this._scrolledIntoViewNow||a.isOnlyClientOrOffsetHeightChange(b)?!1:!0},_updateViewOnInvalidContext:function(){this._shadowTextView.close();this.closeTopView()},_updateViewOnContextChanged:function(){var a=this._contextManager.getContext();this._shadowTextView.close();a.isWidgetReUsed||this.closeTopView();p.isContextInOpaqueNode(a,this._document)?
this._contextManager.reset():this._updateTopView(a)},sendEventToTopView:function(a){var c=this._topView.sendEvent(a),b=this._contextManager.getContext();if(b){var b=b.position.getLineColumn(),d=b.line;c&&this._isTabAction(a)&&!this._rtcView.isLineInView(d,!0)?(this._rtcView.scrollLineColumnIntoView(d,b.column),this._scrolledIntoViewNow=!0):this._scrolledIntoViewNow=!1}return c},_isTabAction:function(a){return a.hasOwnProperty("keyCode")&&a.keyCode===d.TAB},_updateTopView:function(a){var c=a.metaData,
b=c.getData(),d;if(n.isSuggestionWidget(b)){if(b=n.createWidget(c))a.widget=b,d=this._suggestionView}else n.isFunctionAssistantWidget(b)&&((b=a.widget)||(b=n.createWidget(c)),b&&(a.widget=b,d=this._functionAssistantView));d?(this._topView.setView(d),d.update(),d.show()):this._updateViewOnInvalidContext()},isShadowTextViewDisplayed:function(){return this._shadowTextView.isDisplayed()},isTopViewDisplayed:function(){return this._topView.isDisplayed()},closeTopView:function(){this._scrolledIntoViewNow=
!1;return this._topView.close()},close:function(){this._shadowTextView.close();return this.closeTopView()},show:function(){return this._topView.show()},destroy:function(){this._shadowTextView.destroy();this._topView.destroy()}})})},"MW/rtc/plugins/language/matlab/codingui/view/CodingUIFunctionAssistantView":function(){define("dojo/_base/declare dojo/_base/lang ../CodingUIActivities ./CodingUIHighlightView ./CodingUIPopupWidgetView ../utilities/CodingUIContextUtilities ../utilities/CodingUIWidgetUtilities".split(" "),
function(g,f,e,d,b,a,c){return g(b,{_CONTAINER_NAME:"mwCodingUIFunctionAssistant",_CONTAINER_CSS:"mwCodingUIContainer mwCodingUIFunctionAssistant",_FLIPPED_OFFSET:5,_SIGNATURE_CHANGE_EVENT:"signatureChange",constructor:function(a,c,b,e,f,g,q,r,s,t){this._rtcView=a;this._contextManager=c;this._parentContainer=b;this._uiViewEventBus=e;this._shadowTextView=f;this._tooltipService=g;this._cursor=q;this._highlightView=new d(a,r,s,t);this._initialize();this._continueShowingWidget=!1},update:function(){var a=
this._contextManager.getContext(),c=a.activity===e.COMPLETE;if(c){var b=a.metaData.getNextBounds(a.position);if(b){this._uiViewEventBus.onSelectBounds(b);return}}this.isDisplayed()&&(this._continueShowingWidget=!0);this._isActivityForAutomatic(a.activity)||this.close();this._highlightView.close();c&&this._shadowTextView.close();this.inherited(arguments);this._widget&&(this._widget.set("showWidgets",!c),this._widget.set("showSignatures",!1))},show:function(a){var b=this._contextManager.getContext();
if(!b)return!1;var d=b.widget;if(a||this._isActivityForAutomatic(b.activity)||b.isWidgetReUsed&&this._continueShowingWidget){if(!this._show(a))return!1;this._continueShowingWidget=!1;d&&d.moveWidgetIntoView()}a=c.getSelectedCompletion(d);var f=c.getNumberOfChoices(d);b.activity!==e.COMPLETE&&this.isDisplayed()&&this._shadowTextView.show(a);1===f&&a===b.code&&d.set("showWidgets",!1);return!0},_isActivityForAutomatic:function(a){return a!==e.SILENT_UPDATE&&a!==e.CURSOR_SELECTION},_registerEventHandlers:function(a){this.inherited(arguments);
a.on("argument-over",f.hitch(this,"_handleWidgetArgumentOver"));a.on("argument-out",f.hitch(this,"_handleWidgetArgumentOut"));a.on("argument-change",f.hitch(this,"_handleWidgetArgumentChange"));a.on("help",f.hitch(this,"_handleWidgetHelp"))},_handleWidgetArgumentOver:function(c){if(c=c.mwEventData.bounds){var b=this._contextManager.getContext();b.isStale||(c=a.getLineColumnForOffsetBounds(c,b.metaData.getCursorPosition(),b.position),this._highlightView.show({start:{line:c.startLine,column:c.startColumn},
end:{line:c.endLine,column:c.endColumn}}))}},_handleWidgetArgumentOut:function(){this._highlightView.show()},_handleWidgetArgumentChange:function(a){this.showShadowTextIfAllowed(a.mwEventData.newValue.toString())},handleWidgetChange:function(a,b){if(b.mwEventData.type===this._SIGNATURE_CHANGE_EVENT){var d=c.getSelectedCompletion(a);this.showShadowTextIfAllowed(d)}else this.inherited(arguments)},_handleWidgetHelp:function(){this._uiViewEventBus.onRequestHelp()},destroy:function(){this.inherited(arguments);
this._highlightView.destroy()}})})},"MW/rtc/plugins/language/matlab/codingui/view/CodingUIHighlightView":function(){define(["dojo/_base/declare","dojo/dom-construct","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities","./CodingUIAbstractView"],function(g,f,e,d){return g(d,{_HIGHLIGHT_LAYER_CLASS:"mwCodingUIHighlightLayer",_HIGHLIGHT_MARKER_CLASS:"mwCodingUIHighlightMarker",constructor:function(b,a,c,d){this._rtcView=b;this._internalDocument=a;this._tokenService=c;this._document=d;this._layer=
this._createLayer();b.addLayer(this._layer)},_createLayer:function(){return f.create("div",{"class":this._HIGHLIGHT_LAYER_CLASS})},_createHighlightMarkerDiv:function(b,a){var c=this._rtcView.getCoordinateForLineColumn(a.start.line,a.start.column),d=this._rtcView.getCoordinateForLineColumn(a.end.line,a.end.column);f.create("div",{"class":this._HIGHLIGHT_MARKER_CLASS,style:{top:c.y+"px",height:c.height+"px",left:c.x+"px",width:d.x-c.x+"px"}},b)},show:function(b){this._clear();if(b){var a=this._createLayer();
b.start.line===b.end.line?this._createHighlightMarkerDiv(a,b):this._createHighlightMarkerDivForEachLine(a,b);this._rtcView.switchLayer(a,this._layer);this._layer=a}},_createHighlightMarkerDivForEachLine:function(b,a){for(var c=a.end.line,d=a.start.line;d<=c;d++){var e=this._getStartAndEndColumnToHighlightForLine(a,d);this._createHighlightMarkerDiv(b,{start:{line:d,column:e.startColumn},end:{line:d,column:e.endColumn}})}},_getStartAndEndColumnToHighlightForLine:function(b,a){var c=b.start.line;if(a===
b.end.line)var c=this._getTrimmedStartColumn(a,1),d=b.end.column;else d=this._getLineLength(a),c=a===c?b.start.column:this._getTrimmedStartColumn(a,1),d=this._getTrimmedEndColumn(a,d+1);return{startColumn:c,endColumn:d}},_getTrimmedStartColumn:function(b,a){for(var c=a,d=this._getLineLength(b),e=a;e<d&&" "===this._document.getTextCharacters(b-1,e-1,1);e++)c++;return c},_getTrimmedEndColumn:function(b,a){for(var c=this._tokenService.getTokensOnLine(b-1),d=a,f=c.length-1;1<=f;f--){var g=c[f];if(e.isDotDotDotToken(g)){d=
g.getColumn()+1;c=c[f-1];e.isWhitespaceToken(c)&&(d=c.getColumn()+1);break}}return d},_getLineLength:function(b){return this._internalDocument.getLineNode(b-1).getTextForPositioning().length},close:function(){this._clear()},_clear:function(){f.empty(this._layer)},destroy:function(){this._clear()}})})},"MW/rtc/plugins/language/matlab/codingui/view/CodingUIAbstractView":function(){define(["dojo/_base/declare"],function(g){return g(null,{isDisplayed:function(){},show:function(f){},close:function(){},
update:function(){},sendEvent:function(f){},destroy:function(){}})})},"MW/rtc/plugins/language/matlab/codingui/view/CodingUIPopupWidgetView":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/keys ../utilities/CodingUIWidgetUtilities ./CodingUIAbstractView".split(" "),function(g,f,e,d,b,a){return g(a,{_CONTAINER_NAME:null,_CONTAINER_CSS:null,_BOTTOM_MAX_HEIGHT:200,_BOTTOM_OFFSET:5,_FLIPPED_OFFSET:0,_INVALID_MATCH_TYPES_FOR_REPOSITION:["filename","folder","literal"],_initialize:function(){var a=
this._createContainer();a.addEventListener("mousedown",function(a){a.preventDefault()});this._parentContainer&&e.place(a,this._parentContainer);this._container=a},isDisplayed:function(){return"none"!==this._container.style.display},update:function(){var a=this._contextManager.getContext(),b=a.widget;b!==this.getWidget()&&(this.destroy(),this.setWidget(b));b.set("data",a.metaData.getData())},getWidget:function(){return this._widget},setWidget:function(a){a!==this.getWidget()&&this._registerEventHandlers(a);
this._widget=a},_registerEventHandlers:function(a){a.on("size-change",f.hitch(this,"reposition"));a.on("change",f.hitch(this,"handleWidgetChange",a));a.on("select",f.hitch(this,"_handleWidgetSelect"))},handleWidgetChange:function(a,b){this._uiViewEventBus.onCompleteText(b.mwEventData.newValue.toString(),b)},_handleWidgetSelect:function(a){this.showShadowTextIfAllowed(a.mwEventData.newValue.toString())},showShadowTextIfAllowed:function(a){!this._cursor.hasSelection()&&this.isDisplayed()&&this._shadowTextView.show(a)},
show:function(a){return this._show(a)},_show:function(a){if(this._widget)return this._ensureTooltipRemoved(),a=a?this._tooltipService.PRIORITY.ON_DEMAND:this._tooltipService.PRIORITY.AUTO,this._tooltipServiceHandle=this._tooltipService.requestTooltip(f.hitch(this,"_showCallback"),f.hitch(this,"_closeCallback"),a),!!this._tooltipServiceHandle},_showCallback:function(){this._showContainer();this._showWidget();this.reposition()},_closeCallback:function(){this.close()},close:function(){this._contextManager.getContext()||
(this._widget=null);this._ensureTooltipRemoved();return this.isDisplayed()?(this._closeContainer(),!0):!1},_ensureTooltipRemoved:function(){this._tooltipServiceHandle&&(this._tooltipServiceHandle.remove(),this._tooltipServiceHandle=null)},sendEvent:function(a){return a.hasOwnProperty("keyCode")?this._handleKeyEvent(a):!1},_handleKeyEvent:function(a){return a.keyCode===d.TAB?this._handleTabKey(a):a.keyCode===d.F1&&(a.metaKey||a.ctrlKey)?this._handleCtrlF1Key():this.getWidget().navigate(a)},_handleTabKey:function(a){var b=
this._contextManager.getContext();return this.isDisplayed()?(a=this.getWidget().navigate(a),!a?(this.close(),!0):a):b.metaData.hasSuggestion()?this.show(!0):!1},_handleCtrlF1Key:function(){return this.isDisplayed()?this.close():this.show(!0)},reposition:function(){var a=this._contextManager.getContext();a&&(a=this._getCoordinateForPosition(a),this._reposition(a.x,a.y))},_reposition:function(a,b){this._container.style.left=a+"px";this._container.style.top=b+"px"},_showWidget:function(){this._widget.placeAt(this._container);
this._widget.startup()},_getCoordinateForPosition:function(a){var b=this._rtcView.getCoordinateForLineColumn(this._getLineNumberForPositioning(a),this._getColumnNumberForPositioning(a)),d=this._getPageX(b);a=this._getPageY(b);var b=a+b.height,d=d-this._widget.get("alignmentXOffset"),e=b+this._BOTTOM_OFFSET;e+this._BOTTOM_MAX_HEIGHT>window.innerHeight&&a>window.innerHeight-b?(this._widget.set("position","top"),e=a-(this._widget.domNode.clientHeight+this._FLIPPED_OFFSET)):this._widget.set("position",
"bottom");a=this._parentContainer.getBoundingClientRect().left;return{x:Math.max(a,d,0),y:e}},_getLineNumberForPositioning:function(a){return a.position.getLineColumn().line},_getColumnNumberForPositioning:function(a){var b=a.position.getNode().rootContainer().maxOffset()+1,d=a.leftMostBounds.left;this._shouldUpdateColumnForDotNotation(a)&&(a=a.metaData.getData().value.lastIndexOf("."),d=d+a+1);return Math.min(d,b)},_shouldUpdateColumnForDotNotation:function(a){a=b.getCompletionChoices(a.widget);
if(!a||0===a.length)return!1;for(var d=0;d<a.length;d++){var e=a[d];if(!e.displayString||0<=this._INVALID_MATCH_TYPES_FOR_REPOSITION.indexOf(e.matchType)||-1===e.completion.indexOf("."))return!1}return!0},_getPageX:function(a){return a.pageX},_getPageY:function(a){var b=this._rtcView.getDomtarget().getBoundingClientRect().top,d=this._rtcView.getDomTargetPosition().scrollTop;return a.y+b-d},_showContainer:function(){this._container.style.display=""},_closeContainer:function(){this._container.style.display=
"none"},_clearContainer:function(){e.empty(this._container)},_createContainer:function(){return e.create("div",{className:this._CONTAINER_CSS,style:"display: none","data-testid":this._CONTAINER_NAME})},destroy:function(){this._widget&&(this._widget.domNode&&!this._contextManager.isWidgetHeld(this._widget))&&(this._widget.destroy(),this._widget=null);this._closeContainer();this._clearContainer()}})})},"MW/rtc/plugins/language/matlab/codingui/view/CodingUIShadowTextView":function(){define("dojo/_base/declare dojo/_base/lang MW/rtc/model/DocumentUtilities ./CodingUIAbstractView ../CodingUIActivities ../utilities/CodingUIWidgetUtilities".split(" "),
function(g,f,e,d,b,a){return g(d,{_SHADOWTEXT_CSS:"mwCodingUIShadowText",_SINGLE_QUOTE:"'",_DOUBLE_QUOTE:'"',constructor:function(a,b,d,e){this._cursor=a;this._document=b;this._contextManager=d;this._shadowTextService=e;this._shadowTextBeforeCursorHandle=this._shadowTextAfterCursorHandle=null},isDisplayed:function(){return null!==this._shadowTextAfterCursorHandle},show:function(c){var b=this._contextManager.getContext();b&&(this._destroy(),this._cursor.position.isEqualTo(b.position)&&c&&0!==a.getNumberOfChoices(b.widget)&&
this._createShadowTextViews(b,c))},_createShadowTextViews:function(a,b){var d=a.code,e=a.position.getLineColumn().column-a.currentBounds.left,f=this._getShadowTextAfterCursor(d,e,b);if(f&&(this._shadowTextAfterCursorHandle=this._createView(f.text,f.position),d=this._getShadowTextBeforeCursor(d,e,b)))this._shadowTextBeforeCursorHandle=this._createView(d.text,d.position),this._cursor.onUpdate(!0)},_getShadowTextAfterCursor:function(a,b,d){a=this._getShadowTextInfo(a,b,d);a.leftTextMatch&&b++;if((a.leftMatch||
a.leftTextMatch)&&a.rightMatch){b=d.slice(b,d.length-a.right.length);if(!b)return null;d=this._cursor.getLineColumn();d=this._document.createPositionAtLineColumn(d.line-1,d.column-1,!0);return{text:b,position:d}}return null},_getShadowTextBeforeCursor:function(a,b,d){b=this._getShadowTextInfo(a,b,d);return b.leftTextMatch&&b.rightMatch?(b=this._cursor.getLineColumn(),a=this._document.createPositionAtLineColumn(b.line-1,b.column-1-a.length,!0),{text:d.charAt(0),position:a}):null},_getShadowTextInfo:function(a,
b,d){var e=a.substr(0,b);a=a.substr(b,a.length);b=this._isRightTextAllowed(a);var f=d.toLowerCase().indexOf(e.toLowerCase());d=d.charAt(0);return{left:e,right:a,rightMatch:b,leftMatch:0===f,leftTextMatch:1===f&&("'"===d||'"'===d)}},_createView:function(a,b){var d=b.getLineColumn(),d={text:a,cssClass:this._SHADOWTEXT_CSS,updateCallback:f.hitch(this,"_handleServiceUpdate",d,a),position:b};return this._shadowTextService.requestTextAtPosition(d)},_handleServiceUpdate:function(a,b,d){var f=d.position.getLineColumn(),
g=f.column-a.column,p=e.getTextRangeFromLeftToPosition(d.position),p=p?p.text:"",p=g?p.substr(-g):"",n=b.substr(0,g);f.column<a.column||p!==n||0!==g&&g===b.length?d.remove():d.update(b.substring(g));this._cursor.onUpdate(!0)},_isRightTextAllowed:function(a){return""===a||a===this._SINGLE_QUOTE||a===this._DOUBLE_QUOTE},close:function(){this._destroy()},destroy:function(){this._destroy()},_destroy:function(){this._shadowTextBeforeCursorHandle&&(this._shadowTextBeforeCursorHandle.remove(),this._shadowTextBeforeCursorHandle=
null);this._shadowTextAfterCursorHandle&&(this._shadowTextAfterCursorHandle.remove(),this._shadowTextAfterCursorHandle=null,this._cursor.onUpdate(!0))}})})},"MW/rtc/plugins/language/matlab/codingui/view/CodingUISuggestionView":function(){define(["dojo/_base/declare","../CodingUIActivities","../utilities/CodingUIWidgetUtilities","./CodingUIPopupWidgetView"],function(g,f,e,d,b){return g(d,{_CONTAINER_NAME:"mwCodingUISuggestion",_CONTAINER_CSS:"mwCodingUIContainer mwCodingUISuggestion",_FLIPPED_OFFSET:5,
constructor:function(a,c,b,d,e,f,g,n,q,r){this._rtcView=a;this._cursor=c;this._contextManager=b;this._parentContainer=d;this._internalDocument=e;this._uiViewEventBus=f;this._shadowTextView=g;this._tooltipService=n;this._document=q;this._tokenService=r;this._initialize()},update:function(){this.inherited(arguments);var a=this._contextManager.getContext(),c=e.getNumberOfChoices(a.widget);(0>=c||!this._isActivityAllowed(a.activity))&&this.close();(0===c||this._cursor.hasSelection())&&this._shadowTextView.close()},
show:function(a){if(this._cursor.hasSelection())return!1;var c=this._contextManager.getContext(),b=c.widget;if(!this._isCursorAtValidPositionForCompletions(c))return!1;if(!a&&!this._isActivityAllowed(c.activity)||!this._showView(c,a)||!this._show(a))return!0;a=e.getSelectedCompletion(b);this._shadowTextView.show(a);return!0},_isCursorAtValidPositionForCompletions:function(a){var c=a.metaData,b=this._cursor.getLineColumn(),d=b.line,b=b.column;a=c.getLeftMostBounds(a.position).right;d=this._document.getTextCharacters(d-
1,b-1,1);return b===a||b===a-1&&("'"===d||'"'===d)},_isActivityAllowed:function(a){return a!==f.COMPLETE&&a!==f.SILENT_UPDATE&&a!==f.CURSOR_SELECTION},_showView:function(a,c){var b=a.widget;if(0===e.getNumberOfChoices(b))return!1;b=e.getSelectedCompletion(b);return!c&&b===a.code?!1:!0}})})},"MW/rtc/plugins/language/matlab/codingui/view/CodingUIViewProxy":function(){define(["dojo/_base/declare","mw-log/Log","./CodingUIAbstractView"],function(g,f,e){return g(e,{constructor:function(){this._view=null},
setView:function(d){f.assert(d instanceof e,"The view instance to configure must be of CodingUIAbstractView");this._view=d},getView:function(){return this._view},sendEvent:function(d){return this._view&&this._view.sendEvent(d)},isDisplayed:function(){return this._view&&this._view.isDisplayed()},reposition:function(){return this._view&&this._view.reposition()},show:function(d){return this._view&&this._view.show(d)},close:function(){return this._view&&this._view.close()},destroy:function(){this._view&&
(this._view.destroy(),this._view=null)}})})},"MW/rtc/plugins/language/matlab/contextualselection/ContextualSelectionUtilityProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./ContextualSelectionUtility"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cursor","rtc.internaldocument"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/language/matlab/contextualselection/ContextualSelectionUtility":function(){define(["dojo/_base/declare",
"dojo/string","dojo/i18n!l10n/nls/actions","MW/rtc/abstract/AbstractPlugin","MW/rtc/model/DocumentUtilities"],function(g,f,e,d,b){return g(d,{constructor:function(a,c){this._cursor=a;this._internalDocument=c},getText:function(){var a=null;return a=this._cursor.selectedText()?this._cursor.selectedText().trim():this._getTextAtPosition()},_getTextAtPosition:function(){var a=b.getWordAtPosition(this._internalDocument,this._cursor.position),c;a&&(c=a.text);return c},getUpdatedLabel:function(a,c,b){var d=
this.getText(),e="";return e=d?1<d.split("\n").length?a:30<d.length?f.substitute(b,[d.substring(0,30)]):f.substitute(c,[d]):a}})})},"MW/rtc/plugins/language/matlab/contextualselection/EvaluateSelectionProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/plugins/language/matlab/utilities/MatlabPluginUtilities","MW/rtc/plugins/language/matlab/contextualselection/EvaluateSelection","MW/rtc/core/provider/PluginProvider"],function(g,f,e,d,b){return g(b,{requires:function(){return{createInstance:["rtc.document",
"rtc.cursor","rtc.eventhandler","rtc.actionservice","rtc.executionservice"]}},createInstance:function(a,c,b,e,f){return new d(a,c,b,e,f)},priority:function(){return 1}})})},"MW/rtc/plugins/language/matlab/contextualselection/HelpOnSelectionProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./HelpOnSelection"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.helpservice","rtc.cursor","rtc.actionservice","rtc.eventhandler","rtc.contextualselection.utility"]}},
createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/language/matlab/contextualselection/HelpOnSelection":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","dojo/i18n!l10n/nls/actions","MW/rtc/abstract/AbstractPlugin"],function(g,f,e,d,b){return g(b,{constructor:function(a,c,b,g,l){this._helpService=a;this._cursor=c;this._actionService=b;this._contextualSelectionUtility=l;this.own(e.after(g,"onMouseDown",f.hitch(this,"_updateLabel")));a=[{id:"help_on_selection",
key:"f1",shortcut:"F1",contextMenuGroup:"Selections",text:d.helpOnSelectionLabel,enabled:!0,callback:f.hitch(this,"_helpOnSelection")}];b.loadActions(a)},_helpOnSelection:function(){if(this._actionService.getAction("help_on_selection").enabled){var a=this._getText();this._helpService.showInHelpBrowser(a)}},_getText:function(){var a=this._contextualSelectionUtility.getText();a||(a="");return a},_updateLabel:function(){var a=this._contextualSelectionUtility.getUpdatedLabel(d.helpOnSelectionLabel,d.helpLabel,
d.helpLabelTruncated);this._actionService.updateAction("help_on_selection",{text:a})}})})},"MW/rtc/plugins/language/matlab/contextualselection/HelpServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./HelpService"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.executionservice"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/language/matlab/contextualselection/HelpService":function(){define(["dojo/_base/declare",
"MW/rtc/abstract/AbstractPlugin","MW/rtc/model/CodeUtilities"],function(g,f,e){return g(f,{_HELP_COMMAND:"helpPopup ",constructor:function(d){this._executionService=d},showInHelpBrowser:function(d){d=e.getMATLABStringFromCodeText(d);this._executionService.executionEval(this._HELP_COMMAND+"("+d+")")}})})},"MW/rtc/plugins/language/matlab/contextualselection/OpenSelectionProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/plugins/language/matlab/utilities/MatlabPluginUtilities",
"MW/rtc/plugins/language/matlab/contextualselection/OpenSelection","MW/rtc/core/provider/PluginProvider"],function(g,f,e,d,b){return g(b,{requires:function(){return{createInstance:"rtc.internaldocument rtc.cursor rtc.eventhandler rtc.actionservice rtc.executionservice rtc.functionservice rtc.contextualselection.utility".split(" ")}},createInstance:function(a,c,b,e,f,g,p){return new d(a,c,b,e,f,g,p)}})})},"MW/rtc/plugins/language/matlab/contextualselection/OpenSelection":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/on dojo/touch MW/rtc/abstract/AbstractPlugin MW/rtc/model/CodeUtilities MW/rtc/RichTextComponentFeatureEnum dojo/i18n!l10n/nls/actions".split(" "),
function(g,f,e,d,b,a,c,h,k){return g(a,{constructor:function(a,c,b,d,g,r,s){this._internalDocument=a;this._cursor=c;this._actionService=d;this._executionService=g;this._functionService=r;this._contextualSelectionUtility=s;this.own(e.after(b,"onMouseDown",f.hitch(this,this._updateLabel)));a=[{id:h.OPEN_SELECTION.OPEN_SELECTION_ACTION,key:"ctrl_d",shortcut:"Ctrl+D",platformKey:{mac:"meta_shift_d"},enabled:!0,contextMenuGroup:"Selections",text:k.openSelectionLabel,callback:f.hitch(this,"_openSelectionCallback")}];
this._actionService.loadActions(a)},_openSelectionCallback:function(){if(this._actionService.getAction(h.OPEN_SELECTION.OPEN_SELECTION_ACTION).enabled)return this.openSelection()},_updateLabel:function(){var a=this._contextualSelectionUtility.getUpdatedLabel(k.openSelectionLabel,k.openLabel,k.openLabelTruncated);this._actionService.updateAction(h.OPEN_SELECTION.OPEN_SELECTION_ACTION,{text:a})},_getLocalFunctionInfo:function(a){var c=this._functionService.getFunctionDeclarationByName(a);if(c)return c;
this._functionService.getAllFunctionDeclarations().some(function(b){return b.getName()===a?(c=b,!0):!1});return c},openSelection:function(){var a=this._contextualSelectionUtility.getText();if(a){var b=this._getLocalFunctionInfo(a);b?this._cursor.setLineColumn(b.getStartLine(),1,!0):(a=c.getMATLABStringFromCodeText(a),this._executionService.executionEval("try open("+a+"); catch edit("+a+"); end;"))}}})})},"MW/rtc/plugins/language/matlab/commentCode/CommentCodeProvider":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/language/matlab/commentCode/CommentCode","MW/rtc/plugins/language/matlab/utilities/MatlabPluginUtilities","MW/rtc/core/provider/PluginProvider"],function(g,f,e,d){return g(d,{isApplicable:function(b){return e.isMatlabCodeFileOrBuffer(b)},requires:function(){return{isApplicable:["rtc.backingstore"],createInstance:["rtc.cursor","rtc.actionservice","rtc.document","rtc.internaldocument","rtc.nodeconversionrulesservice"]}},createInstance:function(b,a,c,d,e){return new f(b,a,c,d,e)}})})},
"MW/rtc/plugins/language/matlab/commentCode/CommentCode":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect mw-string-utils/StringUtils MW/rtc/abstract/AbstractPlugin MW/rtc/model/CodeUtilities MW/rtc/model/DocumentConstants MW/rtc/model/events/NumberOfLinesChangedEvent MW/rtc/plugins/language/matlab/utilities/MatlabPluginUtilities MW/rtc/plugins/nodeconversionrules/NodeConversionRulesUtilities MW/rtc/plugins/richtext/nodes/inner/RichTextParagraphNode MW/rtc/RichTextComponentFeatureEnum dojo/i18n!l10n/nls/actions".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){return g(b,{_DEFAULT_COMMENT_STRING:"%",_DEFAULT_COMMENT_ANNOTATION:"% ",constructor:function(a,c,b,d,h){this._cursor=a;this._document=b;this._internalDocument=d;this._actionService=c;this._nodeConversionRules=h;a=[{id:p.COMMENT.COMMENT_ACTION,key:"ctrl_r",platformKey:{mac:"meta_/"},contextMenuGroup:"Default",enabled:!0,shortcut:n.commentShortcut,description:n.commentDescription,icon:"smallInsertComment",callback:f.hitch(this,"_comment")},{id:p.COMMENT.UNCOMMENT_ACTION,
enabled:!0,contextMenuGroup:"Default",description:n.uncommentDescription,icon:"smallUncomment",callback:f.hitch(this,"_uncomment")}];this._actionService.loadActions(a);this._actionService.updateAction(p.COMMENT.COMMENT_ACTION,{enabled:!0});this._actionService.updateAction(p.COMMENT.UNCOMMENT_ACTION,{enabled:!0});this.own(e.after(this._cursor,"onChange",f.hitch(this,this._updateActionState)));this.own(e.after(this._document,"onChange",f.hitch(this,this._updateActionsOnDocumentChange),!0))},_commentValid:function(){return!this._document.isReadOnly()&&
!this._cursor.isCursorReadOnly()},_comment:function(){this._actionService.getAction(p.COMMENT.COMMENT_ACTION).enabled&&this._commentValid()&&this._augmentSelection(f.hitch(this,"_commentAugmenter"))},_uncomment:function(){this._actionService.getAction(p.COMMENT.UNCOMMENT_ACTION).enabled&&this._commentValid()&&this._augmentSelection(f.hitch(this,"_uncommentAugmenter"))},_augmentSelection:function(a){var c,b;if(b=this._cursor.getSelection()){c=b.getStartPosition().getLineColumn().line;var d=b.getEndPosition().getLineColumn();
b=1===d.column&&!b.fileEndSelected()?d.line-1:d.line}else c=b=this._cursor.getLineColumn().line;this._augmentLines(c,b,a)},_augmentLines:function(a,c,b){for(var d=this._document.startBlockEdit(),e=a;e<=c;e++)this._document.isLineCode(e)&&b(e);d.appendRedoEvents([h.create(a-1,c-1,0)]);d.appendUndoEvents([h.create(a-1,c-1,0)]);this._document.endBlockEdit(d)},_commentAugmenter:function(a){var c=this._cursor.getSelection();if(c)var b=c.getStartPosition().getLine(),d=c.getEndPosition().getLine();this._document.insertText(this._DEFAULT_COMMENT_ANNOTATION,
a,1);this._checkAndExtendSelection(c,b,d)},_checkAndExtendSelection:function(a,c,b){a&&(c=this._internalDocument.getLineNode(c-1),b=this._internalDocument.getLineNode(b-1),a.getStartPosition().setPosition(c.startNode(),0),a.getEndPosition().setPosition(b.endNode(),b.endNode().maxOffset()),this._cursor.setSelection(a))},_uncommentAugmenter:function(a){var c=this._document.getLineText(a),b="";if(0===d.leftTrim(c).indexOf(this._DEFAULT_COMMENT_ANNOTATION))b=this._DEFAULT_COMMENT_ANNOTATION;else if(0===
d.leftTrim(c).indexOf(this._DEFAULT_COMMENT_STRING))b=this._DEFAULT_COMMENT_STRING;else return;var c=c.indexOf(b)+1,b=c+b.length,e=this._cursor.getSelection();if(e)var f=e.getStartPosition().getLine(),h=e.getEndPosition().getLine();this._document.deleteText(a,c,a,b);this._checkAndExtendSelection(e,f,h)},_updateActionsOnDocumentChange:function(a){a&&f.isArray(a)&&a.some(function(a){if(a.type===c.READONLY_STATE_CHANGE_EVENT)return this._updateActionState(),!0},this)},_updateActionState:function(){var a=
this._isCodeInRange(),c=!this._cursor.isCursorReadOnly(),a=a&&c&&l.textContainersInCursorConvertibleTo(this._cursor,m,this._nodeConversionRules);this._actionService.updateAction(p.COMMENT.COMMENT_ACTION,{enabled:a});this._actionService.updateAction(p.COMMENT.UNCOMMENT_ACTION,{enabled:a})},_isCodeInRange:function(){var c=this._cursor.selectionInfo();return a.isCodeInRange(c.startNode,c.endNode)},getCommentAnnotation:function(){return this._DEFAULT_COMMENT_ANNOTATION}})})},"MW/rtc/plugins/nodeconversionrules/NodeConversionRulesUtilities":function(){define(["MW/rtc/model/NodeUtilities"],
function(g){return{textContainersInCursorConvertibleTo:function(f,e,d){var b=!0,a=f.getSelection();if(!a)return a=f.getNode().textContainer(),d.isNodeConvertibleTo(a,e);f=a.getStartPosition().getNode();a=a.getEndPosition().getNode();g.textContainerNodesInRangeIterator(f,a,function(a){a=a.textContainer();if(!d.isNodeConvertibleTo(a,e))return b=!1,!0});return b}}})},"MW/rtc/plugins/language/matlab/filetype/FileTypeProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider",
"./FileType","MW/rtc/plugins/language/matlab/utilities/MatlabPluginUtilities"],function(g,f,e,d,b){return g(e,{isApplicable:function(a){return b.isMatlabCodeFileOrBuffer(a)},requires:function(){return{isApplicable:["rtc.backingstore"],createInstance:["rtc.document","rtc.editordataservice"]}},createInstance:function(a,c){return new d(a,c)}})})},"MW/rtc/plugins/language/matlab/filetype/FileType":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/abstract/AbstractDocumentSynchronizableMixin",
"MW/rtc/abstract/AbstractPlugin"],function(g,f,e,d){return g([d,e],{_FILE_TYPE_INFO:"matlab.code.filetype",FILE_TYPE:{ScriptFile:0,FunctionFile:1,ClassDefinitionFile:2,Unknown:3},constructor:function(b,a){this._document=b;this._editorDataService=a;this._fileType=-1;this._isFileTypeSupported=null;this._connections=[];this.initializeSynchronizable(b);this._connections.push(this._editorDataService.listenTo(this._FILE_TYPE_INFO,f.hitch(this,"_updateFileType")))},isFunction:function(){return this.getFileType()===
this.FILE_TYPE.FunctionFile},isClass:function(){return this.getFileType()===this.FILE_TYPE.ClassDefinitionFile},isScript:function(){return this.getFileType()===this.FILE_TYPE.ScriptFile||this.getFileType()===this.FILE_TYPE.Unknown},getFileType:function(){return this._fileType},onFileTypeChange:function(b,a){},onSupportedFileTypeChange:function(b,a){},_updateFileType:function(b){var a=this._fileType;this._fileType=this.FILE_TYPE[b.fileType];this._fileType!==a&&(this.onFileTypeChange(this._fileType,
a),this._isFileTypeSupported!==b.isFileTypeSupported&&(this._isFileTypeSupported=b.isFileTypeSupported,this.onSupportedFileTypeChange(this._isFileTypeSupported,this._fileType)));this._document.getState()===b.documentState&&this.markClean()},destroy:function(){this._connections.forEach(function(b){b.remove()})}})})},"MW/rtc/plugins/language/matlab/functionhints/FunctionHintsProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/language/matlab/functionhints/FunctionHints",
"MW/rtc/plugins/language/matlab/utilities/MatlabPluginUtilities"],function(g,f,e,d,b){return g(e,{isApplicable:function(a){return b.isMatlabCodeFileOrBuffer(a)},requires:function(){return{isApplicable:["rtc.backingstore"],createInstance:"rtc.document rtc.cursor rtc.focusservice rtc.editordataservice rtc.actionservice rtc.functionargumentnotifier rtc.view".split(" ")}},createInstance:function(a,c,b,e,f,g,p){return new d(a,c,b,e,f,g,p)},destroyInstance:function(a){a.dispose()}})})},"MW/rtc/plugins/language/matlab/functionhints/FunctionHints":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-style dojo/dom-construct mw-log/Log dijit/popup dijit/TooltipDialog dojo/mouse dojo/on dojo/touch MW/rtc/plugins/functionnotifier/FunctionStateConstants".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p){return g(null,{_FUNCTION_HINTS_FEATURE_ID:"code.functionhints",constructor:function(a,c,d,g,k,p,v){this._document=a;this._cursor=c;this._editorDataService=g;this._handles=[];this._view=v;this._tooltipInfo={tooltipDialog:new h({"class":"rtcTooltip",style:"width: 300px; word-wrap: break-word;"}),isTooltipOpen:!1};this._isCancelled=!1;this._actionService=k;this._functionNotifier=p;this._functionHintsHolder=b.create("div",{"class":"functionHintsHolder",style:{position:"absolute",
top:"0px",left:"0px",width:"0px",height:"0px"}});b.place(this._functionHintsHolder,this._view.getDomtarget());a=[{id:"rtc_function_hints",key:"ctrl_f1",platformKey:{mac:"ctrl_f1"},enabled:!0,callback:f.hitch(this,"_toggleTooltip")},{id:"rtc_function_hints_close",key:"escape",enabled:!0,callback:f.hitch(this,"_closeTooltip")}];this._actionService.loadActions(a);this._handles.push(e.after(this._functionNotifier,"onFunctionNavigationNotify",f.hitch(this,"_checkForFunctionHints"),!0));this._handles.push(e.after(this._document,
"onChange",f.hitch(this,"_openFunctionHints")));this._handles.push(l(v.getDomtarget(),m.press,f.hitch(this,"_closeTooltipOnRightClick")));this._handles.push(e.after(d,"onBlur",f.hitch(this,"_closeTooltip")))},_toggleTooltip:function(){this._tooltipInfo.isTooltipOpen?this._closeTooltip():this.showFunctionHints()},showFunctionHints:function(){var a=this._functionNotifier.getFunctionInfo();a?(this._updateHintsHolderPosition(),this._triggerFunctionHints(a.text)):this._functionHintsScheduled=!0},_updateHintsHolderPosition:function(){var a=
this._cursor.getLineColumn(),a=this._view.getCoordinateForLineColumn(a.line,a.column);this._setHolderPosition(a.y,a.x,a.height)},_setHolderPosition:function(a,c,b){d.set(this._functionHintsHolder,{top:a+"px",left:c+"px",height:b+"px"})},_resetHolderPosition:function(){this._setHolderPosition(0,0,0)},_openFunctionHints:function(){"("===this._cursor.charAtCursor(-1)&&this.showFunctionHints()},_checkForFunctionHints:function(a){var c="",b=this._tooltipInfo.isTooltipOpen;this._functionHintsScheduled&&
(this._functionHintsScheduled=!1,this.showFunctionHints());b&&a.type===p.FUNCTION_ARGS_NAVIGATE_ENTER&&(c=a.functionInfo,c.relation===p.INNER_NESTED_FUNCTION_CALL||c.relation===p.OUTER_NESTED_FUNCTION_CALL?(c=c.text,this._updateHintsHolderPosition(),this._triggerFunctionHints(c)):this._closeTooltip());b&&a.type===p.FUNCTION_ARGS_NAVIGATE_CHANGE&&(c=a.functionInfo.text,this._triggerFunctionHints(c));a.type===p.FUNCTION_ARGS_NAVIGATE_EXIT&&this._closeTooltip()},_triggerFunctionHints:function(c){this._isCancelled=
!1;this._editorDataService.request(this._FUNCTION_HINTS_FEATURE_ID,{content:c}).then(f.hitch(this,function(a){this._openFunctionHintsTooltip(a)}),function(c){a.assert(!1,"[Unsuccessful Request] The request for function hints was not sent successfully -\x3e"+c)})},_openFunctionHintsTooltip:function(c){if(this._isCancelled)return this._resetHolderPosition(),!1;if(!c||c.error)a.assert(!1,"[Unsuccessful Response] The data from the server is not received successfully -\x3e"+(c?c.error:""));c.functionHintsResults&&
this._showTooltip(c.functionHintsResults);return!0},_showTooltip:function(a){var b=this._tooltipInfo.tooltipDialog;b.set("content",a);c.open({popup:b,around:this._functionHintsHolder,orient:["below-centered","below","above-centered","above"],onCancel:f.hitch(this,"_closeTooltip")});this._tooltipInfo={tooltipDialog:b,isTooltipOpen:!0};this._tooltipInfo.tooltipDialog.set("data-testid","functionHints_visible")},_closeTooltipOnRightClick:function(a){a&&k.isRight(a)&&this._closeTooltip()},_closeTooltip:function(){this._isCancelled=
!0;return this._tooltipInfo&&this._tooltipInfo.isTooltipOpen?(this._tooltipInfo.tooltipDialog.set("data-testid","functionHints_hidden"),c.close(this._tooltipInfo.tooltipDialog),this._resetHolderPosition(),this._tooltipInfo.isTooltipOpen=!1,!0):!1},dispose:function(){this._closeTooltip();this._tooltipInfo.tooltipDialog.destroy();b.destroy(this._functionHintsHolder);this._tooltipInfo=null;this._handles.forEach(function(a){a.remove()})}})})},"MW/rtc/plugins/language/matlab/syntax/functions/FunctionServiceProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./FunctionService"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.editordataservice","rtc.internaldocument"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/language/matlab/syntax/functions/FunctionService":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/abstract/AbstractPlugin","./FunctionDeclaration","./FunctionDeclarationUtils"],function(g,f,e,d,b){return g(e,{_MATLAB_FUNCTIONS_FEATURE_ID:"matlab.code.functions",
_DEFAULT_FUNCTION_NAME:"untitled",constructor:function(a,c){this._internalDocument=c;this._functionsInfo=[];this._functionDeclarations=null;this._edsHandle=a.listenTo(this._MATLAB_FUNCTIONS_FEATURE_ID,f.hitch(this,"_handleEDSCallback"))},onUpdate:function(){},destroy:function(){this.inherited(arguments);this._edsHandle.remove()},_handleEDSCallback:function(a){this._functionsInfo=a.functionsInfo;this._expandFunctionBounds();this._functionDeclarations=null;this.onUpdate()},_expandFunctionBounds:function(){if(this._functionsInfo&&
!(0<!this._functionsInfo.length)){var a=this._functionsInfo[0];a.isTopLevelFunction&&!this._functionsInfo[1]&&(a.endLine=this._internalDocument.getMaxLineNumber())}},getFunctionsInfo:function(){return this._functionsInfo},getLocalFunctionsInfo:function(){return this._filterForLocalFunctions(this._functionsInfo)},getTopLevelFunctionInfo:function(){return this._filterForTopFunction(this._functionsInfo)},getAllFunctionDeclarations:function(){return this.getFunctionDeclarations().map(function(a){return b.flattenFunctionDeclaration(a)}).reduce(function(a,
c){return a.concat(c)},[])},getFunctionDeclarations:function(){this._functionDeclarations||this._buildFunctionDeclarations();return this._functionDeclarations},_buildFunctionDeclarations:function(){this._functionDeclarations=this._functionsInfo.map(function(a){return new d(a)})},isFunction:function(a){return!!this._getLocalFunctionInfoByName(a)},getFunctionDeclarationByName:function(a){return(a=this._getLocalFunctionInfoByName(a))?new d(a):null},_getLocalFunctionInfoByName:function(a){var c=null;
this._functionsInfo.some(function(b){return b.functionName===a?(c=b,!0):!1});return c},isLineInFunction:function(a){return!!this._getLocalFunctionInfoByLine(a)},_getLocalFunctionInfoByLine:function(a){var c=null;this._functionsInfo.some(function(b){return a>=b.startLine&&a<=b.endLine?(c=b,!0):!1});return c},isNewLocalFunctionName:function(a){return!this.isFunction(a)},getUniqueFunctionName:function(){var a=this._DEFAULT_FUNCTION_NAME,c=a.length,b=RegExp("^"+this._DEFAULT_FUNCTION_NAME+"\\d*$"),d=
this.getLocalFunctionsInfo().filter(function(a){return b.test(a.functionName)}).map(function(a){return a.functionName.slice(c)}).reduce(function(a,c){return Math.max(a,c)},-Infinity);return-Infinity<d?a+(d+1):a},_filterForLocalFunctions:function(a){return a.filter(function(a){return!a.isTopLevelFunction&&!a.isClassMethod})},_filterForTopFunction:function(a){return a.filter(function(a){return a.isTopLevelFunction})}})})},"MW/rtc/plugins/language/matlab/syntax/functions/FunctionDeclaration":function(){define(["dojo/_base/declare"],
function(g){return g(null,{constructor:function(f){this._data=f},getStartLine:function(){return this._data.startLine},getStartColumn:function(){return this._data.startColumn},getEndLine:function(){return this._data.endLine},getEndColumn:function(){return this._data.endColumn},getName:function(){return this._data.functionName},getInputArgumentNames:function(){return this._data.functionInputArguments},getOutputArgumentNames:function(){return this._data.functionOutputArguments},getNestedFunctionDeclarations:function(){var f=
this.constructor;return this._data.nestedFunctions.map(function(e){return new f(e)})},isTopLevelFunction:function(){return this._data.isTopLevelFunction},isClassMethod:function(){return this._data.isClassMethod}})})},"MW/rtc/plugins/language/matlab/syntax/functions/FunctionDeclarationUtils":function(){define([],function(){return{flattenFunctionDeclaration:function(g){return g.getNestedFunctionDeclarations().reduce(function(f,e){return f.concat(this.flattenFunctionDeclaration(e))}.bind(this),[g])}}})},
"MW/rtc/plugins/functionnotifier/FunctionArgumentNotifierProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/functionnotifier/FunctionArgumentNotifier","MW/rtc/plugins/language/matlab/utilities/MatlabPluginUtilities"],function(g,f,e,d,b){return g(e,{isApplicable:function(a){return b.isMatlabCodeFileOrBuffer(a)},requires:function(){return{isApplicable:["rtc.backingstore"],createInstance:["rtc.document","rtc.cursor"]}},createInstance:function(a,
c){return new d(a,c)}})})},"MW/rtc/plugins/functionnotifier/FunctionArgumentNotifier":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/model/CodeUtilities MW/rtc/plugins/functionnotifier/FunctionUtilities MW/rtc/plugins/functionnotifier/FunctionStateConstants".split(" "),function(g,f,e,d,b,a,c){return g(d,{constructor:function(a,c){this._document=a;this._cursor=c;this._lastEventObject=null;this.own(e.after(c,"onChange",f.hitch(this,"_checkFunctionArgsNavigation")))},
onFunctionNavigationNotify:function(a){},getFunctionInfo:function(){return this._lastEventObject.functionInfo},_checkFunctionArgsNavigation:function(){var a={},b=this._getFunctionInfoForCursorPosition();if(b){var a=!0,d=null;this._lastEventObject&&this._lastEventObject.functionInfo&&(d=this._lastEventObject.functionInfo,a=d.functionName!==b.functionName);a?(b.relation=this._checkForRelationship(b,d),a={type:c.FUNCTION_ARGS_NAVIGATE_ENTER,functionInfo:b}):a=this._lastEventObject.functionInfo.currentArgumentNumber!==
b.currentArgumentNumber?{type:c.FUNCTION_ARGS_NAVIGATE_CHANGE,functionInfo:b}:{type:c.FUNCTION_ARGS_NAVIGATE,functionInfo:b}}else a.type=c.FUNCTION_ARGS_NAVIGATE_EXIT;this._notifyFunctionInfoChanged(a)},_notifyFunctionInfoChanged:function(a){this._lastEventObject=a;this.onFunctionNavigationNotify(a)},_getFunctionInfoForCursorPosition:function(){var c=this._getCodeLineInfoUnderCursor();return!c?null:a.getFunctionArgsInfoForOffset(c.lineText,c.column-1,c.line-1)},_getCodeLineInfoUnderCursor:function(){var a=
this._cursor.selectionInfo();if(!b.isCodeInRange(a.startNode,a.endNode))return null;a=this._cursor.getLineColumn();return{lineText:this._document.getLineText(a.line),line:a.line,column:a.column}},_checkForRelationship:function(a,b){return!b||a.line!==b.line||-1===a.line?null:a.functionCallDepth>b.functionCallDepth?c.INNER_NESTED_FUNCTION_CALL:c.OUTER_NESTED_FUNCTION_CALL}})})},"MW/rtc/plugins/functionnotifier/FunctionUtilities":function(){define(["mw-utils/Utils"],function(g){return{functionComparator:function(f,
e){return f===e?!0:f.functionName===e.functionName&&f.startLine===e.startLine&&f.startColumn===e.startColumn&&f.endLine===e.endLine&&f.endColumn===e.endColumn&&f.isTopLevelFunction===e.isTopLevelFunction&&f.isClassMethod===e.isClassMethod&&g.arrayEquals(f.functionInputArguments,e.functionInputArguments)&&g.arrayEquals(f.functionOutputArguments,e.functionOutputArguments)&&g.arrayEquals(f.nestedFunctions,e.nestedFunctions,this.functionComparator)},getFunctionArgsInfoForOffset:function(f,e,d){var b=
{};if(!f)return null;var a=f.substring(0,e),c=f.substring(e,f.length),h=this._getLastUnClosedOpenParen(a);if(-1==h)return null;a=a.substring(0,h).split(" ").pop();if(!a.trim())return null;b.functionName=a;c=c.indexOf(")");b.isArgsEnclosed=-1!==c;b.isArgsEnclosed?(c=f.substring(h,e+c),b.totalArgsEnclosed=c.split(",").length):b.totalArgsEnclosed=0;h=f.substring(h,e);b.currentArgumentNumber=h.split(",").length;b.text=f.substring(0,e);b.line=d;b.functionCallDepth=this._getUnclosedParenCountTillOffset(b.text);
return b},_getLastUnClosedOpenParen:function(f){var e=f.length,d=f.lastIndexOf("(");if(-1==d)return d;var b=f.substring(0,d),a=f.substring(d,e).indexOf(")");-1<a&&(a=d+a,f=b+"@"+f.substring(d+1,a)+"#"+f.substring(a+1,e),d=this._getLastUnClosedOpenParen(f));return d},_getUnclosedParenCountTillOffset:function(f){var e=f.split("(").length-1;f=f.split(")").length-1;return e-f}}})},"MW/rtc/plugins/functionnotifier/LocalFunctionNotifierProvider":function(){define(["dojo/_base/declare","dojo/_base/lang",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/functionnotifier/LocalFunctionNotifier","MW/rtc/plugins/language/matlab/utilities/MatlabPluginUtilities"],function(g,f,e,d,b){return g(e,{isApplicable:function(a){return b.isMatlabCodeFileOrBuffer(a)},requires:function(){return{isApplicable:["rtc.backingstore"],createInstance:["rtc.functionservice","rtc.code.codeanalyzermodel"]}},createInstance:function(a,c){return new d(a,c)}})})},"MW/rtc/plugins/functionnotifier/LocalFunctionNotifier":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/aspect","MW/rtc/plugins/functionnotifier/AbstractFunctionNotifier"],function(g,f,e,d){return g(d,{constructor:function(b,a){this._functionService=b;this._codeAnalyzerModel=a},getFunctionInfoOfDesiredFunctions:function(){return this._functionService.getLocalFunctionsInfo()}})})},"MW/rtc/plugins/functionnotifier/AbstractFunctionNotifier":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/model/CodeUtilities MW/rtc/plugins/functionnotifier/FunctionUtilities MW/rtc/plugins/functionnotifier/FunctionStateConstants mw-utils/Utils".split(" "),
function(g,f,e,d,b,a,c,h){return g(d,{constructor:function(a,c){this._functionService=a;this._codeAnalyzerModel=c;this.own(e.after(this._codeAnalyzerModel,"onDocumentChangeWithNoSyntaxErrors",f.hitch(this,"_validFunctionsHandler")));this._updatedValidFunctionInfo=[]},onValidFunctionsChange:function(a){},getFunctionInfoOfDesiredFunctions:function(){throw"Unimplemented API in AbstractFunctionNotifier";},_validFunctionsHandler:function(){var a=this.getFunctionInfoOfDesiredFunctions(),b={};0<a.length?
(1>this._updatedValidFunctionInfo.length?b.type=c.VALID_FUNCTIONS_ADDED:this._hasFunctionsChanged(a)?b.type=c.VALID_FUNCTIONS_CHANGED:b.type=c.FUNCTIONS_ON_VALID_DOCUMENT_CHANGE,this._updatedValidFunctionInfo=a,b.validFunctions=this._updatedValidFunctionInfo,this.onValidFunctionsChange(b)):0<this._updatedValidFunctionInfo.length&&(this._updatedValidFunctionInfo=[],b={type:c.VALID_FUNCTIONS_REMOVED},this.onValidFunctionsChange(b))},_hasFunctionsChanged:function(c){return!h.arrayEquals(c,this._updatedValidFunctionInfo,
f.hitch(a,"functionComparator"))}})})},"MW/rtc/plugins/functionnotifier/AllFunctionNotifierProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/functionnotifier/AllFunctionNotifier","MW/rtc/plugins/language/matlab/utilities/MatlabPluginUtilities"],function(g,f,e,d,b){return g(e,{isApplicable:function(a){return b.isMatlabCodeFileOrBuffer(a)},requires:function(){return{isApplicable:["rtc.backingstore"],createInstance:["rtc.functionservice",
"rtc.code.codeanalyzermodel"]}},createInstance:function(a,c){return new d(a,c)}})})},"MW/rtc/plugins/functionnotifier/AllFunctionNotifier":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/plugins/functionnotifier/AbstractFunctionNotifier"],function(g,f,e,d){return g(d,{constructor:function(b,a){this._functionService=b;this._codeAnalyzerModel=a},getFunctionInfoOfDesiredFunctions:function(){return this._functionService.getFunctionsInfo()}})})},"MW/rtc/plugins/functionnotifier/TopLevelFunctionNotifierProvider":function(){define(["dojo/_base/declare",
"dojo/_base/lang","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/functionnotifier/TopLevelFunctionNotifier","MW/rtc/plugins/language/matlab/utilities/MatlabPluginUtilities"],function(g,f,e,d,b){return g(e,{isApplicable:function(a){return b.isMatlabCodeFileOrBuffer(a)},requires:function(){return{isApplicable:["rtc.backingstore"],createInstance:["rtc.functionservice","rtc.code.codeanalyzermodel"]}},createInstance:function(a,c){return new d(a,c)}})})},"MW/rtc/plugins/functionnotifier/TopLevelFunctionNotifier":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/aspect","MW/rtc/plugins/functionnotifier/AbstractFunctionNotifier"],function(g,f,e,d){return g(d,{constructor:function(b,a){this._functionService=b;this._codeAnalyzerModel=a},getFunctionInfoOfDesiredFunctions:function(){return this._functionService.getTopLevelFunctionInfo()}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppBackendServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LiveAppBackendService"],function(g,
f,e){return g(f,{requires:function(){return{createInstance:["rtc.id","rtc.editordataservice"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppBackendService":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin"],function(g,f){return g(f,{constructor:function(e,d){this._rtcId=e;this._editorDataService=d;this._removePromise=this._requestPromise=this._initializePromise=null},initializeApp:function(e,d,b){this._cancelRequest(this._initializePromise);
this._initializePromise=this._sendRequest({editorId:this._rtcId,operation:"initialize",appId:this._getAppId(e),appPath:d});this._initializePromise.then(function(a){(a=a.result)&&b(a)},function(){})},requestData:function(e,d){this._cancelRequest(this._requestPromise);this._requestPromise=this._sendRequest({editorId:this._rtcId,operation:"getData",appId:this._getAppId(e),oldCode:e.getContext("code")});this._requestPromise.then(function(b){(b=b.result)&&d(b.code,b.outputs.join(","),b.summary,b.difference)},
function(){})},removeApp:function(e){this._cancelRequest(this._removePromise);this._removePromise=this._sendRequest({editorId:this._rtcId,operation:"remove",appId:this._getAppId(e)});this._removePromise.then(function(){},function(){})},_sendRequest:function(e){return this._editorDataService.request("matlab.code.codingui.liveapps",e,15E3)},_cancelRequest:function(e){e&&!e.isResolved()&&e.cancel()},_getAppId:function(e){return e.uid},destroy:function(){this.inherited(arguments);this._initializePromise&&
(this._initializePromise.reject(),this._initializePromise=null);this._requestPromise&&(this._requestPromise.reject(),this._requestPromise=null);this._removePromise&&(this._removePromise.reject(),this._removePromise=null)}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppCodeManagerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LiveAppCodeManager"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document","rtc.internaldocument",
"rtc.cursorcontroller","rtc.liveapps.documenthandler","rtc.view.layoutmanager.paragraphhostingmodel"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppCodeManager":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect mw-log/Log MW/rtc/abstract/AbstractPlugin MW/rtc/model/DocumentEventUtilities MW/rtc/model/Range MW/rtc/model/events/DocumentEvent ./LiveAppUtilities".split(" "),function(g,f,e,d,b,a,c,h,k){return g(b,
{constructor:function(a,c,b,d,h){this._document=a;this._internalDocument=c;this._liveAppDocumentHandler=d;this._layoutParagraphHostingModel=h;this._cursor=b.getCursors()[0];this.own(e.after(this._liveAppDocumentHandler,"onUpdate",f.hitch(this,"_handleLiveAppsUpdate"),!0))},_handleLiveAppsUpdate:function(a){var c=this._internalDocument.startBlockEdit();a.forEach(this._configureForGeneratedCode,this);this._internalDocument.endBlockEdit(c)},_configureForGeneratedCode:function(a){var c=this._createRangeOfGeneratedCode(a);
if(c){var b=this._layoutParagraphHostingModel.get(a);b&&b.destroy();this._layoutParagraphHostingModel.set(a,c);k.setCodeRange(a,c);c=this._document.createLinePosition(a,!1);b=this._handleLiveAppLinePositionChange.bind(this,a);k.setLiveAppLineTracker(a,c,b);k.setReadOnly(a,!0,this._document)}else this._removeAllGeneratedCodeInfo(a)},_handleLiveAppLinePositionChange:function(a){a.parent!==this._internalDocument.root&&(k.setReadOnly(a,!1,this._document),this._removeAllGeneratedCodeInfo(a))},_removeAllGeneratedCodeInfo:function(a){this._layoutParagraphHostingModel.delete(a);
k.removeLiveAppLineTracker(a);k.removeCodeRange(a)},_createRangeOfGeneratedCode:function(a){var b=a.getContext("numOfLines")||0;if(1>b)return null;var d=this._internalDocument.getLineNumber(a);a=this._document.createLinePositionInLine(d+1,!1);b=this._document.createLinePositionInLine(d+b,!1);return new c(a,b)},updateGeneratedCode:function(a,c,b,e){d.assert(k.isLiveAppLineNode(a),"The given node must be a LiveAppLineNode!");var f=this._document.startBlockEdit();this._cursor.suspendChangeEvent();c?
this._canPerformEdit(a,b)?this._editGeneratedCode(a,c,e):this._setGeneratedCode(a,c):this._removeGeneratedCode(a);var h;void 0===b?h=this._createContext(c):null!==b&&(h=this._createContext(b));h&&this._liveAppDocumentHandler.updateContextWithUndoRedo(a,h);this._cursor.activateChangeEvent(!0);this._document.endBlockEdit(f)},_setGeneratedCode:function(a,c){this._liveAppDocumentHandler.replaceGeneratedCodeWithUndoRedo(a,c);k.setDirtyState(a,!0)},_editGeneratedCode:function(a,c,b){var d=c.split("\n"),
e={};b?b.forEach(function(a){a=void 0!==a.leftPosition?a.leftPosition:a.rightPosition;e[a]=d[a]}):d.forEach(function(a,c){e[c]=a});this._liveAppDocumentHandler.editGeneratedCodeWithUndoRedo(a,e);k.setDirtyState(a,!0)},_removeGeneratedCode:function(a){this._liveAppDocumentHandler.replaceGeneratedCodeWithUndoRedo(a,"");this._liveAppDocumentHandler.mergeLiveAppLineWithEmptyLineWithUndoRedo(a.nextSibling());this._removeAllGeneratedCodeInfo(a)},_createContext:function(a){a=a||"";return{code:a,numOfLines:a?
a.split("\n").length:0}},_canPerformEdit:function(a,c){var b=a.getContext("code");if(!b)return!1;var b=b.split("\n"),d=[];null===c?d=b:c&&(d=c.split("\n"));return b.length===d.length}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppUtilities":function(){define("dojo/aspect dojo/has MW/rtc/model/DocumentUtilities MW/rtc/model/NodeUtilities MW/rtc/model/Position MW/rtc/model/PositionUtilities MW/rtc/model/RangeUtilities MW/rtc/model/Selection MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppInlineNode MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppLineNode MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenConstants MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenizer MW/rtc/view/ViewUtilities mw-form/TextField".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r){var s=/`[^`]+`|\|[^|]+\|/g,t=/_[^_]+_|\*[^*]+\*/g;return{FROM_LEFT:1,FROM_RIGHT:-1,DOWN_EVENT:window.PointerEvent?"pointerdown":"mousedown",getLiveAppNode:function(a){return this.getLiveAppLineNode(a)||this.getLiveAppInlineNode(a)},getLiveAppInlineNode:function(a){a=a.getNode();return this.isLiveAppInlineNode(a)?a:null},getAdjustedPositionFromDirection:function(a,c){var b=a.getNode();a.isAtRightEdge()&&c===this.FROM_LEFT?b.nextSibling()&&(a=b.nextSibling().startPosition()):
a.isAtLeftEdge()&&c===this.FROM_RIGHT&&b.previousSibling()&&(a=b.previousSibling().endPosition());return a},getPositionForNavigationFromDirection:function(a,c){return c===this.FROM_RIGHT?this._getLeftPositionForNavigation(a):this._getRightPositionForNavigation(a)},_getLeftPositionForNavigation:function(a){var c=a.getNode().rootContainer();if(e.isAtStartOfContainer(a,c)){if((a=this.getLiveAppLineNodeFromViewModel(a))&&this.hasGeneratedCode(a)){if(this.getStartLineOfGeneratedCode(a)===c)return new b(a,
0);if(c!==a)return null}if(c=c.previousSibling())if(c=c.startPosition(),a=this.getLiveAppLineNodeFromViewModel(c))return new b(a,1)}else if(e.isAtEndOfContainer(a,c)&&(a=this.getLiveAppLineNodeFromViewModel(a),a===c&&this.hasGeneratedCode(a)))return c=this.getEndLineOfGeneratedCode(a),new b(c,c.maxOffset());return null},_getRightPositionForNavigation:function(a){var c=a.getNode().rootContainer();if(e.isAtStartOfContainer(a,c)){if(a=this.getLiveAppLineNodeFromViewModel(a),a===c&&this.hasGeneratedCode(a))return c=
this.getStartLineOfGeneratedCode(a),new b(c,0)}else if(e.isAtEndOfContainer(a,c)){a=this.getLiveAppLineNodeFromViewModel(a);if(!a||!this.hasGeneratedCode(a))return null;var d=this.getEndLineOfGeneratedCode(a);if(d===c)return new b(a,1);if(a===c)return(c=d.nextSibling())?new b(c,0):new b(a,1)}return null},getAdjustedSelection:function(a){var c=a.getStartPosition(),b=a.getEndPosition(),d=this.getLiveAppLineNodeFromViewModel(c),e=this.getLiveAppLineNodeFromViewModel(b);if(!d&&!e||d&&d===e&&this._isSelectionInCodeRange(a,
d))return null;var f,g;d&&(d=this.getStartPositionOfLiveApp(d),d.isEqualTo(c)||(f=d));e&&(d=this.getEndPositionOfLiveApp(e),d.isEqualTo(b)||(g=d));e=!!e&&this.hasGeneratedCode(e);if(!f&&!(g||e!==a.fileEndSelected()))return null;c=f||c;b=g||b;a=a.isReversed();return new h(c,b,a,e)},_isSelectionInCodeRange:function(a,c){var b=this.getCodeRange(c);return!b?!1:b.getStartPosition().getLine()<=a.getStartPosition().getLine()&&b.getEndPosition().getLine()>=a.getEndPosition().getLine()},getLiveAppLineNode:function(a){a=
a.getNode().rootContainer();return this.isLiveAppLineNode(a)?a:null},getLiveAppLines:function(a){var c=a.getStartPosition().getNode().rootContainer();a=a.getEndPosition().getNode().rootContainer();return d.getParagraphNodesInRange(c,a,l)},getLiveAppLineNodeFromInnerNodes:function(a){var c=this.getLiveAppLineNodeFromViewModel(a);return c&&!this.getLiveAppInlineNode(a)?c:null},getLiveAppLineNodeFromViewModel:function(a){a=q.getLineage(a.getNode())[0];return this.isLiveAppLineNode(a)?a:null},getGeneratedCodeLineNodes:function(a){a=
this.getCodeRange(a);return!a||this.isLiveAppLineNode(a.getStartPosition().getNode())?[]:c.paragraphNodesInRange(a)},getStartPositionOfLiveApp:function(a){return a.startPosition()},getEndPositionOfLiveApp:function(a){return this.hasGeneratedCode(a)?this.getEndPositionOfGeneratedCode(a):a.endPosition()},getStartPositionOfGeneratedCode:function(a){return(a=this.getStartLineOfGeneratedCode(a))?a.startPosition():null},getStartLineOfGeneratedCode:function(a){return(a=this.getCodeRange(a))?a.getStartPosition().getNode():
null},getEndPositionOfGeneratedCode:function(a){return(a=this.getEndLineOfGeneratedCode(a))?a.endPosition():null},getEndLineOfGeneratedCode:function(a){return(a=this.getCodeRange(a))?a.getEndPosition().getNode():null},setLiveAppLineTracker:function(a,c,b){this.removeLiveAppLineTracker(a);a=a.getStore();a.linePosition=c;a.linePositionTracker=g.after(c,"onChange",b,!0);return a.linePositionTracker},removeLiveAppLineTracker:function(a){a=a.getStore();a.linePosition&&(a.linePosition.destroy(),a.linePosition=
null);a.linePositionTracker&&(a.linePositionTracker.remove(),a.linePositionTracker=null)},removeGeneratedCode:function(a,c){if(this.getCodeRange(a)){var b=this.getStartPositionOfGeneratedCode(a).getLineColumn(),d=this.getEndPositionOfGeneratedCode(a).getLineColumn();this.setReadOnly(a,!1,c);c.deleteText(b.line,b.column,d.line,d.column)}},updateLiveAppWithBlockEdit:function(a,c,b,d,e){var f=document.activeElement,h=d.getScrollTop(),g=d.getScrollLeft(),k=b.startBlockEdit();k.preventMerge();c();b.endBlockEdit(k);
e.restoreFocus(a,f);d.setScrollTop(h);d.setScrollLeft(g)},setReadOnly:function(a,c,b){var d=this.getCodeRange(a);if(d&&(a=d.getStartPosition().getLine(),d=d.getEndPosition().getLine(),!(-1===a||-1===d)))for(;a<=d;a++)b.setReadOnlyLine(a,c)},hasGeneratedCode:function(a){return!!this.getCodeRange(a)},setCodeRange:function(a,c){this.removeCodeRange(a);a.getStore().codeRange=c},removeCodeRange:function(a){a=a.getStore();a.codeRange&&(a.codeRange.destroy(),a.codeRange=null)},getCodeRange:function(a){return a.getStore().codeRange},
isLiveAppInlineNode:function(a){return a instanceof k},isLiveAppLineNode:function(a){return a instanceof l},setDirtyState:function(a,c){a.getStore().isDirty=c},isDirty:function(a){return a.getStore().isDirty},compareContext:function(a,c,b,d){c=a.getContext("code")===c;b=a.getContext("appVariables")===b;a=a.getContext("appOperation")===d;return{codeSame:c,outputsSame:b,summarySame:a,allSame:c&&b&&a}},getDecoratedDomFragment:function(a){var c=document.createDocumentFragment();if(!a)return c;c.textContent=
a;var b=this._getRangesInDomNode(c.firstChild,s,a);a=this._getRangesInDomNode(c.firstChild,t,a);b.forEach(this._decorateForAppOperationOnRange.bind(this,"liveAppCodeStyle"));a.forEach(this._decorateForAppOperationOnRange.bind(this,"liveAppHighlightStyle"));return c},_getRangesInDomNode:function(a,c,b){c=RegExp(c);for(var d,e=[];d=c.exec(b);){var f=document.createRange();f.setStart(a,d.index);f.setEnd(a,d.index+d[0].length);e.push(f)}return e},_decorateForAppOperationOnRange:function(a,c){if(!c.collapsed){var b=
document.createElement("span");b.classList.add(a);c.surroundContents(b);b.firstChild.textContent=b.firstChild.textContent.slice(1);b.lastChild.textContent=b.lastChild.textContent.slice(0,-1)}},getEditField:function(a){var c=document.createElement("span");c.classList.add("liveAppVariableWrapper");var b=document.createElement("span");b.textContent=a;b.classList.add("liveAppVariableTextView");b.classList.add("liveAppCodeStyle");(f("trident")||f("ie")||f("edge"))&&b.classList.add("liveAppVariableExtraPadding");
a=new r({width:"100%",height:"auto",value:a});a.inputNode.classList.add("liveAppCodeStyle");c.appendChild(b);c.appendChild(a.domNode);return{domNode:c,textView:b,inputWidget:a}},getCodeWithUserVariableNames:function(a,c){var b=new n;b.initializeLines(a);var d=a.split("\n"),e=d.length-1,f=d.map(function(a){var c=document.createElement("span");c.textContent=a;return c}),h=b.getTokenMap(),g=[];Object.keys(c).forEach(function(a){var b=c[a];p.getTokensFromLineRange(h,0,e,this._isVariableNameToken.bind(this,
a,{})).forEach(function(a){var c=f[a.getLineNumber()].firstChild,d=document.createRange();d.setStart(c,a.getColumn());d.setEnd(c,a.getColumn()+a.getLength());d.userVariableName=b;g.push(d)})},this);g.forEach(function(a){var c=document.createElement("span");a.surroundContents(c);c.textContent=a.userVariableName});return f.map(function(a){return a.textContent}).join("\n")},_isVariableNameToken:function(a,c,b,d,e){if(b.getType()!==m.TOKENS.ID||b.getValue()!==a||(a=e[d-1])&&a.getType()===m.TOKENS.DOT)return!1;
if(c.hasOwnProperty("firstOutputLine")){if(b.getLineNumber()>c.firstOutputLine)return!0}else for(b=d+1;b<e.length;b+=1)if(d=e[b],d.getType()===m.TOKENS.EQUALS)return c.firstOutputLine=d.getLineNumber(),!0;return!1},addEventListenerWithHandle:function(a,c,b,d){a.addEventListener(c,b,d);return{remove:function(){a.removeEventListener(c,b,d)}}}}})},"MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppInlineNode":function(){define(["dojo/_base/declare","MW/rtc/nodes/OpaqueNode"],function(g,f){return g(f,
{className:"LiveAppInlineNode",constructor:function(e){e=e||{};this.metadata=e.metadata||{appName:"",appOperation:"",appPath:""};this.code=e.code||"";this.numOfLines=e.numOfLines||0;this.appVariables=e.appVariables||"";this.appVariablesUserMap=e.appVariablesUserMap||{};this.appOperation=e.appOperation||this.metadata.appOperation;this.store={}},getMetaData:function(){return this.metadata},setActive:function(e){this.getWidget().setActive(e)},getContext:function(e){return this[e]},getStore:function(){return this.store},
getWidget:function(){return this.widget},setWidget:function(e){this.widget=e},destroyWidget:function(){this.widget.destroy();this.widget=null},_serializeAttributes:function(e){e.text=this.getText();e.metadata=this.metadata;e.code=this.code;e.numOfLines=this.numOfLines;e.appVariables=this.appVariables;e.appOperation=this.appOperation}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppLineNode":function(){define(["dojo/_base/declare","MW/rtc/nodes/InnerNode","MW/rtc/plugins/view/layoutmanager/rules/ContiguousGroupingRule"],
function(g,f,e){return g(f,{constructor:function(d,b){this.groupingType=e().groupingType},className:"LiveAppLineNode",groupingName:"CodeBlock",containerType:function(){return"liveapp"},isTextContainerNode:function(){return!0},isSplittable:function(){return!1},getDefaultChild:function(){return null},destroyWidget:function(){this.getInlineNode().destroyWidget();this.widget.destroy();this.widget=null},getWidget:function(){return this.widget},setWidget:function(d){this.widget=d},setActive:function(d){this.getWidget().setActive(d)},
getContext:function(d){return this.getInlineNode().getContext(d)},getMetaData:function(){return this.getInlineNode().getMetaData()},getStore:function(){return this.getInlineNode().getStore()},getInlineNode:function(){return this.startNode()},_serializeAttributes:function(d){}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppControllerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LiveAppController"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cursorcontroller",
"rtc.liveapps.documenthandler"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppController":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin"],function(g,f){return g(f,{constructor:function(e,d){this._cursor=e.getCursors()[0];this._liveAppDocumentHandler=d},insertLiveAppAtCurrentPosition:function(e,d,b,a){return this._liveAppDocumentHandler.insertLiveAppWithUndoRedo({metadata:{appName:e||"",appOperation:b||"",appPath:a||
""},appVariables:d||""},this._cursor.getCursorPosition())}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppCursorHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LiveAppCursorHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cursorcontroller"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppCursorHandler":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin","./LiveAppUtilities"],function(g,f,e,d,b){return g(d,{constructor:function(a){this._cursor=a.getCursors()[0];this.own(e.after(this._cursor,"onChange",f.hitch(this,"_handleCursorChange"),!0))},_handleCursorChange:function(){var a=this._cursor.getSelection();if(a&&(a=b.getAdjustedSelection(a)))this._cursor.suspendChangeEvent(),this._cursor.setSelection(a),this._cursor.activateChangeEvent()}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppDocumentHandlerProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./LiveAppDocumentHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.view","rtc.cursorcontroller","rtc.liveapps.focusmanager"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppDocumentHandler":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/model/DocumentConstants MW/rtc/model/DocumentEventUtilities MW/rtc/model/DocumentUtilities MW/rtc/model/SelectionUtilities MW/rtc/model/events/DocumentEvent MW/rtc/model/events/NumberOfLinesChangedEvent ./nodes/LiveAppInlineNode ./LiveAppUtilities".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p){return g(d,{constructor:function(a,c,b,d,h){this._internalDocument=a;this._document=c;this._view=b;this._cursorController=d;this._liveAppFocusManager=h;this._cursor=d.getCursors()[0];this.own(e.after(this._document,"onPreDeletion",f.hitch(this,"_handlePreDeletion"),!0),e.after(this._internalDocument,"onDocumentChanged",f.hitch(this,"_handleDocumentChanged"),!0))},_handlePreDeletion:function(a){this._cursor.hasSelection()&&this._removeLiveAppsInSelectionIfAny()},_removeLiveAppsInSelectionIfAny:function(){var a=
this._getLiveAppLinesFromCursor();if(0!==a.length){var c=this._document.startBlockEdit();a.forEach(this.removeLiveAppCompletelyWithUndoRedo,this);this._document.endBlockEdit(c);if(!this._cursor.hasSelection())return!0}},_getLiveAppLinesFromCursor:function(){return p.getLiveAppLines(this._cursor.getSelection())},_handleDocumentChanged:function(c){var b=[];c=a.finalLineRangeFromEvents(c);for(var d=c.startLine;d<=c.endLine;d++){var e=this._internalDocument.getLineNode(d);p.isLiveAppLineNode(e)&&b.push(e)}0!==
b.length&&(this.onUpdate(b),b.forEach(function(a){this._view.refreshNode(a)},this),this._view.onLayoutChange())},onUpdate:function(a){},mergeLiveAppLineWithEmptyLineWithUndoRedo:function(a){var c=this._document.startBlockEdit();a=this._mergeLiveAppLineAndEmptyLine(a);this._processEventsFromResult(a,c);this._document.endBlockEdit(c)},_mergeLiveAppLineAndEmptyLine:function(a){var c=Math.max(0,this._internalDocument.getLineNumber(a)-1),b=[l.create(c,c+1,-1)],c=[l.create(c,c+1,1)],d=a.nextNode();this._internalDocument.deleteNode(a,
d?{node:d,offset:0}:null);return{events:b,undoEvents:c,redoEvents:b}},replaceGeneratedCodeWithUndoRedo:function(a,c){var b=this._document.startBlockEdit();this._removeGeneratedCodeOrInsertEmptyCodeLineWithUndoRedo(a);if(c){var d=this._internalDocument.getLineNumber(a)+1;this._document.insertText(c,d+1,1)}this._document.endBlockEdit(b)},editGeneratedCodeWithUndoRedo:function(a,c){var b=this._document.startBlockEdit(),d=this._internalDocument.getLineNumber(a)+1;Object.keys(c).forEach(function(a){var b=
d+parseInt(a,10)+1,e=this._document.getLineLength(b)+1;this._document.setReadOnlyLine(b,!1);this._document.replaceText(c[a],b,1,b,e);this._document.setReadOnlyLine(b,!0)},this);this._document.endBlockEdit(b)},removeLiveAppCompletelyWithUndoRedo:function(a){var c=this._document.startBlockEdit();this._removeGeneratedCodeOrInsertEmptyCodeLineWithUndoRedo(a);this._liveAppFocusManager.blurLiveAppAndReturnFocusToEditor(!0);var b=this._removeLiveAppLine(a);this._processEventsFromResult(b,c);this._document.endBlockEdit(c);
this.onRemove(a)},_removeGeneratedCodeOrInsertEmptyCodeLineWithUndoRedo:function(a){var c=this._document.startBlockEdit();p.hasGeneratedCode(a)?p.removeGeneratedCode(a,this._document):(a=this._insertEmptyCodeLine(a.endPosition()),this._processEventsFromResult(a,c));this._document.endBlockEdit(c)},removeLiveAppWithUndoRedo:function(a,c){var d=this._document.startBlockEdit();p.isLiveAppInlineNode(a)?(this._cursor.setPosition(a,c===b.BACKWARD_DELETE?1:0),this._document.deleteTextAtCurrentPosition(c)):
this.convertLiveAppIntoPlainCodeWithUndoRedo(a,c);this._document.endBlockEdit(d);this.onRemove(a)},onRemove:function(a){},convertLiveAppIntoPlainCodeWithUndoRedo:function(a,c){var b=this._document.startBlockEdit(),d;p.hasGeneratedCode(a)?(d=c===p.FROM_LEFT?p.getStartPositionOfGeneratedCode(a):p.getEndPositionOfGeneratedCode(a),this._cursor.setPosition(d.getNode(),d.getOffset(),!0)):(d=this._insertEmptyCodeLine(a.endPosition()),this._processEventsFromResult(d,b));this._liveAppFocusManager.blurLiveAppAndReturnFocusToEditor(!0);
d=this._removeLiveAppLine(a,this);this._processEventsFromResult(d,b);this._document.endBlockEdit(b)},_removeLiveAppLine:function(a){var c=this._internalDocument.getLineNumber(a),b=a.nextNode(),b=b?{node:b,offset:0}:null;a.destroyWidget();this._internalDocument.deleteNode(a,b);a=[l.create(c,c+1,-1)];c=[l.create(c,c+1,1)];return{events:a,undoEvents:c,redoEvents:a}},insertEmptyCodeLineWithUndoRedo:function(a){var c=this._document.startBlockEdit(),b=a.getNode().rootContainer(),d=b.readOnly;b.readOnly=
!1;a=this._document.createPosition(a.getNode(),a.getOffset(),!0);var e=this._insertEmptyCodeLine(a);this._processEventsFromResult(e,c);this._cursorController.clearSelection();this._cursor.setPosition(a.getNode(),a.getOffset(),!0);a.destroy();b.readOnly=d;this._document.endBlockEdit(c)},_insertEmptyCodeLine:function(c){var b=this._internalDocument.createContainerForType("code").container,d=this._internalDocument.createNode(b.getDefaultChild());b.addChild(d);c=this._internalDocument.insertAtPosition(b,
c);var e=a.finalLineRangeFromEvents(c.events),d=[l.create(e.startLine,e.endLine,-1)],e=[l.create(e.startLine,e.endLine,1)];return{events:c.events,undoEvents:d,redoEvents:e,lineNode:b}},updateContextWithUndoRedo:function(a,c){var b=this._document.startBlockEdit();p.isLiveAppLineNode(a)&&(a=a.getInlineNode());this._internalDocument.changeNodeAttributes(a,c);var d=this._internalDocument.getLineNumber(a.rootContainer()),d=[k.create(d,d,0)];b.appendUndoEvents(d);b.appendRedoEvents(d);this._internalDocument.emitDocumentEvents(d);
this._document.endBlockEdit(b)},insertLiveAppWithUndoRedo:function(a,c){var d=this._document.startBlockEdit();this._cursorController.hasSelection()&&this._document.deleteTextAtCurrentPosition(b.BACKWARD_DELETE);var e=this._insertLiveApp(a,c);this._processEventsFromResult(e,d);this.insertEmptyCodeLineWithUndoRedo(e.inlineNode.endPosition());this._document.endBlockEdit(d);this._cursor.setPosition(e.inlineNode,0);d=p.getLiveAppNode(this._cursor.getCursorPosition());this._liveAppFocusManager.focusLiveApp(d);
return d},_insertLiveApp:function(c,b){var d=new m(c),e=this._internalDocument.insertAtPosition(d,b),f=a.finalLineRangeFromEvents(e.events),h=[l.create(f.startLine,f.endLine,-1)],f=[l.create(f.startLine,f.endLine,1)];return{events:e.events,undoEvents:h,redoEvents:f,inlineNode:d}},_processEventsFromResult:function(a,c){c.appendUndoEvents(a.undoEvents);c.appendRedoEvents(a.redoEvents);this._internalDocument.emitDocumentEvents(a.events)}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppEditorKeyHandlerProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./LiveAppEditorKeyHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cursorcontroller","rtc.actionservice","rtc.liveapps.documenthandler","rtc.liveapps.focusmanager"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppEditorKeyHandler":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/keys MW/rtc/abstract/AbstractPlugin MW/rtc/model/DocumentConstants MW/rtc/model/DocumentUtilities MW/rtc/model/Position ./LiveAppUtilities".split(" "),
function(g,f,e,d,b,a,c,h,k){return g(b,{constructor:function(a,c,b,d){this._liveAppDocumentHandler=b;this._liveAppFocusManager=d;this._cursor=a.getCursors()[0];a=[{id:"rtc_live_app_backspace",enabled:!0,key:"backspace",callback:this._handleRemoveKeys.bind(this,k.FROM_RIGHT)},{id:"rtc_live_app_delete",enabled:!0,key:"delete",callback:this._handleRemoveKeys.bind(this,k.FROM_LEFT)},{id:"rtc_live_app_enter",enabled:!0,key:"enter",callback:this._handleEnter.bind(this)},{id:"rtc_live_app_shift_enter",enabled:!0,
key:"shift_enter",callback:this._handleEnter.bind(this)},{id:"rtc_live_app_left",enabled:!0,key:"left",callback:this._handleArrowsKey.bind(this,k.FROM_RIGHT)},{id:"rtc_live_app_right",enabled:!0,key:"right",callback:this._handleArrowsKey.bind(this,k.FROM_LEFT)},{id:"rtc_live_app_tab",enabled:!0,key:"tab",callback:this._handleNavigation.bind(this,k.FROM_LEFT,!0)},{id:"rtc_live_app_shift_tab",enabled:!0,key:"shift_tab",callback:this._handleNavigation.bind(this,k.FROM_RIGHT,!0)}];c.loadActions(a)},_handleRemoveKeys:function(a){if(this._cursor.hasSelection())return!1;
if(this._handleNavigation(a,!1))return!0;var c=this._cursor.getCursorPosition(),c=k.getAdjustedPositionFromDirection(c,a);return this._moveCursorOrRemoveEmptySiblingContainer(c,a)},_moveCursorOrRemoveEmptySiblingContainer:function(c,b){var d=this._getSiblingContainerIfTriggerPositionExpected(c,b);if(!d)return!1;var e=c.getNode().rootContainer(),f;k.isLiveAppLineNode(e)?f=e:k.isLiveAppLineNode(d)&&(f=d,d=e);if(!f)return!1;d.isEmpty()&&this._liveAppDocumentHandler.mergeLiveAppLineWithEmptyLineWithUndoRedo(d);
var h=b===a.BACKWARD_DELETE;e===d?this._cursor.setPosition(f,h?1:0):d.isEmpty()?this._cursor.setPosition(f,h?0:1):this._cursor.setPosition(d,h?d.maxOffset():0);return!0},_getSiblingContainerIfTriggerPositionExpected:function(a,c){return this._isTriggerPositionExpected(a,c)?this._getSiblingByDirection(a,c):null},_isTriggerPositionExpected:function(b,d){var e=b.getNode().rootContainer();return d===a.BACKWARD_DELETE?c.isAtStartOfContainer(b,e):c.isAtEndOfContainer(b,e)},_getSiblingByDirection:function(c,
b){var d=c.getNode().rootContainer();if(b===a.BACKWARD_DELETE){var e=d.previousSibling();if(e)return d=new h(e,0),(d=k.getLiveAppLineNodeFromViewModel(d))?d:e}return b===a.FORWARD_DELETE?(k.isLiveAppLineNode(d)&&k.hasGeneratedCode(d)&&(d=k.getEndLineOfGeneratedCode(d)),d.nextSibling()):null},_handleEnter:function(){var a=this._cursor.getCursorPosition(),c=k.getLiveAppLineNode(a);if(!c)return!1;var b=a;1===a.getOffset()&&k.hasGeneratedCode(c)&&(b=k.getEndPositionOfGeneratedCode(c));this._liveAppDocumentHandler.insertEmptyCodeLineWithUndoRedo(b);
return!0},_handleArrowsKey:function(a){if(this._cursor.hasSelection())return!1;var c=this._cursor.getCursorPosition();return(c=k.getPositionForNavigationFromDirection(c,a))?(this._cursor.setPosition(c.getNode(),c.getOffset(),!0),!0):this._handleNavigation(a,!0)},_handleNavigation:function(a,c){var b=this._cursor.getCursorPosition(),b=k.getAdjustedPositionFromDirection(b,a),d=k.getLiveAppNode(b);if(!d)return!1;var e=a===k.FROM_LEFT?0:1;return e===b.getOffset()?(c&&this._cursor.setPosition(d,0===e?
1:0),this._liveAppFocusManager.focusLiveApp(d),!0):!1}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppExecutionManagerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LiveAppExecutionManager"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cursorcontroller","rtc.liveapps.focusmanager","rtc.embeddedoutputs.executionmanager","rtc.code.sections.model","rtc.code.sections.stale.model"]}},createInstance:function(d,b,a,
c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppExecutionManager":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin","./LiveAppUtilities"],function(g,f,e,d,b){return g(d,{constructor:function(a,c,b,d,g){this._cursorController=a;this._liveAppFocusManager=c;this._executionManager=b;this._sectionModel=d;this._staleSectionModel=g;this.own(e.after(this._liveAppFocusManager,"onExitLiveApp",f.hitch(this,"_handleExitLiveApp"),
!0))},_handleExitLiveApp:function(a){if(!this._cursorController.hasSelection()&&b.hasGeneratedCode(a)&&b.isDirty(a)){var c=this._sectionModel.getSectionNumberForNode(a);this._staleSectionModel.isSectionStale(c)&&(b.setDirtyState(a,!1),this._executionManager.executeSection(c,!1,!1))}}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppFocusManagerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LiveAppFocusManager"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.view",
"rtc.cursorcontroller","rtc.focusservice","rtc.keyhandler","rtc.liveapps.viewmodel"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppFocusManager":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin","./LiveAppUtilities"],function(g,f,e,d,b){return g(d,{constructor:function(a,c,b,d,g){this._view=a;this._cursorController=c;this._focusService=b;this._keyHandler=d;this._liveAppViewModel=
g;this._cursor=c.getCursors()[0];this.own(e.after(this._cursor,"onUpdate",f.hitch(this,"_handleCursorUpdate"),!0),e.after(this._cursor,"onChange",f.hitch(this,"_handleCursorChange"),!0),e.after(this._liveAppViewModel,"onLiveAppViewCreated",f.hitch(this,"_handleLiveAppViewCreated"),!0));this._lastActiveLiveApp=this._activeLiveApp=null},_handleCursorUpdate:function(){this._activeLiveApp&&!this._cursor.isHidden()&&this._handleCursorChange()},_handleCursorChange:function(){if(!this._keyHandler.hasFocus())return!1;
var a=this._getLiveAppLineNodeAtCursor(!1);this._exitLastActiveLiveAppForTheNextOne(this._lastActiveLiveApp,a);this._lastActiveLiveApp=a;a=this._getLiveAppLineNodeAtCursor(!0);this._setActiveLiveApp(a)},_handleLiveAppViewCreated:function(a){var c=a.getWidget();c.addDownHandler(this._handleDown.bind(this,a,!0),!0);c.addDownHandler(this._handleDown.bind(this,a,!1),!1)},_handleDown:function(a,c,b){c?this._handleFocus(a):b.stopPropagation()},_handleFocus:function(a){var c=this._activeLiveApp;b.isLiveAppLineNode(a)?
(this._getLiveAppLineNodeAtCursor(!1)!==a||1!==this._cursor.getOffset())&&this._cursor.setPosition(a,1,!1):this._cursor.getNode()!==a&&this._cursor.setPosition(a,1,!1);this._cursorController.hasSelection()&&this._cursorController.clearSelection();this._exitLastActiveLiveAppForTheNextOne(c,a);this._setActiveLiveApp(a)},_exitLastActiveLiveAppForTheNextOne:function(a,c){if(a&&a!==c)this.onExitLiveApp(a)},onExitLiveApp:function(a){},_setActiveLiveApp:function(a){this._activeLiveApp&&this._activeLiveApp.setActive(!1);
(this._activeLiveApp=a)&&this._activeLiveApp.setActive(!0)},restoreFocus:function(a,c){c&&(c===document.body?this.focusLiveApp(a):c.focus())},focusLiveApp:function(a){var c=this._view.getScrollTop(),b=this._view.getScrollLeft();a.getWidget().focus();this._setActiveLiveApp(a);a=this._view.getDomtarget();a.scrollTop=c;a.scrollLeft=b},blurLiveAppAndReturnFocusToEditor:function(a){this._focusService.setFocus();(!this._getLiveAppLineNodeAtCursor(!0)||a)&&this._setActiveLiveApp(null)},_getLiveAppLineNodeAtCursor:function(a){var c=
this._cursor.getCursorPosition();return a?b.getLiveAppLineNodeFromInnerNodes(c):b.getLiveAppLineNodeFromViewModel(c)}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppUIFigureHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LiveAppUIFigureHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.document rtc.view rtc.liveapps.viewmodel rtc.liveapps.backend rtc.liveapps.codemanager rtc.liveapps.documenthandler rtc.liveapps.focusmanager".split(" ")}},
createInstance:function(d,b,a,c,f,g,l,m){return new e(d,b,a,c,f,g,l,m)}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppUIFigureHandler":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin","./LiveAppUtilities"],function(g,f,e,d,b){return g(d,{_DELAY:50,constructor:function(a,c,b,d,g,m,p){this._document=a;this._view=c;this._liveAppBackendService=d;this._liveAppCodeManager=g;this._liveAppDocumentHandler=m;this._liveAppFocusManager=p;
this.own(e.after(b,"onLiveAppViewCreated",f.hitch(this,"_handleLiveAppViewCreated"),!0),e.after(this._liveAppDocumentHandler,"onRemove",f.hitch(this,"_handleRemove"),!0))},_handleLiveAppViewCreated:function(a){var c=a.getMetaData().appPath;c&&this._liveAppBackendService.initializeApp(a,c,this._initializeApp.bind(this,a))},_initializeApp:function(a,c){var d=a.getWidget();d&&(d.initialize(c),d.own(e.after(this._view,"onResize",this._handleViewResize.bind(this,a))),b.isLiveAppLineNode(a)&&(d.addChangeHandler(this._handleUIFigureChange.bind(this,
a)),d.on("variablenamechange",this._handleVariableNameChange.bind(this,a))),this._view.onLayoutChange())},_handleViewResize:function(a){a.getWidget().resize()},_handleUIFigureChange:function(a){var c=a.getStore();c.timer&&(window.clearTimeout(c.timer),c.timer=null);c.timer=window.setTimeout(function(){c.timer=null;this._requestDataAndUpdateLiveApp(a)}.bind(this),this._DELAY)},_requestDataAndUpdateLiveApp:function(a){this._liveAppBackendService.requestData(a,this._updateLiveApp.bind(this,a))},_updateLiveApp:function(a,
c,d,e,f){var g=b.compareContext(a,c,d,e);if(g.allSame)return!1;var p=a.getContext("appVariablesUserMap"),n=c?b.getCodeWithUserVariableNames(c,p):"";b.updateLiveAppWithBlockEdit(a,function(){var b={};g.codeSame||this._liveAppCodeManager.updateGeneratedCode(a,n,c,f);g.outputsSame||(b.appVariables=d,b.appVariablesUserMap=this._getVariablesUserMap(a,d));g.summarySame||(b.appOperation=e);0<Object.keys(b).length&&(this._liveAppDocumentHandler.updateContextWithUndoRedo(a,b),b=a.getWidget(),!g.outputsSame&&
b.updateVariables(),!g.summarySame&&b.updateOperation())}.bind(this),this._document,this._view,this._liveAppFocusManager);return!0},_getVariablesUserMap:function(a,c){var b=a.getContext("appVariablesUserMap"),d={};(c?c.split(","):[]).forEach(function(a){d[a]=b[a]||a});return d},_handleVariableNameChange:function(a,c){b.updateLiveAppWithBlockEdit(a,function(){var d=a.getContext("appVariablesUserMap"),d=JSON.parse(JSON.stringify(d));d[c.mwEventData.originalVariableName]=c.mwEventData.newValue;this._liveAppDocumentHandler.updateContextWithUndoRedo(a,
{appVariablesUserMap:d});var e=a.getContext("code"),d=b.getCodeWithUserVariableNames(e,d);this._liveAppCodeManager.updateGeneratedCode(a,d,null)}.bind(this),this._document,this._view,this._liveAppFocusManager)},_handleRemove:function(a){this._liveAppBackendService.removeApp(a)}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppViewModelProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LiveAppViewModel"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},
createInstance:function(){return new e}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppViewModel":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin","./widgets/LiveAppInlineWidget","./widgets/LiveAppLineWidget","./LiveAppUtilities"],function(g,f,e,d,b){return g(f,{constructor:function(){},createInlineDomNode:function(a,c){this._createInlineWidgetView(a,c);c.classList.add("liveAppInlineNode");return c},_createInlineWidgetView:function(a,c){var d=a.getWidget();if(d)d.placeAt(c);
else if(d=this._createAndSetInlineWidget(a),d.placeAt(c),d.startup(),!b.isLiveAppLineNode(a.parent))this.onLiveAppViewCreated(a)},_createAndSetInlineWidget:function(a){var c=new e({node:a});a.setWidget(c);return c},createLineDomNode:function(a,c){this._createLineWidgetView(a,c);c.classList.add("liveAppLineNode");return c},_createLineWidgetView:function(a,c){var b=a.getWidget();b?b.layout(c):(b=this._createAndSetLineWidget(a,c),b.layout(c),b.startup(),this.onLiveAppViewCreated(a))},_createAndSetLineWidget:function(a){var c=
new d({node:a});a.setWidget(c);return c},onLiveAppViewCreated:function(a){}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/widgets/LiveAppInlineWidget":function(){define(["dojo/_base/declare","dojo/text!./LiveAppInlineWidgetTemplate.html","MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppUtilities","./AbstractLiveAppWidget","./UIFigureWidget"],function(g,f,e,d,b){return g(d,{templateString:f,constructor:function(a){},buildRendering:function(){this.inherited(arguments);this._uifigureWidget=
new b({uuid:this.uuid},this.uifigureContainer);this.own(this._uifigureWidget);this._editFields={};this.updateView()},updateView:function(){this.updateName();this.updateVariables();this.updateOperation()},initialize:function(a){this._uifigureWidget.initialize(a)},resize:function(){this._uifigureWidget.resize()},updateName:function(){this.appName.textContent=this.node.getMetaData().appName},updateVariables:function(){var a=this.node.getContext("appVariables"),c=a?a.split(","):[];a===this._appVariables?
this._setVariables(c):(this._buildVariables(c),this._appVariables=a)},_setVariables:function(a){var c=this.node.getContext("appVariablesUserMap");a.forEach(function(a){var b=this._editFields[a],d=b.inputWidget;a=c[a]||a;d.get("value")!==a&&(d.set("value",a),b.textView.textContent=a)},this)},_buildVariables:function(a){this.appVariablesList.innerHTML="";this._cleanupInputWidgets();var c=this.node.getContext("appVariablesUserMap");a.forEach(function(b,d){this._addVariableName(b,c[b]||b);d<a.length-
1&&this._addComma()},this);0<a.length&&this.node.getContext("appOperation")&&this._addEqualSign();this._updateDescriptionDisplayState()},_cleanupInputWidgets:function(){Object.keys(this._editFields).forEach(function(a){this._editFields[a].inputWidget.destroy()},this);this._editFields={}},_addVariableName:function(a,c){var b=e.getEditField(c);this._editFields[a]=b;var d=b.textView,f=b.inputWidget;f.on(e.DOWN_EVENT,this._handleDownForEditField.bind(this,f));f.on("input",this._handleInputForEditField.bind(this,
f,d,c));f.on("change",this._handleChangeForEditField.bind(this,a));f.own(e.addEventListenerWithHandle(f.inputNode,"blur",this._handleBlurForEditField.bind(this,f)));f.startup();this.appVariablesList.appendChild(b.domNode)},_handleDownForEditField:function(a,c){var b=a.inputNode;document.activeElement!==b&&(b.select(),c.preventDefault())},_handleInputForEditField:function(a,c,b){a=a.inputNode;b=a.value.replace(/\s/g,"")||b;a.value=b;c.textContent=b},_handleChangeForEditField:function(a,c){this.emit("variablenamechange",
{mwEventData:{originalVariableName:a,oldValue:c.mwEventData.oldValue,newValue:c.mwEventData.newValue}})},_handleBlurForEditField:function(a){a=a.inputNode;a.selectionStart!==a.selectionEnd&&(document.getSelection().removeAllRanges(),document.getSelection().addRange(document.createRange()))},_addComma:function(){var a=document.createElement("span");a.textContent=",";this.appVariablesList.appendChild(a)},_addEqualSign:function(){var a=document.createElement("span");a.textContent=" \x3d ";this.appVariablesList.appendChild(a)},
updateOperation:function(){var a=this.node.getContext("appOperation"),a=e.getDecoratedDomFragment(a);this.appOperation.innerHTML="";this.appOperation.appendChild(a);this._updateDescriptionDisplayState()},_updateDescriptionDisplayState:function(){this.appDescription.textContent.trim()?this.appDescription.style.display="":this.appDescription.style.display="none"},addDownHandler:function(a,c){this.own(e.addEventListenerWithHandle(this.domNode,e.DOWN_EVENT,a,c))},addKeydownHandler:function(a){this.on("keydown",
a)},addChangeHandler:function(a){this._uifigureWidget.addChangeHandler(a)},isEventFromInnerControl:function(a){return this.summaryContainer.contains(a)||this.uifigureContainer.contains(a)}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/widgets/AbstractLiveAppWidget":function(){define(["dijit/_TemplatedMixin","dijit/_WidgetBase","dijit/_WidgetsInTemplateMixin","dojo/_base/declare","dojo/text!./LiveAppInlineWidgetTemplate.html"],function(g,f,e,d,b){return d([f,g,e],{templateString:b,constructor:function(a){},
updateView:function(){},setActive:function(a){a?this.domNode.classList.add("active"):this.domNode.classList.remove("active")},focus:function(){this.domNode.focus()},resize:function(){},addDownHandler:function(a,c){},addKeydownHandler:function(a){},addChangeHandler:function(a){},isEventFromInnerControl:function(a){}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/widgets/UIFigureWidget":function(){define(["dojo/_base/declare","dijit/_WidgetBase"],function(g,f){var e=g(null,{constructor:function(d){},
createWidget:function(){return{placeAt:function(){}}}});return g(f,{baseClass:"liveAppContentPane",constructor:function(d){this._initialized=!1;this._embeddedFigureFactory=new e},initialize:function(d){this._initialized||(this.domNode.style.minWidth=d.clientData.width+"px",this.domNode.style.height=d.clientData.height+"px",this._embeddedFigure=this._embeddedFigureFactory.createWidget(this,d.figureData,this._handleServerPropertyChange.bind(this)),this._embeddedFigure.placeAt(this.domNode),this._initialized=
!0)},_handleServerPropertyChange:function(d){},resize:function(){if(this._embeddedFigureFactory.FigureManager){var d=this.domNode.getBoundingClientRect();this._embeddedFigureFactory.FigureManager.resize({w:d.width,h:d.height})}},addChangeHandler:function(d){this.on("mouseup, pointerup",d);this.on("value-change",d);this.on("change",d)},destroyRecursive:function(){}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/widgets/LiveAppLineWidget":function(){define(["dojo/_base/declare","dojo/text!./LiveAppLineWidgetTemplate.html",
"./AbstractLiveAppWidget"],function(g,f,e){return g(e,{templateString:f,constructor:function(d){},buildRendering:function(){this.inherited(arguments);this._inlineWidget=this.node.getInlineNode().getWidget();this.own(this._inlineWidget)},updateView:function(){this._inlineWidget.updateView()},initialize:function(d){this._inlineWidget.initialize(d)},updateVariables:function(){this._inlineWidget.updateVariables()},updateOperation:function(){this._inlineWidget.updateOperation()},focus:function(){this._inlineWidget.focus()},
resize:function(){this._inlineWidget.resize()},addDownHandler:function(d,b){this._inlineWidget.addDownHandler(d,b)},addKeydownHandler:function(d){this._inlineWidget.addKeydownHandler(d)},addChangeHandler:function(d){this._inlineWidget.addChangeHandler(d)},isEventFromInnerControl:function(d){return this._inlineWidget.isEventFromInnerControl(d)},layout:function(d){this.domNode.insertBefore(d.childNodes[0],this.codeContainer);this.placeAt(d)},addCodeLines:function(d){d.forEach(function(b){b.contains(this.domNode)||
this.codeContainer.appendChild(b)},this)}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppWidgetKeyHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LiveAppWidgetKeyHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cursorcontroller","rtc.liveapps.viewmodel","rtc.liveapps.documenthandler","rtc.liveapps.focusmanager"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppWidgetKeyHandler":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/keys MW/rtc/abstract/AbstractPlugin ./LiveAppUtilities".split(" "),
function(g,f,e,d,b,a){return g(b,{constructor:function(a,b,d,g){this._cursorController=a;this._liveAppViewModel=b;this._liveAppDocumentHandler=d;this._liveAppFocusManager=g;this._cursor=a.getCursors()[0];this.own(e.after(this._liveAppViewModel,"onLiveAppViewCreated",f.hitch(this,"_handleLiveAppViewCreated"),!0))},_handleLiveAppViewCreated:function(a){a.getWidget().addKeydownHandler(this._handleKeydown.bind(this,a))},_handleKeydown:function(a,b){b.stopPropagation();a.getWidget().isEventFromInnerControl(b.target)?
this._handleKeydownFromInnerControl(a,b):this._handleKeydownFromWidgetWrapper(a,b)},_handleKeydownFromInnerControl:function(a,b){var e=b.keyCode,f=!1;e===d.TAB&&b.shiftKey?(e=this._findTabbableElements(a),0<e.length&&b.target===e[0]&&(this._cursor.setPosition(a,0),f=!0)):e===d.TAB&&(e=this._findTabbableElements(a),0<e.length&&b.target===e[e.length-1]&&(this._cursor.setPosition(a,1),f=!0));f&&(b.preventDefault(),this._liveAppFocusManager.blurLiveAppAndReturnFocusToEditor(!1))},_handleKeydownFromWidgetWrapper:function(c,
b){b.preventDefault();var e=b.keyCode,f=!1;e===d.ESCAPE?f=!0:e===d.TAB&&b.shiftKey?(this._cursor.setPosition(c,0),e=this._findTabbableElements(c),0<e.length?e[e.length-1].focus():f=!0):e===d.TAB?(this._cursor.setPosition(c,1),e=this._findTabbableElements(c),0<e.length?e[0].focus():f=!0):e===d.LEFT_ARROW?(this._cursor.setPosition(c,0),f=!0):e===d.RIGHT_ARROW?(this._cursor.setPosition(c,1),f=!0):e===d.UP_ARROW?(this._cursor.movePosition(this._cursor.UP),f=!0):e===d.DOWN_ARROW?(a.hasGeneratedCode(c)&&
(f=a.getEndLineOfGeneratedCode(c).startPosition(),this._cursor.setPosition(f.getNode(),f.getOffset())),this._cursor.movePosition(this._cursor.DOWN),f=!0):e===d.DELETE?(this._liveAppDocumentHandler.removeLiveAppWithUndoRedo(c,a.FROM_LEFT),f=!0):e===d.BACKSPACE&&(this._liveAppDocumentHandler.removeLiveAppWithUndoRedo(c,a.FROM_RIGHT),f=!0);f&&this._liveAppFocusManager.blurLiveAppAndReturnFocusToEditor(!1)},_findTabbableElements:function(a){return a.getWidget().domNode.querySelectorAll('button, [href], input:not([type\x3d"hidden"]), select, textarea, [tabindex]:not([tabindex\x3d"-1"])')}})})},
"MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppInlineNodeContentConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LiveAppInlineNodeContentConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppInlineNodeContentConverter":function(){define(["dojo/_base/declare","MW/rtc/nodes/contentconverter/base/LeafNodeContentConverter",
"./LiveAppInlineNode"],function(g,f,e){return g(f,{getApplicableNodeClass:function(){return e}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppInlineNodeInsertionRulesProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LiveAppInlineNodeInsertionRules"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppInlineNodeInsertionRules":function(){define("dojo/_base/declare MW/rtc/plugins/insertionrules/BaseInsertionRules MW/rtc/plugins/insertionrules/InsertionRuleConstants MW/rtc/plugins/richtext/nodes/inner/RichTextContainerNode ./LiveAppInlineNode ./LiveAppLineNode".split(" "),
function(g,f,e,d,b,a){return g(f,{_compatibleParents:[d],constructor:function(){},getApplicableNodeClass:function(){return b},getTopLevelInsertionInstruction:function(c,b,d,f,g){return{insertInRoot:{relationToPosition:c.getNode().rootContainer().isEmpty()?e.RELATION.AFTER:e.RELATION.AT,containerConstructor:a}}},destroy:function(){}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppLineNodeContentConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"./LiveAppLineNodeContentConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppLineNodeContentConverter":function(){define(["dojo/_base/declare","MW/rtc/nodes/contentconverter/base/InnerNodeContentConverter","./LiveAppLineNode"],function(g,f,e){return g(f,{getApplicableNodeClass:function(){return e}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppLineNodeConversionRulesProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./LiveAppLineNodeConversionRules"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppLineNodeConversionRules":function(){define(["dojo/_base/declare","MW/rtc/nodes/nodeconversionrules/base/AbstractNodeConversionRules","./LiveAppLineNode"],function(g,f,e){return g(f,{constructor:function(){},getApplicableNodeClass:function(){return e},
isConvertibleTo:function(d){return!1},isConvertibleFrom:function(d){return!1}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppLineNodeInsertionRulesProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LiveAppLineNodeInsertionRules"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppLineNodeInsertionRules":function(){define("dojo/_base/declare MW/rtc/model/Position MW/rtc/nodes/inner/LineNode MW/rtc/plugins/insertionrules/BaseInsertionRules MW/rtc/plugins/insertionrules/InsertionRuleConstants ./LiveAppLineNode".split(" "),
function(g,f,e,d,b,a){return g(d,{_compatibleParents:[],constructor:function(){},getApplicableNodeClass:function(){return a},getTopLevelInsertionInstruction:function(a,d,e,f,g){return g.isAtLeftEdge()?{insertInRoot:{relationToPosition:b.RELATION.BEFORE}}:g.isAtRightEdge()?{insertInRoot:{relationToPosition:b.RELATION.AFTER}}:{insertInRoot:{insertionPosition:g}}},destroy:function(){}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/view/LiveAppInlineNodeCoordinateConverterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./LiveAppInlineNodeCoordinateConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/view/LiveAppInlineNodeCoordinateConverter":function(){define("dojo/_base/declare MW/rtc/model/Position MW/rtc/view/coordinateconverter/CoordinateConverterUtilities MW/rtc/view/coordinateconverter/base/OpaqueBoxCoordinateConverter MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppInlineNode MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppUtilities".split(" "),
function(g,f,e,d,b,a){return g(d,{constructor:function(){},getApplicableNodeClass:function(){return b},getPositionFromCoordinate:function(a,b){var d=this._getClientRects(b)[0];if(!e.isCoordinateWithinRect(a,d))return null;var g=0;a.x>=d.left+0.95*d.width&&(g=1);return new f(b,g)},getCoordinateFromPosition:function(c){var b=this.inherited(arguments),d=a.getLiveAppNode(c);if(a.isLiveAppInlineNode(d))return b;d=d.getWidget().domNode.getBoundingClientRect();b.height=20;1===c.getOffset()?(b.y+=d.height-
b.height-1,b.x+=1,b.pageX+=1):(b.x-=1,b.pageX-=1);return b}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/view/LiveAppInlineNodeLayouterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LiveAppInlineNodeLayouter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.liveapps.viewmodel"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/view/LiveAppInlineNodeLayouter":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppUtilities","MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppInlineNode","MW/rtc/plugins/view/layoutmanager/abstract/AbstractLayouter"],function(g,f,e,d){return g(d,{constructor:function(b){this._liveAppViewModel=b},getApplicableNodeClass:function(){return e},canLayoutIndividually:function(b){return!f.isLiveAppLineNode(b.parent)},layout:function(b,a){var c=b.layoutInto(a,"div");return c=this._liveAppViewModel.createInlineDomNode(a,
c)}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/view/LiveAppLineNodeCoordinateConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LiveAppLineNodeCoordinateConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/view/LiveAppLineNodeCoordinateConverter":function(){define(["dojo/_base/declare","MW/rtc/view/coordinateconverter/CoordinateConverterUtilities",
"MW/rtc/view/coordinateconverter/base/BaseCoordinateConverter","MW/rtc/plugins/language/matlab/codingui/liveapps/LiveAppUtilities","MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppLineNode"],function(g,f,e,d,b){return g(e,{constructor:function(){},getApplicableNodeClass:function(){return b},_getSubClientRects:function(a,c,b){var e=a.startNode(),g=[b(e)],e=g[0][0];if(!e||f.isCoordinateRightOfRect(c,e))return this.inherited(arguments);d.getGeneratedCodeLineNodes(a).forEach(function(a){g.push(b(a))});
return Array.prototype.concat.apply([],g)}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/view/LiveAppLineNodeLayouterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LiveAppLineNodeLayouter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.liveapps.viewmodel"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/language/matlab/codingui/liveapps/view/LiveAppLineNodeLayouter":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/language/matlab/codingui/liveapps/nodes/LiveAppLineNode","MW/rtc/plugins/view/layoutmanager/abstract/AbstractLayouter"],function(g,f,e){return g(e,{constructor:function(d){this._liveAppViewModel=d},getApplicableNodeClass:function(){return f},layout:function(d,b){var a=d.layoutInto(b,"div");return a=this._liveAppViewModel.createLineDomNode(b,a)},refresh:function(d,b){b.getWidget().updateView();return null},place:function(d,b){d.getWidget().addCodeLines(b)}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlActionHandlerProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./LiveControlActionHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.internaldocument rtc.cursorcontroller rtc.actionservice matlab.tokens rtc.livecontrols.contextmanager rtc.livecontrols.toolstrip rtc.livecontrols.widgethandler rtc.document".split(" ")}},createInstance:function(d,b,a,c,f,g,l,m,p){return new e(d,b,a,c,f,g,l,m,p)}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlActionHandler":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/keys MW/rtc/abstract/AbstractPlugin MW/rtc/model/CodeUtilities MW/rtc/model/SelectionUtilities MW/rtc/plugins/language/matlab/codingui/livecontrols/nodes/LiveControlNode MW/rtc/plugins/language/matlab/codingui/livecontrols/utilities/LiveControlUtilities MW/rtc/plugins/language/matlab/codingui/livecontrols/utilities/LiveControlWidgetUtilities".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return g(b,{_EMPTY_WIDGET_VALUE:"",constructor:function(a,c,b,h,g,k,l,u){this._internalDocument=a;this._cursor=c.getCursors()[0];this._tokenService=h;this._document=u;this._contextManager=g;this._liveControlToolstripActions=k;this._widgetHandler=l;a=[{id:"rtc_live_control_delete",enabled:!0,key:"delete",callback:f.hitch(this,"_handleNavigation",{keyCode:d.DELETE},!0)},{id:"rtc_live_control_tab",enabled:!0,key:"tab",callback:f.hitch(this,"_handleNavigation",{keyCode:d.TAB},
!0)},{id:"rtc_live_control_right",enabled:!0,key:"right",callback:f.hitch(this,"_handleNavigation",{keyCode:d.RIGHT_ARROW},!0)},{id:"rtc_live_control_left",enabled:!0,key:"left",callback:f.hitch(this,"_handleNavigation",{keyCode:d.LEFT_ARROW})},{id:"rtc_live_control_backspace",enabled:!0,key:"backspace",callback:f.hitch(this,"_handleNavigation",{keyCode:d.BACKSPACE})}];b.loadActions(a);this.own(e.after(this._cursor,"onChange",f.hitch(this,"_handleCursorChange")));this.own(e.after(this._document,"onPreDeletion",
f.hitch(this,"_handlePreDeletion"),!0));this.own(e.after(this._tokenService,"onUpdate",f.hitch(this,"_handleTokenizerUpdate"),!0));this.own(e.after(this._internalDocument,"onDocumentReset",f.hitch(this,"_updateControlState")));this.own(e.after(this._internalDocument,"readOnlyChanged",f.hitch(this,"_updateControlState")))},_handleNavigation:function(a,c){if(this._cursor.hasSelection())return!1;var b=this._cursor.getNode(),d=this._cursor.position;return c?this._navigateToControlAfterCursor(a,b,d):this._navigateToControlBeforeCursor(a,
b,d)},_navigateToControlAfterCursor:function(a,c,b){c=k.getControlAfterCursor(c,b);return this._sendEventToEnabledWidget(c,a)},_navigateToControlBeforeCursor:function(a,c,b){c=k.getControlBeforeCursor(c,b);return this._sendEventToEnabledWidget(c,a)},_sendEventToEnabledWidget:function(a,c){if(!a)return!1;var b=a.widget;return l.getDisabled(b)?this._handleForDisabledWidget(a,c.keyCode):b.navigate(c)},_handleForDisabledWidget:function(a,c){return c===d.BACKSPACE||c===d.DELETE?(this._widgetHandler.replaceControlWithText(a),
!0):!1},_handleCursorChange:function(){var a=this._cursor.getSelection();if(this._internalDocument.isReadOnly()||this._cursor.isCursorReadOnly()||this._isCursorInCommentedCode(a))this._resetModelAndUpdateActions(!1);else if(a){var c=this._cursor.getSelectionLineColumn();c.start.line!==c.end.line?this._resetModelAndUpdateActions(!1):k.isLiveControlNodeInRange(a)?this._resetModelAndUpdateActions(!1):(a=this._parseSelection(),this._widgetHandler.update(a))}else this._resetModelAndUpdateActions(!0)},
_isCursorInCommentedCode:function(a){if(a)return!1;a=this._cursor.getLineColumn();return k.isLineColumnInComment(a.line,a.column,this._tokenService)},_resetModelAndUpdateActions:function(a){this._contextManager.reset();this._liveControlToolstripActions.updateAllActions(a)},_parseSelection:function(){var a=this._cursor.selectedText(),c=k.getWidgetType(a);this._contextManager.createContextAndSetup({selectedText:a});return{text:a,widgetType:c}},_handlePreDeletion:function(){var a=this._cursor.getSelection();
if(a&&!this._internalDocument.isReadOnly()){var c=this._cursor.getSelectionLineColumn(),a=k.getLiveControlNodesInRange(a);a.forEach(function(a){this._replaceNodeWithText(a)},this);0!==a.length&&(a=c.start,c=c.end,this._cursor.setSelectionLineColumn(a.line,a.column,c.line,c.column))}},_replaceNodeWithText:function(a){var c=a.startPosition().getLineColumn(),b=a.getText();this._internalDocument.deleteNode(a);this._document.insertText(b,c.line,c.column)},_handleTokenizerUpdate:function(a){this._enableDisableControlInLines(a.startLine,
a.endLine)},_updateControlState:function(){this._enableDisableControlInLines(0,this._internalDocument.getMaxLineNumber()-1)},_enableDisableControlInLines:function(c,b){for(var d=c;d<=b;d++){var e=this._internalDocument.getLineNode(d);if(e&&a.isCodeContainer(e)){var f=e.children;f&&0!==f.length&&(e.isReadOnly()?k.setDisabledPropertyOfControlInNodes(f,!0):k.enableOrDisableControl(f,this._tokenService))}}}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/utilities/LiveControlUtilities":function(){define("MW/rtc/model/RangeUtilities MW/rtc/plugins/language/matlab/codingui/livecontrols/nodes/LiveControlNode MW/rtc/plugins/language/matlab/codingui/livecontrols/utilities/LiveControlWidgetUtilities MW/rtc/plugins/language/matlab/codingui/livecontrols/WidgetTypes MW/rtc/plugins/language/matlab/codingui/utilities/CodingUIUtilities MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities".split(" "),
function(g,f,e,d,b,a){return{getControlAfterCursor:function(a,b){return b.isAtLeftEdge()?this._getNodeIfLiveControlNode(a):b.isAtRightEdge()?this._getNodeIfLiveControlNode(a.nextSibling()):null},getControlBeforeCursor:function(a,b){return b.isAtRightEdge()?this._getNodeIfLiveControlNode(a):b.isAtLeftEdge()?this._getNodeIfLiveControlNode(a.previousSibling()):null},_getNodeIfLiveControlNode:function(a){return a instanceof f?a:null},isLiveControlNodeInRange:function(a){return g.isNodeTypeInRange(a,f)},
getLiveControlNodesInRange:function(a){var b=[];g.rangeIterator(a,function(a,c,d){a instanceof f&&d>c&&b.push(a)});return b},isLineColumnInComment:function(c,b,d){if(d.hasLineComment(c-1))return c=d.getTokensOnLine(c-1),c=this._getCommentStartColumnOnLine(c),-1===c?!1:b>c;var e=d.getFirstTokenOnLine(c-1);return d.isInComment(c-1,b-1)||!!e&&a.isCommentToken(e)},_getCommentStartColumnOnLine:function(c){if(!c)return-1;for(var b=-1,d=0;d<c.length;d++)if(a.isCommentToken(c[d])){b=c[d].getColumn()+1;break}return b},
getWidgetType:function(a){return!isNaN(a)&&""!==a.trim()?d.SCALAR:b.isMatlabString(a)?d.STRING:d.NONE},enableOrDisableControl:function(a,b){for(var d=0;d<a.length;d++){var g=a[d];if(g instanceof f){var m=g.startPosition(),p=m.getLine(),m=m.getColumn(),p=this.isLineColumnInComment(p,m,b),g=g.getWidget();p&&e.setEditMode(g,!1);e.setDisabled(g,p)}}},setDisabledPropertyOfControlInNodes:function(a,b){for(var d=0;d<a.length;d++){var g=a[d];g instanceof f&&(g=g.getWidget(),b&&e.setEditMode(g,!1),g.domNode&&
e.setDisabled(g,b))}}}})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/utilities/LiveControlWidgetUtilities":function(){define(["MW/rtc/plugins/language/matlab/codingui/livecontrols/ExecutionModelTypes","MW/rtc/plugins/language/matlab/codingui/livecontrols/ExecutionOnTypes","MW/rtc/view/ViewMeasurementUtilities"],function(g,f,e){return{_CONTROL_EDIT_MODE_PROPERTY:"editMode",_CONTROL_DATA_PROPERTY:"data",_CONTROL_VALUE_PROPERTY:"value",_CONTROL_DISABLED_PROPERTY:"disabled",_CONTROL_POSITION_PROPERTY:"position",
_CONTROL_WIDTH_PROPERTY:"width",_CONTROL_EXECUTE_ON_PROPERTY:"executionOn",_CONTROL_EXECUTION_MODEL_PROPERTY:"executionModel",getEditMode:function(d){return d.get(this._CONTROL_EDIT_MODE_PROPERTY)},getData:function(d){return d.get(this._CONTROL_DATA_PROPERTY)},getValue:function(d){return d.get(this._CONTROL_VALUE_PROPERTY)},getDisabled:function(d){return d.get(this._CONTROL_DISABLED_PROPERTY)},getExecuteOn:function(d){return d.get(this._CONTROL_EXECUTE_ON_PROPERTY)||this._getDefaultValueForExecuteOn(d)},
getExecutionModel:function(d){return d.get(this._CONTROL_EXECUTION_MODEL_PROPERTY)||g.CURRENT_SECTION},getWidth:function(d){return d.get(this._CONTROL_WIDTH_PROPERTY)},setEditMode:function(d,b){d.set(this._CONTROL_EDIT_MODE_PROPERTY,b)},setDisabled:function(d,b){d.set(this._CONTROL_DISABLED_PROPERTY,b)},setPosition:function(d,b){d.set(this._CONTROL_POSITION_PROPERTY,b)},setWidth:function(d,b){d.set(this._CONTROL_WIDTH_PROPERTY,b)},_getDefaultValueForExecuteOn:function(d){if("ComboBox"===d.type)return f.VALUE_CHANGED;
if("Slider"===d.type)return f.VALUE_CHANGING},resizeWidgetWidth:function(d){var b=e.getNumericCharacterWidth(),a=this.getWidth(d),c=a/b;0!==c%1&&(b*=Math.round(c),a!==b&&this.setWidth(d,b))}}})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/ExecutionModelTypes":function(){define({CURRENT_SECTION:"Section",CURRENT_SECTION_TO_END:"SectionToEnd",ALL:"AllSections",NOTHING:"Nothing"})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/ExecutionOnTypes":function(){define({VALUE_CHANGING:"ValueChanging",
VALUE_CHANGED:"ValueChanged"})},"MW/rtc/view/ViewMeasurementUtilities":function(){define(["dojo/dom-construct"],function(g){return{_singleCharWidth:null,_TEXT:"1234567890",_WRAPPER_CLASS:"characterWidthTextWrapper",_TEXT_NODE_CLASS:"characterWidthTextNode",_cache:{},getNumericCharacterWidth:function(){if(null===this._singleCharWidth){var f=g.create("span",{className:"rtePane"}),e=g.create("span",{innerHTML:this._TEXT});g.place(e,f);g.place(f,document.body);this._singleCharWidth=e.getBoundingClientRect().width/
this._TEXT.length;g.destroy(f)}return this._singleCharWidth},getNumericCharacterWidthForFontFamilyAndSize:function(f,e){if(!this._cache[f]||!this._cache[f][e]){this._cache[f]=this._cache[f]||{};var d=g.create("span",{className:this._WRAPPER_CLASS});d.style.position="fixed";d.style.visibility="hidden";d.style.whiteSpace="nowrap";var b=g.create("span",{innerHTML:this._TEXT,className:this._TEXT_NODE_CLASS},d);b.style.fontFamily=f;b.style.fontSize=e+"px";g.place(d,document.body);this._cache[f][e]=b.getBoundingClientRect().width/
this._TEXT.length;g.destroy(d)}return this._cache[f][e]}}})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/WidgetTypes":function(){define({SCALAR:"scalar",NONE:"none",STRING:"string",SLIDER:"slider",COMBO_BOX:"comboBox"})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlContextManagerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LiveControlContextManager"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},
createInstance:function(){return new e}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlContextManager":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin","./LiveControlContext"],function(g,f,e,d,b){return g(d,{constructor:function(){this._context=null},createContextAndSetup:function(a){this._cleanupOldContext();a=new b(a);this._setContext(a)},_cleanupOldContext:function(){this._context=null},_setContext:function(a){this._context=
a},getContext:function(){return this._context},reset:function(){this._cleanupOldContext()},destroy:function(){this._cleanupOldContext()}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlContext":function(){define(["dojo/_base/declare"],function(g){return g(null,{constructor:function(f){this.selectedText=f.selectedText}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlContextMenuProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"./LiveControlContextMenu"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.livecontrols.viewmodel","rtc.actionservice","rtc.cursorcontroller"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlContextMenu":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/i18n!l10n/nls/actions MW/rtc/abstract/AbstractPlugin MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlActions MW/rtc/plugins/language/matlab/codingui/livecontrols/utilities/LiveControlUtilities MW/rtc/plugins/language/matlab/codingui/livecontrols/utilities/LiveControlWidgetUtilities".split(" "),
function(g,f,e,d,b,a,c,h){return g(b,{constructor:function(c,b,h){this._cursor=h.getCursors()[0];this._actionService=b;this._cursorController=h;this.own(e.after(this._cursor,"onChange",f.hitch(this,"_handleCursorChange")));c=[{id:a.CONFIGURE_CONTROL,enabled:!1,contextMenuGroup:"RichText",callback:f.hitch(this,"_handleConfigureControl"),text:d.configureControl}];b.loadActions(c);this._rightClickedWidget=null},_handleCursorChange:function(){var a=this._cursor.getNode(),b=this._cursor.position,d=c.getControlBeforeCursor(a,
b),a=c.getControlAfterCursor(a,b);(d=d?d:a)?(this._rightClickedWidget=d.widget,d=!h.getDisabled(this._rightClickedWidget),this._updateConfigureControlAction(d)):(this._updateConfigureControlAction(!1),this._rightClickedWidget=null)},_handleConfigureControl:function(){this._rightClickedWidget&&h.setEditMode(this._rightClickedWidget,!0)},_updateConfigureControlAction:function(c){this._actionService.updateAction(a.CONFIGURE_CONTROL,{enabled:c})}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlActions":function(){define([],
function(){return{CONFIGURE_CONTROL:"rtc_configure_live_control",NUMERIC_SLIDER_INSERT_ACTION:"rtc_insert_slider",COMBO_BOX_INSERT_ACTION:"rtc_insert_combo_box"}})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlExecutionProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LiveControlExecution"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.code.sections.model","rtc.embeddedoutputs.viewservice"]}},createInstance:function(d,
b){return new e(d,b)}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlExecution":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin","MW/rtc/plugins/language/matlab/codingui/livecontrols/ExecutionModelTypes","MW/rtc/plugins/language/matlab/codingui/livecontrols/ExecutionOnTypes"],function(g,f,e,d){return g(f,{constructor:function(b,a){this._sectionModel=b;this._viewService=a},execute:function(b,a,c){b=this._sectionModel.getSectionNumberForLine(b);var f=0;
c===d.VALUE_CHANGING&&(f=1E3);switch(a){case e.CURRENT_SECTION:this._viewService.executeSectionWithVisualDelay(b,!1,!0,f,!0);break;case e.CURRENT_SECTION_TO_END:this._viewService.executeSectionWithVisualDelay(b,!0,!0,f,!0);break;case e.ALL:this._viewService.executeAllSectionsWithVisualDelay(!0,f,!0)}}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlInsertionProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LiveControlInsertion"],function(g,
f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.cursorcontroller","rtc.actionservice","rtc.livecontrols.contextmanager"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlInsertion":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/model/events/DocumentEvent MW/rtc/plugins/language/matlab/codingui/livecontrols/nodes/LiveControlNode MW/rtc/plugins/language/matlab/codingui/livecontrols/utilities/LiveControlWidgetUtilities MW/rtc/plugins/language/matlab/codingui/livecontrols/WidgetDetails".split(" "),
function(g,f,e,d,b,a,c,h){return g(d,{constructor:function(a,c,b,d,h){this._internalDocument=a;this._document=c;this._cursor=b.getCursors()[0];this._actionService=d;this._contextManager=h;this._loadActions();this.own(e.after(this._internalDocument,"onDocumentReset",f.hitch(this,"_handleDocumentReset")))},_loadActions:function(){var a=[{id:"rtc_insert_live_control",enabled:!1,callback:f.hitch(this,function(){})}],c;for(c in h){var b=h[c],d=b.actionId,b={id:d,enabled:!0,callback:f.hitch(this,"_insertLiveControlNode",
{type:c,id:d,value:b.defaultValue})};a.push(b)}this._actionService.loadActions(a)},_handleDocumentReset:function(){this._actionService.updateAction("rtc_insert_live_control",{enabled:!0})},_insertLiveControlNode:function(d){if(!this._actionService.getAction(d.id).enabled)return!1;var e=this._document.startBlockEdit();d=this._createNodeData(d);d=new a(d);var f=this._internalDocument.insertAtPosition(d,this._cursor.position),h=this._cursor.position.getLineColumn().line-1,g=d.startPosition().getLineColumn().line-
1;e.appendUndoEvents([b.create(h,g)]);f=f.events;e.appendRedoEvents(f);this._internalDocument.emitDocumentEvents(f);f=d.endPosition().getLineColumn();this._cursor.setLineColumn(f.line,f.column);this._document.endBlockEdit(e);c.setEditMode(d.widget,!0);return!0},_createNodeData:function(a){var c=a.type;a=a.value;var b=this._contextManager.getContext();b&&(a=b.selectedText.trim(),this._document.deleteTextAtCurrentPosition());return{context:{type:c,data:{value:a}}}}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/WidgetDetails":function(){define(["MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlActions",
"MW/rtc/plugins/language/matlab/codingui/livecontrols/WidgetTypes"],function(g,f){var e={};e[f.SLIDER]={actionId:g.NUMERIC_SLIDER_INSERT_ACTION,defaultValue:0,key:"ctrl_shift_s"};e[f.COMBO_BOX]={actionId:g.COMBO_BOX_INSERT_ACTION,defaultValue:"",key:"ctrl_shift_c"};return e})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlToolstripActionsProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LiveControlToolstripActions"],function(g,f,e){return g(f,
{requires:function(){return{createInstance:["rtc.actionservice"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlToolstripActions":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin","MW/rtc/plugins/language/matlab/codingui/livecontrols/WidgetDetails"],function(g,f,e,d,b){return g(d,{constructor:function(a){this._actionService=a},updateActions:function(a){for(var c in b){var d=
b[c],e=!1;-1<a.indexOf(c)&&(e=!0);this._actionService.updateAction(d.actionId,{enabled:e})}},updateAllActions:function(a){for(var c in b)this._actionService.updateAction(b[c].actionId,{enabled:a})}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlWidgetHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LiveControlWidgetHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.livecontrols.viewmodel rtc.view rtc.internaldocument rtc.document rtc.livecontrols.execution rtc.livecontrols.toolstrip rtc.cursorcontroller rtc.code.sections.stale.model rtc.scrollpane".split(" ")}},
createInstance:function(d,b,a,c,f,g,l,m,p){return new e(d,b,a,c,f,g,l,m,p)}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/LiveControlWidgetHandler":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/keys MW/rtc/abstract/AbstractPlugin MW/rtc/model/DocumentConstants MW/rtc/model/events/InsertTextEvent MW/rtc/model/events/DeletionEvent MW/rtc/model/events/DocumentEvent MW/rtc/view/ViewEventUtilities MW/rtc/plugins/language/matlab/codingui/livecontrols/utilities/LiveControlWidgetHandlerUtilities MW/rtc/plugins/language/matlab/codingui/livecontrols/utilities/LiveControlWidgetUtilities MW/rtc/plugins/language/matlab/codingui/livecontrols/ValidWidgetsManifest".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){return g(b,{constructor:function(a,c,b,d,h,g,k,l,m){this._liveControlViewModel=a;this._view=c;this._cursor=k.getCursors()[0];this._internalDocument=b;this._document=d;this._liveControlExecution=h;this._liveControlToolstripActions=g;this._cursorController=k;this._staleSectionModel=l;this._scrollPane=m;this.own(e.after(a,"onKeyEvents",f.hitch(this,"_handleKeyEvents"),!0));this.own(e.after(a,"onControlChange",f.hitch(this,"_handleControlChange"),!0));this.own(e.after(a,
"onEditModeStart",f.hitch(this,"_handleEditModeStart"),!0));this.own(e.after(a,"onEditModeEnd",f.hitch(this,"_handleEditModeEnd"),!0));this.own(e.after(a,"onFocus",f.hitch(this,"_handleFocus"),!0));this.own(e.after(a,"onWidgetResize",f.hitch(this,"_handleWidgetResize"),!0));this.own(e.after(c,"onViewUpdated",f.hitch(this,"_performBatchResize")));this.own(e.after(b,"onDocumentReset",f.hitch(this,"_performBatchResize")));this._windowBlur=!1;this.own(e.after(window,"onfocus",f.hitch(this,"_handleWindowFocus")));
this.own(e.after(window,"onblur",f.hitch(this,"_handleWindowBlur")))},_handleWindowFocus:function(){this._windowBlur=!1},_handleWindowBlur:function(){this._windowBlur=!0},_handleKeyEvents:function(c,b){if(c)switch(c.mwEventData.keyCode){case d.LEFT_ARROW:var e=b.startPosition();this._cursor.setPosition(e);break;case d.RIGHT_ARROW:case d.TAB:case d.ENTER:e=b.endPosition();this._cursor.setPosition(e);break;case d.BACKSPACE:this.replaceControlWithText(b,a.BACKWARD_DELETE);break;case d.DELETE:this.replaceControlWithText(b,
a.FORWARD_DELETE)}},replaceControlWithText:function(c,b){var d=this._document.startBlockEdit(),e=c.startPosition().getLineColumn(),f=c.endPosition().getLineColumn(),g=c.getText();this._document.replaceText(g,e.line,e.column,f.line,f.column);f=this._cursor.getLineColumn().line;f=[h.create(f-1,f-1,0)];b===a.BACKWARD_DELETE?this._cursor.setLineColumn(e.line,e.column+g.length):b===a.FORWARD_DELETE&&this._cursor.setLineColumn(e.line,e.column);d.appendUndoEvents(f);d.appendRedoEvents(f);this._internalDocument.emitDocumentEvents(f);
this._document.endBlockEdit(d)},update:function(a){this._liveControlToolstripActions.updateActions(n[a.widgetType])},_handleControlChange:function(a,c,b){this._updateNodeBasedOnEvent(a,b);var d=a.getWidget(),e=p.getExecuteOn(d);m.alreadyExecuted(e,b,c.mwEventData)?this._handleStalenessAndEmitDocEvent(a,!0):(c=m.shouldExecute(e,b),this._handleStalenessAndEmitDocEvent(a,c),b||d.focus(),c&&(b=p.getExecutionModel(d),a=a.startPosition().getLine()-1,this._liveControlExecution.execute(a,b,e)))},_updateNodeBasedOnEvent:function(a,
c){var b=a.getWidget(),b=p.getValue(b).toString();c?this._updateNodeIntermediately(a,b):this._updateNodeAndRecord(a,b)},_handleStalenessAndEmitDocEvent:function(a,c){var b=this._staleSectionModel.getEnablement();c&&this._staleSectionModel.setEnablement(!1);var d=a.startPosition().getLine()-1,d=[k.create(d,d)];this._internalDocument.emitDocumentEvents(d);this._staleSectionModel.setEnablement(b)},_handleEditModeStart:function(a){this._cursorController.clearSelection();m.reposition(this._view,a)},_handleEditModeEnd:function(a){var c=
a.getWidget(),c=p.getValue(c).toString();""===c?this._deleteNode(a):this._updateNode(a,c);this._view.onViewUpdated([l.createEvent(l.EVENTS.renderUpdate)]);this._windowBlur||this._cursor.show()},_deleteNode:function(a){var c=a.startPosition().getLineColumn().line-1,b=this._document.startEdit(m.getUndoRedoBlockType(a));this._internalDocument.deleteNode(a);a.widget.destroy();a.widget=null;a=[h.create(c,c,0)];b.appendUndoEvents(a);b.appendRedoEvents(a);this._document.endEdit(b);this._internalDocument.emitDocumentEvents(a)},
_updateNode:function(a,c){var b=this._updateNodeAndRecord(a,c);this._internalDocument.emitDocumentEvents(b)},_updateNodeIntermediately:function(a,c){a.intermediateEvalText=c},_updateNodeAndRecord:function(a,b){if(!m.shouldUpdate(a,b))return[];var d=a.getText(),e=a.startPosition(),f=e.getLine()-1,g=e.getColumn()-1,l=this._document.startEdit(m.getUndoRedoBlockType(a)),p=[k.create(f,f)];if(b!==d){this._internalDocument.updateTextInNode(a,b,0,d.length);var n=[h.create(f,f,g),c.create(f,f,e,d)],B=[c.create(f,
f,e,b),h.create(f,f,g)]}this._internalDocument.changeNodeAttributes(a,{context:m.createContextFromWidget(a)});a.intermediateEvalText=null;l.appendUndoEvents(n||p);l.appendRedoEvents(B||p);this._document.endEdit(l);return B||p},_handleFocus:function(a){this._cursorController.clearSelection();this._cursor.setPosition(a.endPosition())},_handleWidgetResize:function(a){p.resizeWidgetWidth(a)},_performBatchResize:function(){document.body.contains(this._scrollPane)&&(this._liveControlViewModel.getNodesToResize().forEach(function(a){this._handleWidgetResize(a.getWidget())},
this),this._liveControlViewModel.clearNodesToResizeQueue())}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/utilities/LiveControlWidgetHandlerUtilities":function(){define(["MW/rtc/plugins/language/matlab/codingui/livecontrols/ExecutionOnTypes","MW/rtc/plugins/language/matlab/codingui/livecontrols/utilities/LiveControlWidgetUtilities","MW/rtc/plugins/undoredo/EditBlockConstants"],function(g,f,e){return{_BOTTOM_MAX_HEIGHT:100,_BOTTOM_OFFSET:5,createContextFromWidget:function(d){return{type:d.getType(),
data:f.getData(d.getWidget())}},shouldUpdate:function(d,b){if(d.getText()!==b)return!0;var a=this.createContextFromWidget(d);return!d.isContextEqualTo(a)?!0:!1},reposition:function(d,b){this._repositionVertically(d,b)},_repositionVertically:function(d,b){var a=d.getCoordinateForNode(b),c=d.getDomTargetPosition(),e=d.getDomtarget().getBoundingClientRect(),e=this._hasEnoughSpaceBelow(a,c,e),a=this._hasMoreSpaceBelow(a,c);e||a?f.setPosition(b.widget,"bottom"):f.setPosition(b.widget,"top")},_hasEnoughSpaceBelow:function(d,
b,a){return d.y+a.top-b.scrollTop+this._BOTTOM_MAX_HEIGHT<=a.height},_hasMoreSpaceBelow:function(d,b){var a=d.y-b.scrollTop;return a<b.clientHeight-(a+d.height)},getUndoRedoBlockType:function(d){return" "===d.getText()?e.AUTO:null},shouldExecute:function(d,b){return!(b&&d===g.VALUE_CHANGED)},alreadyExecuted:function(d,b,a){return!b&&a.oldValue===a.newValue&&d===g.VALUE_CHANGING}}})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/ValidWidgetsManifest":function(){define(["MW/rtc/plugins/language/matlab/codingui/livecontrols/WidgetTypes"],
function(g){var f={};f[g.SCALAR]=[g.SLIDER,g.COMBO_BOX];f[g.NONE]=[g.COMBO_BOX];f[g.STRING]=[g.COMBO_BOX];return f})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/export/LiveControl2HTMLProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/language/matlab/codingui/livecontrols/export/LiveControl2HTML"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/export/LiveControl2HTML":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/export/NodeExporterInterface","MW/rtc/plugins/language/matlab/codingui/livecontrols/nodes/LiveControlNode"],function(g,f,e){return g([f],{constructor:function(){},getApplicableNodeClass:function(){return e},visit:function(d,b,a,c,e){b=b.box.getElementsByClassName("liveControlTextView")[0];d.addToBody(b.innerHTML);return!0}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/nodes/LiveControlNodeContentConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"./LiveControlNodeContentConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/nodes/LiveControlNodeContentConverter":function(){define(["dojo/_base/declare","MW/rtc/nodes/contentconverter/base/LeafNodeContentConverter","MW/rtc/plugins/language/matlab/codingui/livecontrols/nodes/LiveControlNode"],function(g,f,e){return g(f,{getApplicableNodeClass:function(){return e}})})},
"MW/rtc/plugins/language/matlab/codingui/livecontrols/nodes/LiveControlNodeExecutableCodeConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LiveControlNodeExecutableCodeConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/nodes/LiveControlNodeExecutableCodeConverter":function(){define(["dojo/_base/declare","MW/rtc/plugins/language/matlab/executablecode/executablecodeconverter/base/AbstractExecutableCodeConverter",
"MW/rtc/plugins/language/matlab/codingui/livecontrols/nodes/LiveControlNode"],function(g,f,e){return g(f,{constructor:function(){},getApplicableNodeClass:function(){return e},getEvalTextFromNode:function(d){return d.intermediateEvalText||d.text}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/view/converters/LiveControlCoordinateConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LiveControlCoordinateConverter"],function(g,f,e){return g(f,
{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/view/converters/LiveControlCoordinateConverter":function(){define(["dojo/_base/declare","MW/rtc/model/Position","MW/rtc/plugins/language/matlab/codingui/livecontrols/nodes/LiveControlNode","MW/rtc/view/coordinateconverter/base/OpaqueBoxCoordinateConverter","MW/rtc/view/coordinateconverter/CoordinateConverterUtilities"],function(g,f,e,d,b){return g(d,{BOUNDARY_OFFSET:1,
getApplicableNodeClass:function(){return e},getCoordinateFromPosition:function(a){var c=this.inherited(arguments),b=a.getOffset();b===a.getNode().maxOffset()?(c.x+=this.BOUNDARY_OFFSET,c.pageX+=this.BOUNDARY_OFFSET):0===b&&(c.x-=this.BOUNDARY_OFFSET,c.pageX-=this.BOUNDARY_OFFSET);return c},getPositionFromCoordinate:function(a,c){var d=this._getClientRects(c)[0];if(!b.isCoordinateWithinRect(a,d))return null;var e=0;a.x>=d.left+d.width/2&&(e=c.maxOffset());return new f(c,e)}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/view/LiveControlViewModelProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./LiveControlViewModel"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.view.decoration.viewmodel"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/view/LiveControlViewModel":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/aspect dojo/on MW/rtc/abstract/AbstractPlugin MW/rtc/plugins/language/matlab/codingui/livecontrols/utilities/LiveControlWidgetUtilities MW/rtc/plugins/language/matlab/codingui/livecontrols/manifest MW/rtc/view/decoration/DecorationUtilities".split(" "),
function(g,f,e,d,b,a,c,h,k){return g(a,{_LIVE_CONTROL_INNER_NODE:"liveControlInnerNode",_LIVE_CONTROL_DIV:"liveControlDiv",_LIVE_CONTROL_TEXT_VIEW:"liveControlTextView",constructor:function(a,c){this._internalDocument=a;this._decorationViewModel=c;this._nodesToBeResized=[]},createLiveControl:function(a){var c=this._createWrapperDomNode(),b=this._createWidgetView(a,c);c.appendChild(b);b=this._createTextView(a);c.appendChild(b);-1===this._nodesToBeResized.indexOf(a)&&this._nodesToBeResized.push(a);
return c},updateTextView:function(a,c){var b=this._createTextView(a),d=c.querySelector("."+this._LIVE_CONTROL_TEXT_VIEW);d.parentNode.replaceChild(b,d)},_createWrapperDomNode:function(){var a=e.create("div",{"class":this._LIVE_CONTROL_INNER_NODE});b(a,"pointerdown, mousedown",f.hitch(this,function(a){a.stopPropagation()}));return a},_createTextView:function(a){var c=a.getText(),b=e.create("span");a=this._decorationViewModel.getDecoration(a);c=k.createViewForTextNode(c,a,b);b=e.create("div",{"class":this._LIVE_CONTROL_TEXT_VIEW});
b.appendChild(c);return b},_createWidgetView:function(a){var c=e.create("div",{"class":this._LIVE_CONTROL_DIV}),b=a.widget;b?(!a.intermediateEvalText&&b.set("data",a.getContextData()),b.placeAt(c)):(b=this._createAndSetWidget(a),b.placeAt(c),b.startup());return c},_createAndSetWidget:function(a){var b=new (h[a.getType()])({data:a.getContextData()});a.setWidget(b);a.setContextData(c.getData(b));this._attachListenersOnWidget(a);return b},_attachListenersOnWidget:function(a){var c=a.widget;c.on("change",
f.hitch(this,function(c){this._handleChangeEvent(a,c)}));c.on("changing",f.hitch(this,function(c){this._handleChangingEvent(a,c)}));c.on("keyuponwidgets",f.hitch(this,function(c){this.onKeyEvents(c,a)}));c.watch("editMode",f.hitch(this,function(){this._handleEditModeChange(a)}));c.on("focusin",f.hitch(this,function(){this.onFocus(a)}));c.on("contextmenu",f.hitch(this,function(){this.onFocus(a)}));c.on("sizechange",f.hitch(this,function(){this.onWidgetResize(c)}))},_handleChangeEvent:function(a,c){this.onControlChange(a,
c,!1)},_handleChangingEvent:function(a,c){this.onControlChange(a,c,!0)},_handleEditModeChange:function(a){if(c.getEditMode(a.widget))this.onEditModeStart(a);else this.onEditModeEnd(a)},getNodesToResize:function(){return this._nodesToBeResized},clearNodesToResizeQueue:function(){this._nodesToBeResized=[]},onControlChange:function(a,c,b){},onEditModeStart:function(a){},onEditModeEnd:function(a){},onKeyEvents:function(a,c){},onFocus:function(a){},onWidgetResize:function(a){}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/manifest":function(){define(["MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/LiveControlSlider",
"MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/LiveControlComboBox","MW/rtc/plugins/language/matlab/codingui/livecontrols/WidgetTypes"],function(g,f,e){var d={};d[e.SLIDER]=g;d[e.COMBO_BOX]=f;return d})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/LiveControlSlider":function(){define("dojo/_base/declare dojo/keys dijit/_WidgetBase dijit/registry mw-form/TextField mw-event-utils/doubleClickHandler MW/rtc/plugins/language/matlab/codingui/widgets/WidgetsUtility MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/HorizontalSlider MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/SliderWidgetUtility MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/mixins/EditableMixin MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/mixins/DataMixin MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/mixins/DisabledMixin MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/mixins/PositionMixin dojo/i18n!l10n/nls/liveControls".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q){g=g([e,m,p,l,n],{baseClass:"mwLiveControlSlider",trackWidth:150,type:"Slider",value:0,dataProperties:["minimum","maximum","value","step"],constructor:function(){this.slider=new h;this.own(this.slider)},buildRendering:function(){this.inherited(arguments);this.domNode.setAttribute("tabindex","-1");this.domNode.setAttribute("data-focus","temporary");this.valueContainer=c.buildNode("div",{className:"valueContainer",parent:this.domNode},"mwLiveControlSlider");this.valueNode=
c.buildNode("div",{className:"value",parent:this.valueContainer},"mwLiveControlSlider");this.widgetContainer=c.buildNode("div",{className:"mwSliderContainer",parent:this.domNode},"mwLiveControlSlider");this.minLabel=c.buildNode("span",{className:"minLabel",parent:this.widgetContainer},"mwLiveControlSlider");this.maxLabel=c.buildNode("span",{className:"maxLabel",parent:this.widgetContainer},"mwLiveControlSlider");this.widgetContainer.appendChild(this.slider.domNode);this.editorContainer=c.buildNode("div",
{className:"mwSliderEditorContainer",parent:this.widgetContainer},"mwLiveControlSlider")},_setWidthAttr:function(a){var c=this.valueContainer.getBoundingClientRect().width;this.set("trackWidth",a-c-8);this.domNode.style.width=a+"px";this._set("width",a)},_setTrackWidthAttr:function(a){this.slider.set("width",a);this._set("trackWidth",a);this.emit("sizechange")},_getWidthAttr:function(){var a=this.get("trackWidth"),c=this.valueContainer.getBoundingClientRect().width;return a+c+8},_setDefaultLimits:function(){var a=
this.get("value");if(void 0===this.get("maximum")){var c=a?Math.max(0,2*a):100;this.set("maximum",c)}void 0===this.get("minimum")&&(a=a?Math.min(0,2*a):-100,this.set("minimum",a))},_setValueAttr:function(a){this.slider.set("value",a);this._set("value",a);this.valueNode.textContent=a;this._resizeValueNode()},_setMinimumAttr:function(a){this.slider.set("minimum",a);this.minLabel.textContent=a;this._set("minimum",a);this._resizeValueNode()},_setMaximumAttr:function(a){this.slider.set("maximum",a);this.maxLabel.textContent=
a;this._set("maximum",a);this._resizeValueNode()},_setStepAttr:function(a){this.slider.set("step",a);this._set("step",a)},_getStepAttr:function(){return this.slider.get("step")?this.slider.get("step"):this.slider.get("defaultStep")},_setDisabledAttr:function(a){this.inherited(arguments);this.slider.set("disabled",a)},postCreate:function(){this.inherited(arguments);this.set("value",this.value);this._setDefaultLimits();this.domNode.addEventListener("focus",this.focus.bind(this));this.slider.focusNode.addEventListener("blur",
this._handleSliderBlur.bind(this));this.slider.focusNode.addEventListener("focus",this._handleSliderFocus.bind(this));this._clickCallback=this._handleClick.bind(this);this._doubleClickCallback=this._handleDoubleClick.bind(this);this._doubleClickHandlerCallback=a.createCallback(this._clickCallback,this._doubleClickCallback);this.valueContainer.addEventListener("click",this._doubleClickHandlerCallback);this.widgetContainer.addEventListener("click",this._handleClick.bind(this));this.widgetContainer.addEventListener("dblclick",
this._handleDoubleClick.bind(this));this.domNode.addEventListener("mousedown",this._handleMouseDown.bind(this),!0);this.slider.domNode.addEventListener("mousedragging",this.focus.bind(this),!0);this.slider.domNode.addEventListener("mousedragreleased",this.focus.bind(this),!0);this.slider.domNode.addEventListener("mouseclicked",this.focus.bind(this),!0);this.domNode.addEventListener("keyup",this._handleKeyUp.bind(this));this.domNode.addEventListener("keydown",this._handleKeyDown.bind(this));this.domNode.addEventListener("change",
this._handleChange.bind(this));this._valueWatchHandle=this.slider.watch("value",this._updateValue.bind(this))},focus:function(){this.slider.focusNode.focus()},_handleSliderBlur:function(){this.domNode.classList.remove("mwLiveControlSlider--SliderFocused")},_handleSliderFocus:function(){this.domNode.classList.add("mwLiveControlSlider--SliderFocused")},_handleChange:function(a){var c=d.getEnclosingWidget(a.target);if(c===this.valueEditor||c===this.minEditor||c===this.maxEditor||c===this.stepEditor)a.stopImmediatePropagation(),
a.stopPropagation()},showInPlaceEditor:function(){this._showSliderLimitEditors()},_showSliderValueEditor:function(){this.domNode.classList.add("mwLiveControlSlider--valueEdit");this.valueEditor||this._createEditor("mwValueEditor");this._setValueEditorContent();this._saveEditor=!0},_showSliderLimitEditors:function(){var a=this.valueContainer.getBoundingClientRect().width;this.editorContainer.style.left="-"+a+"px";0===this.editorContainer.children.length&&(this._createEditor("mwMinEditor"),this._createEditor("mwStepEditor"),
this._createEditor("mwMaxEditor"));this._setLimitEditorContents();this._saveEditor=!0},_createEditor:function(a){var d,e,f;if("mwValueEditor"!==a){f=c.buildNode("div",{className:"editorWrapper",parent:this.editorContainer},"mwLiveControlSlider");switch(a){case "mwMinEditor":d=q.sliderMinLabel;this.minEditor=e=new b;break;case "mwStepEditor":d=q.sliderStepLabel;this.stepEditor=e=new b;break;case "mwMaxEditor":d=q.sliderMaxLabel,this.maxEditor=e=new b}c.buildNode("span",{className:"editorLabel",useOwnClass:!0,
text:d,parent:f},"mwLiveControlSlider");d=f;f=40}else d=this.valueContainer,this.valueEditor=e=new b,f=this.valueContainer.getBoundingClientRect().width;e.domNode.classList.add(a);d.appendChild(e.domNode);e.startup();e.set("width",f);this._hookUpEditorListeners(e)},_hookUpEditorListeners:function(a){this.get("editMode")?(this._editorChangeCallback=this._handleInputChanges.bind(this),a.focusNode.addEventListener("change",this._editorChangeCallback)):(this._editorBlurCallback=this._handleValueEditorBlur.bind(this),
a.focusNode.addEventListener("blur",this._editorBlurCallback))},_setValueEditorContent:function(){this.valueEditor.set("value",this.get("value"));this.valueEditor.focusNode.focus()},_setLimitEditorContents:function(){this.minEditor.set("value",this.get("minimum"));this.maxEditor.set("value",this.get("maximum"));this.stepEditor.set("value",this.get("step"));this.minEditor.focusNode.focus()},_handleValueEditorBlur:function(){this.hideInPlaceEditor()},_handleInputChanges:function(){var a=parseFloat(this.stepEditor.focusNode.value),
c=parseFloat(this.minEditor.focusNode.value),b=parseFloat(this.maxEditor.focusNode.value),a=this._computeValidSliderProperties(this.get("value"),c,b,a);isNaN(a.max)||this.maxEditor.set("value",a.max);isNaN(a.min)||this.minEditor.set("value",a.min);isNaN(a.step)||this.stepEditor.set("value",a.step)},hideInPlaceEditor:function(){this._removeEditors();this.domNode.classList.remove("mwLiveControlSlider--valueEdit")},_removeEditors:function(){var a=this._getEditorContentToSave();this._saveEditor&&this._saveSliderChanges(a)},
_getEditorContentToSave:function(){var a=[],c=[];this.get("editMode")?(c.push(this.minEditor),c.push(this.stepEditor),c.push(this.maxEditor)):this.valueEditor&&c.push(this.valueEditor);c&&c.forEach(function(c){var b,d,e={},f=this._validateWidgetTextChanges(c);switch(c){case this.minEditor:b="minimum";d=this.get("minimum");break;case this.stepEditor:b="step";d=this.get("step");break;case this.maxEditor:b="maximum";d=this.get("maximum");break;case this.valueEditor:b="value",d=this.get("value")}f&&(d=
c.focusNode.value);e[b]=d;a.push(e)},this);return a},_validateWidgetTextChanges:function(a){a=a.get("value");return/^[-+]?([0-9]*.?[0-9]+|[0-9]+.?[0-9]*)([eE][-+]?[0-9]+)?$|^$/.test(a)},_saveSliderChanges:function(a){var c,b=this.get("value");if(0!==a.length)if(1===a.length)a=a[0],c=Object.keys(a)[0],c=a[c],c=parseFloat(c),a=this._computeValidSliderProperties(c,this.get("minimum"),this.get("maximum"),this.get("step")),c=a.value,b!==c&&!isNaN(c)&&(this.set("value",c),this.slider._triggerChangeEvent("value",
b,c));else{c=parseFloat(a[0].minimum);var d=parseFloat(a[1].step),e=parseFloat(a[2].maximum);a=this._computeValidSliderProperties(this.get("value"),c,e,d);b!==a.value&&this.set("value",a.value);isNaN(c)||this.set("minimum",a.min);isNaN(d)||this.set("step",a.step);isNaN(e)||this.set("maximum",a.max)}},_computeValidSliderProperties:function(a,c,b,d){var e=Math.abs(b-c);if(b<c){var f=b;b=c;c=f}d=d>e?e:d;d=0>=d?this.get("step"):d;return{value:a<c?c:a>b?b:a,max:b,min:c,step:d}},_handleClick:function(a){this.valueContainer.contains(a.target)&&
!this.domNode.classList.contains("mwLiveControlSlider--valueEdit")&&this._showSliderValueEditor();a.stopPropagation()},_handleDoubleClick:function(a){!this.get("editMode")&&!this.domNode.classList.contains("mwLiveControlSlider--valueEdit")&&(this.set("editMode",!0),a.stopPropagation())},_handleMouseDown:function(a){a.target===this.slider.focusNode&&this.slider.focusNode.focus()},_updateValue:function(a,c,b){this._set("value",b);this.valueNode.textContent=b},_resizeValueNode:function(){var a=this.get("value"),
c=this.get("step"),b=k.findSuitablePrecision(c,a),d=this.get("maximum"),e=d?d.toString().length:0,f=0;-1!==c.toString().indexOf(".")&&(f=parseFloat((d-c).toFixed(b)),f=f.toString().length);var h=this.get("minimum"),d=h?h.toString().length:0,g=0;-1!==c.toString().indexOf(".")&&(b=parseFloat((h-c).toFixed(b)),g=b.toString().length);a=Math.max(d,g,e,f,a.toString().length,c.toString().length)+"ch";this.valueContainer.style.width!==a&&(this.emit("sizechange"),this.valueContainer.style.width=a)},navigate:function(a){var c=
document.activeElement,b=!1;switch(a.keyCode){case f.BACKSPACE:c!==this.domNode&&!this.get("editMode")&&(this.focus(),b=!0);break;case f.DELETE:c!==this.domNode&&!this.get("editMode")&&(this.focus(),b=!0);break;case f.LEFT_ARROW:c!==this.domNode&&(this._showSliderValueEditor(),c=document.activeElement,a=c.value.length,c.setSelectionRange(a,a),b=!0);break;case f.RIGHT_ARROW:c!==this.domNode&&(this._showSliderValueEditor(),document.activeElement.setSelectionRange(0,0),b=!0);break;case f.TAB:c!==this.domNode&&
(this.focus(),b=!0)}return b},_handleKeyDown:function(a){a=a.keyCode;var c=document.activeElement;switch(a){case f.LEFT_ARROW:this.domNode.classList.contains("mwLiveControlSlider--valueEdit")&&0===c.selectionStart&&(this.hideInPlaceEditor(),this.emit("restorefocustolastnonrefuseelement"),this.emit("keyuponwidgets",{mwEventData:{keyCode:a}}));break;case f.RIGHT_ARROW:if(this.domNode.classList.contains("mwLiveControlSlider--valueEdit")){var b=this.valueContainer.querySelector(".mwTextField"),b=d.getEnclosingWidget(b);
c.selectionStart===b.focusNode.value.length&&(this.hideInPlaceEditor(),this.emit("restorefocustolastnonrefuseelement"),this.emit("keyuponwidgets",{mwEventData:{keyCode:a}}))}break;case f.TAB:c===this.slider.focusNode?(this.emit("restorefocustolastnonrefuseelement"),this.emit("keyuponwidgets",{mwEventData:{keyCode:a}})):this.maxEditor&&c===this.maxEditor.focusNode&&(this.set("editMode",!1),this.emit("restorefocustolastnonrefuseelement"),this.emit("keyuponwidgets",{mwEventData:{keyCode:a}}));break;
case f.ESCAPE:this._saveEditor=!1;this.domNode.classList.contains("mwLiveControlSlider--valueEdit")?this.hideInPlaceEditor():this.get("editMode")&&this.set("editMode",!1);this.emit("restorefocustolastnonrefuseelement");break;case f.ENTER:this.get("editMode")?this.set("editMode",!1):this.domNode.classList.contains("mwLiveControlSlider--valueEdit")&&this.hideInPlaceEditor();this.emit("keyuponwidgets",{mwEventData:{keyCode:a}});this.emit("restorefocustolastnonrefuseelement");break;case f.BACKSPACE:c===
this.slider.focusNode&&(this.emit("restorefocustolastnonrefuseelement"),this.emit("keyuponwidgets",{mwEventData:{keyCode:a}}));break;case f.DELETE:c===this.slider.focusNode&&(this.emit("restorefocustolastnonrefuseelement"),this.emit("keyuponwidgets",{mwEventData:{keyCode:a}}))}},_handleKeyUp:function(a){a.keyCode===f.TAB&&this.domNode.classList.contains("mwLiveControlSlider--valueEdit")&&(this.hideInPlaceEditor(),this.slider.focusNode.focus())},startup:function(){this.inherited(arguments);this.slider.startup()},
destroy:function(){this._valueWatchHandle.unwatch();this.slider.destroy();this._editorDestroy();this.domNode.removeEventListener("click",this._doubleClickHandlerCallback);this.inherited(arguments)},_editorDestroy:function(){0<this.editorContainer.children.length&&(this.minEditor.focusNode.removeEventListener("change",this._editorChangeCallback),this.maxEditor.focusNode.removeEventListener("change",this._editorChangeCallback),this.stepEditor.focusNode.removeEventListener("change",this._editorChangeCallback),
this.minEditor.destroy(),this.maxEditor.destroy(),this.stepEditor.destroy());this.valueEditor&&(this.valueEditor.focusNode.removeEventListener("blur",this._editorBlurCallback),this.valueEditor.destroy())}});g.BASE_CLASS="mwLiveControlSlider";g.EDIT_MODE_CLASS="mwLiveControlSlider--editMode";g.VALUE_EDIT_CLASS="mwLiveControlSlider--valueEdit";return g})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/HorizontalSlider":function(){define(["dojo/_base/declare","dojo/keys","dijit/_WidgetBase",
"MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/BaseHorizontalSlider","MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/SliderWidgetUtility"],function(g,f,e,d,b){return g([e,d],{discrete:!0,minimum:0,maximum:100,value:0,width:150,defaultStep:1,step:null,constructor:function(){this.minorTicks=[];this.majorTicks=[];this.majorTickLabels="     ".split(" ")},_setWidthAttr:function(a){this.set("outerWidth",a);this._set("width",a)},postCreate:function(){this.inherited(arguments);
this.set("outerHeight",16);this.set("minimum",this.minimum);this.set("value",this.value);this.domNode.addEventListener("keydown",this._handleKeyboardEvents.bind(this))},_emitChangeEvent:function(){var a=this.get("value");this._lastChangeValueEmitted!==a&&(this._triggerChangeEvent("value",a,a),this._lastChangeValueEmitted=a)},_triggerChangeEvent:function(a,c,b){this.emit("change",{mwEventData:{propertyName:a,oldValue:c,newValue:b}})},_triggerChangingEvent:function(a,c){this.emit("changing",{mwEventData:{propertyName:"value",
oldValue:a,newValue:c}})},_setMinimumAttr:function(a){a=parseFloat(a);isNaN(a)||(this.inherited(arguments),this._set("minimum",a),this._calculateStepSize())},_setMaximumAttr:function(a){a=parseFloat(a);isNaN(a)||(this.inherited(arguments),this._set("maximum",a),this._calculateStepSize())},_setValueAttr:function(a){this.inherited(arguments);this._set("value",a);0!==a%1?(this.set("discrete",!1),this._calculateStepSize()):this.set("discrete",!0)},_setStepAttr:function(a){a=parseFloat(a);isNaN(a)||this._set("step",
a)},_calculateStepSize:function(){var a=b.findSuitableStepSize(this.get("value"),this.get("maximum"),this.get("minimum"),this.get("discrete"));this.set("defaultStep",a)},_handleKeyboardEvents:function(a){if(!this.get("disabled")){var c=parseFloat(this.get("value")),d=this.get("step")?this.get("step"):this.get("defaultStep"),e=c;a.keyCode===f.LEFT_ARROW||a.keyCode===f.DOWN_ARROW?(e=c-d,e<this.get("minimum")&&(e=this.get("minimum"))):a.keyCode===f.RIGHT_ARROW||a.keyCode===f.UP_ARROW?(e=c+d,e>this.get("maximum")&&
(e=this.get("maximum"))):a.keyCode===f.HOME?e=this.get("minimum"):a.keyCode===f.END&&(e=this.get("maximum"));d=b.findSuitablePrecision(d,this.get("value"));e=parseFloat(e.toFixed(d));this.set("value",e);c!==e&&this._triggerChangeEvent("value",c,e);a.preventDefault()}},_onTrackClick:function(a){(a.target===this.sliderTrackNode||this.sliderTrackNode.contains(a.target))&&this.inherited(arguments)},_setPixelValue:function(a,c){if(!this.disabled&&!this.readOnly){var d,e=this.get("value"),f=this.get("step")?
this.get("step"):this.get("defaultStep"),g=b.findSuitablePrecision(f,this.get("value"));0>a?d=this.get("minimum"):(d=a>c?this.get("maximum"):Math.max(Math.min((this.maximum-this.minimum)*a/c+this.minimum,this.maximum),this.minimum),d=b.findValidSliderValue(d,this.get("minimum"),this.get("maximum"),f));d=parseFloat(d.toFixed(g));this._set("value",d);e!==d&&this._triggerChangingEvent(e,d)}}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/BaseHorizontalSlider":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-style dojo/dom-geometry dojo/query dojo/number dijit/_WidgetBase dijit/_TemplatedMixin MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/mixins/SliderMixin".split(" "),
function(g,f,e,d,b,a,c,h,k){var l=g(k,{baseClass:"mwWidget mwSlider mwHorizontalSlider",width:200,height:3,_mousePixelCoord:"pageX",_pixelCount:"w",_startingPixelCoord:"x",_thumbPositionParam1:"width",_thumbPositionParam2:"left",_isScaleDirectionReverse:!1,orientation:"horizontal",getRuleLabelConstructor:function(){return l._HorizontalRuleLabels},_setWidthAttr:function(a){this.inherited(arguments);e.set(this.containerNode,{width:a+"px"})},_updateVisual:function(){0<this.width&&0<this.height?(e.set(this.sliderTrackNode,
{display:"block"}),e.set(this.containerNode,{display:"block"})):(e.set(this.sliderTrackNode,{display:"none"}),e.set(this.containerNode,{display:"none"}))},getRuleConstructor:function(){return l._HorizontalRule},postCreate:function(){this.inherited(arguments);this.own(this.watch("width",f.hitch(this,"_adjustThumbPosition")),this.watch("fontSize",f.hitch(this,"_adjustLabelContainerPositioning")),this.watch("fontWeight",f.hitch(this,"_adjustLabelContainerPositioning")),this.watch("fontFamily",f.hitch(this,
"_adjustLabelContainerPositioning")),this.watch("fontStyle",f.hitch(this,"_adjustLabelContainerPositioning")))},_setMajorTickLabelsAttr:function(a){this.inherited(arguments);this._adjustLabelContainerPositioning()},_adjustLabelContainerPositioning:function(){this.majorTickLabelDijit&&b(".dijitRuleLabelContainerH",this.majorTickLabelDijit.domNode).forEach(function(a){var c=-1*(d.position(a).w/2);e.set(a,"margin-left",c+"px")})},_computePreferredWidth:function(){var a,c;c=d.position(this.sliderTrackNode);
a=Math.min(c.x-this.sliderThumbSize.w/2,this.sliderThumbSize.x);c=Math.max(c.x+c.w+this.sliderThumbSize.w/2,this.sliderThumbSize.x+this.sliderThumbSize.w);this._majorTickLabelsPosition=this._computePreferredSizeOfMajorTickLabels();null!==this._majorTickLabelsPosition&&(a=Math.min(this._majorTickLabelsPosition.x,a),c=Math.max(this._majorTickLabelsPosition.x+this._majorTickLabelsPosition.w,c));return Math.ceil(c)-Math.floor(a)},_computePreferredX:function(){var a=this._adjustTrackAndContainerOffset();
return this.location[0]-a},_computePreferredHeight:function(){var a=this._getDomNodeOfWidgetAtEnd(),c=this.sliderThumbSize.y;a?(this._bottomWidgetPosition=null!==this.majorTickLabelDijit&&a===this.majorTickLabelDijit.domNode?null!==this._majorTickLabelsPosition?this._majorTickLabelsPosition:this._computePreferredSizeOfMajorTickLabels():d.position(a),a=this._bottomWidgetPosition.y+this._bottomWidgetPosition.h):a=this.sliderThumbSize.y+this.sliderThumbSize.h;return Math.ceil(a)-Math.floor(c)},_computePreferredY:function(){var a;
a=d.position(this.sliderTrackNode);this._bottomWidgetPosition?(a=this._bottomWidgetPosition.y-a.y-a.h+this._bottomWidgetPosition.h,this._bottomWidgetPosition=null):a=this.sliderThumbSize.h/3;return this.location[1]-a},_computePreferredSizeOfMajorTickLabels:function(){var a=null;if(this.majorTickLabelDijit){var a=b(".dijitRuleLabel",this.majorTickLabelDijit.domNode),c=[],e=-1*Number.MAX_VALUE,f=0,h=Number.MAX_VALUE,g=0;a.forEach(function(a){a=d.position(a);a.y>e&&(e=a.y);a.x<h&&(h=a.x);a.h>f&&(f=a.h);
c.push(a.x+a.w)});a=Math.max.apply(null,c);g=Math.ceil(a)-Math.floor(h);a={w:g,h:f,y:e,x:h}}return a},_adjustTrackAndContainerOffset:function(){var a=b(".dijitRuleLabel",this.containerNode),c=d.position(this.sliderTrackNode),f=Math.max(this.sliderThumbSize.w/2,c.x-this.sliderThumbSize.x);if(0!==a.length){for(var h=[],g=0;g<a.length;g++)h[g]=d.position(a[g]).x;a=Math.min.apply(null,h);a<Math.min(c.x-this.sliderThumbSize.w/2,this.sliderThumbSize.x)&&(f=c.x-a)}f=Math.round(f);e.set(this.sliderTrackNode,
{left:f+"px"});e.set(this.containerNode,{left:f+"px"});return f},getTickLabelTrackLength:function(a){return d.position(this.sliderTrackNode).w}});l._HorizontalRule=g([c,h],{templateString:'\x3cdiv class\x3d"dijitRuleContainer dijitRuleContainerH"\x3e\x3c/div\x3e',count:3,container:"containerNode",ruleStyle:"",_positionPrefix:'\x3cdiv class\x3d"dijitRuleMark dijitRuleMarkH" style\x3d"left:',_positionSuffix:"%;",_suffix:'"\x3e\x3c/div\x3e',ticks:null,minimum:0,maximum:100,_isHorizontal:!0,isAddQeIdForTickBased:!0,
_qeIdSuffix:"id\x3d",_genHTML:function(a,c){var b="";this.isAddQeIdForTickBased&&this.ticks&&(b='"'+this._qeIdSuffix+'"'+this["class"]+"_"+this.ticks[c]);return this._positionPrefix+a+this._positionSuffix+this.ruleStyle+b+this._suffix},buildRendering:function(){this.inherited(arguments);var a="",c;if(this.ticks){var b=this.maximum-this.minimum;for(c=0;c<this.count;c++)a+=this._genHTML(100*((this.ticks[c]-this.minimum)/b),c)}else{a=this._genHTML(0,0);b=100/(this.count-1);for(c=1;c<this.count-1;c++)a+=
this._genHTML(b*c,c);a+=this._genHTML(100,this.count-1)}this.domNode.innerHTML=a}});l._HorizontalRuleLabels=g(l._HorizontalRule,{templateString:'\x3cdiv class\x3d"dijitRuleContainer dijitRuleContainerH dijitRuleLabelsContainer dijitRuleLabelsContainerH"\x3e\x3c/div\x3e',labelStyle:"",labels:[],numericMargin:0,minimum:0,maximum:1,constraints:{pattern:"#%"},_positionPrefix:'\x3cdiv class\x3d"dijitRuleLabelContainer dijitRuleLabelContainerH" style\x3d"left:',_labelPrefix:'"\x3e\x3cdiv class\x3d"dijitRuleLabel dijitRuleLabelH"',
_suffix:"\x3c/div\x3e\x3c/div\x3e",_qeIdSuffix:"id\x3d",_calcPosition:function(a){return a},_genHTML:function(a,c){var b=this._qeIdSuffix+'"'+this["class"]+"_"+this.labels[c]+'"\x3e';return this._positionPrefix+this._calcPosition(a)+this._positionSuffix+this.labelStyle+this._labelPrefix+b+this.labels[c]+this._suffix},getLabels:function(){var c=this.labels;!c.length&&this.srcNodeRef&&(c=b("\x3e li",this.srcNodeRef).map(function(a){return String(a.innerHTML)}));if(!c.length&&1<this.count)for(var d=
this.minimum,e=(this.maximum-d)/(this.count-1),f=0;f<this.count;f++)c.push(f<this.numericMargin||f>=this.count-this.numericMargin?"":a.format(d,this.constraints)),d+=e;return c},postMixInProperties:function(){this.inherited(arguments);this.labels=this.getLabels();this.count=this.labels.length}});return l})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/mixins/SliderMixin":function(){define("dojo/_base/declare dojo/on dojo/_base/lang dojo/dom-style dojo/dom-geometry dojo/_base/event dojo/dnd/Moveable dojo/dnd/Mover dijit/focus dijit/_WidgetBase dijit/_CssStateMixin dijit/_TemplatedMixin dijit/_Container dojo/text!../templates/Slider.html mw-mixins/property/DisabledMixin mw-mixins/property/VisualFamilyMixin mw-mixins/event/ChangeEventMixin mw-mixins/mixinDependencyValidator".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u){var v=g(u.validate([l,m,p,n,r,s,t]),{baseClass:"mwWidget mwSlider",templateString:q,sliderTrackNode:null,sliderThumbNode:null,value:0,maximum:100,minimum:0,THUMB_WIDTH:11,majorTickDijit:null,majorTickLabelDijit:null,minorTickDijit:null,_majorTickLabelsPosition:null,constructor:function(){this.location=[100,100];this.preferredSize={width:0,height:0,left:0,bottom:0};this.minorTicks=[0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100];this.majorTicks=
[0,20,40,60,80,100];this.majorTickLabels="0 20 40 60 80 100".split(" ")},_setHeightAttr:function(a){d.set(this.sliderTrackNode,{height:a+"px"});this._set("height",a);this.set("outerHeight",this.get("height")+35);this._updateVisual()},_setWidthAttr:function(a){d.set(this.sliderTrackNode,{width:a+"px"});this._set("width",a);this.set("outerWidth",this.get("width")+30);this._updateVisual()},_updateVisual:function(){},_setOuterWidthAttr:function(a){d.set(this.domNode,{width:a+"px"})},_setOuterHeightAttr:function(a){d.set(this.domNode,
{height:a+"px"})},_setLocationAttr:function(a){this._set("location",a)},_setPixelValue:function(a,c){if(!this.disabled&&!this.readOnly){var b=(this.maximum-this.minimum)*(a/c)+this.minimum,b=Math.min(b,this.maximum),b=Math.max(b,this.minimum);this._setValueAttr(b)}},_setValueAttr:function(a){this._set("value",a)},_setMinimumAttr:function(a){this._set("minimum",a);this._setMajorTickLabelsAttr(this.get("majorTickLabels"));this._setMajorTicksAttr(this.get("majorTicks"))},_setMaximumAttr:function(a){this._set("maximum",
a)},_setMajorTicksAttr:function(a){this.majorTickDijit&&(this.majorTickDijit.destroy(),this.majorTickDijit=null);this._set("majorTicks",a);0<a.length&&(this.majorTickDijit=new (this.getRuleConstructor())({"class":"mwMajorTickMarks",ticks:this.majorTicks,minimum:this.minimum,maximum:this.maximum,count:this.majorTicks?this.majorTicks.length:3}),this.majorTickDijit.placeAt(this.containerNode))},_setMinorTicksAttr:function(a){this.minorTickDijit&&(this.minorTickDijit.destroy(),this.minorTickDijit=null);
this._set("minorTicks",a);0<a.length&&(this.minorTickDijit=new (this.getRuleConstructor())({"class":"mwMinorTickMarks",count:this.minorTicks?this.minorTicks.length:3,ticks:this.minorTicks,minimum:this.minimum,maximum:this.maximum}),this.minorTickDijit.placeAt(this.containerNode))},_setMajorTickLabelsAttr:function(a){this.majorTickLabelDijit&&(this.majorTickLabelDijit.destroy(),this.majorTickLabelDijit=null);this._set("majorTickLabels",a);0<a.length&&0<a.join("").trim().length&&(this.majorTickLabelDijit=
new (this.getRuleLabelConstructor())({"class":"mwMajorTickLabels",minimum:this.minimum,maximum:this.maximum,labels:this.majorTickLabels,count:this.majorTickLabels.length,ticks:this.majorTicks}),this.majorTickLabelDijit.placeAt(this.containerNode))},_onTrackClick:function(c){if(!this.disabled&&!(this.readOnly||0!==c.button))this._sliderTrackDimensions=b.position(this.sliderTrackNode),this._snapValueToTarget(this,c),k.focus(this.sliderThumbNode),a.stop(c),this._thumbMoveable.onMouseDown(c)},_emitChangeEvent:function(){var a=
this.get("value");this._lastChangeValueEmitted!==a&&(this._triggerChangeEvent("value",this._lastChangeValueEmitted,a),this._lastChangeValueEmitted=a)},_snapValueToTarget:function(a,c){var b=c.target;if(this._snapToMajorTick(b))b=this._findChildNode(b),b=a.majorTicks[b],a.set("value",b);else if(this._snapToMajorTickLabel(b))b=this._findChildNode(b.parentNode),b=a.majorTicks[b],a.set("value",b);else if(a._snapToMinorTick(b))b=this._findChildNode(b),a.set("value",a.minorTicks[b]);else{var b=this._sliderTrackDimensions,
d=c[a._mousePixelCoord]-b[a._startingPixelCoord];a._isScaleDirectionReverse&&(d=b[a._pixelCount]-d);a._setPixelValue(d,b[a._pixelCount])}},_snapToMajorTick:function(a){return-1!==a.id.indexOf("MajorTickMarks")},_snapToMajorTickLabel:function(a){return-1!==a.id.indexOf("MajorTickLabels")},_snapToMinorTick:function(a){return-1!==a.id.indexOf("MinorTickMarks")},postCreate:function(){this.inherited(arguments);this.set("outerWidth",this.get("width")+30);this.set("outerHeight",this.get("height")+35);var a=
g(v._SliderThumbMover,{widget:this});this._thumbMoveable=new v._SliderThumbMoveable(this.sliderThumbNode,{mover:a});this.own(this.watch("value",e.hitch(this,"_adjustThumbPosition")),this.watch("minimum",e.hitch(this,"_adjustThumbPosition")),this.watch("maximum",e.hitch(this,"_adjustThumbPosition")));this._adjustThumbPosition();this._lastChangeValueEmitted=this.get("value")},_adjustThumbPosition:function(){var a,c=!1;a=100*((this.value-this.minimum)/(this.maximum-this.minimum)-this.THUMB_WIDTH/this[this._thumbPositionParam1]/
2);this.value<this.minimum?(a=Math.max(100*-(this.THUMB_WIDTH/this[this._thumbPositionParam1]),a),c=!0):this.value>this.maximum&&(a=Math.min(100,a),c=!0);var b=[];b[this._thumbPositionParam2]=a+"%";d.set(this.sliderThumbNode,b);c&&this.computePreferredSize()},computePreferredSize:function(){var a,c,d,e;this.sliderThumbSize=b.position(this.sliderThumbNode);d=Math.round(this._computePreferredWidth());a=Math.round(this._computePreferredX());e=Math.round(this._computePreferredHeight());c=Math.round(this._computePreferredY());
this.set("preferredSize",{width:d,height:e,left:a,bottom:c})},_getDomNodeOfWidgetAtEnd:function(){var a;this.majorTickLabelDijit?a=this.majorTickLabelDijit.domNode:this.majorTickDijit?a=this.majorTickDijit.domNode:this.minorTickDijit&&(a=this.minorTickDijit.domNode);return a},_findChildNode:function(a){for(var c=a.parentNode.childNodes,b=0;b<c.length;b++)if(c.item(b)===a)return b;return-1}});v._SliderThumbMoveable=g(c,{onMouseDown:function(a){0===a.button&&this.inherited(arguments)}});v._SliderThumbMover=
g(h,{onMouseMove:function(a){var c=this.widget;c._sliderTrackDimensions||(c._sliderTrackDimensions=b.position(c.sliderTrackNode,!0));c._snapValueToTarget(c,a,!1);this._wasDragged=!0;c.emit("mousedragging")},onMouseUp:function(a){var c=this.widget;c._sliderTrackDimensions||(c._sliderTrackDimensions=b.position(c.sliderTrackNode,!0));c._snapValueToTarget(c,a,!0);c._emitChangeEvent();this._wasDragged?(c.emit("mousedragreleased"),this._wasDragged=!1):c.emit("mouseclicked");this.inherited(arguments)},destroy:function(){this.widget._sliderTrackDimensions=
null;this.inherited(arguments)}});return v})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/SliderWidgetUtility":function(){define([],function(){return{findValidSliderValue:function(g,f,e,d){var b=Math.round(g/d);g=b*d;f=g<f?b+1:g>e?b-1:b;f!==b&&(g=f*d);return g},findSuitableStepSize:function(g,f,e,d){var b;d?b=Math.pow(10,(f-e).toString().length-1)/10:(g=g.toString().split("."),void 0!==g[1]&&(b=1/Math.pow(10,g[1].length)));0===b&&(b=1);return b},findSuitablePrecision:function(g,
f){var e=0,d=g.toString().split(".");if(d[1])var b=d[1].length;d=f.toString().split(".");if(d[1])var a=d[1].length;if(b&&a)e=Math.max(a,b);else if(b||a)e=b?b:a;return e}}})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/mixins/EditableMixin":function(){define(["dojo/_base/declare"],function(g){return g(null,{editMode:!1,_setEditModeAttr:function(f){var e=this.baseClass+"--editMode";f?(this._set("editMode",f),this.domNode.classList.add(e),this.showInPlaceEditor(),this._hookUpEventListener()):
(this.domNode.classList.remove(e),this.hideInPlaceEditor(),this._removeEventListener(),this._set("editMode",f))},_hookUpEventListener:function(){this._blurCallBack=this._handleBlur.bind(this);this.domNode.addEventListener("blur",this._blurCallBack,!0)},_handleBlur:function(){setTimeout(function(){this.domNode&&!this.domNode.contains(document.activeElement)&&this.get("editMode")&&this.set("editMode",!1)}.bind(this),0)},_removeEventListener:function(){this._blurCallBack&&this.domNode.removeEventListener("blur",
this._blurCallBack,!0)},showInPlaceEditor:function(){throw Error("showInPlaceEditor method should be implemented");},hideInPlaceEditor:function(){throw Error("hideInPlaceEditor method should be implemented");},destroy:function(){this._removeEventListener();this.inherited(arguments)}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/mixins/DataMixin":function(){define(["dojo/_base/declare"],function(g){return g(null,{_setDataAttr:function(f){0!==Object.keys(f).length&&Object.keys(f).forEach(function(e){this.set(e,
f[e])},this)},_getDataAttr:function(){var f={},e=this.get("dataProperties");if(!e)throw Error("no 'dataProperties' property present");e.forEach(function(d){f[d]=this.get(d)},this);return f}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/mixins/DisabledMixin":function(){define(["dojo/_base/declare"],function(g){return g(null,{disabled:!1,_setDisabledAttr:function(f){var e=this.baseClass+"--disabled";f?this.domNode.classList.add(e):this.domNode.classList.remove(e);this._set("disabled",
f)}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/mixins/PositionMixin":function(){define(["dojo/_base/declare"],function(g){return g(null,{position:"bottom",_setPositionAttr:function(f){this.domNode.classList.remove(this.baseClass+"--"+this.position);this.domNode.classList.add(this.baseClass+"--"+f);this.position!==f&&this._set("position",f)}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/LiveControlComboBox":function(){define("dojo/_base/declare dijit/_WidgetBase dijit/registry dojo/has dojo/keys mw-event-utils/doubleClickHandler mw-form/TextArea MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/ComboBox MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/mixins/EditableMixin MW/rtc/plugins/language/matlab/codingui/widgets/WidgetsUtility MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/mixins/DataMixin MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/mixins/DisabledMixin MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/mixins/PositionMixin".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){g=g([f,m,p,k,n],{baseClass:"mwLiveControlComboBox",type:"ComboBox",constructor:function(){this.comboBox=new h;this.own(this.comboBox);this.dataProperties=["items","value"]},buildRendering:function(){this.inherited(arguments);this.domNode.setAttribute("tabindex","-1");this.domNode.setAttribute("data-focus","temporary");l.buildNode("div",{className:"widgetContainer",parent:this.domNode},"mwLiveControlComboBox").appendChild(this.comboBox.domNode);this.editorContainer=
l.buildNode("div",{className:"editorContainer",parent:this.domNode},"mwLiveControlComboBox")},_setWidthAttr:function(a){this.comboBox.set("width",a);this.domNode.style.width=a+"px";this._set("width",a);this.emit("sizechange")},_getWidthAttr:function(){return this.comboBox.get("width")},_setItemsAttr:function(a){this.comboBox.set("items",a);this._set("items",a)},_setValueAttr:function(a){this.comboBox.set("value",a);this._set("value",a)},_setDisabledAttr:function(a){this.inherited(arguments);this.comboBox.set("disabled",
a)},postCreate:function(){this.inherited(arguments);this.get("items")||this._setComboBoxItems();this.domNode.addEventListener("change",this._handleChange.bind(this));this.domNode.addEventListener("keyup",this._handleKeyUp.bind(this));this.domNode.addEventListener("keydown",this._handleKeyDown.bind(this));this.domNode.addEventListener("doubleclick",this._handleDoubleClick.bind(this));this.comboBox.watch("value",this._updateValue.bind(this))},focus:function(){this.comboBox.focusNode.focus()},showInPlaceEditor:function(){this._createEditor();
this._setEditorContent();this._saveEditor=!0},_getContentForEditor:function(){var a=[];this.get("items").forEach(function(c){a.push(c.label)});return a},_setComboBoxItems:function(){var a=[],c={label:this.get("value"),value:this.get("value")};a.push(c);this.set("items",a)},_createEditor:function(){this.editor=new c;this.editorContainer.appendChild(this.editor.domNode);this.editor.startup();var a=this.get("width")-18;this.editor.set("width",a);this._editorWheelCallback=this._handleEditorWheel.bind(this);
this.editor.domNode.addEventListener("wheel",this._editorWheelCallback)},_handleEditorWheel:function(a){a.stopPropagation()},_createPlaceholder:function(){l.buildNode("div",{className:"placeholder",parent:this.editorContainer},"mwLiveControlComboBox").innerHTML="'one'\x3cbr\x3e'two'";this.editor.domNode.addEventListener("keydown",this._handlePlaceholderOnKeyDown.bind(this));this.editor.domNode.addEventListener("keyup",this._handlePlaceholderOnKeyUp.bind(this))},_handlePlaceholderOnKeyDown:function(){this.editorContainer.children[1].classList.add("mwLiveControlComboBox__editorContainer__placeholder--inactive")},
_handlePlaceholderOnKeyUp:function(){var a=this.editorContainer.children[1];0===this.editor.focusNode.value.length&&a.classList.remove("mwLiveControlComboBox__editorContainer__placeholder--inactive")},_setEditorContent:function(){var a=this._getContentForEditor(),c="";1===a.length&&""===a[0]?this._createPlaceholder():a.forEach(function(a){c+=a+"\n"});this.editor.set("value",c);this.editor.focusNode.focus();d("trident")&&(a=c.length,this.editor.focusNode.setSelectionRange(a,a))},hideInPlaceEditor:function(){if(this.editor){if(this._saveEditor){var a=
this.editor.focusNode.value.split("\n");this._saveComboBoxChanges(a)}this.editorContainer.removeChild(this.editor.domNode);this.editor.domNode.removeEventListener("wheel",this._editorWheelCallback);this.editor.destroy();this.editor=null}},_saveComboBoxChanges:function(a){var c=[],b=this.get("value"),d=!1;this._hasEmptyContent(a)?(this.set("value",""),this._setComboBoxItems()):(a.forEach(function(a){if(a=a.trim())a===b&&(d=!0),c.push({label:a,value:a})},this),this.set("items",c),a=d?b:c[0].label,this.set("value",
a))},_hasEmptyContent:function(a){var c=!0;a.forEach(function(a){""!==a&&(c=!1)});return c},_handleChange:function(a){e.getEnclosingWidget(a.target)===this.editor&&(a.stopImmediatePropagation(),a.stopPropagation())},_handleDoubleClick:function(){this.get("editMode")||this.set("editMode",!0)},_updateValue:function(a,c,b){this._set("value",b)},navigate:function(a){a=a.keyCode;var c=document.activeElement,d=!1;if((a===b.DELETE||a===b.BACKSPACE||a===b.TAB)&&c!==this.comboBox.domNode)this.comboBox.focusNode.focus(),
this.focus(),d=!0;return d},_handleKeyDown:function(a){a=a.keyCode;var c=document.activeElement;switch(a){case b.TAB:this.editor&&c===this.editor.focusNode&&this.set("editMode",!1);this.emit("restorefocustolastnonrefuseelement");this.emit("keyuponwidgets",{mwEventData:{keyCode:a}});break;case b.BACKSPACE:c===this.comboBox.focusNode&&(this.emit("restorefocustolastnonrefuseelement"),this.emit("keyuponwidgets",{mwEventData:{keyCode:a}}));break;case b.DELETE:c===this.comboBox.focusNode&&(this.emit("restorefocustolastnonrefuseelement"),
this.emit("keyuponwidgets",{mwEventData:{keyCode:a}}))}},_handleKeyUp:function(a){a.keyCode===b.ESCAPE&&(this.get("editMode")&&(this._saveEditor=!1,this.set("editMode",!1)),this.emit("restorefocustolastnonrefuseelement"))},startup:function(){this.inherited(arguments);this.comboBox.startup()},destroy:function(){this.comboBox.destroy();this.inherited(arguments)}});g.BASE_CLASS="mwLiveControlComboBox";return g})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/ComboBox":function(){define(["dijit/_WidgetBase",
"dojo/_base/declare","mw-event-utils/doubleClickHandler","mw-form/ComboBox"],function(g,f,e,d){return f([d],{postCreate:function(){this.domNode.addEventListener("mousedown",this._handleMouseDown.bind(this),!0);this.inherited(arguments);this.domNode.addEventListener("click",e.createCallback(this._handleClick.bind(this),this._handleDoubleClick.bind(this),220))},_handleClick:function(b){(!b.mwEventData||!b.mwEventData.keyCode)&&this._handleArrowNodeMouseDown(b)},_handleMouseDown:function(b){b.stopImmediatePropagation()},
_handleDoubleClick:function(b){this.emit("doubleclick",{});b.stopPropagation()},_handleMenuClick:function(b){if(this._isSeparator(b.target)||!b.target.classList.contains("mwMenuItem")&&!b.target.classList.contains("mwTextNode"))b.preventDefault();else{b=this._getSelectedItemFromLabel(b.target.textContent).value;var a=this.get("value");this.set("value",b);a!==b&&this._triggerChangeEvent("value",a,b);this.closeMenu()}},_setValueAttr:function(b){var a=this._getSelectedItemFromValue(b);if(("number"===
typeof b?b.toString():b)&&a&&void 0!==a.index)this._textField.set("value",a.label),this._isTextEmpty=!0,this._removeSelectedMenuItemColor(),0<this.get("menu").getChildren().length&&void 0!==a.index&&this.get("menu").getChildren()[a.index].classList.add("mwComboBoxSelectedMenuItem");else if(("number"===typeof b?b.toString():b)&&!a)if(this.get("editable"))this._removeSelectedMenuItemColor(),this._textField.set("value",b),this._isTextEmpty=!1;else{if(!this.get("items")||0===this.get("items").length){this._pendingValue=
b;return}throw Error("Value must match an existing item for non-editable combo box");}else""===b&&(this._textField.set("value",""),void 0!==this._get("value")&&(this._removeSelectedMenuItemColor(),this._isTextEmpty=!0),""!==this.get("text")&&(this._isTextEmpty=!1));!0===this._isTextEmpty?this.set("text",""):this.set("text",b);this._set("value",b)}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/view/LiveControlLayouterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"./LiveControlLayouter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.livecontrols.viewmodel","rtc.view.decoration.viewmodel"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/language/matlab/codingui/livecontrols/view/LiveControlLayouter":function(){define(["dojo/_base/declare","dojo/dom-construct","MW/rtc/plugins/language/matlab/codingui/livecontrols/nodes/LiveControlNode","MW/rtc/plugins/view/layoutmanager/abstract/AbstractLayouter"],function(g,
f,e,d){return g(d,{_LIVE_CONTROL_OUTER_NODE:"liveControlOuterNode",_LIVE_CONTROL_DECORATION_NODE:"liveControlDecoration",constructor:function(b,a){this._layoutService=b;this._decorationViewModel=a},getApplicableNodeClass:function(){return e},layout:function(b,a){var c=b.layoutInto(a,"div",{"class":this._LIVE_CONTROL_OUTER_NODE}),d=this._createDecorationView(a);d&&c.appendChild(d);d=this._layoutService.createLiveControl(a);c.appendChild(d);return c},refresh:function(b,a,c,d){this._layoutService.updateTextView(a,
c);this._updateDecoration(a,c);return null},_createDecorationView:function(b){b=this._decorationViewModel.getDecoration(b);if(!b.length)return null;var a=f.create("div",{"class":this._LIVE_CONTROL_DECORATION_NODE});b.forEach(function(c){c.domNodes.forEach(function(c,b){f.place(b,a,c.domPlacement)})});return 0===a.children.length?null:a},_updateDecoration:function(b,a){var c=this._createDecorationView(b),d=a.querySelector("."+this._LIVE_CONTROL_DECORATION_NODE);d&&d.parentNode!==a||(d&&c?a.replaceChild(c,
d):d&&!c?a.removeChild(d):!d&&c&&a.insertBefore(c,a.firstChild))}})})},"MW/rtc/plugins/language/matlab/functions/LocalFunctionsProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/language/matlab/functions/LocalFunctions","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.internaldocument","rtc.document","rtc.cursor","rtc.code.sections.sectionbreak","rtc.code.sections.model"]}},
createInstance:function(d,b,a,c,e){return new f(d,b,a,c,e)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/language/matlab/functions/LocalFunctions":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect mw-log/Log MW/rtc/abstract/AbstractPlugin MW/rtc/model/CodeUtilities MW/rtc/model/events/DocumentEvent MW/rtc/model/events/NumberOfLinesChangedEvent MW/rtc/plugins/language/matlab/functions/FunctionAttributeConstants MW/rtc/plugins/richtext/nodes/inner/RichTextParagraphNode MW/rtc/plugins/richtext/nodes/leaf/RichTextNode".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m){return g(b,{_UNDOREDO_BLOCK_TYPE:"LocalFunction",_BLOCK_TYPES_FOR_MERGE_AND_ADVANCE:["AutoIndent"],constructor:function(a,c,b,d,h){this._internalDocument=a;this._document=c;this._cursor=b;this._sectionBreak=d;this._sectionModel=h;this.own(e.around(c,"insertBreak",f.hitch(this,"_onInsertBreak")));this.own(e.after(h,"onAttributesUpdated",f.hitch(this,"_handleAttributesUpdate"),!0))},_onInsertBreak:function(a){var c=this;return function(){var b=c._sectionModel.getCurrentSection();
if(b&&b[k.LOCAL_FUNCTION_ATTRIBUTE]&&0<b[k.LOCAL_FUNCTION_ATTRIBUTE].length){var d=b.start.getLineColumn().line,e=c._cursor.getLineColumn(),f=e.line,e=e.column,b=b.localFunctions[0].position.getLineColumn().line;if(f>=d&&f<=b&&1===e)return d=c._document.startEdit(),c._cursor.hasSelection()&&c._document.deleteTextAtCurrentPosition(),f=c._cursor.getLineColumn().line,b=c._insertTextContainerBefore(f),d.appendUndoEvents([h.create(f-1,f,-1)]),d.appendRedoEvents(b),c._document.endEdit(),!0}return a.apply(c._document,
arguments)}},_insertTextContainerBefore:function(a){a=this._internalDocument.getLineNode(a-1);var c=new l([]);c.addChild(new m({}));this._document.startEdit();a=this._internalDocument.insertAtPosition(c,a.startPosition());this._cursor.setPosition(a.insertedRange.getEndPosition());this._document.endEdit();this._internalDocument.emitDocumentEvents(a.events);this._cursor.onUpdate();return a.events},_handleAttributesUpdate:function(a){if(a===k.LOCAL_FUNCTION_ATTRIBUTE&&(a=this._sectionModel.getSections(),
a=this._getFirstLocalFunction(a))){var c=a.startLine,b=this._internalDocument.getMaxLineNumber();this._needsUpdate(c,b)&&(a=this._document.startBlockEdit(this._UNDOREDO_BLOCK_TYPE),a.setBlockTypesForMergeAndAdvance(this._BLOCK_TYPES_FOR_MERGE_AND_ADVANCE),this._sectionBreak.deleteSectionBreakInBetween(c,b),c=this._getTopBoundary(c),this._sectionBreak.isLineSectionBreak(c-1)||(this._sectionBreak.insertSectionBreakAtLineColumn(c,1),a.appendRedoEvents([h.create(c,c+1,1)]),a.appendUndoEvents([h.create(c,
c+1,-1)])),this._document.endBlockEdit(a))}},_needsUpdate:function(a,c){if(!(1<a))return!1;if(this._sectionBreak.hasSectionBreakInBetween(a,c))return!0;var b=this._sectionModel.getSectionForLine(a-1).start.getLineColumn().line;return this._getTopBoundary(a)!==b?!0:!1},_getTopBoundary:function(c){var b=this._sectionModel.getSectionForLine(c-1).start.getLineColumn().line;d.assert(b<=c,"Invalid start line of section or local function");for(c-=1;c>=b;c-=1){var e=this._internalDocument.getLineNode(c-1);
if(a.isCodeContainer(e))break}return c+1},_getFirstLocalFunction:function(a){var c=null;a.some(function(a){if((a=a[k.LOCAL_FUNCTION_ATTRIBUTE])&&0<a.length)return c=a[0],!0});return c}})})},"MW/rtc/plugins/language/matlab/functions/LocalFunctionsSectionAttributeContributorProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/language/matlab/functions/LocalFunctionsSectionAttributeContributor","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},
requires:function(){return{isApplicable:[],createInstance:["rtc.document","rtc.code.sections.model","rtc.localfunctionnotifier"]}},createInstance:function(d,b,a){return new f(d,b,a)}})})},"MW/rtc/plugins/language/matlab/functions/LocalFunctionsSectionAttributeContributor":function(){define(["dojo/_base/declare","MW/rtc/plugins/language/matlab/functions/AbstractFunctionSectionAttributeContributor","MW/rtc/plugins/language/matlab/functions/FunctionAttributeConstants"],function(g,f,e){return g(f,{constructor:function(d,
b,a){},getSectionAttribute:function(){return e.LOCAL_FUNCTION_ATTRIBUTE}})})},"MW/rtc/plugins/language/matlab/functions/AbstractFunctionSectionAttributeContributor":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect mw-log/Log MW/rtc/abstract/AbstractPlugin MW/rtc/plugins/functionnotifier/FunctionStateConstants".split(" "),function(g,f,e,d,b,a){return g(b,{constructor:function(a,b,d){this._document=a;this._sectionModel=b;this._functionNotifier=d;this.own(e.after(this._functionNotifier,
"onValidFunctionsChange",f.hitch(this,"_handleFunctionChange"),!0));this.own(e.before(this._sectionModel,"onModelUpdated",f.hitch(this,"_setAttributesForSectionsOnReset")));this._functionsData=null},getSectionAttribute:function(){throw"Unimplemented API in AbstractFunctionSectionAttributeContributor";},_handleFunctionChange:function(a){a&&(a=this._getFunctionsFromEvent(a),this._initializeFunctionData(a),this._setAttributesForSections(this._functionsData))},_getFunctionsFromEvent:function(c){var b;
switch(c.type){case a.VALID_FUNCTIONS_REMOVED:b=null;break;case a.VALID_FUNCTIONS_ADDED:case a.VALID_FUNCTIONS_CHANGED:case a.FUNCTIONS_ON_VALID_DOCUMENT_CHANGE:b=c.validFunctions}return b},_initializeFunctionData:function(a){this._functionsData&&(this._functionsData.forEach(function(a){d.assert(a.position,"Must have position!");this._document.deletePosition(a.position)},this),this._functionsData=null);a&&(a.forEach(function(a){a.position=this._document.createLinePositionInLine(a.startLine-1)},this),
this._functionsData=a)},_setAttributesForSections:function(a){this._sectionModel.setAttribute(this.getSectionAttribute(),this._getFunctionMap(a))},_setAttributesForSectionsOnReset:function(){this._sectionModel.setAttributeOnReset(this.getSectionAttribute(),this._getFunctionMap(this._functionsData))},_getFunctionMap:function(a){var b={};a&&a.forEach(function(a){var c=this._sectionModel.getSectionNumberForLine(a.startLine-1);b[c]?b[c].push(a):b[c]=[a]},this);return b}})})},"MW/rtc/plugins/language/matlab/functions/TopLevelFunctionProvider":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/language/matlab/functions/TopLevelFunction","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.document","rtc.code.sections.sectionbreak","rtc.code.sections.model"]}},createInstance:function(d,b,a){return new f(d,b,a)}})})},"MW/rtc/plugins/language/matlab/functions/TopLevelFunction":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/model/events/NumberOfLinesChangedEvent MW/rtc/plugins/language/matlab/functions/FunctionAttributeConstants".split(" "),
function(g,f,e,d,b,a){return g(d,{_UNDOREDO_BLOCK_TYPE:"TopLevelFunction",_BLOCK_TYPES_FOR_MERGE_AND_ADVANCE:["AutoIndent"],constructor:function(a,b,d){this._document=a;this._sectionBreak=b;this._sectionModel=d;this.own(e.after(d,"onAttributesUpdated",f.hitch(this,"_handleAttributesUpdate"),!0))},_handleAttributesUpdate:function(c){if(c===a.TOP_LEVEL_FUNCTION_ATTRIBUTE&&(c=this._sectionModel.getSections(),c=this._getTopLevelFunction(c)))if(c=Math.min(c.endLine,this._document.getNumberOfLines()),c=
this._getLastLineInSectionForLine(c-1),this._needsUpdate(1,c)){var b=this._document.startBlockEdit(this._UNDOREDO_BLOCK_TYPE);b.setBlockTypesForMergeAndAdvance(this._BLOCK_TYPES_FOR_MERGE_AND_ADVANCE);this._sectionBreak.deleteSectionBreakInBetween(1,c);this._document.endBlockEdit(b)}},_needsUpdate:function(a,b){return this._sectionBreak.hasSectionBreakInBetween(a,b)},_getTopLevelFunction:function(c){var b=null;c.some(function(c){if((c=c[a.TOP_LEVEL_FUNCTION_ATTRIBUTE])&&0<c.length)return b=c[0],!0});
return b},_getLastLineInSectionForLine:function(a){return this._sectionModel.getSectionForLine(a).end.getLine()}})})},"MW/rtc/plugins/language/matlab/functions/TopLevelFunctionSectionAttributeContributorProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/language/matlab/functions/TopLevelFunctionSectionAttributeContributor","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.document",
"rtc.code.sections.model","rtc.toplevelfunctionnotifier"]}},createInstance:function(d,b,a){return new f(d,b,a)}})})},"MW/rtc/plugins/language/matlab/functions/TopLevelFunctionSectionAttributeContributor":function(){define(["dojo/_base/declare","MW/rtc/plugins/language/matlab/functions/AbstractFunctionSectionAttributeContributor","MW/rtc/plugins/language/matlab/functions/FunctionAttributeConstants"],function(g,f,e){return g(f,{constructor:function(d,b,a){},getSectionAttribute:function(){return e.TOP_LEVEL_FUNCTION_ATTRIBUTE}})})},
"MW/rtc/plugins/language/matlab/section/SectionPluginProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/plugins/language/matlab/utilities/MatlabPluginUtilities","MW/rtc/plugins/language/matlab/section/SectionPlugin","MW/rtc/core/provider/PluginProvider"],function(g,f,e,d,b){return g(b,{isApplicable:function(a){return e.isMatlabCodeFileOrBuffer(a)},requires:function(){return{isApplicable:["rtc.backingstore"],createInstance:"rtc.document rtc.internaldocument rtc.view rtc.cursor rtc.cursorcontroller rtc.cursor.view rtc.actionservice rtc.executionservice rtc.featureinterface rtc.indentutilities rtc.backingstore rtc.code.matlabfiletype rtc.breakpointlessevalservice".split(" ")}},
createInstance:function(a,c,b,e,f,g,p,n,q,r,s,t,u){return new d(a,c,b,e,f,g,p,n,q,r,s,t,u)}})})},"MW/rtc/plugins/language/matlab/section/SectionPlugin":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/has MW/rtc/abstract/AbstractPlugin MW/rtc/datamodel/FileBackingStore MW/rtc/model/CodeUtilities MW/rtc/model/DocumentUtilities MW/rtc/model/NodeUtilities MW/rtc/model/Position MW/rtc/plugins/language/matlab/section/PublishUtilities MW/rtc/plugins/language/matlab/section/SectionsList MW/rtc/plugins/language/matlab/section/view/SectionPluginViewLayer MW/rtc/RichTextComponentFeatureEnum dojo/i18n!l10n/nls/actions".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r){return g(b,{_SECTION_EVALUATION_FUNCTION:"matlab.internal.editor.evaluateCode",_SECTION_EVAL_EDITOR_ID:"SectionEval",constructor:function(a,c,b,d,h,g,k,l,D,E,F,I,L){this._internalDocument=c;this._document=a;this._view=b;this._cursorController=h;this._cursorView=g;this._actionService=k;this._executionService=l;this._editorInterface=D;this._backingStore=F;this._fileType=I;this._breakpointlessEvalService=L;this._sections=[];this._activeSection={};this._sectionMarkers=
{};this._sectionTitles={};this._sectionsList=new p(this._internalDocument,this._document);this._viewLayer=new n;this._SECTION_TITLE_CLASS="section_title";this._SECTION_SEPARATOR_CLASS="matlab_section_separator";this._publishUtilities=new m(this,this._document,this._internalDocument,d,E);this.own(e.after(this._internalDocument,"onDocumentChanged",f.hitch(this,"_handleDocumentChanged")));this.own(e.after(this._sectionsList,"onUpdateModel",f.hitch(this,"_onSectionLocationUpdate"),!0));this.own(e.after(this._cursorView,
"onChange",f.hitch(this,"_updateActiveSection"),!0));this.own(e.after(this._editorInterface,"onActivated",f.hitch(this,"_updateActiveSection")));this.own(e.after(this._internalDocument,"onDocumentReset",f.hitch(this._sectionsList,"updateCells")));this.own(e.after(this._view,"onLayoutChange",f.hitch(this,"_updateActiveSectionHighlighting")));this.own(e.after(this._view,"onLinesDOMUpdated",f.hitch(this,"_handleOnLinesDOMUpdated"),!0));a=[{id:q.SECTIONS.INSERT_SECTION_ACTION,enabled:!0,description:r.insertSectionDescription,
text:r.insertSectionLabel,icon:"smallInsertSection",contextMenuGroup:"Sections",callback:f.hitch(this,"_insertSectionCallback")},{id:q.SECTIONS.RUN_SECTION_ACTION,enabled:!1,contextMenuGroup:"Sections",text:r.runSectionLabel,key:"ctrl_enter",platformKey:{mac:"meta_enter"},callback:f.hitch(this,"_evaluateSectionCallback")},{id:q.SECTIONS.NEXT_SECTION_ACTION,enabled:!0,key:"ctrl_down",platformKey:{mac:"meta_down"},callback:f.hitch(this,"_gotoNextSectionCallback")},{id:q.SECTIONS.PREVIOUS_SECTION_ACTION,
enabled:!0,key:"ctrl_up",platformKey:{mac:"meta_up"},callback:f.hitch(this,"_gotoPreviousSectionCallback")}];this._actionService.loadActions(a)},_evaluateSectionCallback:function(){if(this._actionService.getAction(q.SECTIONS.RUN_SECTION_ACTION).enabled)return this.evaluateActiveSection()},_insertSectionCallback:function(){if(this._actionService.getAction(q.SECTIONS.INSERT_SECTION_ACTION).enabled)return this._publishUtilities.insertSection()},_gotoNextSectionCallback:function(a){if(this._actionService.getAction(q.SECTIONS.NEXT_SECTION_ACTION).enabled)return this.gotoNextSection(a)},
_gotoPreviousSectionCallback:function(a){if(this._actionService.getAction(q.SECTIONS.PREVIOUS_SECTION_ACTION).enabled)return this._gotoPreviousSection(a)},hasSection:function(){return 0<this._sections.length},_onSectionLocationUpdate:function(a,c,b,d){this._document.getText()===d&&(this._sections=this._sectionsList.getSections(),this._updateSectionsInView(!0))},_getMaxColumnOnLine:function(a){return this._internalDocument.getLineNode(a).getText().length},_updateSectionsInView:function(a){this._updateActiveSection();
this._updateSectionSeparators(a);this._updateSectionTitle()},_handleDocumentChanged:function(){this._sectionsList.updateCells();this._updateSectionsInView()},_handleOnLinesDOMUpdated:function(a,c,b){b&&(this._redrawSectionSeparatorsForLines(a,c),this._redrawSectionTitleForLines(a,c))},_updateSectionTitle:function(){var a,c=this;Object.keys(this._sectionTitles).forEach(function(a){c._view.removeClassFromLine(a,c._SECTION_TITLE_CLASS)});this._sectionTitles={};for(a=0;a<this._sections.length;a+=1){var b=
this._sections[a].startPosition.getRow(),d=this._internalDocument.getLineNode(b);d&&p.hasSectionTitle(d.getText())&&(this._view.applyClassToLine(b,this._SECTION_TITLE_CLASS),this._sectionTitles[b]=!0)}},_addSectionMarker:function(a,c){var b=c?a.startPosition.getRow():a.endPosition.getRow()+1;0!==b&&b<this._internalDocument.getMaxLineNumber()&&!this._sectionMarkers[b]&&(this._view.applyClassToLine(b,this._SECTION_SEPARATOR_CLASS),this._sectionMarkers[b]=!0,c?a.usedSectionStart=!0:a.usedSectionEnd=
!0)},_updateSectionSeparators:function(a){var c;this._view.removeClassFromAllLines(this._SECTION_SEPARATOR_CLASS);this._sectionMarkers={};for(c=this._sections.length-1;0<=c;c-=1)a?(this._addSectionMarker(this._sections[c],!0),this._addSectionMarker(this._sections[c],!1)):(this._sections[c].usedSectionStart&&this._addSectionMarker(this._sections[c],!0),this._sections[c].usedSectionEnd&&this._addSectionMarker(this._sections[c],!1))},_redrawSectionSeparatorsForLines:function(a,c){var b;for(b=a;b<=c;b++)this._sectionMarkers[b]&&
this._view.applyClassToLine(b,this._SECTION_SEPARATOR_CLASS)},_redrawSectionTitleForLines:function(a,c){var b;for(b=a;b<=c;b++){var d=this._internalDocument.getLineNode(b);d&&p.hasSectionTitle(d.getText())&&this._view.applyClassToLine(a,this._SECTION_TITLE_CLASS)}},_updateActiveSection:function(){var a=this._cursorController.getCursors()[0],c=a.getPosition();c&&(c=c.line,this._currentSectionNodes&&(this._viewLayer.hide(this._currentSectionNodes),this._currentSectionNodes=null),this.hasSection()?(c=
this.getSectionNumber(c),this._activeSection=this._sections[c]||{}):this._activeSection={},this._actionService.updateAction(q.SECTIONS.RUN_SECTION_ACTION,{enabled:this.hasSection()}),this._updateActiveSectionHighlighting(),a=!this._cursorController.hasMultipleCursors()&&!a.isCursorReadOnly(),this._actionService.updateAction(q.SECTIONS.INSERT_SECTION_ACTION,{enabled:a}))},_updateActiveSectionHighlighting:function(){if(void 0!==this._activeSection.startPosition){var a=this._internalDocument.getLineNode(this._activeSection.startPosition.getRow()),
c=this._internalDocument.getLineNode(this._activeSection.endPosition.getRow());a&&c&&(this._currentSectionNodes=k.getParagraphNodesInRange(a,c),this._viewLayer.show(this._currentSectionNodes))}},_getActiveSectionContents:function(){var a="";if(void 0!==this._activeSection.startPosition)var a=this._internalDocument.getLineNode(this._activeSection.startPosition.getRow()),c=this._internalDocument.getLineNode(this._activeSection.endPosition.getRow()),a=k.getFullRange(a,c),a=this._internalDocument.getTextInRange(a.start.node,
a.start.offset,a.end.node,a.end.offset);return a},evaluateActiveSection:function(){if(this._executionService&&void 0!==this._activeSection.startPosition){var c=this._fileType.getFileType()===this._fileType.FILE_TYPE.ClassDefinitionFile;this._backingStore instanceof a&&!c?this._evaluateActiveSectionInFileContext():(c=this._getActiveSectionContents(),this._executionService.executionEval(c))}},_evaluateActiveSectionInFileContext:function(){var a=this._internalDocument.getLineNode(this._activeSection.startPosition.getRow()),
b=this._internalDocument.getLineNode(this._activeSection.endPosition.getRow()),d=new l(a,0),e=new l(b,b.getText().length),b=this._backingStore.getFileName(),a=this._backingStore.getAbsoluteFilePath(),a=a.substring(0,a.length-b.length),f=this._document.getCodeText(),f=c.getMATLABStringFromCodeText(f),d=this._getAbsoluteCodeOffsetFromPosition(this._internalDocument,d)+1,e=this._getAbsoluteCodeOffsetFromPosition(this._internalDocument,e)+1-d,b=this._SECTION_EVALUATION_FUNCTION+"('"+b+"', '"+a+"', "+
f+", "+d+", "+e+", "+this._document.getState()+", '"+this._SECTION_EVAL_EDITOR_ID+"');";this._breakpointlessEvalService.noBreakpointEval(b)},_getAbsoluteCodeOffsetFromPosition:function(a,b){return c.getAbsoluteCodeOffsetFromPosition(a,b)},gotoNextSection:function(a){this._cursorController.clearSelection();var c=this._cursorController.getPositions()[0];a=this._getNextSectionPosition(c,a);this._cursorController.setPositions([a])},_gotoPreviousSection:function(){this._cursorController.clearSelection();
var a=this._cursorController.getPositions()[0],a=this._getPreviousSectionPosition(a);this._cursorController.setPositions([a])},_getNextSectionPosition:function(a,c){var b=this.getSectionNumber(a.line);if(0>b||b===this._sections.length-1)return a;var d=b+1;if(c){var b=this._getSectionEndPosititon(b),e,f;for(e=this._sections.length-1;0<=e;e-=1){var h=this._sections[e].startPosition.getRow();if(h<=b.line){d=this.getSectionNumber(f);break}else f=h}}return this.getSectionStartPosition(d)},_getPreviousSectionPosition:function(a){var c=
a.line,b=a.column,d=this.getSectionNumber(c);if(0>d)return a;a=this.getSectionStartPosition(d);return this.getSectionStartPosition(c>a.line||b>a.column||0===d?d:d-1)},getSectionNumber:function(a){var c=-1,b;for(b=this._sections.length-1;0<=b;b-=1){var d=this._sections[b].startPosition.getRow(),e=this._sections[b].endPosition.getRow();if(a>=d&&a<=e){c=b;break}}return c},getSectionStartPosition:function(a){a=this._sections[a].startPosition.getRow();var c=this._internalDocument.getLineNode(a).getText(),
c=h.getLeadingWhitespace(c);return{line:a,column:c}},_getSectionEndPosititon:function(a){a=this._sections[a].endPosition.getRow();var c=this._internalDocument.getLineNode(a).getText().length;return{line:a,column:c}},isSectionStart:function(a){var c=!1,b;for(b=this._sections.length-1;0<=b;b-=1){var d=this._sections[b].startPosition.getRow();if(a===d&&(d=this._internalDocument.getLineNode(a))&&p.hasSectionTitle(d.getText())){c=!0;break}}return c}})})},"MW/rtc/plugins/language/matlab/section/PublishUtilities":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/aspect","MW/rtc/EditorUtilities","MW/rtc/model/DocumentConstants"],function(g,f,e,d,b){return g(null,{constructor:function(a,c,b,d,e){this._sectionPlugin=a;this._document=c;this._internalDocument=b;this._cursor=d;this._indentUtilities=e;this.DESCRIPTIVE_START="% ";this.BULLETED_LIST_SYMBOL="* ";this.NUMBERED_LIST_SYMBOL="# ";this.PREFORMATTED_TEXT_SYMBOL=" ";this.CODE_SYMBOL="  ";this.DISPLAY_LATEX_SYMBOL="$$";this.IMAGE_START_SYMBOL="\x3c\x3c";this.IMAGE_END_SYMBOL="\x3e\x3e";
this.PREFORMATTED_TEXT="PREFORMATTED\n% "+this.PREFORMATTED_TEXT_SYMBOL+"TEXT";this.CODE_TEXT="for x \x3d 1:10\n%       disp(x)\n% "+this.CODE_SYMBOL+"end";this.BULLETED_LIST="ITEM1\n% "+this.BULLETED_LIST_SYMBOL+"ITEM2";this.NUMBERED_LIST="ITEM1\n% "+this.NUMBERED_LIST_SYMBOL+"ITEM2";this.IMAGE="FILENAME.PNG";this.DISPLAY_LATEX="e^{\\pi i} + 1 \x3d 0";this.BOLD_INSERT_TEXT="BOLD TEXT";this.ITALIC_INSERT_TEXT="ITALIC TEXT";this.MONO_INSERT_TEXT="MONOSPACED TEXT";this.INLINE_MATH_TEXT="x^2+e^{\\pi i}";
this.HYPERLINKED_TEXT_BEGINNING="http://www.mathworks.com ";this.HYPERLINKED_TEXT_END="MathWorks";this.TITLE_AND_DESCRIPTION="SECTION TITLE\n% DESCRIPTIVE TEXT";this.SECTION_TAG="%%";this.SELECTION_MARK="$%^";this.FORMATTED_BLOCK_REGEX=/^\s*%(\s|$)/},insertSection:function(){this._insertSection("")},insertSectionWithTitle:function(){this._insertSection(this.TITLE_AND_DESCRIPTION)},insertBoldMarkup:function(){this._insertInlineMarkup(" *"," *","* ",this.BOLD_INSERT_TEXT)},insertItalicMarkup:function(){this._insertInlineMarkup(" _",
" _","_ ",this.ITALIC_INSERT_TEXT)},insertMonospacedMarkup:function(){this._insertInlineMarkup(" |"," |","| ",this.MONO_INSERT_TEXT)},insertHyperlinkMarkup:function(){this._insertInlineMarkup(" \x3c"," \x3c"+this.HYPERLINKED_TEXT_BEGINNING,"\x3e ",this.HYPERLINKED_TEXT_BEGINNING+this.HYPERLINKED_TEXT_END)},insertInlineLatexMarkup:function(){this._insertInlineMarkup(" $"," $","$ ",this.INLINE_MATH_TEXT)},insertBulletedListMarkup:function(){this._insertBlockMarkup(this.BULLETED_LIST_SYMBOL,this.BULLETED_LIST,
"")},insertNumberedListMarkup:function(){this._insertBlockMarkup(this.NUMBERED_LIST_SYMBOL,this.NUMBERED_LIST,"")},insertImageMarkup:function(){this._insertBlockMarkup(this.IMAGE_START_SYMBOL,this.IMAGE,this.IMAGE_END_SYMBOL)},insertPreformattedTextMarkup:function(){this._insertBlockMarkup(this.PREFORMATTED_TEXT_SYMBOL,this.PREFORMATTED_TEXT,"")},insertCodeMarkup:function(a,c){this._insertBlockMarkup(this.CODE_SYMBOL,this.CODE_TEXT,"")},insertDisplayLatexMarkup:function(){this._insertBlockMarkup(this.DISPLAY_LATEX_SYMBOL,
this.DISPLAY_LATEX,this.DISPLAY_LATEX_SYMBOL)},_insertSection:function(a){var c=this._document.startBlockEdit();a=this.SECTION_TAG+" "+this.SELECTION_MARK+a+this.SELECTION_MARK;var b=this._getSelectionStartPosition(),d=this._getFirstNonWhiteSpace(b.line),e="",f="";this._isWithinInitialWhiteSpace(b)?(this._cursor.movePosition(this._cursor.LINE_START),e="\n"):(this._cursor.movePosition(this._cursor.LINE_END),f="\n");this._document.insertTextAtCurrentPosition(this._getExpandedText(f+a+e,d));this._selectMarkedText();
this._document.endBlockEdit(c)},_insertInlineMarkup:function(a,c,b,d){a=this._cursor.hasSelection()?c+this.SELECTION_MARK:a+this.SELECTION_MARK;b=this.SELECTION_MARK+b;var e=this._getSelectionStartPosition(),f=e.line;c=this._isInFormattedBlock(f);var g=this._sectionPlugin.isSectionStart(f),n=this._getSelectionEndPosition(),q=n.line,r=this._isInFormattedBlock(q),s=this._sectionPlugin.isSectionStart(q);c?e.column=Math.max(e.column,this._getFirstNonWhiteSpace(f)+this.DESCRIPTIVE_START.length):g&&(e.column=
Math.max(e.column,this._getFirstNonWhiteSpace(f)+this.SECTION_TAG.length+1));r?n.column=Math.max(n.column,this._getFirstNonWhiteSpace(q)+this.DESCRIPTIVE_START.length):s&&(n.column=Math.max(n.column,this._getFirstNonWhiteSpace(q)+this.SECTION_TAG.length+1));this._isWhiteSpace({line:f,column:e.column-1})&&(a=a.substring(1));this._isWhiteSpace({line:q,column:n.column})&&(b=b.substring(0,b.length-1));f===q&&e.column===n.column?this._cursor.setPosition(e):this._cursor.setPosition({line:q,column:n.column,
anchor:e});e=this._document.startBlockEdit();this._cursor.hasSelection()?(f=this._sectionPlugin.getSectionNumber(f),q=this._sectionPlugin.getSectionNumber(q),f===q&&(c||g)&&(r||s)?this._wrapSelection(a,b):(this._cursor.releaseAnchor(),this._cursor.setPosition(n),this._insertSectionWithInlineMarkup(a+d+b))):c||g?this._document.insertTextAtCurrentPosition(a+d+b):this._insertSectionWithInlineMarkup(a+d+b);this._selectMarkedText();this._document.endBlockEdit(e)},_insertSectionWithInlineMarkup:function(a){" "===
a.charAt(0)&&(a=a.substring(1));var c=this._getSelectionStartPosition(),b=this._getFirstNonWhiteSpace(c.line),d="";this._isWithinInitialWhiteSpace(c)?this._cursor.movePosition(this._cursor.LINE_START):(this._cursor.movePosition(this._cursor.LINE_END),d="\n");a=this._getExpandedText(d+"%%\n"+this.DESCRIPTIVE_START+a,b);this._document.insertTextAtCurrentPosition(a)},_insertBlockMarkup:function(a,c,b){var d=this._document.startBlockEdit();c=this.SELECTION_MARK+c+this.SELECTION_MARK;var e=this._getSelectionStartPosition(),
f=this._getFirstNonWhiteSpace(e.line),g=this._sectionPlugin.isSectionStart(e.line),n=this._isInFormattedBlock(e.line),q="";this._cursor.setPosition(e);g||n?(this._cursor.movePosition(this._cursor.LINE_END),q=this._getExpandedText("\n"+this.DESCRIPTIVE_START+"\n"+this.DESCRIPTIVE_START+a+c+b+"\n"+this.DESCRIPTIVE_START,f)):(n=g="",this._isWithinInitialWhiteSpace(e)?(this._cursor.movePosition(this._cursor.LINE_START),g="\n"):(this._cursor.movePosition(this._cursor.LINE_END),n="\n"),q=this._getExpandedText(n+
"%%\n"+this.DESCRIPTIVE_START+"\n"+this.DESCRIPTIVE_START+a+c+b+"\n"+this.DESCRIPTIVE_START+g,f));this._document.insertTextAtCurrentPosition(q);this._selectMarkedText();this._document.endBlockEdit(d)},_getExpandedText:function(a,c){var b=d.getWhiteSpaces(c),e=a.split("\n"),f="",g;for(g=0;g<e.length;g+=1)f+=b+e[g]+"\n";return f=f.substring(0,f.length-1)},_wrapSelection:function(a,c){var b=this._getSelectionStartPosition(),d=this._getSelectionEndPosition();this._cursor.releaseAnchor();this._cursor.setPosition(b);
this._document.insertTextAtCurrentPosition(a);b.line===d.line&&(d.column+=a.length);this._cursor.setPosition(d);this._document.insertTextAtCurrentPosition(c)},_selectMarkedText:function(){var a=this._getSelectionMark({line:0,column:0}),c=this._getSelectionMark({line:a.line,column:a.column+this.SELECTION_MARK.length});this._cursor.setPosition({line:c.line,column:c.column,anchor:{line:c.line,column:c.column+this.SELECTION_MARK.length}});this._document.deleteTextAtCurrentPosition(b.BACKWARD_DELETE);
this._cursor.setPosition({line:a.line,column:a.column,anchor:{line:a.line,column:a.column+this.SELECTION_MARK.length}});this._document.deleteTextAtCurrentPosition(b.BACKWARD_DELETE);var d=a.line,e=a.column,f=c.line,a=a.line===c.line?c.column-this.SELECTION_MARK.length:c.column;(d!==f||e!==a)&&this._cursor.setPosition({line:f,column:a,anchor:{line:d,column:e}})},_isInFormattedBlock:function(a){var c=!0;if(!this._internalDocument.getLineNode(a).getText().match(this.FORMATTED_BLOCK_REGEX)||!this._sectionPlugin.hasSection())return!1;
for(var b=this._sectionPlugin.getSectionNumber(a),b=this._sectionPlugin.getSectionStartPosition(b).line+1;b<a;b+=1)if(!this._internalDocument.getLineNode(b).getText().match(this.FORMATTED_BLOCK_REGEX)){c=!1;break}return c},_getSelectionMark:function(a){var c=this._internalDocument.getMaxLineNumber(),b=a.line,d;for(d=b;d<c;d+=1){var e=this._internalDocument.getLineNode(d).getText();d===b&&(e=e.substring(a.column));if(-1!==e.indexOf(this.SELECTION_MARK))return{line:d,column:d===b?a.column+e.indexOf(this.SELECTION_MARK):
e.indexOf(this.SELECTION_MARK)}}return null},_isWithinInitialWhiteSpace:function(a){var c=!1,b=this._getFirstNonWhiteSpace(a.line);a.column<=b&&(c=!0);return c},_getFirstNonWhiteSpace:function(a){a=this._internalDocument.getLineNode(a);return this._indentUtilities.getIndentLevel(a)},_isWhiteSpace:function(a){return" "===this._internalDocument.getLineNode(a.line).getText().charAt(a.column)},_getSelectionStartPosition:function(){var a=this._cursor.getPosition();return this._cursor.hasSelection()&&!this._cursor.isReversed()?
a.anchor:{line:a.line,column:a.column}},_getSelectionEndPosition:function(){var a=this._cursor.getPosition();return this._cursor.hasSelection()&&this._cursor.isReversed()?a.anchor:{line:a.line,column:a.column}}})})},"MW/rtc/plugins/language/matlab/section/view/SectionPluginViewLayer":function(){define(["dojo/_base/declare","dojo/dom-class"],function(g,f){return g(null,{constructor:function(){},show:function(e){e&&e.forEach(function(d){d.box&&f.add(d.box,"active_cell")},this)},hide:function(e){e&&
e.forEach(function(d){d.box&&f.remove(d.box,"active_cell")},this)}})})},"MW/rtc/plugins/language/matlab/sections/CodeRegionSectionContributorProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/language/matlab/sections/CodeRegionSectionContributor","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.internaldocument","rtc.document","rtc.code.sections.model"]}},createInstance:function(d,
b,a){return new f(d,b,a)}})})},"MW/rtc/plugins/language/matlab/sections/CodeRegionSectionContributor":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-class dojo/on MW/rtc/model/CodeUtilities MW/rtc/model/DocumentConstants MW/rtc/model/DocumentEventUtilities".split(" "),function(g,f,e,d,b,a,c,h,k){return f(null,{constructor:function(a,c,b){this._internalDocument=a;this._document=c;this._sectionModel=b;this._aspectHandles=[];this._aspectHandles.push(d.after(this._document,
"onChange",e.hitch(this,"_updateSectionsOnDocLength"),!0));this._aspectHandles.push(d.after(this._internalDocument,"onDocumentChanged",e.hitch(this,"_updateSectionsOnFormatChange"),!0));this._aspectHandles.push(d.after(this._internalDocument,"onDocumentReset",e.hitch(this,"_updateSections")))},destroy:function(){this._aspectHandles.forEach(function(a){a.remove()});this._aspectHandles=[]},_updateSectionsOnDocLength:function(a){k.hasEventType(a,h.NUMBER_OF_LINES_CHANGED)&&this._updateSections()},_updateSectionsOnFormatChange:function(a){k.hasEventType(a,
h.FORMAT_CHANGE_EVENT)&&this._updateSections()},_updateSections:function(){var a=this._getSectionsAsLineNodes();this._sectionModel.resetSections(a)},_getSectionsAsLineNodes:function(){for(var a=[],c=this._internalDocument.startNode(),c=this._getNextStartCodeNode(c);c;){var b=this._getSectionEndNode(c);a.push({startNode:c,endNode:b});c=this._getNextSection(b)}return a},_getNextStartCodeNode:function(a){return a&&!c.isCodeContainer(a)?this._getNextStartCodeNode(a.rootContainer().nextSibling()):a},_getSectionEndNode:function(a){if(!c.isCodeContainer(a))return null;
var b=a.rootContainer().nextSibling();return!b||!c.isCodeContainer(b)?a:this._getSectionEndNode(b)},_getNextSection:function(a){c.isCodeContainer(a)&&(a=this._getNextStartNonCodeNode(a));return this._getNextStartCodeNode(a)},_getNextStartNonCodeNode:function(a){return a&&c.isCodeContainer(a)?this._getNextStartNonCodeNode(a.rootContainer().nextSibling()):a}})})},"MW/rtc/plugins/language/matlab/sections/CurrentSectionViewProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/language/matlab/sections/CurrentSectionView",
"MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.internaldocument","rtc.view","rtc.code.sections.model","rtc.code.sections.view.containerutility"]}},createInstance:function(d,b,a,c){return new f(d,b,a,c)}})})},"MW/rtc/plugins/language/matlab/sections/CurrentSectionView":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","dojo/dom-class","MW/rtc/abstract/AbstractPlugin"],
function(g,f,e,d,b){return g(b,{_ACTIVE_CLASS:"active",constructor:function(a,c,b,d){this._internalDocument=a;this._view=c;this._sectionModel=b;this._sectionContainerUtil=d;this.own(e.after(this._internalDocument,"onDocumentChanged",f.hitch(this,"_updateView")));this.own(e.after(this._view,"onLayoutChange",f.hitch(this,"_updateView")));this.own(e.after(this._sectionModel,"currentSectionChanged",f.hitch(this,"_updateView")))},_updateView:function(){var a=this._sectionModel.getCurrentSectionNumber();
if(0>a)this._clearDecoration();else if(a=this._sectionContainerUtil.getSectionBlock(a))d.contains(a,this._ACTIVE_CLASS)?this._currentSectionDomNode=a:(this._clearDecoration(),this._currentSectionDomNode=a,this._applyDecoration())},_applyDecoration:function(){this._currentSectionDomNode&&d.add(this._currentSectionDomNode,this._ACTIVE_CLASS)},_clearDecoration:function(){this._currentSectionDomNode&&d.remove(this._currentSectionDomNode,this._ACTIVE_CLASS)}})})},"MW/rtc/plugins/language/matlab/sections/InsertSectionProvider":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/language/matlab/sections/InsertSection","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.internaldocument","rtc.cursor","rtc.actionservice","rtc.document"]}},createInstance:function(d,b,a,c){return new f(d,b,a,c)}})})},"MW/rtc/plugins/language/matlab/sections/InsertSection":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect mw-log/Log MW/rtc/RichTextComponentFeatureEnum MW/rtc/abstract/AbstractPlugin MW/rtc/model/CodeUtilities MW/rtc/model/DocumentConstants MW/rtc/model/DocumentEventUtilities MW/rtc/model/DocumentUtilities MW/rtc/model/NodeUtilities MW/rtc/model/events/NumberOfLinesChangedEvent dojo/i18n!l10n/nls/actions".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){return g(a,{_CODE_NODE_TYPE:"code",_TEXT_NODE_TYPE:"text",_INSERT_NODE_BEFORE:"before",_INSERT_NODE_AFTER:"after",constructor:function(a,c,b,d){this._internalDocument=a;this._cursor=c;this._actionService=b;this._document=d;a=[{id:"rtc_insert_section",enabled:!1,callback:f.hitch(this,"_insertSection")},{id:"rtc_insert_text",enabled:!1,key:"alt_enter",platformKey:{mac:"alt_enter"},callback:f.hitch(this,"_insertTextCallback")},{id:"rtc_insert_code",enabled:!1,key:"alt_enter",
platformKey:{mac:"alt_enter"},callback:f.hitch(this,"_insertCodeCallback")}];this._actionService.loadActions(a);this.own(e.after(this._cursor,"onChange",f.hitch(this,this._updateActionState)))},_insertSectionCallback:function(){if(this._actionService.getAction(b.SECTIONS.INSERT_SECTION_ACTION).enabled)return this._insertSection()},_insertTextCallback:function(){if(this._actionService.getAction("rtc_insert_text").enabled)return this._insertTextOrCode()},_insertCodeCallback:function(){if(this._actionService.getAction("rtc_insert_code").enabled)return this._insertTextOrCode()},
_updateActionState:function(){this._actionService.updateAction("rtc_insert_section",{enabled:this._canInsertSection()});var a=this._canInsertText(),c=a&&this._cursor.hasSelection()?n.convertSelectionToTextDescription:n.insertTextDescription;this._actionService.updateAction("rtc_insert_text",{enabled:a,description:c});c=(a=this._canInsertCode())&&this._cursor.hasSelection()?n.convertSelectionToCodeDescription:n.insertCodeDescription;this._actionService.updateAction("rtc_insert_code",{enabled:a,description:c})},
_canInsertSection:function(){return!this._cursor||this._internalDocument.isReadOnly()?!1:!this._cursor.hasSelection()},_canInsertText:function(){if(!this._cursor||this._cursor.isCursorReadOnly()||this._internalDocument.isReadOnly())return!1;var a=this._cursor.adjustSelection(this._cursor.selectionInfo(),!0);return!m.isContinuousFormat(a)?!1:"code"===m.getParagraphFormat(a)},_canInsertCode:function(){if(!this._cursor||this._cursor.isCursorReadOnly()||this._internalDocument.isReadOnly())return!1;var a=
this._cursor.adjustSelection(this._cursor.selectionInfo(),!0);return!m.isContinuousFormat(a)?!1:"code"!==m.getParagraphFormat(a)},_insertSection:function(){if(this._internalDocument.isReadOnly())return d.assert("Trying to insert a section in a read only state."),!1;var a=this._cursor.adjustSelection(this._cursor.selectionInfo(),!0);if(!m.isContinuousFormat(a))return d.assert("Trying to insert a section in a multi format selection."),!1;this._insertTextOrCode()},_insertTextOrCode:function(){var a=
this._canInsertText(),c=this._canInsertCode();if(!a&&!c)return!1;var b=this._fixedSelectionInfo();b.startPosition.getLineColumn();b.endPosition.getLineColumn();if(this._coversFullParagraphs(b))return this._actionService.executeAction("rtc_toggle_code_and_text"),!0;this._internalDocument.onPreDocumentChanged({});var b=this._document.startBlockEdit(),d=this._treatSelection(),a=this._insertBlankLine(a);0<a.length&&(b.appendUndoEvents([p.create(a[0].startLine,a[0].endLine,-1)]),b.appendRedoEvents(a));
d&&(d=l.textToContent(d,this._cursor.getNode()),c&&!this._cursor.getNode().textContainer().isEmpty()&&this._insertBlankLine(!1),this._document.insertContent(d,this._cursor.position,this._cursor));this._internalDocument.emitDocumentEvents(a);this._document.endBlockEdit(b);this._cursor.onUpdate(!1,!0);return!0},_insertBlankLine:function(a){var c=this._cursor.position;this._cursor.hasSelection()&&d.assert("_insertBlankLine: Selection must be empty!");var b=this._internalDocument.createContainerForType(a?
this._TEXT_NODE_TYPE:this._CODE_NODE_TYPE).container;a=this._internalDocument.createNode(b.getDefaultChild());b.addChild(a);c=this._internalDocument.insertAtPosition(b,c);c.insertionNotAllowed||(this._cursor.setPosition(a.startPosition()),this._cursor.onUpdate(!1,!0));return c.events},_treatSelection:function(){var a;this._cursor.hasSelection()&&(a=this._cursor.selectedText(),this._document.deleteTextAtCurrentPosition(h.BACKWARD_DELETE));return a},_coversFullParagraphs:function(a){return l.isAtStartOfContainer(a.startPosition)&&
l.isAtEndOfContainer(a.endPosition)},_fixedSelectionInfo:function(){var a=this._cursor.selectionInfo();a.isNull||(a=this._cursor.adjustSelection(a,!0),this._cursor.setPosition(a.startNode,a.startPos),this._cursor.fixAnchor(!0),this._cursor.setPosition(a.endNode,a.endPos),a=this._cursor.selectionInfo());return a}})})},"MW/rtc/plugins/language/matlab/sections/NavigateSectionProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/language/matlab/sections/NavigateSection","MW/rtc/core/provider/PluginProvider"],
function(g,f,e){return g(e,{requires:function(){return{isApplicable:[],createInstance:["rtc.cursorcontroller","rtc.actionservice","rtc.view","rtc.code.sections.model","rtc.code.sections.view.containerutility"]}},createInstance:function(d,b,a,c,e){return new f(d,b,a,c,e)}})})},"MW/rtc/plugins/language/matlab/sections/NavigateSection":function(){define(["dojo/_base/declare","dojo/aspect","MW/rtc/abstract/AbstractPlugin","MW/rtc/model/Position"],function(g,f,e,d){return g(e,{_NEXT_SECTION_ACTION_ID:"rtc_navigate_next_section",
_PREVIOUS_SECTION_ACTION_ID:"rtc_navigate_previous_section",_CHECK_FULLY_ONSCREEN:!0,_SECTION_TOP_PERCENT:3,constructor:function(b,a,c,d,e){this._cursorController=b;this._actionService=a;this._view=c;this._sectionModel=d;this._sectionContainerUtility=e;b=[{id:this._NEXT_SECTION_ACTION_ID,enabled:!1,key:"ctrl_down",callback:this._nextSectionCallback.bind(this)},{id:this._PREVIOUS_SECTION_ACTION_ID,enabled:!1,key:"ctrl_up",callback:this._previousSectionCallback.bind(this)}];this._actionService.loadActions(b);
this._updateActionState();this.own(f.after(this._sectionModel,"currentSectionChanged",this._updateActionState.bind(this)))},_nextSectionCallback:function(){if(this._actionService.getAction(this._NEXT_SECTION_ACTION_ID).enabled)return this._nextSection()},_previousSectionCallback:function(){if(this._actionService.getAction(this._PREVIOUS_SECTION_ACTION_ID).enabled)return this._previousSection()},_updateActionState:function(){var b=null!=this._sectionModel.getNextSection(),a=null!=this._sectionModel.getPreviousSection();
this._actionService.updateAction("rtc_navigate_next_section",{enabled:b});this._actionService.updateAction("rtc_navigate_previous_section",{enabled:a})},_previousSection:function(){this._cursorController.clearSelection();var b=this._cursorController.getPositions()[0],a=this._sectionModel.getCurrentSection().start,c=a.getLineColumn();if(b.line+1!==c.line||b.column+1!==c.column)return this._setCursorToPosition(a);b=this._sectionModel.getPreviousSection();return!b||!b.start.getNode()?!0:this._setCursorToPosition(b.start)},
_nextSection:function(){var b=this._sectionModel.getNextSection();if(!b||!b.start.getNode())return!0;var b=b.start.getNode(),a=this._sectionModel.getCurrentSectionNumber(),c=this._sectionModel.getSection(a),e=null;this._cursorController.clearSelection();this._cursorController.setPositions([new d(b,0)]);var f=a+2,e=this._view.getClientHeight(),g=this._sectionContainerUtility.getSectionDimensions(a+1).height,f=this._sectionModel.getSection(f),m=null,p=m=!1;f&&(m=f.start.getNode(),m=this._view.isNodeInView(m,
this._CHECK_FULLY_ONSCREEN),p=this._view.isNodeInView(b,this._CHECK_FULLY_ONSCREEN));if(!m||!p)e=e>g?this._sectionContainerUtility.getSectionDimensions(a).height+g<e?c.start.getNode():b:b,this._view.scrollNodeToPercent(e,this._SECTION_TOP_PERCENT);return!0},_setCursorToPosition:function(b){b=b.getNode();this._cursorController.setPositions([new d(b,0)]);this._view.isNodeInView(b,this._CHECK_FULLY_ONSCREEN)||this._view.scrollNodeToPercent(b,this._SECTION_TOP_PERCENT);return!0}})})},"MW/rtc/plugins/language/matlab/sections/SectionBreakSectionContributorProvider":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/language/matlab/sections/SectionBreakSectionContributor","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.internaldocument","rtc.document","rtc.code.sections.model"]}},createInstance:function(d,b,a){return new f(d,b,a)}})})},"MW/rtc/plugins/language/matlab/sections/SectionBreakSectionContributor":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/model/DocumentConstants MW/rtc/model/DocumentEventUtilities MW/rtc/model/NodeUtilities MW/rtc/plugins/sectionbreak/model/SectionBreakNode".split(" "),
function(g,f,e,d,b,a,c,h){return g(d,{constructor:function(a,c,b){this._internalDocument=a;this._document=c;this._sectionModel=b;this.own(e.after(a,"onDocumentChanged",f.hitch(this,"_handleDocumentChanged"),!0));this.own(e.after(a,"onDocumentReset",f.hitch(this,"_handleDocumentReset")))},_handleDocumentChanged:function(c){c.some(function(c){return a.isLengthChangingEvent(c)},this)&&this._updateSections()},_handleDocumentReset:function(){this._updateSections()},_updateSections:function(){var a=this._getSectionsAsLineNodes();
this._sectionModel.resetSections(a)},_getSectionsAsLineNodes:function(){for(var a=[],b=null,d=null,e=this._internalDocument.getMaxLineNumber(),f=0;f<e;f+=1){var g=this._internalDocument.getLineNode(f),r=c.isInType(g,h);r||(b||(b=g),d=g);g=b&&d;if((r||f===e-1)&&g)a.push({startNode:b,endNode:d}),d=b=null}return a}})})},"MW/rtc/plugins/language/matlab/sections/SectionModelProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/language/matlab/sections/SectionModel","MW/rtc/core/provider/PluginProvider"],
function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.internaldocument","rtc.document","rtc.cursor"]}},createInstance:function(d,b,a){return new f(d,b,a)}})})},"MW/rtc/plugins/language/matlab/sections/SectionModel":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect mw-log/Log MW/rtc/abstract/AbstractPlugin MW/rtc/model/NodeUtilities".split(" "),function(g,f,e,d,b,a){return g(b,{constructor:function(a,b,d){this._internalDocument=
a;this._document=b;this._cursor=d;this._sections=[];this._lastLine=null;this._currentSectionNumber=-1;this.own(e.after(d,"onChange",f.hitch(this,"_updateCurrentSection")))},_areSectionsEqual:function(a){return this._sections.length!==a.length?!1:!this._sections.some(function(b,d){var e=a[d];if(b.start.getNode()!==e.startNode||b.end.getNode()!==e.endNode)return!0},this)},resetSections:function(a){this._areSectionsEqual(a)?-1===this._currentSectionNumber&&this._updateCurrentSection():(this._clearSections(),
this._sections=this._convertFromNodesToPositions(a),this._lastLine=null,this._currentSectionNumber=-1,this._updateCurrentSection(),this.onModelUpdated())},_convertFromNodesToPositions:function(a){return a.map(function(a){return{start:this._document.createLinePosition(a.startNode),end:this._document.createLinePosition(a.endNode)}},this)},setAttribute:function(a,b){this._setAttribute(a,b);this.onAttributesUpdated(a)},setAttributeOnReset:function(a,b){this._setAttribute(a,b)},_setAttribute:function(a,
b){d.assert("start"!==a&&"end"!==a,"You cannot use start/end as they are reserved attributes!");this._sections.forEach(function(d,e){d[a]=b.hasOwnProperty(e)?b[e]:null})},getFirstSectionWithAttributeData:function(a){var b=null;this._sections.some(function(d){return(b=d[a])&&0<b.length});return b},_clearSections:function(){this._sections.forEach(function(a){this._document.deletePosition(a.start);this._document.deletePosition(a.end)},this);this._sections=[]},onModelUpdated:function(){},onAttributesUpdated:function(){},
getSections:function(){return this._sections},getSection:function(a){if(0>a||a>=this._sections.length)return null;a=this._sections[a];return this._isSectionValid(a)?a:null},_isSectionValid:function(a){return a&&a.start&&a.start.isValid()&&a.end&&a.end.isValid()},getSectionNumberForNode:function(c){c=a.getLineNumberForNode(c,this._internalDocument);return this.getSectionNumberForLine(c)},getSectionForNode:function(a){a=this.getSectionNumberForNode(a);return this.getSection(a)},getSectionNumberForLine:function(a){var b=
-1;this._sections.some(function(d,e){if(this._isLineInSection(d,a))return b=e,!0},this);return b},getSectionForLine:function(a){a=this._internalDocument.getLineNode(a);if(!a)return null;a=this.getSectionNumberForNode(a);return this.getSection(a)},_isLineInSection:function(a,b){return b>=a.start.getLine()-1&&b<=a.end.getLine()-1},_updateCurrentSection:function(){var a=this._cursor.getNode().rootContainer();if(!(this._lastLine===a&&-1<this._currentSectionNumber)){var b=a?this.getSectionNumberForNode(a):
-1;this._lastLine=a;b!==this._currentSectionNumber&&(this._currentSectionNumber=b,this.currentSectionChanged())}},currentSectionChanged:function(){},getCurrentSectionNumber:function(){return this._currentSectionNumber},getCurrentSection:function(){return 0>this._currentSectionNumber?null:this._sections[this._currentSectionNumber]},getNextSection:function(){return 0>this._currentSectionNumber||this._currentSectionNumber===this._sections.length-1?null:this._sections[this._currentSectionNumber+1]},getPreviousSection:function(){return 0>
this._currentSectionNumber||0===this._currentSectionNumber?null:this._sections[this._currentSectionNumber-1]},getLastSectionNumber:function(){return this._sections.length-1},destroy:function(){this.inherited(arguments);this._clearSections()}})})},"MW/rtc/plugins/language/matlab/sections/SectionContainerUtilityProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/language/matlab/sections/SectionContainerUtility","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},
requires:function(){return{isApplicable:[],createInstance:["rtc.scrollpane"]}},createInstance:function(d){return new f(d)}})})},"MW/rtc/plugins/language/matlab/sections/SectionContainerUtility":function(){define(["dojo/_base/declare","dojo/dom-geometry","dojo/query!lite"],function(g,f,e){return g(null,{constructor:function(d){this._scrollPane=d},getSectionDimensions:function(d){var b=this.getSectionBlock(d);if(!b)return null;d={top:0,left:0,height:0,width:0};var b=b.getBoundingClientRect(),a=this._scrollPane.getBoundingClientRect();
d.top=b.top-a.top;d.left=b.left-a.left;d.height=b.height;d.width=b.width;return d},getSectionNumberByCoordinate:function(d){for(var b=this._getSectionBlocks(),a=0;a<b.length;a+=1){var c=f.getMarginBox(b[a]);if(d.y>=c.t&&d.y<=c.t+c.h)return a}return-1},getClosestSectionNumberByCoordinate:function(d){var b=this._getSectionBlocks();if(0===b.length)return-1;for(var a=0,c=0;c<b.length;c+=1){var e=f.getMarginBox(b[c]);if(d.y<e.t)break;a=c}return a},getSectionBlock:function(d){return this._getSectionBlocks()[d]},
_getSectionBlockClass:function(){return"SectionBlock"},_getSectionBlocks:function(){return e(".rootNode \x3e ."+this._getSectionBlockClass(),this._scrollPane)}})})},"MW/rtc/plugins/language/matlab/sections/StaleSectionModelProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/language/matlab/sections/StaleSectionModel","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:"rtc.internaldocument rtc.code.sections.model rtc.document rtc.code.codechange rtc.code.codecontent rtc.embeddedoutputs.statehandler rtc.allfunctionnotifier".split(" ")}},
createInstance:function(d,b,a,c,e,g,l){return new f(d,b,a,c,e,g,l)},destroyInstance:function(d){this.inherited(arguments);d.destroy()}})})},"MW/rtc/plugins/language/matlab/sections/StaleSectionModel":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/browsersupport/BrowserSupportUtilities MW/rtc/model/CodeUtilities MW/rtc/model/NodeUtilities MW/rtc/plugins/functionnotifier/FunctionStateConstants MW/rtc/plugins/language/matlab/functions/FunctionAttributeConstants mw-utils/Utils".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return g(d,{constructor:function(a,c,b,d,h,g,k){this._sectionModel=c;this._stateHandler=g;this._codeChangeService=d;this._document=b;this._codeContent=h;this._internalDocument=a;this._functionNotifier=k;this._upperBoundaryPosition=this._previousFunctionRange=null;this._staleNodePositions=[];this._latestCompletedSectionNumber=null;this._isEnabled=!0;this.own(e.after(this._internalDocument,"onDocumentReset",f.hitch(this,"_clearStaleNodes")));this.own(e.after(this._codeChangeService,
"onCodeChanged",f.hitch(this,"_codeChangeListener"),!0));this.own(e.after(this._stateHandler,"stateChanged",f.hitch(this,"_stateChangeListener"),!0));this.own(e.after(this._functionNotifier,"onValidFunctionsChange",f.hitch(this,"_handleValidFunctionChange"),!0))},destroy:function(){this._staleNodePositions=[];this._upperBoundaryPosition&&this._document.deletePosition(this._upperBoundaryPosition)},onModelUpdated:function(){},getEnablement:function(){return this._isEnabled},setEnablement:function(a){var c=
this._isEnabled;this._isEnabled=a;return c},isSectionStale:function(a){a=this._sectionModel.getSection(a);if(!a)return!1;var b=c.getParagraphNodesInRangeAsSet(a.start.getNode(),a.end.getNode());return this._staleNodePositions.some(function(a){return b.has(a.position.getNode())})},getStaleSectionNumbers:function(){return l.unique(this.getStaleNodes().map(function(a){return this._sectionModel.getSectionNumberForNode(a)},this))},_clearDeadStaleNodes:function(){this._staleNodePositions=this._staleNodePositions.filter(function(a){if(a.position.getNode().parent)return!0;
this._document.deletePosition(a.position)},this)},_clearStaleNodes:function(){this._staleNodePositions=this._clearStaleNodePositions();this.onModelUpdated()},_clearStaleNodePositions:function(){return this._staleNodePositions.filter(function(a){this._document.deletePosition(a.position)},this)},_codeChangeListener:function(c){this._isEnabled&&(this._removeMergedStaleNodes(),this._clearDeadStaleNodes(),c=c.filter(function(c){return a.isCodeContainer(c)&&!this._nodeInFunction(c)},this),this._setNodesStale(c),
this.onModelUpdated(c))},_removeMergedStaleNodes:function(){var a=b.createSet();this._staleNodePositions=this._staleNodePositions.filter(function(c){var b=c.position.getNode();if(!a.has(b))return a.add(b),!0;this._document.deletePosition(c.position)},this)},_handleValidFunctionChange:function(a){this._clearStalenessFromFunctions(a);this.onModelUpdated()},_clearStalenessFromFunctions:function(a){a=this._getFunctionRange(a);if(this._hasFunctionRangeShrunk(a)){var c=this._getRangeDiffForFunctions(a);
this._setPreviousFunctionNodesStale(c)}else this._clearStalenessFromLineRange(a);this._updateUpperBoundaryPosition(a);this._previousFunctionRange=a},_getFunctionRange:function(a){var c=this._getFunctionsFromEvent(a),b=a=null;c&&0<c.length&&c[0].isTopLevelFunction?(a=[c[0]],b=c.slice(1)):b=c;c=null;b&&0<b.length&&(c=b);if(!a&&!c)return null;b={startLine:null,endLine:null};a&&(b.startLine=0,b.endLine=a[0].endLine-1);c&&(a||(b.startLine=c[0].startLine-1),b.endLine=this._internalDocument.getMaxLineNumber());
return b},_getFunctionsFromEvent:function(a){var c;switch(a.type){case h.VALID_FUNCTIONS_REMOVED:c=[];break;case h.VALID_FUNCTIONS_ADDED:case h.VALID_FUNCTIONS_CHANGED:case h.FUNCTIONS_ON_VALID_DOCUMENT_CHANGE:c=a.validFunctions}return c},_hasFunctionRangeShrunk:function(a){if(!a)return!0;if(!this._upperBoundaryPosition||!this._upperBoundaryPosition.isValid())return!1;a=a.startLine;var c=this._upperBoundaryPosition.getLine();if(-1===c)return!1;if(a>c)return!0},_getRangeDiffForFunctions:function(a){if(!a)return this._previousFunctionRange;
a=a.startLine;return{startLine:this._upperBoundaryPosition.getLine(),endLine:a-1}},_updateUpperBoundaryPosition:function(a){this._upperBoundaryPosition&&this._document.deletePosition(this._upperBoundaryPosition);a&&(this._upperBoundaryPosition=this._document.createLinePositionInLine(a.startLine))},_clearStalenessFromLineRange:function(a){a&&(this._staleNodePositions=this._staleNodePositions.filter(function(c){if(c.position.getLineColumn().line-1<a.startLine||c.position.getLineColumn().line-1>a.endLine)return!0;
this._document.deletePosition(c.position);return!1},this))},_setPreviousFunctionNodesStale:function(c){if(c){for(var b=[],d=c.startLine;d<=c.endLine;d+=1){var e=this._internalDocument.getLineNode(d);a.isCodeContainer(e)&&b.push(e)}this._setNodesStale(b)}},_nodeInFunction:function(a){if(!this._previousFunctionRange)return!1;var c=this._internalDocument.getLineNumber(a)>=this._previousFunctionRange.startLine,b=this._internalDocument.getLineNumber(a)<=this._previousFunctionRange.endLine;if(c&&b)return!0;
a=this._sectionModel.getSectionForNode(a);return!a?!1:!!a[k.TOP_LEVEL_FUNCTION_ATTRIBUTE]||!!a[k.LOCAL_FUNCTION_ATTRIBUTE]},_setNodesStale:function(a){if(0!==a.length){var c=this.getStaleNodes();a.forEach(function(a){this._setNodeStale(a,c)},this)}},_setNodeStale:function(a,c){var b=c.indexOf(a);0>b?(b={position:this._document.createLinePosition(a),count:2},this._staleNodePositions.push(b),c.push(a)):this._staleNodePositions[b].count+=1},getStaleNodes:function(){return this._staleNodePositions.map(function(a){return a.position.getNode()})},
_stateChangeListener:function(a,c){switch(a){case this._stateHandler.CHANGE_TYPE_ENUM.EVAL_INITIALIZED:this._normalizeStaleness();this._clearEmptySections();this.onModelUpdated();break;case this._stateHandler.CHANGE_TYPE_ENUM.SECTION_EVAL_COMPLETE:this._clearEmptyLinesInSectionNumber(c);this._setSectionUpToDate(c);this._latestCompletedSectionNumber=c;this.onModelUpdated();break;case this._stateHandler.CHANGE_TYPE_ENUM.EVAL_COMPLETE:this._updateMissedSections(c.requestedEvaluationRange,c.didRunToCompletion,
this._latestCompletedSectionNumber),this._latestCompletedSectionNumber=null,this._normalizeStaleness()}},_sectionIsEmpty:function(b){b=c.getParagraphNodesInRange(b.start.getNode(),b.end.getNode());b=b.filter(a.isCodeContainer,a);return!this._codeContent.lineNodesContainCode(b)},_clearEmptySections:function(){this._sectionModel.getSections().forEach(function(a,c){this._sectionIsEmpty(a)&&this._setSectionUpToDate(c)},this)},_setSectionUpToDate:function(a){(a=this._sectionModel.getSection(a))&&this._setRangeUpToDate(a.start.line,
a.end.line)},_setRangeUpToDate:function(a,c){this._staleNodePositions=this._staleNodePositions.filter(function(b){var d=!0,e=b.position.line;a<=e&&e<=c&&(d=this._setStaleNodeUpToDate(b));return d},this)},_setStaleNodeUpToDate:function(a){a.count-=1;return 0===a.count?(this._document.deletePosition(a.position),!1):!0},_updateMissedSections:function(a,c,b){if(c&&null!==b&&(c=this._sectionModel.getSection(b+1)))c=c.start.line,a=a.getEndPosition().line,c<=a&&(this._setRangeUpToDate(c,a),this.onModelUpdated())},
_normalizeStaleness:function(){this._staleNodePositions.forEach(function(a){a.count=0<a.count?1:0})},_clearEmptyLinesInSectionNumber:function(a){(a=this._sectionModel.getSection(a))&&c.getParagraphNodesInRange(a.start.getNode(),a.end.getNode()).forEach(function(a){this._lineIsEmpty(a)&&(this._staleNodePositions=this._staleNodePositions.filter(function(c){if(c.position.getNode()!==a)return!0;this._document.deletePosition(c.position)},this))},this)},_lineIsEmpty:function(a){return!this._codeContent.lineNodesContainCode([a])}})})},
"MW/rtc/plugins/language/matlab/tokenizer/MatlabTokensPluginProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokensPlugin"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/language/matlab/tokenizer/MatlabTokensPlugin":function(){define("dojo/_base/declare dojo/aspect dojo/_base/lang MW/rtc/abstract/AbstractPlugin MW/rtc/model/DocumentConstants MW/rtc/model/DocumentEventUtilities ./MatlabTokenUtilities ./MatlabTokenizer".split(" "),
function(g,f,e,d,b,a,c,h){return g(d,{constructor:function(a,c){this._internalDocument=a;this._document=c;this._tokenizer=new h;this._tokensData={tokens:{},executableLines:[],lastEventStartLine:0};this.own(f.after(this._internalDocument,"onDocumentReset",e.hitch(this,"_initializeLines")));this.own(f.after(this._internalDocument,"onDocumentChanged",e.hitch(this,"_handleDocumentChanged"),!0))},_initializeLines:function(){var a=this._internalDocument.getMaxLineNumber()-1,c=this._document.getCodeText();
this._tokenizer.initializeLines(c);this._emitEvent(0,a,a,!1)},_emitEvent:function(a,c,b,d){var e=this._tokenizer.getTokenMap(),f=this._tokenizer.getExecutableLineData();this._tokensData={tokens:e,executableLines:f,startLine:a,endLine:c,eventEndLine:b,isUndoRedo:d};this.onUpdate(this._tokensData)},_handleDocumentChanged:function(c){var b=this._findDeletionEvent(c);if(b)this.onDelete(b.startLine,b.endLine);b=a.getCoalescedDocumentMutations(c);c=c[0].isUndoRedo;var d=Math.min(b[0].getFromRange().start,
b[0].getToRange().start),b=Math.max(b[b.length-1].getFromRange().end,b[b.length-1].getToRange().end);this._updateTokens(d,b,c)},_findDeletionEvent:function(a){var c=null;a.some(function(a){if(a.type===b.DELETION_EVENT)return c=a,!0},this);return c},onDelete:function(a,c){},_updateTokens:function(a,c,b){var d=this.retokenizeFromLine(this._document.getCodeText(),a,c);this._emitEvent(a,d,c,b)},retokenizeFromLine:function(a,c,b){return this._tokenizer.retokenize(a,c,b)},onUpdate:function(a){},getTokensData:function(){return this._tokensData},
getTokensOnLine:function(a){return this._tokensData.tokens[a]},resetTokenStateForLine:function(a){this._tokenizer.resetStartingTokenizerStateForLine(a)},getFirstTokenOnLine:function(a){return this._tokenizer.getFirstToken(a)},getTokenOnLineColumn:function(a,c){return this._tokenizer.getTokenOnLineColumn(a,c)},getNextTokenOf:function(a){return this._tokenizer.getNextToken(a)},getPreviousTokenOf:function(a,c){return this._tokenizer.getPreviousToken(a,c)},getNumberOfTokensOnLine:function(a){return this._tokenizer.getNumberOfTokensOnLine(a)},
getLexStateForLine:function(a){return this._tokenizer.getLexStateForLine(a)},isLineContinuation:function(a){return this._tokenizer.isLineContinuation(a)},isInComment:function(a,b){var d=this.getTokenOnLineColumn(a,b);return!!d&&c.isCommentToken(d)},hasLineComment:function(a){a=this.getTokensOnLine(a);if(!a||0===a.length)return!1;for(var b=0;b<a.length;b++){var d=a[b];if(d&&(c.isLineCommentToken(d)||c.isSectionTitleToken(d)))return!0}return!1},isUnmatchedStartToken:function(a){var b=!1,d=[],e=!0;this._getAllBlockTokens().forEach(function(f){if(a!==
f)if(c.isTokenStartOfBlock(f))d.push(f);else if(0<d.length)d.pop();else{if(b)return e=!1}else b=!0});return e},_getAllBlockTokens:function(){var a=this.getTokensData().tokens,b=[],d;for(d in a)for(var e=a[d],f=0;f<e.length;f++){var h=e[f];(c.isTokenStartOfBlock(h)||c.isTokenEndOfBlock(h))&&b.push(h)}return b},findStartOfBlockOnLine:function(a){var b=0;a=this.getTokensData().tokens[a];for(var d=a.length-1;0<=d;d--){var e=a[d];if(c.isTokenStartOfBlock(e)){if(0===b)return e;b-=1}else c.isTokenEndOfBlock(e)&&
(b+=1)}return null},isInBlockComment:function(a,b){var d=this.getTokenOnLineColumn(a,b);return!!d&&c.isBlockCommentToken(d)},isInString:function(a,b){var d=this.getTokenOnLineColumn(a,b);return!!d&&c.isMatlabStringToken(d)},destroy:function(){this._tokensData={};this._tokenizer.destroy();this._tokenizer={}}})})},"MW/rtc/plugins/language/matlab/nonlocalvariablehighlighting/NonlocalVariableHighlightingProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./NonlocalVariableHighlighting"],
function(g,f,e){return g(f,{requires:function(){return{isApplicable:[],createInstance:["rtc.internaldocument","matlab.code.variables.service","rtc.view.decoration"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/language/matlab/nonlocalvariablehighlighting/NonlocalVariableHighlighting":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin","MW/rtc/view/decoration/DecorationUtilities"],function(g,f,e,d,b){return g(d,{_NONLOCAL_VARIABLE_HIGHLIGHT:["nonlocalVariableHighlighting"],
constructor:function(a,c,b){this._internalDocument=a;this._variableService=c;this._decorator=b.createDecorator();this.own(e.after(this._variableService,"onVariablesUpdated",f.hitch(this,"_handleVariablesUpdated")))},_handleVariablesUpdated:function(){var a=this._variableService.getNonlocalVariableInstances();if(null!==a){var c=this._getDecorationInfo(a);b.decorateAllCodeLines(function(a,b){this._decorator.updateClasses(b,c[a]||[])}.bind(this),this._decorator,this._internalDocument)}},_getDecorationInfo:function(a){var c=
{};a.forEach(function(a){var b=a.startLine,d=c[b];d||(d=[],c[b]=d);a=this._internalDocument.getRangeForLineColumn(a.startLine+1,a.startColumn+1,a.endLine+1,a.endColumn+1);d.push({range:a,classList:this._NONLOCAL_VARIABLE_HIGHLIGHT})},this);return c}})})},"MW/rtc/plugins/language/matlab/variablehighlighting/messagebar/VariableHighlightMessageLayerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./VariableHighlightMessageLayer"],function(g,f,e){return g(f,{requires:function(){return{isApplicable:[],
createInstance:["matlab.code.variables.plugin","rtc.internaldocument"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/language/matlab/variablehighlighting/messagebar/VariableHighlightMessageLayer":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/browsersupport/BrowserSupportUtilities MW/rtc/plugins/messagebar/MessageBarLayer ./TooltipTextUtils".split(" "),function(g,f,e,d,b,a){return g(b,{_VARIABLE_HIGHLIGHT_LAYER:"variableHighlightLayer",_VARIABLE:"variableMarker",
_HIGHLIGHT_STYLE:"highlightedVariable",constructor:function(a,b){this._internalDocument=b;this.own(e.after(a,"onModelUpdated",f.hitch(this,"_updateMessages"),!0))},getLayerName:function(){return this._VARIABLE_HIGHLIGHT_LAYER},_updateMessages:function(c){this.clearLayer(this._VARIABLE_HIGHLIGHT_LAYER);this._getLinesWithHighlights(c).forEach(f.hitch(this,function(c,b){var d=this._internalDocument.getLineNode(b).getCodeText(),e=f.hitch(this,function(){return a.createTooltipMessageForLine(d,c,this._HIGHLIGHT_STYLE)});
this.addMessage(this._VARIABLE_HIGHLIGHT_LAYER,this._VARIABLE,e,!1,c[0].startLine+1,c[0].startColumn+1)}));this.updateLayer(this._VARIABLE_HIGHLIGHT_LAYER)},_getLinesWithHighlights:function(a){var b=d.createMap();a.forEach(function(a){var c=a.startLine;if(b.has(c)){var d=b.get(c);d.push(a);b.set(c,d)}else b.set(c,[a])});return b}})})},"MW/rtc/plugins/language/matlab/variablehighlighting/messagebar/TooltipTextUtils":function(){define(["dojo/_base/lang","dojo/dom-construct","MW/rtc/model/DocumentUtilities"],
function(g,f,e){return{_MAX_LINE_LENGTH:75,_TOOLTIP_CSS_CLASS:"tooltipContent",_ELLIPSE:"...",createTooltipMessageForLine:function(d,b,a){var c=[];b.forEach(function(b){c+=this._trimLineAndStyleRange(d,{startColumn:b.startColumn,endColumn:b.endColumn},a)+f.create("br").outerHTML},this);return f.create("div",{innerHTML:c,className:this._TOOLTIP_CSS_CLASS})},_trimLineAndStyleRange:function(d,b,a){var c=e.getLeadingWhitespace(d);d=d.trim();var f=b.startColumn-c;b=b.endColumn-c;d=this._trimLineAroundRange(d,
{startColumn:f,endColumn:b});c=d.lineStart;d=d.trimmedLine;f-=c;b-=c;a=this._styleRange(d.substring(f,b),a);return d.substring(0,f)+a.outerHTML+d.substring(b)},_trimLineAroundRange:function(d,b){var a=d,c=0;if(d.length>this._MAX_LINE_LENGTH){var e=b.startColumn,f=b.endColumn,g=d.length,m=g-f,p=Math.floor((this._MAX_LINE_LENGTH-(f-e))/2),n=p,q=p;e<m&&e<p&&(q+=p-e);q+f<g&&(a=a.substring(0,f+q)+this._ELLIPSE);m<e&&m<p&&(n+=p-m);e>n&&(c=e-n,a=this._ELLIPSE+a.substring(c+3))}return{trimmedLine:a,lineStart:c}},
_styleRange:function(d,b){return f.create("span",{className:b,innerHTML:d})}}})},"MW/rtc/plugins/language/matlab/variablehighlighting/view/VariableHighlightViewProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./VariableHighlightView"],function(g,f,e){return g(f,{requires:function(){return{isApplicable:[],createInstance:["matlab.code.variables.plugin","rtc.view"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/language/matlab/variablehighlighting/view/VariableHighlightView":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-construct dojo/dom-style dojo/dom-attr MW/rtc/abstract/AbstractPlugin".split(" "),
function(g,f,e,d,b,a,c){return g(c,{_VARIABLE_HIGHLIGHT_LAYER:"variableHighlightLayer",_VARIABLE_HIGHLIGHT:"variableHighlight",_VARIABLE_HIGHLIGHT_LAYER_HIDDEN:"variableHighlight_hidden",_VARIABLE_HIGHLIGHT_LAYER_VISIBLE:"variableHighlight_visible",constructor:function(a,c){this._view=c;this._layer=this._createLayer();c.addLayer(this._layer);this.own(e.after(a,"onModelUpdated",f.hitch(this,"_highlightAllVariables"),!0))},destroy:function(){this.inherited(arguments);this._removeAllHighlights();d.destroy(this._layer)},
_createLayer:function(){return d.create("div",{"class":this._VARIABLE_HIGHLIGHT_LAYER,"data-testid":this._VARIABLE_HIGHLIGHT_LAYER_HIDDEN})},_highlightAllVariables:function(c){if(c.length){var b=this._createLayer();c.forEach(function(a){var c=this._view.getCoordinateForLineColumn(a.startLine+1,a.startColumn+1);a=this._view.getCoordinateForLineColumn(a.endLine+1,a.endColumn+1);this._highlightVariable(c,a,b)},this);this._view.switchLayer(b,this._layer);this._layer=b;a.set(this._layer,"data-testid",
this._VARIABLE_HIGHLIGHT_LAYER_VISIBLE)}else this._removeAllHighlights()},_removeAllHighlights:function(){a.set(this._layer,"data-testid",this._VARIABLE_HIGHLIGHT_LAYER_HIDDEN);d.empty(this._layer)},_highlightVariable:function(a,c,e){e=d.create("div",{"class":this._VARIABLE_HIGHLIGHT},e);b.set(e,{top:a.y+"px",height:a.height+"px",left:a.x+"px",width:c.x-a.x+"px"})}})})},"MW/rtc/plugins/language/matlab/variablehighlighting/VariableHighlightProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"./VariableHighlight"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.internaldocument rtc.eventhandler rtc.view rtc.cursor matlab.code.variables.service rtc.actionservice".split(" ")}},createInstance:function(d,b,a,c,f,g){return new e(d,b,a,c,f,g)}})})},"MW/rtc/plugins/language/matlab/variablehighlighting/VariableHighlight":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/model/CodeUtilities MW/rtc/model/DocumentUtilities MW/rtc/plugins/language/matlab/variableservice/VariableUtilities MW/rtc/view/ViewEventUtilities".split(" "),
function(g,f,e,d,b,a,c,h){return g(d,{_UPDATE_TIMER_LENGTH:1333,constructor:function(a,c,b,d,h,g){this._internalDocument=a;this._eventHandler=c;this._view=b;this._cursor=d;this._variableService=h;this._actionService=g;this.own(e.after(this._variableService,"onEnable",f.hitch(this,"_setListeners")));this.own(e.after(this._variableService,"onDisable",f.hitch(this,"_removeListeners")));this.own(e.after(this._variableService,"onVariablesUpdated",f.hitch(this,"_clearAllAndUpdateNow")));this._handleArray=
[];this._setListeners();this._showTimer=null;this._suspend=!1;a=[{id:"rtc_variable_highlighting_escape",key:"escape",enabled:!0,callback:f.hitch(this,"_removeHighlights")}];this._actionService.loadActions(a);this._highlightedVariableInstances=[]},_setListeners:function(){0===this._handleArray.length&&(this._handleArray.push(e.after(this._eventHandler,"onMouseDown",f.hitch(this,"_updateNow"))),this._handleArray.push(e.after(this._cursor,"selectAll",f.hitch(this,"_updateNow"))),this._handleArray.push(e.after(this._cursor,
"setPosition",f.hitch(this,"_update"),!0)),this._handleArray.push(e.before(this._cursor,"movePosition",f.hitch(this,"_updateLater"))),this._handleArray.push(e.after(this._internalDocument,"onPreDocumentChanged",f.hitch(this,"_pendingDocumentChanged"))),this._handleArray.push(e.after(this._internalDocument,"onDocumentChanged",f.hitch(this,"_clearAllAndUpdateNow"))),this._handleArray.push(e.after(this._view,"onLayoutChange",f.hitch(this,"_update"))),this._handleArray.push(e.after(this._view,"onViewUpdated",
f.hitch(this,"_handleViewUpdated"),!0)))},_handleViewUpdated:function(a){(h.hasWidthEvent(a)||h.hasRenderEvent(a))&&this._update()},_drawHighlights:function(){this.onModelUpdated(this._highlightedVariableInstances)},_removeHighlights:function(){this._clearCache();this.onModelUpdated([])},onModelUpdated:function(a){},_clearCache:function(){this._highlightedVariableInstances=[]},_updateLater:function(){this._showTimer&&clearTimeout(this._showTimer);this._clearCache();this._showTimer=setTimeout(f.hitch(this,
"_updateNow"),this._UPDATE_TIMER_LENGTH)},_updateNow:function(){var a=this._getVariableUnderCursor();this._highlightedVariableInstances=this._variableService.getVariableInstances(a);1>=this._highlightedVariableInstances.length&&(this._highlightedVariableInstances=[]);this._drawHighlights()},_update:function(){this._suspend||this._updateNow()},_pendingDocumentChanged:function(){this._suspend=!0},_clearAllAndUpdateNow:function(){this._suspend=!1;this._clearCache();this._drawHighlights();this._updateNow()},
destroy:function(){this._removeListeners()},_removeListeners:function(){this._handleArray.forEach(function(a){a.remove()});this._handleArray=[]},_getVariableUnderCursor:function(){if(!b.isCodeContainer(this._cursor.position.getNode()))return null;var d=a.getWordAtPosition(this._internalDocument,this._cursor.position);return!d||c.selectionSpansOutsideVariable(this._cursor,d)?null:d}})})},"MW/rtc/plugins/language/matlab/variableservice/VariableUtilities":function(){define([],function(){return{isSameVariable:function(g,
f){return!this.isSameVariableLocation(g,f)||g.text!==f.text?!1:!0},isSameVariableLocation:function(g,f){return!g||!f?!1:g.startLineCol.line===f.startLineCol.line&&g.endLineCol.line===f.endLineCol.line&&g.startLineCol.column===f.startLineCol.column},getUpdatedVariableStructure:function(g){return!g?null:{endLineCol:{column:g.endColumn,line:g.endLine},startLineCol:{column:g.startColumn,line:g.startLine},text:g.text}},selectionSpansOutsideVariable:function(g,f){if(!g.hasSelection())return!1;if(!f)return!0;
var e=g.getSelectionLineColumn(),d=f.startLineCol.line;if(e.start.line-1!==d||e.end.line-1!==d)return!0;d=e.start.column;e=e.end.column;if(d>e)var b=d,d=e,e=b;return d-1<f.startLineCol.column||e-1>f.endLineCol.column?!0:!1}}})},"MW/rtc/plugins/language/matlab/variablerenaming/VariableRenamingControllerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./VariableRenamingController"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.actionservice",
"matlab.code.variables.rename.model","matlab.code.variables.rename.view","rtc.tooltipservice"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/plugins/language/matlab/variablerenaming/VariableRenamingController":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin"],function(g,f,e,d){return g(d,{constructor:function(b,a,c,d){this._variableRenamingModel=a;this._tooltipService=d;this._variableRenamingView=c;this.own(e.after(this._variableRenamingModel,
"onModelUpdated",f.hitch(this,"_checkRenaming")));this.own(e.after(this._variableRenamingModel,"exitRenaming",f.hitch(this,"_hideTooltip")));a=[{id:"rtc_variable_renaming_action",key:"shift_enter",platformKey:{mac:"shift_enter"},enabled:!0,callback:f.hitch(this,"_doRenameCallback")},{id:"rtc_variable_renaming_escape",key:"escape",enabled:!0,callback:f.hitch(this,"_notRenamingCallback")}];b.loadActions(a);this._isRenaming=!1},_checkRenaming:function(){this._isRenaming=!1;this._variableRenamingModel.isRenaming()?
this._renaming():this._notRenaming()},_renaming:function(){this._tooltipServiceHandle=this._tooltipService.requestTooltip(f.hitch(this,"_renamingCallback"),f.hitch(this,"_notRenamingCallback"),this._tooltipService.PRIORITY.PROMPT)},_notRenaming:function(){this._variableRenamingModel.notRenaming();this._variableRenamingView.closeTooltip()},_renamingCallback:function(){this._isRenaming=!0;this._variableRenamingModel.renaming();var b=this._variableRenamingModel.getCurrentVariable(),a=this._variableRenamingModel.getLastVariable();
this._variableRenamingView.showToolTip(a,b,b.otherInstances.length+1)},_hideTooltip:function(){this._variableRenamingView.closeTooltip();this._isRenaming=!1;this._tooltipServiceHandle&&(this._tooltipServiceHandle.remove(),this._tooltipServiceHandle=null)},destroy:function(){this._variableRenamingView.closeTooltip()},_doRenameCallback:function(){return this._isRenaming&&this._variableRenamingView.isTooltipOpen()?(this._variableRenamingModel.doRename(),!0):!1},_notRenamingCallback:function(){return this._isRenaming?
(this._variableRenamingModel.exitRenamingCompletely(),this._hideTooltip(),!0):!1}})})},"MW/rtc/plugins/language/matlab/variablerenaming/VariableRenamingModelProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./VariableRenamingModel"],function(g,f,e){return g(f,{requires:function(){return{isApplicable:[],createInstance:["rtc.internaldocument","rtc.cursor","rtc.document","matlab.code.variables.service","matlab.code.variables.rename.utility"]}},createInstance:function(d,
b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/language/matlab/variablerenaming/VariableRenamingModel":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/model/CodeUtilities MW/rtc/model/DocumentUtilities MW/rtc/model/PositionUtilities MW/rtc/plugins/language/matlab/variableservice/VariableServiceUtilities MW/rtc/plugins/language/matlab/variableservice/VariableUtilities".split(" "),function(g,f,e,d,b,a,c,h,k){return g(d,{_EMPTY_BLOCK_TYPE_FOR_MERGE_WITH_LAST_BLOCK:[""],
_VARIABLE_NAME_REGEXP:/[a-zA-Z][a-zA-Z0-9_]*/,constructor:function(a,c,b,d,e){this._internalDocument=a;this._cursor=c;this._document=b;this._variableService=d;this._variableRenamingUtility=e;this._setListeners();this._renamingVariable=this._variableCache=this._lastVariable=null;this._inUndoRedoState=!1},onModelUpdated:function(){},exitRenaming:function(){},getCurrentVariable:function(){return this._renamingVariable},getLastVariable:function(){return this._lastVariable},_setListeners:function(){this._handleArray=
[];this._handleArray.push(e.after(this._internalDocument,"onDocumentChanged",f.hitch(this,"_documentChanged"),!0));this._handleArray.push(e.after(this._internalDocument,"onDocumentReset",f.hitch(this,"_documentChanged"),!0));this._handleArray.push(e.after(this._cursor,"onChange",f.hitch(this,"_cursorChanged")));this._handleArray.push(e.after(this._variableService,"EDSUpdateToDate",f.hitch(this,"_documentChanged"),!0));this._variableService.onEnable()},_documentChanged:function(a){a&&(a[0]||{}).isUndoRedo?
(this._clearRenamingObjects(),this._inUndoRedoState=!0):(this._inUndoRedoState=!1,this._lastVariable&&!this._isCodeLine(this._lastVariable)?this._clearVariables():(a=this._getCurrentVariable(),this._updateModel(a)))},_cursorChanged:function(){if(!this._inUndoRedoState){var a=this._getCurrentVariable();k.selectionSpansOutsideVariable(this._cursor,a)||this._hasCursorMovedToAnotherLine(a)?this._clearRenamingObjects():this._updateModel(a)}},_getCurrentVariable:function(){var c=a.getWordAtPosition(this._internalDocument,
this._cursor.position);if(!c||-1===c.text.search(this._VARIABLE_NAME_REGEXP))return null;this._variableRenamingUtility.isLastVariablePositionInvalid(this._lastVariable)&&this._clearVariables();c=this._isSameAsLastVariable(c)?this._createNewVariableUsingLastVariable(c):this._createCurrentVariableWithLivePositions(c);return!c?null:k.isSameVariable(this._renamingVariable,c)?this._renamingVariable:this._variableRenamingUtility.updateVariableAndInstancesWithLivePosition(c)},_isSameAsLastVariable:function(a){if(!this._lastVariable||
!a)return!1;var c=this._lastVariable.startPos.getLineColumn();this._lastVariable.startLineCol.line=c.line-1;this._lastVariable.startLineCol.column=c.column-1;c=this._lastVariable.endPos.getLineColumn();this._lastVariable.endLineCol.line=c.line-1;this._lastVariable.endLineCol.column=c.column-1;return k.isSameVariableLocation(a,this._lastVariable)},_createNewVariableUsingLastVariable:function(a){a.isAssignment=this._lastVariable.isAssignment;this._lastVariable=this._variableRenamingUtility.updateVariableInstances(this._lastVariable);
a.otherInstances=this._lastVariable.otherInstances;return a},_createCurrentVariableWithLivePositions:function(a){return this._variableService.getVariableThatOverlapsRange(a)},_updateModel:function(a){this._notPossibleToRename(a)||(this._setVariables(a),this.onModelUpdated())},_notPossibleToRename:function(a){return!a||this._variableRenamingUtility.checkVariableLength(a)?(this._variableService.startListeningToEDS(),this.exitRenaming(),!0):!1},_setVariables:function(a){this._lastVariable||(this._lastVariable=
a);this._renamingVariable&&!k.isSameVariable(this._renamingVariable,this._lastVariable)&&(this._renamingVariable.startPos.destroy(),this._renamingVariable.endPos.destroy());this._renamingVariable=a},_isCodeLine:function(a){a=this._internalDocument.getLineNode(a.startLineCol.line);return b.isCodeContainer(a)},_hasCursorMovedToAnotherLine:function(a){return!a&&this._renamingVariable&&this._renamingVariable.startLineCol.line!==this._cursor.getLineColumn().line-1},isRenaming:function(){return this._variableRenamingUtility.isRenaming(this._lastVariable,
this._renamingVariable)},notRenaming:function(){this._lastVariable&&(this._renamingVariable&&0!==(0!==c.comparePositions(this._lastVariable.startPos,this._renamingVariable.startPos)||c.comparePositions(this._lastVariable.endPos,this._renamingVariable.endPos)))&&this._variableRenamingUtility.clearLivePositionsFromVariable(this._lastVariable);this._lastVariable=this._renamingVariable;this._startListeningToEDS()},renaming:function(){this._variableCache||(this._variableCache=this._variableService.getVariableData());
this._variableService.stopListeningToEDS(this._lastVariable);this._updateVariableCache();this._variableService.setVariableCache(this._variableCache)},_updateVariableCache:function(){var a=h.getScopedVariables(this._lastVariable,this._variableCache);this._variableRenamingUtility.updateVariableCache(a,this._renamingVariable)},doRename:function(){this._removeListeners();this._renameVariablesAndUpdateCache();this.exitRenamingCompletely();this._updateModel(this._getCurrentVariable())},_renameVariablesAndUpdateCache:function(){var a=
this._document.startBlockEdit();a.setBlockTypesForMergeAndAdvance(this._EMPTY_BLOCK_TYPE_FOR_MERGE_WITH_LAST_BLOCK);this._renamingVariable.otherInstances.forEach(function(a){var c=a.startPos.getLineColumn(),b=a.endPos.getLineColumn();this._document.replaceText(this._renamingVariable.text,c.line,c.column,b.line,b.column);a.startColumn=a.startPos.getLineColumn().column-1;a.endColumn=a.startColumn+this._renamingVariable.text.length;this._updateCacheWithRenamingVariables(a)},this);this._setListeners();
this._document.endBlockEdit(a)},_updateCacheWithRenamingVariables:function(a){this._variableRenamingUtility.updateInstanceWithLivePosition(a);this._updateVariableCache();this._variableService.setVariableCache(this._variableCache)},destroy:function(){this._removeListeners();this._clearVariables();this._variableCache=null},_removeListeners:function(){this._handleArray.forEach(function(a){a.remove()});this._handleArray=[];this._variableService.onDisable()},_clearVariables:function(){this._lastVariable&&
(this._variableRenamingUtility.clearLivePositionsFromVariable(this._lastVariable),this._lastVariable=null);this._renamingVariable&&(this._variableRenamingUtility.clearLivePositionsFromVariable(this._renamingVariable),this._renamingVariable=null)},exitRenamingCompletely:function(){this._clearVariables();this._startListeningToEDS()},_startListeningToEDS:function(){this._variableService.startListeningToEDS();this._variableCache=null},_clearRenamingObjects:function(){this._clearVariables();this._variableService.startListeningToEDS();
this.exitRenaming()}})})},"MW/rtc/plugins/language/matlab/variableservice/VariableServiceUtilities":function(){define(["MW/rtc/model/DocumentUtilities","MW/rtc/plugins/language/matlab/variableservice/Variable","MW/rtc/plugins/language/matlab/variableservice/VariableUtilities"],function(g,f,e){return{getValidScopedVariables:function(d,b,a){b=this._getMatchingVariableLocations(d,b);var c,e;for(c=0;c<b.length;c+=1){var f=this._getVariablePositionsFromScope(b[c]);for(e=0;e<f.length;e+=1)if(!g.checkLineColumnIsValid(a,
f[e].startLine,f[e].endColumn))return[];if(g.checkOverlapsWithRange(d.startLineCol,d.endLineCol,f))return f}return[]},getScopedVariables:function(d,b){for(var a=this._getMatchingVariableLocations(d,b),c=0;c<a.length;c+=1){var e=this._getVariablePositionsFromScope(a[c]);if(g.checkOverlapsWithRange(d.startLineCol,d.endLineCol,e))return e}return[]},_getMatchingVariableLocations:function(d,b){if(!d||!b)return[];var a=d.text,c;b.hasOwnProperty(a)&&(c=b[a]);return!c?[]:c},isSameVariableLocation:function(d,
b){var a=e.getUpdatedVariableStructure(d);return e.isSameVariableLocation(a,b)},_getVariablePositionsFromScope:function(d){var b=[],a;for(a=0;a<d.length;a+=1)b[a]=d[a].position;return b},getOverlappingVariableFromCache:function(d,b){if(!b)return null;var a;b.hasOwnProperty(d.text)&&(a=b[d.text]);if(!a)return null;var c;for(c=0;c<a.length;c+=1){var e=this._checkAndCreateOverlappingVariable(a[c],d);if(e)return e}return null},_checkAndCreateOverlappingVariable:function(d,b){var a=this._getVariablePositionsFromScope(d);
if(g.checkOverlapsWithRange(b.startLineCol,b.endLineCol,a)){var c=new f(b.startLineCol,b.endLineCol,b.text),e;for(e=0;e<a.length;e++)this.isSameVariableLocation(a[e],b)?c.isAssignment=d[e].isAssignment:c.addOtherInstance(a[e].startLine,a[e].startColumn,a[e].endLine,a[e].endColumn);return c}return null},findNonlocalVariableInstances:function(d){var b=[];Object.keys(d).forEach(function(a){d[a].forEach(function(a){a.forEach(function(a){a.isNonlocal&&b.push(a.position)})})});return b}}})},"MW/rtc/plugins/language/matlab/variableservice/Variable":function(){define(["dojo/_base/declare"],
function(g){return g(null,{constructor:function(f,e,d){this.startLineCol=f;this.endLineCol=e;this.endPos=this.startPos=null;this.text=d;this.isAssignment=!1;this.otherInstances=[]},addOtherInstance:function(f,e,d,b){this.otherInstances.push({startPos:null,endPos:null,startLine:f,startColumn:e,endLine:d,endColumn:b})}})})},"MW/rtc/plugins/language/matlab/variablerenaming/VariableRenamingModelUtilityProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./VariableRenamingModelUtility"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document","rtc.internaldocument"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/language/matlab/variablerenaming/VariableRenamingModelUtility":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/plugins/language/matlab/variableservice/VariableServiceUtilities MW/rtc/plugins/language/matlab/variableservice/VariableUtilities".split(" "),function(g,
f,e,d,b,a){return g(d,{_MAX_VARIABLE_LENGTH:64,_INVALID_KEYWORD_LIST:["varargin","varargout"],constructor:function(a,b){this._document=a;this._internalDocument=b},isRenaming:function(c,b){return!c||(!b||!b.text)||c.text===b.text||!a.isSameVariableLocation(c,b)||-1!==this._INVALID_KEYWORD_LIST.indexOf(c.text.toLowerCase())||!b.isAssignment||1>b.otherInstances.length?!1:!0},checkVariableLength:function(a){return a.text.length>=this._MAX_VARIABLE_LENGTH?!0:!1},updateVariableCache:function(a,d){var e=
0;a.forEach(function(a){if(b.isSameVariableLocation(a,d))a.startColumn=d.startLineCol.column,a.startLine=d.startLineCol.line,a.endColumn=d.endLineCol.column,a.endLine=d.endLineCol.line;else{var c=d.otherInstances[e];a.startColumn=c.startPos.getLineColumn().column-1;a.startLine=c.startPos.getLineColumn().line-1;a.endColumn=c.endPos.getLineColumn().column-1;a.endLine=c.endPos.getLineColumn().line-1;e++}})},updateVariableAndInstancesWithLivePosition:function(a){a.startPos&&(a.startPos.destroy(),a.endPos.destroy());
var b=a.startLineCol,d=a.endLineCol;a.startPos=this._document.createPositionAtLineColumn(b.line,b.column);a.endPos=this._document.createPositionAtLineColumn(d.line,d.column,!0);a.otherInstances.forEach(function(a){if(a.startLine<this._internalDocument.getMaxLineNumber())this.updateInstanceWithLivePosition(a);else return null},this);return a},updateInstanceWithLivePosition:function(a){a.startPos&&a.startPos.destroy();a.startPos=this._document.createPositionAtLineColumn(a.startLine,a.startColumn);a.endPos&&
a.endPos.destroy();a.endPos=this._document.createPositionAtLineColumn(a.endLine,a.endColumn,!0);return a},clearLivePositionsFromVariable:function(a){a.otherInstances.forEach(function(a){a.startPos&&(a.startPos.destroy(),a.startPos=null);a.endPos&&(a.endPos.destroy(),a.endPos=null)},this);a.startPos&&(a.startPos.destroy(),a.endPos.destroy(),a.startPos=null,a.endPos=null)},isLastVariablePositionInvalid:function(a){if(!a)return!1;var b=a.startPos.getLineColumn();a=a.endPos.getLineColumn();var d=b.line===
a.line;return!d||d&&b.column===a.column?!0:!1},updateVariableInstances:function(a){a.otherInstances.forEach(function(a){var c=a.startPos,b=a.endPos;c&&b&&(a.startColumn=c.getLineColumn().column-1,a.startLine=c.getLineColumn().line-1,a.endColumn=b.getLineColumn().column-1,a.endLine=b.getLineColumn().line-1)},this);return a}})})},"MW/rtc/plugins/language/matlab/variablerenaming/view/VariableRenamingViewProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./VariableRenamingView"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.view","rtc.cursor","rtc.view.visibility"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/language/matlab/variablerenaming/view/VariableRenamingView":function(){define("dijit/popup dijit/TooltipDialog dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-construct dojo/dom-style dojo/i18n!l10n/nls/actions dojo/string MW/rtc/abstract/AbstractPlugin MW/rtc/view/ViewEventUtilities MW/uiframework/FocusManager".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p){return e(l,{_VERTICAL_OFFSET_PX:7,constructor:function(a,c,e){this._view=a;this._cursor=c;this._tooltipInfo={tooltipDialog:new f({"class":"rtcTooltip"}),isTooltipOpen:!1};this._renamingTooltipLayer=this._createLayer();a.addLayer(this._renamingTooltipLayer);this.own(b.after(e,"onHide",d.hitch(this,"hideTooltip")));this.own(b.after(e,"onShow",d.hitch(this,"_prepareTooltipInfo")));this._reopenTooltipListener=null;this._wasOutOfView=!0},_createLayer:function(){return a.create("div",
{"class":"variableRenamingTooltipHolder",id:"renamingNode"})},showToolTip:function(a,c,e){this._prepareTooltipInfo();this._openTooltipIfInView();this._updateTooltipContent(a,c,e);this._reopenTooltipListener&&this._reopenTooltipListener.remove();this._reopenTooltipListener=b.after(this._view,"onViewUpdated",d.hitch(this,"_updateTooltipOnScroll"),!0);p.refuseFocus(this._tooltipInfo.tooltipDialog.domNode)},_prepareTooltipInfo:function(){var a=this._tooltipInfo.tooltipDialog,b=this._getTooltipPosition();
c.set(this._renamingTooltipLayer,{top:b.y+"px",left:b.x+"px"});this._tooltipInfo={tooltipDialog:a,isTooltipOpen:!0}},_openTooltipIfInView:function(){this._view.isElementOutOfView(this._renamingTooltipLayer)||(this._wasOutOfView=!1,this._openTooltip(!0))},_openTooltip:function(){g.open({popup:this._tooltipInfo.tooltipDialog,around:this._renamingTooltipLayer,orient:["below-centered","below","above-centered","above"],onCancel:d.hitch(this,"closeTooltip")});this._tooltipInfo.isTooltipOpen=!0;this._tooltipInfo.tooltipDialog.set("data-testid",
"variableRenaming_visible")},_getTooltipPosition:function(){var a=this._cursor.getLineColumn(),a=this._view.getCoordinateForLineColumn(a.line,a.column);return{y:a.y+this._VERTICAL_OFFSET_PX,x:a.x}},_updateTooltipContent:function(a,c,b){c=this._getStyledVariableText(a.text,c.text);a=k.substitute(h.variableRenamingTooltip,{"0":b,1:a.text,2:c});this._tooltipInfo.tooltipDialog.set("content",a)},_getStyledVariableText:function(a,c){var b="";c.split("").some(function(c,d){var e=a.charAt(d);if(e===c)b+=
e;else return!0});var d=c.substring(b.length,c.length);return""!==d?b+"\x3cb\x3e"+d+"\x3c/b\x3e":b},_updateTooltipOnScroll:function(a){m.hasScrollEvent(a)&&(a=this._view.isElementOutOfView(this._renamingTooltipLayer),this._wasOutOfView!==a&&((this._wasOutOfView=a)?this.hideTooltip():this._openTooltip()))},hideTooltip:function(){return this._tooltipInfo.isTooltipOpen?(this._tooltipInfo.tooltipDialog.set("data-testid","variableRenaming_hidden"),g.close(this._tooltipInfo.tooltipDialog),this._tooltipInfo.isTooltipOpen=
!1,!0):!1},closeTooltip:function(){this._reopenTooltipListener&&(this._reopenTooltipListener.remove(),this._reopenTooltipListener=null);return this.hideTooltip()},isTooltipOpen:function(){return this._tooltipInfo.isTooltipOpen},destroy:function(){a.destroy(this._renamingTooltipLayer)}})})},"MW/rtc/plugins/language/matlab/variableservice/VariableServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./VariableService"],function(g,f,e){return g(f,{requires:function(){return{isApplicable:[],
createInstance:["rtc.internaldocument","rtc.editordataservice"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/language/matlab/variableservice/VariableService":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin","MW/rtc/plugins/language/matlab/variableservice/VariableServiceUtilities"],function(g,f,e,d,b){return g(d,{_VARIABLE_EDS_NAME:"matlab.code.variables",_DOCUMENT_STATE:".documentstate",constructor:function(a,c){this._editorDataService=
c;this._editorDataService.get(this._VARIABLE_EDS_NAME);this._internalDocument=a;this._listenToHandle=this._editorDataService.listenTo(this._VARIABLE_EDS_NAME,f.hitch(this,"onVariablesUpdated"));this._variableCache=null;this._isListeningToEDS=!0;this._variableBeingChanged=null},onDisable:function(){},onEnable:function(){},onVariablesUpdated:function(){},destroy:function(){this._listenToHandle.remove()},getVariableInstances:function(a){if(this._isListeningToEDS&&!this._isDocumentUpToDate())return[];
a=this._getVariableInstances(a);return!a?[]:a},_isDocumentUpToDate:function(){return this._internalDocument.getState()===this._editorDataService.get(this._VARIABLE_EDS_NAME+this._DOCUMENT_STATE)},_getVariableInstances:function(a){if(!a)return[];var c=[];if(this._isListeningToEDS)this._variableCache=this._editorDataService.get(this._VARIABLE_EDS_NAME),this.EDSUpdateToDate(),c=b.getValidScopedVariables(a,this._variableCache,this._internalDocument);else{if(!this._variableBeingChanged)return[];c=b.getValidScopedVariables(this._variableBeingChanged,
this._variableCache,this._internalDocument)}return c},getNonlocalVariableInstances:function(){if(!this._isDocumentUpToDate())return null;var a=[];this._isDocumentUpToDate()&&this._isListeningToEDS&&(this._variableCache=this._editorDataService.get(this._VARIABLE_EDS_NAME))&&(a=b.findNonlocalVariableInstances(this._variableCache));return a},EDSUpdateToDate:function(){},setVariableCache:function(a){this._variableCache=a;this.onVariablesUpdated()},getVariableData:function(){this._isListeningToEDS&&(this._variableCache=
this._editorDataService.get(this._VARIABLE_EDS_NAME));return this._variableCache},getVariableThatOverlapsRange:function(a){return!this._overwriteCacheWithUpToDateEDS()?null:b.getOverlappingVariableFromCache(a,this._variableCache)},_overwriteCacheWithUpToDateEDS:function(){if(this._isListeningToEDS){if(!this._isDocumentUpToDate())return!1;this._variableCache=this._editorDataService.get(this._VARIABLE_EDS_NAME)}return!0},stopListeningToEDS:function(a){this._isListeningToEDS&&(this._variableBeingChanged=
a,this._listenToHandle&&this._listenToHandle.remove(),this._isListeningToEDS=!1)},startListeningToEDS:function(){this._isListeningToEDS||(this._listenToHandle=this._editorDataService.listenTo(this._VARIABLE_EDS_NAME,f.hitch(this,"onVariablesUpdated")),this._variableCache=this._editorDataService.get(this._VARIABLE_EDS_NAME),this._isListeningToEDS=!0,this._variableBeingChanged=null)}})})},"MW/rtc/plugins/lists/ListsProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/lists/Lists","MW/rtc/core/provider/PluginProvider"],
function(g,f,e){return g(e,{requires:function(){return{createInstance:["rtc.document","rtc.internaldocument","rtc.cursor","rtc.actionservice","rtc.nodeconversionrulesservice"]}},createInstance:function(d,b,a,c,e){return new f(d,b,a,c,e)}})})},"MW/rtc/plugins/lists/Lists":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/model/DocumentConstants MW/rtc/model/DocumentUtilities MW/rtc/model/DocumentEventUtilities MW/rtc/model/NodeUtilities MW/rtc/model/Position MW/rtc/model/PositionUtilities MW/rtc/model/events/FormatChangeEvent MW/rtc/model/events/InsertBreakEvent MW/rtc/model/events/DeletionEvent MW/rtc/plugins/nodeconversionrules/NodeConversionRulesUtilities MW/rtc/plugins/richtext/RichTextUtilities MW/rtc/plugins/richtext/nodes/leaf/RichTextNode MW/rtc/RichTextComponentFeatureEnum ./model/ListParagraph ./model/ListItem".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v){return g(d,{constructor:function(a,c,b,d,h){this._internalDocument=c;this._document=a;this._cursor=b;this._actionService=d;this._nodeConversionRules=h;this._ORDERED_LIST_TYPE="ordered";this._UNORDERED_LIST_TYPE="unordered";a=[{name:"ordered",method:f.hitch(this,this.formatTemplate,this._ORDERED_LIST_TYPE)},{name:"unordered",method:f.hitch(this,this.formatTemplate,this._UNORDERED_LIST_TYPE)}];c.registerFormatTemplates(a);this.own(e.around(this._document,
"deleteTextAtCurrentPosition",f.hitch(this,"_onDoDelete")));this.own(e.around(this._document,"insertBreak",f.hitch(this,"_onInsertBreak")));this.own(e.after(this._cursor,"onChange",f.hitch(this,this._updateActions)));d.loadActions(this._actions());this.own(e.after(this._actionService,"onActionChange",f.hitch(this,"_onActionChange"),!0))},formatTemplate:function(a){var c={};c.container=new u([],{type:a});c.textContainer=new v([]);c.container.addChild(c.textContainer,0);return c},_actions:function(){return[{id:t.LISTS.UNORDERED_LIST_ACTION,
key:"ctrl_alt_u",platformKey:{mac:"ctrl_alt_u"},enabled:!1,selected:!1,callback:f.hitch(this,this._toggleToList,this._UNORDERED_LIST_TYPE)},{id:t.LISTS.ORDERED_LIST_ACTION,key:"ctrl_alt_o",platformKey:{mac:"ctrl_alt_o"},enabled:!1,selected:!1,callback:f.hitch(this,this._toggleToList,this._ORDERED_LIST_TYPE)}]},_onActionChange:function(a){if("selected"===a.key)switch(a.id){case t.LISTS.UNORDERED_LIST_ACTION:this._toggleIfNeeded(a.newValue,this._UNORDERED_LIST_TYPE);break;case t.LISTS.ORDERED_LIST_ACTION:this._toggleIfNeeded(a.newValue,
this._ORDERED_LIST_TYPE)}},_toggleIfNeeded:function(a,c){var b=r.getParagraphFormat(this._cursor);a!==(b===c)&&this._toggleToList(c)},_updateActions:function(){var a=r.getParagraphFormat(this._cursor);this._actionService.updateAction(t.LISTS.UNORDERED_LIST_ACTION,{enabled:this._canSetFormat(),selected:a===this._UNORDERED_LIST_TYPE});this._actionService.updateAction(t.LISTS.ORDERED_LIST_ACTION,{enabled:this._canSetFormat(),selected:a===this._ORDERED_LIST_TYPE})},_canSetFormat:function(){return this._internalDocument&&
this._internalDocument.isReadOnly()||!q.textContainersInCursorConvertibleTo(this._cursor,u,this._nodeConversionRules)?!1:r.hasRichText(this._cursor)},_stripListItem:function(a,c){var b=this._document.startEdit(),d=c.nextSibling(),e=this._internalDocument.createContainerForType("text").container,f=new s({});e.addChild(f);var f=this._internalDocument.splitContainerAtNode(a,c.endNode()),h=new k(f,f.maxOffset());this._internalDocument.insertAtPosition(e,h);this._internalDocument.spliceContainers(e,c);
var g=e,h=e;f.firstChild()&&(g=f);0===a.children.length&&this._internalDocument.deleteNode(a,{node:e,offset:0});d&&(h=e.nextSibling());d=this._internalDocument.getLineNumber(g);f=this._internalDocument.getLineNumber(h);h=[m.create(d,f)];f>d&&h.push(p.create(d,f,0,1));b.appendRedoEvents([m.create(d,f)]);b.appendUndoEvents([m.create(d,f)]);this._document.endEdit();this._internalDocument.emitDocumentEvents(h);return e},_onDoDelete:function(c){var d=this._cursor,e=this._document,f=this;return function(h){if(e.isReadOnly())return!1;
if(h===b.BACKWARD_DELETE&&!d.hasSelection()&&a.isAtStartOfContainer(d.position)){var g=d.getNode().rootContainer();if(f._isListParagraph(g)){var k=d.getNode().textContainer(),g=f._stripListItem(g,k);d.setPosition(g,0);d.onUpdate(!1,!0);return!0}}return h===b.FORWARD_DELETE&&!d.hasSelection()&&(g=d.getNode().rootContainer(),(k=g.nextSibling())&&k.childrenAreContainers&&(!g.isEmpty()||g.childrenAreContainers)&&a.isAtEndOfContainer(d.position,g))?(e.startEdit(),f._stripListItem(k,k.firstChild()),g=c.apply(e,
arguments),e.endEdit(),g):c.apply(e,arguments)}},_onInsertBreak:function(c){var d=this._document,e=this._cursor,f=this;return function(){if(d.isReadOnly())return!1;var h=d.startBlockEdit();if(e.hasSelection()){var g=e.selectionInfo();a.isAtStartOfContainer(g.startPosition)&&a.isAtEndOfContainer(g.endPosition)&&d.deleteTextAtCurrentPosition(b.FORWARD_DELETE)}if(!e.hasSelection()&&0===e.getOffset()){var k=e.getNode(),g=k.textContainer(),k=k.rootContainer();if(g instanceof v&&g.isEmpty()){g=f._stripListItem(k,
g);e.setPosition(g,0);e.onUpdate(!1,!0);d.endBlockEdit(h);return}}g=c.apply(d,arguments);d.endBlockEdit(h);return g}},_toggleToList:function(a){this._canSetFormat()&&(r.getParagraphFormat(this._cursor)===a?this._actionService.executeAction(t.RICH_TEXT.PARAGRAPH_FORMAT_TEXT_ACTION,{}):this._convertToList(a))},_convertToList:function(a){if(this._canSetFormat()){var b=this._cursor.selectionInfo(),d=b.startNode.rootContainer(),e=this._internalDocument.getLineNumber(d),f=b.endNode,b=this._cursor.adjustSelection(b,
!0),g=h.getParagraphFormat(b);if(g!==a&&d){var k=b.endNode.rootContainer();this._internalDocument.getLineNumber(k);var l=this._cursor.getPosition(),p=this._document.startEdit(),n,q,r,s;h.getParagraphNodesInRange(d,k).forEach(function(c){this._nodeConversionRules.isNodeConvertibleTo(c,u)?(q||(q=c),c===k&&(r=c),s=c):q&&(r=s);q&&r&&(n=this._convertRangeToList(q,r,a),q=r=null)},this);if(n){var t=n.listParagraph,v=n.newListItem,d=n.needCursorChangeEvent,S=this._internalDocument.getLineNumber(t),e=[m.create(e,
S,g,a)];p.appendRedoEvents(e);p.appendUndoEvents(c.translateEventsForUndo(e));this._internalDocument.emitDocumentEvents(e);this._document.endEdit();p=v?v.startNode().offsetInContainer(t):0;l.anchor.hasOwnProperty("line")?(t=this._internalDocument.getLineNumber(t),f!==b.endNode&&(t+=1,p=0),b.isReversed?(l.anchor.line=t,l.anchor.column+=p):(l.line=t,l.column+=p)):l.column+=p;this._cursor.setPosition(l);if(d)this._cursor.onUpdate(!1,!0)}}}},_convertRangeToList:function(a,b,d){var e=this._internalDocument.getLineNumber(a),
f=this._internalDocument.getLineNumber(b),h=this._document.startEdit(),g=new u([],{type:d}),k=new s({}),l=new v([k]);g.addChild(l);var p=l;this._internalDocument.insertAtPosition(g,a.startPosition());var q=a,r;for(a=!1;q;){var t=!0;q.anchorId&&(g.anchorId=q.anchorId);r=q===b?null:q.nextSibling();this._isListParagraph(q)?p=g:q.childrenAreContainers?(q.children.forEach(function(a){k=new s({text:a.getText()});p=new v([k]);this._internalDocument.insertAtPosition(p,g.endPosition())},this),this._internalDocument.deleteNode(q,
{node:k,offset:0}),t=!1):(k=new s({}),p=new v([k],{align:q.align}),this._internalDocument.insertAtPosition(p,g.endPosition()));"LineNode"===q.className&&(k=new s({text:q.getText()}),this._internalDocument.insertAtPosition(k,p.startPosition()),this._internalDocument.deleteNode(q,{node:k,offset:0}),t=!1);t&&(this._internalDocument.spliceContainers(p,q),a=!0);q=r}l.parent&&this._internalDocument.deleteNode(l,{node:l.nextSibling(),offset:0});b=[];b=b.concat(n.create(e,f,0));b=b.concat(m.create(e,e,"",
d));h.appendRedoEvents(b);h.appendUndoEvents(c.translateEventsForUndo(b));this._internalDocument.emitDocumentEvents(b);this._document.endEdit();return{listParagraph:g,needCursorChangeEvent:a,newListItem:p}},convertLineRangeIntoList:function(a,c,b){if(this._canSetFormat()&&(a=this._internalDocument.getLineNode(a-1),c=this._internalDocument.getLineNode(c-1),this._convertRangeToList(a,c,b).needCursorChangeEvent))this._cursor.onUpdate(!1,!0)},isLineListParagraph:function(a,c){if(1>a||a>this._internalDocument.getMaxLineNumber())return!1;
var b=this._internalDocument.getLineNode(a-1);return this._isListParagraph(b,c)},_isListParagraph:function(a,c){return a instanceof u&&!(c&&a.type!==c)},getNumberOfItemsInList:function(a,c){return!this.isLineListParagraph(a,c)?0:this._internalDocument.getLineNode(a-1).children.length}})})},"MW/rtc/model/events/FormatChangeEvent":function(){define(["dojo/_base/declare","MW/rtc/model/DocumentConstants","MW/rtc/model/DocumentEventUtilities","MW/rtc/model/Mutation","./UndoableEvent"],function(g,f,e,d,
b){var a=g(b,{constructor:function(a,b,d,e){this.type=f.FORMAT_CHANGE_EVENT;this.oldFormat=d;this.newFormat=e},getMutation:function(){return d.createFromEvent(this,d.MUTATION_TYPE.INPLACE)},getUndoEvent:function(){return new a(this.startLine,this.endLine,this.newFormat,this.oldFormat)},destroy:function(){}});return{create:function(c,b,d,g){e.assertValidLines(c,b,f.FORMAT_CHANGE_EVENT);return new a(c,b,d,g)}}})},"MW/rtc/plugins/richtext/RichTextUtilities":function(){define(["MW/rtc/model/NodeUtilities",
"MW/rtc/nodes/inner/LineNode","MW/rtc/plugins/richtext/ParagraphFormatsEnum","./nodes/inner/HeadingNode","./nodes/inner/RichTextParagraphNode"],function(g,f,e,d,b){return{hasRichText:function(a){var c=!1;a=this._getStartEndNodeForCursor(a);g.textContainerNodesInRangeIterator(a.startNode,a.endNode,function(a){if(a.isInstanceOf(b))return c=!0});return c},isRichText:function(a){var c=!0;a=this._getStartEndNodeForCursor(a);g.textContainerNodesInRangeIterator(a.startNode,a.endNode,function(a){if(!a.isInstanceOf(b))return c=
!1,!0});return c},getParagraphFormat:function(a){a=this._getStartEndNodeForCursor(a);return g.getParagraphFormat(a)},_getStartEndNodeForCursor:function(a){var c=a.selectionInfo(),c=a.adjustSelection(c,!0);return{startNode:c.startNode,endNode:c.endNode}},getNodeConstructorByFormat:function(a){return a===e.NORMAL?b:this.isRichTextParagraphFormat(a)?d:"code"===a?f:null},isRichTextParagraphFormat:function(a){for(var c in e)if(e.hasOwnProperty(c)&&e[c]===a)return!0;return!1}}})},"MW/rtc/plugins/lists/HTMLListElementHandlerProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/lists/HTMLListElementHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cutcopypaste.htmlmimeconverter","rtc.richtext.lists.htmlwordstylelist"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/lists/HTMLListElementHandler":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/dom-style","MW/rtc/plugins/lists/model/ListItem","MW/rtc/plugins/lists/model/ListParagraph"],function(g,f,e,
d,b){return g(null,{constructor:function(a){a.registerNodeHandler("LI",f.hitch(this,"_convertLI"))},_convertLI:function(a,c){var b=e.getComputedStyle(a);this._startOrContinueList(c,a.parentNode&&"OL"===a.parentNode.nodeName?"ordered":"unordered",b.textAlign)},_startOrContinueList:function(a,c,e){c=c||"unordered";var f=a.getLastParagraph();!f||!(f instanceof b)||f.type!==c?a.appendParagraph(new b([],{type:c})):a.setActiveNode(f);a.appendInnerNode(new d([],{align:"start"!==e?e:"left"}))}})})},"MW/rtc/plugins/lists/HTMLWordStyleListHandlerProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./HTMLWordStyleListHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cutcopypaste.htmlmimeconverter"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/lists/HTMLWordStyleListHandler":function(){define(["dojo/_base/array","dojo/_base/declare","dojo/_base/lang","dojo/dom-construct"],function(g,f,e,d){return f(null,{constructor:function(b){b.registerDocumentPreprocessor(e.hitch(this,"_preprocess"))},_preprocess:function(b){for(var a,
c=b.querySelectorAll("p[style*\x3dmso-list]").length;0<c;){a=b.querySelector("p[style*\x3dmso-list]");if(!a)break;this._convert(a);c-=1}},_convert:function(b){var a=b.querySelectorAll("span[style*\x3d'mso-list']"),a=g.some(a,function(a){return a.getAttribute("style").match(/\bmso-list:\s*Ignore\b/)&&a.textContent.match(/\d/)}),a=d.create(a?"ol":"ul");d.place(a,b,"before");for(var c,e;this._isWordListItem(b);){c=b.nextElementSibling;e=b.querySelectorAll("br");for(var f=0;f<e.length;f+=1)d.destroy(e[f]);
e=this._createLiFromParagraph(b);d.place(e,a,"append");this._copyChildren(b,e);d.destroy(b);b=c}},_isWordListItem:function(b){return!b?!1:b.className.match(/MsoListParagraph/)?!0:(b=b.getAttribute("style"))&&b.match(/mso-list/)?!0:!1},_createLiFromParagraph:function(b){var a=d.create("li");g.forEach(b.attributes,function(c){a.setAttribute(c.name,c.value);a.style.textIndent=""});return a},_copyChildren:function(b,a){for(var c,e=b.firstChild;e;){e=this._skipConditionalComments(e);if(!e)break;c=e.nextSibling;
d.place(e,a,"append");e=c}},_skipConditionalComments:function(b){if("#comment"===b.nodeName&&"[if !supportLists]"===b.textContent){for(;b&&("#comment"!==b.nodeName||"[endif]"!==b.textContent);)b=b.nextSibling;b&&(b=b.nextSibling)}return b}})})},"MW/rtc/plugins/lists/export/ListParagraph2HTMLProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/lists/export/ListParagraph2HTML"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},
createInstance:function(){return new e}})})},"MW/rtc/plugins/lists/export/ListParagraph2HTML":function(){define(["dojo/_base/declare","MW/rtc/plugins/export/html/BaseInnerNode2HTML","MW/rtc/plugins/lists/model/ListParagraph"],function(g,f,e){return g([f],{_STYLES:["margin","padding-left","font-family","font-size"],constructor:function(){},getApplicableNodeClass:function(){return e},_getTagName:function(d){return"ordered"===d.type?"ol":"ul"}})})},"MW/rtc/plugins/lists/export/ListItem2HTMLProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/lists/export/ListItem2HTML"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/lists/export/ListItem2HTML":function(){define(["dojo/_base/declare","MW/rtc/plugins/export/html/BaseInnerNode2HTML","MW/rtc/plugins/lists/model/ListItem"],function(g,f,e){return g([f],{_STYLES:["margin-left","line-height","min-height","text-align","white-space"],constructor:function(){},
getApplicableNodeClass:function(){return e},_getTagName:function(d){return"li"}})})},"MW/rtc/plugins/lists/view/ListParagraphCoordinateConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./ListParagraphCoordinateConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/lists/view/ListParagraphCoordinateConverter":function(){define(["dojo/_base/declare","MW/rtc/plugins/lists/model/ListParagraph",
"MW/rtc/view/coordinateconverter/base/VerticalAlignCoordinateConverter"],function(g,f,e){return g(e,{constructor:function(){},getApplicableNodeClass:function(){return f}})})},"MW/rtc/plugins/lists/view/ListItemLayouterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./ListItemLayouter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/lists/view/ListItemLayouter":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/view/layoutmanager/abstract/AbstractLayouter","../model/ListItem"],function(g,f,e){return g(f,{constructor:function(){},getApplicableNodeClass:function(){return e},layout:function(d,b){var a={"class":"RTClistItem",style:""};b.bullet&&(a.style+="list-style-type:"+b.bullet+";");b.align&&(a.style+=" text-align: "+b.align+";");return d.layoutInto(b,"li",a)}})})},"MW/rtc/plugins/lists/view/ListParagraphLayouterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"./ListParagraphLayouter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/lists/view/ListParagraphLayouter":function(){define(["dojo/_base/declare","MW/rtc/plugins/view/layoutmanager/abstract/AbstractLayouter","../model/ListParagraph"],function(g,f,e){return g(f,{constructor:function(){},getApplicableNodeClass:function(){return e},layout:function(d,b){var a={"class":"RTClistNode"},
c;"ordered"===b.type?(c="ol",b.start&&(a.start=b.start)):c="ul";return d.layoutInto(b,c,a)}})})},"MW/rtc/plugins/smoothscrolling/SmoothScrollingPluginProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smoothscrolling/SmoothScrollingPlugin"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.view"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/smoothscrolling/SmoothScrollingPlugin":function(){define(["dojo/_base/declare",
"dojo/aspect","dojo/on","MW/rtc/abstract/AbstractPlugin","MW/rtc/events/MouseEventUtil"],function(g,f,e,d,b){return g(d,{_DIRECTION:{UNSET:0,UP:1,DOWN:2,LEFT:3,RIGHT:4},_SET_SCROLL_TOP_DURATION:500,_SET_SCROLL_LEFT_DURATION:500,_SCROLL_DURATION:800,_SCROLL_POSITION_THRESHOLD:0.5,constructor:function(a){this._view=a;this._viewScrollListeners=[];this._targetDataMap={};this._isEnabled=!1},destroy:function(){this.inherited(arguments);this._clearMouseTimeEvents()},setEnabled:function(a){a&&!this._isEnabled?
(this._isEnabled=!0,this._enable()):!a&&this._isEnabled&&(this._isEnabled=!1,this._disable())},_enable:function(){this.setSmoothScrolling(this._view.getDomtarget());this._viewScrollListeners.push(f.before(this._view,"setScrollTop",this._animateSetScrollTop.bind(this)));this._viewScrollListeners.push(f.before(this._view,"setScrollLeft",this._animateSetScrollLeft.bind(this)));this._viewScrollListeners.push(f.before(this._view,"offsetScrollTop",this._animateOffsetScrollTop.bind(this)));this._viewScrollListeners.push(f.before(this._view,
"offsetScrollLeft",this._animateOffsetScrollLeft.bind(this)));this._viewScrollListeners.forEach(function(a){this.own(a)},this)},_disable:function(){this._clearScrollListeners();this._clearMouseTimeEvents();this._clearListeners();this._targetDataMap={}},_clearScrollListeners:function(){Object.keys(this._targetDataMap).forEach(function(a){this._targetDataMap[a].scrollAction&&(this._targetDataMap[a].scrollAction.remove(),this._targetDataMap[a].scrollAction=null)},this)},_clearMouseTimeEvents:function(){Object.keys(this._targetDataMap).forEach(function(a){this._targetDataMap[a].mouseTimeEvent&&
(clearTimeout(this._targetDataMap[a].mouseTimeEvent),this._targetDataMap[a].mouseTimeEvent=null)},this)},_clearListeners:function(){this._viewScrollListeners.forEach(function(a){a.remove()});this._viewScrollListeners=[]},setSmoothScrolling:function(a){this._targetDataMap[a]||(this._targetDataMap[a]={scrollAction:e(a,b.MOUSEWHEEL,this._initiateAnimation.bind(this,a)),previousScrollDirectionV:this._DIRECTION.UNSET,previousScrollDirectionH:this._DIRECTION.UNSET,mouseTimeEvent:null,remainingDistanceV:0,
remainingDistanceH:0},this.own(this._targetDataMap[a].scrollAction))},_initiateAnimation:function(a,c){if(!c.defaultPrevented&&!b.isBrowserZoomScrollEvent(c)){c.preventDefault();var d=this._calculateScrollDestination(a,c);this._animateSmoothScroll(a,d,this._SCROLL_DURATION)}},_calculateScrollDestination:function(a,c){var d=this._targetDataMap[a],e=b.getVerticalScrollDistance(c),f=a.scrollTop-e,e=0<e?this._DIRECTION.UP:0>e?this._DIRECTION.DOWN:this._DIRECTION.UNSET;e!==d.previousScrollDirectionV&&
(d.remainingDistanceV=0);f+=d.remainingDistanceV;d.previousScrollDirectionV=e;var g=b.getHorizontalScrollDistance(c),e=a.scrollLeft-g,g=0<g?this._DIRECTION.LEFT:0>g?this._DIRECTION.RIGHT:this._DIRECTION.UNSET;g!==d.previousScrollDirectionH&&(d.remainingDistanceH=0);e+=d.remainingDistanceH;d.previousScrollDirectionH=g;return{v:f,h:e}},_easeFunction:function(a,c,b){return b<=a?0:b>=c?1:1+Math.pow((b-a)/(c-a)-1,5)},_animateSmoothScroll:function(a,c,b){var d=this._targetDataMap[a],e=a.scrollLeft+d.remainingDistanceH,
f=a.scrollTop+d.remainingDistanceV,f=void 0===c.v?f:c.v;c=void 0===c.h?e:c.h;if(f===a.scrollTop&&c===a.scrollLeft)d.mouseTimeEvent&&(clearTimeout(d.mouseTimeEvent),d.mouseTimeEvent=null);else{var d=Date.now(),e=a.scrollTop,g=a.scrollLeft;this._scrollFrame(a,d,d+b,{top:e,left:g},{v:f-e,h:c-g},{v:f,h:c})}},_scrollFrame:function(a,c,b,d,e,f){var g=this._targetDataMap[a],n=Date.now(),q=this._easeFunction(c,b,n),r=Math.round(d.top+e.v*q);a.scrollTop=r;g.remainingDistanceV=f.v-r;q=Math.round(d.left+e.h*
q);a.scrollLeft=q;g.remainingDistanceH=f.h-q;r=n>=b||Math.abs(a.scrollTop-r)>this._SCROLL_POSITION_THRESHOLD;n=n>=b||Math.abs(a.scrollLeft-q)>this._SCROLL_POSITION_THRESHOLD;r&&n?(clearTimeout(g.mouseTimeEvent),g.mouseTimeEvent=null,this._view.onScroll()):(a=this._scrollFrame.bind(this,a,c,b,d,e,f),null!==g.mouseTimeEvent&&clearTimeout(g.mouseTimeEvent),g.mouseTimeEvent=setTimeout(a,2))},_animateSetScrollTop:function(a){this._animateSmoothScroll(this._view.getDomtarget(),{v:a},this._SET_SCROLL_TOP_DURATION);
return[this._view.getDomtarget().scrollTop]},_animateSetScrollLeft:function(a){this._animateSmoothScroll(this._view.getDomtarget(),{h:a},this._SET_SCROLL_LEFT_DURATION);return[this._view.getDomtarget().scrollLeft]},_animateOffsetScrollTop:function(a){var c=this._view.getDomtarget();this._animateSmoothScroll(c,{v:c.scrollTop+this._targetDataMap[c].remainingDistanceV+a},this._SET_SCROLL_TOP_DURATION);return[0]},_animateOffsetScrollLeft:function(a){var c=this._view.getDomtarget();this._animateSmoothScroll(c,
{h:c.scrollLeft+this._targetDataMap[c].remainingDistanceH+a},this._SET_SCROLL_LEFT_DURATION);return[0]}})})},"MW/rtc/plugins/margin/TraditionalLineNumberMarginProvider":function(){define(["dojo/_base/declare","dojo/dom-attr","dojo/dom-class","MW/rtc/core/provider/PluginProvider","MW/rtc/margin/DecoratableLineMargin"],function(g,f,e,d,b){return g(d,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.view","rtc.internaldocument","rtc.focusservice","margin.linenumberdecorator"]}},
createInstance:function(a,c,d,g){a=new b(a,c,d,[g],300,null,null);e.add(a.getMarginElement(),"lineNumberMargin");f.set(a.getMarginElement(),"data-testid","lineNumberMargin");return a}})})},"MW/rtc/plugins/margin/EmptyWithSectionBreaksMarginProvider":function(){define(["dojo/dom-attr","dojo/dom-class","dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/margin/DecoratableLineMargin"],function(g,f,e,d,b){return e(d,{requires:function(){return{isApplicable:[],createInstance:"rtc.view rtc.internaldocument rtc.linenumberservice rtc.focusservice rtc.margin.sectionbreak rtc.view.decoration.margindecorator".split(" ")}},
createInstance:function(a,c,d,e,g,m){a=new b(a,c,e,[g,m],10,null,null);f.add(a.getMarginElement(),"whitespaceMargin");return a}})})},"MW/rtc/plugins/margin/MarginContainerProvider":function(){define(["dojo/_base/declare","dojo/dom-construct","MW/rtc/core/provider/PluginProvider","MW/rtc/margin/MarginContainer"],function(g,f,e,d){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.view","rtc.left.margin","rtc.featureinterface","rtc.focusservice"]}},
createInstance:function(b,a,c,e){return new d(b,a,c,e)}})})},"MW/rtc/margin/MarginContainer":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-class dojo/dom-construct dojo/dom-style dojo/on mw-log/Log MW/rtc/abstract/AbstractPlugin MW/rtc/events/MouseEventUtil MW/rtc/view/ViewEventUtilities MW/rtc/view/ViewUtilities".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p){return g(k,{MARGIN_SPACER:2,constructor:function(a,d,h,g){this._view=a;this.marginContainer=b.create("div",{"class":"leftMargin"});
this.lineMargin=b.create("div",{"class":"rteGutter"},this.marginContainer);this.lineMargin.setAttribute("tabIndex",-1);this.margins=d;this._focusService=g;this.margins.sort(this.marginPriorityComparator);this.own(e.after(a,"onViewUpdated",f.hitch(this,"_handleViewUpdated"),!0));this._getMargins().forEach(function(a){b.place(a.getMarginElement(),this.lineMargin);this.own(e.after(a,"onWidthChange",f.hitch(this,"updateWidth")));this.own(e.after(a,"onUpdate",f.hitch(this,"update")))},this);this.own(e.after(h,
"onEnableLineGutter",f.hitch(this,this.show,!0)));this.own(c(this.marginContainer,"mouseup",f.hitch(this,"_setFocus")));this.own(c(this.lineMargin,"focusin",f.hitch(this,"_setFocus")));l.redirectMouseScroll(this.lineMargin,a)},_setFocus:function(){this._focusService.setFocus()},_handleViewUpdated:function(a){0!==this.margins.length&&(m.hasVerticalScrollEvent(a)||m.hasSizingEvent(a)||m.hasLayoutEvent(a))&&this.update()},marginPriorityComparator:function(a,c){var b=c.priority()-a.priority();h.assert(0!==
b,"Duplicate priority of "+c.priority()+" found.");return b},onResize:function(){},show:function(){a.set(this.lineMargin,{display:"block"});this.lineMargin.hidden=!1},hide:function(){a.set(this.lineMargin,{display:"none"});this.lineMargin.hidden=!0},update:function(){var a=this._getMargins(),c=0,b=0,d;0<a.length&&(d=p.getZeroBasedVisibleLineNumbers(this._view));a.forEach(function(a){a.getMarginElement().style.left=c+"px";a.update(null,d);a=a.getWidth();c=c+a+this.MARGIN_SPACER;b=b+a+this.MARGIN_SPACER},
this);this._hasWidthChanged(this.marginContainer.style.width,c)&&(this.marginContainer.style.width=c+"px",this.lineMargin.style.width=b+"px",this._width=c,this.onResize())},updateWidth:function(){var a=0,c=0;this._getMargins().forEach(function(b){b.getMarginElement().style.left=a+"px";var d=b.getWidth();b=b.getHorizontalPadding();a=a+d+b;c=c+d+b},this);this._hasWidthChanged(this.marginContainer.style.width,a)&&(this.marginContainer.style.width=a+"px",this.lineMargin.style.width=c+"px",this._width=
a,this.onResize())},_hasWidthChanged:function(a,c){return!a||1E-4<Math.abs(parseFloat(a)-c)},getWidth:function(){return this._width||10},_getMargins:function(){return this.margins}})})},"MW/rtc/plugins/margin/RightMarginButtonProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./RightMarginButton"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.messagebar.rightmargincontainer"]}},createInstance:function(d){return new e(d)},
destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/margin/RightMarginButton":function(){define("dojo/_base/declare dojo/dom-construct dojo/dom-class dojo/dom-attr dojo/_base/lang dojo/aspect dojo/on dojo/touch MW/rtc/abstract/AbstractPlugin".split(" "),function(g,f,e,d,b,a,c,h,k){return g(k,{constructor:function(a){this._rightMarginContainer=a;this._tooltips={};this._buttons={};this._handles=[]},addButton:function(a,d,e,g){var k=f.create("div",{"class":a,"data-buttonname":a});this._rightMarginContainer.addLayer(k,
d,g);this._buttons[a]=k;this.own(c(this._buttons[a],"mouseover",b.hitch(this,"_generateTooltipMessage")));this.own(c(this._buttons[a],"mouseout",b.hitch(this._rightMarginContainer,"hideTooltip")));this.own(c(this._buttons[a],h.release,e))},setTooltipMessage:function(a,c){this._tooltips[a]=c},_generateTooltipMessage:function(a){var c=this._tooltips[a.target.dataset.buttonname];null!==c&&"undefined"!==typeof c&&this._rightMarginContainer.showTooltip(c,a.target)},modifyButton:function(a,c){e.remove(this._buttons[a]);
e.add(this._buttons[a],[a,c])},removeButton:function(a){this._rightMarginContainer.removeLayer(this._buttons[a])}})})},"MW/rtc/plugins/margin/RightMarginContainerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./RightMarginContainer"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.view","rtc.domnode","rtc.bordercontainer","rtc.focusservice"]}},createInstance:function(d,b,a,c){return new e(d,
b,a,c)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/margin/RightMarginContainer":function(){define("dijit/layout/ContentPane dijit/TooltipDialog dijit/popup dojo/_base/declare dojo/_base/lang dojo/aspect dojo/on dojo/touch dojo/dom-construct dojo/dom dojo/dom-attr dojo/dom-class MW/rtc/abstract/AbstractPlugin MW/uiframework/FocusManager".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p,n,q){return d(n,{_FIXED_LAYER_WIDTH:17,_RIGHT_MARGIN_TOOLTIP:"rightMarginTooltipHolder",_TOOLTIP_TIMER_LENGTH:200,
_MAX_PRIORITY:99,_LAYER_PRIORITY_PROPERTY:"rightMarginLayerPriority",_LAYER_HEIGHT_PROPERTY:"rightMarginLayerHeight",_TOP_REGION:"top",constructor:function(d,e,m,n,q){this._view=d;this._rtcDomNode=e;this._borderContainer=m;this._focusService=n;this._topStaticHeight=0;this._rightMarginContainer=new g({"class":"rightMarginContainer"});k.place(this._rightMarginContainer.domNode,this._rtcDomNode,"last");this._fixedLayerWidth=this._FIXED_LAYER_WIDTH+(q||0);this._borderContainer.domNode.style.width="calc(100% - "+
this._fixedLayerWidth+"px)";this.own(a.after(this._view,"onResize",b.hitch(this,"_handleViewResize")));this.own(c(this._rightMarginContainer,h.release,b.hitch(this,"_setFocus")));this._tooltipTimer=null;this._tooltipInfo={tooltipDialog:new f({"class":"rtcTooltip",onMouseDown:b.hitch(this,function(){clearTimeout(this._tooltipTimer);this._tooltipTimer=null}),onMouseEnter:b.hitch(this,function(){clearTimeout(this._tooltipTimer);this._tooltipTimer=null}),onMouseLeave:b.hitch(this,function(){this.hideTooltip()})}),
isTooltipOpen:!1};d=k.create("div",{"class":this._RIGHT_MARGIN_TOOLTIP});k.place(d,this._view.getDomtarget());(this._buttonPanel=l.byId("toggleButtonPanel"))&&p.add(this._buttonPanel,"buttonPanelShift")},_setFocus:function(){this._focusService.setFocus()},showTooltip:function(a,c){this._tooltipTimer&&(clearTimeout(this._tooltipTimer),this._tooltipTimer=null);var d=this._tooltipInfo.tooltipDialog;this._tooltipInfo={tooltipDialog:d,isTooltipOpen:!0};this._tooltipInfo.tooltipDialog.set("content",a);
this._tooltipInfo.tooltipDialog.set("data-testid","rightMarginTooltip_visible");q.refuseFocus(d.domNode);a&&a.domNode&&a.domNode.addEventListener("onResized",b.hitch(this,"_repositionTooltip"));this._popupInfo={popup:d,around:c,orient:["before-centered","before"],onCancel:b.hitch(this,"hideTooltip"),onExecute:b.hitch(this,"hideTooltip"),onMouseOver:b.hitch(this,function(){clearTimeout(this._tooltipTimer);this._tooltipTimer=null})};e.open(this._popupInfo)},_repositionTooltip:function(){if(this._popupInfo){var a=
this._tooltipInfo.tooltipDialog.domNode.parentNode,c=a.getBoundingClientRect().left;e.open(this._popupInfo);a.style.overflowY="visible";a.style.left=c+"px"}},hideTooltip:function(){this._tooltipInfo.isTooltipOpen&&(this._tooltipInfo.tooltipDialog.set("data-testid","rightMarginTooltip_hidden"),e.close(this._tooltipInfo.tooltipDialog),this._tooltipInfo.isTooltipOpen=!1,clearTimeout(this._tooltipTimer),this._popupInfo=this._tooltipTimer=null)},timeoutTooltip:function(){null===this._tooltipTimer&&(this._tooltipTimer=
setTimeout(b.hitch(this,function(a){this.hideTooltip()}),this._TOOLTIP_TIMER_LENGTH))},addLayer:function(a,c,b){m.set(a,this._LAYER_PRIORITY_PROPERTY,c);m.set(a,this._LAYER_HEIGHT_PROPERTY,b);k.place(a,this._rightMarginContainer.domNode,this._getPositionBasedOnPriority(c));this._addTopStaticHeight(b)},addOverlayLayer:function(a){this._overlayLayer=a;k.place(a,this._rightMarginContainer.domNode,this._getPositionBasedOnPriority(this._MAX_PRIORITY))},removeLayer:function(a){var c=m.get(a,this._LAYER_HEIGHT_PROPERTY);
k.destroy(a);this._addTopStaticHeight(-1*c)},removeOverlayLayer:function(){k.destroy(this._overlayLayer);this._overlayLayer=null},_addTopStaticHeight:function(a){this._topStaticHeight+=a;this._overlayLayer&&(this._overlayLayer.style.top=this._topStaticHeight+"px",this._overlayLayer.style.height="calc(100% - "+this._topStaticHeight+"px)");this.onStaticHeightChanged()},onStaticHeightChanged:function(){},getTopStaticHeight:function(){return this._topStaticHeight},_getPositionBasedOnPriority:function(a){for(var c=
0,b=0;b<this._rightMarginContainer.domNode.children.length;b+=1)m.get(this._rightMarginContainer.domNode.children[b],this._LAYER_PRIORITY_PROPERTY)<=a&&(c+=1);return c},_handleViewResize:function(){var a=this._borderContainer.getChildInRegion(this._TOP_REGION),c=(a?this._borderContainer.getFreeDimension(this._TOP_REGION):0)+"px";this._rightMarginContainer.domNode.style.top=c;this._rightMarginContainer.domNode.style.height="calc(100% - "+c+")";a&&(a.domNode.style.width="100%")},destroy:function(){this.inherited(arguments);
this._buttonPanel&&p.remove(this._buttonPanel,"buttonPanelShift")}})})},"MW/rtc/plugins/margin/SeverityStatusButtonProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./SeverityStatusButton"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.margin.button","rtc.code.codeanalyzermodel","rtc.code.codeanalyzerpreferences","rtc.cursor","rtc.focusservice"]}},createInstance:function(d,b,a,c,
f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/margin/SeverityStatusButton":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","dojo/i18n!l10n/nls/messagebar","MW/rtc/abstract/AbstractPlugin"],function(g,f,e,d,b){return g(b,{_SEVERITY_STATUS_BUTTON:"severityStatusButton",_CLEAR:"statusClear",_ERROR:"statusError",_WARNING:"statusWarning",_BUSY:"statusBusy",_STATIC_HEIGHT:17,_SEVERITY_LEVEL_NONE:0,_SEVERITY_LEVEL_WARNING:1,_BUTTON_POSITION_PRIORITY:2,_SEVERITY_LEVEL_ERROR:2,_TIMER_LENGTH:900,
constructor:function(a,c,b,g,l,m){this._messageBarButtonView=a;this._codeAnalyzerModel=c;this._codeAnalyzerPreferences=b;this._cursor=g;this._focusService=l;this._timer=null;this._severity=0;this._staticHeight=this._STATIC_HEIGHT+(m||0);this._messagePositions=[];this._messageBarButtonView.addButton(this._SEVERITY_STATUS_BUTTON,this._BUTTON_POSITION_PRIORITY,f.hitch(this,"_buttonClick"),this._staticHeight);this._messageBarButtonView.setTooltipMessage(this._SEVERITY_STATUS_BUTTON,d.noMessages);this.own(e.after(this._codeAnalyzerModel,
"onModelChange",f.hitch(this,"_updateMarkerPositions")));this.own(e.after(this._codeAnalyzerPreferences,"onDisplayPreferenceChange",f.hitch(this,"_updateMarkerPositionsAfterPreferenceChange"),!0))},_buttonClick:function(){this._focusService.setFocus();if(0!==this._messagePositions.length){var a=this._getNextCursorPosition(this._cursor.getPosition(),this._messagePositions);this._cursor.setLineColumn(a.line,a.column,!0)}},_getNextCursorPosition:function(a,c){var b=a.line+1,d=a.column+1,e=c.length;if(b>
c[e-1].line||b===c[e-1].line&&d>=c[e-1].column)return c[0];for(var f=0;f<e;f++)if(c[f].line>b||c[f].line===b&&c[f].column>d)return c[f];return c[e-1]},_updateMarkerPositions:function(){this._codeAnalyzerPreferences.isDisplayEnabled()&&(this._clearTimeout(),this._timer=setTimeout(f.hitch(this,function(a){this._severity=this._SEVERITY_LEVEL_NONE;var c=[],b=[];this._codeAnalyzerModel.getAllMessages().forEach(function(a){var d={line:a.range.start.row+1,column:a.range.start.column+1};2<=a.severity?(this._severity=
this._SEVERITY_LEVEL_ERROR,b.push(d)):this._severity<=this._SEVERITY_LEVEL_WARNING&&(this._severity=this._SEVERITY_LEVEL_WARNING,c.push(d))},this);switch(this._severity){case this._SEVERITY_LEVEL_NONE:this._messageBarButtonView.modifyButton(this._SEVERITY_STATUS_BUTTON,this._CLEAR);this._messageBarButtonView.setTooltipMessage(this._SEVERITY_STATUS_BUTTON,d.noMessages);this._messagePositions=[];break;case this._SEVERITY_LEVEL_WARNING:1<c.length?(this._messageBarButtonView.modifyButton(this._SEVERITY_STATUS_BUTTON,
this._WARNING),this._messageBarButtonView.setTooltipMessage(this._SEVERITY_STATUS_BUTTON,d.warningsFound)):(this._messageBarButtonView.modifyButton(this._SEVERITY_STATUS_BUTTON,this._WARNING),this._messageBarButtonView.setTooltipMessage(this._SEVERITY_STATUS_BUTTON,d.warningFound));this._messagePositions=c;break;case this._SEVERITY_LEVEL_ERROR:1<b.length?(this._messageBarButtonView.modifyButton(this._SEVERITY_STATUS_BUTTON,this._ERROR),this._messageBarButtonView.setTooltipMessage(this._SEVERITY_STATUS_BUTTON,
d.errorsFound)):(this._messageBarButtonView.modifyButton(this._SEVERITY_STATUS_BUTTON,this._ERROR),this._messageBarButtonView.setTooltipMessage(this._SEVERITY_STATUS_BUTTON,d.errorFound)),this._messagePositions=b}}),this._TIMER_LENGTH))},_updateMarkerPositionsAfterPreferenceChange:function(a){this._clearTimeout();a?this._updateMarkerPositions():(this._messageBarButtonView.modifyButton(this._SEVERITY_STATUS_BUTTON,this._CLEAR),this._messageBarButtonView.setTooltipMessage(this._SEVERITY_STATUS_BUTTON,
d.noMessages),this._messagePositions=[])},_clearTimeout:function(){this._timer&&(this._messageBarButtonView.modifyButton(this._SEVERITY_STATUS_BUTTON,this._BUSY),clearTimeout(this._timer))},destroy:function(){this.inherited(arguments);this._messageBarButtonView.removeButton(this._SEVERITY_STATUS_BUTTON)}})})},"MW/rtc/plugins/messagebar/MessageBarModelProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./MessageBarModel"],function(g,f,e){return g(f,{isApplicable:function(){return!0},
requires:function(){return{isApplicable:[],createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/messagebar/MessageBarModel":function(){define(["dojo/_base/declare","dojo/_base/lang"],function(g,f){return g([],{constructor:function(){this._layers={}},hideMessagesOnLine:function(e){for(var d in this._layers)if(this._layers.hasOwnProperty(d)){var b=this._layers[d].messageAtLine[e];if("undefined"!==typeof b){this._getMessage(b,d).visible=!1;this.onMessageHidden(d,b);break}}},
addLayer:function(e){this._layers[e.name]=e;this.onLayerAdded(e.name)},getMessagesForLayer:function(e){return this._layers[e]?this._layers[e].messages:null},resetLayer:function(e){this._layers[e].messages={};this._layers[e].messageAtLine={};this.onLayerReset(e)},getTooltip:function(e,d){return this._getMessage(e,d).tooltip},_getMessage:function(e,d){return this._layers[d].messages[e]},getPositionInfo:function(e,d){var b=this._getMessage(d,e);return{line:b.line,column:b.column}},addMessage:function(e,
d,b){this._layers[e].messages[d]=b;this._layers[e].messageAtLine[b.line]=d},onMessageHidden:function(e,d){},onLayerAdded:function(e){},onLayerUpdate:function(e){},onLayerReset:function(e){}})})},"MW/rtc/plugins/messagebar/MessageBarServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./MessageBarService"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.messagebar.view","rtc.messagebar.model",
"messagebarlayer"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/messagebar/MessageBarService":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","mw-utils/Utils","MW/rtc/abstract/AbstractPlugin"],function(g,f,e,d,b){return g(b,{constructor:function(a,c,b){this._messageBarView=a;this._messageBarModel=c;this._messageBarLayers=b;for(a=0;a<this._messageBarLayers.length;a++)this._initializeLayer(this._messageBarLayers[a].getLayerName()),this.own(e.after(this._messageBarLayers[a],
"addMessage",f.hitch(this,"_handleAddMessage"),!0),e.after(this._messageBarLayers[a],"clearLayer",f.hitch(this,"_handleClearLayer"),!0),e.after(this._messageBarLayers[a],"updateLayer",f.hitch(this,"_handleUpdateLayer"),!0),e.after(this._messageBarLayers[a],"onTooltipClose",f.hitch(this,"_handleTooltipClose")))},_handleAddMessage:function(a,c,b,e,f,g){var p=d.generateUuid();c={style:c,tooltip:b,highPriority:e,visible:!0};e&&this._messageBarModel.hideMessagesOnLine(f);c.line=f;c.column=g;this._messageBarModel.addMessage(a,
p,c)},_handleUpdateLayer:function(a){this._messageBarModel.onLayerUpdate(a)},_initializeLayer:function(a){this._messageBarModel.addLayer({name:a,messages:{},messageAtLine:{}})},_handleClearLayer:function(a){this._messageBarModel.resetLayer(a)},_handleTooltipClose:function(){this._messageBarView.triggerTooltipClose()}})})},"MW/rtc/plugins/messagebar/MessageBarViewProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./MessageBarView"],function(g,f,e){return g(f,{isApplicable:function(){return!0},
requires:function(){return{isApplicable:[],createInstance:["rtc.cursor","rtc.internaldocument","rtc.messagebar.model","rtc.messagebar.rightmargincontainer","rtc.view"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/messagebar/MessageBarView":function(){define("dojo/_base/declare dojo/dom-construct dojo/dom-class dojo/dom-attr dojo/_base/lang dojo/aspect dojo/on dojo/touch mw-log/Log MW/rtc/abstract/AbstractPlugin MW/rtc/model/DocumentUtilities MW/rtc/view/ViewEventUtilities MW/rtc/view/ViewUtilities".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){return g(l,{_MESSAGE_BAR_TITLE:"messageBar",_VERTICAL_OFFSET_PX:4,constructor:function(c,d,e,h,g){this._cursor=c;this._internalDocument=d;this._messageBarModel=e;this._rightMarginContainer=h;this._view=g;this._layerNodes={};this._markerNodes={};this._messageBar=f.create("div",{"class":this._MESSAGE_BAR_TITLE});this.own(a.after(this._messageBarModel,"onMessageHidden",b.hitch(this,"_removeMarker"),!0),a.after(this._messageBarModel,"onLayerAdded",b.hitch(this,"_createLayer"),
!0),a.after(this._messageBarModel,"onLayerUpdate",b.hitch(this,"_updateLayer"),!0),a.after(this._messageBarModel,"onLayerReset",b.hitch(this,"_resetLayer"),!0),a.after(this._view,"onViewUpdated",b.hitch(this,"_handleViewUpdated"),!0),a.after(this._rightMarginContainer,"onStaticHeightChanged",b.hitch(this,"_updateAllLayers")));this._rightMarginContainer.addOverlayLayer(this._messageBar)},_handleViewUpdated:function(a){p.hasDocumentChangeSource(a)||(p.hasHeightEvent(a)||!this._view.canScroll()&&p.hasLayoutEvent(a))&&
this._updateAllLayers()},triggerTooltipClose:function(){this._rightMarginContainer.hideTooltip()},_updateLayer:function(a){var c=this._messageBarModel.getMessagesForLayer(a);this._resetLayer(a);var b=document.createDocumentFragment(),d;for(d in c)c.hasOwnProperty(d)&&(c[d].id=d,this._drawMessage(b,a,c[d]));this._layerNodes[a].appendChild(b)},_updateAllLayers:function(){for(var a in this._layerNodes)this._layerNodes.hasOwnProperty(a)&&this._updateLayer(a)},_generateTooltipMessage:function(a){if(a.target.dataset.messageid)var c=
this._messageBarModel.getTooltip(a.target.dataset.messageid,a.target.dataset.layer);null!==c&&"undefined"!==typeof c&&("string"===typeof c?this._rightMarginContainer.showTooltip(c,a.target):this._rightMarginContainer.showTooltip(c(),a.target))},_markerClick:function(a){a=this._messageBarModel.getPositionInfo(a.target.dataset.layer,a.target.dataset.messageid);try{this._cursor.setLineColumn(a.line,a.column,!1),this._view.scrollLineToPercent(a.line,50)}catch(c){}},_removeMarker:function(a,c){f.destroy(this._markerNodes[a][c]);
this._markerNodes[a][c]=null},_drawMessage:function(a,c,b){if(this._checkLineIsValid(b.line)){var d=this._getMarkerPositionStyle(b.line);a=f.create("div",{"class":"messageMarker",style:d,"data-messageid":b.id,"data-testid":b.style,"data-layer":c},a,b.highPriority?"last":"first");this._markerNodes[c][b.id]=f.create("div",{"class":b.style},a)}},_getMarkerPositionStyle:function(a){a=this._view.getNearestVisibleLineTop(a,!0);return"top: "+(this._view.canScroll()?this._getRelativeMarkerPosition(a)+"%":
this._getInlineMarkerPosition(a)+"px")},_getRelativeMarkerPosition:function(a){return 100*(a/this._view.getScrollHeight())},_getInlineMarkerPosition:function(a){var c=this._rightMarginContainer.getTopStaticHeight();return Math.max(0,a-c+this._VERTICAL_OFFSET_PX)},_resetLayer:function(a){this._layerNodes[a]&&(f.empty(this._layerNodes[a]),this._markerNodes[a]={})},_createLayer:function(a){var d=f.create("div",{"class":a});this._layerNodes[a]=f.place(d,this._messageBar);this._markerNodes[a]={};this.own(c(this._layerNodes[a],
h.release,b.hitch(this,"_markerClick")),c(this._layerNodes[a],"mouseover",b.hitch(this,"_generateTooltipMessage")),c(this._layerNodes[a],"mouseout",b.hitch(this._rightMarginContainer,"timeoutTooltip")))},_checkLineIsValid:function(a){return m.checkLineColumnIsValid(this._internalDocument,a-1,0)},destroy:function(){this._rightMarginContainer.removeOverlayLayer()}})})},"MW/rtc/plugins/nodeconversionrules/NodeConversionRulesServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"./NodeConversionRulesService"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.nodeconversionrule"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/nodeconversionrules/NodeConversionRulesService":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractRecursiveConverterPlugin"],function(g,f){return g(f,{constructor:function(e){this._initializeRecursiveConverter(e)},isNodeConvertibleTo:function(e,d){var b=this._getConverter(e),a=this._getConverterByConstructor(d);
return b.isConvertibleTo(d)&&a.isConvertibleFrom(e)}})})},"MW/rtc/plugins/offscreennotification/OffscreenNotificationProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./OffscreenNotification"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cursor","rtc.view","rtc.scrollpane"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/offscreennotification/OffscreenNotification":function(){define("dojo/_base/declare mw-log/Log MW/rtc/abstract/AbstractPlugin MW/rtc/model/Position MW/rtc/model/Range ./OffscreenNotificationAlignment ./OffscreenNotificationUtils ./view/OffscreenNotificationView".split(" "),
function(g,f,e,d,b,a,c,h){return g(e,{_DEFAULT_HORIZONTAL_ALIGNMENT:c.HORIZONTAL_POSITION.CENTER,_DEFAULT_VERTICAL_ALIGNMENT:c.VERTICAL_POSITION.TOP,_DEFAULT_CUSTOM_X:0,_DEFAULT_CUSTOM_Y:0,_DEFAULT_LINE_OFFSET:0,_DEFAULT_COLUMN_OFFSET:0,constructor:function(a,c,b){this._cursor=a;this._view=c;this._offscreenNotificationView=new h(c,b)},displayOffscreenNotificationForString:function(a,c,b,d){return this._displayOffscreenNotification(a,c,b,d,this._offscreenNotificationView.displayNotificationForString)},
displayOffscreenNotificationForDomNode:function(a,c,b,d){return this._displayOffscreenNotification(a,c,b,d,this._offscreenNotificationView.displayNotificationForDomNode)},removeOffscreenNotification:function(a){this._offscreenNotificationView.removeNotification(a)},_displayOffscreenNotification:function(c,e,h,g,n){f.assert(c instanceof d||c instanceof b,"Expected first argument to be either a Position or a Range");c=this._getRangeFromInput(c);h=h||new a;return this._isRangeInView(c)?null:n.call(this._offscreenNotificationView,
c,e,h,g)},_getRangeFromInput:function(a){return a instanceof d?new b(a,a):a},_isRangeInView:function(a){return this._view.isPositionInView(a.getStartPosition(),!0)&&this._view.isPositionInView(a.getEndPosition(),!0)},_removeAllOffscreenNotifications:function(){this._offscreenNotificationView.removeAllNotifications()},destroy:function(){this.inherited(arguments);this._removeAllOffscreenNotifications();this._offscreenNotificationView.destroy()}})})},"MW/rtc/plugins/offscreennotification/view/OffscreenNotificationView":function(){define(["dojo/_base/declare",
"dojo/dom-construct","mw-log/Log","./OffscreenNotificationPopup"],function(g,f,e,d){return g(null,{_NOTIFICATION_ID_COUNTER:1,constructor:function(b,a){this._view=b;this._scrollPane=a;this._allNotifications={}},displayNotificationForString:function(b,a,c,d){a=f.create("div",{innerHTML:a},null);return this.displayNotificationForDomNode(b,a,c,d)},displayNotificationForDomNode:function(b,a,c,e){var f=this._scrollPane.parentElement;if(!f)return null;b=new d(b,a,c,e,this._view,f);b.forceUpdate();a=this._NOTIFICATION_ID_COUNTER;
this._allNotifications[a]={notification:b};this._NOTIFICATION_ID_COUNTER++;return a},removeNotification:function(b){this._removeNotification(b);delete this._allNotifications[b]},removeAllNotifications:function(){Object.keys(this._allNotifications).forEach(function(b){this._removeNotification(this._allNotifications[b])});this._allNotifications={}},_removeNotification:function(b){e.assert("number"===typeof b,"Expected notification ID to be a valid ID");e.assert(this._allNotifications[b],"ID provided does not match an existing notification");
this._allNotifications[b].notification.destroy()},destroy:function(){this.removeAllNotifications()}})})},"MW/rtc/plugins/offscreennotification/view/OffscreenNotificationPopup":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-attr dojo/dom-construct dojo/dom-style mw-log/Log MW/rtc/view/ViewEventUtilities ../OffscreenNotificationUtils".split(" "),function(g,f,e,d,b,a,c,h,k){return g(null,{_OFFSCREEN_NOTIFICATION:"offscreenNotification",constructor:function(a,c,d,f,h,g){this._range=
a;this._alignment=d;this._view=h;this._scrollParent=g;d.horizontalAlignment===k.HORIZONTAL_POSITION.NEAREST&&(this._characterWidth=h.getCharacterWidthForLine(a.getStartPosition().getLine()));this.notificationDomNode=this._createNotification(c,f);this._aspectHandles=[];this._aspectHandles.push(e.after(h,"onViewUpdated",this._handleViewUpdated.bind(this),!0));this._setTestId();b.place(this.notificationDomNode,g);this._updatePosition()},forceUpdate:function(){this._updatePosition()},_createNotification:function(a,
c){var d=b.create("div",{"class":this._OFFSCREEN_NOTIFICATION},null);b.place(a,d);this._setCss(d,c);return d},_setCss:function(a,c){c&&Object.keys(c).forEach(function(b){a.style[b]=c[b]})},_handleViewUpdated:function(a){h.hasScrollEvent(a)&&!h.hasSizingEvent(a)&&this._updatePosition()},_updatePosition:function(){var a=this._getHorizontalPositioning(),c=this._getVerticalPositioning();this._setCss(this.notificationDomNode,a);this._setCss(this.notificationDomNode,c)},_getHorizontalPositioning:function(){var b=
{left:"auto",right:"auto"};switch(this._alignment.horizontalAlignment){case k.HORIZONTAL_POSITION.LEFT:b.left=this._alignment.xOffset+"px";break;case k.HORIZONTAL_POSITION.RIGHT:if(this._view.getScrollWidth()===this._view.getClientWidth())b.right=-this._alignment.xOffset+"px";else{var d=this._scrollParent.clientWidth-this._view.getClientWidth();b.right=d-this._alignment.xOffset+"px"}break;case k.HORIZONTAL_POSITION.CENTER:d=parseInt(a.getComputedStyle(this.notificationDomNode).width);b.left=(this._view.getClientWidth()-
d)/2+this._alignment.xOffset+"px";break;case k.HORIZONTAL_POSITION.NEAREST:d=this._getNearestHorizontalPosition();b.left=d+this._alignment.xOffset+"px";break;case k.HORIZONTAL_POSITION.CUSTOM:b.left=this._alignment.x+this._alignment.xOffset+"px";break;default:c.assert(!1,"Invalid horizontal alignment provided: "+this._alignment.horizontalAlignment)}return b},_getNearestHorizontalPosition:function(){var c=parseInt(a.getComputedStyle(this.notificationDomNode).width),c=this._view.getClientWidth()-c,
b=this._view.getCoordinateForPosition(this._range.getStartPosition()).x-this._view.getScrollLeft()+this._alignment.columnOffset*this._characterWidth,d=b;b>c?d=c:0>b&&(d=0);return d},_getVerticalPositioning:function(){var b={top:"auto",bottom:"auto"};switch(this._alignment.verticalAlignment){case k.VERTICAL_POSITION.TOP:b.top=this._alignment.yOffset+"px";break;case k.VERTICAL_POSITION.BOTTOM:if(this._view.getScrollHeight()===this._view.getClientHeight())b.bottom=-this._alignment.yOffset+"px";else{var d=
this._scrollParent.clientHeight-this._view.getClientHeight();b.bottom=d-this._alignment.yOffset+"px"}break;case k.VERTICAL_POSITION.CENTER:d=parseInt(a.getComputedStyle(this.notificationDomNode).height);b.top=(this._view.getClientHeight()-d)/2+this._alignment.yOffset+"px";break;case k.VERTICAL_POSITION.NEAREST:d=this._getNearestVerticalPosition();b.top=d+this._alignment.yOffset+"px";break;case k.VERTICAL_POSITION.CUSTOM:b.top=this._alignment.y+this._alignment.yOffset+"px";break;default:c.assert(!1,
"Invalid vertical alignment provided: "+this._alignment.verticalAlignment)}return b},_getNearestVerticalPosition:function(){var c=parseInt(a.getComputedStyle(this.notificationDomNode).height),c=this._view.getClientHeight()-c,b=this._range.getStartPosition(),d=this._view.getCoordinateForPosition(b).y-this._view.getScrollTop(),b=this._view.getLineHeight(b.getLine()),b=d+=this._alignment.lineOffset*b;d>c?b=c:0>d&&(b=0);return b},_setTestId:function(){var a=null,b=null;switch(this._alignment.horizontalAlignment){case k.HORIZONTAL_POSITION.LEFT:a=
"left";break;case k.HORIZONTAL_POSITION.RIGHT:a="right";break;case k.HORIZONTAL_POSITION.CENTER:a="center";break;case k.HORIZONTAL_POSITION.NEAREST:a=this._alignment.columnOffset;a="nearest("+(0<=a?"+":"")+a+")";break;case k.HORIZONTAL_POSITION.CUSTOM:a=this._alignment.x;a="custom("+(0<=a?"+":"")+a+")";break;default:c.assert(!1,"Invalid horizontal alignment provided: "+this._alignment.horizontalAlignment)}var e=this._alignment.xOffset,a=a+((0<=e?"+":"")+e+"x");switch(this._alignment.verticalAlignment){case k.VERTICAL_POSITION.TOP:b=
"top";break;case k.VERTICAL_POSITION.BOTTOM:b="bottom";break;case k.VERTICAL_POSITION.CENTER:b="center";break;case k.VERTICAL_POSITION.NEAREST:b=this._alignment.lineOffset;b="nearest("+(0<=b?"+":"")+b+")";break;case k.VERTICAL_POSITION.CUSTOM:b=this._alignment.y;b="custom("+(0<=b?"+":"")+b+")";break;default:c.assert(!1,"Invalid vertical alignment provided: "+this._alignment.verticalAlignment)}e=this._alignment.yOffset;d.set(this.notificationDomNode,"data-testid","offscreenNotification_"+a+"_"+(b+
((0<=e?"+":"")+e+"y")))},destroy:function(){this._aspectHandles.forEach(function(a){a.remove()});b.destroy(this.notificationDomNode)}})})},"MW/rtc/plugins/richtext/RichTextProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/richtext/RichText","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{requires:function(){return{createInstance:"rtc.document rtc.internaldocument rtc.cursor rtc.actionservice rtc.indentutilities rtc.nodeconversionrulesservice".split(" ")}},createInstance:function(d,
b,a,c,e,g){return new f(d,b,a,c,e,g)}})})},"MW/rtc/plugins/richtext/RichText":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/model/CodeUtilities MW/rtc/model/DocumentUtilities MW/rtc/model/NodeUtilities MW/rtc/model/Position MW/rtc/model/PositionUtilities MW/rtc/model/events/DocumentEvent MW/rtc/model/events/NumberOfLinesChangedEvent MW/rtc/model/events/FormatChangeEvent MW/rtc/model/DocumentEventUtilities MW/rtc/RichTextComponentFeatureEnum MW/rtc/plugins/nodeconversionrules/NodeConversionRulesUtilities MW/rtc/plugins/richtext/HeadingUtilities MW/rtc/plugins/richtext/ParagraphFormatsEnum ./nodes/inner/HeadingNode ./nodes/inner/RichTextParagraphNode ./nodes/leaf/RichTextNode ./RichTextUtilities dojo/i18n!l10n/nls/actions".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x,y){return g(d,{_SET_ALIGN:"_setAlign",_LEFT:"left",_CENTER:"center",_RIGHT:"right",constructor:function(a,c,b,d,h,g){this._document=a;this._internalDocument=c;this._cursor=b;this._actionService=d;this._indentUtilities=h;this._nodeConversionRules=g;this.own(e.after(this._cursor,"onChange",f.hitch(this,"_onCursorChange")));this.own(e.around(this._document,"insertBreak",f.hitch(this,"_aroundInsertBreak")));this.own(e.after(this._actionService,"onActionChange",
f.hitch(this,"_onActionChange"),!0));this.own(e.after(this._document,"onPreInsertText",f.hitch(this,"_createStyledContentFromText"),!0));a=[{name:t.NORMAL,method:f.hitch(this,"formatTemplate",t.NORMAL)},{name:t.TITLE,method:f.hitch(this,"formatTemplate",t.TITLE)},{name:t.HEADING1,method:f.hitch(this,"formatTemplate",t.HEADING1)},{name:t.HEADING2,method:f.hitch(this,"formatTemplate",t.HEADING2)},{name:t.HEADING3,method:f.hitch(this,"formatTemplate",t.HEADING3)}];c.registerFormatTemplates(a);d.loadActions(this._actions())},
_onCursorChange:function(a){this._checkPendingStyle();this._updateActions()},_onActionChange:function(a){if("selected"===a.key)switch(a.id){case q.RICH_TEXT.TOGGLE_BOLD_ACTION:var c=this.getFormatAndStyle();a.newValue!==c.bold&&this._toggleBold();break;case q.RICH_TEXT.TOGGLE_ITALIC_ACTION:c=this.getFormatAndStyle();a.newValue!==c.italic&&this._toggleItalic();break;case q.RICH_TEXT.TOGGLE_UNDERLINE_ACTION:c=this.getFormatAndStyle();a.newValue!==c.underline&&this._toggleUnderline();break;case q.RICH_TEXT.TOGGLE_MONOSPACE_ACTION:c=
this.getFormatAndStyle();a.newValue!==c.monospace&&this._toggleMonospace();break;case q.RICH_TEXT.ALIGNMENT_LEFT_ACTION:a.newValue&&!this._isAlignTo(this._LEFT)&&this._setAlign(this._LEFT);break;case q.RICH_TEXT.ALIGNMENT_CENTER_ACTION:a.newValue&&!this._isAlignTo(this._CENTER)&&this._setAlign(this._CENTER);break;case q.RICH_TEXT.ALIGNMENT_RIGHT_ACTION:a.newValue&&!this._isAlignTo(this._RIGHT)&&this._setAlign(this._RIGHT)}},formatTemplate:function(a){var c={};a===t.NORMAL?c.container=new v([]):x.isRichTextParagraphFormat(a)&&
(a=s.getLevelByHeadingFormat(a),c.container=new u([],{level:a}));return c},_actions:function(){return[{id:"rtc_bold_on",enabled:!1,callback:f.hitch(this,"_setStyle","bold",!0)},{id:"rtc_bold_off",enabled:!1,callback:f.hitch(this,"_setStyle","bold",!1)},{id:q.RICH_TEXT.TOGGLE_BOLD_ACTION,enabled:!1,selected:!1,key:"ctrl_b",platformKey:{mac:"meta_b"},callback:f.hitch(this,"_toggleBold")},{id:"rtc_italic_on",enabled:!1,callback:f.hitch(this,"_setStyle","italic",!0)},{id:"rtc_italic_off",enabled:!1,callback:f.hitch(this,
"_setStyle","italic",!1)},{id:q.RICH_TEXT.TOGGLE_ITALIC_ACTION,enabled:!1,selected:!1,callback:f.hitch(this,"_toggleItalic")},{id:"rtc_smart_indent_or_italic",enabled:!1,selected:!1,key:"ctrl_i",platformKey:{mac:"meta_i"},callback:f.hitch(this,"_smartIndentOrItalic")},{id:"rtc_underline_on",enabled:!1,callback:f.hitch(this,"_setStyle","underline",!0)},{id:"rtc_underline_off",enabled:!1,callback:f.hitch(this,"_setStyle","underline",!1)},{id:q.RICH_TEXT.TOGGLE_UNDERLINE_ACTION,enabled:!1,selected:!1,
key:"ctrl_u",platformKey:{mac:"meta_u"},callback:f.hitch(this,"_toggleUnderline")},{id:"rtc_monospace_on",enabled:!1,callback:f.hitch(this,"_setStyle","monospace",!0)},{id:"rtc_monospace_off",enabled:!1,callback:f.hitch(this,"_setStyle","monospace",!1)},{id:q.RICH_TEXT.TOGGLE_MONOSPACE_ACTION,enabled:!1,selected:!1,key:"ctrl_m",platformKey:{mac:"ctrl_m"},callback:f.hitch(this,"_toggleMonospace")},{id:q.RICH_TEXT.PARAGRAPH_FORMAT_CODE_ACTION,enabled:!1,selected:!1,callback:f.hitch(this,"_setTextFormat",
"code")},{id:q.RICH_TEXT.PARAGRAPH_FORMAT_TEXT_ACTION,enabled:!1,selected:!1,callback:f.hitch(this,"_setTextFormat",t.NORMAL)},{id:q.RICH_TEXT.PARAGRAPH_FORMAT_HEADING1_ACTION,enabled:!1,selected:!1,callback:f.hitch(this,"_setTextFormat",t.HEADING1)},{id:q.RICH_TEXT.PARAGRAPH_FORMAT_HEADING2_ACTION,enabled:!1,selected:!1,callback:f.hitch(this,"_setTextFormat",t.HEADING2)},{id:q.RICH_TEXT.PARAGRAPH_FORMAT_HEADING3_ACTION,enabled:!1,selected:!1,callback:f.hitch(this,"_setTextFormat",t.HEADING3)},{id:q.RICH_TEXT.PARAGRAPH_FORMAT_TITLE_ACTION,
enabled:!1,selected:!1,callback:f.hitch(this,"_setTextFormat",t.TITLE)},{id:"rtc_insert_break_and_toggle",enabled:!1,callback:f.hitch(this,"_insertBreakAndToggleCode")},{id:q.RICH_TEXT.TOGGLE_CODE_AND_TEXT_ACTION,text:y.toggleCodeText,enabled:!this._isReadOnly(),callback:f.hitch(this,"_toggleCodeAndText")},{id:"rtc_richtext_tab_insert",key:"tab",callback:f.hitch(this,"_insertTab")},{id:"rtc_richtext_shift_tab_insert",key:"shift_tab",callback:f.hitch(this,"_insertTab",!0)},{id:q.RICH_TEXT.ALIGNMENT_LEFT_ACTION,
enabled:!1,selected:!1,callback:f.hitch(this,this._SET_ALIGN,this._LEFT)},{id:q.RICH_TEXT.ALIGNMENT_CENTER_ACTION,enabled:!1,selected:!1,callback:f.hitch(this,this._SET_ALIGN,this._CENTER)},{id:q.RICH_TEXT.ALIGNMENT_RIGHT_ACTION,enabled:!1,selected:!1,callback:f.hitch(this,this._SET_ALIGN,this._RIGHT)}]},_setAlign:function(a){for(var c=this._document.startEdit(),b=this._cursor.selectionInfo(),d=b.startNode,b=this._cursor.adjustSelection(b,!0),b=b.endNode,e=b.textContainer();e;){e instanceof v&&this._internalDocument.changeNodeAttributes(e,
{align:a});if(e===d.textContainer())break;e=e.prevNode().textContainer()}a=this._internalDocument.getLineNumber(d.rootContainer());d=this._internalDocument.getLineNumber(b.rootContainer());a=[l.create(a,d)];this._internalDocument.emitDocumentEvents(a);this._cursor.onUpdate();c.appendUndoEvents(a);c.appendRedoEvents(a);this._document.endEdit();this._updateActions()},_setTextFormat:function(a){x.hasRichText(this._cursor)&&r.textContainersInCursorConvertibleTo(this._cursor,v,this._nodeConversionRules)&&
this._setParagraphFormat(a)},_setPendingStyleChange:function(a,c){this._pendingStyleChange||(this._pendingStyleChange={});a?(this._pendingStyleChange[a]=c,this._lastPendingStylePosition=this._cursor.getLineColumn()):this._resetPendingStyleChange()},_checkPendingStyle:function(){var a=this._cursor.getLineColumn();(!this._lastPendingStylePosition||!(this._lastPendingStylePosition.line===a.line&&this._lastPendingStylePosition.column===a.column))&&this._resetPendingStyleChange()},_aroundInsertBreak:function(a){var c=
this._document,b=this._cursor,d=this;return function(){if(a.apply(c,arguments)){var e=b.getNode().textContainer();e.isEmpty()&&e instanceof u&&d._setParagraphFormat(t.NORMAL)}}},_createStyledContentFromText:function(a){if(this._pendingStyleChange&&this._canSetStyle()){a=new w({text:a});var c=this._getStyle();a.updateAttributes(c);this._pendingStyleChange=null;return[a.serialize()]}},_resetPendingStyleChange:function(){this._lastPendingStylePosition=this._pendingStyleChange=null},_updateActions:function(){var a=
this.getFormatAndStyle();this._updateTextStyleActions(a);this._updateParagraphStyleActions(a)},_updateTextStyleActions:function(a){var c=r.textContainersInCursorConvertibleTo(this._cursor,v,this._nodeConversionRules),b=this._canSetStyle();this._actionService.updateAction(q.RICH_TEXT.TOGGLE_BOLD_ACTION,{enabled:b,selected:a.bold});this._actionService.updateAction(q.RICH_TEXT.TOGGLE_ITALIC_ACTION,{enabled:b,selected:a.italic});this._actionService.updateAction(q.RICH_TEXT.TOGGLE_UNDERLINE_ACTION,{enabled:b,
selected:a.underline});this._actionService.updateAction(q.RICH_TEXT.TOGGLE_MONOSPACE_ACTION,{enabled:b,selected:a.monospace});this._actionService.updateAction(q.RICH_TEXT.TOGGLE_CODE_AND_TEXT_ACTION,{enabled:!this._isReadOnly()&&c})},_updateParagraphStyleActions:function(a){var c=this.canSetFormat(),b=c&&x.isRichText(this._cursor),d=this._isAlignTo(this._LEFT),e=!1,f=!1;d||(e=this._isAlignTo(this._CENTER));!d&&!e&&(f=this._isAlignTo(this._RIGHT));var h=t.NORMAL;x.isRichTextParagraphFormat(a.format)&&
(h=a.format);this._actionService.updateAction(q.RICH_TEXT.PARAGRAPH_FORMAT_CODE_ACTION,{enabled:c,selected:"code"===a.format});this._actionService.updateAction(q.RICH_TEXT.PARAGRAPH_FORMAT_TEXT_ACTION,{enabled:c,selected:h===t.NORMAL});this._actionService.updateAction(q.RICH_TEXT.PARAGRAPH_FORMAT_HEADING1_ACTION,{enabled:c,selected:h===t.HEADING1});this._actionService.updateAction(q.RICH_TEXT.PARAGRAPH_FORMAT_HEADING2_ACTION,{enabled:c,selected:h===t.HEADING2});this._actionService.updateAction(q.RICH_TEXT.PARAGRAPH_FORMAT_HEADING3_ACTION,
{enabled:c,selected:h===t.HEADING3});this._actionService.updateAction(q.RICH_TEXT.PARAGRAPH_FORMAT_TITLE_ACTION,{enabled:c,selected:h===t.TITLE});this._actionService.updateAction(q.RICH_TEXT.ALIGNMENT_LEFT_ACTION,{enabled:!d&&b,selected:d});this._actionService.updateAction(q.RICH_TEXT.ALIGNMENT_CENTER_ACTION,{enabled:!e&&b,selected:e});this._actionService.updateAction(q.RICH_TEXT.ALIGNMENT_RIGHT_ACTION,{enabled:!f&&b,selected:f})},_isAlignTo:function(a){if(!this.canSetFormat())return!1;for(var c=
this._cursor.adjustSelection(this._cursor.selectionInfo(),!0),b=c.startNode,c=c.endNode.textContainer();c;){if(c instanceof v&&c.align!==a)return!1;if(c===b.textContainer())break;c=c.prevNode().textContainer()}return!0},_insertTabOnShiftTab:function(a){return a?this._document.insertTab():!1},_insertTab:function(c){if(!this._cursor.hasSelection())return x.isRichText(this._cursor)?this._insertTabOnShiftTab(c):!1;var d=this._cursor.selectionInfo();if(!b.isCodeInRange(d.startNode,d.endNode)){if(d.isInTextContainer)return this._insertTabOnShiftTab(c);
this._indentUtilities.indentSelection(a.DEFAULT_TAB_STRING,!0);return!0}},_toggleCodeAndText:function(){this._actionService.getAction(q.RICH_TEXT.TOGGLE_CODE_AND_TEXT_ACTION).enabled&&(this._isReadOnly()||("code"===x.getParagraphFormat(this._cursor)?this._setParagraphFormat(t.NORMAL):this._setParagraphFormat("code")))},_insertBreakAndToggleCode:function(){var a=this._cursor.selectionInfo(),c=this._cursor.getNode().textContainer();this._document.insertBreak();a.isLocal&&("RichTextParagraphNode"===
c.className?this._setParagraphFormat("code"):"LineNode"===c.className&&this._setParagraphFormat(t.NORMAL))},getFormatAndStyle:function(){var a={bold:!1,italic:!1,underline:!1,monospace:!1};a.format=x.getParagraphFormat(this._cursor);if("code"===a.format||!this._cursor)return a;var c=this._getStyle(),b;for(b in a)a.hasOwnProperty(b)&&c.hasOwnProperty(b)&&(a[b]=c[b]?!0:!1);return a},_getStyle:function(){var a=this._pendingStyleChange;if(!this._cursor)return a;a=this._cursor.selectionInfo();a.startPosition.isEqualTo(a.endPosition)?
a=this._getStyleAttributes(this._cursor.getNode()):(a=this._cursor.adjustSelection(a,!0),a=this._getSelectionStyleAttributes(a.startNode,a.endNode));return a},_getSelectionStyleAttributes:function(a,b){return b?c.getStyleAttributesFromRange(a,b):this._getStyleAttributes(a)},_getStyleAttributes:function(a){if(a){a=a.getStyleAttributes();if(this._pendingStyleChange)for(var c in this._pendingStyleChange)this._pendingStyleChange.hasOwnProperty(c)&&(a[c]=this._pendingStyleChange[c]);return a}return null},
_setStyle:function(c,b){if(this._canSetStyle()){void 0===b&&(b=!0);var d=this._cursor.selectionInfo();if(d.startPosition.isEqualTo(d.endPosition))if(!0===a.isInWord(this._cursor.position))this._cursor.selectWordUnderCursor();else{this._setPendingStyleChange(c,b);this._updateActions();return}var d=this._cursor.selectionInfo(),d=this._cursor.adjustSelection(d,!0),e=new h(d.startNode,d.startPos),d=new h(d.endNode,d.endPos);this._setStyleForRange(c,b,e,d)}},_setStyleForRange:function(a,c,b,d){var e=this._cursor.getPosition(),
f=this._document.startEdit();b=this._internalDocument.createContiguousRange(b,d,!0);d={};d[a]=c;this._applyStyle(d,b.startNode,b.endNode);this._cursor.setPosition(e);this._cursor.onUpdate();a=this._internalDocument.getLineNumber(b.startNode.rootContainer());c=this._internalDocument.getLineNumber(b.endNode.rootContainer());a=[l.create(a,0<=c?c:a)];this._internalDocument.emitDocumentEvents(a);f.appendUndoEvents(a);f.appendRedoEvents(a);this._document.endEdit()},applyStyleInLineColumn:function(a,c,b,
d,e,f){b=this._internalDocument.getPositionForLineColumn(b,d);e=this._internalDocument.getPositionForLineColumn(e,f);this._setStyleForRange(a,c,b,e)},applyFormatInLine:function(a,c){var b=this._cursor.getLineColumn();this._cursor.setLineColumn(c,1);this._setParagraphFormatAtCursor(a);this._cursor.setLineColumn(b.line,b.column)},_applyStyle:function(a,c,b){for(;b;){this._internalDocument.changeNodeAttributes(b,a);this._internalDocument.mergeTextNodeWithSibling(b,!0);if(b===c)break;b=b.prevNode()}this._internalDocument.mergeTextNodeWithSibling(c)},
_canSetStyle:function(){if(this._isReadOnly()||!r.textContainersInCursorConvertibleTo(this._cursor,v,this._nodeConversionRules)||!this._cursor||!x.hasRichText(this._cursor))return!1;var a=this._cursor.selectionInfo();if(a.isNull)return this._isRichTextNode(a.startNode,a.startPos);a=this._cursor.adjustSelection(a,!0);if(a.startPosition.isEqualTo(a.endPosition)&&!this._cursor.isFileEndSelected())return!1;for(var c=a.startNode;c;){if(c instanceof w)return!0;c=c===a.endNode?null:c.nextNode()}return!1},
_isRichTextNode:function(a,c){return a.isInstanceOf(w)||(0===c||c===a.maxOffset())&&a.textContainer().isInstanceOf(v)?!0:!1},canSetFormat:function(){return this._isReadOnly()||!r.textContainersInCursorConvertibleTo(this._cursor,v,this._nodeConversionRules)?!1:x.hasRichText(this._cursor)},_isReadOnly:function(){return this._internalDocument&&this._internalDocument.isReadOnly()||this._cursor&&this._cursor.isCursorReadOnly()?!0:!1},_toggleBold:function(){var a=this._getStyle().bold?!1:!0;this._setStyle("bold",
a)},_smartIndentOrItalic:function(){var a=this._cursor.selectionInfo();b.isCodeInRange(a.startNode,a.endNode)||this._toggleItalic()},_toggleItalic:function(){var a=this._getStyle().italic?!1:!0;this._setStyle("italic",a)},_toggleMonospace:function(){var a=this._getStyle().monospace?!1:!0;this._setStyle("monospace",a)},_toggleUnderline:function(){var a=this._getStyle().underline?!1:!0;this._setStyle("underline",a)},_setParagraphFormat:function(a){this._setParagraphFormatAtCursor(a);this._cursor.onUpdate(!1,
!0)},_setParagraphFormatAtCursor:function(a){if(this._cursor){var c=x.getParagraphFormat(this._cursor);if(c!==a){var b=this._cursor.selectionInfo(),d=b.startNode.rootContainer(),e=b.endNode,f=b.startNode,b=this._cursor.adjustSelection(b,!0);if(d){var g=b.endNode.rootContainer(),k=e===b.endNode?0:1,l=this._cursor.getPosition(),l=this._cursor.expandCursorPos(l),q,r,w=this._document.startBlockEdit(),s=[],y,t,u=-1;d.childrenAreContainers&&(y=b.startNode.textContainer(),y!==d.firstChild()&&(q=d.startPosition().getLine()-
1,d=this._internalDocument.splitContainerAtNode(d,y.startNode(),!0),t=d.startPosition().getLine()-1,q!==t&&s.push(m.create(q,t,1)),q=b.isNull?l.posInNode:l.anchor.posInNode,t={line:this._internalDocument.getLineNumber(f.rootContainer()),column:f.offsetInContainer(y)+q},q=d.previousSibling()));g.childrenAreContainers&&(y=b.endNode.textContainer(),u=e.offsetInContainer(e.textContainer()),f=y===g.lastChild(),e=g.endPosition().getLine()-1,this._internalDocument.splitContainerAtNode(g,y.endNode()),f||
(r=g.nextSibling(),y=r.startPosition().getLine()-1,e!==y&&s.push(m.create(e,y,1))));var T=null;for(y=!1;d;){d===g&&(y=!0);if(this._nodeConversionRules.isNodeConvertibleTo(d,x.getNodeConstructorByFormat(a)))if(e=d.startPosition().getLine()-1,d.childrenAreContainers){for(var f=d.children.length,X=0;X<f;X+=1){var T=this._internalDocument.createContainerForType("text").container,$=this._internalDocument.createNode(T.getDefaultChild());T.addChild($);this._internalDocument.insertAtPosition(T,new h(d,0));
var V=d.firstChild();V instanceof v?this._internalDocument.spliceContainers(T,V):($.insertText(V.getText()),this._internalDocument.deleteNode(V,{node:$,offset:0}));T=this._internalDocument.convertParagraph(a,T);if(V=V.align)T.align=V;d.anchorId&&(T.anchorId=d.anchorId);q||(q=T)}this._internalDocument.deleteNode(d,{node:T.firstChild(),offset:0});1!==f&&s.push(m.create(e,e+f-1,1))}else T=this._internalDocument.convertParagraph(a,d),d.align&&(T.align=d.align),d.anchorId&&(T.anchorId=d.anchorId),q||(q=
T);else T=d;if(y)break;d=T.nextSibling()}r||(r=T);b.isReversed?(l.anchor.line=this._internalDocument.getLineNumber(T)+k,0<=u&&(l.anchor.column=u+l.anchor.posInNode),!b.isNull&&t&&(l.line=t.line,l.column=t.column)):(l.line=this._internalDocument.getLineNumber(T)+k,0<=u&&(l.column=u+l.posInNode),!b.isNull&&t&&(l.anchor=t));this._cursor.setPosition(l);b=this._internalDocument.getLineNumber(q);r=this._internalDocument.getLineNumber(r);s.push(p.create(b,r,c,a));w.appendRedoEvents(s);w.appendUndoEvents(n.translateEventsForUndo(s));
this._internalDocument.emitDocumentEvents(s);this._document.endBlockEdit(w)}}}}})})},"MW/rtc/plugins/richtext/CodeTextToggleShortcutsProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/richtext/CodeTextToggleShortcuts"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.actionservice","rtc.richtext"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/richtext/CodeTextToggleShortcuts":function(){define(["dojo/_base/declare",
"MW/rtc/RichTextComponentFeatureEnum"],function(g,f){return g(null,{_ACTIONS:[{id:f.RICH_TEXT.TOGGLE_CODE_AND_TEXT_ACTION,key:"ctrl_e",contextMenuGroup:"Default",platformKey:{mac:"ctrl_alt_e"}},{id:f.RICH_TEXT.PARAGRAPH_FORMAT_TEXT_ACTION,key:"ctrl_alt_t",platformKey:{mac:"ctrl_alt_t"}},{id:f.RICH_TEXT.PARAGRAPH_FORMAT_TITLE_ACTION,key:"ctrl_alt_l",platformKey:{mac:"ctrl_alt_l"}},{id:f.RICH_TEXT.PARAGRAPH_FORMAT_HEADING1_ACTION,key:"ctrl_shift_1",platformKey:{mac:"ctrl_shift_1"}},{id:f.RICH_TEXT.PARAGRAPH_FORMAT_HEADING2_ACTION,
key:"ctrl_shift_2",platformKey:{mac:"ctrl_shift_2"}},{id:f.RICH_TEXT.PARAGRAPH_FORMAT_HEADING3_ACTION,key:"ctrl_shift_3",platformKey:{mac:"ctrl_shift_3"}}],constructor:function(e){this._ACTIONS.forEach(function(d){var b=e.getAction(d.id);e.removeAction(d.id);b.key=d.key;b.platformKey=d.platformKey;d.contextMenuGroup&&(b.contextMenuGroup=d.contextMenuGroup);e.addAction(b)})}})})},"MW/rtc/plugins/richtext/MatlabJSONMimeConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"MW/rtc/plugins/richtext/MatlabJSONMimeConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/richtext/MatlabJSONMimeConverter":function(){define(["dojo/_base/declare","MW/rtc/plugins/cutcopypaste/MIMETypes","MW/rtc/plugins/cutcopypaste/mime/MimeConverter"],function(g,f,e){return g(e,{_PRIORITY:99,constructor:function(d){this._cursor=d},getType:function(){return f.MATLAB_RICHTEXT},convertFromMimeData:function(d){try{return JSON.parse(d)}catch(b){}},
priority:function(){return this._PRIORITY}})})},"MW/rtc/plugins/richtext/HTMLRichTextElementHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/richtext/HTMLRichTextElementHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cutcopypaste.htmlmimeconverter"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/richtext/HTMLRichTextElementHandler":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/dom-geometry dojo/dom-style MW/rtc/plugins/richtext/nodes/inner/HeadingNode MW/rtc/plugins/richtext/nodes/inner/RichTextParagraphNode MW/rtc/plugins/richtext/nodes/leaf/RichTextNode".split(" "),
function(g,f,e,d,b,a,c,h){return g(null,{_LEFT:"left",_CENTER:"center",_RIGHT:"right",constructor:function(a){a.registerNodeHandler(["P","DIV","TR","PRE"],f.hitch(this,"_convertDIVs"));a.registerNodeHandler("H1",f.hitch(this,"_convertHeader",1));a.registerNodeHandler("H2",f.hitch(this,"_convertHeader",2));a.registerNodeHandler("BR",f.hitch(this,"_convertBR"));a.registerTextHandler(f.hitch(this,"_convertText"));a.setDefaultParagraphFactory(function(){return new c([])});this._fontMap={monospace:!0}},
_convertHeader:function(c,d,e){d=b.getComputedStyle(d).textAlign;e.appendParagraph(new a([],{align:this._normalizeAlignment(d),level:c}))},_convertDIVs:function(a,c){var b=c.getLastParagraph();b&&(0<b.children.length&&!b.childrenAreContainers)&&c.leaveParagraph()},_convertBR:function(a,c){c.isInParagraph()||(c.appendParagraph(),c.appendNode(new h({})));c.leaveParagraph()},_checkMonospace:function(a){var c=b.getComputedStyle(a).fontFamily;if(this._fontMap.hasOwnProperty(c))return this._fontMap[c];
a=e.create("span",null,a,"last");a.innerText="iiiii";var f=d.position(a).w;a.innerText="mmmmm";var h=d.position(a).w;e.destroy(a);a=0<f+h&&2>Math.abs(f-h);return this._fontMap[c]=a},_convertText:function(a,c){var d=b.getComputedStyle(a.parentNode),e=c.getLastParagraph(),f={};if((d.fontWeight.match(/\bbold\b/)||"700"===d.fontWeight)&&(!e||"HeadingNode"!==e.className))f.bold=!0;d.fontStyle.match(/\bitalic\b/)&&(f.italic=!0);d.textDecoration.match(/\bunderline\b/)&&(f.underline=!0);this._checkMonospace(a.parentNode)&&
(f.monospace=!0);e=a.textContent;d=d.whiteSpace&&"pre"===d.whiteSpace;d||(e=e.replace(/^\n+/,""),e=e.replace(/\n+\s*/g," "));e=e.replace(/\xA0/g," ");if(d&&e.match(/\n/))this._convertTextArray(e.split(/\n/),f,c),this._setAlign(a,c);else if(e||d)f.text=e,c.appendNode(new h(f)),this._setAlign(a,c)},_convertTextArray:function(a,c,b){a.forEach(function(a,d){c.text=a;0<d&&b.leaveParagraph();b.appendNode(new h(c))})},_setAlign:function(a,d){var e=d.getLastParagraph();if(e&&e instanceof c){var f=b.getComputedStyle(a.parentNode).textAlign;
e.align=this._normalizeAlignment(f)}},_normalizeAlignment:function(a){return-1<a.indexOf(this._CENTER)?this._CENTER:-1<a.indexOf(this._RIGHT)?this._RIGHT:this._LEFT}})})},"MW/rtc/plugins/richtext/export/RichTextParagraphNode2HTMLProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/richtext/export/RichTextParagraphNode2HTML"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/richtext/export/RichTextParagraphNode2HTML":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/export/html/BaseInnerNode2HTML","MW/rtc/plugins/richtext/nodes/inner/RichTextParagraphNode"],function(g,f,e){return g([f],{_STYLES:"margin padding line-height min-height white-space color font-family font-style font-size font-weight text-align".split(" "),constructor:function(){},getApplicableNodeClass:function(){return e}})})},"MW/rtc/plugins/richtext/export/HeadingNode2HTMLProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/richtext/export/HeadingNode2HTML"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/richtext/export/HeadingNode2HTML":function(){define(["dojo/_base/declare","MW/rtc/plugins/export/html/BaseInnerNode2HTML","MW/rtc/plugins/richtext/nodes/inner/HeadingNode"],function(g,f,e){return g([f],{_STYLES:"margin padding line-height min-height white-space color font-family font-style font-size font-weight text-align".split(" "),constructor:function(){this.reset()},
getApplicableNodeClass:function(){return e},reset:function(){this._firstTitle=""},finalize:function(d){d.addToHead("\x3ctitle\x3e"+(""!==this._firstTitle?this._firstTitle:"Untitled")+"\x3c/title\x3e")},enter:function(d,b,a){""===this._firstTitle&&1===b.level&&(this._firstTitle=b.getText());this.inherited(arguments)},_getTagName:function(d){return"h"+d.level}})})},"MW/rtc/plugins/richtext/export/RichTextNode2HTMLProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"MW/rtc/plugins/richtext/export/RichTextNode2HTML"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/richtext/export/RichTextNode2HTML":function(){define(["dojo/_base/declare","mw-html-utils/HtmlUtils","MW/rtc/plugins/export/NodeExporterInterface","MW/rtc/plugins/richtext/nodes/leaf/RichTextNode"],function(g,f,e,d){return g([e],{constructor:function(){},getApplicableNodeClass:function(){return d},visit:function(b,
a,c,d,e){e="";a.bold&&(e+=" font-weight: bold;");a.italic&&(e+=" font-style: italic;");a.underline&&(e+=" text-decoration: underline;");a.monospace&&(e+=" font-family: monospace;");var g="\x3cspan";e&&(g+=" style\x3d'"+e+"'");b.addToBody(g+"\x3e");a=a.getText().substring(c,d);b.addToBody(f.escapeHtml(a));b.addToBody("\x3c/span\x3e")}})})},"MW/rtc/plugins/richtext/view/RichTextCoordinateConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./RichTextCoordinateConverter"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.richtext.rangeconverter","rtc.view.viewmodel"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/richtext/view/RichTextCoordinateConverter":function(){define(["dojo/_base/declare","MW/rtc/plugins/richtext/nodes/leaf/RichTextNode","MW/rtc/view/coordinateconverter/base/TextCoordinateConverter"],function(g,f,e){return g(e,{constructor:function(d,b){this._rangeConverter=d;this._viewModel=b},getApplicableNodeClass:function(){return f}})})},
"MW/rtc/plugins/richtext/view/RichTextRangeConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./RichTextRangeConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/richtext/view/RichTextRangeConverter":function(){define(["dojo/_base/declare","MW/rtc/plugins/richtext/nodes/leaf/RichTextNode","MW/rtc/view/rangeconverter/base/TextRangeConverter"],function(g,f,e){return g(e,
{constructor:function(){},getApplicableNodeClass:function(){return f}})})},"MW/rtc/view/rangeconverter/base/TextRangeConverter":function(){define(["dojo/_base/declare","dojo/dom-construct","MW/rtc/view/ViewUtilities","./AbstractRangeConverter"],function(g,f,e,d){return g(d,{_PLACEHOLDER_CLASS:"textContainer",getRangeFromPosition:function(b,a){var c=b.getNode(),d=b.getOffset(),e=c.maxOffset();a=a||this._getDomNode(c);c=d;0===e?(d=a.firstChild||a,c=0):(c=this.createIndexMap(a),d===e?(e=c[d-1],d=e.textNode,
c=e.localIndex+1):(e=c[d],d=e.textNode,c=e.localIndex));return this._getRangeStartEnd(d,c,d,c)},getContainerForPosition:function(b,a){var c=this.getRangeFromPosition(b,a);return!c?null:e.isDomTextNode(c.startContainer)?this._getOrInsertNewContainerAroundText(b,c):this._getOrInsertNewContainerWhenEmptyText(b,a)},_getOrInsertNewContainerAroundText:function(b,a){var c,d=a.startContainer;c=d.parentNode;var e=c.previousSibling,g=c.nextSibling;0===a.startOffset?c=this._isViewOnlyContainer(e)?e:this._insertNewContainerInto(c,
"before"):0<b.getOffset()&&b.isAtRightEdge()?c=this._isViewOnlyContainer(g)?g:this._insertNewContainerInto(c,"after"):(d=d.splitText(a.startOffset),e=c.cloneNode(!1),f.place(d,e),f.place(e,c,"after"),c=this._insertNewContainerInto(c,"after"));return c},_getOrInsertNewContainerWhenEmptyText:function(b,a){var c=b.getNode();a=a||this._getDomNode(c);return this._isViewOnlyContainer(a.firstChild)?a.firstChild:this._insertNewContainerInto(a,"first")},_insertNewContainerInto:function(b,a){var c=this._createContainer();
f.place(c,b,a);return c},_isViewOnlyContainer:function(b){return b&&b.className===this._PLACEHOLDER_CLASS},_createContainer:function(){return f.create("span",{"class":this._PLACEHOLDER_CLASS})},getNodeRange:function(b){var a=document.createRange();try{a.selectNode(b)}catch(c){return null}return a},getNodeContentsRange:function(b){var a=[];for(b=document.createTreeWalker(b,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,this._filterTextNodes.bind(this),!1);b.nextNode();){var c=b.currentNode;try{var d=
document.createRange();d.selectNodeContents(c);a.push(d)}catch(e){}}return a},getCharRange:function(b,a,c,d){d=d||this.createIndexMap(b);var e=d[a];if(!e)return null;b=e.textNode;var f=e.localIndex,g=e.textNode,e=e.localIndex+1;!c&&0<a&&(a=d[a-1],this._hasViewOnlyElementBetweenTextNodes(a.textNode,b)&&(b=a.textNode,f=a.localIndex+1));return this._getRangeStartEnd(b,f,g,e)},_hasViewOnlyElementBetweenTextNodes:function(b,a){if(b===a)return!1;var c=a.parentNode.previousSibling;return this._isViewOnlyContainer(c)&&
0<c.textContent.length},createIndexMap:function(b){var a=[];for(b=document.createTreeWalker(b,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,this._filterTextNodes.bind(this),!1);b.nextNode();)for(var c=b.currentNode,d=0;d<c.textContent.length;d+=1)a.push({textNode:c,localIndex:d});return a},_filterTextNodes:function(b){return e.isDomTextNode(b)&&""!==b.nodeValue?NodeFilter.FILTER_ACCEPT:this._isViewOnlyContainer(b)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_SKIP},_getRangeStartEnd:function(b,a,c,d){var e=
document.createRange();try{e.setStart(b,a),e.setEnd(c,d)}catch(f){return null}return e},_getDomNode:function(b){return b.box}})})},"MW/rtc/view/rangeconverter/base/AbstractRangeConverter":function(){define(["dojo/_base/declare","mw-log/Log","MW/rtc/abstract/AbstractConverter"],function(g,f,e){return g(e,{getRangeFromPosition:function(d){f.error("Unimplemented: getRangeFromPosition")},getContainerFromPosition:function(d){f.error("Unimplemented: getContainerFromPosition")},_getDomNode:function(d){f.error("Unimplemented: getDomNode")}})})},
"MW/rtc/plugins/saveaspdf/SaveAsPDFProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/saveaspdf/SaveAsPDF"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.pdfwriters"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/saveaspdf/SaveAsPDF":function(){define("dojo/_base/declare dojo/_base/lang dojo/Deferred dojo/DeferredList MW/rtc/plugins/saveaspdf/Tags MW/rtc/plugins/saveaspdf/utils/XSLFOWriter MW/rtc/plugins/saveaspdf/utils/XSLFOWriterUtilities".split(" "),
function(g,f,e,d,b,a,c){return g(null,{_REPLACEMENT_CHARACTER_STRING:"\x26#xFFFD;",_FIGURE_DEFAULT_FORMAT:"png",_FIGURE_DEFAULT_RESOLUTION:"600",constructor:function(c,b){this._internalDocument=c;this._writer=new a(b);this._promiseList=[]},saveAsPDF:function(a){var g=this._internalDocument.root.box,l=[],m;a&&a.figurePath&&(m={figureFormat:this._FIGURE_DEFAULT_FORMAT,figureResolution:this._FIGURE_DEFAULT_RESOLUTION,promiseList:l},f.mixin(m,a));a=this._writer.createDocument(g,m);var p=c.serializeToFormattedString(a,
b.XML_HEADER),p=this._normalizeString(p),n=new e;(new d(l)).then(function(a){n.resolve(p)});return n},_normalizeString:function(a){var c,b=a.split("");for(c=0;c<b.length;c++){var d=a.charCodeAt(c);if(32>d||126<d)b[c]=this._replaceDecouragedChar(d)}return a=b.join("")},_replaceDecouragedChar:function(a){return 9>a||11===a||12===a||14<=a&&31>=a||55296<=a&&56319>=a||65533<a?this._REPLACEMENT_CHARACTER_STRING:56320<=a&&57343>=a?"":"\x26#"+a+";"}})})},"dojo/DeferredList":function(){define(["./_base/kernel",
"./_base/Deferred","./_base/array"],function(g,f,e){g.DeferredList=function(d,b,a,c,h){var g=[];f.call(this);var l=this;0===d.length&&!b&&this.resolve([0,[]]);var m=0;e.forEach(d,function(e,f){function h(a,c){g[f]=[a,c];m++;m===d.length&&l.resolve(g)}e.then(function(a){b?l.resolve([f,a]):h(!0,a)},function(b){a?l.reject(b):h(!1,b);if(c)return null;throw b;})})};g.DeferredList.prototype=new f;g.DeferredList.prototype.gatherResults=function(d){d=new g.DeferredList(d,!1,!0,!1);d.addCallback(function(b){var a=
[];e.forEach(b,function(c){a.push(c[1])});return a});return d};return g.DeferredList})},"MW/rtc/plugins/saveaspdf/Tags":function(){define({XML_HEADER:'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e',NAMESPACE_URL:"http://www.w3.org/1999/XSL/Format",NAMESPACE_TAG:"fo",SCHEMA_TAG:"xmlns",ROOT_TAG_NAME:"root",LAYOUT_MASTER:"layout-master-set",SIMPLE_PAGE_MASTER:"simple-page-master",PAGE_SEQUENCE:"page-sequence",REGION_BODY:"region-body",REGION_AFTER:"region-after",STATIC_CONTENT:"static-content",
PAGE_NUMBER:"page-number",PAGE_NUMBER_CITATION:"page-number-citation",FLOW:"flow",BLOCK:"block",BLOCK_CONTAINER:"block-container",INLINE:"inline",LIST_BLOCK:"list-block",LIST_ITEM:"list-item",LIST_ITEM_LABEL:"list-item-label",LIST_ITEM_BODY:"list-item-body",BASIC_LINK:"basic-link",EXTERNAL_GRAPHIC:"external-graphic",LEADER:"leader"})},"MW/rtc/plugins/saveaspdf/utils/XSLFOWriter":function(){define("dojo/_base/declare dojo/_base/lang mw-log/Log MW/rtc/plugins/saveaspdf/Attributes MW/rtc/plugins/saveaspdf/Tags MW/rtc/plugins/saveaspdf/utils/XSLConstants MW/rtc/plugins/saveaspdf/utils/XSLFOWriterUtilities".split(" "),
function(g,f,e,d,b,a,c){return g(null,{constructor:function(a){this._writers={};a.forEach(function(a){a.getTypes().forEach(function(c){e.assert(!this._writers[c],"Writer for type '"+c+"'' already exists.");this._writers[c]=a},this)},this);a.forEach(function(a){a.setWriters(this._writers)},this)},createDocument:function(c,e){Object.keys(this._writers).forEach(function(a){this._writers[a].setOptions(e)},this);var f=this._writers[a.BASE_DOCUMENT].createElement(b,d),g=this._getPageFlow(f);this._createTags(c,
g);return f},_createTags:function(e,f){var g,m,p,n,q=e.children.length;for(g=0;g<q;g+=1)m=e.children[g],p=this._getWriterType(m),n=this._writers[p],c.isBlock(m)?(p=c.createXMLElement(b,b.BLOCK_CONTAINER),c.isSectionBlock(m)&&(n=c.getCommonStyles(m),n["padding-left"]="0px",n["padding-right"]="0px",c.applyStyles(p,n)),-1<m.className.indexOf("CodeExampleBlock")&&(n=c.getCommonStyles(m),n["margin-left"]="20pt",n["border-top"]="0pt none",n["border-left"]="0pt none",n["border-right"]="0pt none",n["border-bottom"]=
"0pt none",c.applyStyles(p,n)),this._createTags(m,p),f.appendChild(p)):p===a.TABLEOFCONTENT?(m=n.createElement(m,b,d,this._writers),f.appendChild(m)):(p=c.createWrapperElement(m,b),m=n.createElement(m,b,d,this._writers),m.paragraph?p.appendChild(m.paragraph):p.appendChild(m),f.appendChild(p),m.output&&f.appendChild(m.output))},_getPageFlow:function(a){return a.firstChild.childNodes[1].lastChild},_getWriterType:function(b){if(c.isCode(b)||c.isSectionBreak(b)||c.isBlock(b)||c.isHeading(b)||c.isTitle(b))return a.PARAGRAPH;
if(c.isTableOfContent(b))return a.TABLEOFCONTENT;if(c.isParagraph(b))return a.PARAGRAPH;if(c.isUnorderedList(b)||c.isOrderedList(b))return a.LIST;if(c.isCodeExample(b))return a.PARAGRAPH}})})},"MW/rtc/plugins/saveaspdf/Attributes":function(){define({MASTER_NAME:"master-name",MASTER_REFERENCE:"master-reference",PAGE_MASTER:"PageMaster",MARGIN:"margin",MARGIN_BOTTOM:"margin-bottom",MARGIN_LEFT:"margin-left",MARGIN_RIGHT:"margin-right",MARGIN_VALUE:"1cm",FONT_FAMILY:"font-family",FONT_SIZE:"font-size",
SERIF:"serif",ARIAL_UNICODE:"Arial Unicode MS",ARIAL:"Arial",COLOR:"color",WHITE_SPACE:"white-space",WHITE_SPACE_PRESERVE:"pre",FLOW_NAME:"flow-name",XSL_REGION_BODY:"xsl-region-body",REGION_NAME:"region-name",REGION_NAME_VALUE:"Footer",EXTENT:"extent",EXTENT_VALUE:"1cm",DISPLAY_ALIGN:"display-align",DISPLAY_ALIGN_VALUE:"after",PAGE_NUMBER_FONT_SIZE:"11pt",PROVISIONAL_DISTANCE:"provisional-distance-between-starts",LIST_INDENT:"5mm",LABEL_END:"label-end()",BODY_START:"body-start()",END_INDENT:"end-indent",
START_INDENT:"start-indent",SOURCE:"src",ERROR_ICON:"url(../images-liveeditor/error.png)",WARNING_ICON:"url(../images-liveeditor/warning.png)",HORIZONTAL_ELLIPSIS:"url(../images-liveeditor/HEllipsis.png)",VERTICAL_ELLIPSIS:"url(../images-liveeditor/VEllipsis.png)",CONTENT_HEIGHT:"content-height",CONTENT_WIDTH:"content-width",IMAGE_HEIGHT:"80%",IMAGE_WIDTH:"80%",TEXT_ALIGN:"text-align",TEXT_ALIGN_LAST:"text-align-last",CENTER:"center",RIGHT:"right",JUSTIFY:"justify",ID:"id",REF_ID:"ref-id",EXTERNAL_DESTINATION:"external-destination",
INTERNAL_DESTINATION:"internal-destination",LEADER_PATTERN:"leader-pattern",VERTICAL_ALIGN:"vertical-align",PADDING_LEFT:"padding-left",VERTICAL_ELLIPSIS_PADDING_LEFT:"25pt"})},"MW/rtc/plugins/saveaspdf/utils/XSLFOWriterUtilities":function(){define(["dojo/dom-style","dojo/query","MW/rtc/plugins/saveaspdf/utils/XSLConstants"],function(g,f,e){return{serializeToFormattedString:function(d,b){var a=(new window.XMLSerializer).serializeToString(d);return b+a},createXMLElement:function(d,b){b=d.NAMESPACE_TAG+
":"+b;return document.createElementNS(d.NAMESPACE_URL,b)},createWrapperElement:function(d,b){var a=this.createXMLElement(b,b.BLOCK),c=this.getCommonStyles(d);this.applyStyles(a,c);return a},setAttribute:function(d,b,a){d.setAttributeNS(null,b,a)},createTextTag:function(d){return document.createTextNode(d)},isOutputParagraph:function(d){return-1<d.className.indexOf(e.OUTPUT_CLASS)},isWarning:function(d){return-1<d.className.indexOf(e.WARNING_CLASS)},isError:function(d){return-1<d.className.indexOf(e.ERROR_CLASS)},
isFigure:function(d){return-1<d.className.indexOf(e.FIGURES_CLASS)},isSymEquation:function(d){return-1<d.className.indexOf(e.SYMEQUATION_CLASS)},isText:function(d){return-1<d.className.indexOf(e.TEXT_CLASS)},isVariable:function(d){return-1<d.className.indexOf(e.VARIABLES_CLASS)},isVariableString:function(d){return-1<d.className.indexOf(e.VARIABLE_STRING_CLASS)},isInteractiveVariable:function(d){return-1<d.className.indexOf(e.INTERACTIVE_VARIABLE_CLASS)},isMatrix:function(d){return-1<d.className.indexOf(e.MATRIX_CLASS)},
isInteractiveMatrix:function(d){return-1<d.className.indexOf(e.INTERACTIVE_MATRIX_CLASS)},getCommonStyles:function(d){var b=g.getComputedStyle(d),a={},c=Math.round(parseFloat(b.fontSize)*e.FONT_SCALING_FACTOR),f="";isNaN(c)||(f=c+e.POINT_UNIT);a.color=this._rgba2rgb(b.color);a["font-family"]=this.getFontFamily(d,b.fontFamily);a["font-style"]=b.fontStyle;a["font-size"]=f;a["font-weight"]=this._fontWeightNumberToName(b.fontWeight);a["text-align"]=b.textAlign;a["vertical-align"]=b.verticalAlign;a["text-decoration"]=
b.textDecoration.split(" ")[0];a["margin-top"]=this._replacePXWithPT(b.marginTop);a["margin-bottom"]=this._replacePXWithPT(b.marginBottom);a["margin-left"]=this._replacePXWithPT(b.marginLeft);a["margin-right"]=this._replacePXWithPT(b.marginRight);a["padding-top"]=this._replacePXWithPT(b.paddingTop);a["padding-bottom"]=this._replacePXWithPT(b.paddingBottom);a["padding-left"]=this._replacePXWithPT(b.paddingLeft);a["padding-right"]=this._replacePXWithPT(b.paddingRight);a["border-top"]=this._replacePXWithPT(b.borderTop);
a["border-bottom"]=this._replacePXWithPT(b.borderBottom);a["border-left"]=this._replacePXWithPT(b.borderLeft);a["border-right"]=this._replacePXWithPT(b.borderRight);a["line-height"]=Math.round(b.lineHeight*e.FONT_SCALING_FACTOR);a["white-space"]="pre-wrap"!==b.whiteSpace?b.whiteSpace:"";0===b.whiteSpace.indexOf("pre")&&(a["linefeed-treatment"]="preserve");a["min-height"]=this._replacePXWithPT(b.minHeight);return a},createInlineElement:function(d,b){var a=this.createXMLElement(b,b.INLINE),c=this.getInlineStyles(d);
this.applyStyles(a,c);return a},getInlineStyles:function(d){var b=g.getComputedStyle(d),a={};a["text-decoration"]=b.textDecoration.split(" ")[0];a["font-style"]=b.fontStyle;a["font-weight"]=this._fontWeightNumberToName(b.fontWeight);a["font-family"]=this.getFontFamily(d,b.fontFamily);a.color=this._rgba2rgb(b.color);return a},getFontFamily:function(d,b){var a=e.BASE_FONT;b&&(a=b+","+a);return a},applyStyles:function(d,b){Object.keys(b).forEach(function(a){var c=b[a];c&&""!==c&&this.setAttribute(d,
a,c)},this)},isCode:function(d){return-1<d.className.indexOf(e.LINENODE_CLASS)||-1<d.className.indexOf(e.INLINE_WRAPPER_CLASS)},isBlock:function(d){var b=e.BLOCK_CLASS_SUFFIX;d=d.classList[0];return-1<d.indexOf(b,d.length-b.length)},isSectionBlock:function(d){return-1<d.className.indexOf(e.SECTIONBLOCK_CLASS)},isSectionBreak:function(d){return-1<d.className.indexOf(e.SECTIONBREAK_CLASS)},isTableOfContent:function(d){return-1<d.className.indexOf(e.TABLEOFCONTENT_CLASS)},isHeading:function(d){return-1<
d.className.indexOf(e.HEADING1_CLASS)||-1<d.className.indexOf(e.HEADING2_CLASS)||-1<d.className.indexOf(e.HEADING3_CLASS)},isHyperLink:function(d){return-1<d.className.indexOf(e.HYPERLINK_CLASS)},isImage:function(d){return-1<d.className.indexOf(e.IMAGE_CLASS)},isLiveControl:function(d){return-1<d.className.indexOf(e.LIVE_CONTROL_CLASS)},getEquation:function(d){d=f(".MathEquation",d);return 0<d.length?d[0]:null},isEquationNode:function(d){return-1<d.className.indexOf(e.EQUATIONNODE_CLASS)},isTitle:function(d){return-1<
d.className.indexOf(e.TITLE_CLASS)},isParagraph:function(d){return-1<d.className.indexOf(e.PARAGRAPH_CLASS)},isUnorderedList:function(d){return-1<d.className.indexOf(e.LIST_CLASS)&&d.nodeName===e.UNORDERED_LIST_NODENAME},isOrderedList:function(d){return-1<d.className.indexOf(e.LIST_CLASS)&&d.nodeName===e.ORDERED_LIST_NODENAME},isCodeExample:function(d){return-1<d.className.indexOf(e.CODE_EXAMPLE_CLASS)},_replacePXWithPT:function(d){return d.replace(e.REGEX_FOR_PX,e.POINT_UNIT)},_fontWeightNumberToName:function(d){return"700"===
d?"bold":"400"===d?"normal":d},_rgba2rgb:function(d){return d.replace(/rgba(\(.*), 1\)/,"rgb$1)")}}})},"MW/rtc/plugins/saveaspdf/document/BaseDocumentWriterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/saveaspdf/document/BaseDocumentWriter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/saveaspdf/document/BaseDocumentWriter":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/saveaspdf/PDFWriterInterface","MW/rtc/plugins/saveaspdf/utils/XSLConstants","MW/rtc/plugins/saveaspdf/utils/XSLFOWriterUtilities"],function(g,f,e,d){return g(f,{createElement:function(b,a){var c=this._createRoot(b.ROOT_TAG_NAME,b),d=this._createLayoutMasterSet(b,a);c.documentElement.appendChild(d);d=this._createPageSequence(b,a);c.documentElement.appendChild(d);return c},getTypes:function(){return[e.BASE_DOCUMENT]},_createRoot:function(b,a){var c;document.implementation&&document.implementation.createDocument&&
(c=document.implementation.createDocument(a.NAMESPACE_URL,a.NAMESPACE_TAG+":"+a.ROOT_TAG_NAME,null));return c},_createLayoutMasterSet:function(b,a){var c=d.createXMLElement(b,b.REGION_BODY);d.setAttribute(c,a.MARGIN,a.MARGIN_VALUE);var e=d.createXMLElement(b,b.REGION_AFTER);d.setAttribute(e,a.REGION_NAME,a.REGION_NAME_VALUE);d.setAttribute(e,a.EXTENT,a.EXTENT_VALUE);d.setAttribute(e,a.DISPLAY_ALIGN,a.DISPLAY_ALIGN_VALUE);var f=d.createXMLElement(b,b.SIMPLE_PAGE_MASTER);d.setAttribute(f,a.MASTER_NAME,
a.PAGE_MASTER);d.setAttribute(f,a.MARGIN_BOTTOM,a.MARGIN_VALUE);f.appendChild(c);f.appendChild(e);c=d.createXMLElement(b,b.LAYOUT_MASTER);c.appendChild(f);return c},_createPageSequence:function(b,a){var c=d.createXMLElement(b,b.PAGE_SEQUENCE);d.setAttribute(c,a.FONT_FAMILY,a.SERIF);d.setAttribute(c,a.MASTER_REFERENCE,a.PAGE_MASTER);var e=d.createXMLElement(b,b.STATIC_CONTENT);d.setAttribute(e,a.FLOW_NAME,a.REGION_NAME_VALUE);var f=d.createXMLElement(b,b.BLOCK);d.setAttribute(f,a.TEXT_ALIGN,a.CENTER);
d.setAttribute(f,a.FONT_FAMILY,a.ARIAL);d.setAttribute(f,a.FONT_SIZE,a.PAGE_NUMBER_FONT_SIZE);f.appendChild(d.createXMLElement(b,b.PAGE_NUMBER));e.appendChild(f);f=d.createXMLElement(b,b.FLOW);d.setAttribute(f,a.FLOW_NAME,a.XSL_REGION_BODY);c.appendChild(e);c.appendChild(f);return c}})})},"MW/rtc/plugins/saveaspdf/PDFWriterInterface":function(){define(["dojo/_base/declare","mw-log/Log"],function(g,f){return g(null,{getTypes:function(){f.error("Subclasses must override getTypes.")},setWriters:function(e){},
setOptions:function(e){},createElement:function(e,d,b){f.error("Subclasses must override createElement.")}})})},"MW/rtc/plugins/saveaspdf/document/EquationWriterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/saveaspdf/document/EquationWriter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/saveaspdf/document/EquationWriter":function(){define("dojo/query dojo/_base/declare dojo/dom-class MW/rtc/plugins/saveaspdf/PDFWriterInterface MW/equations/renderer/Renderer MW/rtc/plugins/saveaspdf/utils/XSLConstants MW/rtc/plugins/saveaspdf/utils/XSLFOWriterUtilities".split(" "),
function(g,f,e,d,b,a,c){return f(d,{_renderer:new b,SCALING_FACTOR:4,getTypes:function(){return[a.EQUATION]},isSimpleEquation:function(a){a=this._getMathNode(a);var c,b,d;a&&1===a.children.length&&(c=a.children[0]);c&&1===c.children.length&&(b=c.children[0]);b&&1===b.children.length&&(d=b.children[0]);if(d&&e.contains(d,"MathTextBox"))return d},createElement:function(a,c,b){a=this._getURIFromEquation(a);return this._createChildElement(c,b,a)},_getMathNode:function(c){return g("."+a.EQUATION_CLASS,
c)[0]},_getURIFromEquation:function(c){var b=c;-1===c.className.indexOf(a.EQUATION_CLASS)&&(b=this._getMathNode(c));return this._renderer.exportDomnodeToImageURL(b,a.FONT_SCALING_FACTOR*this.SCALING_FACTOR)},_createChildElement:function(a,b,d){a=c.createXMLElement(a,a.EXTERNAL_GRAPHIC);this._applyStyles(a,b,d);return a},_applyStyles:function(a,b,d){c.setAttribute(a,b.SOURCE,d.dataURL);this._scaleToFitInPage(a,b,d)},_scaleToFitInPage:function(b,d,e){c.setAttribute(b,d.CONTENT_HEIGHT,Math.floor(e.height/
this.SCALING_FACTOR)+a.POINT_UNIT);c.setAttribute(b,d.CONTENT_WIDTH,Math.floor(e.width/this.SCALING_FACTOR)+a.POINT_UNIT);c.setAttribute(b,d.VERTICAL_ALIGN,e.verticalAlign*a.FONT_SCALING_FACTOR+"pt")}})})},"MW/rtc/plugins/saveaspdf/document/HyperlinkWriterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/saveaspdf/document/HyperlinkWriter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},
"MW/rtc/plugins/saveaspdf/document/HyperlinkWriter":function(){define(["dojo/_base/declare","MW/rtc/plugins/saveaspdf/utils/XSLConstants","MW/rtc/plugins/saveaspdf/utils/XSLFOWriterUtilities","MW/rtc/plugins/saveaspdf/document/ParagraphWriter"],function(g,f,e,d){return g(d,{getTypes:function(){return[f.HYPERLINK]},createElement:function(b,a,c){return this._createChildElement(a,b,c)},_createChildElement:function(b,a,c){var d=e.createXMLElement(b,b.BASIC_LINK),g=e.getCommonStyles(a);e.applyStyles(d,
g);g=a.href;0===g.indexOf(f.INTERNAL_LINK_PREFIX)?e.setAttribute(d,c.INTERNAL_DESTINATION,g.substring(f.INTERNAL_LINK_PREFIX.length)):e.setAttribute(d,c.EXTERNAL_DESTINATION,g);this.insertRichTextElement(a.children,d,b,c);return d}})})},"MW/rtc/plugins/saveaspdf/document/ParagraphWriter":function(){define(["dojo/_base/array","dojo/_base/declare","MW/rtc/plugins/saveaspdf/PDFWriterInterface","MW/rtc/plugins/saveaspdf/utils/XSLConstants","MW/rtc/plugins/saveaspdf/utils/XSLFOWriterUtilities"],function(g,
f,e,d,b){return f(e,{getTypes:function(){return[d.PARAGRAPH]},setWriters:function(a){this._writers=a},createElement:function(a,c,d){var e=this._getProperElement(a),f=this._createWrapperElement(e.line,c),g=a.rteNode?a.rteNode.anchorId:null;!g&&(a.firstElementChild&&a.firstElementChild.rteNode&&a.firstElementChild.rteNode.anchorId)&&(g=a.firstElementChild.rteNode.anchorId);g&&b.setAttribute(f,d.ID,g);e.outputs?(this.insertRichTextElement(e.line.children,f,c,d),a=this.insertRichTextElement(e.outputs,
f,c,d)):a=this.insertRichTextElement(e.line.children,f,c,d);return{paragraph:f,output:a}},insertRichTextElement:function(a,c,e,f){var g=null,m;Array.prototype.forEach.apply(a,[function(a){if(b.isHyperLink(a))m=this._writers[d.HYPERLINK],c.appendChild(m.createElement(a,e,f));else if(b.isOutputParagraph(a))m=this._writers[d.OUTPUT],g=m.createElement(a,e,f);else if(b.isEquationNode(a)){m=this._writers[d.EQUATION];var n=m.isSimpleEquation(a);n?this._createStyledTextElements(n.parentNode,e).forEach(function(a){c.appendChild(a)}):
c.appendChild(m.createElement(a,e,f))}else b.isImage(a)?(m=this._writers[d.IMAGE],c.appendChild(m.createElement(a,e,f))):b.isLiveControl(a)?(m=this._writers[d.LIVE_CONTROL],m.createElement(a,e).forEach(function(a){c.appendChild(a)})):this._createStyledTextElements(a,e).forEach(function(a){c.appendChild(a)})},this]);return g},_createWrapperElement:function(a,c){var e=b.createXMLElement(c,c.BLOCK),f=b.getCommonStyles(a),g=parseInt(f["margin-left"],10)+parseInt(f["margin-right"],10);f["margin-left"]=
"0pt";if("center"===f["text-align"]){var m=0;Array.prototype.forEach.apply(a.children,[function(a){m+=a.clientWidth*d.FONT_SCALING_FACTOR}]);m>d.AVAILABLE_WIDTH-g&&(f["text-align"]="left")}b.isCode(a)?(f["background-color"]="#F7F7F7",f["white-space"]="pre",f["margin-left"]="3pt",f["padding-left"]="10pt"):f["white-space-collapse"]="false";b.applyStyles(e,f);return e},_createStyledTextElements:function(a,c){var e=a.lastElementChild,f=a.firstElementChild,l=1===a.childElementCount;return g.map(a.childNodes,
function(a){var g=a.textContent;a===e&&(0<g.length&&" "===g[g.length-1])&&(g=g.slice(0,g.length-1)+d.NBSP);a===f&&(0<g.length&&" "===g[0])&&(g=d.NBSP+g.slice(1,g.length));if(g)a=b.createInlineElement(a,c);else if(l)g=d.NBSP,a=b.createXMLElement(c,c.INLINE);else return null;g=b.createTextTag(g);a.appendChild(g);return a}).filter(function(a){return null!==a})},_getProperElement:function(a){return-1===a.className.indexOf("inlineWrapper")?{line:a,outputs:null}:{line:a.children[0],outputs:2===a.children.length?
[a.children[1]]:null}}})})},"MW/rtc/plugins/saveaspdf/document/ImageWriterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/saveaspdf/document/ImageWriter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/saveaspdf/document/ImageWriter":function(){define(["dojo/_base/declare","MW/rtc/plugins/saveaspdf/document/ParagraphWriter","MW/rtc/plugins/saveaspdf/utils/XSLConstants",
"MW/rtc/plugins/saveaspdf/utils/XSLFOWriterUtilities"],function(g,f,e,d){return g(f,{getTypes:function(){return[e.IMAGE]},createElement:function(b,a,c){return this._createChildElement(a,b,c)},_createChildElement:function(b,a,c){b=d.createXMLElement(b,b.EXTERNAL_GRAPHIC);d.setAttribute(b,c.SOURCE,a.src);d.setAttribute(b,c.CONTENT_HEIGHT,a.height*e.FONT_SCALING_FACTOR+e.POINT_UNIT);d.setAttribute(b,c.CONTENT_WIDTH,a.width*e.FONT_SCALING_FACTOR+e.POINT_UNIT);a=d.getCommonStyles(a);d.setAttribute(b,c.VERTICAL_ALIGN,
a["vertical-align"]);d.setAttribute(b,"scaling","non-uniform");return b}})})},"MW/rtc/plugins/saveaspdf/document/LiveControlWriterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/saveaspdf/document/LiveControlWriter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/saveaspdf/document/LiveControlWriter":function(){define(["dojo/_base/declare","MW/rtc/plugins/saveaspdf/document/ParagraphWriter",
"MW/rtc/plugins/saveaspdf/utils/XSLConstants"],function(g,f,e){return g(f,{_LIVE_CONTROL_DIV:"liveControlTextView",getTypes:function(){return[e.LIVE_CONTROL]},createElement:function(d,b){var a=d.getElementsByClassName(this._LIVE_CONTROL_DIV)[0];return this._createStyledTextElements(a,b)}})})},"MW/rtc/plugins/saveaspdf/document/ListWriterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/saveaspdf/document/ListWriter"],function(g,f,e){return g(f,
{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/saveaspdf/document/ListWriter":function(){define(["dojo/_base/declare","MW/rtc/plugins/saveaspdf/utils/XSLConstants","MW/rtc/plugins/saveaspdf/utils/XSLFOWriterUtilities","MW/rtc/plugins/saveaspdf/document/ParagraphWriter"],function(g,f,e,d){return g(d,{_LIST_ITEM_MARGIN:"18pt",getTypes:function(){return[f.LIST]},setWriters:function(b){this._writers=b},createElement:function(b,a,c){var d=this._createListBlockElement(b,
a,c),f=this._getListType(b);Array.prototype.forEach.apply(b.children,[function(b,g){var p=e.getCommonStyles(b);p["margin-left"]=this._LIST_ITEM_MARGIN;var n=this._createListItem(b,g,f,a,c);d.appendChild(n);e.applyStyles(n,p)},this]);return d},_createListBlockElement:function(b,a,c){b=e.createXMLElement(a,a.LIST_BLOCK);this._addAttributesForListBlock(b,c);return b},_createListItem:function(b,a,c,d,f){var g=e.createXMLElement(d,d.LIST_ITEM);g.appendChild(this._createListItemLabel(d,f,a+1,c));g.appendChild(this._createListItemBody(d,
f,b));return g},_addAttributesForListBlock:function(b,a){e.setAttribute(b,a.PROVISIONAL_DISTANCE,a.LIST_INDENT);e.setAttribute(b,a.START_INDENT,a.LIST_INDENT);e.setAttribute(b,a.END_INDENT,a.LIST_INDENT)},_createListItemLabel:function(b,a,c,d){var g=e.createXMLElement(b,b.LIST_ITEM_LABEL);e.setAttribute(g,a.END_INDENT,a.LABEL_END);e.setAttribute(g,a.TEXT_ALIGN,a.RIGHT);a=e.createXMLElement(b,b.BLOCK);g.appendChild(a);var l;b=e.createXMLElement(b,b.INLINE);d===f.UNORDERED_LIST?l=e.createTextTag(f.SQUARE_LIST_LABEL):
d===f.ORDERED_LIST&&(l=e.createTextTag(c+"."));b.appendChild(l);a.appendChild(b);return g},_createListItemBody:function(b,a,c){var d=e.createXMLElement(b,b.LIST_ITEM_BODY);e.setAttribute(d,a.START_INDENT,a.BODY_START);var f=e.createXMLElement(b,b.BLOCK);d.appendChild(f);this.insertRichTextElement(c.children,f,b,a);return d},_getListType:function(b){if(e.isUnorderedList(b))return f.UNORDERED_LIST;if(e.isOrderedList(b))return f.ORDERED_LIST}})})},"MW/rtc/plugins/saveaspdf/document/ParagraphWriterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/saveaspdf/document/ParagraphWriter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/saveaspdf/document/TableOfContentWriterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/saveaspdf/document/TableOfContentWriter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},
"MW/rtc/plugins/saveaspdf/document/TableOfContentWriter":function(){define(["dojo/_base/array","dojo/_base/declare","MW/rtc/plugins/saveaspdf/PDFWriterInterface","MW/rtc/plugins/saveaspdf/utils/XSLConstants","MW/rtc/plugins/saveaspdf/utils/XSLFOWriterUtilities"],function(g,f,e,d,b){return f(e,{getTypes:function(){return[d.TABLEOFCONTENT]},setWriters:function(a){this._writers=a},createElement:function(a,c,d){var e=b.createXMLElement(c,c.BLOCK),f=b.getCommonStyles(a);b.applyStyles(e,f);this._removeBorders(e);
f=this._createHeader(a,c,d);e.appendChild(f);a=this._createEntries(a,c,d);e.appendChild(a);return e},_createHeader:function(a,c,b){a=this._writers[d.PARAGRAPH].createElement(a.children[0],c,b).paragraph;this._removeBorders(a);return a},_createEntries:function(a,c,e){a=a.children[1];var f=b.getCommonStyles(a),l=b.createXMLElement(c,c.BLOCK);b.applyStyles(l,f);this._removeBorders(l);var m=this._writers[d.HYPERLINK],p,n,q,r,s=0;g.forEach(a.children,function(a){a.className===d.HYPERLINK_CLASS?(n=b.createXMLElement(c,
c.BLOCK),b.setAttribute(n,e.TEXT_ALIGN_LAST,e.JUSTIFY),b.setAttribute(n,e.MARGIN_LEFT,s+d.POINT_UNIT),p=m.createElement(a,c,e),p.textContent=p.textContent.replace("\n",""),n.appendChild(p),q=b.createXMLElement(c,c.LEADER),b.setAttribute(q,e.LEADER_PATTERN,d.DOTS),n.appendChild(q),r=b.createXMLElement(c,c.PAGE_NUMBER_CITATION),b.setAttribute(r,e.REF_ID,p.getAttribute(e.INTERNAL_DESTINATION)),n.appendChild(r),l.appendChild(n),s=0):s=3*a.textContent.length});return l},_removeBorders:function(a){b.setAttribute(a,
"border-bottom","0pt none");b.setAttribute(a,"border-right","0pt none");b.setAttribute(a,"border-left","0pt none");b.setAttribute(a,"border-top","0pt none")}})})},"MW/rtc/plugins/saveaspdf/outputs/FigureWriterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/saveaspdf/outputs/FigureWriter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.embeddedoutputs"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/saveaspdf/outputs/FigureWriter":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/saveaspdf/PDFWriterInterface","MW/rtc/plugins/saveaspdf/utils/XSLConstants","MW/rtc/plugins/saveaspdf/utils/XSLFOWriterUtilities"],function(g,f,e,d){return g(f,{constructor:function(b){this._outputView=b.getEmbeddedOutputsView()},getTypes:function(){return[e.FIGURES]},setOptions:function(b){this._options=b},createElement:function(b,a,c){var d=this._createWrapperElement(a,b);b=this._createChildElement(a,c,b);d.appendChild(b);return d},_createWrapperElement:function(b,a){var c=d.createXMLElement(b,
b.BLOCK),e=d.getCommonStyles(a);d.applyStyles(c,e);return c},_createChildElement:function(b,a,c){b=d.createXMLElement(b,b.EXTERNAL_GRAPHIC);var e=c.firstChild.querySelector("img.figureImage"),f=this._outputView.getOutputFromOutputDiv(c);this._hasValidOptions()&&f.canPrintToFile()?(c=this._options.figurePath+"/"+f.uid+"."+this._options.figureFormat,f=f.printToFile(this._options.figureFormat,this._options.figureResolution,c),this._options.promiseList.push(f),d.setAttribute(b,a.SOURCE,c)):d.setAttribute(b,
a.SOURCE,e.src);this._applyStyles(b,a,e);return b},_applyStyles:function(b,a,c){var f=c.clientWidth*e.FONT_SCALING_FACTOR,g=c.offsetLeft;c.offsetParent===c.parentElement&&(g+=c.parentElement.offsetLeft);c=e.AVAILABLE_WIDTH-2*g;f>c&&(f=c);d.setAttribute(b,a.CONTENT_WIDTH,f+e.POINT_UNIT)},_hasValidOptions:function(){return this._options&&this._options.figurePath&&this._options.figureFormat&&this._options.figureResolution&&this._options.promiseList?!0:!1}})})},"MW/rtc/plugins/saveaspdf/outputs/MatrixWriterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/saveaspdf/outputs/MatrixWriter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/saveaspdf/outputs/MatrixWriter":function(){define("dojo/_base/declare dojo/dom-class MW/rtc/plugins/saveaspdf/PDFWriterInterface MW/rtc/plugins/saveaspdf/utils/XSLConstants MW/rtc/plugins/saveaspdf/utils/XSLFOWriterUtilities MW/rtc/plugins/saveaspdf/outputs/WriterUtils MW/rtc/plugins/view/exporters/HTMLOutputUtils".split(" "),
function(g,f,e,d,b,a,c){return g(e,{MAX_CHARACTERS:80,_SUMMARY_FONT_FAMILY:"'Consolas', sans-serif",getTypes:function(){return[d.MATRIX]},createElement:function(a,d,e){var g=b.createXMLElement(d,d.BLOCK),p=b.getCommonStyles(a);a=c.processOutput(a);b.applyStyles(g,p);Array.prototype.forEach.apply(a.firstChild.children,[function(a){var c,h=b.getCommonStyles(a);h[e.WHITE_SPACE]=e.WHITE_SPACE_PRESERVE;h[e.FONT_FAMILY]="";f.contains(a,"valueContainer")?(c=JSON.parse(a.dataset.layout),c=this._getChoppedData(c,
this._getValue(a),d,e)):f.contains(a,"veVariableName")?c=this._getNameAndSummary(a,d,e):f.contains(a,"veScalingFactor")?c=this._getScalingFactor(a,d,e):(c=b.createXMLElement(d,d.BLOCK),c.appendChild(b.createTextTag(a.textContent)));b.applyStyles(c,h);g.appendChild(c)},this]);return g},_getValue:function(a){return a.textContent},_getScalingFactor:function(a,c,d){return b.createTextTag("")},_getNameAndSummary:function(a,c,d){var e=a.firstChild;a=this._createMetaSummaryInfo(a,c,d);c=b.createXMLElement(c,
c.BLOCK);c.appendChild(b.createTextTag(e.textContent));c.appendChild(a);return c},_createMetaSummaryInfo:function(c,b,d){c=c.lastChild;c.displayType=b.INLINE;return a.createElement(c,b,d)},_getChoppedData:function(a,c,d,e){var f=this._getAmountOfDataToShow(a),g=f.totalCharactersInRow,q=f.totalCharacters;this._styleHeader(g,e);var r=b.createXMLElement(d,d.BLOCK),s;c.split("\n").forEach(function(a,c){a&&(s=b.createXMLElement(d,d.BLOCK),s.appendChild(b.createTextTag(a.substring(0,q))),this._addHorizontalEllipsis(c,
g,d,e,s),r.appendChild(s))},this);this._addVerticalEllipsis(a.totalRows,d,e,r);return r},_styleHeader:function(a,c){},_getAmountOfDataToShow:function(a){var c=a.charsPerColumn,b=a.totalColumns*a.charsPerColumn;a=Math.min(Math.floor(this.MAX_CHARACTERS/c),a.totalColumns)*c;return{totalCharactersInRow:b,totalCharacters:a}},_showEllipsis:function(){return!0},_addHorizontalEllipsis:function(a,c,d,e,f){0===a&&(c>this.MAX_CHARACTERS&&this._showEllipsis())&&(a=b.createXMLElement(d,d.EXTERNAL_GRAPHIC),b.setAttribute(a,
e.SOURCE,e.HORIZONTAL_ELLIPSIS),f.appendChild(a))},_addVerticalEllipsis:function(a,c,d,e){10<a&&this._showEllipsis()&&(a=b.createXMLElement(c,c.EXTERNAL_GRAPHIC),b.setAttribute(a,d.SOURCE,d.VERTICAL_ELLIPSIS),b.setAttribute(a,d.PADDING_LEFT,d.VERTICAL_ELLIPSIS_PADDING_LEFT),e.appendChild(a))}})})},"MW/rtc/plugins/saveaspdf/outputs/WriterUtils":function(){define(["dojo/dom-class","dojo/dom-style","MW/rtc/plugins/saveaspdf/utils/XSLFOWriterUtilities"],function(g,f,e){return{_ELEMENT_NODE:1,_TEXT_NODE:3,
createElement:function(d,b,a){var c=f.getComputedStyle(d),c=this._getDisplayType(c,d,b),c=e.createXMLElement(b,c),h=e.getCommonStyles(d);e.applyStyles(c,h);for(h=0;h<d.childNodes.length;h++){var k=d.childNodes[h];g.contains(k,"doNotExport")||(this._isElementNode(k)?c.appendChild(this._createElementNode(k,b,a)):this._isTextNode(k)&&c.appendChild(this._createTextNode(k)))}return c},_getDisplayType:function(d,b,a){return"inline"===d.display||b.displayType&&"inline"===b.displayType?a.INLINE:a.BLOCK},
_isElementNode:function(d){return d.nodeType===this._ELEMENT_NODE},_isTextNode:function(d){return d.nodeType===this._TEXT_NODE},_createElementNode:function(d,b,a){return"A"===d.nodeName?e.createTextTag(d.text):"BR"===d.nodeName?e.createTextTag("\n"):g.contains(d,"verticalEllipsis")?this._createVerticalEllipsisNode(b,a):this.createElement(d,b,a)},_createTextNode:function(d){return e.createTextTag(d.data)},_createVerticalEllipsisNode:function(d,b){var a=e.createXMLElement(d,d.BLOCK),c=e.createXMLElement(d,
d.EXTERNAL_GRAPHIC);e.setAttribute(c,b.SOURCE,b.VERTICAL_ELLIPSIS);e.setAttribute(c,b.PADDING_LEFT,b.VERTICAL_ELLIPSIS_PADDING_LEFT);a.appendChild(c);return a},_createHorizontalEllipsisNode:function(d,b){var a=e.createXMLElement(d,d.BLOCK),c=e.createXMLElement(d,d.EXTERNAL_GRAPHIC);e.setAttribute(c,b.SOURCE,b.HORIZONTAL_ELLIPSIS);a.appendChild(c);return a}}})},"MW/rtc/plugins/saveaspdf/outputs/TableWriterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/saveaspdf/outputs/TableWriter"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/saveaspdf/outputs/TableWriter":function(){define("dojo/_base/declare dojo/dom-class MW/rtc/plugins/saveaspdf/PDFWriterInterface MW/rtc/plugins/saveaspdf/utils/XSLConstants MW/rtc/plugins/saveaspdf/utils/XSLFOWriterUtilities MW/rtc/plugins/saveaspdf/outputs/WriterUtils".split(" "),function(g,f,e,d,b,a){return g(e,{MAX_CHARACTERS:80,getTypes:function(){return[d.INTERACTIVE_VARIABLE]},
createElement:function(a,d,e){var f=b.createXMLElement(d,d.BLOCK),g=b.getCommonStyles(a);b.applyStyles(f,g);var p=this._getNameAndSummary(a,d,e,g);f.appendChild(p);p=b.createXMLElement(d,"table");p.setAttribute("wrap-option","no-wrap");var n=this._getHeaderInfo(a,d,e,g);p.appendChild(n);a=this._getTableContents(a,d,e,g);p.appendChild(a);f.appendChild(p);return f},_getNameAndSummary:function(c,d,e,f){c=c.getElementsByClassName("summaryBarContainer")[0];a.createElement(c,d,e);e=b.createXMLElement(d,
d.BLOCK);c=c.children;for(var g=0;g<c.length;g++){var p=b.createXMLElement(d,d.BLOCK);p.appendChild(b.createTextTag(c[g].textContent));e.appendChild(p)}b.applyStyles(e,f);return e},_getHeaderInfo:function(a,d,e,f){a=a.getElementsByClassName("mw-table-header-label");e=b.createXMLElement(d,"table-header");for(var g=b.createXMLElement(d,"table-row"),p=0;p<a.length;p++){var n=b.createXMLElement(d,"table-cell"),q=b.createXMLElement(d,d.BLOCK);q.appendChild(b.createTextTag(a[p].textContent));n.appendChild(q);
g.appendChild(n)}e.appendChild(g);b.applyStyles(e,f);return e},_getTableContents:function(a,d,e,f){a=a.getElementsByClassName("mw-table-row");e=b.createXMLElement(d,"table-body");for(f=0;f<a.length;f++){for(var g=b.createXMLElement(d,"table-row"),p=a[f].getElementsByClassName("mw-table-cell-content"),n=0;n<p.length;n++){var q=b.createXMLElement(d,"table-cell"),r=b.createXMLElement(d,d.BLOCK);r.appendChild(b.createTextTag(p[n].textContent));q.appendChild(r);g.appendChild(q)}e.appendChild(g)}return e}})})},
"MW/rtc/plugins/saveaspdf/outputs/OutputWriterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/saveaspdf/outputs/OutputWriter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.embeddedoutputs"]}},createInstance:function(d){d=d.getEmbeddedOutputsView();return new e(d)}})})},"MW/rtc/plugins/saveaspdf/outputs/OutputWriter":function(){define(["dojo/_base/declare","MW/rtc/plugins/saveaspdf/PDFWriterInterface","MW/rtc/plugins/saveaspdf/utils/XSLConstants",
"MW/rtc/plugins/saveaspdf/utils/XSLFOWriterUtilities"],function(g,f,e,d){return g(f,{constructor:function(b){this._embeddedOutputsView=b},getTypes:function(){return[e.OUTPUT]},setWriters:function(b){this._writers=b},createElement:function(b,a,c){var d=this._createWrapperElement(a,b);Array.prototype.forEach.apply(b.children,[function(b){0<b.children.length&&d.appendChild(this._createOutputRegion(b,a,c))},this]);return d},_createWrapperElement:function(b,a){var c=d.createXMLElement(b,b.BLOCK),e=d.getCommonStyles(a);
d.applyStyles(c,e);return c},_createOutputRegion:function(b,a,c){var d=this._embeddedOutputsView.getOutputFromOutputDiv(b);if(d.getPdfContent)return d.getPdfContent(b,a,c);d=this._getOutputWriterType(b);return this._writers[d].createElement(b,a,c)},_getOutputWriterType:function(b){if(d.isWarning(b)||d.isError(b))return e.WARNING_ERROR;if(d.isFigure(b))return e.FIGURES;if(d.isSymEquation(b))return e.SYMEQUATION;if(d.isText(b))return e.TEXT;if(d.isVariable(b))return e.VARIABLES;if(d.isVariableString(b))return e.VARIABLE_STRING;
if(d.isMatrix(b)||d.isInteractiveMatrix(b))return e.MATRIX;if(d.isInteractiveVariable(b))return e.INTERACTIVE_VARIABLE}})})},"MW/rtc/plugins/saveaspdf/outputs/SymEquationWriterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/saveaspdf/outputs/SymEquationWriter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/saveaspdf/outputs/SymEquationWriter":function(){define("dojo/_base/declare dojo/dom-class dojo/query MW/rtc/plugins/saveaspdf/PDFWriterInterface MW/rtc/plugins/saveaspdf/utils/XSLConstants MW/rtc/plugins/saveaspdf/utils/XSLFOWriterUtilities".split(" "),
function(g,f,e,d,b,a){return g(d,{getTypes:function(){return[b.SYMEQUATION]},setWriters:function(a){this._writers=a},createElement:function(c,b,d){var g=this._createWrapperElement(b,c),m=c.children[0];c=0<e(".inlineSymbolicElement",c).length;var p=m.childNodes[0];f.contains(p,"embeddedOutputsVariableElement")&&g.appendChild(this._createTextElement(p,b,c));m=a.getEquation(m);g.appendChild(this._createEquationElement(m,b,d,c));return g},_createEquationElement:function(c,d,e,f){var g=this._writers[b.EQUATION];
f=this._createWrapperElement(d,c,f);var p=a.getCommonStyles(c);f.appendChild(g.createElement(c,d,e));a.applyStyles(f,p);return f},_createTextElement:function(c,b,d){b=this._createWrapperElement(b,c,d);d=a.getCommonStyles(c);b.appendChild(a.createTextTag(c.textContent));a.applyStyles(b,d);return b},_createWrapperElement:function(c,b,d){c=a.createXMLElement(c,d?c.INLINE:c.BLOCK);b=a.getCommonStyles(b);a.applyStyles(c,b);return c}})})},"MW/rtc/plugins/saveaspdf/outputs/TextWriterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/saveaspdf/outputs/TextWriter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/saveaspdf/outputs/TextWriter":function(){define(["dojo/_base/declare","MW/rtc/plugins/saveaspdf/PDFWriterInterface","MW/rtc/plugins/saveaspdf/outputs/WriterUtils","MW/rtc/plugins/saveaspdf/utils/XSLConstants"],function(g,f,e,d){return g(f,{getTypes:function(){return[d.TEXT,d.WARNING_ERROR,
d.VARIABLE_STRING]},createElement:function(b,a,c){return e.createElement(b,a,c)}})})},"MW/rtc/plugins/saveaspdf/outputs/VariableWriterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/saveaspdf/outputs/VariableWriter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/saveaspdf/outputs/VariableWriter":function(){define(["dojo/_base/declare","MW/rtc/plugins/saveaspdf/PDFWriterInterface",
"MW/rtc/plugins/saveaspdf/outputs/WriterUtils","MW/rtc/plugins/saveaspdf/utils/XSLConstants"],function(g,f,e,d){return g(f,{getTypes:function(){return[d.VARIABLES]},createElement:function(b,a,c){return e.createElement(b,a,c)}})})},"MW/rtc/plugins/service/CodingUIBackendCodeProviderProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./CodingUIBackendCodeProvider"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document"]}},createInstance:function(d){return new e(d)}})})},
"MW/rtc/plugins/service/CodingUIBackendCodeProvider":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin","MW/rtc/EditorUtilities"],function(g,f,e){return g(f,{constructor:function(d){this._document=d},getCode:function(){return this._document.getCodeText()},getAbsolutePositionInCode:function(d){return e.getOffsetFromLine(this.getCode(),d.line-1)[0]+d.column-1}})})},"MW/rtc/plugins/service/CodingUIBackendServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"MW/rtc/plugins/language/matlab/utilities/MatlabPluginUtilities","MW/rtc/plugins/service/CodingUIBackendService"],function(g,f,e,d){return g(f,{requires:function(){return{createInstance:["rtc.document","rtc.cursor","rtc.editordataservice","rtc.code.codingui.codeprovider","rtc.backingstore"]}},createInstance:function(b,a,c,e,f){return new d(b,a,c,e,f)}})})},"MW/rtc/plugins/service/CodingUIBackendService":function(){define(["dojo/_base/declare","dojo/_base/lang","mw-log/Log","MW/rtc/datamodel/FileBackingStoreUtilities"],
function(g,f,e,d){return g(null,{constructor:function(b,a,c,d,e){this._editorDataService=c;this._document=b;this._cursor=a;this._codeProvider=d;this._backingStore=e;this._latestPromise=null},requestMetaData:function(b,a,c){this.isBusy()&&this.cancelRequest();this._requestMetaData(b,a,this._codeProvider.getCode(),this._codeProvider.getAbsolutePositionInCode(c))},_requestMetaData:function(b,a,c,d){this._latestPromise=this._editorDataService.request(b,{uri:this._getFilePath(),document:c,cursor:d},1E4);
b=this._cursor.getLineColumn();a=f.hitch(this,"_preprocessResultsCallback",b,a);this._latestPromise.then(a,function(a){"CODINGUICANCEL"!==a&&e.info(a)})},_getFilePath:function(){return d.getAbsoluteFilePathFromBackingStore(this._backingStore)},cancelRequest:function(){this._latestPromise&&(this._latestPromise.cancel("CODINGUICANCEL"),this._latestPromise=null)},isBusy:function(){return this._latestPromise&&!this._latestPromise.isResolved()},_preprocessResultsCallback:function(b,a,c){var d=this._cursor.getLineColumn();
if(!(b.line!==d.line||b.column!==d.column)){b=c.results;c=c.maxResults;d=null;try{d=JSON.parse(b)}catch(e){}a(d,c);this._latestPromise=null}}})})},"MW/rtc/plugins/service/FocusServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/service/FocusService"],function(g,f,e){return g(f,{requires:function(){return{isApplicable:[],createInstance:["rtc.keyhandler","rtc.eventhandler","rtc.cursorcontroller","rtc.scrollpane"]}},createInstance:function(d,
b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/plugins/service/FocusService":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin"],function(g,f,e,d){return g(d,{constructor:function(b,a,c,d){this._keyHandler=b;this._cursorController=c;this._eventHandler=a;this._domTarget=d;this.own(e.after(this._keyHandler,"onFocus",f.hitch(this,"_doFocus")));this.own(e.after(this._keyHandler,"onBlur",f.hitch(this,"_doBlur"),!0));this.own(e.after(this._eventHandler,
"onFocus",f.hitch(this,"setFocus")))},_doFocus:function(){this._keyHandler.hasFocus()&&(this._cursorController.show(!0,!0),this.onFocus())},_doBlur:function(b){if((b=b.relatedTarget)&&this._domTarget!==b)this._cursorController.hide(),this.onBlur()},onFocus:function(){},onBlur:function(){},setFocus:function(){this._cursorController.positionsAreValid()||this._cursorController.reinitializeCursors();this._keyHandler.focus()},setBlur:function(){this._keyHandler.blur();this._cursorController.hide();this.onBlur()},
hasFocus:function(){return this._keyHandler.hasFocus()}})})},"MW/rtc/plugins/service/LineNumberServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LineNumberService"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/service/LineNumberService":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractCachedModelQueryService MW/rtc/browsersupport/BrowserSupportUtilities MW/rtc/model/CodeUtilities".split(" "),
function(g,f,e,d,b,a){return g(d,{constructor:function(a){this._lineNodeToLineMap=this._codeLineToLine=this._lineToCodeLine=null},getCodeLineNumberFromLineNumber:function(a){this._ensureBuilt();return this._lineToCodeLine[a]},getCodeLineNumberAtOrBeforeLineNumber:function(a){for(this._ensureBuilt();0<=a;a--)if(-1<this._lineToCodeLine[a])return this._lineToCodeLine[a];return 0},getLineNumberFromCodeLineNumber:function(a){this._ensureBuilt();var b=this._codeLineToLine[a];if(void 0===b)throw a="LineNumberService: Invalid code line number "+
a+". There are only "+this.getNumberOfCodeLines()+" lines of code.",Error(a);return b},getNumberOfCodeLines:function(){this._ensureBuilt();return 0===this._codeLineToLine.length?0:this._codeLineToLine.length-1},getLineNumber:function(a){this._ensureBuilt();a=this._lineNodeToLineMap.get(a);return 0<=a?a:-1},_build:function(){var c=this._internalDocument.root.children;this._lineToCodeLine=[];this._codeLineToLine=[];this._lineNodeToLineMap=b.createMap();var d=1;c.forEach(function(c,b){this._lineNodeToLineMap.set(c,
b);if(a.isCodeContainer(c,!0)){var e=d++;this._lineToCodeLine[b]=e;this._codeLineToLine[e]=b}else this._lineToCodeLine[b]=-1},this)}})})},"MW/rtc/plugins/service/OutputHandlerServiceProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/service/OutputHandlerService"],function(g,f,e,d){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:[]}},createInstance:function(){return new d},
destroyInstance:function(b){b.destroy()}})})},"MW/rtc/plugins/service/OutputHandlerService":function(){define(["dojo/_base/declare","mw-log/Log"],function(g,f){return g(null,{constructor:function(){this._outputHandlers={}},handleRawOutput:function(e,d){var b=e.outputData,a=e.type,c=this._outputHandlers[a];try{return c.getOutputFromData(b,d)}catch(h){return f.error("Error in getOutputFromData. Skipping output.\nOutput type: "+a+"\nOutput data: "+JSON.stringify(b),h),null}},registerOutputPlugin:function(e){e&&
e.OUTPUT_TYPE&&(this._outputHandlers[e.OUTPUT_TYPE]=e)},destroy:function(){this._outputHandlers={}}})})},"MW/rtc/plugins/service/TooltipServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/service/TooltipService"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:[]}},createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/service/TooltipService":function(){define(["dojo/_base/declare",
"dojo/_base/lang"],function(g,f){return g(null,{PRIORITY:{HOVER:0,AUTO:5,PROMPT:10,ON_DEMAND:15},constructor:function(){this._tooltipInfo=null},requestTooltip:function(e,d,b){b=b||this.PRIORITY.HOVER;if(this._tooltipInfo&&b<this._tooltipInfo.priority)return null;this._tooltipInfo&&this._closeTooltip();this._tooltipInfo=this._createTooltipInfo(e,d,b);this._showTooltip();return{remove:f.hitch(this,"_handleNotifyClosed",this._tooltipInfo)}},_createTooltipInfo:function(e,d,b){return{show:e,close:d,priority:b}},
_showTooltip:function(){this._tooltipInfo.show()},_closeTooltip:function(){this._tooltipInfo.close()},_handleNotifyClosed:function(e){e===this._tooltipInfo&&(this._tooltipInfo=null)},destroy:function(){}})})},"MW/rtc/plugins/settings/RtcSettingServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./RtcSettingService"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/settings/RtcSettingService":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin","MW/rtc/browsersupport/BrowserSupportUtilities"],function(g,f,e,d,b){return g(d,{constructor:function(){this._settingValueMap=b.createMap()},listenTo:function(a,c){var b=f.partial(function(a,c,b,d){a===b&&c(d)},a,c);return e.after(this,"_settingChanged",b,!0)},get:function(a,c){return this._settingValueMap.has(a)?this._settingValueMap.get(a):c},set:function(a,c){var b=this._settingValueMap.get(a);this._areValuesEqual(b,c)||(this._settingValueMap.set(a,
c),this._settingChanged(a,c))},_areValuesEqual:function(a,c){return JSON.stringify(a)===JSON.stringify(c)},_settingChanged:function(a,c){},destroy:function(){this.inherited(arguments);this._settingValueMap.clear()}})})},"MW/rtc/plugins/shadowtext/ShadowTextServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./ShadowTextService"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.cursor","rtc.divcaret",
"rtc.view"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/shadowtext/ShadowTextService":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/model/DocumentEventUtilities","./ShadowTextServiceView"],function(g,f,e,d,b){return g(null,{constructor:function(a,c,d,g,l){this._internalDocument=a;this._document=c;this._cursor=d;this._rtcView=l;this._view=new b(d,g,l);this._services=[];this._aspectHandles=
[e.after(this._rtcView,"onLinesDOMUpdated",f.hitch(this,"_handleLinesDOMUpdated"),!0),e.after(this._internalDocument,"onDocumentChanged",f.hitch(this,"_handleDocumentChanged"))]},_handleLinesDOMUpdated:function(a,c,b){b||this._updateLineRange(a,c)},_handleDocumentChanged:function(a){a&&0<a.length?a=d.finalLineRangeFromEvents(a):(a=this._cursor.getLineColumn().line-1,a={startLine:a,endLine:a});0<=a.startLine&&0<=a.endLine&&this._updateLineRange(a.startLine,a.endLine)},_updateLineRange:function(a,c){this._services.filter(function(b){b=
b.position.getLineColumn();return b.line>=a+1&&b.line<=c+1}).forEach(function(a){a.updateCallback&&a.updateCallback(a.handle)})},requestTextAfterCursor:function(a){var c=this._cursor.getLineColumn();a.position=this._document.createPositionAtLineColumn(c.line-1,c.column-1,!0);return this.requestTextAtPosition(a)},requestTextAtPosition:function(a){a.handle=this._getServiceHandle(a);this._services.push(a);this._view.drawView(a);return a.handle},_getServiceHandle:function(a){return{position:a.position,
remove:f.hitch(this,"_removeService",a),update:f.hitch(this,"_updateService",a)}},_updateService:function(a,c,b){a.text=c;a.domNodeToAppend=b||a.domNodeToAppend;this._view.redrawView(a)},_removeService:function(a){this._view.removeView(a);a.position.destroy();a=this._services.indexOf(a);this._services.splice(a,1)},destroy:function(){this._aspectHandles.forEach(function(a){a.remove()});for(this._aspectHandles=[];0<this._services.length;)this._removeService(this._services[this._services.length-1])}})})},
"MW/rtc/plugins/shadowtext/ShadowTextServiceView":function(){define(["dojo/_base/declare","dojo/dom-class","dojo/dom-construct"],function(g,f,e){return g(null,{_SHADOW_TEXT_CSS:"shadowText",constructor:function(d,b,a){this._cursor=d;this._divcaret=b;this._view=a},drawView:function(d){var b=this._drawView(d);d.caretRightAligned&&(d=this._view.getCoordinateForDomNode(b),d.x+=d.width,this._divcaret.updateCaretGeometry(this._divcaret._permanentLayer,d))},_drawView:function(d){var b=this._createView(d.text,
d.cssClass,d.domNodeToAppend);d.viewHandle=this._view.insertDomNode(b,d.position);return b},redrawView:function(d){this._removeView(d);this.drawView(d)},removeView:function(d){d.viewHandle&&(this._removeView(d),d.viewHandle=null,d.cleanup=null,this._cursor.onUpdate(!0))},_removeView:function(d){d.viewHandle&&d.viewHandle.remove();d.cleanup&&d.cleanup()},_createView:function(d,b,a){b=b||"";d=e.create("span",{textContent:d,"class":b,"data-testid":this._SHADOW_TEXT_CSS+b});f.add(d,this._SHADOW_TEXT_CSS);
a&&d.appendChild(a);return d}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/AutoWrapCommentSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/AutoWrapCommentSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document","matlab.tokens","rtc.indentutilities","rtc.settings.service"]}},createInstance:function(d,b,a,c){return new e(d,b,a,
c)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/AutoWrapCommentSmartFormatter":function(){define("dojo/_base/declare mw-log/Log MW/rtc/model/CodeUtilities MW/rtc/model/DocumentUtilities MW/rtc/plugins/language/matlab/autoindent/ExchangeService MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities MW/rtc/plugins/smartformatting/abstract/AbstractSmartFormatter MW/rtc/plugins/smartformatting/SmartFormattingTriggerTypeEnum MW/rtc/plugins/smartformatting/SmartFormatterUtilities".split(" "),
function(g,f,e,d,b,a,c,h,k){return g(c,{SMART_FORMATTER_ID:"automaticcoding_autowrapcomment",_AUTOWRAP_ID:"matlab.editor.language.matlab.comments.WrapAutomatically",_AUTOWRAP_FROM_COMMENT_START_ID:"matlab.editor.language.matlab.comments.FromCommentStart",_AUTOWRAP_WIDTH_ID:"matlab.editor.language.matlab.comments.MaxWidth",_AUTOWRAP_DEFAULT_WIDTH:75,constructor:function(a,c,b,d){this._document=a;this._tokenizerService=c;this._indentUtilities=b;this._settingService=d;this.own(this._settingService.listenTo(this._AUTOWRAP_ID,
this._onAutoWrapEnabledPreferenceChange.bind(this)));this._onAutoWrapEnabledPreferenceChange()},_onAutoWrapEnabledPreferenceChange:function(){this._settingService.get(this._AUTOWRAP_ID,!1)?this.enable():this.disable()},_isTriggerTypeExpected:function(a){return a.type===h.INSERT_TEXT},_isTriggerPositionExpected:function(c){var b=this._getCurrentLine(c)-1,d=this._getCurrentColumn(c)-1;f.assert(0<=b&&0<=d,"Line and column numbers must be non-negative");if(!e.isCodeContainer(c.triggerPos.getNode()))return!1;
d=this._indentUtilities.findFirstNonWhitespaceTokenInLine(b);return null!==d&&this._isCursorAtEndOfLine(c)&&a.isCommentToken(d)&&!a.isSectionTitleToken(d)&&this._isLineLongEnoughToBeWrapped(b+1)},_findAndRecordTarget:function(a){var c=this._getCurrentLine(a),b=c-1,e=this._getCurrentColumn(a)-1;if(this._tokenizerService.isInBlockComment(b,e)){b=this._getCurrentText(c);b=d.getLeadingWhitespace(b);b=d.getWhitespaceStringOfLength(b);if(b.length>=this._getMaxWidthForLine(a)||b.length>=this._getRowEnd(c))return!1;
a.target=b;return!0}c=this._getCommentAnnotation(c);if(!c)return!1;a.target=c;return!0},format:function(a){var c=this._getCurrentLine(a)-1,b=this._getCommentBreakPosition(a);if(!(0>b)){var d=this._getRowEnd(c+1)-b,d=this._document.getTextCharacters(c,b,d);a=a.target+this._trimStart(d);c+=1;b+=1;d=this._getRowEnd(c)+1;this._document.deleteText(c,b,c,d);this._document.insertBreakAt(c,b);this._document.insertText(a,c+1,b)}},postFormat:function(a){a=a.cursorPos.getLineColumn();b.isAutoIndentEnabled()&&
!this._tokenizerService.isInBlockComment(a.line-1,a.column-1)&&this._indentUtilities.format(a.line-1)},_getCurrentLine:function(a){return a.triggerPos.getLine()},_getCurrentColumn:function(a){return a.triggerPos.getColumn()},_isCursorAtEndOfLine:function(a){return this._getCurrentColumn(a)===this._getRowEnd(this._getCurrentLine(a))},_getRowEnd:function(a){return this._getCurrentText(a).length},_getCurrentText:function(a){return this._document.getLineText(a)},_isLineLongEnoughToBeWrapped:function(a){return this._getRowEnd(a)>
this._getMaxWidthForLine(a)},_getMaxWidthForLine:function(a){var c=this._settingService.get(this._AUTOWRAP_WIDTH_ID,this._AUTOWRAP_DEFAULT_WIDTH);this._settingService.get(this._AUTOWRAP_FROM_COMMENT_START_ID,!1)&&(a=this._getCurrentText(a),c+=d.getLeadingWhitespace(a));return c},_getLeadingWhitespace:function(a){return null===a?a:a.match(/^\s*/)},_getCommentAnnotation:function(a){var c=this._getCurrentText(a).match(k.COMMENT_ANNOTATION_REGEXP)[0],b=c.length;return 1>b||b>=this._getMaxWidthForLine(a)?
null:this._trimStart(c)},_trimStart:function(a){return null===a?"":a.replace(k.LEADING_SPACES_REGEXP,"")},_getCommentBreakPosition:function(a){var c=this._getCurrentLine(a),b=this._getRowEnd(c),d=b-1,e=this._getMaxWidthForLine(c),f=-1,h=!1;a=a.target.length;for(c=this._getCurrentText(c);d>=a;d--){var g=this._isWhitespace(c.charAt(d));if(h&&!g)break;else g&&(f=d,b-d<e&&(h=!0))}return f},_isWhitespace:function(a){f.assert(1===a.length,"Expected input length of 1");return 0===a.trim().length}})})},"MW/rtc/plugins/smartformatting/abstract/AbstractSmartFormatter":function(){define(["dojo/_base/declare",
"dojo/_base/lang","MW/rtc/abstract/AbstractPlugin"],function(g,f,e){return g(e,{SMART_FORMATTER_ID:void 0,_enabled:!0,isApplicable:function(d){return this._isEnabled()&&this._isTriggerExpected(d)&&this._findAndRecordTarget(d)},enable:function(){this._enabled=!0},disable:function(){this._enabled=!1},format:function(d){throw Error("Unimplemented API: MW.rtc.plugins.smartformatting.AbstractSmartFormatter.format");},postFormat:function(d){},_isEnabled:function(){return this._enabled},_isTriggerExpected:function(d){return this._isTriggerTypeExpected(d)&&
this._isTriggerPositionExpected(d)},_isTriggerTypeExpected:function(d){throw Error("Unimplemented API: MW.rtc.plugins.smartformatting.AbstractSmartFormatter._isTriggerTypeExpected");},_isTriggerPositionExpected:function(d){throw Error("Unimplemented API: MW.rtc.plugins.smartformatting.AbstractSmartFormatter._isTriggerPositionExpected");},_findAndRecordTarget:function(d){throw Error("Unimplemented API: MW.rtc.plugins.smartformatting.AbstractSmartFormatter._findAndRecordTarget");},_getActions:function(){return[{id:"rtc_smartformatting_"+
this.SMART_FORMATTER_ID+"_on",enabled:!0,callback:f.hitch(this,this.enable)},{id:"rtc_smartformatting_"+this.SMART_FORMATTER_ID+"_off",enabled:!0,callback:f.hitch(this,this.disable)}]}})})},"MW/rtc/plugins/smartformatting/SmartFormattingTriggerTypeEnum":function(){define([],function(){return{INSERT_BREAK:0,INSERT_TEXT:1,DELETE:2}})},"MW/rtc/plugins/smartformatting/SmartFormatterUtilities":function(){define("mw-log/Log MW/rtc/model/CodeUtilities MW/rtc/model/DocumentConstants MW/rtc/model/DocumentUtilities MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenConstants MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities".split(" "),
function(g,f,e,d,b,a){return{LEADING_SPACES_REGEXP:/^\s+/,TRAILING_SPACES_REGEXP:/\s+$/,URL_REGEXP_STRING:"((https?|ftp):\\/\\/|www\\.)[^\\s]+",COMMENT_REGEXP:/%\s*\S*/,COMMENT_ANNOTATION_REGEXP:/^\s*%+\s*/,ROUND_PAREN_OPEN_CHAR:"(",ROUND_PAREN_CLOSE_CHAR:")",CURLY_PAREN_OPEN_CHAR:"{",CURLY_PAREN_CLOSE_CHAR:"}",SQUARE_PAREN_OPEN_CHAR:"[",SQUARE_PAREN_CLOSE_CHAR:"]",SINGLE_QUOTE_OPEN_CHAR:"'",SINGLE_QUOTE_CLOSE_CHAR:"'",DOUBLE_QUOTE_OPEN_CHAR:'"',DOUBLE_QUOTE_CLOSE_CHAR:'"',PAIR_INSERT_ALLOWED_CHAR_AFTER_CURSOR:", ,),},],;,%".split(","),
LINE_CONTINUATION:"...",isAtEndOfEmptyLine:function(a){var b=a.getNode().rootContainer();return d.isAtEndOfContainer(a,b)&&""===b.getTextForPositioning().trim()},isFirstLayerContainer:function(a){a=a.getNode();return a.textContainer()===a.rootContainer()},isInString:function(c,b,d){c=d.getTokenOnLineColumn(c,b);return!c||2>=c.getLength()?!1:a.isMatlabStringToken(c)},isInMatlabUntermString:function(c,b,d,e){c=d.getTokenOnLineColumn(c,b);return"single"===e?a.isMatlabUntermSingleQuoteStringToken(c):
a.isMatlabUntermDoubleQuoteStringToken(c)},isCursorPositionApplicableForSplitRule:function(a){var b=a.getNode();if(!f.isCodeContainer(b))return!1;b=a.getNode().rootContainer();return!(d.isAtEndOfContainer(a,b)||""===b.getTextForPositioning().trim())},isNonCodeLineInBetweenForSplitRule:function(a,b,d){for(g.assert(b<=d,"Start line should be \x3c\x3d end line!");b<=d;b+=1){var e=a.getLineNode(b);if(!f.isCodeContainer(e))return!0}return!1},areThereMoreOpenCharactersThanClosingOnLine:function(a,b,d,e,
f){a=this._getLineTextForFormatting(a,d-1);for(var g=0,n=0,q=0;q<a.length;q++)b.isInString(d,q)||(a[q]===e&&(g+=1),a[q]===f&&(n+=1));return e===f?0!==g%2:g>n},isLineColumnBeforeValidString:function(a,b,e,f,g){b=this._getLineTextForFormatting(a,e-1);e=a.getPositionForLineColumn(e,f+1);a=d.getWordAtPosition(a,e);if(null===a)return b.substring(f,f+1)===g;a=a.endLineCol.column;f=b.substring(f-1,f);b=b.substring(a,a+1);return f===g&&b===g},isCharAtLineColumnForFormatting:function(a,b,d,e){g.assert(1===
b.length,"Input must be a character");return b===this.getTextAtLineColumnForFormatting(a,d,e,1)},getTextAtLineColumnForFormatting:function(a,b,d,e){return this._getLineTextForFormatting(a,b).substr(d,e)},_getLineTextForFormatting:function(a,b){return a.getLineNode(b).getTextForPositioning()},lineHasUntermSingleQuoteString:function(c,b){return b.getTokensOnLine(c).some(function(c){return a.isMatlabUntermSingleQuoteStringToken(c)})},lineHasUntermDoubleQuoteString:function(c,b){return b.getTokensOnLine(c).some(function(c){return a.isMatlabUntermDoubleQuoteStringToken(c)})}}})},
"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SplitCommentSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/SplitCommentSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","rtc.code.comment","matlab.tokens"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SplitCommentSmartFormatter":function(){define(["dojo/_base/declare",
"MW/rtc/model/CodeUtilities","MW/rtc/plugins/language/matlab/autoindent/ExchangeService","MW/rtc/plugins/smartformatting/abstract/ParagraphFormatSmartFormatter","MW/rtc/plugins/smartformatting/SmartFormatterUtilities"],function(g,f,e,d,b){return g(d,{SMART_FORMATTER_ID:"automaticcoding_splitcomment",_TARGET_REGEXP:b.COMMENT_REGEXP,constructor:function(a,c,b,d,e){this._internalDocument=a;this._document=c;this._actionService=b;this._commentCode=d;this._tokenizerService=e;this._actionService.loadActions(this._getActions())},
_isTriggerPositionExpected:function(a){var c=a.triggerPos.getNode(),d=a.triggerPos.getLineColumn().line-1,e=a.triggerPos.getLineColumn().column-1;return 0>d||0>=e?!1:f.isCodeContainer(c)&&b.isFirstLayerContainer(a.triggerPos)&&b.isCursorPositionApplicableForSplitRule(a.cursorPos)&&this._tokenizerService.isInComment(d,e-1)&&!this._tokenizerService.isInBlockComment(d,e-1)},format:function(a){if(!this._document.isReadOnly()&&!a.cursor.isCursorReadOnly()){var c=this._commentCode.getCommentAnnotation(),
b=a.cursorPos.getLineColumn().line;this._document.insertText(c,b,a.cursorPos.getLineColumn().column);a.cursor.onUpdate()}}})})},"MW/rtc/plugins/smartformatting/abstract/ParagraphFormatSmartFormatter":function(){define("dojo/_base/declare MW/rtc/model/DocumentUtilities MW/rtc/plugins/richtext/ParagraphFormatsEnum MW/rtc/plugins/smartformatting/abstract/AbstractSmartFormatter MW/rtc/plugins/smartformatting/SmartFormattingTriggerTypeEnum MW/rtc/plugins/smartformatting/SmartFormatterUtilities".split(" "),
function(g,f,e,d,b,a){return g(d,{_TARGET_REGEXP:void 0,_isTriggerTypeExpected:function(a){return a.type===b.INSERT_BREAK},_isTriggerPositionExpected:function(c){return a.isFirstLayerContainer(c.triggerPos)&&a.isAtEndOfEmptyLine(c.cursorPos)},_findAndRecordTarget:function(a){var b=a.triggerPos.getLineColumn().line,b=this._getRangeOfDirectivesOnLine(b);if(!b)return!1;a.target=b;return!0},format:function(a){var b=a.cursorPos.getLineColumn().line,d=a.triggerPos.getLineColumn().line,e=this._document.startBlockEdit();
this._removeLeadingSpaces(b);this._format(d,a.target);this._document.endBlockEdit(e);this._cursor.onUpdate();return a},_format:function(a,b){this._transformLineToParagraph(a,b)},_getRangeOfDirectivesOnLine:function(a){return f.getRangeAndTextOfTargetOnLine(this._internalDocument,a,this._TARGET_REGEXP)},_transformLineToParagraph:function(a,b){var d=this._getTypeOfParagraph(a);this._richText.applyFormatInLine(d,a);this._removeDirectives(a,b);this._removeTrailingSpaces(a)},_getTypeOfParagraph:function(a){throw Error("Unimplemented API: MW.rtc.plugins.smartformatting.abstract.ParagraphFormatSmartFormatter._getTypeOfParagraph");
},_removeDirectives:function(a,b){this._document.deleteText(a,b.start,a,b.end-1)},_removeTrailingSpaces:function(c){var b=f.getRangeAndTextOfTargetOnLine(this._internalDocument,c,a.TRAILING_SPACES_REGEXP);b&&this._document.deleteText(c,b.start,c,b.end)},_removeLeadingSpaces:function(c){var b=f.getRangeAndTextOfTargetOnLine(this._internalDocument,c,a.LEADING_SPACES_REGEXP);b&&this._document.deleteText(c,b.start,c,b.end)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/RoundParenInsertSmartFormatterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/RoundParenInsertSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","matlab.tokens"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/RoundParenInsertSmartFormatter":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/plugins/smartformatting/abstract/PairInsertSmartFormatter",
"MW/rtc/plugins/smartformatting/SmartFormatterUtilities"],function(g,f,e,d,b){return g(d,{SMART_FORMATTER_ID:"automaticcoding_roundpareninsert",_OPEN_CHAR:b.ROUND_PAREN_OPEN_CHAR,_CLOSE_CHAR:b.ROUND_PAREN_CLOSE_CHAR,_ALLOWED_CHAR_AFTER_CURSOR:b.PAIR_INSERT_ALLOWED_CHAR_AFTER_CURSOR,constructor:function(a,c,b,d){this._internalDocument=a;this._document=c;this._actionService=b;this._tokenizerService=d;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/abstract/PairInsertSmartFormatter":function(){define("dojo/_base/declare MW/rtc/model/CodeUtilities MW/rtc/model/DocumentUtilities MW/rtc/plugins/smartformatting/abstract/AbstractSmartFormatter MW/rtc/plugins/smartformatting/SmartFormattingTriggerTypeEnum MW/rtc/plugins/smartformatting/SmartFormatterUtilities".split(" "),
function(g,f,e,d,b,a){return g(d,{_OPEN_CHAR:void 0,_CLOSE_CHAR:void 0,_ALLOWED_CHAR_AFTER_CURSOR:void 0,_isTriggerTypeExpected:function(a){return a.type===b.INSERT_TEXT&&a.text===this._OPEN_CHAR},_isTriggerPositionExpected:function(a){var b=a.triggerPos.getNode();return f.isCodeContainer(b)&&this._isCursorPositionApplicable(a)&&this._isLineValidForPairInsert(a)},_isCursorPositionApplicable:function(c){var b=c.cursorPos.getLineColumn().line;c=c.cursorPos.getLineColumn().column;b-=1;c-=1;if(0>b||0>
c||this._tokenizerService.isInComment(b,c-1)||this._tokenizerService.isInString(b,c-1))return!1;b=a.getTextAtLineColumnForFormatting(this._internalDocument,b,c,1);for(c=0;c<this._ALLOWED_CHAR_AFTER_CURSOR.length;c+=1)if(b===this._ALLOWED_CHAR_AFTER_CURSOR[c])return!0;return!1},_isLineValidForPairInsert:function(c){c=c.cursorPos.getLineColumn().line;return this._OPEN_CHAR!==this._CLOSE_CHAR&&!a.areThereMoreOpenCharactersThanClosingOnLine(this._internalDocument,this._tokenizerService,c,this._OPEN_CHAR,
this._CLOSE_CHAR)?!1:!0},_findAndRecordTarget:function(a){return!0},format:function(a){var b=a.cursorPos.getLineColumn().line,d=a.cursorPos.getLineColumn().column;this._document.insertText(this._CLOSE_CHAR,b,a.cursorPos.getLineColumn().column);a.cursor.setLineColumn(b,d)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/RoundParenDeleteSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/RoundParenDeleteSmartFormatter"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","matlab.tokens"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/RoundParenDeleteSmartFormatter":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/plugins/smartformatting/abstract/ParenDeleteSmartFormatter","MW/rtc/plugins/smartformatting/SmartFormatterUtilities"],function(g,
f,e,d,b){return g(d,{SMART_FORMATTER_ID:"automaticcoding_roundparendelete",_OPEN_CHAR:b.ROUND_PAREN_OPEN_CHAR,_CLOSE_CHAR:b.ROUND_PAREN_CLOSE_CHAR,constructor:function(a,c,b,d){this._internalDocument=a;this._document=c;this._actionService=b;this._tokenizerService=d;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/abstract/ParenDeleteSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/plugins/smartformatting/abstract/PairDeleteSmartFormatter","MW/rtc/plugins/smartformatting/SmartFormattingPairMatcher"],
function(g,f,e){return g(f,{constructor:function(d,b,a,c){this._smartFormattingMatcher=new e(c,this._OPEN_CHAR,this._CLOSE_CHAR)},_checkPairDeleteIsApplicable:function(d){return!this.inherited(arguments)?!1:this._smartFormattingMatcher.areTokensBalancedForPosition(d.cursorPos)}})})},"MW/rtc/plugins/smartformatting/abstract/PairDeleteSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/model/CodeUtilities","MW/rtc/plugins/smartformatting/abstract/AbstractSmartFormatter","MW/rtc/plugins/smartformatting/SmartFormattingTriggerTypeEnum",
"MW/rtc/plugins/smartformatting/SmartFormatterUtilities"],function(g,f,e,d,b){return g(e,{_OPEN_CHAR:void 0,_CLOSE_CHAR:void 0,_isTriggerExpected:function(a){return this._isTriggerTypeExpected(a)&&this._isTriggerDirectionExpected(a)&&this._isTriggerPositionExpected(a)},_isTriggerDirectionExpected:function(a){return-1===a.direction},_isTriggerTypeExpected:function(a){return a.type===d.DELETE},_isTriggerPositionExpected:function(a){var c=a.triggerPos.getNode();return f.isCodeContainer(c)&&this._checkPairDeleteIsApplicable(a)},
_findAndRecordTarget:function(a){return!0},format:function(a){var c=a.cursorPos;this._document.deleteText(c.getLineColumn().line,c.getLineColumn().column-1,c.getLineColumn().line,c.getLineColumn().column+1);return a},_checkPairDeleteIsApplicable:function(a){var c=a.cursorPos.getLineColumn().line-1,d=a.cursorPos.getLineColumn().column-1;if(0>c||0>=d||this._tokenizerService.isInComment(c,d-1)||b.isInString(c,d-1,this._tokenizerService))return!1;a=b.isCharAtLineColumnForFormatting(this._internalDocument,
this._OPEN_CHAR,c,d-1);c=b.isCharAtLineColumnForFormatting(this._internalDocument,this._CLOSE_CHAR,c,d);return a&&c}})})},"MW/rtc/plugins/smartformatting/SmartFormattingPairMatcher":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect mw-log/Log MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenConstants MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities".split(" "),function(g,f,e,d,b,a){return g(null,{constructor:function(a,b,d){this._tokenizerService=a;this._openCharacter=
b;this._closeCharacter=d},areTokensBalancedForPosition:function(a){var b=a.getLineColumn().column-1,d=a.getLineColumn().line-1;a=this._tokenizerService.getTokenOnLineColumn(d,b);b=this._tokenizerService.getTokenOnLineColumn(d,b-1);b=this._findStartToken(b);a=this._findEndToken(a);return this._areTokensBalanced(b,a)},hasOneMoreCloseThanOpenCharacter:function(a){var b=a.getLineColumn().column-1,d=a.getLineColumn().line-1;a=this._tokenizerService.getTokenOnLineColumn(d,b);b=this._tokenizerService.getTokenOnLineColumn(d,
b-1);b=this._findStartToken(b);a=this._findEndToken(a);return this._hasOneMoreCloseThanOpenCharacter(b,a)},_areTokensBalanced:function(a,b){var d=this._getUnmatchedCharacterCounts(a,b);return 0===d.unmatchedCloseCharacters&&0===d.unmatchedOpenCharacters},_hasOneMoreCloseThanOpenCharacter:function(a,b){var d=this._getUnmatchedCharacterCounts(a,b);return 1===d.unmatchedCloseCharacters&&0===d.unmatchedOpenCharacters},_getUnmatchedCharacterCounts:function(a,b){d.assert(null!==a,"Start token cannot be null");
d.assert(null!==b,"End token cannot be null");for(var e=[],f=0,g=a;null!==g&&!(g.getValue()===this._openCharacter?e.push(g.getValue()):g.getValue()===this._closeCharacter&&(0===e.length?f+=1:e.pop()),g===b);)g=this._getNextToken(g);return{unmatchedCloseCharacters:f,unmatchedOpenCharacters:e.length}},_findStartToken:function(a){var b=a;for(a=a.getPositionInfo().line;null!=b;){var d=this._tokenizerService.getPreviousTokenOf(b,b.getPositionInfo().line);if(null===d)return b;var e=d.getPositionInfo().line;
if(a!==e)if(this._lineContainsLineContinuation(e,this._tokenizerService))a=e;else return b;b=d}return null},_lineContainsLineContinuation:function(c){return this._tokenizerService.getTokensOnLine(c).some(function(c){return a.isDotDotDotToken(c)})},_findEndToken:function(a){for(;null!=a;){var b=this._getNextToken(a);if(null===b)return a;if(this._isEndOfLine(b))return b;a=b}return null},_isEndOfLine:function(c){return a.isEndOfLineToken(c)},_getNextToken:function(c){return a.isDotDotDotToken(c)?(c=
c.getPositionInfo().line+1,this._tokenizerService.getFirstTokenOnLine(c)):this._tokenizerService.getNextTokenOf(c)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SquareParenInsertSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/SquareParenInsertSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice",
"matlab.tokens"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SquareParenInsertSmartFormatter":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/plugins/smartformatting/abstract/PairInsertSmartFormatter","MW/rtc/plugins/smartformatting/SmartFormatterUtilities"],function(g,f,e,d,b){return g(d,{SMART_FORMATTER_ID:"automaticcoding_squarepareninsert",_OPEN_CHAR:b.SQUARE_PAREN_OPEN_CHAR,_CLOSE_CHAR:b.SQUARE_PAREN_CLOSE_CHAR,
_ALLOWED_CHAR_AFTER_CURSOR:b.PAIR_INSERT_ALLOWED_CHAR_AFTER_CURSOR,constructor:function(a,c,b,d){this._internalDocument=a;this._document=c;this._actionService=b;this._tokenizerService=d;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SquareParenDeleteSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/SquareParenDeleteSmartFormatter"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","matlab.tokens"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SquareParenDeleteSmartFormatter":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/plugins/smartformatting/abstract/ParenDeleteSmartFormatter","MW/rtc/plugins/smartformatting/SmartFormatterUtilities"],function(g,
f,e,d,b){return g(d,{SMART_FORMATTER_ID:"automaticcoding_squareparendelete",_OPEN_CHAR:b.SQUARE_PAREN_OPEN_CHAR,_CLOSE_CHAR:b.SQUARE_PAREN_CLOSE_CHAR,constructor:function(a,c,b,d){this._internalDocument=a;this._document=c;this._actionService=b;this._tokenizerService=d;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/CurlyParenInsertSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"MW/rtc/plugins/smartformatting/formatter/automaticcoding/CurlyParenInsertSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","matlab.tokens"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/CurlyParenInsertSmartFormatter":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/plugins/smartformatting/abstract/PairInsertSmartFormatter",
"MW/rtc/plugins/smartformatting/SmartFormatterUtilities"],function(g,f,e,d,b){return g(d,{SMART_FORMATTER_ID:"automaticcoding_curlypareninsert",_OPEN_CHAR:b.CURLY_PAREN_OPEN_CHAR,_CLOSE_CHAR:b.CURLY_PAREN_CLOSE_CHAR,_ALLOWED_CHAR_AFTER_CURSOR:b.PAIR_INSERT_ALLOWED_CHAR_AFTER_CURSOR,constructor:function(a,c,b,d){this._internalDocument=a;this._document=c;this._actionService=b;this._tokenizerService=d;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/CurlyParenDeleteSmartFormatterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/CurlyParenDeleteSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","matlab.tokens"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/CurlyParenDeleteSmartFormatter":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/plugins/smartformatting/abstract/ParenDeleteSmartFormatter",
"MW/rtc/plugins/smartformatting/SmartFormatterUtilities"],function(g,f,e,d,b){return g(d,{SMART_FORMATTER_ID:"automaticcoding_curlyparendelete",_OPEN_CHAR:b.CURLY_PAREN_OPEN_CHAR,_CLOSE_CHAR:b.CURLY_PAREN_CLOSE_CHAR,constructor:function(a,c,b,d){this._internalDocument=a;this._document=c;this._actionService=b;this._tokenizerService=d;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SingleQuoteInsertSmartFormatterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/SingleQuoteInsertSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","matlab.tokens"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SingleQuoteInsertSmartFormatter":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/model/CodeUtilities MW/rtc/model/DocumentUtilities MW/rtc/plugins/smartformatting/abstract/QuoteInsertSmartFormatter MW/rtc/plugins/smartformatting/SmartFormatterUtilities".split(" "),
function(g,f,e,d,b,a,c){return g(a,{SMART_FORMATTER_ID:"automaticcoding_singlequoteinsert",_OPEN_CHAR:c.SINGLE_QUOTE_OPEN_CHAR,_CLOSE_CHAR:c.SINGLE_QUOTE_CLOSE_CHAR,_ALLOWED_CHAR_AFTER_CURSOR:c.PAIR_INSERT_ALLOWED_CHAR_AFTER_CURSOR,constructor:function(a,c,b,d){this._internalDocument=a;this._document=c;this._actionService=b;this._tokenizerService=d;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/abstract/QuoteInsertSmartFormatter":function(){define(["dojo/_base/declare",
"MW/rtc/model/CodeUtilities","MW/rtc/model/DocumentUtilities","MW/rtc/plugins/smartformatting/SmartFormatterUtilities","MW/rtc/plugins/smartformatting/abstract/PairInsertSmartFormatter"],function(g,f,e,d,b){return g(b,{_UNALLOWED_CHAR_BEFORE_CURSOR:[")","}","]","."],_WORD_REGEX:/\w/,_NON_WORD_REGEX:/[^\\w=({[,\s]/,_isTriggerPositionExpected:function(a){var c=a.triggerPos.getNode();return f.isCodeContainer(c)&&this._isCursorPositionApplicable(a)&&this._checkAllowedCharsBeforeCursor(a)},_checkAllowedCharsBeforeCursor:function(a){var c=
a.cursorPos.getLineColumn().line;a=a.cursorPos.getLineColumn().column;c-=1;a-=1;if(0>c||0>a)return!1;if(2>a)return!0;c=d.getTextAtLineColumnForFormatting(this._internalDocument,c,a-2,1);for(a=0;a<this._UNALLOWED_CHAR_BEFORE_CURSOR.length;a+=1)if(c===this._UNALLOWED_CHAR_BEFORE_CURSOR[a])return!1;a=c.search(this._WORD_REGEX);if(0===a)return!1;a=c.search(this._NON_WORD_REGEX);return 0===a?!1:!0}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SingleQuoteDeleteSmartFormatterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/SingleQuoteDeleteSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","matlab.tokens"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SingleQuoteDeleteSmartFormatter":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect",
"MW/rtc/plugins/smartformatting/abstract/PairDeleteSmartFormatter","MW/rtc/plugins/smartformatting/SmartFormatterUtilities"],function(g,f,e,d,b){return g(d,{SMART_FORMATTER_ID:"automaticcoding_singlequotedelete",_OPEN_CHAR:b.SINGLE_QUOTE_OPEN_CHAR,_CLOSE_CHAR:b.SINGLE_QUOTE_CLOSE_CHAR,constructor:function(a,c,b,d){this._internalDocument=a;this._document=c;this._actionService=b;this._tokenizerService=d;this._actionService.loadActions(this._getActions())},_checkPairDeleteIsApplicable:function(a){if(!this.inherited(arguments))return!1;
var c=a.cursorPos.getLineColumn().line-1;return!b.lineHasUntermSingleQuoteString(c,this._tokenizerService)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/DoubleQuoteInsertSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/DoubleQuoteInsertSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice",
"matlab.tokens"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/DoubleQuoteInsertSmartFormatter":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/plugins/smartformatting/abstract/QuoteInsertSmartFormatter","MW/rtc/plugins/smartformatting/SmartFormatterUtilities"],function(g,f,e,d,b){return g(d,{SMART_FORMATTER_ID:"automaticcoding_doublequoteinsert",_OPEN_CHAR:b.DOUBLE_QUOTE_OPEN_CHAR,_CLOSE_CHAR:b.DOUBLE_QUOTE_CLOSE_CHAR,
_ALLOWED_CHAR_AFTER_CURSOR:b.PAIR_INSERT_ALLOWED_CHAR_AFTER_CURSOR,constructor:function(a,c,b,d){this._internalDocument=a;this._document=c;this._actionService=b;this._tokenizerService=d;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/DoubleQuoteDeleteSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/DoubleQuoteDeleteSmartFormatter"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","matlab.tokens"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/DoubleQuoteDeleteSmartFormatter":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/plugins/smartformatting/abstract/PairDeleteSmartFormatter","MW/rtc/plugins/smartformatting/SmartFormatterUtilities"],function(g,
f,e,d,b){return g(d,{SMART_FORMATTER_ID:"automaticcoding_doublequotedelete",_OPEN_CHAR:b.DOUBLE_QUOTE_OPEN_CHAR,_CLOSE_CHAR:b.DOUBLE_QUOTE_CLOSE_CHAR,constructor:function(a,c,b,d){this._internalDocument=a;this._document=c;this._actionService=b;this._tokenizerService=d;this._actionService.loadActions(this._getActions())},_checkPairDeleteIsApplicable:function(a){if(!this.inherited(arguments))return!1;var c=a.cursorPos.getLineColumn().line-1;return!b.lineHasUntermDoubleQuoteString(c,this._tokenizerService)}})})},
"MW/rtc/plugins/smartformatting/formatter/automaticcoding/RoundParenOverwritingSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/RoundParenOverwritingSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","matlab.tokens"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/RoundParenOverwritingSmartFormatter":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/aspect","MW/rtc/plugins/smartformatting/abstract/ParenCloseCharOverwritingSmartFormatter","MW/rtc/plugins/smartformatting/SmartFormatterUtilities"],function(g,f,e,d,b){return g(d,{SMART_FORMATTER_ID:"automaticcoding_roundparenoverwrite",_OPEN_CHAR:b.ROUND_PAREN_OPEN_CHAR,_CLOSE_CHAR:b.ROUND_PAREN_CLOSE_CHAR,constructor:function(a,c,b,d){this._internalDocument=a;this._document=c;this._actionService=b;this._tokenizerService=d;this._actionService.loadActions(this._getActions())}})})},
"MW/rtc/plugins/smartformatting/abstract/ParenCloseCharOverwritingSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/plugins/smartformatting/abstract/CloseCharOverwritingSmartFormatter","MW/rtc/plugins/smartformatting/SmartFormattingPairMatcher"],function(g,f,e){return g(f,{constructor:function(d,b,a,c){this._smartFormattingMatcher=new e(c,this._OPEN_CHAR,this._CLOSE_CHAR)},_isCursorPositionApplicable:function(d){return!this.inherited(arguments)?!1:this._smartFormattingMatcher.hasOneMoreCloseThanOpenCharacter(d.cursorPos)}})})},
"MW/rtc/plugins/smartformatting/abstract/CloseCharOverwritingSmartFormatter":function(){define("dojo/_base/declare MW/rtc/model/CodeUtilities MW/rtc/model/DocumentUtilities MW/rtc/plugins/smartformatting/abstract/AbstractSmartFormatter MW/rtc/plugins/smartformatting/SmartFormattingTriggerTypeEnum MW/rtc/plugins/smartformatting/SmartFormatterUtilities".split(" "),function(g,f,e,d,b,a){return g(d,{_OPEN_CHAR:void 0,_CLOSE_CHAR:void 0,_BLOCK_TYPES_FOR_MERGE_AND_ADVANCE:["TypingText"],_isTriggerTypeExpected:function(a){return a.type===
b.INSERT_TEXT&&a.text===this._CLOSE_CHAR},_isTriggerPositionExpected:function(a){var b=a.triggerPos.getNode();return f.isCodeContainer(b)&&this._isCursorPositionApplicable(a)},_isCursorPositionApplicable:function(c){var b=c.cursorPos.getLineColumn().line;c=c.cursorPos.getLineColumn().column;b-=1;c-=1;return 0>b||0>c||a.getTextAtLineColumnForFormatting(this._internalDocument,b,c,1)!=this._CLOSE_CHAR||this._tokenizerService.isInComment(b,c-1)||a.isInString(b,c-1,this._tokenizerService)?!1:!0},_findAndRecordTarget:function(a){return!0},
format:function(a){var b=a.cursorPos.getLineColumn().line,d=a.cursorPos;this._document.startEdit().setBlockTypesForMergeAndAdvance(this._BLOCK_TYPES_FOR_MERGE_AND_ADVANCE);this._document.deleteText(d.getLineColumn().line,d.getLineColumn().column-1,d.getLineColumn().line,d.getLineColumn().column);a.cursor.setLineColumn(b,d.getLineColumn().column+1);this._document.endEdit()}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/CurlyParenOverwritingSmartFormatterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/CurlyParenOverwritingSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","matlab.tokens"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/CurlyParenOverwritingSmartFormatter":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect",
"MW/rtc/plugins/smartformatting/abstract/ParenCloseCharOverwritingSmartFormatter","MW/rtc/plugins/smartformatting/SmartFormatterUtilities"],function(g,f,e,d,b){return g(d,{SMART_FORMATTER_ID:"automaticcoding_curlyparenoverwrite",_OPEN_CHAR:b.CURLY_PAREN_OPEN_CHAR,_CLOSE_CHAR:b.CURLY_PAREN_CLOSE_CHAR,constructor:function(a,c,b,d){this._internalDocument=a;this._document=c;this._actionService=b;this._tokenizerService=d;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SquareParenOverwritingSmartFormatterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/SquareParenOverwritingSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","matlab.tokens"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SquareParenOverwritingSmartFormatter":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect",
"MW/rtc/plugins/smartformatting/abstract/ParenCloseCharOverwritingSmartFormatter","MW/rtc/plugins/smartformatting/SmartFormatterUtilities"],function(g,f,e,d,b){return g(d,{SMART_FORMATTER_ID:"automaticcoding_squareparenoverwrite",_OPEN_CHAR:b.SQUARE_PAREN_OPEN_CHAR,_CLOSE_CHAR:b.SQUARE_PAREN_CLOSE_CHAR,constructor:function(a,c,b,d){this._internalDocument=a;this._document=c;this._actionService=b;this._tokenizerService=d;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SingleQuoteOverwritingSmartFormatterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/SingleQuoteOverwritingSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","matlab.tokens"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SingleQuoteOverwritingSmartFormatter":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect",
"MW/rtc/plugins/smartformatting/abstract/CloseCharOverwritingSmartFormatter","MW/rtc/plugins/smartformatting/SmartFormatterUtilities"],function(g,f,e,d,b){return g(d,{SMART_FORMATTER_ID:"automaticcoding_singlequoteoverwrite",_OPEN_CHAR:b.SINGLE_QUOTE_OPEN_CHAR,_CLOSE_CHAR:b.SINGLE_QUOTE_CLOSE_CHAR,constructor:function(a,c,b,d){this._internalDocument=a;this._document=c;this._actionService=b;this._tokenizerService=d;this._actionService.loadActions(this._getActions())},_isCursorPositionApplicable:function(a){if(!this.inherited(arguments))return!1;
var c=a.cursorPos.getLineColumn().line-1;return b.lineHasUntermSingleQuoteString(c,this._tokenizerService)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/DoubleQuoteOverwritingSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/DoubleQuoteOverwritingSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document",
"rtc.actionservice","matlab.tokens"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/DoubleQuoteOverwritingSmartFormatter":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/plugins/smartformatting/abstract/CloseCharOverwritingSmartFormatter","MW/rtc/plugins/smartformatting/SmartFormatterUtilities"],function(g,f,e,d,b){return g(d,{SMART_FORMATTER_ID:"automaticcoding_doublequoteoverwrite",_OPEN_CHAR:b.DOUBLE_QUOTE_OPEN_CHAR,
_CLOSE_CHAR:b.DOUBLE_QUOTE_CLOSE_CHAR,constructor:function(a,c,b,d){this._internalDocument=a;this._document=c;this._actionService=b;this._tokenizerService=d;this._actionService.loadActions(this._getActions())},_isCursorPositionApplicable:function(a){if(!this.inherited(arguments))return!1;var c=a.cursorPos.getLineColumn().line-1;return b.lineHasUntermDoubleQuoteString(c,this._tokenizerService)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SplitDoubleQuoteStringSmartFormatterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/SplitDoubleQuoteStringSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","matlab.tokens","rtc.indentutilities"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SplitDoubleQuoteStringSmartFormatter":function(){define("dojo/_base/declare MW/rtc/model/CodeUtilities MW/rtc/plugins/language/matlab/autoindent/Formatter MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities MW/rtc/plugins/smartformatting/abstract/SplitStringSmartFormatter MW/rtc/plugins/smartformatting/SmartFormatterUtilities".split(" "),
function(g,f,e,d,b,a){return g(b,{SMART_FORMATTER_ID:"automaticcoding_splitdoublequotestring",_TRIGGER_POS_REQ_CHAR:a.DOUBLE_QUOTE_CLOSE_CHAR+" + "+a.LINE_CONTINUATION,_CURSOR_POS_REQ_CHAR:a.DOUBLE_QUOTE_OPEN_CHAR,_TRIGGER_POS_REQ_CHAR_ESC_CHAR:a.DOUBLE_QUOTE_CLOSE_CHAR+a.DOUBLE_QUOTE_CLOSE_CHAR+" + "+a.LINE_CONTINUATION,_QUOTE_TYPE:"double",constructor:function(a,b,d,e,f){this._internalDocument=a;this._document=b;this._actionService=d;this._tokenizerService=e;this._indentUtilities=f;this._actionService.loadActions(this._getActions())},
_formatQuoteTypeSpecific:function(a,b,d){}})})},"MW/rtc/plugins/smartformatting/abstract/SplitStringSmartFormatter":function(){define("dojo/_base/declare MW/rtc/model/CodeUtilities MW/rtc/model/DocumentUtilities MW/rtc/plugins/language/matlab/autoindent/ExchangeService MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities MW/rtc/plugins/smartformatting/abstract/ParagraphFormatSmartFormatter MW/rtc/plugins/smartformatting/SmartFormatterUtilities".split(" "),function(g,f,e,d,b,a,c){return g(a,
{_TRIGGER_POS_REQ_CHAR:void 0,_CURSOR_POS_REQ_CHAR:void 0,_TRIGGER_POS_REQ_CHAR_ESC_CHAR:void 0,_QUOTE_TYPE:void 0,_isTriggerPositionExpected:function(a){var b=a.triggerPos.getNode(),e=a.triggerPos.getLineColumn().line-1,g=a.triggerPos.getLineColumn().column-1;if(0>e||0>=g)return!1;var p=a.cursorPos.getLineColumn().line-1;return f.isCodeContainer(b)&&!c.isNonCodeLineInBetweenForSplitRule(this._internalDocument,e,p)&&c.isCursorPositionApplicableForSplitRule(a.cursorPos)&&this._checkUntermString(e,
g-1,this._tokenizerService,d.getLatestNumberOfWhiteSpaces(),a.cursor)},_checkUntermString:function(a,b,d,e,f){var g=c.isInMatlabUntermString(a,b,d,this._QUOTE_TYPE);return!g&&0===e?this._checkEscapeCharCondition(a,b,d,f):g},_checkEscapeCharCondition:function(a,d,e,f){var g=c.getTextAtLineColumnForFormatting(this._internalDocument,a,d,1);f=f.getLineColumn();f=c.getTextAtLineColumnForFormatting(this._internalDocument,f.line-1,f.column-1,1);var n;n="single"===this._QUOTE_TYPE?c.SINGLE_QUOTE_CLOSE_CHAR:
c.DOUBLE_QUOTE_CLOSE_CHAR;if(g===n&&f===n)return a=e.getTokenOnLineColumn(a,d),b.isMatlabStringToken(a)},_findAndRecordTarget:function(a){return!0},format:function(a){if(!this._document.isReadOnly()&&!a.cursor.isCursorReadOnly()){var c=a.triggerPos.getLineColumn(),b=c.line,c=c.column,e=a.cursorPos.getLineColumn().line,f=d.getLatestNumberOfWhiteSpaces(),g=d.getLatestIndentLevel(),q=this._CURSOR_POS_REQ_CHAR;if(f>g)for(var r=0;r<f-g;r+=1)q+=" ";r=this._cacheDataForQuoteTypeSpecificFormat(a);this._checkEscapeCharCondition(b-
1,c-2,this._tokenizerService,a.cursor)?(this._document.insertText(this._TRIGGER_POS_REQ_CHAR_ESC_CHAR,b,c),0<g&&this._document.deleteText(e,1,e,g+1)):(this._document.insertText(this._TRIGGER_POS_REQ_CHAR,b,c),f<g&&this._document.deleteText(e,1,e,g-f+1),this._document.insertText(q,e,1));this._formatQuoteTypeSpecific(r);a.cursor.setLineColumn(e,2);a.cursor.onUpdate()}},postFormat:function(a){d.isAutoIndentEnabled()&&(a=a.cursorPos.getLine(),this._indentUtilities.format(a-1))},_formatQuoteTypeSpecific:function(a){throw Error("Unimplemented API: MW.rtc.plugins.smartformatting.SplitStringSmartFormatter._formatQuoteTypeSpecific");
},_cacheDataForQuoteTypeSpecificFormat:function(a){}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SplitSingleQuoteStringSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/SplitSingleQuoteStringSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","matlab.tokens","rtc.indentutilities"]}},
createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/SplitSingleQuoteStringSmartFormatter":function(){define("dojo/_base/declare MW/rtc/model/CodeUtilities MW/rtc/model/DocumentUtilities MW/rtc/plugins/language/matlab/autoindent/Formatter MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenizer MW/rtc/plugins/smartformatting/abstract/SplitStringSmartFormatter MW/rtc/plugins/smartformatting/SmartFormatterUtilities".split(" "),function(g,
f,e,d,b,a,c){return g(a,{SMART_FORMATTER_ID:"automaticcoding_splitsinglequotestring",_TRIGGER_POS_REQ_CHAR:c.SINGLE_QUOTE_CLOSE_CHAR+" "+c.LINE_CONTINUATION,_CURSOR_POS_REQ_CHAR:c.SINGLE_QUOTE_OPEN_CHAR,_STRING_OPEN_BRACKET:c.SQUARE_PAREN_OPEN_CHAR,_STRING_CLOSE_BRACKET:c.SQUARE_PAREN_CLOSE_CHAR,_TRIGGER_POS_REQ_CHAR_ESC_CHAR:c.SINGLE_QUOTE_CLOSE_CHAR+c.SINGLE_QUOTE_CLOSE_CHAR+c.LINE_CONTINUATION,_STRING_OPEN_REGEX:RegExp("\\"+c.SQUARE_PAREN_OPEN_CHAR+"\\s*"+c.SINGLE_QUOTE_OPEN_CHAR),_STRING_CLOSE_REGEX:RegExp(c.SINGLE_QUOTE_CLOSE_CHAR+
"\\s*\\"+c.SQUARE_PAREN_CLOSE_CHAR),_STRING_CONTINUATION_REGEX:RegExp(c.SINGLE_QUOTE_CLOSE_CHAR+"\\s*\\.\\.\\."),_QUOTE_TYPE:"single",constructor:function(a,c,d,e,f){this._internalDocument=a;this._document=c;this._actionService=d;this._tokenizerService=e;this._indentUtilities=f;this._actionService.loadActions(this._getActions());this._isolatedTokenizer=new b;this.own(this._isolatedTokenizer)},_formatForFirstTimeSplitString:function(a,c){var b=this._getRange(this._internalDocument,a.getLine(),this._STRING_OPEN_REGEX),
d=this._getRange(this._internalDocument,c.getLine(),this._STRING_CLOSE_REGEX),e=this._getRange(this._internalDocument,c.getLine(),this._STRING_CONTINUATION_REGEX);this._isFirstTimeSplit(a.getColumn()-1,c.getColumn()-1,b,d,e)&&(this._document.insertText(this._STRING_OPEN_BRACKET,a.getLine(),a.getColumn()),this._document.insertText(this._STRING_CLOSE_BRACKET,c.getLine(),c.getColumn()))},_isFirstTimeSplit:function(a,c,b,d,e){if(!b&&!d&&!e)return!0;var f=!0,g=!0,r=!0;b&&(f=!(a>=b.end-2));d&&(g=!(c<=d.start));
e&&(r=c!==e.start);return f&&g&&r},_getRange:function(a,c,b){return e.getRangeAndTextOfTargetOnLine(a,c,b)},_formatQuoteTypeSpecific:function(a){var c=this._getEndSplitStringPosition(a.cursorPos);this._formatForFirstTimeSplitString(a.startOfSplitString,c);a.startOfSplitString.destroy();c.destroy()},_getEndSplitStringPosition:function(a){var c=a.getLine(),b=c-1;a=a.getColumn()-1;c=this._document.getLineText(c);this._isolatedTokenizer.initializeLines(c);c=this._isolatedTokenizer.getTokenOnLineColumn(0,
a);return this._document.createPositionAtLineColumn(b,c.getColumn()+c.getLength())},_cacheDataForQuoteTypeSpecificFormat:function(a){var c=this._tokenizerService.getTokenOnLineColumn(a.triggerPos.getLine()-1,a.triggerPos.getColumn()-2),c=this._document.createPositionAtLineColumn(c.getLineNumber(),c.getColumn());a.startOfSplitString=c;return a}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndClassDefBlockSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndClassDefBlockSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","matlab.tokens","rtc.indentutilities"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndClassDefBlockSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/model/CodeUtilities","MW/rtc/plugins/smartformatting/abstract/BlockSmartFormatter",
"MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenConstants","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities"],function(g,f,e,d,b){return g(e,{SMART_FORMATTER_ID:"automaticcoding_endclassdefblock",_TARGET_REGEXP:b.getTokenValueById(d.TOKENS.CLASSDEF),constructor:function(a,c,b,d,e){this._internalDocument=a;this._document=c;this._actionService=b;this._indentUtilities=e;this._tokenizerService=d;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/abstract/BlockSmartFormatter":function(){define("dojo/_base/declare mw-log/Log MW/rtc/model/CodeUtilities MW/rtc/model/DocumentUtilities MW/rtc/plugins/smartformatting/abstract/AbstractSmartFormatter MW/rtc/plugins/smartformatting/SmartFormattingTriggerTypeEnum MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenConstants MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities".split(" "),
function(g,f,e,d,b,a,c,h){return g(b,{_TARGET_REGEXP:void 0,_END_STRING:h.getTokenValueById(c.TOKENS.END),_LINE_COLUMN_LESS_THAN_ZERO:"Line and column must be greater than or equal to zero",_DOCUMENT_IS_READ_ONLY:"This document should not be read only",_isTriggerTypeExpected:function(c){return c.type===a.INSERT_BREAK},_isTriggerPositionExpected:function(a){if(!this._validCursorAndTriggerPositions(a.cursorPos,a.triggerPos))return!1;var c=a.triggerPos.getNode(),b=a.cursorPos.getNode(),d=a.triggerPos.getLineColumn().line-
1;a=a.triggerPos.getLineColumn().column-1;f.assert(0<=d&&0<=a,this._LINE_COLUMN_LESS_THAN_ZERO);if(d=this._tokenizerService.findStartOfBlockOnLine(d))var h=d.getValue()===this._TARGET_REGEXP;return h&&e.isCodeContainer(c)&&e.isCodeContainer(b)&&this._tokenizerService.isUnmatchedStartToken(d)},_validCursorAndTriggerPositions:function(a,c){return 1===a.getLine()-c.getLine()},_findAndRecordTarget:function(a){var c=a.triggerPos.getLineColumn().line,c=this._getRangeOfDirectivesOnLine(c);if(!c)return!1;
a.target=c;return!0},_getRangeOfDirectivesOnLine:function(a){return d.getRangeAndTextOfTargetOnLine(this._internalDocument,a,this._TARGET_REGEXP)},format:function(a){f.assert(!(this._document.isReadOnly()||a.cursor.isCursorReadOnly()),this._DOCUMENT_IS_READ_ONLY);var c=a.cursorPos.getLineColumn().line,b=a.cursorPos.getLineColumn().column,d=this._document.getLineLength(c),e=this._indentUtilities.getIndentForLineNumber(c-2);this._document.insertText("\n",c,d+1);this._document.insertText(this._END_STRING,
c+1,1);0<e&&this._indentUtilities.changeLineIndent(c,e);this._tokenSpecificFormat(c,b,d,e,a)},_tokenSpecificFormat:function(a,c,b,d,e){e.cursor.setLineColumn(a,c,!0)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndEnumerationBlockSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndEnumerationBlockSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument",
"rtc.document","rtc.actionservice","matlab.tokens","rtc.indentutilities"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndEnumerationBlockSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/model/CodeUtilities","MW/rtc/plugins/smartformatting/abstract/BlockSmartFormatter","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenConstants","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities"],function(g,
f,e,d,b){return g(e,{SMART_FORMATTER_ID:"automaticcoding_endenumerationblock",_TARGET_REGEXP:b.getTokenValueById(d.TOKENS.ENUMERATION),constructor:function(a,c,b,d,e){this._internalDocument=a;this._document=c;this._actionService=b;this._indentUtilities=e;this._tokenizerService=d;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndEventsBlockSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndEventsBlockSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","matlab.tokens","rtc.indentutilities"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndEventsBlockSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/model/CodeUtilities","MW/rtc/plugins/smartformatting/abstract/BlockSmartFormatter",
"MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenConstants","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities"],function(g,f,e,d,b){return g(e,{SMART_FORMATTER_ID:"automaticcoding_endeventsblock",_TARGET_REGEXP:b.getTokenValueById(d.TOKENS.EVENTS),constructor:function(a,c,b,d,e){this._internalDocument=a;this._document=c;this._actionService=b;this._indentUtilities=e;this._tokenizerService=d;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndForBlockSmartFormatterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndForBlockSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","matlab.tokens","rtc.indentutilities"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndForBlockSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/model/CodeUtilities",
"MW/rtc/plugins/smartformatting/abstract/BlockSmartFormatter","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenConstants","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities"],function(g,f,e,d,b){return g(e,{SMART_FORMATTER_ID:"automaticcoding_endforblock",_TARGET_REGEXP:b.getTokenValueById(d.TOKENS.FOR),constructor:function(a,c,b,d,e){this._internalDocument=a;this._document=c;this._actionService=b;this._indentUtilities=e;this._tokenizerService=d;this._actionService.loadActions(this._getActions())}})})},
"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndFunctionBlockSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndFunctionBlockSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","matlab.tokens","rtc.indentutilities"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},
"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndFunctionBlockSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/model/CodeUtilities","MW/rtc/plugins/smartformatting/abstract/BlockSmartFormatter","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenConstants","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities"],function(g,f,e,d,b){return g(e,{SMART_FORMATTER_ID:"automaticcoding_endfunctionblock",_TARGET_REGEXP:b.getTokenValueById(d.TOKENS.FUNCTION),constructor:function(a,
c,b,d,e){this._internalDocument=a;this._document=c;this._actionService=b;this._indentUtilities=e;this._tokenizerService=d;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndIfBlockSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndIfBlockSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument",
"rtc.document","rtc.actionservice","matlab.tokens","rtc.indentutilities"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndIfBlockSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/model/CodeUtilities","MW/rtc/plugins/smartformatting/abstract/BlockSmartFormatter","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenConstants","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities"],function(g,f,e,d,
b){return g(e,{SMART_FORMATTER_ID:"automaticcoding_endifblock",_TARGET_REGEXP:b.getTokenValueById(d.TOKENS.IF),constructor:function(a,c,b,d,e){this._internalDocument=a;this._document=c;this._actionService=b;this._indentUtilities=e;this._tokenizerService=d;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndMethodsBlockSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndMethodsBlockSmartFormatter"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","matlab.tokens","rtc.indentutilities"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndMethodsBlockSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/model/CodeUtilities","MW/rtc/plugins/smartformatting/abstract/BlockSmartFormatter","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenConstants",
"MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities"],function(g,f,e,d,b){return g(e,{SMART_FORMATTER_ID:"automaticcoding_endmethodsblock",_TARGET_REGEXP:b.getTokenValueById(d.TOKENS.METHODS),constructor:function(a,c,b,d,e){this._internalDocument=a;this._document=c;this._actionService=b;this._indentUtilities=e;this._tokenizerService=d;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndParforBlockSmartFormatterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndParforBlockSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","matlab.tokens","rtc.indentutilities"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndParforBlockSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/model/CodeUtilities",
"MW/rtc/plugins/smartformatting/abstract/BlockSmartFormatter","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenConstants","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities"],function(g,f,e,d,b){return g(e,{SMART_FORMATTER_ID:"automaticcoding_endparforblock",_TARGET_REGEXP:b.getTokenValueById(d.TOKENS.PARFOR),constructor:function(a,c,b,d,e){this._internalDocument=a;this._document=c;this._actionService=b;this._indentUtilities=e;this._tokenizerService=d;this._actionService.loadActions(this._getActions())}})})},
"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndPropertiesBlockSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndPropertiesBlockSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","matlab.tokens","rtc.indentutilities"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},
"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndPropertiesBlockSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/model/CodeUtilities","MW/rtc/plugins/smartformatting/abstract/BlockSmartFormatter","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenConstants","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities"],function(g,f,e,d,b){return g(e,{SMART_FORMATTER_ID:"automaticcoding_endpropertiesblock",_TARGET_REGEXP:b.getTokenValueById(d.TOKENS.PROPERTIES),constructor:function(a,
c,b,d,e){this._internalDocument=a;this._document=c;this._actionService=b;this._indentUtilities=e;this._tokenizerService=d;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndSpmdBlockSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndSpmdBlockSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument",
"rtc.document","rtc.actionservice","matlab.tokens","rtc.indentutilities"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndSpmdBlockSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/model/CodeUtilities","MW/rtc/plugins/smartformatting/abstract/BlockSmartFormatter","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenConstants","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities"],function(g,f,e,
d,b){return g(e,{SMART_FORMATTER_ID:"automaticcoding_endspmdblock",_TARGET_REGEXP:b.getTokenValueById(d.TOKENS.SPMD),constructor:function(a,c,b,d,e){this._internalDocument=a;this._document=c;this._actionService=b;this._indentUtilities=e;this._tokenizerService=d;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndSwitchBlockSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndSwitchBlockSmartFormatter"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","matlab.tokens","rtc.indentutilities"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndSwitchBlockSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/model/CodeUtilities","MW/rtc/plugins/smartformatting/abstract/BlockSmartFormatter","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenConstants",
"MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities"],function(g,f,e,d,b){return g(e,{SMART_FORMATTER_ID:"automaticcoding_endswitchblock",_TARGET_REGEXP:b.getTokenValueById(d.TOKENS.SWITCH),constructor:function(a,c,b,d,e){this._internalDocument=a;this._document=c;this._actionService=b;this._indentUtilities=e;this._tokenizerService=d;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndTryBlockSmartFormatterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndTryBlockSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","matlab.tokens","rtc.indentutilities"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndTryBlockSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/model/CodeUtilities",
"MW/rtc/plugins/smartformatting/abstract/BlockSmartFormatter","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenConstants","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities"],function(g,f,e,d,b){return g(e,{SMART_FORMATTER_ID:"automaticcoding_endtryblock",_TARGET_REGEXP:b.getTokenValueById(d.TOKENS.TRY),_CATCH_STRING:"catch ME",constructor:function(a,c,b,d,e){this._internalDocument=a;this._document=c;this._actionService=b;this._indentUtilities=e;this._tokenizerService=d;this._actionService.loadActions(this._getActions())},
_tokenSpecificFormat:function(a,c,b,d,e){this._document.insertText("\n\n",a,b+1);this._document.insertText(this._CATCH_STRING,a+1,1);1<c&&this._indentUtilities.changeLineIndent(a+1,c-1);0<d&&this._indentUtilities.changeLineIndent(a,d);e.cursor.setLineColumn(a,c,!0)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndWhileBlockSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndWhileBlockSmartFormatter"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.actionservice","matlab.tokens","rtc.indentutilities"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/smartformatting/formatter/automaticcoding/EndWhileBlockSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/model/CodeUtilities","MW/rtc/plugins/smartformatting/abstract/BlockSmartFormatter","MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenConstants",
"MW/rtc/plugins/language/matlab/tokenizer/MatlabTokenUtilities"],function(g,f,e,d,b){return g(e,{SMART_FORMATTER_ID:"automaticcoding_endwhileblock",_TARGET_REGEXP:b.getTokenValueById(d.TOKENS.WHILE),constructor:function(a,c,b,d,e){this._internalDocument=a;this._document=c;this._actionService=b;this._indentUtilities=e;this._tokenizerService=d;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/paragraph/MarkdownBulletedListSmartFormatterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./MarkdownBulletedListSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document","rtc.actionservice","rtc.richtext.lists"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/paragraph/MarkdownBulletedListSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/model/CodeUtilities","MW/rtc/plugins/smartformatting/abstract/InlineSmartFormatter","MW/rtc/plugins/smartformatting/SmartFormatterUtilities"],
function(g,f,e,d){return g(e,{SMART_FORMATTER_ID:"markdown_bulletedlist",_TARGET_REGEXP:/^[\*+-]\s$/,_TRIGGER_CHAR:" ",_LIST_TYPE:"unordered",constructor:function(b,a,c){this._document=b;this._actionService=a;this._list=c;this._actionService.loadActions(this._getActions())},_isTriggerPositionExpected:function(b){var a=b.triggerPos.getNode();return!f.isCodeContainer(a)&&d.isFirstLayerContainer(b.triggerPos)&&a===a.rootContainer().startNode()},_format:function(b){var a=b.target,c=a.line,d=a.line;this._list.isLineListParagraph(c-
1,this._LIST_TYPE)&&(a.line-=1,c-=1);this._list.convertLineRangeIntoList(c,d,this._LIST_TYPE);c=b.cursorPos.getLineColumn();a.left=c.column-b.cursorPos.getOffset();a.right=c.column;this._document.deleteText(a.line,a.left,a.line,a.right);return b}})})},"MW/rtc/plugins/smartformatting/abstract/InlineSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/model/DocumentUtilities","MW/rtc/plugins/smartformatting/abstract/AbstractSmartFormatter","MW/rtc/plugins/smartformatting/SmartFormattingTriggerTypeEnum"],
function(g,f,e,d){return g(e,{_TARGET_REGEXP:void 0,_TRIGGER_CHAR:void 0,_APPLY_ONLY_STANDALONE_SEGMENT:!0,_isTriggerTypeExpected:function(b){return b.type===d.INSERT_TEXT&&b.text===this._TRIGGER_CHAR},_findAndRecordTarget:function(b){var a=this._getTextRangeForFormatting(b.cursorPos);if(!a)return!1;b.target=a;return!0},format:function(b){var a=this._document.startBlockEdit();b=this._format(b);this._document.endBlockEdit(a);return b},_format:function(b){throw Error("Unimplemented API: MW.rtc.plugins.smartformatting.InlineSmartFormatter._format");
},_getTextRangeForFormatting:function(b){var a=f.getTextRangeFromLeftToPosition(b);if(!a)return null;var c=b.getLineColumn().column,d=a.startPos.getLineColumn().column,a=a.text.substr(0,c-d),e=this._getOffsetOfTargetString(a);return 0>e?null:{line:b.getLineColumn().line,left:d+e,right:c,text:a.slice(e)}},_getOffsetOfTargetString:function(b){var a=b.search(this._TARGET_REGEXP);return 0>a?a:this._APPLY_ONLY_STANDALONE_SEGMENT&&!this._isAtStartOfSegment(b,a)?-1:a},_isAtStartOfSegment:function(b,a){return""===
b.charAt(a-1).replace(" ","")}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/paragraph/MarkdownHeadingSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./MarkdownHeadingSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.cursor","rtc.actionservice","rtc.richtext"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/paragraph/MarkdownHeadingSmartFormatter":function(){define(["dojo/_base/declare",
"MW/rtc/model/DocumentUtilities","MW/rtc/plugins/richtext/ParagraphFormatsEnum","MW/rtc/plugins/smartformatting/abstract/ParagraphFormatSmartFormatter"],function(g,f,e,d){return g(d,{SMART_FORMATTER_ID:"markdown_heading",_TARGET_REGEXP:/^#{2,4}(?!#)\s*\S/,constructor:function(b,a,c,d,e){this._internalDocument=b;this._document=a;this._cursor=c;this._actionService=d;this._richText=e;this._actionService.loadActions(this._getActions())},_getTypeOfParagraph:function(b){b=f.getRangeAndTextOfTargetOnLine(this._internalDocument,
b,this._TARGET_REGEXP);b=(b?b.text:"").match(/^#{2,4}/)[0];return"###"===b?e.HEADING2:"####"===b?e.HEADING3:e.HEADING1}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/paragraph/MarkdownNumberedListSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./MarkdownNumberedListSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document","rtc.actionservice","rtc.richtext.lists"]}},createInstance:function(d,
b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/paragraph/MarkdownNumberedListSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/model/CodeUtilities","MW/rtc/plugins/smartformatting/abstract/InlineSmartFormatter","MW/rtc/plugins/smartformatting/SmartFormatterUtilities"],function(g,f,e,d){return g(e,{SMART_FORMATTER_ID:"markdown_numberedlist",_TARGET_REGEXP:/^[1-9][0-9]*\.\s/,_TRIGGER_CHAR:" ",_LIST_TYPE:"ordered",constructor:function(b,a,c){this._document=
b;this._actionService=a;this._list=c;this._actionService.loadActions(this._getActions())},_isTriggerPositionExpected:function(b){var a=b.triggerPos.getNode();return!f.isCodeContainer(a)&&d.isFirstLayerContainer(b.triggerPos)&&a===a.rootContainer().startNode()},_findAndRecordTarget:function(b){var a=this._getTextRangeForFormatting(b.cursorPos);if(!a||a.text.match(this._TARGET_REGEXP)[0].length+1!==b.cursorPos.getLineColumn().column)return!1;var c=this._getItemNumberFromExtractedText(a.text);if(!this._isItemNumberValidForLine(c,
a.line))return!1;b.target=a;return!0},_format:function(b){var a=b.target,c=a.line,d=a.line,e=this._getItemNumberFromExtractedText(a.text);this._canItemNumberJoinList(e,a.line-1)&&(a.line-=1,c-=1);this._list.convertLineRangeIntoList(c,d,this._LIST_TYPE);c=b.cursorPos.getLineColumn();a.left=c.column-b.cursorPos.getOffset();a.right=c.column;this._document.deleteText(a.line,a.left,a.line,a.right);return b},_getItemNumberFromExtractedText:function(b){return parseInt(b.slice(0,-2),10)},_isItemNumberValidForLine:function(b,
a){return this._canItemNumberJoinList(b,a-1)?!0:1===b},_canItemNumberJoinList:function(b,a){return this._list.isLineListParagraph(a,this._LIST_TYPE)&&b===this._list.getNumberOfItemsInList(a,this._LIST_TYPE)+1}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/paragraph/MarkdownTitleSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./MarkdownTitleSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument",
"rtc.document","rtc.cursor","rtc.actionservice","rtc.richtext"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/paragraph/MarkdownTitleSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/plugins/richtext/ParagraphFormatsEnum","MW/rtc/plugins/smartformatting/abstract/ParagraphFormatSmartFormatter"],function(g,f,e){return g(e,{SMART_FORMATTER_ID:"markdown_title",_TARGET_REGEXP:/^#(?!#)\s*\S/,constructor:function(d,b,a,
c,e){this._internalDocument=d;this._document=b;this._cursor=a;this._actionService=c;this._richText=e;this._actionService.loadActions(this._getActions())},_getTypeOfParagraph:function(d){return f.TITLE}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownBold2SmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./MarkdownBold2SmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document","rtc.actionservice",
"rtc.richtext"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownBold2SmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/plugins/smartformatting/abstract/MarkdownStyleSmartFormatter"],function(g,f){return g(f,{SMART_FORMATTER_ID:"markdown_bold2",_OPEN_CHAR:"__",_CLOSE_CHAR:"__",_TARGET_REGEXP:/\_\_(?!\s)[^\_]*[^\_\s]\_\_$/,_TARGET_STYLE:["bold"],constructor:function(e,d,b){this._document=e;this._actionService=d;
this._richText=b;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/abstract/MarkdownStyleSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/plugins/smartformatting/abstract/OpenCloseInlineSmartFormatter"],function(g,f){return g(f,{_TARGET_STYLE:[],format:function(){var e=this.inherited(arguments);this._TARGET_STYLE.forEach(function(d){e.style[d]||this._actionService.executeAction("rtc_toggle_"+d)},this);return e},_format:function(){var e=this.inherited(arguments);
e.style=this._richText.getFormatAndStyle();var d=e.target;this._TARGET_STYLE.forEach(function(b){this._richText.applyStyleInLineColumn(b,!0,d.line,d.left,d.line,d.right)},this);return e}})})},"MW/rtc/plugins/smartformatting/abstract/OpenCloseInlineSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/model/CodeUtilities","MW/rtc/plugins/smartformatting/abstract/InlineSmartFormatter","MW/rtc/plugins/smartformatting/SmartFormattingTriggerTypeEnum"],function(g,f,e,d){return g(e,{_OPEN_CHAR:void 0,
_CLOSE_CHAR:void 0,_isTriggerPositionExpected:function(b){b=b.triggerPos.getNode();return!f.isCodeContainer(b)&&!f.isNonExecutableCodeContainer(b)},_isTriggerTypeExpected:function(b){return b.type===d.INSERT_TEXT&&b.text===this._CLOSE_CHAR.slice(-1)},_getTextRangeForFormatting:function(){var b=this.inherited(arguments);if(!b)return null;var a=this._OPEN_CHAR.length,c=this._CLOSE_CHAR.length;b.left+=a;b.right-=c;b.text=b.text.slice(a,-c);return b},_format:function(b){var a=b.target;this._document.deleteText(a.line,
a.right,a.line,a.right+this._CLOSE_CHAR.length);this._document.deleteText(a.line,a.left-this._OPEN_CHAR.length,a.line,a.left);a.left-=this._OPEN_CHAR.length;a.right-=this._OPEN_CHAR.length;return b}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownBoldSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./MarkdownBoldSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document","rtc.actionservice",
"rtc.richtext"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownBoldSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/plugins/smartformatting/abstract/MarkdownStyleSmartFormatter"],function(g,f){return g(f,{SMART_FORMATTER_ID:"markdown_bold",_OPEN_CHAR:"**",_CLOSE_CHAR:"**",_TARGET_REGEXP:/\*\*(?!\s)[^\*]*[^\*\s]\*\*$/,_TARGET_STYLE:["bold"],constructor:function(e,d,b){this._document=e;this._actionService=d;this._richText=
b;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownHyperlinkLabelUrlSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./MarkdownHyperlinkLabelUrlSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document","rtc.actionservice","rtc.richtext.hyperlink"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownHyperlinkLabelUrlSmartFormatter":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/smartformatting/abstract/OpenCloseInlineSmartFormatter"],function(g,f){return g(f,{SMART_FORMATTER_ID:"markdown_hyperlink_labelurl",_OPEN_CHAR:"[",_CLOSE_CHAR:")",_TARGET_REGEXP:/(\[(.+)\]\()(.+?)(\))$/,constructor:function(e,d,b){this._document=e;this._actionService=d;this._hyperlink=b;this._actionService.loadActions(this._getActions())},_format:function(){var e=this.inherited(arguments).target,d=e.text.split("]("),b=d[0].trim(),d=d[1].trim();this._hyperlink.applyHyperlinkInLineColumn(d,
b,e.line,e.left,e.right);return e}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownHyperlinkUrlTagSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./MarkdownHyperlinkUrlTagSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document","rtc.actionservice","rtc.richtext.hyperlink"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownHyperlinkUrlTagSmartFormatter":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/smartformatting/abstract/OpenCloseInlineSmartFormatter","MW/rtc/plugins/smartformatting/SmartFormatterUtilities"],function(g,f,e){return g(f,{SMART_FORMATTER_ID:"markdown_hyperlink_urltag",_OPEN_CHAR:"\x3c",_CLOSE_CHAR:"\x3e",_TARGET_REGEXP:RegExp("\x3c"+e.URL_REGEXP_STRING+"\x3e$"),constructor:function(d,b,a){this._document=d;this._actionService=b;this._hyperlink=a;this._actionService.loadActions(this._getActions())},_format:function(){var d=this.inherited(arguments).target;this._hyperlink.applyHyperlinkInLineColumn(d.text,
d.text,d.line,d.left,d.right);return d}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownItalic2SmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./MarkdownItalic2SmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document","rtc.actionservice","rtc.richtext"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownItalic2SmartFormatter":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/smartformatting/abstract/MarkdownStyleSmartFormatter"],function(g,f){return g(f,{SMART_FORMATTER_ID:"markdown_italic2",_OPEN_CHAR:"_",_CLOSE_CHAR:"_",_TARGET_REGEXP:/\_(?!\s)[^\_]*[^\_\s]\_$/,_TARGET_STYLE:["italic"],constructor:function(e,d,b){this._document=e;this._actionService=d;this._richText=b;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownItalicBold2SmartFormatterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./MarkdownItalicBold2SmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document","rtc.actionservice","rtc.richtext"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownItalicBold2SmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/plugins/smartformatting/abstract/MarkdownStyleSmartFormatter"],function(g,f){return g(f,{SMART_FORMATTER_ID:"markdown_italicbold2",
_OPEN_CHAR:"___",_CLOSE_CHAR:"___",_TARGET_REGEXP:/\_\_\_(?!\s)[^\_]*[^\_\s]\_\_\_$/,_TARGET_STYLE:["italic","bold"],constructor:function(e,d,b){this._document=e;this._actionService=d;this._richText=b;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownItalicBoldSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./MarkdownItalicBoldSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document",
"rtc.actionservice","rtc.richtext"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownItalicBoldSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/plugins/smartformatting/abstract/MarkdownStyleSmartFormatter"],function(g,f){return g(f,{SMART_FORMATTER_ID:"markdown_italicbold",_OPEN_CHAR:"***",_CLOSE_CHAR:"***",_TARGET_REGEXP:/\*\*\*(?!\s)[^\*]*[^\*\s]\*\*\*$/,_TARGET_STYLE:["italic","bold"],constructor:function(e,
d,b){this._document=e;this._actionService=d;this._richText=b;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownItalicSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./MarkdownItalicSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document","rtc.actionservice","rtc.richtext"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},
"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownItalicSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/plugins/smartformatting/abstract/MarkdownStyleSmartFormatter"],function(g,f){return g(f,{SMART_FORMATTER_ID:"markdown_italic",_OPEN_CHAR:"*",_CLOSE_CHAR:"*",_TARGET_REGEXP:/\*(?!\s)[^\*]*[^\*\s]\*$/,_TARGET_STYLE:["italic"],constructor:function(e,d,b){this._document=e;this._actionService=d;this._richText=b;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownMonospaceSmartFormatterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./MarkdownMonospaceSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document","rtc.actionservice","rtc.richtext"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/smartformatting/formatter/markdown/text/MarkdownMonospaceSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/plugins/smartformatting/abstract/MarkdownStyleSmartFormatter"],function(g,f){return g(f,{SMART_FORMATTER_ID:"markdown_monospace",
_OPEN_CHAR:"`",_CLOSE_CHAR:"`",_TARGET_REGEXP:/`(?!\s)[^`]*[^`\s]`$/,_TARGET_STYLE:["monospace"],constructor:function(e,d,b){this._document=e;this._actionService=d;this._richText=b;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/formatter/matlab/MatlabMonospaceSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./MatlabMonospaceSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document",
"rtc.actionservice","rtc.richtext"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/smartformatting/formatter/matlab/MatlabMonospaceSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/plugins/smartformatting/abstract/MarkdownStyleSmartFormatter"],function(g,f){return g(f,{SMART_FORMATTER_ID:"matlab_monospace",_OPEN_CHAR:"|",_CLOSE_CHAR:"|",_TARGET_REGEXP:/\|(?!\s)[^\|]*[^\|\s]\|$/,_TARGET_STYLE:["monospace"],constructor:function(e,d,b){this._document=e;this._actionService=
d;this._richText=b;this._actionService.loadActions(this._getActions())}})})},"MW/rtc/plugins/smartformatting/formatter/matlab/MatlabSectionBreakHeadingSmartFormatterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/matlab/MatlabSectionBreakHeadingSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.internaldocument rtc.document rtc.cursor rtc.actionservice rtc.richtext rtc.code.sections.sectionbreak".split(" ")}},
createInstance:function(d,b,a,c,f,g){return new e(d,b,a,c,f,g)}})})},"MW/rtc/plugins/smartformatting/formatter/matlab/MatlabSectionBreakHeadingSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/plugins/richtext/ParagraphFormatsEnum","MW/rtc/plugins/smartformatting/abstract/ParagraphFormatSmartFormatter"],function(g,f,e){return g(e,{SMART_FORMATTER_ID:"matlab_sectionbreak_heading",_TARGET_REGEXP:/^%{2}\s+\S/,constructor:function(d,b,a,c,e,f){this._internalDocument=d;this._document=b;this._cursor=
a;this._actionService=c;this._richText=e;this._sectionBreak=f;this._actionService.loadActions(this._getActions())},_isEnabled:function(){var d=this.inherited(arguments);this._sectionBreak.canInsertSectionBreak()||(d=!1);return d},_format:function(d,b){this._sectionBreak.isLineAtStartOfSection(d)||(this._sectionBreak.insertSectionBreakAtLineColumn(d,1),d+=1);this._transformLineToParagraph(d,b)},_getTypeOfParagraph:function(d){return 1===d?f.TITLE:f.HEADING1}})})},"MW/rtc/plugins/smartformatting/formatter/matlab/MatlabSectionBreakSeparatorSmartFormatterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/matlab/MatlabSectionBreakSeparatorSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.document","rtc.cursor","rtc.actionservice","rtc.code.sections.sectionbreak"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/smartformatting/formatter/matlab/MatlabSectionBreakSeparatorSmartFormatter":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/smartformatting/abstract/ParagraphFormatSmartFormatter"],function(g,f){return g(f,{SMART_FORMATTER_ID:"matlab_sectionbreak_separator",_TARGET_REGEXP:/^(%{2}|-{3,}|\*{3,})\s*$/,constructor:function(e,d,b,a,c){this._internalDocument=e;this._document=d;this._cursor=b;this._actionService=a;this._sectionBreak=c;this._actionService.loadActions(this._getActions())},_isEnabled:function(){var e=this.inherited(arguments);this._sectionBreak.canInsertSectionBreak()||(e=!1);return e},_format:function(e,
d){var b=this._internalDocument.getLineNode(e-1),a=e+1;this._sectionBreak.isLineAtStartOfSection(e)?(b=b.getTextForPositioning().length+1,this._document.deleteText(e,1,e,b),this._sectionBreak.insertSectionBreakAtLineColumn(a,1)):(a=this._internalDocument.getLineNode(a-1),this._internalDocument.deleteNode(b,{node:a.startNode(),offset:0}),this._sectionBreak.insertSectionBreakAtLineColumn(e,1))}})})},"MW/rtc/plugins/smartformatting/formatter/symbol/SymbolTrademarkCopyrightSmartFormatterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./SymbolTrademarkCopyrightSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document","rtc.actionservice"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/smartformatting/formatter/symbol/SymbolTrademarkCopyrightSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/plugins/smartformatting/abstract/OpenCloseInlineSmartFormatter"],function(g,f){var e={C:"\u00a9",R:"\u00ae",TM:"\u2122",
SM:"\u2120"};return g(f,{SMART_FORMATTER_ID:"symbol_trademark_copyright",_OPEN_CHAR:"(",_CLOSE_CHAR:")",_TARGET_REGEXP:/\((C|R|TM|SM)\)$/i,_APPLY_ONLY_STANDALONE_SEGMENT:!1,constructor:function(d,b){this._document=d;this._actionService=b;this._actionService.loadActions(this._getActions())},_format:function(){var d=this.inherited(arguments),b=d.target,a=b.text.toUpperCase();this._document.replaceText(e[a],b.line,b.left,b.line,b.right);return d}})})},"MW/rtc/plugins/smartformatting/formatter/HyperlinkSmartFormatterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/HyperlinkSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document","rtc.actionservice","rtc.richtext.hyperlink"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/smartformatting/formatter/HyperlinkSmartFormatter":function(){define(["dojo/_base/declare","MW/rtc/model/CodeUtilities","MW/rtc/plugins/smartformatting/SmartFormatterUtilities","MW/rtc/plugins/smartformatting/SmartFormattingTriggerTypeEnum",
"MW/rtc/plugins/smartformatting/abstract/InlineSmartFormatter"],function(g,f,e,d,b){return g(b,{SMART_FORMATTER_ID:"hyperlink",_TARGET_REGEXP:RegExp(e.URL_REGEXP_STRING+"$"),_TRIGGER_CHAR:" ",constructor:function(a,c,b){this._document=a;this._actionService=c;this._hyperlink=b;this._actionService.loadActions(this._getActions())},_isTriggerTypeExpected:function(a){return a.type===d.INSERT_TEXT&&a.text===this._TRIGGER_CHAR||a.type===d.INSERT_BREAK},_findAndRecordTarget:function(a){var c=this._getTextRangeForFormatting(a.triggerPos);
if(!c)return!1;a.target=c;return!0},_isTriggerPositionExpected:function(a){a=a.triggerPos;if(a.isAtLeftEdge()){var c=a.getNode().previousSibling();c&&(a=c.endPosition())}c=a.getNode();return!f.isCodeContainer(c)&&!f.isNonExecutableCodeContainer(c)&&!this._hyperlink.isAtHyperlink(a)},_format:function(a){var c=a.target;this._hyperlink.applyHyperlinkInLineColumn(c.text,c.text,c.line,c.left,c.right);return a}})})},"MW/rtc/plugins/smartformatting/formatter/MarkupEquationSmartFormatterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/formatter/MarkupEquationSmartFormatter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document","rtc.actionservice","rtc.richtext.equationcontroller"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/smartformatting/formatter/MarkupEquationSmartFormatter":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/plugins/smartformatting/abstract/OpenCloseInlineSmartFormatter"],
function(g,f,e,d){return g(d,{SMART_FORMATTER_ID:"markup_equation",_OPEN_CHAR:"$",_CLOSE_CHAR:"$",_TARGET_REGEXP:/\$(?=[^\s\$])(\S|\s(?!\$))*[^\\\s]\$$/,constructor:function(b,a,c){this._document=b;this._actionService=a;this._equation=c;this._actionService.loadActions(this._getActions());this._aspectHandles=[];this._initialize()},_convertEquationToMarkup:function(b){var a=b.getTeXString();if(!(0<=a.indexOf("\n"))){var c=this._document.createPosition(b),d=c.getLineColumn(),e=d.line,d=d.column,f=this._document.startBlockEdit();
this._document.insertText("$"+a+"$",e,d);this._equation.deleteEquation(b);this._document.endBlockEdit(f);this._document.deletePosition(c);return!0}},_format:function(){var b=this.inherited(arguments),a=b.target;this._equation.convertRangeToEquation(a.text,a.line,a.left,a.line,a.right);return b},enable:function(){this._isEnabled()||this._initialize();this.inherited(arguments)},disable:function(){this.inherited(arguments);this._aspectHandles.forEach(function(b){b.remove()});this._aspectHandles=[]},
_initialize:function(){this._aspectHandles.push(e.after(this._equation,"onDelete",f.hitch(this,"_convertEquationToMarkup"),!0))}})})},"MW/rtc/plugins/smartformatting/BackspaceUndoHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/BackspaceUndoHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.document","rtc.cursor","rtc.undoredo.controller"]}},createInstance:function(d,b,a){return new e(d,
b,a)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/smartformatting/BackspaceUndoHandler":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/model/DocumentConstants"],function(g,f,e,d){return g(null,{constructor:function(b,a,c){this._document=b;this._cursor=a;this._undoRedoController=c;this._aspectHandles=[];this._cachedCursorPos=null},start:function(){this.reset();this._cachedCursorPos=this._cursor.getLineColumn();this._aspectHandles.push(e.after(this._document,
"onChange",f.hitch(this,"reset")));this._aspectHandles.push(e.after(this._cursor,"onChange",f.hitch(this,"_resetOnCursorChange")));this._aspectHandles.push(e.around(this._document,"deleteTextAtCurrentPosition",f.hitch(this,"_oneTimeUndo")))},reset:function(){this._aspectHandles.forEach(function(b){b.remove()});this._aspectHandles=[];this._cachedCursorPos=null},_resetOnCursorChange:function(){var b=this._cursor.getLineColumn();(b.line!==this._cachedCursorPos.line||b.column!==this._cachedCursorPos.column)&&
this.reset()},_oneTimeUndo:function(b){return f.hitch(this,function(a){this.reset();return a===d.BACKWARD_DELETE?(this._undoRedoController.undo(),!0):b.apply(this._document,arguments)})},destroy:function(){this.reset()}})})},"MW/rtc/plugins/smartformatting/SmartFormattingProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/smartformatting/SmartFormatting"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.internaldocument rtc.document rtc.cursorcontroller rtc.actionservice rtc.smartformatter rtc.smartformatting.backspaceundohandler".split(" ")}},
createInstance:function(d,b,a,c,f,g){return new e(d,b,a,c,f,g)}})})},"MW/rtc/plugins/smartformatting/SmartFormatting":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/cursor/CursorUtilities MW/rtc/model/DocumentConstants MW/rtc/model/DocumentEventUtilities MW/rtc/model/PositionUtilities MW/rtc/model/Range MW/rtc/plugins/smartformatting/SmartFormattingTriggerData MW/rtc/plugins/smartformatting/SmartFormattingTriggerTypeEnum".split(" "),function(g,
f,e,d,b,a,c,h,k,l,m){return g(d,{_SMART_FORMATTING_EDIT_BLOCK_TYPE:"SmartFormattingEditBlock",constructor:function(a,c,b,d,e,h){this._internalDocument=a;this._document=c;this._cursorController=b;this._actionService=d;this._smartFormatters=e;this._backspaceUndoHandler=h;this.enable();this._actionService.loadActions([{id:"rtc_smartformatting_on",enabled:!0,callback:f.hitch(this,this.enable)},{id:"rtc_smartformatting_off",enabled:!0,callback:f.hitch(this,this.disable)}])},enable:function(){this._enabled||
(this._initialize(),this._enabled=!0)},disable:function(){this._enabled&&(this.destroy(),this._backspaceUndoHandler.reset(),this._enabled=!1,this._smartFormatters.forEach(function(a){a.disable()}))},getSmartFormattersIds:function(){return this._smartFormatters.map(function(a){return a.SMART_FORMATTER_ID})},_initialize:function(){if(!this._smartFormatters.length)return null;this.own(e.after(this._internalDocument,"onDocumentChanged",f.hitch(this,"_documentChanged"),this));this.own(e.after(this._document,
"onDirectedDeletion",f.hitch(this,"_onDelete"),!0))},_documentChanged:function(c){if(this._enabled){var b=this._cursorController.getCursors();if(!this._isSmartFormattingInvalidForDocChange(b,c)&&!(c[0]||{}).isUndoRedo)c=c.filter(function(c){c=c.type;return c===a.INSERT_TEXT||c===a.INSERT_BREAK_EVENT}),c=this._findSmartFormattersToApply(c,b),this._applySmartFormatters(c)&&this._backspaceUndoHandler.start()}},_isSmartFormattingInvalidForDocChange:function(a,b){return!b||0===b.length?!0:a.length===b.length&&
c.allEventsOfSameType(b)||2*a.length===b.length&&this._isSetOfReplacements(b)?!1:!0},_isSetOfReplacements:function(c){if(0!==c.length%2)return!1;for(var b=!0,d=0;d<c.length;d+=2){var e=c[d+1].type;if(!(c[d].type===a.DELETION_EVENT&&(e===a.INSERT_TEXT||e===a.INSERT_BREAK_EVENT))){b=!1;break}}return b},_findSmartFormattersToApply:function(c,b){var d=[];c.forEach(function(c,e){var f=b[e],h=null;switch(c.type){case a.INSERT_BREAK_EVENT:h=this._createInsertBreakTriggerData(c,f);break;case a.INSERT_TEXT:h=
this._createInsertTextTriggerData(c,f)}null!==h&&(f=this._getFirstApplicable(this._smartFormatters,h),null!==f&&d.push({triggerData:h,smartFormatter:f}))},this);return d},_createInsertBreakTriggerData:function(a,c){if(!this._internalDocument.getLineNode(a.startLine).isTextContainerNode())return null;var b=c.getCursorPosition(),d=this._internalDocument.getPositionForLineColumn(a.startLine+1,a.column+1);return 0>=h.comparePositions(b,d)?null:l.createInsertBreakEventTriggerData(m.INSERT_BREAK,d,c)},
_createInsertTextTriggerData:function(a,c){var b=c.getCursorPosition().getLineColumn(),d=b.line,b=b.column,e=a.position.getLineColumn(),f=e.column+a.length;return!(d===e.line&&b===f)?null:l.createInsertTextEventTriggerData(m.INSERT_TEXT,a.position,a.text,c)},_applySmartFormatters:function(a){if(0!==a.length){this._enabled=!1;var c=this._document.startBlockEdit(this._SMART_FORMATTING_EDIT_BLOCK_TYPE),b=!1;a.forEach(function(a){a.smartFormatter.format(a.triggerData)&&(b=!0)},this);this._document.endBlockEdit(c);
c=this._document.startBlockEdit(this._SMART_FORMATTING_EDIT_BLOCK_TYPE);a.forEach(function(a){a.smartFormatter.postFormat(a.triggerData)},this);this._document.endBlockEdit(c);this._enabled=!0;return b}},_findSmartFormatterAndApply:function(a){var c=this._getFirstApplicable(this._smartFormatters,a);if(!c)return null;this._enabled=!1;a=c.format(a);this._enabled=!0;return a},_getFirstApplicable:function(a,c){for(var b=0;b<a.length;b+=1){var d=a[b];if(d.isApplicable(c))return d}return null},_onDelete:function(a,
c){if(this._enabled){var d=this._cursorController.getCursorsWithoutSelection(),e=new k(c.startPosition,c.endPosition),d=b.getCursorAtEdgeOfRange(d,e);if(null!==d&&(e=d.getCursorPosition(),d=l.createDeleteTriggerData(m.DELETE,e,a,c,d),this._findSmartFormatterAndApply(d)))return!0}}})})},"MW/rtc/plugins/smartformatting/SmartFormattingTriggerData":function(){define(["dojo/_base/declare"],function(g){var f=g(null,{constructor:function(e,d,b,a,c,f){this.type=e;this.triggerPos=d;this.cursorPos=f.getCursorPosition();
this.text=b;this.direction=a;this.selection=c;this.cursor=f}});return{createInsertBreakEventTriggerData:function(e,d,b){return new f(e,d,null,null,null,b)},createInsertTextEventTriggerData:function(e,d,b,a){return new f(e,d,b,null,null,a)},createDeleteTriggerData:function(e,d,b,a,c){return new f(e,d,null,b,a,c)}}})},"MW/rtc/plugins/smarttab/SmartTabProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/smarttab/SmartTab","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,
{requires:function(){return{createInstance:["rtc.actionservice","rtc.cursor","rtc.document"]}},createInstance:function(d,b,a){return new f(d,b,a)}})})},"MW/rtc/plugins/smarttab/SmartTab":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/abstract/AbstractPlugin","./SmartTabUtilities"],function(g,f,e,d){return g(e,{constructor:function(b,a,c){this._actionService=b;this._cursor=a;this._document=c;b=[{id:"rtc_smart_tab",enabled:!0,key:"tab",callback:f.hitch(this,"_doSmartTab")}];this._actionService.loadActions(b)},
_doSmartTab:function(){return d.doSmartTab(this._cursor,this._document)}})})},"MW/rtc/plugins/statusactionbar/decorators/SectionsDecoratorProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/statusactionbar/decorators/SectionsDecorator"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.code.sections.model","margin.execution.sectionsdecorator.utilities","margin.statusactionbar.evaluation"]}},
createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/statusactionbar/decorators/SectionsDecorator":function(){define("dojo/aspect dojo/dom-class dojo/dom-construct dojo/has dojo/_base/declare dojo/_base/lang MW/rtc/margin/AbstractRangeMarginDecorator MW/rtc/margin/MarginRangeDescription".split(" "),function(g,f,e,d,b,a,c,h){return b([c],{_WIDTH:10,_CURRENT_CSS_CLASS:"current",_DECORATOR_CSS_CLASS:"section-highlight",_RUN_SECTION_ACTION:"rtc_run_section",constructor:function(c,
b,d){this._sectionModel=c;this._sectionDecoratorUtilities=b;this._sectionEvaluation=d;this._divs=[];this.own(g.after(this._sectionModel,"onModelUpdated",a.hitch(this,"onUpdate")));this.own(g.after(this._sectionModel,"onAttributesUpdated",a.hitch(this,"onUpdate")));this.own(g.after(this._sectionModel,"currentSectionChanged",a.hitch(this,"_handleCurrentSectionChanged")))},getRangeDescriptions:function(a){a=[];this._divs=[];var c=this._sectionDecoratorUtilities.getSectionNumbersInView(),b=this._sectionModel.getCurrentSectionNumber();
if(-1===c.firstSectionNumber||-1===c.lastSectionNumber)return[];for(var d=c.firstSectionNumber;d<=c.lastSectionNumber;d++){var e=this._getDescriptionForSection(d,b===d);e&&(this._divs[d]=e.div,a.push(e))}return a},_getDescriptionForSection:function(a,c){var b=e.create("div"),d=this._sectionDecoratorUtilities.getDecorationClassesForSection(a);d.push(this._DECORATOR_CSS_CLASS);c&&d.push(this._CURRENT_CSS_CLASS);f.add(b,d);var g=this._sectionModel.getSection(a),d=g.start.getLine(),g=g.end.getLine();
return 0>d||0>g?null:new h(b,d,g,this,!0)},_handleCurrentSectionChanged:function(){this._divs.forEach(function(a){f.remove(a,this._CURRENT_CSS_CLASS)},this);var a=this._sectionModel.getCurrentSectionNumber();0<=a&&(a<this._divs.length&&this._divs[a])&&f.add(this._divs[a],this._CURRENT_CSS_CLASS)},handleMouseClick:function(a,c){var b=this._sectionModel.getSectionNumberForLine(c);this._sectionEvaluation.handleMouseClick(a,b)},getWidth:function(){return this._WIDTH},getPriority:function(){return 2},
getId:function(){return"Sections"}})})},"MW/rtc/plugins/statusactionbar/decorators/StaleSectionsDecoratorProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/statusactionbar/decorators/StaleSectionsDecorator"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.code.sections.model","rtc.code.sections.stale.model","margin.execution.sectionsdecorator.utilities"]}},createInstance:function(d,
b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/statusactionbar/decorators/StaleSectionsDecorator":function(){define(["dojo/_base/declare","MW/rtc/plugins/statusactionbar/decorators/AbstractStaleSectionsDecorator"],function(g,f){return g(f,{_STALE_CSS_CLASS:"stale",constructor:function(e,d,b){},getPriority:function(){return 5},getId:function(){return"Stale_Sections"},_getDecorationClassesForStaleSection:function(e){e=this._sectionDecoratorUtilities.getDecorationClassesForSection(e);e.push(this._STALE_CSS_CLASS);
return e}})})},"MW/rtc/plugins/statusactionbar/decorators/AbstractStaleSectionsDecorator":function(){define("dojo/aspect dojo/dom-class dojo/dom-construct dojo/_base/declare dojo/_base/lang dojo/i18n!l10n/nls/actions MW/rtc/margin/AbstractRangeMarginDecorator MW/rtc/margin/MarginRangeDescription".split(" "),function(g,f,e,d,b,a,c,h){return d(c,{_WIDTH:10,constructor:function(a,c,d){this._sectionModel=a;this._staleSectionModel=c;this._sectionDecoratorUtilities=d;this._staleSections=[];this.own(g.after(this._staleSectionModel,
"onModelUpdated",b.hitch(this,"_handleStalenessModelUpdate")));this.own(g.after(this._sectionModel,"onModelUpdated",b.hitch(this,"onUpdate")));this.onUpdate()},getRangeDescriptions:function(a){a=[];var c=this._sectionDecoratorUtilities.getSectionNumbersInView();if(-1===c.firstSectionNumber||-1===c.lastSectionNumber)return[];for(var b=c.firstSectionNumber;b<=c.lastSectionNumber;b++)if(this._staleSectionModel.isSectionStale(b)){var d=e.create("div");f.add(d,this._getDecorationClassesForStaleSection(b));
var g=this._sectionModel.getSection(b),q=g.start.getLine(),g=g.end.getLine();0<q&&0<g&&(d=new h(d,q,g,this,!0),a.push(d))}return a},_handleStalenessModelUpdate:function(){var a=!1,c=this._sectionModel.getSections().map(function(a,c){return this._staleSectionModel.isSectionStale(c)},this),a=c.length!==this._staleSections.length?!0:c.some(function(a,c){return a!==this._staleSections[c]},this);this._staleSections=c;if(a)this.onUpdate()},getWidth:function(){return this._WIDTH},_getDecorationClassesForStaleSection:function(a){}})})},
"MW/rtc/plugins/statusactionbar/decorators/StaleSectionsBackgroundDecoratorProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/statusactionbar/decorators/StaleSectionsBackgroundDecorator"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.code.sections.model","rtc.code.sections.stale.model","margin.execution.sectionsdecorator.utilities"]}},createInstance:function(d,b,a){return new e(d,
b,a)}})})},"MW/rtc/plugins/statusactionbar/decorators/StaleSectionsBackgroundDecorator":function(){define(["dojo/_base/declare","MW/rtc/plugins/statusactionbar/decorators/AbstractStaleSectionsDecorator"],function(g,f){return g(f,{_STALE_BACKGROUND_CSS_CLASS:"stale-background",constructor:function(e,d,b){},getPriority:function(){return 1},getId:function(){return"Stale_Sections_Background"},_getDecorationClassesForStaleSection:function(e){e=this._sectionDecoratorUtilities.getDecorationClassesForSection(e);
e.push(this._STALE_BACKGROUND_CSS_CLASS);return e}})})},"MW/rtc/plugins/statusactionbar/evaluation/StatusActionBarEvaluationProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/statusactionbar/evaluation/StatusActionBarEvaluation"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.actionservice","rtc.cursorcontroller","rtc.code.sections.model","rtc.code.sections.stale.model",
"rtc.code.matlabfiletype"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/statusactionbar/evaluation/StatusActionBarEvaluation":function(){define(["dojo/mouse","dojo/_base/declare"],function(g,f){return f(null,{constructor:function(e,d,b,a,c){this._actionService=e;this._cursorController=d;this._sectionModel=b;this._staleSectionModel=a;this._fileTypeService=c},canBeEvaluated:function(e){var d=this._sectionModel.getCurrentSectionNumber()===e,b=this._staleSectionModel.isSectionStale(e);
e=!!this._sectionModel.getSection(e).localFunctions;var a=this._fileTypeService.isFunction()||this._fileTypeService.isClass();return(d||b)&&!(e||a)},handleMouseClick:function(e,d){if(g.isLeft(e)){var b=this.canBeEvaluated(d);this._sectionModel.getCurrentSectionNumber()!==d&&this._cursorController.setCursorToEvent(e);b&&this._actionService.executeAction("rtc_run_section")}},handleMouseDown:function(e,d){e.stopPropagation()},handleMouseUp:function(e,d){e.stopPropagation()}})})},"MW/rtc/plugins/statusactionbar/decorators/SectionBreakLineMarginDecoratorProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/statusactionbar/decorators/SectionBreakLineMarginDecorator"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.code.sections.model"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/statusactionbar/decorators/SectionBreakLineMarginDecorator":function(){define("dojo/aspect dojo/dom-class dojo/dom-construct dojo/_base/declare dojo/_base/lang MW/rtc/margin/AbstractLineMarginDecorator".split(" "),
function(g,f,e,d,b,a){return d(a,{_WIDTH:8,_ACTIVE_SECTION_CSS_CLASS:"active",_SECTION_BREAK_CSS_CLASS:"sectionBreakLineMarginDiv",constructor:function(a){this._sectionModel=a;this.own(g.after(this._sectionModel,"onModelUpdated",b.hitch(this,"_handleSectionsUpdated")));this.own(g.after(this._sectionModel,"currentSectionChanged",b.hitch(this,"_handleSectionsUpdated")))},_handleSectionsUpdated:function(){this.onUpdate()},hasLayerForLineNumber:function(a,b){return!this._sectionModel.getSectionForLine(a)},
createDecorationForLineNumber:function(a,b){var d=e.create("div"),g=this._sectionModel.getSectionForLine(a+1);(g===this._sectionModel.getCurrentSection()||g===this._sectionModel.getNextSection())&&f.add(d,this._ACTIVE_SECTION_CSS_CLASS);f.add(d,this._SECTION_BREAK_CSS_CLASS);return d},getWidth:function(){return this._WIDTH}})})},"MW/rtc/plugins/statusactionbar/SectionDecoratorUtilitiesProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/statusactionbar/SectionDecoratorUtilities"],
function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.code.sections.model","rtc.code.matlabfiletype","rtc.view","rtc.code.sections.view.containerutility","margin.statusactionbar.evaluation"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"MW/rtc/plugins/statusactionbar/SectionDecoratorUtilities":function(){define(["dojo/aspect","dojo/dom-class","dojo/dom-construct","dojo/has","dojo/_base/declare"],function(g,
f,e,d,b){return b(null,{_SECTION_CSS_CLASS:"section",_ONLY_SECTION_CSS_CLASS:"only",_FUNCTION_SECTION_CSS_CLASS:"function",_FIRST_SECTION_CSS_CLASS:"first",_LAST_SECTION_CSS_CLASS:"last",_EXECUTABLE_CSS_CLASS:"executable",constructor:function(a,c,b,d,e){this._sectionModel=a;this._fileTypeService=c;this._view=b;this._sectionContainerUtilities=d;this._sectionEvaluation=e},getDecorationClassesForSection:function(a){var c=[this._SECTION_CSS_CLASS],b=this._sectionModel.getSections().length;if(0>a||a>=
b)return[];var d=0===a,e=a===b-1,b=1===b,f=this._fileTypeService.isFunction()||this._fileTypeService.isClass(),g=!!this._sectionModel.getSection(a).localFunctions;d&&c.push(this._FIRST_SECTION_CSS_CLASS);e&&c.push(this._LAST_SECTION_CSS_CLASS);b&&c.push(this._ONLY_SECTION_CSS_CLASS);(f||g)&&c.push(this._FUNCTION_SECTION_CSS_CLASS);this._sectionEvaluation.canBeEvaluated(a)&&c.push(this._EXECUTABLE_CSS_CLASS);return c},getSectionNumbersInView:function(){var a=this._view.getDomTargetPosition(),c=a.scrollTop,
b=this._sectionContainerUtilities.getClosestSectionNumberByCoordinate({y:c});this._sectionModel.getSection(b)||(b=-1);a=this._sectionContainerUtilities.getClosestSectionNumberByCoordinate({y:c+a.clientHeight});this._sectionModel.getSection(a)||(a=-1);return{firstSectionNumber:b,lastSectionNumber:a}}})})},"MW/rtc/plugins/statusactionbar/SectionRangeMarginExpansionHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/statusactionbar/SectionRangeMarginExpansionHandler"],
function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.margin.execution","rtc.code.sections.model","rtc.code.sections.view.containerutility"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/statusactionbar/SectionRangeMarginExpansionHandler":function(){define(["dojo/_base/declare","MW/rtc/margin/AbstractRangeMarginExpansionHandler"],function(g,f){return g(f,{constructor:function(e,d,b){this._executionMargin=
e;this._sectionModel=d;this._sectionContainerUtil=b;this._executionMargin.setExpansionHandler(this)},calculateUpdatedDivDimensions:function(e,d,b){d-=1;b-=1;var a=this._sectionModel.getSectionForLine(d),c=this._sectionModel.getSectionForLine(b);if(!a||!c)return e;a=a.start.getLine()-1===d;c=c.end.getLine()-1===b;a&&(d=this._getSectionDimensionsForLine(d),e.height+=e.top-d.top,e.top=d.top);c&&(d=this._getSectionDimensionsForLine(b),e.height+=d.top+d.height-(e.top+e.height));return e},_getSectionDimensionsForLine:function(e){e=
this._sectionModel.getSectionNumberForLine(e);return this._sectionContainerUtil.getSectionDimensions(e)},dispose:function(){this.inherited(arguments);this._executionMargin.removeExpansionHandler(this)}})})},"MW/rtc/margin/AbstractRangeMarginExpansionHandler":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin"],function(g,f){return g(f,{calculateUpdatedDivDimensions:function(e,d,b){throw Error("Unimplemented API: MW.rtc.margin.AbstractMarginRangeExpansionHandler.getDivDimensions");
}})})},"MW/rtc/plugins/statusbar/StatusBarRequestHandlerProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/statusbar/StatusBarRequestHandler"],function(g,f,e,d){return g(e,{requires:function(){return{createInstance:["rtc.id","rtc.cursor","rtc.linenumberservice","rtc.editordataservice"]}},createInstance:function(b,a,c,e){return new d(b,a,c,e)}})})},"MW/rtc/plugins/statusbar/StatusBarRequestHandler":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin"],function(g,f,e,d){return g(d,{_FEATURE_ID:"rtc.statusbar",constructor:function(b,a,c,d){this._editorId=b;this._cursor=a;this._editorDataService=d;this._lineNumberService=c;this.own(e.after(this._cursor,"onChange",f.hitch(this,"_handleCursorChange")))},_handleCursorChange:function(){var b=this._cursor.getLineColumn();this._editorDataService.request(this._FEATURE_ID,{line:b.line,codeline:this._lineNumberService.getCodeLineNumberFromLineNumber(b.line-
1),column:b.column,editorId:this._editorId}).then(f.hitch(this,function(a){!0==a.resendRequest&&this._handleCursorChange()}),function(){})}})})},"MW/rtc/plugins/sections/SectionsRequestHandlerProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/sections/SectionsRequestHandler"],function(g,f,e,d){return g(e,{requires:function(){return{createInstance:["rtc.id","rtc.internaldocument","rtc.editordataservice","rtc.code.sections.model"]}},
createInstance:function(b,a,c,e){return new d(b,a,c,e)}})})},"MW/rtc/plugins/sections/SectionsRequestHandler":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin","MW/rtc/plugins/goto/GotoUtilities"],function(g,f,e,d,b){return g(d,{_FEATURE_ID:"rtc.dataservice.sections",_EDITOR_ID:"editorId",_SECTIONS:"sections",constructor:function(a,c,b,d){this._editorId=a;this._internalDocument=c;this._editorDataService=b;this._sectionsModel=d;this.own(e.after(this._internalDocument,
"onDocumentChanged",f.hitch(this,"_handleDocumentChange")));this.own(e.after(this._internalDocument,"onDocumentReset",f.hitch(this,"_handleDocumentChange")))},_handleDocumentChange:function(){var a={};a[this._EDITOR_ID]=this._editorId;var c=this._sectionsModel.getSections();a[this._SECTIONS]=this._reducedSectionsArray(c);this._editorDataService.request(this._FEATURE_ID,a)},_reducedSectionsArray:function(a){a=a.map(function(a){return b.getSectionInfo(a.start.node,a.end.node,this._internalDocument)},
this);return 0<a.length?a:null}})})},"MW/rtc/plugins/functions/FunctionsRequestHandlerProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/functions/FunctionsRequestHandler"],function(g,f,e,d){return g(e,{requires:function(){return{createInstance:["rtc.id","rtc.editordataservice","rtc.functionservice"]}},createInstance:function(b,a,c){return new d(b,a,c)}})})},"MW/rtc/plugins/functions/FunctionsRequestHandler":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin","MW/rtc/plugins/goto/GotoUtilities"],function(g,f,e,d,b){return g(d,{_FEATURE_ID:"rtc.dataservice.functions",_LABEL:"label",_LINE:"line",_COLUMN:"column",_EDITOR_ID:"editorId",_FUNCTIONS:"functions",constructor:function(a,c,b){this._editorId=a;this._editorDataService=c;this._functionService=b;this.own(e.after(this._functionService,"onUpdate",f.hitch(this,"_handleFunctionsChange")))},_handleFunctionsChange:function(){var a={};a[this._EDITOR_ID]=
this._editorId;a[this._FUNCTIONS]=this._getResponseFunctionsArray(!0,!0);this._editorDataService.request(this._FEATURE_ID,a)},_getResponseFunctionsArray:function(a,c){a=!1!==a;c=!1!==c;var d=this._functionService.getAllFunctionDeclarations();if(1>d.length)return null;c=c&&0<this._functionService.getTopLevelFunctionInfo().length;a&&(d=b.sortFunctionDeclarations(d,c));return d.map(function(a){var c={};a=a._data;c[this._LABEL]=a.functionName;c[this._LINE]=a.startLine;c[this._COLUMN]=a.startColumn;return c},
this)}})})},"MW/rtc/plugins/sectionbreak/SectionBreakProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/sectionbreak/SectionBreak"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.internaldocument rtc.document rtc.view rtc.cursor rtc.actionservice rtc.code.sections.model rtc.code.sections.contributor.sectionbreak rtc.code.matlabfiletype".split(" ")}},createInstance:function(d,b,a,c,f,g,l,m){return new e(d,b,a,c,f,g,m)},
destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/sectionbreak/SectionBreak":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/i18n!l10n/nls/actions mw-log/Log MW/rtc/abstract/AbstractPlugin MW/rtc/model/CodeUtilities MW/rtc/model/DocumentEventUtilities MW/rtc/model/DocumentUtilities MW/rtc/model/events/DeletionEvent MW/rtc/model/events/NumberOfLinesChangedEvent MW/rtc/plugins/language/matlab/functions/FunctionAttributeConstants ./model/SectionBreakNode".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){return g(a,{ACTION_ID:"rtc_insert_sectionbreak",_UNDOREDO_BLOCK_TYPE:"RemoveSectionBreaks",_BLOCK_TYPES_FOR_MERGE_AND_ADVANCE:["AutoIndent"],constructor:function(a,c,b,h,g,k,l){this._internalDocument=a;this._document=c;this._cursor=h;this._actionService=g;this._sectionModel=k;this._fileTypeService=l;this._actionService.loadActions([{id:this.ACTION_ID,key:"ctrl_alt_enter",platformKey:{mac:"meta_alt_enter"},enabled:!0,contextMenuGroup:"CodeSections",description:d.insertSectionLabel,
callback:f.hitch(this,"_insertSectionBreakAtCursor")}]);this.own(e.after(this._document,"onDirectedDeletion",f.hitch(this,"_onDoDelete"),!0));this.own(e.after(this._cursor,"onChange",f.hitch(this,"_updateActions")));this.own(e.after(this._sectionModel,"currentSectionChanged",f.hitch(this,"_updateActions")));this.own(e.after(this._sectionModel,"onAttributesUpdated",f.hitch(this,"_updateActions")));this.own(e.after(this._fileTypeService,"onFileTypeChange",f.hitch(this,"_handleFileTypeChange"),!0))},
_updateActions:function(){var a=this.canInsertSectionBreak();this._actionService.updateAction(this.ACTION_ID,{enabled:a})},canInsertSectionBreak:function(){if(this._internalDocument.isReadOnly()||this._cursor.isCursorReadOnly())return!1;var a=!0,c=this._fileTypeService.isFunction()||this._fileTypeService.isClass();if(this._atLocalFunction()||c)a=!1;return a},_atLocalFunction:function(){var a=this._sectionModel.getCurrentSection(),c=this._getFirstLocalFunctionFromSection(a);if(!c)return!1;a=this._cursor.getLineColumn().line;
c=c.position.getLineColumn().line;return a>=c},_getFirstLocalFunctionFromSection:function(a){return a&&a[p.LOCAL_FUNCTION_ATTRIBUTE]&&0<a[p.LOCAL_FUNCTION_ATTRIBUTE].length?a[p.LOCAL_FUNCTION_ATTRIBUTE][0]:null},_canDeleteSectionBreak:function(a){if(this._internalDocument.isReadOnly()||this._cursor.isCursorReadOnly())return!1;var c=!0;a=1===a?this._sectionModel.getNextSection():this._sectionModel.getCurrentSection();this._canMergeWithPreviousSection(a)||(c=!1);return c},_canMergeWithPreviousSection:function(a){if(!this._getFirstLocalFunctionFromSection(a))return!0;
a=this._sectionModel.getSections().indexOf(a)-1;a=this._sectionModel.getSection(a).end.getLineColumn().line;a=this._internalDocument.getLineNode(a-1);return!c.isCodeContainer(a)},_onDoDelete:function(a,c){if(!this._cursor.hasSelection()&&!c.isLocal&&k.isAtEndOfContainer(c.startPosition,c.startNode.rootContainer())&&k.isAtStartOfContainer(c.endPosition,c.endNode.rootContainer())){var b=c.startNode.rootContainer().nextSibling();if(this._isContainerSectionBreak(b)){if(!this._canDeleteSectionBreak(a))return this._cursor.movePosition(1===
a?this._cursor.RIGHT:this._cursor.LEFT),!0;this._deleteSectionBreak(b,a);this._cursor.onUpdate(!1,!0);return!0}}},deleteSectionBreakInBetween:function(a,c){b.assert(a<=c,"Start line should be \x3c\x3d end line!");this._document.startEdit();for(var d=c;d>=a;d-=1){var e=this._internalDocument.getLineNode(d-1);this._isContainerSectionBreak(e)&&this._deleteSectionBreak(e)}this._document.endEdit();this._cursor.onUpdate()},hasSectionBreakInBetween:function(a,c){b.assert(a<=c,"Start line should be \x3c\x3d end line!");
for(var d=a;d<=c;d+=1){var e=this._internalDocument.getLineNode(d-1);if(this._isContainerSectionBreak(e))return!0}return!1},_insertAtPosition:function(a){var c=this._document.startEdit(),b=new n;a=this._internalDocument.insertAtPosition(b,a);var d=h.finalLineRangeFromEvents(a.events);c.appendUndoEvents([m.create(d.startLine,d.endLine,-1)]);c.appendRedoEvents([m.create(d.startLine,d.endLine,1)]);this._document.endEdit();return{sectionBreakNode:b,insertionResults:a}},_deleteSectionBreak:function(a,
c){var b=this._getLineRangeForSectionBreakDeletion(a,c),d=this._document.startEdit();this._internalDocument.deleteNode(a,{node:this._cursor.getNode(),offset:this._cursor.getOffset()});var e=[l.create(b.startLine,b.endLine,0)];d.appendUndoEvents([m.create(b.startLine,b.endLine,1)]);d.appendRedoEvents(e);this._document.endEdit();this._internalDocument.emitDocumentEvents(e)},_getLineRangeForSectionBreakDeletion:function(a,c){var b=this._internalDocument.getLineNumber(a),d=b;-1===c?b+=1:d-=1;return{startLine:d,
endLine:b}},_insertSectionBreakForSelection:function(a){var c=this._document.createPosition(a.startPosition.getNode(),a.startPosition.getOffset()),b=this._document.createPosition(a.endPosition.getNode(),a.endPosition.getOffset()),d=[];this._cursor.collapseSelection();var e=this._insertAtPosition(c),f=e.insertionResults,e=e.sectionBreakNode,d=d.concat(f.events);this._shouldInsertSectionBreakAtEndPosition(a,e,b)&&(f=this._insertAtPosition(b).insertionResults,d=d.concat(f.events));this._cursor.setPosition(f.insertedRange.getEndPosition());
this._document.deletePosition(c);this._document.deletePosition(b);return d},_shouldInsertSectionBreakAtEndPosition:function(a,c,b){return a.fileEndSelected&&a.startPosition.isEqualTo(a.endPosition)||this._internalDocument.getLineNumber(c)>b.getLine()-1?!1:!0},_insertSectionBreakAtCursor:function(){if(this._actionService.getAction(this.ACTION_ID).enabled&&this.canInsertSectionBreak()){this._internalDocument.onPreDocumentChanged({});this._document.startEdit();var a;if(this._cursor.hasSelection())a=
this._insertSectionBreakForSelection(this._cursor.selectionInfo());else{var c;c=this._shouldMoveCursorAfterBreak();var b=this._insertAtPosition(this._cursor.position).insertionResults;a=b.events;c=c?b.insertedRange.getEndPosition():b.insertedRange.getStartPosition();this._cursor.setPosition(c)}this._document.endEdit();this._emitInsertEvents(a)}},_shouldMoveCursorAfterBreak:function(){var a=this._cursor.position,c=a.getNode().textContainer(),b=a.getNode().rootContainer(),d=c.previousSibling()||b.previousSibling(),
c=c.nextSibling()||b.nextSibling();return k.isAtStartOfContainer(a)&&d&&!d.isInstanceOf(n)||k.isAtEndOfContainer(a)&&!c||k.isAtEndOfContainer(a)&&c.isInstanceOf(n)||!k.isAtStartOfContainer(a)&&!k.isAtEndOfContainer(a)?!0:!1},insertSectionBreakAtLineColumn:function(a,c){this._internalDocument.onPreDocumentChanged({});var b=this._internalDocument.getPositionForLineColumn(a,c),b=this._insertAtPosition(b).insertionResults;this._emitInsertEvents(b.events)},_emitInsertEvents:function(a){this._internalDocument.emitDocumentEvents(a);
this._cursor.onUpdate(!1,!0)},isLineSectionBreak:function(a){a=this._internalDocument.getLineNode(a-1);return this._isContainerSectionBreak(a)},_isContainerSectionBreak:function(a){return a instanceof n},isLineAtStartOfSection:function(a){a=this._internalDocument.getLineNode(a-1);return this._isAtStartOfSection(a)},_isAtStartOfSection:function(a){a=a.previousSibling();return!a||this._isContainerSectionBreak(a)},_handleFileTypeChange:function(){this._updateActions()}})})},"MW/rtc/plugins/sectionbreak/SectionBreakNodeConversionRulesProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./SectionBreakNodeConversionRules"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/sectionbreak/SectionBreakNodeConversionRules":function(){define(["dojo/_base/declare","MW/rtc/nodes/nodeconversionrules/base/AbstractNodeConversionRules","./model/SectionBreakNode"],function(g,f,e){return g(f,{constructor:function(){},getApplicableNodeClass:function(){return e},isConvertibleTo:function(d){return!1},
isConvertibleFrom:function(d){return!1}})})},"MW/rtc/plugins/sectionbreak/model/SectionBreakNodeContentConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./SectionBreakNodeContentConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/sectionbreak/model/SectionBreakNodeContentConverter":function(){define(["dojo/_base/declare","MW/rtc/nodes/contentconverter/base/InnerNodeContentConverter",
"./SectionBreakNode"],function(g,f,e){return g(f,{getApplicableNodeClass:function(){return e}})})},"MW/rtc/plugins/sectionbreak/view/SectionBreakCoordinateConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./SectionBreakCoordinateConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/sectionbreak/view/SectionBreakCoordinateConverter":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/sectionbreak/model/SectionBreakNode","MW/rtc/view/coordinateconverter/base/AbstractCoordinateConverter"],function(g,f,e){return g(e,{constructor:function(){},getApplicableNodeClass:function(){return f},getPositionFromCoordinate:function(){return null},getCoordinateFromPosition:function(){return null},getDomNode:function(){return null},getClosestRect:function(){return null}})})},"MW/rtc/plugins/sectionbreak/view/SectionBreakLayouterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./SectionBreakLayouter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/sectionbreak/view/SectionBreakLayouter":function(){define(["dojo/_base/declare","MW/rtc/plugins/view/layoutmanager/abstract/AbstractLayouter","../model/SectionBreakNode"],function(g,f,e){return g(f,{constructor:function(){},getApplicableNodeClass:function(){return e},
layout:function(d,b){return d.layoutInto(b,"div",{"class":"sectionBreak"})}})})},"MW/rtc/plugins/tabcompletion/CompletionHandlerProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/plugins/language/matlab/utilities/MatlabPluginUtilities","./CompletionHandler","MW/rtc/core/provider/PluginProvider"],function(g,f,e,d,b){return g(b,{isApplicable:function(a){return e.isMatlabCodeFileOrBuffer(a)},requires:function(){return{isApplicable:["rtc.backingstore"],createInstance:["rtc.focusservice",
"rtc.document","rtc.cursor","rtc.divcaret"]}},createInstance:function(a,c,b,e){return new d(a,c,b,e)}})})},"MW/rtc/plugins/tabcompletion/CompletionHandler":function(){define(["dojo/_base/declare","dojo/_base/lang","mw-log/Log","MW/rtc/model/DocumentConstants","MW/rtc/plugins/completionpopup/CompletionPopup"],function(g,f,e,d,b){return g(null,{constructor:function(a,c,d,e){this._focusService=a;this._document=c;this._cursor=d;this._startOffsetColumn=0;this._popup=new b(e.getBox(),function(){},function(){a.setFocus()},
f.hitch(this,"_charKeyTypedCallback"),f.hitch(this,"_backspaceTypedCallback"))},handleCompletions:function(a,c){this._startOffsetColumn=0;a.partialCompletion&&this._completionCallback(a.partialCompletion);var b=a.finalCompletions;if(!b||0===b.length)this._popup.showStatusPopup(this._popup.STATUS_ENUM.STATUS_NO_MATCHES);else if(b.length>c)this._popup.showStatusPopup(this._popup.STATUS_ENUM.STATUS_TOO_MANY_MATCHES);else if(1===b.length)this._completionCallback(b[0].completion);else{var d=b[0].completion.offset,
e=this._cursor.getLineColumn(),d=this._document.getLineText(e.line).substring(e.column-d-1,e.column-1);this._popup.showPopup(b,f.hitch(this,"_preCompletionCallback"),d)}},_preCompletionCallback:function(a){this._completionCallback(a.completion)},_completionCallback:function(a){var c=this._cursor.getLineColumn();c.column=c.column-a.offset-this._startOffsetColumn;var b=this._cursor.getLineColumn();this._document.replaceText(a.completionString,c.line,c.column,b.line,b.column);this._focusService.setFocus();
this._popup.removePopup()},_charKeyTypedCallback:function(a){this._document.insertTextAtCurrentPosition(a);this._startOffsetColumn+=1},_backspaceTypedCallback:function(){this._document.deleteTextAtCurrentPosition(d.BACKWARD_DELETE);this._startOffsetColumn-=1;0>this._startOffsetColumn&&this._popup.removePopup()}})})},"MW/rtc/plugins/tabcompletion/TabCompletionProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/language/matlab/utilities/MatlabPluginUtilities","./TabCompletion","MW/rtc/core/provider/PluginProvider"],
function(g,f,e,d){return g(d,{isApplicable:function(b){return f.isMatlabCodeFileOrBuffer(b)},requires:function(){return{isApplicable:["rtc.backingstore"],createInstance:["rtc.document","rtc.cursor","rtc.code.codingui.backendservice","matlab.tabcompletion.completionhandler","rtc.actionservice"]}},createInstance:function(b,a,c,d,f){return new e(b,a,c,d,f)}})})},"MW/rtc/plugins/tabcompletion/TabCompletion":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/model/CodeUtilities","mw-log/Log",
"MW/rtc/RichTextComponentFeatureEnum"],function(g,f,e,d,b){return g(null,{WORD_REGEXP:/[a-zA-Z0-9(/\\_"'-]/,_NEXT_CHARAT_REGEXP:/[a-zA-Z0-9_'"]/,_featureID:"matlab.code.tabcompletion",constructor:function(a,c,b,d,e){this._tabCompletionDataService=b;this._completionHandler=d;this._document=a;this._cursor=c;this._actionService=e;this._init()},_init:function(){var a=[{id:b.TAB_COMPLETION.TAB_COMPLETE_ACTION,enabled:!0,key:"tab",callback:f.hitch(this,this._popupActionCallback)},{id:"rtc_tab_completion_escape",
enabled:!0,key:"escape",callback:f.hitch(this,this._cancelTabCompletionRequest)}];this._actionService.loadActions(a)},_popupActionCallback:function(){if(this._actionService.getAction(b.TAB_COMPLETION.TAB_COMPLETE_ACTION).enabled)return this._popupIfValidLocation()},_cancelTabCompletionRequest:function(){this._tabCompletionDataService.isBusy()&&this._tabCompletionDataService.cancelRequest();return!1},_popupIfValidLocation:function(){if(this._shouldShowPopup()){var a=this._cursor.getLineColumn();this._tabCompletionDataService.requestMetaData(this._featureID,
f.hitch(this._completionHandler,"handleCompletions"),a);d.warn("Sending tab completion request to MATLAB.");return!0}return!1},_shouldShowPopup:function(){if(this._cursor.hasSelection()||this._cursor.isCursorReadOnly()||!e.isCodeContainer(this._cursor.getNode()))return!1;var a=this._cursor.getLineColumn(),c=this._document.getLineText(a.line);return this._isDotOrValidPartialString(c,a.column-1)},_isDotOrValidPartialString:function(a,c){d.assert(0<=c&&c<=a.length,"position "+c+" is out of bounds of text (length "+
a.length+")");if(c<a.length&&-1!==a.charAt(c).search(this._NEXT_CHARAT_REGEXP))return!1;if(0!==c&&"."===a.substring(c-1,c))return 2<c&&"..."===a.substring(c-3,c)?!1:!0;for(var b=c;0<=b;b-=1){var e=a.charAt(b-1);if(b<c)return!0;if(-1===e.search(this.WORD_REGEXP))break}return!1}})})},"MW/rtc/plugins/templates/TemplateServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/templates/TemplateService"],function(g,f,e){return g(f,{isApplicable:function(){return!0},
requires:function(){return{isApplicable:[],createInstance:["rtc.document","rtc.internaldocument","rtc.id","rtc.actionservice"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/templates/TemplateService":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/i18n!l10n/nls/template mw-messageservice/MessageService MW/rtc/RichTextComponentFeatureEnum".split(" "),function(g,f,e,d,b,a){return g(null,{_APPLY_TAMPLATE_NAMESPLACE:"/templateService/applyTemplate/",
TEMPLATES:{liveFunction:function(a){return{className:"RootNode",children:[{className:"RichTextParagraphNode",align:"left",children:[{className:"RichTextNode",text:d.summary}]},{className:"RichTextParagraphNode",align:"left",children:[{className:"RichTextNode",text:d.description}]},{className:"LineNode",children:[{className:"PlainTextNode",text:"function z \x3d "+a+"(x, y)"}]},{className:"LineNode",children:[{className:"PlainTextNode",text:"    z \x3d x + y;"}]},{className:"LineNode",children:[{className:"PlainTextNode",
text:"end"}]}]}}},constructor:function(a,d,e,f){this._document=a;this._internalDocument=d;this._editorId=e;this._actionService=f;b.subscribe(this._APPLY_TAMPLATE_NAMESPLACE+this._editorId,"_handleApplyTemplate",this)},_handleApplyTemplate:function(a){this.applyTemplate(a.data.type,a.data.pendingName)},applyTemplate:function(c,b){var d=this.TEMPLATES[c];d&&(this._internalDocument.deserialize(d(b)),this._actionService.updateAction(a.FORMAT_CODE.SMART_INDENT_ACTION,{enabled:!0}),this._actionService.executeAction(a.FORMAT_CODE.SMART_INDENT_ACTION),
this._actionService.updateAction(a.FORMAT_CODE.SMART_INDENT_ACTION,{enabled:!1}))},destroy:function(){b.unsubscribe(this._APPLY_TAMPLATE_NAMESPLACE+this._editorId,"_handleApplyTemplate",this)}})})},"MW/rtc/plugins/text/parenmatch/ParenMatchingPluginProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/language/matlab/parenmatch/ParenMatchingPlugin","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],
createInstance:["rtc.internaldocument","rtc.view","rtc.cursor","rtc.cursor.view","matlab.tokens"]}},createInstance:function(d,b,a,c,e){return new f(d,b,a,c,e)}})})},"MW/rtc/plugins/language/matlab/parenmatch/ParenMatchingPlugin":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/model/NodeUtilities MW/rtc/view/ViewUtilities ./model/Matcher ./view/ParenMatchView".split(" "),function(g,f,e,d,b,a,c,h){return g(d,{constructor:function(a,b,d,g,n){this._internalDocument=
a;this._view=b;this._cursor=d;this._cursorView=g;this._matlabTokens=n;this.own(e.after(g,"onUpdate",f.hitch(this,"_handleUpdate")));this.own(e.after(n,"onUpdate",f.hitch(this,"_handleUpdate"),!0));this._matchView=new h(b);this._matcher=new c(a,n)},_handleUpdate:function(){var a=this._cursor,c="",b=a.getPosition();a.hasSelection()?(c=a.charAtCursor(),this._matcher.isOpenOrClose(c)?a.isReversed()||(b.column-=1):c=""):(c=a.charAtCursor(-1),this._matcher.isClose(c)?b.column-=1:(c=a.charAtCursor(),this._matcher.isOpen(c)||
(c="")));this._matchView.hide();c&&this._scanAndShowAnyMatch(c,b)},_scanAndShowAnyMatch:function(a,c){this._matcher.scanLeftOrRight(a,c);this._showMatch(this._matcher.Left,this._matcher.Right)},_showMatch:function(a,c){var b=this._getViewInformation(a),d=this._getViewInformation(c);(!a||!c||b&&d)&&this._matchView.show(b,d)},_getViewInformation:function(a){if(!a)return null;var c=this._getCoordinateForParen(a);c&&a.mismatch&&(c.mismatch=!0);return c},_getCoordinateForParen:function(c){c=this._getPositionForParen(c.line,
c.column);var b=c.getNode();return a.hasViewOnlyText(b)?null:this._view.getCoordinateForPosition(c)},_getPositionForParen:function(a,c){var b=this._internalDocument.getPositionForLineColumn(a+1,c+1);if(b.isAtRightEdge()){var d=b.getNode(),e=d.nextNode();if(d!==d.textContainer().endNode()&&e.isTextNode())return e.startPosition()}return b}})})},"MW/rtc/plugins/language/matlab/parenmatch/model/Matcher":function(){define(["dojo/_base/declare"],function(g){return g(null,{constructor:function(f,e){this.Right=
this.Left=null;this._internalDocument=f;this._matlabTokens=e;this._OPEN=["(","[","{"];this._CLOSE=[")","]","}"];this._PARENREG="(\\(|\\[|{)|(\\)|\\]|})"},scanLeftOrRight:function(f,e){var d=this._OPEN.indexOf(f),b=0;this.Right=this.Left=null;0<=d?(b=1,this.Left=e,this.Right=null):(d=this._CLOSE.indexOf(f),0<=d&&(b=-1,this.Right=e,this.Left=null));0!==b&&this._scan(e,b,d)},_scan:function(f,e,d){f=this._scanDocument(f,e,d);if(0<e){if(f&&(this.Right=f),this.Left&&(!f||f.mismatch))this.Left.mismatch=
!0}else if(f&&(this.Left=f),this.Right&&(!f||f.mismatch))this.Right.mismatch=!0},_scanDocument:function(f,e,d){var b=f.line;f=f.column;var a="",c=(e=1===e)?-1:0,h=!1,g=this._internalDocument.getLineNode(b);if(!g||this._isInStringOrComment(b,f))return this.Right=this.Left=null;for(var l=g.getTextForPositioning(),m=this._internalDocument.containerType(g);;){var a=e?l.substring(f):l.substring(0,f),p=RegExp(this._PARENREG,"g"),n=p.exec(a);if(!e&&n)for(var q=n;q;)(q=p.exec(a))&&(n=q);if(n){if(!this._isInStringOrComment(b,
e?f+n.index:n.index))if(n[1]){if(!e&&0===c)return d!==this._OPEN.indexOf(n[0])&&(h=!0),{line:b,column:n.index,mismatch:h};c+=1}else{if(e&&0===c)return d!==this._CLOSE.indexOf(n[0])&&(h=!0),{line:b,column:f+n.index,mismatch:h};c-=1}f=e?f+n.index+n[0].length:n.index}if(e){if(!n||f>=l.length)b+=1,f=0}else if(!n||0===f)b-=1,f=-1;if(0>=f){for(;;){g=this._internalDocument.getLineNode(b);if(!g)return null;if(m===this._internalDocument.containerType(g))break;b+=e?1:-1}l=g.getTextForPositioning();0>f&&(f=
l.length)}}return null},isOpenOrClose:function(f){return this.isOpen(f)||this.isClose(f)},isOpen:function(f){return 0<=this._OPEN.indexOf(f)},isClose:function(f){return 0<=this._CLOSE.indexOf(f)},_isInStringOrComment:function(f,e){return this._matlabTokens.isInString(f,e)||this._matlabTokens.isInComment(f,e)}})})},"MW/rtc/plugins/language/matlab/parenmatch/view/ParenMatchView":function(){define(["dojo/_base/declare","dojo/dom-construct","dojo/dom-class","dojo/dom-style"],function(g,f,e,d){return g(null,
{constructor:function(b){this._layer=f.create("div",{"class":"parenMatchLayer"});b.addLayer(this._layer);this._parenMatchLeft=f.create("div",{"class":"parenMatch"},this._layer);this._parenMatchRight=f.create("div",{"class":"parenMatch"},this._layer);this._hideTimer=null},show:function(b,a){this._clearHideTimer();b?this._showOne(this._parenMatchLeft,{left:b.x,top:b.y+b.height-2,width:b.width},b):this._hideOne(this._parenMatchLeft);a?this._showOne(this._parenMatchRight,{left:a.x,top:a.y+a.height-2,
width:a.width},a):this._hideOne(this._parenMatchRight);this._startHideTimer()},hide:function(){this._clearHideTimer();this._hideOne(this._parenMatchLeft);e.remove(this._parenMatchLeft,"parenMismatch");this._hideOne(this._parenMatchRight);e.remove(this._parenMatchRight,"parenMismatch")},_showOne:function(b,a,c){d.set(b,{display:"block",top:a.top+"px",left:a.left+"px",width:a.width+"px"});c.mismatch&&e.add(b,"parenMismatch")},_hideOne:function(b){d.set(b,{display:"none"})},_clearHideTimer:function(){this._hideTimer&&
(clearTimeout(this._hideTimer),this._hideTimer=null)},_startHideTimer:function(){var b=this;this._hideTimer=setTimeout(function(){b.hide()},1E3)}})})},"MW/rtc/plugins/language/matlab/syntaxhighlighter/MatlabSyntaxHighlighterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/language/matlab/syntaxhighlighter/MatlabSyntaxHighlighter"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.internaldocument",
"matlab.tokens","rtc.view.decoration"]}},createInstance:function(d,b,a){return new e(a,d,b)}})})},"MW/rtc/plugins/language/matlab/syntaxhighlighter/MatlabSyntaxHighlighter":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/model/CodeUtilities MW/rtc/plugins/language/matlab/syntaxhighlighter/MatlabTokenColorUtilities MW/rtc/plugins/syntaxhighlighter/AbstractSyntaxHighlighter MW/rtc/plugins/syntaxhighlighter/ColorRange mw-log/Log".split(" "),function(g,f,e,d,b,a,c,h){return g(a,
{constructor:function(a,c,b){this._internalDocument=c;this._matlabTokens=b;this._tokensData=b.getTokensData();this._cachedTokens=[];this._aspectHandles=[];this._changedLines=[];this.own(e.after(this._internalDocument,"onDocumentReset",f.hitch(this,"_resetCaches")));this.own(e.after(this._matlabTokens,"onUpdate",f.hitch(this,"_updateTokens"),!0));this.own(e.after(this._matlabTokens,"onDelete",f.hitch(this,"_handleDelete"),!0));this._tokensToColorize=[];this._linesToClear=[]},recolorTokens:function(){this._resetCaches();
var a=this._tokensData.tokens,c=this._internalDocument.getMaxLineNumber()-1;this._tokensToColorize=[];this._linesToClear=[];this._doSyntaxHighlighting(a,0,c,c,!1,c)},_resetCaches:function(){this._tokensData=this._matlabTokens.getTokensData();this._cachedTokens=[];for(var a=this._internalDocument.getMaxLineNumber(),c=0;c<a;c++)this._changedLines[c]=!0},_updateTokens:function(a){this._tokensToColorize=[];this._linesToClear=[];this._redrawSyntaxHighlighting(a)},_handleDelete:function(a,c){for(var b=
a;b<=c;b++)this._cachedTokens[b]=""},_isNoCodeInDocument:function(a){return 1<Object.keys(a.tokens).length||1<a.tokens[0].length?!1:0===a.tokens[0][0].getLength()},_redrawSyntaxHighlighting:function(a){if(this._isNoCodeInDocument(a))this._resetCaches();else{var c=a.startLine,b=a.endLine,d=a.eventEndLine,e=a.isUndoRedo;a=a.tokens;var f=Math.max(b,d);this._doSyntaxHighlighting(a,c,b,d,e,f)}},_doSyntaxHighlighting:function(a,c,d,e,f,h){h=b.processTokens(a,c,h);this._updateCache(a,c,d);d>e?(this._decorateLines(c,
d,h,this._changedLines),f&&this._decorateLines(c,e,h,!0)):this._decorateLines(c,e,h,!0);this._updateHighlighting(this._linesToClear,this._tokensToColorize)},_decorateLines:function(a,c,b,d){for(;a<=c;a++){var e=this._internalDocument.getLineNode(a);Array.isArray(d)?d[a]&&this._decorate(e,a,b[a]):this._decorate(e,a,b[a])}},_decorate:function(a,c,b){d.isCodeContainer(a)&&b&&(a=this._internalDocument.getRangeForLine(c+1),this._linesToClear.push(a),this._decorateForTokens(b))},_decorateForTokens:function(a){a.forEach(function(a){var b=
a.range.start,d=a.range.end,b=this._internalDocument.getRangeForLineColumn(b.row+1,b.column+1,d.row+1,d.column+1);this._tokensToColorize.push(new c(b,a.color))},this)},_updateCache:function(a,c,b){var d=this._cachedTokens,e=d.length,f=this._internalDocument.getMaxLineNumber();if(e>f){a=e-f;this._cachedTokens.splice(b,a);this._changedLines.splice(b,a);for(a=c;a<=b;a++)void 0!==this._changedLines[a]&&(this._changedLines[a]=!0)}else if(e<f){d=f-e;for(a=c;a<c+d;a++)this._cachedTokens.splice(a,0,"");for(a=
c;a<=b;a++)this._changedLines[a]=!0}else this._markWhichLinesChangedTokens(d,a,c,b)},_markWhichLinesChangedTokens:function(a,c,b,d){for(;b<=d;b++){var e=JSON.stringify(c[b]),f=a[b];this._changedLines[b]=e!==f;e!==f&&c[b]&&(this._cachedTokens[b]=e)}}})})},"MW/rtc/plugins/syntaxhighlighter/AbstractSyntaxHighlighter":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin"],function(g,f){return g(f,{constructor:function(e){this._decorator=e.createDecorator()},_updateHighlighting:function(e,
d){e.forEach(function(b){this._decorator.clearRange(b)},this);d.forEach(function(b){this._decorator.setStyle(b.getRange(),"color",b.getColor())},this);this._decorator.applyChanges()}})})},"MW/rtc/plugins/syntaxhighlighter/ColorRange":function(){define(["dojo/_base/declare"],function(g){return g(null,{constructor:function(f,e){this._range=f;this._color=e},getRange:function(){return this._range},getColor:function(){return this._color}})})},"MW/rtc/plugins/language/matlab/syntaxhighlighter/preferences/MatlabSyntaxHighlighterPreferencesProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/language/matlab/syntaxhighlighter/preferences/MatlabSyntaxHighlighterPreferences"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.code.syntaxhighlighter","rtc.settings.service"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/plugins/language/matlab/syntaxhighlighter/preferences/MatlabSyntaxHighlighterPreferences":function(){define("dojo/_base/declare dojo/_base/lang MW/rtc/abstract/AbstractPlugin MW/rtc/plugins/settings/RtcSettingServiceBatchSubscriber MW/rtc/plugins/language/matlab/syntaxhighlighter/MatlabSyntaxHighlighterColorMap MW/rtc/plugins/language/matlab/syntaxhighlighter/preferences/MatlabSyntaxHighlighterSettingKeys".split(" "),
function(g,f,e,d,b,a){return g(e,{constructor:function(c,e){this._syntaxHighlighter=c;this._settingsService=e;this._settingKeyToSyntaxType={};this._settingKeyToSyntaxType[a.SETTING_KEYS.COMMENT_COLOR]=b.SYNTAX_TYPE.COMMENTS;this._settingKeyToSyntaxType[a.SETTING_KEYS.STRING_COLOR]=b.SYNTAX_TYPE.STRINGS;this._settingKeyToSyntaxType[a.SETTING_KEYS.SYSTEM_COMMAND_COLOR]=b.SYNTAX_TYPE.SYSTEM_COMMANDS;this._settingKeyToSyntaxType[a.SETTING_KEYS.KEYWORD_COLOR]=b.SYNTAX_TYPE.KEYWORDS;this._settingKeyToSyntaxType[a.SETTING_KEYS.VALIDATION_SECTION_COLOR]=
b.SYNTAX_TYPE.TYPE_SECTION;this._settingKeyToSyntaxType[a.SETTING_KEYS.UNTERMINATED_STRING_COLOR]=b.SYNTAX_TYPE.UNTERMINATED_STRINGS;this._settingKeyToSyntaxType[a.SETTING_KEYS.SYNTAX_ERROR_COLOR]=b.SYNTAX_TYPE.ERRORS;this._batchsub=new d(a.getAllValuesAsArray(),this._settingsService,f.hitch(this,"_onSettingsChanged"));this.own(this._batchsub)},_onSettingsChanged:function(c){for(var b=a.getAllValuesAsArray(),d=0;d<b.length;d++){var e=b[d];this._ifNewValueSetColor(this._settingKeyToSyntaxType[e],c.get(e))}this._syntaxHighlighter.recolorTokens()},
_ifNewValueSetColor:function(a,d){d&&b.setColor(a,{r:d[0],g:d[1],b:d[2]})}})})},"MW/rtc/plugins/settings/RtcSettingServiceBatchSubscriber":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","dijit/Destroyable","MW/rtc/browsersupport/BrowserSupportUtilities"],function(g,f,e,d,b){return g(d,{_TIMEOUT:50,constructor:function(a,c,d){this._settingsToListenTo=a;this._rtcSettingService=c;this._updateCallback=d;this._settingsChangedMap=b.createMap();this._batchTimer=null;this._setupSettingsSubscriptions()},
_setupSettingsSubscriptions:function(){this._settingsToListenTo.forEach(function(a){a=this._rtcSettingService.listenTo(a,this._handleSettingUpdate.bind(this,a));this.own(a)},this)},_handleSettingUpdate:function(a,c){this._clearTimer();this._settingsChangedMap.set(a,c);this._batchTimer=setTimeout(this._publishChange.bind(this),this._TIMEOUT)},_publishChange:function(){this._updateCallback(this._settingsChangedMap);this._settingsChangedMap.clear();this._clearTimer()},_clearTimer:function(){this._batchTimer&&
(clearTimeout(this._batchTimer),this._batchTimer=null)},destroy:function(){this.inherited(arguments);this._clearTimer()}})})},"MW/rtc/plugins/language/matlab/syntaxhighlighter/preferences/MatlabSyntaxHighlighterSettingKeys":function(){define(function(){return{SETTING_KEYS:{COMMENT_COLOR:"matlab.colors.CommentColor",STRING_COLOR:"matlab.colors.StringColor",SYSTEM_COMMAND_COLOR:"matlab.colors.SystemCommandColor",KEYWORD_COLOR:"matlab.colors.KeywordColor",VALIDATION_SECTION_COLOR:"matlab.colors.ValidationSectionColor",
UNTERMINATED_STRING_COLOR:"matlab.colors.UnterminatedStringColor",SYNTAX_ERROR_COLOR:"matlab.colors.SyntaxErrorColor"},getAllKeysAsArray:function(){return Object.keys(this.SETTING_KEYS)},getAllValuesAsArray:function(){for(var g=[],f=Object.keys(this.SETTING_KEYS),e=0;e<f.length;e++)g[e]=this.SETTING_KEYS[f[e]];return g}}})},"MW/rtc/plugins/textnodeservice/TextNodeServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/textnodeservice/TextNodeService"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/textnodeservice/TextNodeService":function(){define("dojo/_base/declare mw-log/Log MW/rtc/nodes/inner/LineNode MW/rtc/nodes/leaf/PlainTextNode MW/rtc/plugins/richtext/nodes/inner/RichTextParagraphNode MW/rtc/plugins/richtext/nodes/leaf/RichTextNode".split(" "),function(g,f,e,d,b,a){return g(null,{constructor:function(){},destroy:function(){},
createTextNodeForPosition:function(a,b){var d=b.getNode(),e=d.textContainer(),e=this.createTextNodeForContainer(a,e);e.setStyleAttributes(d.getStyleAttributes());return e},createTextNodeForContainer:function(c,e){return e.isInstanceOf(b)?new a({text:c}):new d({text:c})}})})},"MW/rtc/plugins/tooltip/TooltipPluginContainerProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/tooltip/TooltipPluginContainer","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},
requires:function(){return{isApplicable:[],createInstance:["rtc.internaldocument","rtc.view","hoverabletooltip","rtc.view.visibility","rtc.tooltipservice"]}},createInstance:function(d,b,a,c,e){return new f(d,b,a,c,e)}})})},"MW/rtc/plugins/tooltip/TooltipPluginContainer":function(){define("dojo/_base/declare dojo/_base/connect dojo/_base/lang dojo/dom-style dojo/aspect dojo/query MW/rtc/abstract/AbstractPlugin MW/rtc/plugins/view/tooltip/Tooltip MW/rtc/model/CodeUtilities mw-log/Log".split(" "),function(g,
f,e,d,b,a,c,h,k,l){return g(c,{_HIDE_TOOLTIP_TIMEOUT:800,constructor:function(a,c,d,h,g){this._internalDocument=a;this._view=c;this._tooltipPlugins=d.sort(function(a,c){return c.priority()-a.priority()});this._tooltipService=g;for(a=0;a<this._tooltipPlugins.length;a++)if("function"==typeof this._tooltipPlugins[a].onTooltipClose){this.own(f.connect(this._tooltipPlugins[a],"onTooltipClose",this,"cleanup"));break}this.own(b.after(h,"onHide",e.hitch(this,"cleanup")));this._isMouseInTooltip=this._isMouseOutsideRTC=
!1;this._initializeTooltip();this._currentTargetNode=null},_initializeTooltip:function(){this._tooltip=new h(this._view,this._internalDocument,{timeout:500});this.own(this._tooltip);this.own(b.after(this._tooltip,"onTooltip",e.hitch(this,"_handleOnTooltip"),!0));this.own(b.after(this._tooltip,"hideTooltip",e.hitch(this,"_handleHideTooltip"),!0))},_handleOnTooltip:function(a,c){if(this._isActiveWindow()){var b=this.getPositionFromEvent(c);null!==b&&(this._currentTargetNode=a,this._displayTooltip(a,
c,b,0))}},_handleHideTooltip:function(){this._currentTargetNode=null;this._tooltipServiceHandle&&(this._tooltipServiceHandle.remove(),this._tooltipServiceHandle=null)},_isActiveWindow:function(){return!!a(".layeredNode").every(function(a){return"none"===d.get(a,"display")})},getPositionFromEvent:function(a){a=this._view.fixEvent(a);a=this._view.getCoordinateFromEvent(a);return null===a?null:this._view.getPositionFromCoordinate(a)},_displayTooltip:function(a,c,b,d){if(!this._isMouseOutsideRTC)if(d>=
this._tooltipPlugins.length)this.cleanup();else if(a&&(a.box&&a.box.contains(c.target))&&this._isParentElementValid(a)){var f=this._view.getDomtarget();f.onmouseout=e.hitch(this,"_handleMouseLeftWindow");f.onmouseover=e.hitch(this,"_handleMouseEnteredWindow");var f=this._tooltipPlugins[d],h=e.hitch(this,function(f,h){var g=c.target;if(this._currentTargetNode&&this._currentTargetNode===a&&this.isStillHoveringOverTarget(g))if(f){var k={domNode:g};h&&(c=this._view.fixEvent(c),k.xOffset=c.layerX-g.offsetLeft+
this._view.getScrollLeft());f.onmouseenter=e.hitch(this,"_setIsInTooltip",!0);f.onmouseleave=e.hitch(this,"_setIsInTooltip",!1);this._tooltipServiceHandle=this._tooltipService.requestTooltip(e.hitch(this._tooltip,"showTooltip",f,k),e.hitch(this._tooltip,"hideTooltip"),this._tooltipService.PRIORITY.HOVER)}else this._displayTooltip(a,c,b,d+1)});try{f.getTooltipContent(a,b,h)}catch(g){l.assert(!1,"Resolving Tooltip failed: "+g)}}},_handleMouseLeftWindow:function(){this._isMouseOutsideRTC=!0;this._timer=
setTimeout(e.hitch(this,"_hideTooltipIfMouseStillOutsideRTC"),this._HIDE_TOOLTIP_TIMEOUT)},_hideTooltipIfMouseStillOutsideRTC:function(){this._isMouseInTooltip||this.cleanup()},_handleMouseEnteredWindow:function(){this._isMouseOutsideRTC=!1;this._timer&&(clearTimeout(this._timer),this._timer=null);this.cleanup()},_setIsInTooltip:function(a){this._isMouseInTooltip=a},isStillHoveringOverTarget:function(a){return!0},_isParentElementValid:function(a){return k.isCodeContainer(a.parent)},cleanup:function(){this._tooltip&&
this._tooltip.hideTooltip();this._isMouseInTooltip=!1}})})},"MW/rtc/plugins/typocorrection/TypoSuggestionFeatureProvider":function(){define(["dojo/_base/declare","./TypoSuggestionFeature","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{createInstance:"rtc.document rtc.embeddedoutputs.model rtc.typocorrection.typocorrectionservice rtc.id rtc.code.sections.model rtc.typocorrection.typocorrectionhandlerfactory".split(" ")}},
createInstance:function(d,b,a,c,e,g){return new f(d,b,a,c,e,g)}})})},"MW/rtc/plugins/typocorrection/TypoSuggestionFeature":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-class dojo/query MW/rtc/abstract/AbstractPlugin MW/rtc/browsersupport/BrowserSupportUtilities MW/rtc/plugins/embeddedoutputs/outputhandlers/error/ErrorOutputProperties".split(" "),function(g,f,e,d,b,a,c,h){return g(a,{constructor:function(a,b,d,h,g,q){this._document=a;this._embeddedOutputsModel=b;this._editorId=
h;this._sectionModel=g;this._handlerFactory=q;this._typoSuggestionHandlerStore=c.createMap();this.own(e.after(this._embeddedOutputsModel,"onModelUpdated",f.hitch(this,"_handleSuggestions")))},_handleSuggestions:function(){var a=this._embeddedOutputsModel.getOutputs(),a=this._filterErrorOutputs(a);this._clearHandlersForNonExistentOutputs(a);a=this._findNewSuggestionErrorOutputs(a);this._showSuggestionForErrors(a)},_filterErrorOutputs:function(a){return a.filter(function(a){return a.type===h.OUTPUT_TYPE})},
_clearHandlersForNonExistentOutputs:function(a){var c=a.map(function(a){return a.uid}),b=this._typoSuggestionHandlerStore;b.forEach(function(a,d){-1===c.indexOf(d)?(a.destroy(),b.delete(d)):a.isSuggestionOutputStale()&&a.destroy()})},_findNewSuggestionErrorOutputs:function(a){var c=[];a.forEach(function(a){"error"===a.type&&(!this._containsSuggestion(a.getDomElement())&&this._hasSuggestion(a.identifier)&&!this._typoSuggestionHandlerStore.has(a.uid)&&!a.stackLineNumber.getNode().isReadOnly())&&c.push(a)},
this);return c},_hasSuggestion:function(a){return a&&0<a.length},_containsSuggestion:function(a){var c=d.contains(a,"typoFixApplied");a=b(".errorRecoveryDiv",a);return c||0!==a.length},_showSuggestionForErrors:function(a){a.forEach(function(a){var c=this._handlerFactory.createHandler(a);c.handleSuggestion(a.identifier.trim());this._typoSuggestionHandlerStore.set(a.uid,c)},this)},destroy:function(){this.inherited(arguments);this._typoSuggestionHandlerStore.forEach(function(a){a.destroy()});this._typoSuggestionHandlerStore.clear()}})})},
"MW/rtc/plugins/typocorrection/handler/TypoSuggestionHandlerFactoryProvider":function(){define(["dojo/_base/declare","MW/rtc/plugins/typocorrection/handler/TypoSuggestionHandlerFactory","MW/rtc/core/provider/PluginProvider"],function(g,f,e){return g(e,{isApplicable:function(){return!0},requires:function(){return{createInstance:"rtc.document rtc.internaldocument rtc.linenumberservice rtc.cursor rtc.embeddedoutputs.model rtc.code.codechange rtc.code.sections.model rtc.embeddedoutputs rtc.cursorcontroller rtc.focusservice".split(" ")}},
createInstance:function(d,b,a,c,e,g,l,m,p,n){m=m.getEmbeddedOutputsView();return new f(d,b,a,c,e,g,l,m,p,n)}})})},"MW/rtc/plugins/typocorrection/handler/TypoSuggestionHandlerFactory":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin","./TypoSuggestionHandler"],function(g,f,e,d,b){return g(d,{constructor:function(a,c,b,d,e,f,g,n,q,r){this._document=a;this._internalDocument=c;this._lineNumberService=b;this._cursor=d;this._embeddedOutputsModel=e;
this._codeChangeService=f;this._sectionModel=g;this._embeddedOutputsView=n;this._cursorController=q;this._focusService=r},createHandler:function(a){return new b(this._document,this._internalDocument,this._lineNumberService,this._cursor,this._embeddedOutputsModel,this._codeChangeService,this._sectionModel,a,this._embeddedOutputsView,this._cursorController,this._focusService)}})})},"MW/rtc/plugins/typocorrection/handler/TypoSuggestionHandler":function(){define("dojo/_base/declare dojo/_base/event dojo/_base/lang dojo/aspect dojo/dom-class dojo/dom-construct dojo/on dijit/Destroyable mw-gesture/GestureDetector mw-gesture/GestureRegistry MW/rtc/model/CodeUtilities MW/rtc/plugins/typocorrection/TypoSuggestionContentFactory MW/rtc/plugins/typocorrection/TypoSuggestionFix".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){return g(h,{_STALE_SUGGESTION_OUTPUT_CLASS:"typoFixApplied",_STALE_OUTPUT_CLASS:"stale_output",constructor:function(a,c,b,d,e,f,h,g,k,l,m){this._domElement=g.getDomElement();this._document=a;this._internalDocument=c;this._lineNumberService=b;this._cursor=d;this._embeddedOutputsModel=e;this._codeChangeService=f;this._output=g;this._sectionModel=h;this._didYouMeanContainer=null;this._stackLineNumberLivePosition=g.stackLineNumber;this._embeddedOutputsView=k;this._cursorController=
l;this._focusService=m},handleSuggestion:function(a){this._suggestion=a;a=new n(this._document,this._internalDocument,this._lineNumberService,this._suggestion,this._stackLineNumberLivePosition);this.initFixButton(a)},initFixButton:function(b){var f=this._domElement,h=p.getContent(b.getSuggestion());this._didYouMeanContainer=h.didYouMeanContainer;this._fixButton=h.fixButton;this._createGestureHandlerForDownEvent(this._fixButton);a.place(this._didYouMeanContainer,f);this._fixButtonHandeler=c.pausable(this._fixButton,
"click",e.hitch(this,"_fixButtonClick",b));this.own(d.after(this._codeChangeService,"onCodeChanged",e.hitch(this,"_handleCodeChange"),!0));this.own(d.after(this._stackLineNumberLivePosition,"onChange",e.hitch(this,"_handleLivePositionChange")));this._embeddedOutputsView.outputChanged()},_createGestureHandlerForDownEvent:function(a){a=new k(a,[l.tapmove({options:{numTaps:0},callbacks:{began:function(a){f.stop(a.srcEvent)}}})]);this.own(a)},_handleCodeChange:function(a){if(!this._isFixButtonDisabled()&&
(this._output.codeLinePositions&&0!==this._output.codeLinePositions.length)&&a){var c=this._sectionModel.getSectionNumberForLine(this._stackLineNumberLivePosition.line);a.forEach(function(a){c===this._sectionModel.getSectionNumberForNode(a)&&this._disableFixButton()},this)}},_handleLivePositionChange:function(){m.isCodeContainer(this._stackLineNumberLivePosition.getNode())||this._disableFixButton()},_disableFixButton:function(){b.add(this._fixButton,"disabled");this._fixButtonHandeler.pause()},_isFixButtonDisabled:function(){return b.contains(this._fixButton,
"disabled")},_fixButtonClick:function(c,d){this._cursorController.holdCursors();var e=c.performFix();this._cursorController.resetCursors();a.destroy(this._didYouMeanContainer);e&&(this._cursorController.clearSelection(),this._cursor.setSelectionLineColumn(e.startLine,e.startColumn,e.endLine,e.endColumn),b.add(this._domElement,this._STALE_SUGGESTION_OUTPUT_CLASS),this._embeddedOutputsModel.onModelUpdated());d.stopPropagation();this._embeddedOutputsView.outputChanged();this._focusService.setFocus()},
isSuggestionOutputStale:function(){return b.contains(this._domElement,this._STALE_OUTPUT_CLASS)},destroy:function(){this.inherited(arguments);a.destroy(this._didYouMeanContainer)}})})},"MW/rtc/plugins/typocorrection/TypoSuggestionContentFactory":function(){define(["dojo/dom-construct","dojo/string","dojo/i18n!l10n/nls/actions"],function(g,f,e){return{getContent:function(d){var b=g.create("div",{className:"errorRecoveryDiv doNotExport"});b.setAttribute("data-testid","errorRecoveryDiv");g.create("div",
{textContent:e.didYouMeanText},b);g.create("div",{className:"suggestion",textContent:d},b);d=g.create("button",{className:"codeFixBtn",textContent:e.fixButtonLabel},b);d.setAttribute("data-testid","typoFixButton");return{didYouMeanContainer:b,fixButton:d}}}})},"MW/rtc/plugins/typocorrection/TypoSuggestionFix":function(){define(["dojo/_base/declare","MW/rtc/model/CodeUtilities","mw-log/Log"],function(g,f,e){return g(null,{constructor:function(d,b,a,c,e){this._document=d;this._internalDocument=b;this._lineNumberService=
a;this._suggestion=c;this._stackLineNumberLivePosition=e},getSuggestion:function(){return this._suggestion},_getCodeLineNumberFromStackLivePosition:function(){return f.getCodeLineNumberFromPosition(this._internalDocument,this._stackLineNumberLivePosition)},_getUpdatedDocLineNumber:function(){return this._determineLineNumber(this._getCodeLineNumberFromStackLivePosition())},performFix:function(){var d=this._document.getLineText(this._getUpdatedDocLineNumber()),b=d.search(/\S/)+1,d=d.length+1;this._document.replaceText(this._suggestion,
this._getUpdatedDocLineNumber(),b,this._getUpdatedDocLineNumber(),d);d=b+this._suggestion.length;return{startLine:this._getUpdatedDocLineNumber(),endLine:this._getUpdatedDocLineNumber(),startColumn:b,endColumn:d}},_determineLineNumber:function(d){return this._lineNumberService.getLineNumberFromCodeLineNumber(d)+1}})})},"MW/rtc/plugins/view/divcaret/DivCaretPluginProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/view/divcaret/DivCaretPlugin"],function(g,
f,e){return g(f,{isApplicable:function(d){return!d.getAttribute("contenteditable")},requires:function(){return{isApplicable:["rtc.scrollpane"],createInstance:["rtc.cursor.view","rtc.view","rtc.cursorcontroller"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/view/divselection/DivSelectionPluginProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/view/divselection/DivSelectionPlugin"],function(g,f,e){return g(f,{isApplicable:function(d){return!d.getAttribute("contenteditable")},
requires:function(){return{isApplicable:["rtc.scrollpane"],createInstance:["rtc.cursor.view","rtc.view","rtc.cursorcontroller"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/plugins/view/divselection/DivSelectionPlugin":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-construct dojo/dom-geometry dojo/dom-style MW/rtc/abstract/AbstractPlugin MW/rtc/model/Position".split(" "),function(g,f,e,d,b,a,c,h){return g(c,{_PX:"px",_MARGIN:15,constructor:function(a,
c,b){this._rtcView=c;this._paddingLeft=this._rtcView.paddingLeft;this._cursorController=b;this._layers=[];this._layer=d.create("span",{"class":"selectionGroup"});this._rtcView.addLayer(this._layer);this._hidden=this._isLocked=!1;this.own(e.after(a,"onUpdate",f.hitch(this,"_layout")))},_layout:function(){this._isLocked||(this._removeAllSelections(),this._cursorController.getCursors().forEach(function(a){this.draw(a)},this),this._addAllLayers())},lockSelection:function(){this._isLocked=!0},unlockSelection:function(){this._isLocked=
!1;this._layout()},draw:function(c){if(c.hasSelection()&&!c.isSelectionHidden()){this._hidden=!1;var d=c.selectionInfo(),e=this._addSelectionLayer(),f=e.layer,h=e.top,g=e.body,e=e.bottom;d.endPosition=d.isReversed?c.anchor:c.position;var r=this._getStartAndEndOfSelection(d),s=r.start,r=r.end;if(s&&r){var t=this._rtcView.getDomTargetPosition().scrollWidth-this._paddingLeft;c.isFileEndSelected()&&(r.x=t+this._paddingLeft);0===d.startPos&&(0===d.startNode.offsetInContainer()&&d.startNode.textContainer()!==
d.endNode.textContainer())&&(s.x=this._paddingLeft);var u=this._getFooterHeight(d,r);if(s.y+s.height>r.y+4){var d=Math.min(s.y,r.y),v=Math.max(s.height,r.height);a.set(h,{left:(s.x||this._paddingLeft)+"px",top:d+"px",width:r.x-s.x+"px",height:v+"px",display:"block"});c.isFileEndSelected()?a.set(g,{left:this._paddingLeft+"px",top:d+v+"px",width:t+"px",height:u+"px",display:"block"}):a.set(g,{display:"none"});a.set(e,{display:"none"})}else c=r.y-(s.y+s.height),v=d.startNode.textContainer().nextSibling()===
d.endNode.textContainer(),r.y-(s.y+s.height)>Math.min(s.height,r.height)&&(v=!1),4>c||v?(a.set(g,{display:"none"}),r.height&&(s.height+=c)):a.set(g,{left:this._paddingLeft+"px",top:s.y+s.height+"px",width:t+"px",height:c+"px",display:"block"}),a.set(h,{left:(s.x||this._paddingLeft)+"px",top:s.y+"px",width:t-(s.x||this._paddingLeft)+this._paddingLeft+"px",height:s.height+"px",display:"block"}),h=0===d.endPos&&d.fileEndSelected||0<d.endPos||d.endNode.previousSibling(),a.set(e,{left:this._paddingLeft+
"px",top:r.y+"px",width:(r.x||this._paddingLeft)-this._paddingLeft+"px",height:r.height+u+"px",display:h?"block":"none"});a.set(f,{display:"block"});b.setMarginBox(f,{h:Math.max(r.y+r.height,s.y+s.height)+u,w:this._rtcView.getDocumentDimension().width})}}},_getStartAndEndOfSelection:function(a){var c,b,d=this._rtcView.getCoordinateForPosition(a.startPosition),e=this._rtcView.getCoordinateForPosition(a.endPosition);if(!d||!e)return{start:null,end:null};if(a.isLocal)return{start:d,end:e};var f;b=c=
0;var g=a.startNode.nextSibling();f=this._rtcView.getCoordinateForNode(a.startNode);for(c=f.x+f.width;g&&g!==a.endNode;){f=this._rtcView.getCoordinateForNode(g);if(f.x+f.width<=c)break;if(this._isBelow(f,d,!1))break;b=new h(g,g.maxOffset());b=this._rtcView.getCoordinateForPosition(b);if(this._isBelow(b,d,!1))break;this._growCoordinateToMatchSibling(d,f);g=g.nextSibling()}g=a.endNode.previousSibling();for(c=this._rtcView.getCoordinateForNode(a.endNode).x;g&&g!==a.startNode;){f=this._rtcView.getCoordinateForNode(g);
b=f.x;if(b>=c)break;c=b;if(this._isBelow(e,f,!0))break;b=new h(g,0);b=this._rtcView.getCoordinateForPosition(b);if(this._isBelow(e,b,!0))break;this._growCoordinateToMatchSibling(e,f);g=g.previousSibling()}if(d.y+d.height<=e.y+4){for(g=a.startNode.previousSibling();g;){f=this._rtcView.getCoordinateForNode(g);c=f.y;b=f.height;if(this._isBelow(f,d,!0))break;d.y+d.height<c+b&&(d.height=c+b-d.y);g=g.previousSibling()}for(g=a.endNode.nextSibling();g;){f=this._rtcView.getCoordinateForNode(g);c=f.y;if(this._isBelow(e,
f,!0))break;e.y>c&&(e.height+=e.y-c,e.y=c);g=g.nextSibling()}}return{start:d,end:e}},_isBelow:function(a,c,b){return b?a.y>c.y+c.height:a.y>=c.y+c.height},_growCoordinateToMatchSibling:function(a,c){var b=c.y,d=c.height;a.y>b&&(a.height+=a.y-b,a.y=b);b+=d;d=a.y+a.height;b>d&&(a.height+=b-d)},_getFooterHeight:function(a,c){var d=0;if(a.fileEndSelected){var e=a.endNode.rootContainer(),f=e.box.nextElementSibling;f&&(d=b.getMarginBox(f),d=e.getBottom()+d.h-(c.y+c.height))}return d},updateContainerFullSelection:function(){if(this._layers[0])for(var a=
0;a<this._layers[0].children.length;a++)this._layers[0].children[a].style.top=parseInt(this._layers[0].children[a].style.top,10)-this._MARGIN+this._PX},_removeAllSelections:function(){this._layer.innerHTML="";this._layers=[];b.setMarginBox(this._layer,{w:0})},_addAllLayers:function(){if(0!==this._layers.length){var a=document.createDocumentFragment();this._layers.forEach(function(c){a.appendChild(c)});this._layer.appendChild(a);var c=this._rtcView.getDocumentDimension();b.setMarginBox(this._layer,
{w:c.width})}},_addSelectionLayer:function(){var a=d.create("span",{"class":"selectionLayer"}),c=d.create("span",{"class":"selection sel-top"},a),b=d.create("span",{"class":"selection sel-body"},a),e=d.create("span",{"class":"selection sel-bot"},a);this._layers.push(a);return{layer:a,top:c,body:b,bottom:e}}})})},"MW/rtc/plugins/view/layoutmanager/LayoutManagerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/view/layoutmanager/LayoutManager"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.internaldocument rtc.scrollpane rtc.fixedsize rtc.view.viewmodel rtc.view.layoutmanager.layouter rtc.view.layoutmanager.rule rtc.view.layoutmanager.rules.default rtc.view.rangeconverter".split(" ")}},createInstance:function(d,b,a,c,f,g,l,m){return new e(d,b,a,c,f,g,l,m)}})})},"MW/rtc/plugins/view/layoutmanager/LayoutManager":function(){define("dojo/_base/array dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style mw-log/Log MW/rtc/abstract/AbstractPlugin MW/rtc/core/NodeMap ./LayoutConstants ./LayoutUtilities".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q){return f(m,{constructor:function(a,c,b,f,h,g,k,l){this._internalDocument=a;this._domTarget=c;this.fixedSize=b;this._viewModel=f;this._defaultRule=k;this._rangeConverter=l;this._root=null;this._scrollTopMayHaveChanged=!1;this._layoutOperations=[];this._layoutCache={};this._pendingNodes=[];this._initializeRules(g);this._initializeLayouters(h);this.own(d.after(a,"onNodeChange",e.hitch(this,"_handleNodeChanged"),!0))},_initializeRules:function(a){this._layoutRules=
a&&1<a.length?a.sort(function(a,c){return c.priority()-a.priority()}):[this._defaultRule]},_initializeLayouters:function(a){this._layouters=new p(a)},registerLayouter:function(a){this._layouters.registerOverwrite(a)},_handleNodeChanged:function(a){a=q.getLayoutOperationsFromNodeChangeEvent(a);for(var c=0;c<a.length;c+=1)this._layoutOperations.push(a[c])},layoutDocument:function(){var b=this._internalDocument.root;this._getDomNode(b)||this._reset();var d=this._root;this._root=this._createDomNode(b);
d&&d.parentElement?c.place(this._root,d,"replace"):c.place(this._root,this._domTarget);this.resize();a.toggle(this._domTarget,"readonly",b.readOnly);this._layoutOperations=[];this._layoutCache={}},layoutOnDocumentChange:function(){var a=[];if(0===this._layoutOperations.length)return a;var c=this._viewModel.getViewProperties().scrollTop;this._layoutOperations.forEach(function(c){(c=this._executeOperation(c))&&a.push(c)},this);this._flushPendingNodes();this._scrollTopMayHaveChanged&&(this._domTarget.scrollTop=
c,this._scrollTopMayHaveChanged=!1);this._layoutOperations=[];this._layoutCache={};return a},_executeOperation:function(a){var c=null,b=a.node,d=q.isInModel(b),e=q.isInView(b,this._domTarget),f=b.parent&&q.isInView(b.parent,this._domTarget);if(!d)return q.isRemoveOperation(a)&&e&&(c=b,this._removeNode(b)),c;q.isUpdateOperation(a)&&e?(c=b,this._layoutNode(b,a)):q.isLayoutOperation(a)&&f&&(c=b,this._layoutNode(b,a));return c},layoutNode:function(a){this._layoutNode(a);this._flushPendingNodes();this._layoutCache=
{}},_layoutNode:function(a,c){this._relayout=!0;a=this._getNodeToLayout(a);var b=this._createDomNode(a),d=a.parent;b&&(d&&this._getDomNode(d))&&this._layoutNodeUsingRules(b,a,null,c);this._relayout=!1},_getNodeToLayout:function(a){for(;a&&!a.isRootContainer()&&!this._getLayouter(a).canLayoutIndividually(a);)a=a.parent;return a},_addToPendingNodesList:function(a){0>this._pendingNodes.indexOf(a)&&this._pendingNodes.push(a)},_flushPendingNodes:function(){for(;0<this._pendingNodes.length;){var a=this._pendingNodes;
this._pendingNodes=[];a.forEach(this.refreshNode,this)}},refreshNode:function(a){if(a.parent){var b=this._getDomNode(a);if(b&&b.parentNode){var d=this._getLayouter(a).refresh(this,a,b,b.cloneNode(!1));d&&d!==b&&(c.place(d,b,"replace"),this._connect(a,d));this._layoutRules.forEach(function(c){if(c=c.getOperationsForRefresh(a))this._setWidthFromLayoutInfo(c),this._setRootWidthFromLayoutInfo(c),this._performHostingFromLayoutInfo(c,a)},this)}}},_createDomNode:function(a){return this._getLayouter(a).layout(this,
a)},_getLayouter:function(a){var c=this._layouters.get(a);l.assert(c,"No layouter found for "+a.className);return c},layoutInto:function(a,d,e){var f=this._getDomNode(a);if(f&&!this._relayout)return b.set(f,e),f;f&&this._removeNode(a);d=c.create(d,e);this._layoutNodesIntoContainer(d,a.children);this._connect(a,d);return d},removeAndDisconnectNode:function(a){this._getDomNode(a)&&this._removeNode(a);this._connect(a,null)},_layoutNodesIntoContainer:function(a,c){c&&c.length&&c.forEach(function(c){this._layoutNodeIntoContainer(a,
c)},this)},_layoutNodeIntoContainer:function(a,c){var b=this._createDomNode(c);this._layoutNodeUsingRules(b,c,a)},_layoutNodeUsingRules:function(a,c,b,d){var e=b||this._root;this._layoutRules.forEach(function(f){var h=a.parentElement||b;if(f=f.getOperationsForLayout(a,c,e,d))this._placeDomNodeFromLayoutInfo(f,c,h),this._mergeBlocksFromLayoutInfo(f),this._removeDomNodesFromLayoutInfo(f),this._injectBlocksFromLayoutInfo(f),this._redrawBlocksFromLayoutInfo(f),this._performHostingFromLayoutInfo(f,c),
this._scheduleRefreshFromLayoutInfo(f),this._decorateFromLayoutInfo(f)},this)},_placeDomNodeFromLayoutInfo:function(a,b,d){a.nodeToPlace&&(a.nodeToPlaceRefNode?c.place(a.nodeToPlace,a.nodeToPlaceRefNode,a.nodeToPlaceRefPos):this._placeDomNode(a.nodeToPlace,b,d))},_mergeBlocksFromLayoutInfo:function(a){if(a.nodeToPlace&&a.mergeWithSiblingBlock){a=a.nodeToPlace;var c=a.className,b=a.nextElementSibling,d=a.previousElementSibling;b&&0<=b.className.indexOf(c)?this._mergeBlocks([[a,b]]):d&&0<=d.className.indexOf(c)&&
this._mergeBlocks([[d,a]])}},_removeDomNodesFromLayoutInfo:function(a){a.nodesToRemove&&a.nodesToRemove.forEach(function(a){for(a.parentNode&&a.parentNode.removeChild(a);0<a.childElementCount;)a.removeChild(a.firstElementChild)},this)},_injectBlocksFromLayoutInfo:function(a){var c=this._createBlockFromLayoutInfo(a.prevBlock);this._placeBlock(c,a.nodeToPlace,"before");c=this._createBlockFromLayoutInfo(a.nextBlock);this._placeBlock(c,a.nodeToPlace,"after")},_createBlockFromLayoutInfo:function(a){if(a&&
a.container){var b=a.container;a.childDomNodes.forEach(function(a){c.place(a,b)},this);a.oldBlockDomNodes.forEach(function(a){a&&(a.parentNode&&!a.hasChildNodes())&&a.parentNode.removeChild(a)},this);return b}},_redrawBlocksFromLayoutInfo:function(a){var c=this._getRedrawnBlockByNodes(a.prevNodes),b=this._getRedrawnBlockByNodes(a.nextNodes);this._placeBlock(c,a.nodeToPlace,"before");this._placeBlock(b,a.nodeToPlace,"after")},_performHostingFromLayoutInfo:function(a,c){if(a.hostedNodes){var b=a.hostedNodes.map(function(c){this._getDomNode(c)||
this._createDomNode(c);return a.mapFunction(c)},this);this._getLayouter(c).place(c,b)}a.hostingNode&&this._addToPendingNodesList(a.hostingNode)},_scheduleRefreshFromLayoutInfo:function(a){var c=[],b=a.prevBlock,d=a.nextBlock,e=a.prevNodes;a=a.nextNodes;b&&(c=c.concat(b.childNodes));d&&(c=c.concat(d.childNodes));e&&(c=c.concat(e));a&&(c=c.concat(a));c.forEach(this._addToPendingNodesList,this)},_decorateFromLayoutInfo:function(a){this._setWidthFromLayoutInfo(a);this._setClassFromLayoutInfo(a);this._setRootWidthFromLayoutInfo(a)},
_setWidthFromLayoutInfo:function(a){(a=a.widthToSet)&&a.forEach(function(a){a.nodesToApply.forEach(function(c){this._domTarget.contains(c)&&(c.style.width=this._getMarginWidth(c)-a.widthOffset+"px")},this)},this)},_getMarginWidth:function(a){var c=a.className;if(!this._layoutCache.hasOwnProperty(c)){var b=a.offsetLeft;a=k.get(a,"marginRight");this._layoutCache[c]=this._domTarget.offsetWidth-(b+a)}return this._layoutCache[c]},_setClassFromLayoutInfo:function(c){(c=c.classToSet)&&c.forEach(function(c){c.nodesToApply.forEach(function(b){a.toggle(b,
c.name,c.value)})},this)},_setRootWidthFromLayoutInfo:function(a){if((a=a.rootNodeWidth)&&this._layoutCache.rootWidth!==a)this._layoutCache.rootWidth=a,this._root.style.minWidth=a>this._domTarget.clientWidth?a+"px":"100%"},_getRedrawnBlockByNodes:function(a){if(!a||!a.length)return null;var b=c.create("div",{"class":n.ROOTNODE_CLASS});a.forEach(function(a){this._getDomNode(a)&&this._layoutNodeIntoContainer(b,a)},this);return b.firstChild},_placeDomNode:function(a,b,d){if(!a.parentElement){var e=this._getReferenceForPlace(b,
a,d);e&&this._isDomNodeAttached(e.domNode)?c.place(a,e.domNode,e.position):(b=b.parent,d?c.place(a,d):b&&this._getDomNode(b)&&c.place(a,this._getDomNode(b)))}},_placeBlock:function(a,b,d){a&&(this._scrollTopMayHaveChanged=!0,c.place(a,b,d))},_getReferenceForPlace:function(a,c,b){if(!a)return null;b=b||this._root;if(!b.hasChildNodes())return null;var d=a,e=a;do{if(d=d&&d.previousSibling()){var f=this._getRefDomNode(a,d,c);if(this._isPreferredReference(f,b))return f}if(e=e&&e.nextSibling()){var h=this._getRefDomNode(a,
e,c);if(this._isPreferredReference(h,b))return h}if(this._isValidReference(f,b))return f;if(this._isValidReference(h,b))return h}while(d||e);return null},_isPreferredReference:function(a,c){return!this._isValidReference(a,c)?!1:!this._domTarget.contains(c)?!0:a.base},_isValidReference:function(a,c){return a&&a.domNode&&c.contains(a.domNode)},_getRefDomNode:function(a,c,b){if(!c)return null;var d=null;this._layoutRules.some(function(e){if(e=e.getRefDomNode(a,c,b))return d=e,!0},this);return d},_isDomNodeAttached:function(c){for(;c;){if(a.contains(c,
n.ROOTNODE_CLASS))return!0;c=c.parentElement}return!1},resize:function(){this._layoutRules.forEach(function(a){if(a=a.getOperationsForResize())this._setWidthFromLayoutInfo(a),this._setRootWidthFromLayoutInfo(a)},this);this._layoutCache={}},_removeNode:function(a){for(var c=[],b=[],d=[],e=this._layoutRules.length-1;0<=e;e-=1){var f=this._layoutRules[e].getOperationsForRemove(a,b);f&&(f.nodeToMerge&&f.nodeToMerge.length&&c.unshift(f.nodeToMerge),f.nodeToRemove&&b.unshift(f.nodeToRemove),f.nodesToLayout&&
(d=d.concat(f.nodesToLayout)),this._decorateFromLayoutInfo(f))}c.forEach(this._mergeBlocks,this);b.forEach(function(a){a&&a.parentNode&&a.parentNode.removeChild(a)},this);d.forEach(this._layoutNode,this)},_mergeBlocks:function(a){a&&a.length&&a.forEach(function(a){if(2===a.length){var b=a[0],d=a[1];a=b.parentElement;var e=d.parentElement,f=g.indexOf(a.children,b);a.removeChild(b);e.removeChild(d);b=this._getBlockAfterMerge(b,d);c.place(b,a,f)}},this)},_getBlockAfterMerge:function(a,b){for(var d=c.create("div",
{"class":a.className});a.childElementCount;)c.place(a.firstChild,d);for(;b.childElementCount;)c.place(b.firstChild,d);return d},isLayoutPending:function(){return 0<this._layoutOperations.length},insertDomNode:function(a,b,d,e){return(b=this._rangeConverter.getContainerForPosition(b,e))?c.place(a,b,d):null},removeDomNode:function(a){this._domTarget.contains(a)&&a.parentNode.removeChild(a)},_reset:function(){this._layoutRules.forEach(function(a){a.reset()},this)},_connect:function(a,c){c&&(c.rteNode=
a);a.box=c},applyStyle:function(a,c,b){this._getDomNode(a).style[c]=b},clearStyle:function(a,c){this._getDomNode(a).style[c]=""},applyClass:function(c,b){var d=this._getDomNode(c);null!==d&&a.add(d,b)},clearClass:function(c,b){var d=this._getDomNode(c);null!==d&&a.remove(d,b)},_getDomNode:function(a){return a.box}})})},"MW/rtc/plugins/view/layoutmanager/LayoutParagraphHostingModelProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LayoutParagraphHostingModel"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/view/layoutmanager/LayoutParagraphHostingModel":function(){define(["dojo/_base/declare","mw-log/Log","MW/rtc/abstract/AbstractPlugin","MW/rtc/browsersupport/BrowserSupportUtilities","MW/rtc/model/RangeUtilities"],function(g,f,e,d,b){return g(e,{constructor:function(){this._paragraphHostingMap=d.createMap()},set:function(a,c){a.isRootContainer()&&this._paragraphHostingMap.set(a,
c)},get:function(a){return this._paragraphHostingMap.get(a)},getHostingNode:function(a){var c=this._getNodeRangePairs();if(0===c.length)return null;var d=null;c.some(function(c){if(b.isParagraphNodeInRange(a,c.range))return d=c.node,!0},this);return d},_getNodeRangePairs:function(){var a=[];this._paragraphHostingMap.forEach(function(c,b){a.push({node:b,range:c})});return a},getHostedNodes:function(a){a=this.get(a);return!a?null:b.paragraphNodesInRange(a)},"delete":function(a){this._paragraphHostingMap.delete(a)},
destroy:function(){this.reset();this._paragraphHostingMap=null},reset:function(){this._paragraphHostingMap.forEach(function(a){a.destroy()});this._paragraphHostingMap.clear()}})})},"MW/rtc/plugins/view/layoutmanager/layouters/LineLayouterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./LineLayouter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.view.decoration.layerviewmodel","rtc.view.hidden.hiddennodemodel"]}},createInstance:function(d,
b){return new e(d,b)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/view/layoutmanager/layouters/PlainTextLayouterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./PlainTextLayouter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.view.decoration.viewmodel"]}},createInstance:function(d){return new e(d)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/view/layoutmanager/layouters/RootLayouterProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./RootLayouter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/view/layoutmanager/layouters/RootLayouter":function(){define(["dojo/_base/declare","dojo/dom-class","MW/rtc/plugins/view/layoutmanager/abstract/AbstractLayouter","MW/rtc/nodes/inner/RootNode"],function(g,f,e,d){return g(e,{constructor:function(b){},getApplicableNodeClass:function(){return d},
layout:function(b,a){var c=b.layoutInto(a,"div",{"class":"rootNode"});a.plainText&&f.add(c,"plainText");b.fixedSize&&f.add(c,"rootNodeFixedSize");return c}})})},"MW/rtc/plugins/view/layoutmanager/rules/BaseGroupingRuleProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/view/layoutmanager/rules/BaseGroupingRule"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/view/layoutmanager/rules/ContainmentGroupingRuleProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/view/layoutmanager/rules/ContainmentGroupingRule"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.scrollpane"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/view/layoutmanager/rules/ContiguousGroupingRuleProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/view/layoutmanager/rules/ContiguousGroupingRule"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.scrollpane"]}},
createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/view/layoutmanager/rules/DefaultRuleProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/view/layoutmanager/rules/DefaultRule"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/view/layoutmanager/rules/ExpandableRuleProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"MW/rtc/plugins/view/layoutmanager/rules/ExpandableRule"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/view/layoutmanager/rules/ExpandableRule":function(){define("dojo/_base/declare dojo/dom-geometry dojo/query dojo/dom-class MW/rtc/plugins/view/layoutmanager/abstract/BaseRule MW/rtc/plugins/view/layoutmanager/rules/ContainmentGroupingRule".split(" "),function(g,f,e,d,b,a){return g(b,{_EXPANSION_THRESHOLD:10,
_EXPANDABLE_CLASSLIST:["equationNode","imageNode"],constructor:function(){this.reset()},reset:function(){this._cachedExpandable=[];this._cachedWidth=[];this._currentMaxWidth=0},getOperationsForLayout:function(c,b,d){d=[];d=b.wrappable?e("*",c):b.groupingType===a().groupingType?this._getElementsInSiblingBlocks(c):[c];d=d.filter(this._canExpandRootNode,this);if(!d.length)return null;d.forEach(function(a){var c=this._cachedExpandable.indexOf(a),b=this._getMarginWidth(a);0>c?(this._cachedExpandable.push(a),
this._cachedWidth.push(b)):this._cachedWidth[c]=b},this);this._currentMaxWidth=this._getMaxCachedWidth();return{rootNodeWidth:this._getExpandedWidth()}},_getElementsInSiblingBlocks:function(a){var b=a.previousElementSibling;if(b)var d=e("*",b);if(a=a.nextElementSibling)var f=e("*",a);return d&&f?d.concat(f):d||f||[]},getOperationsForRemove:function(a,b){var d=this._getDomNode(a);if(!a.wrappable&&!this._canExpandRootNode(d))return null;var f=e("*",d);f.push(d);f.forEach(function(a){this._canExpandRootNode(a)&&
(a=this._cachedExpandable.indexOf(a),0<=a&&(this._cachedExpandable.splice(a,1),this._cachedWidth.splice(a,1)))},this);this._currentMaxWidth=this._getMaxCachedWidth();return{rootNodeWidth:this._getExpandedWidth()}},getOperationsForResize:function(){if(!this._cachedExpandable.length)return null;this._updateCachedWidth();return{rootNodeWidth:this._getExpandedWidth()}},_updateCachedWidth:function(){this._cachedWidth=this._cachedExpandable.map(this._getMarginWidth);this._currentMaxWidth=this._getMaxCachedWidth()},
_getExpandedWidth:function(){return this._currentMaxWidth+this._EXPANSION_THRESHOLD},_getMaxCachedWidth:function(){return Math.max.apply(null,this._cachedWidth)},_getMarginWidth:function(a){a=f.getMarginBox(a);return a.l+a.w},_canExpandRootNode:function(a){return this._EXPANDABLE_CLASSLIST.some(function(b){return d.contains(a,b)})},_isApplicable:function(a,b){return b.wrappable||this._canExpandRootNode(a)},priority:function(){return-4},destroy:function(){this.inherited(arguments);this._cachedExpandable=
[]}})})},"MW/rtc/plugins/view/layoutmanager/rules/OutputRuleProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/view/layoutmanager/rules/OutputRule"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/plugins/view/layoutmanager/rules/OutputRule":function(){define(["dojo/_base/declare","dojo/query","MW/rtc/plugins/view/layoutmanager/abstract/BaseRule","MW/rtc/plugins/view/layoutmanager/LayoutConstants"],
function(g,f,e,d){return g(e,{_INLINEELEMENT_CLASS:"inlineElement",constructor:function(){},getOperationsForLayout:function(b,a,c){return!this._isApplicable(a)?null:this._getOperationsForWidthSetting(b)},getOperationsForRefresh:function(b){return!this._isApplicable(b)?null:this._getOperationsForWidthSetting(this._getDomNode(b))},_getOperationsForWidthSetting:function(b){b=f("."+this._INLINEELEMENT_CLASS,b);return!b.length?null:{widthToSet:[{nodesToApply:b,widthOffset:this._getWidthOffset()}]}},_getWidthOffset:function(){return d.RIGHT_MARGIN_WIDTH},
_isApplicable:function(b){return"LineNode"===b.className},priority:function(){return-3}})})},"MW/rtc/plugins/view/layoutmanager/rules/ParagraphHostingRuleProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/view/layoutmanager/rules/ParagraphHostingRule"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.view.layoutmanager.paragraphhostingmodel"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/plugins/view/layoutmanager/rules/ParagraphHostingRule":function(){define(["dojo/_base/declare",
"MW/rtc/plugins/view/layoutmanager/abstract/BaseRule"],function(g,f){return g(f,{constructor:function(e){this._paragraphHostingModel=e},getOperationsForLayout:function(e,d,b){return this._getParagraphHostingInfo(d)},getOperationsForRefresh:function(e){return this._getParagraphHostingInfo(e)},_getParagraphHostingInfo:function(e){if(!e.isRootContainer())return null;var d=this._paragraphHostingModel.getHostedNodes(e);if(d)return{hostedNodes:d,mapFunction:this._getDomNode.bind(this)};if(e=this._paragraphHostingModel.getHostingNode(e))return{hostingNode:e}},
getOperationsForRemove:function(e,d){if(!e.parent){var b=this._paragraphHostingModel.getHostedNodes(e);if(b)return this._paragraphHostingModel.delete(e),{nodesToLayout:b}}},priority:function(){return-2}})})},"MW/rtc/plugins/view/layoutmanager/rules/WrappableRuleProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/view/layoutmanager/rules/WrappableRule"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},
"MW/rtc/plugins/view/layoutmanager/rules/WrappableRule":function(){define(["dojo/_base/declare","dojo/query","MW/rtc/plugins/view/layoutmanager/abstract/BaseRule","MW/rtc/plugins/view/layoutmanager/rules/ContainmentGroupingRule","MW/rtc/plugins/view/layoutmanager/LayoutConstants"],function(g,f,e,d,b){return g(e,{_WRAPPABLE_CLASS:"wrappable",constructor:function(){this.reset()},reset:function(){this._cachedWrappable=[]},getOperationsForLayout:function(a,c,b){var e;c.wrappable?e=this._getOperationsForLayoutWrappable(a):
c.groupingType===d().groupingType&&(e=this._getOperationsForLayoutSiblingBlocks(a,c));return e},_getOperationsForLayoutWrappable:function(a,c){var b={};b.classToSet=[{nodesToApply:[a],name:this._WRAPPABLE_CLASS,value:!0}];var d=f("."+this._WRAPPABLE_CLASS,a);d.push(a);b.widthToSet=[{nodesToApply:d,widthOffset:this._getWidthOffset()}];0>this._cachedWrappable.indexOf(a)&&this._cachedWrappable.push(a);return b},_getOperationsForLayoutSiblingBlocks:function(a){a=this._getWrappableInSiblingBlocks(a);return!a.length?
null:{widthToSet:[{nodesToApply:a,widthOffset:this._getWidthOffset()}]}},_getWrappableInSiblingBlocks:function(a){var c=a.previousElementSibling;if(c)var b=f("."+this._WRAPPABLE_CLASS,c);if(a=a.nextElementSibling)var d=f("."+this._WRAPPABLE_CLASS,a);return b&&d?b.concat(d):b||d||[]},getOperationsForRemove:function(a){if(a.wrappable){a=this._getDomNode(a);var c=f("."+this._WRAPPABLE_CLASS,a);c.push(a);c.forEach(function(a){a=this._cachedWrappable.indexOf(a);0<=a&&this._cachedWrappable.splice(a,1)},
this)}return null},getOperationsForResize:function(){return!this._cachedWrappable.length?null:{widthToSet:[{nodesToApply:this._cachedWrappable,widthOffset:this._getWidthOffset()}]}},_getWidthOffset:function(){return b.RIGHT_MARGIN_WIDTH},priority:function(){return-1},destroy:function(){this.inherited(arguments);this._cachedWrappable=[]}})})},"MW/rtc/plugins/view/movehiddenkeycapture/MoveHiddenKeyCaptureProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./MoveHiddenKeyCapture"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cursor","rtc.divcaret","rtc.domnode","rtc.keyhandler"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/plugins/view/movehiddenkeycapture/MoveHiddenKeyCapture":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","dojo/dom-class","dojo/dom-geometry"],function(g,f,e,d,b){return g(null,{constructor:function(a,c,b,d){this._cursor=a;this._divcaret=c;this._keyCapture=d.keyCapture;this._rtePane=
b},_getFocusPosition:function(){var a=this._cursor.getNode(),c=a.box,d=this._divcaret.getBox(),a=a.isIMENode?b.position(c):b.position(d),c={x:0,y:0};this._rtePane&&(c=b.position(this._rtePane));return{left:a.x-c.x+"px",top:a.y-c.y+"px"}},moveHiddenKeyCaptureToCaret:function(a){var c={top:0,left:0};a&&(c=this._getFocusPosition());this._keyCapture.style.top=c.top;this._keyCapture.style.left=c.left}})})},"MW/rtc/preferences/PreferencesServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"MW/rtc/preferences/PreferencesService"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.editordataservice"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/preferences/PreferencesService":function(){define(["dojo/_base/declare","dojo/_base/lang"],function(g,f){return g(null,{MATLAB_PREFERENCES_FEATURE_ID:"matlab.preferences",constructor:function(e){this._editorDataService=e;this._listener=this._editorDataService.listenTo(this.MATLAB_PREFERENCES_FEATURE_ID,
f.hitch(this,"_preferencesChanged"))},_preferencesChanged:function(){this.onPreferencesChanged()},getValue:function(e,d){var b=this._editorDataService.get(this.MATLAB_PREFERENCES_FEATURE_ID);return b&&e in b?b[e]:d},getValues:function(e){var d=this._editorDataService.get(this.MATLAB_PREFERENCES_FEATURE_ID),b={};e.forEach(function(a){b[a]=d[a]},this);return b},onPreferencesChanged:function(){}})})},"MW/rtc/view/PerformanceTestHelper":function(){define(["dojo/_base/declare","dojo/aspect","dojo/has",
"MW/rtc/abstract/AbstractPlugin","MW/rtc/core/provider/PluginProvider"],function(g,f,e,d,b){var a=g(d,{constructor:function(a,b,d){this._view=a;this._documentLoadedService=b;this._embeddedOutputsView=d;this._emitCustomEventAfterOnScroll();this._emitCustomEventAfterDocumentLoadedWithText();this._emitCustomEventBeforeOutputViewToggle();this._emitCustomEventAfterOutputViewToggle()},_emitCustomEventAfterOnScroll:function(){this.own(f.after(this._view,"onScroll",function(){if(!e("mac")){var a=new CustomEvent("customMPoint",
{detail:"ScrollCompleted"});window.dispatchEvent(a)}},!0))},_emitCustomEventAfterDocumentLoadedWithText:function(){this.own(f.after(this._documentLoadedService,"onDocumentLoadedWithText",function(){if(e("chrome")){var a=new CustomEvent("customMPoint",{detail:"textLoaded"});window.dispatchEvent(a)}},!0))},_emitCustomEventBeforeOutputViewToggle:function(){this.own(f.before(this._embeddedOutputsView,"toggle",function(){if(e("chrome")){var a=new CustomEvent("customMPoint",{detail:"startToggle"});window.dispatchEvent(a)}},
!0))},_emitCustomEventAfterOutputViewToggle:function(){this.own(f.after(this._embeddedOutputsView,"toggle",function(){if(e("chrome")){var a=new CustomEvent("customMPoint",{detail:"endToggle"});window.dispatchEvent(a)}},!0))}});return g(b,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.view","rtc.service.documentloaded","rtc.embeddedoutputs"]}},createInstance:function(c,b,d){return new a(c,b,d.getEmbeddedOutputsView())}})})},"MW/rtc/view/RTCPerformanceTestHelper":function(){define(["dojo/_base/declare",
"dojo/aspect","dojo/has","MW/rtc/abstract/AbstractPlugin","MW/rtc/core/provider/PluginProvider"],function(g,f,e,d,b){var a=g(d,{constructor:function(a,b){this._document=a;this._view=b;this._emitCustomEventAfterSetText();this._emitCustomEventAfterOnScroll()},_emitCustomEventAfterSetText:function(){this.own(f.after(this._document,"setText",function(){var a=new CustomEvent("customMPoint",{detail:"setTextCompleted"});window.dispatchEvent(a)},!0))},_emitCustomEventAfterOnScroll:function(){this.own(f.after(this._view,
"onScroll",function(){if(!e("mac")){var a=new CustomEvent("customMPoint",{detail:"ScrollCompleted"});window.dispatchEvent(a)}},!0))}});return g(b,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.document","rtc.view"]}},createInstance:function(c,b){return new a(c,b)}})})},"MW/rtc/view/ViewModelProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/view/ViewModel"],function(g,f,e){return g(f,{isApplicable:function(){return!0},
requires:function(){return{isApplicable:[],createInstance:["rtc.internaldocument","rtc.scrollpane"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/view/ViewModel":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","MW/rtc/abstract/AbstractPlugin","./ViewEventUtilities"],function(g,f,e,d,b){return g(d,{DOMTARGET_PROPERTIES:"scrollTop scrollLeft clientWidth clientHeight offsetHeight offsetWidth scrollHeight scrollWidth".split(" "),constructor:function(a,c){this._internalDocument=
a;this._domTarget=c;this._documentDimension=null;this._properties={}},update:function(){this._invalidateAllCaches();return this._updateViewProperties(this.DOMTARGET_PROPERTIES)},_invalidateAllCaches:function(){this._invalidateCacheForDocumentDimension()},_invalidateCacheForDocumentDimension:function(){this._documentDimension=null},_updateViewProperties:function(a){var c=[];a.forEach(function(a){var d=this._domTarget[a];d!==this._properties[a]&&(c.push(b.EVENTS[a]),this._properties[a]=d)},this);return c},
getViewProperties:function(){return this._properties},getDomTargetDomNode:function(){return this._domTarget},getDomTargetBoundingClientRect:function(){return this._domTarget.getBoundingClientRect()},getDocumentDimension:function(){if(!this._documentDimension){var a=this.getDocumentClientRect();this._documentDimension={width:a.width,height:a.height}}return this._documentDimension},getDocumentClientRect:function(){return this._internalDocument.root.box.getBoundingClientRect()}})})},"MW/rtc/view/ViewLinesTestHelper":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-attr dojo/dom-class dojo/query MW/rtc/core/provider/PluginProvider".split(" "),
function(g,f,e,d,b,a,c){var h=g(null,{constructor:function(a,c,b){this._internalDocument=a;this._scrollPane=b;this._listener=e.after(c,"layoutDocument",f.hitch(this,"addTags"),!0);this._listener=e.after(c,"_layoutNode",f.hitch(this,"addTags"),!0);this._listener=e.after(c,"layoutInto",f.hitch(this,"addTags"),!0);this._listener=e.after(c,"_removeNode",f.hitch(this,"addTags"),!0);this._lineCounter=0;this.addTags()},destroy:function(){this._listener.remove()},addTags:function(){0!==a(".rootNode",this._scrollPane).length&&
(this._lineCounter=0,this._internalDocument.root.children.forEach(function(a){this._addChildTag(a.box)},this))},_addChildTag:function(a){if(a)if(b.contains(a,"heading-1"))d.set(a,"data-testid","RtcLine"+this._lineCounter++),d.set(a,"type","TitleLine");else if(b.contains(a,"heading-2"))d.set(a,"data-testid","RtcLine"+this._lineCounter++),d.set(a,"type","HeadingLine");else if(b.contains(a,"paragraphNode"))d.set(a,"data-testid","RtcLine"+this._lineCounter++),d.set(a,"type","NormalLine");else if(b.contains(a,
"RTClistItem"))d.set(a,"data-testid","RtcLine"+this._lineCounter++),"OL"===a.parentElement.tagName?d.set(a,"type","OrderedListItem"):d.set(a,"type","UnorderedListItem");else if(b.contains(a,"lineNode"))d.set(a,"data-testid","RtcLine"+this._lineCounter++),d.set(a,"type","CodeLine");else{if(0<a.children.length)for(var c=0;c<a.children.length;c+=1)this._addChildTag(a.children[c])}else this._lineCounter++}});return g(c,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.internaldocument",
"rtc.view.layoutmanager","rtc.scrollpane"]}},createInstance:function(a,c,b){return new h(a,c,b)},destroyInstance:function(a){a.destroy()}})})},"MW/rtc/view/ViewSectionsTestHelper":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-attr dojo/dom-class dojo/query MW/rtc/core/provider/PluginProvider".split(" "),function(g,f,e,d,b,a,c){var h=g(null,{SECTION_CSS:"SectionBlock",SECTION_DATATEST_PREFIX:"RtcSection",constructor:function(a,c){this._scrollPane=c;this._listener=e.after(a,
"layoutDocument",f.hitch(this,"addTags"),!0);this._listener=e.after(a,"_layoutNode",f.hitch(this,"addTags"),!0);this._listener=e.after(a,"layoutInto",f.hitch(this,"addTags"),!0);this._listener=e.after(a,"_removeNode",f.hitch(this,"addTags"),!0);this.addTags()},addTags:function(){var c=a(".rootNode",this._scrollPane);if(0!==c.length)for(var e=0,c=c[0],f=0;f<c.children.length;f+=1){var h=c.children[f];b.contains(h,this.SECTION_CSS)&&d.set(h,"data-testid",this.SECTION_DATATEST_PREFIX+e++)}},destroy:function(){this._listener.remove()}});
return g(c,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.view.layoutmanager","rtc.scrollpane"]}},createInstance:function(a,c){return new h(a,c)},destroyInstance:function(a){a.destroy()}})})},"MW/rtc/view/ViewportOpenedServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./ViewportOpenedService"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.view","rtc.domnode","rtc.service.documentloaded"]}},
createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/view/ViewportOpenedService":function(){define(["dojo/_base/declare","dojo/aspect","dojo/Deferred","MW/rtc/abstract/AbstractPlugin","MW/rtc/view/ViewEventUtilities"],function(g,f,e,d,b){return g(d,{constructor:function(a,c,b){this._view=a;this._rtcDomNode=c;this._documentLoadedService=b;this._viewportOpenedWithContentPromise=new e;this._viewportOpenedPromise=new e;this._setupViewListener();b.whenDocumentLoadedWithText(this._updateViewportOpenedWithContentPromise.bind(this))},
_setupViewListener:function(){0<this._rtcDomNode.getBoundingClientRect().height?(this._viewportOpenedPromise.resolve(),this._updateViewportOpenedWithContentPromise()):this._viewUpdatedHandler=f.after(this._view,"onViewUpdated",function(a){b.hasSizingEvent(a)&&0<this._rtcDomNode.getBoundingClientRect().height&&(this._removeViewListener(),this._viewportOpenedPromise.resolve(),this._updateViewportOpenedWithContentPromise())}.bind(this),!0)},whenViewportOpenedWithContent:function(a){this._viewportOpenedWithContentPromise.then(a,
function(){})},whenViewportOpened:function(a){this._viewportOpenedPromise.then(a,function(){})},_updateViewportOpenedWithContentPromise:function(){this._viewportOpenedPromise.isResolved()&&this._documentLoadedService.isDocumentLoadedWithText()&&this._viewportOpenedWithContentPromise.resolve()},_removeViewListener:function(){this._viewUpdatedHandler&&(this._viewUpdatedHandler.remove(),this._viewUpdatedHandler=null)},destroy:function(){this.inherited(arguments);this._viewportOpenedPromise.reject();
this._viewportOpenedPromise=null;this._viewportOpenedWithContentPromise.reject();this._viewportOpenedWithContentPromise=null;this._removeViewListener()}})})},"MW/rtc/view/ViewProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/view/View"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.internaldocument","rtc.view.viewmodel","rtc.scrollpane","rtc.view.layoutmanager","rtc.view.coordinateconverter"]}},
createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/view/View":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/has dojo/on mw-log/Log MW/rtc/abstract/AbstractPlugin MW/rtc/model/DocumentEventUtilities MW/rtc/model/DocumentUtilities MW/rtc/model/NodeUtilities ./ViewEventUtilities ./ViewMeasurementUtilities ./ViewUtilities".split(" "),function(g,f,e,
d,b,a,c,h,k,l,m,p,n,q,r,s,t){return g(m,{_DEFAULT_HORIZONTAL_PADDING:60,_DEFAULT_VERTICAL_PADDING:14,_DEFAULT_SCROLL_AMOUNT:50,_LINE_SHOULD_BE_IN_VIEW:"The specified line should be in the current view.",_POSITION_SHOULD_NOT_BE_NULL:"The position should not be null.",constructor:function(a,c,b,d,h){this._internalDocument=a;this._viewModel=c;this._domTarget=b;this._layoutManager=d;this._coordinateConverter=h;this.paddingLeft=0;this._pendingEvents=[];this.own(k(b,"scroll",f.hitch(this,"_handleScroll")));
this.own(e.after(a,"onDocumentChanged",f.hitch(this,"_handleDocumentChanged"),!0));this.own(e.after(a,"onDocumentReset",f.hitch(this,"_handleDocumentReset")));this.own(e.after(a,"readOnlyChanged",f.hitch(this,"_handleReadOnlyChanged")))},onViewUpdated:function(a){},onVisitNode:function(a){},onLinesDOMUpdated:function(a,c,b){},onLayoutChange:function(a){a&&a.isValid()&&this.scrollPositionIntoView(a);this._pendingEvents.push(r.createEvent(r.EVENTS.layoutChange));this._updateViewPropertiesAndEmitEvents()},
onScroll:function(){},onResize:function(){this._layoutManager.resize();this._updateViewPropertiesAndEmitEvents()},_handleScroll:function(){this._updateViewPropertiesAndEmitEvents()},_handleDocumentChanged:function(a){var c=r.SOURCES.documentChange,b=this._layoutManager.layoutOnDocumentChange();0<b.length&&this._pendingEvents.push(r.createEvent(r.EVENTS.renderUpdate,c));r.isLayoutChangeEventToPatch(a,this._internalDocument)&&this._pendingEvents.push(r.createEvent(r.EVENTS.layoutChange,c));this._updateViewPropertiesAndEmitEvents(c);
if(0<b.length)this.onVisitNode(b)},_handleDocumentReset:function(){this._layoutManager.layoutDocument();this._updateViewProperties()},_handleReadOnlyChanged:function(){this._layoutManager.layoutDocument()},_updateViewPropertiesAndEmitEvents:function(a){this._updateViewProperties(a);this._emitPendingEvents()},_updateViewProperties:function(a){var c=this._viewModel.update(),c=this._createEvents(c,a);this.canScroll()||c.push(r.createEvent(r.EVENTS.layoutChange,a));this._pendingEvents=this._pendingEvents.concat(c)},
_createEvents:function(a,c){return a.map(function(a){return r.createEvent(a,c)})},_emitPendingEvents:function(){var a=this._pendingEvents;0<a.length&&(this._pendingEvents=[],this.onViewUpdated(a))},getDomTargetPosition:function(){return this._viewModel.getViewProperties()},setScrollTop:function(a){this.getScrollTop()===a||0===this.getScrollTop()&&0>a||(this._domTarget.scrollTop=a,this._updateViewPropertiesAndEmitEvents(),this.onScroll())},offsetScrollTop:function(a){var c=this.getScrollTop(),b=this.getScrollHeight()-
this.getClientHeight();a=Math.min(Math.max(c+a,0),b);a!==c&&(this._domTarget.scrollTop=a,this._updateViewPropertiesAndEmitEvents(),this.onScroll())},setScrollLeft:function(a){this.getScrollLeft()===a||0===this.getScrollLeft()&&0>a||(this._domTarget.scrollLeft=a,this._updateViewPropertiesAndEmitEvents(),this.onScroll())},offsetScrollLeft:function(a){var c=this.getScrollLeft(),b=this.getScrollWidth()-this.getClientWidth();a=Math.min(Math.max(c+a,0),b);a!==c&&(this._domTarget.scrollLeft=a,this._updateViewPropertiesAndEmitEvents(),
this.onScroll())},canScroll:function(){return this.getScrollHeight()>this.getClientHeight()},getScrollLeft:function(){return this._viewModel.getViewProperties().scrollLeft},getScrollTop:function(){return this._viewModel.getViewProperties().scrollTop},getScrollWidth:function(){return this._viewModel.getViewProperties().scrollWidth},getScrollHeight:function(){return this._viewModel.getViewProperties().scrollHeight},getClientWidth:function(){return this._viewModel.getViewProperties().clientWidth},getClientHeight:function(){return this._viewModel.getViewProperties().clientHeight},
applyStyleToLine:function(a,c,b){n.checkLineExists(this._internalDocument,a);(a=this._internalDocument.getLineNode(a-1))&&this._layoutManager.applyStyle(a,c,b)},registerLayouter:function(a){this._layoutManager.registerLayouter(a)},isLayoutPending:function(){return this._layoutManager.isLayoutPending()},layoutNode:function(a){this._layoutManager.layoutNode(a);this.onVisitNode([a])},refreshNode:function(a){this._layoutManager.refreshNode(a)},getDomtarget:function(){return this._domTarget},addLayer:function(a){d.add(a,
"layer");b.place(a,this._domTarget)},switchLayer:function(a,c){this._domTarget.contains(c)&&(d.add(a,"layer"),b.place(a,c,"replace"))},setBlockLayer:function(a){d.add(a,"layer fullWidthLayer");var b=this;k(this._domTarget,"scroll",function(){c.set(a,{left:b._domTarget.scrollLeft+"px"})})},isElementOutOfView:function(a,c){var b=this._viewModel.getDomTargetBoundingClientRect(),d=a.getBoundingClientRect();c=c||{left:0,right:0,top:0,bottom:0};return d.top>b.bottom+c.bottom||d.left>b.right+c.right||d.bottom<
b.top-c.top||d.right<b.left-c.left},getNearestVisibleLineTop:function(a,c){n.checkLineExists(this._internalDocument,a);var b=this._getNearestVisibleLineAbove(a);return this.getLineTop(b,c)},_getNearestVisibleLineAbove:function(a){var c=this._internalDocument.getLineNode(a-1);if(t.isRootContainerVisible(c))return a;a=t.getVisibleRootContainerAbove(c);return this._internalDocument.getLineNumber(a)+1},getLineTop:function(a,c){n.checkLineExists(this._internalDocument,a);var b=this._internalDocument.getLineNode(a-
1);return this.getNodeTop(b,c)},getLineHeight:function(a){n.checkLineExists(this._internalDocument,a);return this._internalDocument.getLineNode(a-1).getHeight()},getPreciseLineHeight:function(a){n.checkLineExists(this._internalDocument,a);a=this._internalDocument.getLineNode(a-1);return this.getNodeBottom(a.rootContainer(),!0)-this.getNodeTop(a.rootContainer(),!0)},getCharacterWidthForLine:function(a){a=this._internalDocument.getLineNode(a-1);var c=window.getComputedStyle(a.box);a=c.fontFamily;c=
parseInt(c.fontSize);return s.getNumericCharacterWidthForFontFamilyAndSize(a,c)},getNodeTop:function(a,b){var d=0;if(b)var e=c.getComputedStyle(a.box),d=d+c.get(a.box,"paddingTop",e),d=d+c.get(a.box,"borderTopWidth",e);return this.getCoordinateForDomNode(a.box).y+d},getNodeBottom:function(a,b){var d=0;if(b)var e=c.getComputedStyle(a.box),d=d+c.get(a.box,"paddingBottom",e),d=d+c.get(a.box,"borderBottomWidth",e);e=this.getCoordinateForDomNode(a.box);return e.y+e.height-d},getNodeHeight:function(a,b){return a.getHeight()+
(b?c.get(a.box,"paddingTop")+c.get(a.box,"paddingBottom"):0)},scrollNodeToPercent:function(a,c){this.scrollLineToPercent(this._internalDocument.getLineNumber(a)+1,c)},scrollLineToPercent:function(a,c){n.checkLineExists(this._internalDocument,a);var b=this._internalDocument.getLineNode(a-1).box;this.scrollElementToPercent(b,c)},scrollNearestVisibleLineToPercent:function(a,c){var b=this._getNearestVisibleLineAbove(a);this.scrollLineToPercent(b,c)},scrollElementToPercent:function(a,c){t.assert(t.isDescendant(a,
this.getDomtarget()));if(void 0===c||null===c)c=this._DEFAULT_SCROLL_AMOUNT;var b=(this.getClientHeight()-a.clientHeight)*(c/100);this.setScrollTop(a.offsetTop-b)},getLineAtPercent:function(a){var c=this.getScrollTop(),b=this.getClientHeight();a=this.getLineColumnFromCoordinate({x:0,y:c+b*(a/100)}).line;var d=this.getFirstVisibleLineNumber();a===d&&this.getCoordinateForLineColumn(d,1).y<c&&(a+=1);d=this.getLastVisibleLineNumber();a===d&&(d=this.getCoordinateForLineColumn(d,1),d.y+d.height>c+b&&(a-=
1));return Math.min(this._internalDocument.getMaxLineNumber(),Math.max(1,a))},getPositionAtPercent:function(a){a=this.getLineAtPercent(a);return this._internalDocument.getPositionForLineColumn(a,1)},getLinePercentScrolled:function(a,c,b){n.checkLineExists(this._internalDocument,a);c||n.assert(this.isLineInView(a,b),this._LINE_SHOULD_BE_IN_VIEW);b=this.getCoordinateForLineColumn(a,1);a=b.y;b=b.height;b=this.getClientHeight()-b;var d=this.getScrollTop();a=100*((a-d)/b);isNaN(a)&&(a=0);c||(a=Math.max(Math.min(100,
a),0));return a},getNodePercentScrolled:function(a,c){var b=this._internalDocument.getLineNumber(a)+1;return this.getLinePercentScrolled(b,c)},isNodeInView:function(a,c){n.assert("boolean"===typeof c||"undefined"===typeof c,"Second parameter should be boolean");var b=this._internalDocument.getLineNumber(a)+1;return this.isLineInView(b,c)},isLineInView:function(a,c){n.assert("boolean"===typeof c||"undefined"===typeof c,"Second parameter should be boolean");n.checkLineExists(this._internalDocument,
a);var b=this.getFirstVisibleLineNumber(c),d=this.getLastVisibleLineNumber(c);return a>=b&&a<=d},getVisibleLineNumbers:function(a){var c=this.getFirstVisibleLineNumber(a);a=this.getLastVisibleLineNumber(a);for(var b=[];c<=a;c+=1)this._internalDocument.getLineNode(c-1).box&&b.push(c);return b},isPositionInView:function(a,c){n.assert("boolean"===typeof c||"undefined"===typeof c,"Second parameter should be boolean");n.assert(a,this._POSITION_SHOULD_NOT_BE_NULL);if(!a.isValid())return!1;var b=this.getCoordinateForPosition(a),
d=this.getLineColumnFromCoordinate(b);return!this.isLineInView(d.line,c)?!1:c?b.x>=this.getScrollLeft()&&b.x+b.width<=this.getScrollLeft()+this.getClientWidth():b.x<=this.getScrollLeft()+this.getClientWidth()&&b.x+b.width>=this.getScrollLeft()},getFirstVisibleLineNumber:function(a){n.assert("boolean"===typeof a||"undefined"===typeof a,"Second parameter should be boolean");var c={x:0,y:this._getTopOfView()},c=this.getLineFromCoordinate(c);a&&!this.isLineFullyOnScreen(c)&&(c+=1);return c},getFirstVisibleNode:function(a){a=
this.getFirstVisibleLineNumber(a);return this._internalDocument.getLineNode(a-1)},getLastVisibleLineNumber:function(a){n.assert("boolean"===typeof a||"undefined"===typeof a,"Second parameter should be boolean");var c={x:0,y:this._getBottomOfView()-1},c=this.getLineFromCoordinate(c),b=this._internalDocument.getMaxLineNumber(),c=0<=c?c:b;a&&!this.isLineFullyOnScreen(c)&&(c-=1);return c},getLastVisibleNode:function(a){a=this.getFirstVisibleLineNumber(a);return this._internalDocument.getLineNode(a-1)},
isLineFullyOnScreen:function(a){n.assert("number"===typeof a,a+" is not of type number");a=this._internalDocument.getLineNode(a-1);return this.isNodeFullyOnScreen(a)},isNodeFullyOnScreen:function(a){n.assert(q.isNode(a),a+" is not of type Node");var c=this.getCoordinateForNode(a);a=c.y;c=a+c.height;a=a>=this._getTopOfView();c=c<=this._getBottomOfView();return a&&c},_getTopOfView:function(){return this.getScrollTop()},_getBottomOfView:function(){return this._getTopOfView()+this.getClientHeight()},
getDocumentDimension:function(){return this._viewModel.getDocumentDimension()},scrollLineColumnIntoView:function(a,c,b,d){n.checkLineColumnExists(this._internalDocument,a,c);a=this._internalDocument.getPositionForLineColumn(a,c);return this.scrollPositionIntoView(a,b,d)},scrollPositionIntoView:function(a,c,b){c=c||this._DEFAULT_VERTICAL_PADDING;b=b||this._DEFAULT_HORIZONTAL_PADDING;var d;n.assert(a,this._POSITION_SHOULD_NOT_BE_NULL);if(!a.isValid())return!1;d=this.getCoordinateForPosition(a);d||(a=
a.getNode(),d=this.getCoordinateForNode(a));if(0>d.x||0>d.y)return!1;var e=d.y,f=this.getScrollTop()+c,h=e+d.height,g=this.getScrollTop()+this.getClientHeight()-c;c=e<=f;a=h>=g;var k=h-e>g-f;a&&c&&(c=a=!1);var l=this.getScrollTop();k?a?l-=f-e:c&&(l+=h-g):a?l+=h-g:c&&(l-=f-e);l=Math.max(0,l);this.setScrollTop(l);d=d.x;e=this.getScrollLeft()+b;b=Math.max(0,this.getScrollLeft()+this.getClientWidth()-b);f=d<=e;h=d>=b;g=this.getScrollLeft();h?g+=d-b:f&&(g-=e-d);g=Math.max(0,g);this.setScrollLeft(g);return a||
c||f||h},applyClassToLine:function(a,c){var b=this._internalDocument.getLineNode(a);b&&this._layoutManager.applyClass(b,c)},removeClassFromLine:function(a,c){var b=this._internalDocument.getLineNode(a);b&&this._layoutManager.clearClass(b,c)},removeClassFromAllLines:function(a){for(var c=this._internalDocument.getMaxLineNumber(),b=0;b<c;b+=1)this.removeClassFromLine(b,a)},getCoordinateForLineColumn:function(a,c){n.checkLineColumnExists(this._internalDocument,a,c);var b=this._internalDocument.getPositionForLineColumn(a,
c);return this.getCoordinateForPosition(b)},getLineColumnFromCoordinate:function(a){return(a=this.getPositionFromCoordinate(a))?a.getLineColumn():null},getLineFromCoordinate:function(a){return(a=this.getPositionFromCoordinate(a))?a.getLineColumn().line:-1},fixEvent:function(c){var b,d,e,f,h,g;h=this.getDomtarget();g={target:c.target,pageX:c.pageX,pageY:c.pageY,layerX:c.layerX,layerY:c.layerY,button:c.button,offsetX:c.offsetX};f=a.position(h);d=a.position(document.getElementsByTagName("body")[0]);
b=f.x-d.x;d=f.y-d.y;e=f.w;f=f.h;g.layerX=c.pageX-Math.floor(b);g.layerY=c.pageY-Math.floor(d);g._meta={viewSelectionOffset:{top:d,bottom:d+f,left:b,right:b+e}};if((c=c.target)&&!c.rteNode){for(;c&&c!==h&&c.parentNode&&!c.rteNode;)c=c.parentNode;c===h&&(c=this._internalDocument.root.box)}g.target=c?c:this._internalDocument.root.box;g.offsetX=g.layerX+this.getScrollLeft();return g},isFixedEventOutside:function(a){var c=this.getDomTargetPosition();return 0>a.layerX||0>a.layerY||a.layerX>=c.clientWidth||
a.layerY>=c.clientHeight},getFixedEventDirectionOutside:function(a){var c={x:0,y:0};a.pageX<a._meta.viewSelectionOffset.left?c.x=-1:a.pageX>a._meta.viewSelectionOffset.right&&(c.x=1);a.pageY<a._meta.viewSelectionOffset.top?c.y=-1:a.pageY>a._meta.viewSelectionOffset.bottom&&(c.y=1);return c},getFixedEventPositionAtBorder:function(a){var c={target:a.target,layerX:a.layerX,layerY:a.layerY},b=this.getFixedEventDirectionOutside(a);if(0!==b.x||0!==b.y)0>b.x?c.layerX=0:0<b.x&&(c.layerX=a._meta.viewSelectionOffset.right-
a._meta.viewSelectionOffset.left),0>b.y?c.layerY=0:0<b.y&&(c.layerY=a._meta.viewSelectionOffset.bottom-a._meta.viewSelectionOffset.top),c.target=this._internalDocument.root.box;return this.getPositionFromEvent(c)},getCoordinateFromEvent:function(a){a={x:a.layerX,y:a.layerY};if(h("mozilla")&&0===a.x&&0===a.y)return null;a.x+=this.getScrollLeft();a.y+=this.getScrollTop();return a},getPositionFromEvent:function(a){var c=a.target;a=this.getCoordinateFromEvent(a);return this._coordinateConverter.getPositionFromCoordinate({x:a.x,
y:a.y+1},c.rteNode)},getCoordinateForNode:function(a){return this.getCoordinateForDomNode(a.box)},getCoordinateForLineNumber:function(a){a=this._internalDocument.getLineNode(a);return this.getCoordinateForNode(a)},getDomNodeForLine:function(a){return this._internalDocument.getLineNode(a).box},getCoordinateForDomNode:function(a){if(!a||!this._domTarget.contains(a))return{x:0,y:0,width:0,height:0};a=a.getBoundingClientRect();var c=this._domTarget.getBoundingClientRect(),b=a.left-c.left+this.getScrollLeft(),
c=a.top-c.top+this.getScrollTop();return{x:b,y:c,width:a.width,height:a.height}},getCoordinateForPosition:function(c){var b=c.getNode().box;if(!b||!this._domTarget.contains(b))return this._getCoordinateForInvisiblePosition(c);c=this._coordinateConverter.getCoordinateFromPosition(c);var b=this.getDomtarget(),d=a.position(b);c.x=c.pageX-d.x+b.scrollLeft;return c},_getCoordinateForInvisiblePosition:function(a){var c;n.isAtEndOfFile(a)&&(c=this._getCoordinateForVisualEndOfFile());return c||{x:0,y:0,width:0,
height:0}},_getCoordinateForVisualEndOfFile:function(){var a=this.getDocumentDimension(),a=this.getPositionFromCoordinate({x:a.width,y:a.height});if(!a)return null;a=this.getCoordinateForNode(a.getNode());a.x+=a.width;a.width=1;return a},isValidCoordinate:function(a){return!a||0===a.x&&0===a.y&&0===a.width&&0===a.height?!1:!0},getPositionFromCoordinate:function(a){return this._coordinateConverter.getPositionFromCoordinate({x:a.x,y:a.y+1})},setDraggable:function(a){a||this.setDomTargetDraggable(!1);
this._allowDrag=a},setDomTargetDraggable:function(a){this._allowDrag?this._domTarget.draggable=a:l.assert(!1,"The dom node is not allow to be a draggable object")},isDraggable:function(){return this._allowDrag},isDomTargetDraggable:function(){return this._domTarget.draggable},insertDomNode:function(a,c,b){return this._layoutManager.insertDomNode(a,c,b)?{remove:f.hitch(this._layoutManager,"removeDomNode",a)}:null},setDefaultVerticalPadding:function(a){this._DEFAULT_VERTICAL_PADDING=a}})})},"MW/rtc/view/VisibilityNotifierProvider":function(){define(["dojo/_base/declare",
"dojo/_base/lang","MW/rtc/core/provider/PluginProvider","MW/rtc/view/VisibilityNotifier"],function(g,f,e,d){return g(e,{requires:function(){return{createInstance:[]}},createInstance:function(){return new d}})})},"MW/rtc/view/VisibilityNotifier":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/view/VisibilityNotifiable"],function(g,f,e){return g(e,{onShow:function(){},onHide:function(){}})})},"MW/rtc/view/VisibilityNotifiable":function(){define(["dojo/_base/declare"],function(g){return g(null,
{onShow:function(){throw Error("Unimplemented OnShow  method");},onHide:function(){throw Error("Unimplemented onHide  method");}})})},"MW/rtc/view/coordinateconverter/PlainTextCoordinateConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./PlainTextCoordinateConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.view.rangeconverter.converter.plaintext","rtc.view.viewmodel"]}},createInstance:function(d,b){return new e(d,
b)}})})},"MW/rtc/view/coordinateconverter/PlainTextCoordinateConverter":function(){define(["dojo/_base/declare","MW/rtc/nodes/leaf/PlainTextNode","./base/TextCoordinateConverter"],function(g,f,e){return g(e,{constructor:function(d,b){this._rangeConverter=d;this._viewModel=b},getApplicableNodeClass:function(){return f}})})},"MW/rtc/view/coordinateconverter/RootCoordinateConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./RootCoordinateConverter"],function(g,
f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/view/coordinateconverter/RootCoordinateConverter":function(){define(["dojo/_base/declare","MW/rtc/nodes/inner/RootNode","MW/rtc/view/ViewUtilities","./CoordinateConverterUtilities","./base/VerticalAlignCoordinateConverter"],function(g,f,e,d,b){return g(b,{constructor:function(){},getApplicableNodeClass:function(){return f},getClosestRect:function(a,c,b){var f=this.inherited(arguments);
if(!f){var g=a.children[0],f=this.getDomNode(g).getBoundingClientRect();f.associatedNode=g;return f}d.isCoordinateRightOfRect(c,f)&&(g=e.getLineage(f.associatedNode),f.associatedNode=g[0]);return f},_chooseUpOrDownRect:function(a,c,b){return!d.isCoordinateRightOfRect(a,c)?this.inherited(arguments):e.getLineage(c.associatedNode)[0]!==c.associatedNode?c:this.inherited(arguments)}})})},"MW/rtc/view/coordinateconverter/CoordinateConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"./CoordinateConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.view.viewmodel","rtc.view.coordinateconverter.converter"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MW/rtc/view/coordinateconverter/CoordinateConverter":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractConverterPlugin","./CoordinateConverterUtilities","./base/BaseCoordinateConverter"],function(g,f,e,d){return g(f,{CONVERTER_PLUGIN_NAME:"CoordinateConverter",
constructor:function(b,a,c){this._internalDocument=b;this._viewModel=a;this._baseConverter=new d;this._createConverterMap(c)},getPositionFromCoordinate:function(b,a){var c;b=e.convertFromOffsetToClient(b,this._viewModel);a=a||this._internalDocument.root;do{var d=this._getPositionFromCoordinate(b,a);if(d)c=d,a=d.getNode();else break}while(a.children&&0<a.children.length);return c},_getPositionFromCoordinate:function(b,a){var c=this._getConverter(a),d=this._getRectsRetriever.bind(this),c=c.getClosestRect(a,
b,d);if(!c)return null;var d=c.associatedNode,f=this._getConverter(d);b=e.getProjectedCoordinate(b,c);return f.getPositionFromCoordinate(b,d)},_getRectsRetriever:function(b){return this._getConverter(b).getClientRects(b)},getCoordinateFromPosition:function(b){for(;b;){var a=this._getConverter(b.getNode()),c=a.getCoordinateFromPosition(b);if(c)return c;b=a.getDelegatedPositionForCoordinate(b)}return{x:0,y:0,width:0,height:0,pageX:0}},_getConverter:function(b){return this.inherited(arguments)||this._baseConverter}})})},
"MW/rtc/view/decoration/DecorationProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./Decoration"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument","rtc.view","rtc.view.decoration.viewmodel","rtc.view.decoration.layerviewmodel"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"MW/rtc/view/decoration/Decoration":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/browsersupport/BrowserSupportUtilities MW/rtc/model/DocumentEventUtilities MW/rtc/model/RangeUtilities MW/rtc/view/ViewEventUtilities MW/rtc/view/decoration/DecorationUtilities MW/rtc/view/decoration/Decorator MW/rtc/view/decoration/LayerDecorator".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m){return g(d,{constructor:function(a,c,d,h){this._internalDocument=a;this._rtcView=c;this._inlineViewModel=d;this._layerViewModel=h;this._decoratorToLineNumberMap=b.createMap();this._decoratorLayerMap=b.createMap();this.own(e.after(a,"onDocumentChanged",f.hitch(this,"_handleDocumentChanged"),!0),e.after(a,"onDocumentReset",f.hitch(this,"_handleDocumentReset")),e.after(d,"onDecorationUpdate",f.hitch(this,"_handleDecorationUpdate"),!0),e.after(h,"onLayerDecoratorUpdate",
f.hitch(this,"_handleLayerDecorationUpdate"),!0),e.after(c,"onViewUpdated",f.hitch(this,"_handleViewUpdated"),!0));this._cachedDocumentWidth=0;this._resetPendingList();this._resetPendingLayerList();this._resetPendingLayerDecorators()},_handleDocumentChanged:function(a){0<this._pendingRanges.length&&this._applyChanges();0<this._pendingLayerDecorators.length&&this._applyLayerChanges(a)},_handleDocumentReset:function(){this._resetPendingList();this._resetPendingLayerDecorators();this._decoratorToLineNumberMap.clear()},
createDecorator:function(a,c){void 0===c&&(c=!1);return new l(this._inlineViewModel,a,f.hitch(this,"_applyChanges",c))},_applyChanges:function(a){this._getPendingNodes().forEach(this._rtcView.refreshNode,this._rtcView);this._pendingRanges.forEach(function(a){var c=a.getStartPosition().getLineColumn().line-1;a=a.getEndPosition().getLineColumn().line-1;this._rtcView.onLinesDOMUpdated(c,a,!1)},this);if(a&&0<this._pendingRanges.length)this._rtcView.onViewUpdated([h.createEvent(h.EVENTS.renderUpdate)]);
this._resetPendingList()},_getPendingNodes:function(){return Object.keys(this._pendingNodes).map(function(a){return this._pendingNodes[a]},this)},_resetPendingList:function(){this._pendingNodes={};this._pendingRanges=[]},_handleDecorationUpdate:function(a){a.forEach(this._addPendingRange,this)},_addPendingRange:function(a){this._pendingRanges.push(a);c.nodesInRange(a).forEach(this._addPendingNode,this)},_addPendingNode:function(a){this._pendingNodes[a.uid]||(this._pendingNodes[a.uid]=a)},createLayerDecorator:function(a,
c){var b=this._applyLayerChanges.bind(this),b=new m(this._layerViewModel,b,a,c),d=k.createNewLayerForDecorator(b,this._layerViewModel,this._rtcView);this._rtcView.addLayer(d);this._decoratorLayerMap.set(b,d);return b},_applyLayerChanges:function(a){this._pendingLayerDecorators.forEach(function(c){var b=this._decoratorLayerMap.get(c),d=k.createNewLayerForDecorator(c,this._layerViewModel,this._rtcView);this._rtcView.switchLayer(d,b);this._decoratorLayerMap.set(c,d);this._getNodesToRefreshForLayerDecorator(c,
a).forEach(this._addPendingLayerNode,this)},this);this._resetPendingLayerDecorators();this._refreshPendingLayerNodes();this._resetPendingLayerList()},_refreshPendingLayerNodes:function(){this._getPendingLayerNodes().forEach(function(a){this._rtcView.refreshNode(a);a=a.startPosition();null!==a&&(a=a.getLine()-1,this._rtcView.onLinesDOMUpdated(a,a,!0))},this)},_getNodesToRefreshForLayerDecorator:function(c,b){var d=[];this._decoratorToLineNumberMap.has(c)&&(d=this._decoratorToLineNumberMap.get(c));
var e=[],f=this._layerViewModel.getDescriptorsForLayerDecorator(c);null!==f&&(e=f.map(function(a){return a.getRange().getStartPosition().getLine()},this));var f=d.filter(function(a){return 0>e.indexOf(a)},this),h=e.filter(function(a){return 0>d.indexOf(a)},this);this._decoratorToLineNumberMap.set(c,e);f=f.concat(h).map(this._getLineNodeForLineNumber.bind(this));f=f.filter(function(a){return a});h=a.getLineNodesFromEvents(b,this._internalDocument).map(function(a){return a.rootContainer()});return f.concat(h)},
_getLineNodeForLineNumber:function(a){return this._internalDocument.getLineNode(a-1)},_addPendingLayerNode:function(a){this._pendingLayerNodes[a.uid]||(this._pendingLayerNodes[a.uid]=a)},_getPendingLayerNodes:function(){return Object.keys(this._pendingLayerNodes).map(function(a){return this._pendingLayerNodes[a]},this)},_resetPendingLayerList:function(){this._pendingLayerNodes={}},_resetPendingLayerDecorators:function(){this._pendingLayerDecorators=[]},_handleLayerDecorationUpdate:function(a){-1===
this._pendingLayerDecorators.indexOf(a)&&this._pendingLayerDecorators.push(a)},_handleViewUpdated:function(a){if(h.hasSizingEvent(a)||h.hasLayoutEvent(a)||this._cachedDocumentWidth!==this._rtcView.getDocumentDimension().width)this._cachedDocumentWidth=this._rtcView.getDocumentDimension().width,this._redrawAllLayerDecorators()},_redrawAllLayerDecorators:function(){this._decoratorLayerMap.forEach(function(a,c){var b=k.createNewLayerForDecorator(c,this._layerViewModel,this._rtcView);this._rtcView.switchLayer(b,
a);this._decoratorLayerMap.set(c,b)},this)},destroy:function(){this.inherited(arguments);this._resetPendingList();this._resetPendingLayerList();this._resetPendingLayerDecorators();this._decoratorLayerMap.clear();this._decoratorToLineNumberMap.clear()}})})},"MW/rtc/view/decoration/Decorator":function(){define(["dojo/_base/declare"],function(g){return g(null,{constructor:function(f,e,d){this._viewModel=f;this._priority=e||0;this._applyChangesCallback=d},updateClasses:function(f,e){this._viewModel.updateClasses(f,
e,this)},addClasses:function(f){this._viewModel.addClasses(f,this)},addClass:function(f,e){this._viewModel.addClass(f,e,this)},removeClass:function(f,e){this._viewModel.removeClass(f,e,this)},setStyle:function(f,e,d){this._viewModel.setStyle(f,e,d,this)},removeStyle:function(f,e){this._viewModel.removeStyle(f,e,this)},addDomNode:function(f,e,d){this._viewModel.addDomNode(e,f,d,this)},removeDomNode:function(f,e,d){this._viewModel.removeDomNode(e,f,d,this)},clearRange:function(f){this._viewModel.clearRange(f,
this)},applyChanges:function(){this._applyChangesCallback()},priority:function(){return this._priority}})})},"MW/rtc/view/decoration/LayerDecorator":function(){define(["dojo/_base/declare","MW/rtc/model/CodeUtilities","mw-log/Log"],function(g,f,e){return g(null,{constructor:function(d,b,a,c){this._viewModel=d;this._applyChangesCallback=b;this._layerCssClass=a||"";this._lineNodeCSSClass=c||""},getLayerCssClass:function(){return this._layerCssClass},getLineNodeCssClass:function(){return this._lineNodeCSSClass},
addClasses:function(d){d.forEach(function(b){this.addClass(b.range,b.classList)},this)},addClass:function(d,b){e.assert(f.isCodeRange(d.getStartPosition().getNode(),d.getEndPosition().getNode()),"Layer decorator class should only be applied to code range");this._viewModel.addLayerClass(d,b,this)},removeClass:function(d,b){this._viewModel.removeLayerClass(d,b,this)},setStyle:function(d,b){this._viewModel.setLayerStyle(d,b,this)},removeStyle:function(d,b){this._viewModel.removeStyle(d,b,this)},clearRange:function(d){this._viewModel.clearLayerRange(d,
this)},applyChanges:function(){this._applyChangesCallback()}})})},"MW/rtc/view/decoration/LayerDecoratorMarginDecoratorProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/view/decoration/LayerDecoratorMarginDecorator"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.view.decoration.layerviewmodel","rtc.view","rtc.internaldocument"]}},createInstance:function(d,b,a){return e(d,b,
a)}})})},"MW/rtc/view/decoration/LayerDecoratorMarginDecorator":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-attr dojo/dom-class dojo/dom-construct dojo/dom-style mw-log/Log MW/rtc/browsersupport/BrowserSupportUtilities MW/rtc/margin/AbstractLineMarginDecorator MW/rtc/view/ViewUtilities".split(" "),function(g,f,e,d,b,a,c,h,k,l,m){return g(l,{_DEFAULT_WIDTH:16,_BASE_CSS_CLASS:"marginLineHighlight",constructor:function(a,c,b){this._decorationViewModel=a;this._view=c;this._internalDocument=
b;this._pendingDecoratorListeners=k.createMap();this.own(e.after(this._decorationViewModel,"onLayerDecoratorUpdate",f.hitch(this,"_handleLayerDecorationChanged"),!0))},hasLayerForLineNumber:function(a,c){return this._decorationViewModel.hasLayerDecorationForLineNumber(a+1)},createDecorationForLineNumber:function(c,b){var d=a.create("div"),e=c+1,f=this._decorationViewModel.getLayerCssClassesArrayForLineNumber(e),h=this._decorationViewModel.getLayerStylesArrayForLineNumber(e),e=this._internalDocument.getPositionForLineColumn(e,
1),e=m.getVerticalDimensionsBetweenPositions(e,e,this._view),g=e.bottom-e.top;f.forEach(function(b,e){var f=a.create("div",{style:{height:g+"px"}},d);this._applyStyle(f,b,h[e],c)},this);return d},_applyStyle:function(a,d,e,f){d=d.slice();d.push(this._BASE_CSS_CLASS);var h=d.join(" ");b.add(a,h);c.set(a,e);this._addTestTag(a,d,f)},_addTestTag:function(a,c,b){b=c&&0<c.length?b+"_"+c.join("_"):b+"_invalid";d.set(a,"data-testid",b)},_handleLayerDecorationChanged:function(a){if(!this._pendingDecoratorListeners.has(a)){var c=
e.after(a,"applyChanges",this._handleDecoratorChangesApplied.bind(this,a));this._pendingDecoratorListeners.set(a,c)}},_handleDecoratorChangesApplied:function(a){this._pendingDecoratorListeners.get(a).remove();this._pendingDecoratorListeners.delete(a);this.onUpdate()},getWidth:function(){return this._DEFAULT_WIDTH}})})},"MW/rtc/view/decoration/viewmodel/DecorationDescriptorsStoreProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./DecorationDescriptorsStore"],
function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/view/decoration/viewmodel/DecorationDescriptorsStore":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin","MW/rtc/browsersupport/BrowserSupportUtilities","MW/rtc/model/PositionUtilities","MW/rtc/model/RangeUtilities"],function(g,f,e,d,b){return g(f,{constructor:function(){this._descriptorMap=e.createMap()},add:function(a){var c=this._getKeyForDescriptor(a);
this._descriptorMap.set(c,a)},remove:function(a){this._destroyDescriptor(a);this._removeFromMap(a)},clear:function(){this._clearMap()},classesEqualToByRange:function(a,c,d){var e=this._getRangeDescriptionMapForDecorator(a,d);return 0===c.length&&0===Object.keys(e).length?!0:!(c.some(function(a){return b.rangeIterator(a.range,function(c,b,d){c=e[this._getKeyForNode(c)];return!c||!this._compareClassesAndEliminate(c,b,d,a.classList)}.bind(this))},this)||this._hasResidualsInRangeDecorationMap(e))},_compareClassesAndEliminate:function(a,
c,b,d){for(;c<b;c+=1){var e=a[c];if(!e||!e.classesEqualTo(d))return!1;delete a[c]}return!0},_hasResidualsInRangeDecorationMap:function(a){return Object.keys(a).some(function(c){return 0<Object.keys(a[c]).length},this)},_getRangeDescriptionMapForDecorator:function(a,c){var b={};this.getForRange(a).forEach(function(a){var d=a.getAtomicDescriptor(c);if(d){var e=a.getRange().getStartPosition().getNode(),f=this._getKeyForNode(e),e=b[f];e||(e={},b[f]=e);f=a.getStartOffset();for(a=a.getEndOffset();f<a;f+=
1)e[f]=d}},this);return b},getForRange:function(a){var c=[];b.rangeIterator(a,function(a,b,d){c=0===b&&d===a.maxOffset()?c.concat(this.getForNode(a)):c.concat(this.getInNode(a,b,d))}.bind(this));return c},getForNode:function(a){var c=[];d.getPositions(a).forEach(function(a){(a=this.getForPosition(a))&&c.push(a)},this);return c.sort(function(a,c){return a.getStartOffset()-c.getStartOffset()})},getForPosition:function(a){return this._descriptorMap.get(a)},getInNode:function(a,c,b){return this.getForNode(a).filter(function(a){var d=
a.getStartOffset();a=a.getEndOffset();return d>=c&&d<b||a>c&&a<=b||d<c&&a>b},this)},_removeFromMap:function(a){a=this._getKeyForDescriptor(a);this._descriptorMap["delete"](a)},_getKeyForDescriptor:function(a){return a.getRange().getStartPosition()},_getKeyForNode:function(a){return a.uid},_clearMap:function(){this._descriptorMap.forEach(this._destroyDescriptor,this);this._descriptorMap.clear()},_destroyDescriptor:function(a){a.destroy()},destroy:function(){this.inherited(arguments);this.clear()}})})},
"MW/rtc/view/decoration/viewmodel/DecorationLayerViewModelProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./DecorationLayerViewModel"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument"]}},createInstance:function(d){return new e(d)}})})},"MW/rtc/view/decoration/viewmodel/DecorationLayerViewModel":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/model/CodeUtilities MW/rtc/view/decoration/viewmodel/DecorationRangeDescriptor MW/rtc/view/decoration/viewmodel/LayerDecoratorDescriptorStore".split(" "),
function(g,f,e,d,b,a,c){return g(d,{constructor:function(a){this._internalDocument=a;this._layerDecoratorDescriptorsStore=new c;this.own(e.after(this._internalDocument,"onDocumentReset",f.hitch(this,"_handleDocumentReset")))},_handleDocumentReset:function(){this._layerDecoratorDescriptorsStore.clear()},getAllLayerDecoratorsForRange:function(a){return this._layerDecoratorDescriptorsStore.getAllDecoratorsForRange(a)},getLayerDecoratorsLineNodeCSSForRange:function(a){return this.getAllLayerDecoratorsForRange(a).map(function(a){return a.getLineNodeCssClass()}).join(" ")},
hasLayerDecorationForLineNumber:function(a){a=this._internalDocument.getRangeForLine(a);if(!this._isValidRangeForLineNumberSearch(a))return!1;a=this._getAllLayerDescriptorsForRange(a);for(var c=0;c<a.length;c+=1){var b=a[c].getClasses();if(0<Object.keys(b).length)return!0}return!1},_getAllLayerDescriptorsForRange:function(a){var c=[];this._layerDecoratorDescriptorsStore.getAllDecoratorsForRange(a).forEach(function(b){c.push(this._layerDecoratorDescriptorsStore.getDescriptorForRange(a,b))},this);return c},
getLayerCssClassesArrayForLineNumber:function(a){var c=[];a=this._internalDocument.getRangeForLine(a);if(!this._isValidRangeForLineNumberSearch(a))return c;this._getAllLayerDescriptorsForRange(a).forEach(function(a){a=a.getClasses();a=Object.keys(a);c.push(a)},this);return c},getLayerStylesArrayForLineNumber:function(a){var c=[];a=this._internalDocument.getRangeForLine(a);this._getAllLayerDescriptorsForRange(a).map(function(a){a=a.getStyles();c.push(a)},this);return c},addLayerClass:function(a,c,
b){var d=a.getStartPosition();a=a.getEndPosition();d.setPosition(d.getNode(),0);a.setPosition(d.getNode(),d.getNode().maxOffset());var e=this._createLayerDescriptor({startPosition:d,endPosition:a});c.forEach(function(a){e.addClass(a,b)},this);this._configureLayerRangeDescriptor(e,b)},removeLayerClass:function(a,c,b){var d=a.getStartPosition(),e=a.getEndPosition();d.setPosition(d.getNode(),0);e.setPosition(d.getNode(),d.getNode().maxOffset());var f=this._layerDecoratorDescriptorsStore.getDescriptorForRange(a,
b);c.forEach(function(a){f.removeClass(a,b)},this);this.onLayerDecoratorUpdate(b)},setLayerStyle:function(a,c,b){var d=this._createLayerRangeDescriptor(a);Object.keys(c).forEach(function(a){d.setStyle(a,c[a],b)},this);this._configureLayerRangeDescriptor(d,b)},_createLayerRangeDescriptor:function(a){var c=a.getStartPosition();a=a.getEndPosition();c.setPosition(c.getNode(),0);a.setPosition(c.getNode(),c.getNode().maxOffset());return this._createLayerDescriptor({startPosition:c,endPosition:a})},_configureLayerRangeDescriptor:function(a,
c){a.addChangeListener(this._handleLayerDescriptorChanged.bind(this,a,c));this._layerDecoratorDescriptorsStore.add(c,a);this.onLayerDecoratorUpdate(c)},getDescriptorsForLayerDecorator:function(a){return this._layerDecoratorDescriptorsStore.get(a)},clearLayerRange:function(a,c){this._layerDecoratorDescriptorsStore.clearRange(a,c);this.onLayerDecoratorUpdate(c)},_createLayerDescriptor:function(c){c.startPosition.setLive(!0);c.endPosition.setLive(!0);return new a(c)},_handleLayerDescriptorChanged:function(a,
c,b){b.hasOwnProperty("columnHasChanged")?this._handleActivePositionUpdateForLayer(a,c,b):this._handlePositionUpdateForLayer(a,c)},_handlePositionUpdateForLayer:function(a,c){var d=a.getRange(),e=d.getStartPosition().getNode();b.isCodeContainer(e)||this._clearRangeFromDecoratorAndUpdate(d,c)},_handleActivePositionUpdateForLayer:function(a,c,b){var d=a.getRange(),e=this._isRangeStartEndEqual(d);a=a.getStartOffset()>a.getEndOffset();e=e||a;b.columnHasChanged&&(!b.lineHasChanged&&1===d.getEndPosition().getColumn())&&
(e=!1);if(e)this._clearRangeFromDecoratorAndUpdate(d,c);else if(b.lineHasChanged)this.onLayerDecoratorUpdate(c)},_clearRangeFromDecoratorAndUpdate:function(a,c){this._layerDecoratorDescriptorsStore.clearRange(a,c);this.onLayerDecoratorUpdate(c)},_isRangeStartEndEqual:function(a){return a.getStartPosition().isEqualTo(a.getEndPosition())},_isValidRangeForLineNumberSearch:function(a){return a.getStartPosition().getNode().rootContainer()===a.getEndPosition().getNode().rootContainer()},onLayerDecoratorUpdate:function(a){},
destroy:function(){this.inherited(arguments);this._layerDecoratorDescriptorsStore.clear()}})})},"MW/rtc/view/decoration/viewmodel/LayerDecoratorDescriptorStore":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/abstract/AbstractPlugin","MW/rtc/browsersupport/BrowserSupportUtilities","MW/rtc/model/PositionUtilities"],function(g,f,e,d,b){return g(e,{constructor:function(){this._descriptorMap=d.createMap()},add:function(a,c){var b=this._descriptorMap.get(a);if(b){var d=this.getDescriptorForRange(c.getRange(),
a);d?this._mergeClasses(d,c,a):b.push(c)}else b=[c],this._descriptorMap.set(a,b)},_mergeClasses:function(a,c,b){c=c.getDescriptorMap().get(b).getClasses();for(var d in c)c.hasOwnProperty(d)&&a.addClass(d,b)},getDescriptorForRange:function(a,c){var d=this._descriptorMap.get(c);if(!d)return null;for(var e=0;e<d.length;e++){var f=d[e],g=f.getRange().getStartPosition(),p=a.getStartPosition(),n=a.getEndPosition();if(0>=b.comparePositions(p,g)&&0<=b.comparePositions(n,g))return f}return null},get:function(a){return this._descriptorMap.has(a)?
this._descriptorMap.get(a):null},getAllDecoratorsForRange:function(a){var c=a.getStartPosition(),d=a.getEndPosition(),e=[];this._descriptorMap.forEach(function(a,f){a.some(function(a){a=a.getRange().getStartPosition();if(0>=b.comparePositions(c,a)&&0<=b.comparePositions(d,a))return e.push(f),!0},this)},this);return e},clearRange:function(a,c){var b=this.getDescriptorForRange(a,c);if(null!==b){var d=this._descriptorMap.get(c),b=d.indexOf(b);d.splice(b,1)}a.destroy()},clear:function(){this._clearMap()},
_clearMap:function(){this._descriptorMap.forEach(this._destroyDescriptors,this);this._descriptorMap.clear()},_destroyDescriptors:function(a){a.forEach(this._destroyDescriptor,this)},_destroyDescriptor:function(a){a.destroy()},destroy:function(){this.inherited(arguments);this._clearMap()}})})},"MW/rtc/view/decoration/viewmodel/DecorationViewModelProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./DecorationViewModel"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument",
"rtc.view.decoration.descriptorsstore"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/view/decoration/viewmodel/DecorationViewModel":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/abstract/AbstractPlugin MW/rtc/model/CodeUtilities MW/rtc/model/DocumentUtilities MW/rtc/model/Position MW/rtc/model/RangeUtilities MW/rtc/view/decoration/DecorationUtilities MW/rtc/view/decoration/viewmodel/DecorationRangeDescriptor".split(" "),function(g,f,e,d,b,a,c,h,k,l){return g(d,
{constructor:function(a,c){this._internalDocument=a;this._descriptorsStore=c;this.own(e.after(this._internalDocument,"onDocumentReset",f.hitch(this,"_handleDocumentReset")))},_handleDocumentReset:function(){this._descriptorsStore.clear()},getDecoration:function(a){var c=this._descriptorsStore.getForNode(a),b=[];if(this._invalidDescriptorsForNode(c,a))return b;c.forEach(function(a){if(!this._isRangeDescriptorPositionsInvalidOrFlipped(a)){var c=a.getStartOffset(),d=a.getEndOffset();b.push({start:c,
end:d,styles:a.getStyles(),classes:a.getClasses(),domNodes:a.getDomNodes()})}},this);return b},_invalidDescriptorsForNode:function(a,c){var b=c.maxOffset(),d=0;return a.some(function(a){var c=a.getStartOffset();a=a.getEndOffset();if(c<d||a>b||c>a)return!0;d=a},this)},updateClasses:function(a,c,b){this._descriptorsStore.classesEqualToByRange(a,c,b)||(this.clearRange(a,b),this.addClasses(c,b))},addClasses:function(a,c){a.forEach(function(a){this.addClass(a.range,a.classList,c)},this)},addClass:function(a,
c,b){this._addDecoration(a,function(a){a.forEach(function(a){c.forEach(function(c){a.addClass(c,b)},this)},this)})},removeClass:function(a,c,b){this._removeDecoration(a,function(a){return a.filter(function(a){var d=!1;c.forEach(function(c){d=a.removeClass(c,b)||d},this);return d},this)})},setStyle:function(a,c,b,d){this._addDecoration(a,function(a){a.forEach(function(a){a.setStyle(c,b,d)},this)})},removeStyle:function(a,c,b){this._removeDecoration(a,function(a){return a.filter(function(a){return a.removeStyle(c,
b)},this)})},addDomNode:function(a,c,b,d){var e,f;switch(b){case k.PLACEMENT.BEFORE:e=a.getStartPosition();f="first";break;case k.PLACEMENT.AFTER:e=a.getEndPosition();f="last";break;case k.PLACEMENT.BETWEEN:e=a.getStartPosition(),f="last"}this._addDecoration(a,function(a){a=this._getDescriptorForDomNodeLocation(a,b);null!==a&&a.addDomNode(c,e,f,d)}.bind(this))},removeDomNode:function(a,c,b,d){this._removeDecoration(a,function(a){var e=[];a=this._getDescriptorForDomNodeLocation(a,b);null!==a&&a.removeDomNode(c,
d)&&e.push(a);return e}.bind(this))},_getDescriptorForDomNodeLocation:function(a,c){if(1>a.length)return null;var b=0;c===k.PLACEMENT.AFTER&&(b=a.length-1);return a[b]},clearRange:function(a,c){this._removeDecoration(a,function(a){return a.filter(function(a){if(a.clear(c))return!0},this)})},_addDecoration:function(a,c){if(this._isRangeExpected(a)){var b=this._prepareDescriptorsForRange(a,!0);c(b);b.forEach(this._mergeForSiblingDescriptors,this);this.onDecorationUpdate([a])}},_removeDecoration:function(a,
c){if(this._isRangeExpected(a)){var b=this._prepareDescriptorsForRange(a,!1),d=this._applyCallbackAndGetRemovedRanges(b,c);b.forEach(this._mergeForSiblingDescriptors,this);b.forEach(this._cleanupForSiblingDescriptors,this);this.onDecorationUpdate(d)}},_applyCallbackAndGetRemovedRanges:function(a,c){return c(a).map(function(a){return a.getRange()})},_prepareDescriptorsForRange:function(a,c){this._updateDescriptorsRange(a);var b=a.getStartPosition().getNode(),d=a.getStartPosition().getOffset(),e=a.getEndPosition().getNode(),
f=a.getEndPosition().getOffset();b===e?this._prepareDescriptorsInNode(b,d,f,c):(this._prepareDescriptorsInNode(b,d,b.maxOffset(),c),b.nextNode()!==e&&this._prepareDescriptorsBetweenNodes(b.nextNode(),e.prevNode(),c),this._prepareDescriptorsInNode(e,0,f,c));return this._descriptorsStore.getForRange(a)},_updateDescriptorsRange:function(a){var c=[];this._descriptorsStore.getForRange(a).forEach(function(a){var b=a.getRange();h.rangeIsInsideOneNode(b)||(a=this._handleRangeChangeAcrossNodes(a),c=c.concat(a))},
this);this.onDecorationUpdate(c)},_prepareDescriptorsBetweenNodes:function(a,c,b){for(;a;){this._prepareDescriptorsInNode(a,0,a.maxOffset(),b);if(a===c)break;a=a.nextNode()}if(a!==c)throw Error("The input startNode and endNode don't seem to span a range");},_prepareDescriptorsInNode:function(a,c,b,d){var e=this._descriptorsStore.getInNode(a,c,b);if(0===e.length)d&&this._createAndAddDescriptor(a,c,b);else{var f,h;d&&e.forEach(function(c){f=c.getStartOffset();f>h&&this._createAndAddDescriptor(a,h,f);
h=c.getEndOffset()},this);var g=e[e.length-1],k=g.getStartOffset(),l=g.getEndOffset();b>k&&b<l?this._split(g,b):d&&l<b&&this._createAndAddDescriptor(a,l,b);b=e[0];e=b.getStartOffset();g=b.getEndOffset();c>e&&c<g?this._split(b,c):d&&c<e&&this._createAndAddDescriptor(a,c,e)}},_createAndAddDescriptor:function(a,b,d,e){if(b>=d)return null;b=new c(a,b);a=new c(a,d);e=e||{};f.mixin(e,{startPosition:b,endPosition:a});e=this._createDescriptor(e);e.addChangeListener(this._handleDescriptorChanged.bind(this,
e));this._descriptorsStore.add(e);return e},_createDescriptor:function(a){a.startPosition.setRightAligned(!0);a.startPosition.setLive(!0);a.endPosition.setLive(!0);return new l(a)},_split:function(a,c){var b=a.getStartNode(),d=a.cloneSettings(),e=a.getEndOffset();a.adjust(c);return this._createAndAddDescriptor(b,c,e,d)},_mergeForSiblingDescriptors:function(a){a=a.getStartNode();a=this._descriptorsStore.getForNode(a);this._merge(a)},_merge:function(a){for(var c=0;c<a.length-1;){var b=a[c],d=a[c+1];
b.canMerge(d)?(b.merge(d),a.splice(c+1,1),this._descriptorsStore.remove(d)):c+=1}},_cleanupForSiblingDescriptors:function(a){a=a.getStartNode();a=this._descriptorsStore.getForNode(a);this._cleanup(a)},_cleanup:function(a){a.filter(function(a){return!a.hasDecoration()}).forEach(this._descriptorsStore.remove,this._descriptorsStore)},_handleDescriptorChanged:function(a){var c=a.getRange(),b=this._isRangeStartEndEqual(c),d=h.rangeIsInsideOneNode(c),e=d&&a.getStartOffset()>a.getEndOffset();b||e?(this._descriptorsStore.remove(a),
this.onDecorationUpdate([c])):(a=d?this._handleRangeChangeInNode(a):this._handleRangeChangeAcrossNodes(a),this.onDecorationUpdate(a))},_handleRangeChangeAcrossNodes:function(a){var c=[],b=a.getStartNode(),d=a.getEndNode(),e=a.getEndOffset();if(this._isRangeDescriptorPositionsInvalidOrFlipped(a))return this._descriptorsStore.remove(a),c;b=b.maxOffset();a.adjust(b);c.push(a.getRange());0<e&&(a=a.cloneSettings(),d=this._createAndAddDescriptor(d,0,e,a),c.push(d.getRange()));return c},_isRangeDescriptorPositionsInvalidOrFlipped:function(c){var b=
c.getRange(),d=c.getStartNode();c=c.getEndNode();return!b.getStartPosition().isValid()||!b.getEndPosition().isValid()||-1===a.nodesInOrder(d,c)},_handleRangeChangeInNode:function(a){this._mergeForSiblingDescriptors(a);return[a.getRange()]},_isRangeExpected:function(a){if(a.getStartPosition().isLinePosition()||a.getEndPosition().isLinePosition())throw Error("Input range for decoration cannot be line positions");return this._isRangeStartEndEqual(a)?!1:!0},_isRangeStartEndEqual:function(a){return a.getStartPosition().isEqualTo(a.getEndPosition())},
onDecorationUpdate:function(a){}})})},"MW/rtc/view/hidden/HiddenNodeModelProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./HiddenNodeModel"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},"MW/rtc/view/hidden/HiddenNodeModel":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractPlugin","MW/rtc/browsersupport/BrowserSupportUtilities","MW/rtc/model/NodeUtilities"],function(g,
f,e,d){return g(f,{constructor:function(){this._hiddenNodes=e.createWeakSet()},setHidden:function(b){if(this.isHidden(b))return null;this._hiddenNodes.add(b);return b},setVisible:function(b){var a=null;d.getLineageReverse(b).forEach(function(c){this._hiddenNodes.delete(c)&&(a=c)},this);return a},isHidden:function(b){return d.getLineageReverse(b).some(function(a){return this._hiddenNodes.has(a)},this)}})})},"MW/rtc/view/hidden/HiddenNodeServiceProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"./HiddenNodeService"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.view.hidden.hiddennodemodel","rtc.view"]}},createInstance:function(d,b){return new e(d,b)}})})},"MW/rtc/view/hidden/HiddenNodeService":function(){define(["dojo/_base/declare","dojo/aspect","MW/rtc/abstract/AbstractPlugin"],function(g,f,e){return g(e,{constructor:function(d,b){this._hiddenNodeModel=d;this._view=b;this._pendingEvent=!1},hide:function(d){this._hideAndPrepareEvent(d);this._firePendingEvent()},
show:function(d){this._showAndPrepareEvent(d);this._firePendingEvent()},hideAll:function(d){d.forEach(this._hideAndPrepareEvent,this);this._firePendingEvent()},showAll:function(d){d.forEach(this._showAndPrepareEvent,this);this._firePendingEvent()},_hideAndPrepareEvent:function(d){this._setAndPrepareEvent(this._hiddenNodeModel.setHidden.bind(this._hiddenNodeModel),d)},_showAndPrepareEvent:function(d){this._setAndPrepareEvent(this._hiddenNodeModel.setVisible.bind(this._hiddenNodeModel),d)},_setAndPrepareEvent:function(d,
b){var a=d(b);this._layoutNode(a)},_layoutNode:function(d){d&&(this._view.layoutNode(d),this._pendingEvent=!0)},_firePendingEvent:function(){this._pendingEvent&&(this._view.onLayoutChange(),this._pendingEvent=!1)}})})},"MW/rtc/view/rangeconverter/PlainTextRangeConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./PlainTextRangeConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:[]}},createInstance:function(){return new e}})})},
"MW/rtc/view/rangeconverter/PlainTextRangeConverter":function(){define(["dojo/_base/declare","MW/rtc/nodes/leaf/PlainTextNode","./base/TextRangeConverter"],function(g,f,e){return g(e,{constructor:function(){},getApplicableNodeClass:function(){return f}})})},"MW/rtc/view/rangeconverter/RangeConverterProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./RangeConverter"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.view.rangeconverter.converter"]}},
createInstance:function(d){return new e(d)}})})},"MW/rtc/view/rangeconverter/RangeConverter":function(){define(["dojo/_base/declare","MW/rtc/abstract/AbstractConverterPlugin"],function(g,f){return g(f,{CONVERTER_PLUGIN_NAME:"RangeConverter",constructor:function(e){this._createConverterMap(e)},getRangeFromPosition:function(e){var d=e.getNode();return(d=this._getConverter(d))?d.getRangeFromPosition(e):null},getContainerForPosition:function(e,d){var b=e.getNode();return(b=this._getConverter(b))?b.getContainerForPosition(e,
d):null}})})},"MW/rtc/core/PluginResolver":function(){define("dojo/_base/declare mw-utils/Utils mw-log/Log MW/rtc/core/_dependencyinjector/CachedDependencyInjector MW/rtc/core/_dependencyinjector/LayerableDependencyInjector MW/rtc/core/_dependencyinjector/RegistryBasedDependencyInjector MW/rtc/core/_dependencyinjector/SubsystemDependencyError MW/rtc/core/provider/SubsystemPluginsProviderFactory MW/rtc/core/provider/SubsystemPluginsProviderUtilities".split(" "),function(g,f,e,d,b,a,c,h,k){return g(null,
{_DEFAULT_SUBSYSTEM_ID:"rtc.code.container",constructor:function(c,b,d,e,f){this._subsystemToRequiredPluginIds=this._pluginsBySubsystems=null;this._getOrganizedSubsystemToPlugin(b,d,c);this._resolveSubsystemsWithoutProviders(c);b=this._createBaseInjector(e,f);this._injector=new a({baseInjector:b,registry:c});this._cachedInjector=b},getDependency:function(a){try{return this._injector.getDependency(a)}catch(b){if(!(b instanceof c))throw b;try{var d=b.getSubsystemId();this._doLateSubsystemLoad(d);this._constructSubsystem(d);
return this.getDependency(a)}catch(e){if(!(e instanceof c))throw e;a="RTC PluginResolver: Unable to getDependency for "+a+" because it has a dependency on subsystem "+b.getSubsystemId()+", which is not loaded. Attempting to load that subsystem now failed";e.getSubsystemId()!==b.getSubsystemId()&&(a+="when reaching other subsystem "+e.getSubsystemId()+" which is also not yet loaded");throw Error(a+". It is suggested that you check your RTC enabled feature list.");}}},resolve:function(){this._createFeaturesUsingInjector()},
destroy:function(){this._injector.destroy()},_createPluginsFromSubSystem:function(a){return f.unique(a).map(function(a){return this._injector.getDependency(a)},this).filter(function(a){return!!a})},_resolveSubsystemsWithoutProviders:function(a){var c=this._getSubsystems(a),b=this._getDependencyToProviderPath(a);c.forEach(function(c){b[c]||a.push({id:c,providerClass:h.make(c)})},this)},_createFeaturesUsingInjector:function(){var a=Object.keys(this._pluginsBySubsystems),b,d=0,e=function(){d++;if(!(d<
b.length)){var a="RTC PluginResolver: Failed to construct subsystems after a large number of attempts. Most likely, there is a circular dependency among the following subsystems: "+b.toString()+".";-1<b.indexOf(this._DEFAULT_SUBSYSTEM_ID)&&(a+=" (Note that the subsystem "+this._DEFAULT_SUBSYSTEM_ID+" is the default subsystem, which contains all plugins that are not assigned to another subsystem.)");throw Error(a);}}.bind(this);for(b=a.slice();0<b.length;){var f=b.shift();try{this._constructSubsystem(f),
d=0}catch(h){if(!(h instanceof c))throw h;b.push(f);f=h.getSubsystemId();0>a.indexOf(f)?(this._doLateSubsystemLoad(f),b.unshift(f),d=0):e()}}},_constructSubsystem:function(a){var c=this._createPluginsFromSubSystem(this._pluginsBySubsystems[a]),b=k.getMembersId(a);this._injector.injectDependency(b,c);this._injector.getDependency(a)},_doLateSubsystemLoad:function(a){this._pluginsBySubsystems[a]=this._subsystemToRequiredPluginIds[a]||[]},_getOrganizedSubsystemToPlugin:function(a,c,b){a=this._removeDisabledElementsFromEnabledPlugins(a,
c);var d={},f={},h={};b.forEach(function(a){var c=a.subsystem||this._DEFAULT_SUBSYSTEM_ID,b=a.id;f[b]=c;a.requiredForSubsystem&&(h[c]||(h[c]=[]),h[c].push(b));if(a=a.family)d[a]||(d[a]=[]),d[a].push(b)},this);var g=[];a.forEach(function(a){d[a]?g=g.concat(d[a]):g.push(a)});var g=this._removeDisabledElementsFromEnabledPlugins(g,c),k={};g.forEach(function(a){var c=f[a]||this._DEFAULT_SUBSYSTEM_ID;e.assert(c,'RTC PluginResolver: Invalid registry or feature configuration. After preprocessing, "'+a+'" was found registered (implicitly or explicitly) under a falsy subsystem ID.');
k[c]||(k[c]=[]);k[c].push(a)},this);Object.keys(k).forEach(function(a){var c=h[a];c&&(k[a]=k[a].concat(c))});this._pluginsBySubsystems=k;this._subsystemToRequiredPluginIds=h},_removeDisabledElementsFromEnabledPlugins:function(a,c){return a.filter(function(a){return 0>c.indexOf(a)})},_getDependencyToProviderPath:function(a){var c={};a.forEach(function(a){c[a.id]||(c[a.id]=[]);c[a.id].push(a.path)});return c},_getSubsystems:function(a){var c=[];a.forEach(function(a){a.subsystem&&0>c.indexOf(a.subsystem)&&
c.push(a.subsystem)});return c},_createBaseInjector:function(a,c){var e=new d,f;for(f in a)a.hasOwnProperty(f)&&e.injectDependency(f,a[f]);var h=new b;Object.keys(c).forEach(function(a){h.injectDependency(a,c[a])});h.addInjector(e);return h}})})},"MW/rtc/core/_dependencyinjector/CachedDependencyInjector":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/_dependencyinjector/DependencyInjector"],function(g,f,e){return g(e,{constructor:function(){this._dependencyCache={}},injectDependency:function(d,
b){this._dependencyCache[d]=b},getDependency:function(d){return this._dependencyCache[d]},destroy:function(){this._dependencyCache={}}})})},"MW/rtc/core/_dependencyinjector/DependencyInjector":function(){define(["dojo/_base/declare"],function(g){return g(null,{getDependency:function(f){throw Error("Unimplemented API: MW.rtc.core._dependencyinjector.DependencyInjector.getDependency");}})})},"MW/rtc/core/_dependencyinjector/LayerableDependencyInjector":function(){define(["dojo/_base/declare","dojo/_base/lang",
"MW/rtc/core/_dependencyinjector/CachedDependencyInjector","MW/rtc/core/_dependencyinjector/DependencyInjector"],function(g,f,e,d){return g(d,{constructor:function(b){this._passThroughInjectors=[];b&&this.addInjector(b);this._cachedDependancies=new e;this._passThroughInjectors.push(this._cachedDependancies)},addInjector:function(b){this._verifyInstanceOfInjector(b);this._passThroughInjectors.push(b)},injectDependency:function(b,a){this._cachedDependancies.injectDependency(b,a)},_verifyInstanceOfInjector:function(b){if(!b instanceof
d)throw Error("Attempted to add a DependencyInjector that is not an instance of MW.rtc.core/_dependencyinjector.DependencyInjector");},getDependency:function(b){return this._getCachedDependency(b)},_getCachedDependency:function(b){var a;this._passThroughInjectors.forEach(function(c){!a&&c.getDependency(b)&&(a=c.getDependency(b))});return a},destroy:function(){this._cachedDependancies.destroy();this._cachedDependancies=null;this._passThroughInjectors=[]}})})},"MW/rtc/core/_dependencyinjector/RegistryBasedDependencyInjector":function(){define("dojo/_base/declare dojo/_base/lang mw-log/Log MW/rtc/core/_dependencyinjector/CachedDependencyInjector MW/rtc/core/_dependencyinjector/DependencyInjector MW/rtc/core/_dependencyinjector/utilities/DependencyInjectionUtilities MW/rtc/core/provider/PluginProvider MW/rtc/core/provider/SubsystemPluginsProviderUtilities MW/rtc/core/registry/PluginRegistry ./SubsystemDependencyError".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return g(b,{constructor:function(a){a=a||{};var c=a.baseInjector;this._registry=this._formatRegistry(a.registry||k.plugins);this._cachedInjector=c||new d;this._constructedPlugins=[]},injectDependency:function(a,c){this._cachedInjector.injectDependency(a,c)},getDependency:function(b){var d=this._cachedInjector.getDependency(b);if(!d&&h.isAMembersId(b))throw new l(h.getSubsystemId(b));if(d&&!(d instanceof c))return d;if(d||this._registry[b])try{var f=d||this._getFirstApplicable(this._constructMatchingProviders(b));
if(f){e.assert(f instanceof c,"Injected Dependency should be an instanceof PluginProvider");var g=a.getInstanceDependencies(f),k;k=0===g.length?this._constructPluginGivenNoArguments(f):a.constructPlugin(f,this._buildArgumentListGivenKeys(g));if(!k)throw Error("RTC RegistryBasedDependencyInjector: The provider of "+b+" returned a falsy value from createInstance. This is no longer allowed.");this._constructedPlugins.unshift({provider:f,plugin:k});this._cachedInjector.injectDependency(b,k);return k}}catch(s){if(s instanceof
l)throw s;b="Tried to construct registry based plugin in MW/rtc/core/_dependencyinjector/RegistryBasedDependencyInjector: "+b+" but failed with the following exception: "+s;e.assert(!1,b);e.assert(!1,s);throw Error(b);}},destroy:function(){this._constructedPlugins.forEach(function(a){a.provider.destroyInstance(a.plugin)});this._constructedPlugins=[];this._registry={};this._cachedInjector.destroy()},_formatRegistry:function(a){var c={};a.forEach(function(a){c[a.id]||(c[a.id]=[]);c[a.id].push(a.path||
a.providerClass)});return c},_isProviderApplicable:function(c){var b=!1,d=a.getIsApplicableDependencies(c),d=this._buildArgumentListGivenKeys(d);a.isPluginApplicable(c,d)&&(b=!0);return b},_buildArgumentListGivenKeys:function(a){var c=[];a.forEach(function(a){c.push(this.getDependency(a))},this);return c},_constructPluginGivenNoArguments:function(c){return a.constructPlugin(c,[])},_constructMatchingProviders:function(c){var b=[];this._registry[c].forEach(function(c){b.push(a.constructProvider(c))});
b.sort(function(a,c){return c.priority()-a.priority()});return b},_getFirstApplicable:function(a){for(var c=0;c<a.length;c++){var b=a[c];if(this._isProviderApplicable(b))return b}}})})},"MW/rtc/core/_dependencyinjector/utilities/DependencyInjectionUtilities":function(){define(["mw-log/Log","MW/rtc/core/provider/PluginProvider"],function(g,f){return{getInstanceDependencies:function(e){return this._getDependenciesGivenMethodName(e,"createInstance")},_getDependenciesGivenMethodName:function(e,d){g.assert(e instanceof
f,"Not a ProviderInterface.");var b=e.requires();return(b=b&&b[d])?b:[]},getIsApplicableDependencies:function(e){return this._getDependenciesGivenMethodName(e,"isApplicable")},_constructObjectFromAbsolutePath:function(e){return new (require([e],function(d){return new d})(e))},constructProvider:function(e){e=e instanceof f?e:this._constructObjectFromAbsolutePath(e);g.assert(e instanceof f,"Not a ProviderInterface.");return e},isPluginApplicable:function(e,d){g.assert(e instanceof f,"Not a ProviderInterface.");
return e.isApplicable.apply(e,d)},constructPlugin:function(e,d){g.assert(e instanceof f,"Not a ProviderInterface.");return e.createInstance.apply(e,d)}}})},"MW/rtc/core/provider/SubsystemPluginsProviderUtilities":function(){define([],function(){return{_MEMBERS_ID_PREFIX:"_subsystem_members",isAMembersId:function(g){return g.substring(0,this._MEMBERS_ID_PREFIX.length)===this._MEMBERS_ID_PREFIX},getMembersId:function(g){return this._MEMBERS_ID_PREFIX+g},getSubsystemId:function(g){return g.substring(this._MEMBERS_ID_PREFIX.length)}}})},
"MW/rtc/core/_dependencyinjector/SubsystemDependencyError":function(){define(["dojo/_base/declare"],function(g){return g(null,{constructor:function(f){this._subsystemId=f},getSubsystemId:function(){return this._subsystemId}})})},"MW/rtc/core/provider/SubsystemPluginsProviderFactory":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./SubsystemPluginsProviderUtilities"],function(g,f,e){return{make:function(d){var b=e.getMembersId(d);return new (g(f,{isApplicable:function(){return!0},
requires:function(){return{createInstance:[b]}},createInstance:function(a){return a}}))}}})},"MW/rtc/keyBindingUtils":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","dojo/sniff","mw-event-utils/platformize"],function(g,f,e,d,b){return{addLabelsForActionService:function(a){this._actionService=a;this._connections=[];this._connections.push(e.after(this._actionService,"addAction",f.hitch(this,"_addLabelToAction"),!0));this._connections.push(e.after(this._actionService,"destroy",
f.hitch(this,"_dispose")));this._actionService.getAllActions().forEach(this._addLabelToAction,this)},_addLabelToAction:function(a){var c=this._createLabel(a);c&&this._actionService.updateAction(a.id,{shortcut:c})},_createLabel:function(a){var c=null,b=!1;if(d("mac")){var e=a.platformShortcut;a=a.platformKey;e&&e.mac?c=e.mac:a&&a.mac&&(c=a.mac,b=!0)}else a.key&&(c=a.key);return this._changeToRequiredCase(c,b)},_changeToRequiredCase:function(a,c){return a?b.getPlatformSpecificString(a,{dontConvertCtrlToCmd:c}):
null},_dispose:function(){this._connections.forEach(function(a){a.remove()})}}})},"MW/rtc/HasExtensions":function(){define(["dojo/has"],function(g){g.add("windows",function(){return 0<=window.navigator.userAgent.toLowerCase().indexOf("windows")});g.add("matlab",function(){return 0<=window.navigator.userAgent.toLowerCase().indexOf("matlab")})})},"academyinteractions/rtc/AcademyCommandWindowModule":function(){define("dijit/_WidgetBase dijit/_FocusMixin dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/_base/declare dojo/text!MOTW/cmd/view/commandWindow2.html MOTW/cmd/PluginRegistry mw-actiondataservice/ActionDataService MW/rtc/clipboardservice/ClipboardService MW/rtc/RichTextComponent academyinteractions/rtc/historyDecoration/HistoryDecorationProvider".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m){return b([g,f,e,d],{templateString:a,widgetsInTemplate:!0,constructor:function(a){this._motwActionService=a.actionService;this._executionService=a.executionService;this._commandWindowInitializer={onInitialize:function(){},onReset:function(){}}},postCreate:function(){this._commandWindowPane=this.cmdEditorWindow.parentNode;this._commandWindowPane.onResize=function(){};this._rtcInstance=this._initializeEditor()},_initializeEditor:function(){var a={};a["cw.initializer"]=
this._commandWindowInitializer;a["cw.commandwindowpane"]=this._commandWindowPane;a["rtc.clipboard"]=k.getBrowserSyncedClipboard();a["rtc.executionservice"]=this._executionService;a["rtc.motwactionservice"]=this._motwActionService;var b=c.plugins,b=b.concat({id:"cw.historydecoration",path:"academyinteractions/rtc/historyDecoration/HistoryDecorationProvider"});return new l({"class":"rtePaneFixedSize",id:"internal_"+this.id,registry:b,dependencies:a,features:{fixedSize:!0,enabled:"rtc.code.parenmatch rtc.contextualselection.evaluateselection rtc.contextualselection.openselection rtc.findandreplace rtc.serializers.serialize rtc.richtext rtc.richtext.lists rtc.richtext.hyperlink rtc.richtext.equations rtc.richtext.images rtc.code.syntaxhighlighter rtc.cutcopypaste commandwindow.output commandwindow.prompt cw.core.promptinput cw.core.commandwindowhistory rtc.code.codingui cw.commands.clearcommandwindow cw.commands.homecommand cw.commands.exitmatlab cw.commands.pausematlab cw.commandhistorynavigation cw.commandwindowstatehandler cw.executionhandler cw.historydecoration cw.keyhandler cw.matlabtokenshandler cw.promptinputhandler cw.view.commandwindowview cw.undoredocontroller cw.wraplines cw.interruptcommandwindow contextmenu".split(" "),
disabled:"margin.linenumberdecorator rtc.navigate.replace rtc.code.comment rtc.richtext.matlabjsonmimeconverter rtc.richtext.images.imagemimeconverter rtc.richtext.images.htmlhandler rtc.cutcopypaste.internalserializationgenerator rtc.indent rtc.richtext.latexeditor rtc.richtext.hyperlinkeditor rtc.richtext.equationeditor rtc.richtext.toggleshortcuts".split(" ")}},this.cmdEditorWindow)},startup:function(){this._rtcInstance.startup();this._commandWindowInitializer.onInitialize()},resize:function(){this._commandWindowPane.onResize();
this._rtcInstance.resize()},onBlur:function(){this._rtcInstance.blur()},focus:function(){this._rtcInstance.focus()},blur:function(){this._rtcInstance.blur()},onFocus:function(){this._rtcInstance.focus()},destroy:function(){this._rtcInstance.destroy()}})})},"academyinteractions/rtc/historyDecoration/HistoryDecorationProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./HistoryDecoration"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.internaldocument",
"rtc.view","rtc.cutcopypaste.htmlmimeconverter","cw.core.commandwindowhistory","rtc.executionservice"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"academyinteractions/rtc/historyDecoration/HistoryDecoration":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect mw-log/Log MW/rtc/plugins/richtext/nodes/inner/RichTextParagraphNode MW/rtc/plugins/richtext/nodes/inner/RichTextContainerNode MW/rtc/plugins/richtext/nodes/leaf/RichTextNode MW/rtc/model/events/DeletionEvent MW/rtc/nodes/inner/LineNode ./HistoryDecorationEnum ./model/ColorBarNode ./view/ColorBarLayouter ./model/KeyDecorationNode ./view/KeyDecorationLayouter".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q){return g(null,{DEFAULT_STATUS_CONTAINER_FONT:"Arial, Helvetica, sans-serif",constructor:function(a,c,b,d,f){var h=this;this._internalDocument=a;this._htmlMimeConverter=b;this._executionService=f;e.around(d,"_handleAddHistory",function(a){return function(c){c&&"decoration"===c.type?(h._addDecorationHistory(c,d._historyStartPosition),d._view.scrollToBottom()):a.call(d,c)}});e.around(d,"_handleUpdateHistory",function(a){return function(c,b,e,f){c&&"decoration"===
c.type&&("value"===b||"visible"===b)?(h._updateDecorationHistory(c),d._view.scrollToBottom()):a.call(d,c)}});c.registerLayouter(new p);c.registerLayouter(new q)},_addDecorationHistory:function(a,c){var b=this.addDecoration(a.value,c);this._executionService.historyStore.setValue(a,"rtcNode",b)},_updateDecorationHistory:function(a){var c=this._executionService.historyStore.getValue(a,"rtcNode");a.visible?(c=this.updateDecoration(c,a.value),this._executionService.historyStore.setValue(a,"rtcNode",c)):
this.removeDecoration(c)},addDecoration:function(a,c){var d,e=new b(this._buildRtcNodeHierarchy(a));c.node.parent.readOnly?(c.node.parent.readOnly=!1,d=this._internalDocument.insertAtPosition(e,c),c.node.parent.readOnly=!0):d=this._internalDocument.insertAtPosition(e,c);if(d.events&&0<d.events.length)this._internalDocument.onDocumentChanged(d.events);return e},updateDecoration:function(a,c){var b;a.nextSibling()&&(b=a.nextSibling().startPosition(),this.removeDecoration(a),a=this.addDecoration(c,b));
return a},removeDecoration:function(a){try{this._deleteLineNode(a)}catch(c){d.warn("still erroring...")}},_deleteLineNode:function(a){var c=this._internalDocument.getLineNumber(a);0<=c&&(this._internalDocument.deleteNodeAndMerge(a),this._internalDocument.onDocumentChanged([h.create(c,c,0)]))},_buildRtcNodeHierarchy:function(a){var c;switch(a.decorationType){case l.TASK_HEADER:c=this._buildTaskHeaderNodes(a);break;case l.STATUS_CONTAINER:c=this._buildStatusContainerNodes(a);break;default:d.assert("Unsupported history decoration type: "+
a.decorationType)}return c},_buildTaskHeaderNodes:function(a){var b=[new c({text:"   "+a.text,color:"#025696"})];!0===a.correct?b.push(new c({text:" \u2714",color:"green"})):!1===a.correct&&b.push(new c({text:" \u2718",color:"red"}));return b},_buildStatusContainerNodes:function(a){var d,e,f;e=this._convertHtmlStringToRtcNodes(a.content);d=[];a.keyActions&&(f=[],a.keyActions.spaceKey&&(f.push(new n({keyType:"spaceKey",text:"Space"})),f.push(new c({text:" "+a.keyActions.spaceKey+"  |  ",font:this.DEFAULT_STATUS_CONTAINER_FONT}))),
a.keyActions.escapeKey&&(f.push(new n({keyType:"escapeKey",text:"Esc"})),f.push(new c({text:" "+a.keyActions.escapeKey,font:this.DEFAULT_STATUS_CONTAINER_FONT}))),f=new b(f),d.push(f));return[new m(e.concat(d),a)]},_convertHtmlStringToRtcNodes:function(a){var c=this;return this._htmlMimeConverter.convertFromMimeData(a).map(function(a){a.children&&a.children.length&&a.children.forEach(function(a){a.monospace||(a.font=c.DEFAULT_STATUS_CONTAINER_FONT)});return this._internalDocument.createNode(a)},this)}})})},
"academyinteractions/rtc/historyDecoration/HistoryDecorationEnum":function(){define([],function(){return{TASK_HEADER:"history_decoration_task_header",STATUS_CONTAINER:"history_decoration_status_container"}})},"academyinteractions/rtc/historyDecoration/model/ColorBarNode":function(){define(["dojo/_base/declare","MW/rtc/plugins/richtext/nodes/inner/RichTextParagraphNode"],function(g,f){return g([f],{constructor:function(e,d){this.inherited(arguments);d=d||{};this.color=d.color},className:"ColorBarNode",
_serializeAttributes:function(e){this.color=e.color}})})},"academyinteractions/rtc/historyDecoration/view/ColorBarLayouter":function(){define(["dojo/_base/declare","dojo/dom-construct","MW/rtc/plugins/view/layoutmanager/abstract/AbstractLayouter","../model/ColorBarNode"],function(g,f,e,d){return g(e,{constructor:function(){},getApplicableNodeClass:function(){return d},layout:function(b,a){var c=b.layoutInto(a,"div",{"class":"colorBarContainer"}),d=f.create("div",{"class":"colorBar "+a.color});c.appendChild(d);
return c}})})},"academyinteractions/rtc/historyDecoration/model/KeyDecorationNode":function(){define(["dojo/_base/declare","MW/rtc/plugins/richtext/nodes/leaf/RichTextNode"],function(g,f){return g([f],{constructor:function(e){this.inherited(arguments);e=e||{};this.keyType=e.keyType},className:"KeyDecorationNode",_serializeAttributes:function(e){this.keyType=e.keyType}})})},"academyinteractions/rtc/historyDecoration/view/KeyDecorationLayouter":function(){define(["dojo/_base/declare","dojo/dom-construct",
"MW/rtc/plugins/view/layoutmanager/abstract/AbstractLayouter","../model/KeyDecorationNode"],function(g,f,e,d){return g(e,{constructor:function(){},getApplicableNodeClass:function(){return d},layout:function(b,a){return b.layoutInto(a,"span",{"class":a.keyType})}})})},"MOTW/modules/figureAnnotationsGallery/index":function(){define(["dojo/Deferred","MOTW/toolstrip/figureGalleries/FigureAnnotationsGalleryManager"],function(g,f){return{initialize:function(e){var d=new g;e=new f({uiBuilder:e.uiBuilder,
authorizationDetailsService:e.authorizationDetailsService,executionService:e.executionService});d.resolve({exports:{figureAnnotationsGalleryManager:e}});return d.promise}}})},"MOTW/toolstrip/figureGalleries/FigureAnnotationsGalleryManager":function(){define(["dojo/_base/declare","dijit/registry","MOTW/toolstrip/configs/figure/FigureAnnotationsGalleryPopupConfig","../managers/GalleryManagerBase"],function(g,f,e,d){return g([d],{constructor:function(){this._galleryTag="motwToolstrip.figureToolstripTab.annotations.gallery";
this._galleryPopupTag="motwToolstrip.figureToolstripTab.annotations.galleryPopup"},buildGalleryPopup:function(){this._uiBuilder.createGalleryPopupFromConfig(e)},postPopulateGallery:function(){this._galleryId=this._uiBuilder.tagToId(this._galleryTag);this._galleryWidget=f.byId(this._galleryId);this._postPopulateGallery()}})})},"MOTW/toolstrip/configs/figure/FigureAnnotationsGalleryPopupConfig":function(){define(["MW/toolstrip/constants/TypeConstants","MOTW/editor/actions/FigureToolstripActionIdConstants",
"dojo/i18n!MOTW/l10n/nls/figuretoolstrip"],function(g,f,e){return{type:g.GALLERY_POPUP,tag:"motwToolstrip.figureToolstripTab.annotations.galleryPopup",galleryItemTextLineCount:1,favoritesEnabled:!0,favCategoryId:"motwToolstrip.figureToolstripTab.annotations.favorites",children:[{tag:"motwToolstrip.figureToolstripTab.annotations.favorites",type:g.GALLERY_FAVORITE_CATEGORY},{tag:"motwToolstrip.figureToolstripTab.annotations.labels",type:g.GALLERY_CATEGORY,title:e.labelsAndTitle,children:[{tag:"motwToolstrip.figureToolstripTab.annotations.xlabel",
type:g.TOGGLE_GALLERY_ITEM,text:e.xlabel,description:e.xlabelDescription,actionId:f.ADD_XLABEL,icon:"galleryXLabel"},{tag:"motwToolstrip.figureToolstripTab.annotations.ylabel",type:g.TOGGLE_GALLERY_ITEM,text:e.ylabel,description:e.ylabelDescription,actionId:f.ADD_YLABEL,icon:"galleryYLabel"},{tag:"motwToolstrip.figureToolstripTab.annotations.title",type:g.TOGGLE_GALLERY_ITEM,text:e.title,description:e.titleDescription,actionId:f.ADD_TITLE,icon:"galleryTitle"}]},{tag:"motwToolstrip.figureToolstripTab.annotations.legends",
type:g.GALLERY_CATEGORY,title:e.legends,children:[{tag:"motwToolstrip.figureToolstripTab.annotations.legend",type:g.TOGGLE_GALLERY_ITEM,text:e.legend,description:e.legendDescription,actionId:f.ADD_LEGEND,icon:"galleryLegend"},{tag:"motwToolstrip.figureToolstripTab.annotations.removelegend",type:g.TOGGLE_GALLERY_ITEM,text:e.removeLegend,description:e.removeLegendDescription,actionId:f.REMOVE_LEGEND,icon:"galleryRemoveLegend"},{tag:"motwToolstrip.figureToolstripTab.annotations.colorbar",type:g.TOGGLE_GALLERY_ITEM,
text:e.colorbar,description:e.colorbarDescription,actionId:f.ADD_COLORBAR,icon:"galleryColorbar"},{tag:"motwToolstrip.figureToolstripTab.annotations.removecolorbar",type:g.TOGGLE_GALLERY_ITEM,text:e.removeColorbar,description:e.removeColorbarDescription,actionId:f.REMOVE_COLORBAR,icon:"galleryRemoveColorbar"}]},{tag:"motwToolstrip.figureToolstripTab.annotations.grids",type:g.GALLERY_CATEGORY,title:e.grids,children:[{tag:"motwToolstrip.figureToolstripTab.annotations.grid",type:g.TOGGLE_GALLERY_ITEM,
text:e.grid,description:e.gridDescription,actionId:f.ADD_GRID,icon:"galleryGrid"},{tag:"motwToolstrip.figureToolstripTab.annotations.removegrid",type:g.TOGGLE_GALLERY_ITEM,text:e.removeGrid,description:e.removeGridDescription,actionId:f.REMOVE_GRID,icon:"galleryRemoveGrid"},{tag:"motwToolstrip.figureToolstripTab.annotations.xgrid",type:g.TOGGLE_GALLERY_ITEM,text:e.xGrid,description:e.xgridDescription,actionId:f.ADD_XGRID,icon:"galleryXGrid"},{tag:"motwToolstrip.figureToolstripTab.annotations.ygrid",
type:g.TOGGLE_GALLERY_ITEM,text:e.yGrid,description:e.ygridDescription,actionId:f.ADD_YGRID,icon:"galleryYGrid"}]},{tag:"motwToolstrip.figureToolstripTab.annotations.legends",type:g.GALLERY_CATEGORY,title:e.annotations,children:[{tag:"motwToolstrip.figureToolstripTab.annotations.textArrow",type:g.TOGGLE_GALLERY_ITEM,text:e.textArrow,description:e.textArrowDescription,actionId:f.ADD_TEXT_ARROW,icon:"galleryTextArrow"},{tag:"motwToolstrip.figureToolstripTab.annotations.arrow",type:g.TOGGLE_GALLERY_ITEM,
text:e.arrow,description:e.arrowDescription,actionId:f.ADD_ARROW,icon:"galleryArrow"},{tag:"motwToolstrip.figureToolstripTab.annotations.doublearrow",type:g.TOGGLE_GALLERY_ITEM,text:e.doubleArrow,description:e.doubleArrowDescription,actionId:f.ADD_DOUBLE_ARROW,icon:"galleryDoubleArrow"},{tag:"motwToolstrip.figureToolstripTab.annotations.line",type:g.TOGGLE_GALLERY_ITEM,text:e.line,description:e.lineDescription,actionId:f.ADD_LINE,icon:"galleryLine"}]}]}})},"MOTW/editor/actions/FigureToolstripActionIdConstants":function(){define([],
function(){return{ADD_GRID:"motw.liveeditor.figure.grid",ADD_XGRID:"motw.liveeditor.figure.xgrid",ADD_YGRID:"motw.liveeditor.figure.ygrid",ADD_COLORBAR:"motw.liveeditor.figure.colorbar",ADD_LEGEND:"motw.liveeditor.figure.legend",ADD_TITLE:"motw.liveeditor.figure.title",ADD_XLABEL:"motw.liveeditor.figure.xlabel",ADD_YLABEL:"motw.liveeditor.figure.ylabel",REMOVE_GRID:"motw.liveeditor.figure.cleargrid",REMOVE_COLORBAR:"motw.liveeditor.figure.clearcolorbar",REMOVE_LEGEND:"motw.liveeditor.figure.clearlegend",
ADD_LINE:"motw.liveeditor.figure.line",ADD_ARROW:"motw.liveeditor.figure.arrow",ADD_DOUBLE_ARROW:"motw.liveeditor.figure.doublearrow",ADD_TEXT_ARROW:"motw.liveeditor.figure.textarrow"}})},"MOTW/toolstrip/managers/GalleryManagerBase":function(){define(["dojo/_base/declare","dojo/aspect","dojo/_base/lang","mw-messageservice/MessageService","MW/toolstrip/constants/TypeConstants"],function(g,f,e,d,b){return g(null,{constructor:function(a){this._uiBuilder=a.uiBuilder;this._executionService=a.executionService;
this._galleryPopulated=!1;this.TOOLS_CHANNEL&&(d.subscribe(this.TOOLS_CHANNEL,e.hitch(this,this._messageReceived)),a.workerReady.then(e.hitch(this,"_start",{executionService:a.executionService})))},setGalleryState:function(a){var c=this,b;this._galleryPopulated?this._setGalleryState(a):b=f.after(this,"_postPopulateGallery",function(){b.remove();c._setGalleryState(a)})},_setGalleryState:function(a){a&&(this._galleryWidget.set("shouldRefresh",!1),this._uiBuilder.setGalleryState(this._galleryPopupTag,
a),this._galleryWidget.set("shouldRefresh",!0));this._uiBuilder.refreshGallery(this._galleryId)},_populateGallery:function(a){this._galleryPopulated||(this._galleryWidget.set("shouldRefresh",!1),this._buildGalleryCategoriesAndItems(a))},getGalleryState:function(){return this._uiBuilder.getGalleryState(this._galleryPopupTag)},_createCategory:function(a,c){var d;a.type=b.GALLERY_CATEGORY;void 0===c?(a.parentId=this._galleryPopupId,d=this._uiBuilder.create(a)):(d=this._uiBuilder.create(a),this._uiBuilder.add(d,
this._galleryPopupId,c));return d},_createGalleryItem:function(a,c){a.type=b.GALLERY_ITEM;a.parentId=c;a.icon=a.largeIcon;delete a.largeIcon;delete a.smallIcon;return this._uiBuilder.create(a)},_postPopulateGallery:function(){this._uiBuilder.set(this._galleryId,"displayState","normal");this._galleryPopulated=!0;this._galleryWidget.set("shouldRefresh",!0);this._uiBuilder.refreshGallery(this._galleryId)},_messageReceived:function(a){this._populateGallery(a.data)},reset:function(){this._galleryWidget.set("shouldRefresh",
!1);[this._galleryId,this._favCategoryId].forEach(function(a){this._uiBuilder.getChildrenIds(a).map(this._uiBuilder.destroy)},this);this._uiBuilder.getChildrenIds(this._galleryPopupId).forEach(function(a){this._uiBuilder.getChildrenIds(a).map(this._uiBuilder.destroy);this._uiBuilder.destroy(a)},this);this._uiBuilder.set(this._galleryId,"displayState","busy");this._uiBuilder.set(this._galleryId,"textOverlay","");this._galleryWidget.set("shouldRefresh",!0);this._galleryPopulated=!1},_start:function(a){a.executionService.executionEval(this.JAVA_FUNCTION+
"()")}})})},"MOTW/modules/feedback/index":function(){define(["dojo/Deferred","MOTW/feedback/FeedbackManager","MOTW/feedback/FeedbackService"],function(g,f,e){return{initialize:function(d){var b=new g,a=new e;d=new f({feedbackService:a,layoutService:d.layoutService});b.resolve({exports:{feedbackService:a,feedbackManager:d}});return b.promise},reset:function(d){}}})},"MOTW/feedback/FeedbackManager":function(){define("dojo/_base/declare dojo/_base/connect dojo/_base/lang dojo/_base/array MOTW/feedback/FeedbackDialog dojo/i18n!MOTW/l10n/nls/feedback".split(" "),
function(g,f,e,d,b,a){return g(null,{constructor:function(c){c=c||{};if(!c.feedbackService)throw Error("Feedback service required for the FeedbackManager to function");if(!c.layoutService)throw Error("Layout service required for the FeedbackManager to display FeedbackDialog");this.feedbackService=c.feedbackService;this.layoutService=c.layoutService;f.connect(this.feedbackService,"onFault",this,"_onFault");f.connect(this.feedbackService,"onSuccess",this,"_onSuccess");this.feedbackResources=a;this.state=
this.BASE_STATE},openFeedbackDialog:function(a){this._reset();this.feedbackDialog=new b;this.closeHandler=f.connect(this.feedbackDialog,"onClose",this,"_reset");this.contentHandlers.push(f.connect(this.feedbackDialog,"onOk",this,"_onFeedbackSubmit"));this.contentHandlers.push(f.connect(this.feedbackDialog,"onCancel",this,"_reset"));this.contentHandlers.push(f.connect(this.feedbackDialog,"onDone",this,"_reset"));this.layoutService.addWidget("feedbackDialog","newDialog",this.feedbackDialog,{title:"Submit Feedback",
"data-testid":"FeedbackDialog"});this.state=this.FEEDBACK_FORM_VIEW_STATE;this.feedbackDialog.startup();this.layoutService.focusWidget("feedbackDialog")},_reset:function(){this.feedbackDialog&&(this.layoutService.removeWidget("feedbackDialog"),this.feedbackDialog=null,this.state=this.BASE_STATE);this.timer&&clearTimeout(this.timer);this._resetContentHandlers()},_updateDialog:function(){var a;switch(this.state){case this.SUBMISSION_PENDING_STATE:a=this.feedbackResources.submissionPendingMessage;break;
case this.SUBMISSION_SUCCESS_STATE:a=this.feedbackResources.submissionSuccessMessage;break;case this.SUBMISSION_FAILURE_STATE:a=this.feedbackResources.submissionFailureMessage;break;default:a=this.feedbackResources.submissionSuccessMessage}this.feedbackDialog&&this.feedbackDialog.showMessageView(!0,a)},_resetContentHandlers:function(){d.forEach(this.contentHandlers,function(a){f.disconnect(a)});this.contentHandlers=[]},_onFault:function(){this.state=this.SUBMISSION_FAILURE_STATE;this._updateDialog()},
_onSuccess:function(){this.state=this.SUBMISSION_SUCCESS_STATE;this._updateDialog();var a=this;this.timer=setTimeout(function(){a._reset()},2E3)},_onFeedbackSubmit:function(){if(this.state===this.FEEDBACK_FORM_VIEW_STATE){var a=this.feedbackDialog.getFeedback();this.feedbackService.submitFeedback(a);this.state=this.SUBMISSION_PENDING_STATE;this._updateDialog()}},BASE_STATE:0,FEEDBACK_FORM_VIEW_STATE:1,SUBMISSION_PENDING_STATE:2,SUBMISSION_SUCCESS_STATE:3,SUBMISSION_FAILURE_STATE:4})})},"MOTW/feedback/FeedbackDialog":function(){define("dojo/_base/declare dojo/keys dojo/on dojo/dom-construct dojo/dom-style dojo/_base/lang dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/i18n!MOTW/l10n/nls/feedback dojo/i18n!MOTW/l10n/nls/dialog dojo/text!./templates/FeedbackDialogTemplate.html mw-form/PushButton mw-form/TextField mw-form/TextArea".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r){return g([c,h,k],{templateString:p,constructor:function(c){this.feedbackResources=l;a.mixin(this.feedbackResources,m)},postCreate:function(){this.inherited(arguments);this.okButton.set("disabled",!0);this._updateStringsWithLocalization(this.feedbackResources);this.showMessageView(!1)},startup:function(){this.inherited(arguments)},onTyping:function(a){""===a.mwEventData.currentContent?this.okButton.set("disabled",!0):this.okButton.set("disabled",!1)},onCancel:function(){e.emit(this.domNode,
"restorefocus",{bubbles:!0})},onOk:function(){},onDone:function(){},onClose:function(){e.emit(this.domNode,"restorefocus",{bubbles:!0})},_updateStringsWithLocalization:function(a){this.okButton.set("label",a.submitFeedback);this.cancelButton.set("label",a.cancel);this.doneButton.set("label",a.ok)},showMessageView:function(a,c){var d=a?"none":"block",e=a?"block":"none";b.set(this.submissionDetails,"display",d);b.set(this.feedbackButtons,"display",d);b.set(this.submissionMessage,"display",e);this.submittedMessage.innerHTML=
c||""},getFeedback:function(){return{summary:this.feedbackSummaryInput.get("value"),description:this.feedbackDetailsInput.get("value")}}})})},"MOTW/feedback/FeedbackService":function(){define("dojo/_base/declare dojo/_base/array mw-browser-utils/BrowserUtils mw-log/Log mw-remote/Remote dojo/i18n!MOTW/l10n/nls/motw".split(" "),function(g,f,e,d,b,a){return g(null,{constructor:function(a){b.registerResponseHandler("FeedbackResponse",this._handleSubmitFeedbackResponse,this);b.registerFaultHandler("Feedback",
this._handleSubmitFeedbackFault,this)},submitFeedback:function(c){if(c&&c.summary){var b=e.getSystemInfo();b.TYPE="motw";b.VERSION=a.versionNumber;this._submitFeedback(c.summary,c.description,b)}else d.error("No Summary information, cannot submit feedback")},onFault:function(){},onSuccess:function(){},_submitFeedback:function(a,d,e){b.sendMessage({Feedback:[{summary:a,description:d,nameValuePairs:e}]})},_handleSubmitFeedbackResponse:function(a){f.forEach(a,function(a){if(a.messageFaults&&0<a.messageFaults.length)this.onFault();
else this.onSuccess()},this)},_handleSubmitFeedbackFault:function(a){d.error("**** Error received in FeedbackService ****");d.error("**** Error is "+a+" ****");this.onFault()}})})},"MOTW/modules/helpDataService/index":function(){define(["dojo/Deferred","dojo/_base/lang","MOTW/help/HelpDataServiceFactory"],function(g,f,e){return{initialize:function(d){var b=new g,a=e.createHelpDataService("MOTW",{endpoint:"",serverRoot:"/help/search",serviceURI:"",service:"HELP_DATA_SERVICE"},d.actionService,d.iframeLayoutManager);
d.workerReady.then(f.hitch(this,"_start",{helpDataService:a}));b.resolve({exports:{helpDataService:a}});return b.promise},_start:function(d){d.helpDataService&&""===d.helpDataService.endpoint&&d.helpDataService.updateRoute()}}})},"MOTW/help/HelpDataServiceFactory":function(){define(["dojo/_base/declare","./impl/HelpDataNullService","./impl/HelpDataService"],function(g,f,e){return{createHelpDataService:function(d,b,a,c){return b?this.getHelpDataServiceInstance(d,b,a,c):this.getHelpDataNullService(a)},
getHelpDataServiceInstance:function(d,b,a,c){return new e({clientType:d,endPoints:{endpoint:b.endpoint,serverRoot:b.serverRoot,serviceURI:b.serviceURI},actionService:a,iframeLayoutManager:c})},getHelpDataNullService:function(d){return new f({actionService:d})}}})},"MOTW/help/impl/HelpDataNullService":function(){define(["dojo/_base/declare","dojo/Evented","MOTW/motw/ActionIdConstants"],function(g,f,e){return g([f],{constructor:function(d){this._enabled=!0;d=d||{};this.actionService=d.actionService},
getSuggestions:function(d){},updateRoute:function(){},executeSearch:function(d){this.actionService&&this.actionService.executeAction(e.HELP,{searchTerm:d||""})},_handleSearchSuggestionError:function(){this.disable()},enable:function(){this._enabled=!0},disable:function(){this._enabled=!1},isEnabled:function(){return this._enabled}})})},"MOTW/help/impl/HelpDataService":function(){define(["dojo/_base/declare","./HelpDataNullService","mw-remote/Remote","mw-log/Log","MOTW/iframecontainer/IframeContainer"],
function(g,f,e,d,b){return g([f],{WEB_ENDPOINT:"/help/",DOCVIEWER_PARAM:"docviewer\x3dml_online",constructor:function(a){a=a||{};this.inherited(arguments);if(!a.endPoints||void 0===a.endPoints.endpoint||void 0===a.endPoints.serverRoot||void 0===a.endPoints.serviceURI)this._enabled=!1,d.error("MW.help.HelpDataService: search endpoints parameter must not be null or undefined.");else{this.endpoint=a.endPoints.endpoint;this.serverRoot=a.endPoints.serverRoot;this.serviceURI=a.endPoints.serviceURI.replace("web",
"doccenter");this.iframeContainer=new b({iframeLayoutManager:a.iframeLayoutManager});if(this.endpoint){var c=this._getSuggestionRoute();e.setServiceEndPoint("HELP_DATA_ROUTER_ENDPOINT",this.endpoint+this.serverRoot);e.setServicePathSuffixForEndPoint("HELP_DATA_ROUTER_ENDPOINT",c)}e.registerResponseHandler("HelpDataEventCollection",this._emitSearchSuggestionRespond,this);e.registerEndpointLevelFaultHandler("HELP_DATA_ROUTER_ENDPOINT","*",this._handleSearchSuggestionError,this);e.registerResponseHandler("FEvalResponse:UPDATE_HELP_DATA_ROUTER_ENDPOINT",
this._updateEndpoint,this);e.registerFaultHandler("FEval:UPDATE_HELP_DATA_ROUTER_ENDPOINT",this._handleEndpointFaultFEval,this);e.registerResponseHandler("FEvalResponse:UPDATE_HELP_DATA_ROUTER_RELEASE",this._updateRelease,this);e.registerFaultHandler("FEval:UPDATE_HELP_DATA_ROUTER_RELEASE",this._handleReleaseFaultFEval,this)}},getSuggestions:function(a){a=a||"";this.isEnabled()&&e.sendMessage({HelpDataEventCollection:{q:encodeURIComponent(a)}})},updateRoute:function(){e.sendMessage({FEval:[{"function":"internal.help.getDocCenterDomain",
nargout:1,dequeMode:"ppe"}]},{},"UPDATE_HELP_DATA_ROUTER_ENDPOINT");e.sendMessage({FEval:[{"function":"internal.help.getDocCenterRelease",nargout:1,dequeMode:"ppe"}]},{},"UPDATE_HELP_DATA_ROUTER_RELEASE")},_updateEndpoint:function(a,c){if(1===a.length)if(a[0].isError)d.error(a[0].messageFaults[0].message),this.endpoint="https://www.mathworks.com";else{var b=a[0].results[0].trim();this.endpoint=b=b.replace(/\/$/,"")}else d.error("Error in HelpDataService._updateEndpoint, switch to use the default endpoint"),
this.endpoint="https://www.mathworks.com";e.setServiceEndPoint("HELP_DATA_ROUTER_ENDPOINT",this.endpoint+this.serverRoot)},_updateRelease:function(a,c){1===a.length?a[0].isError?(d.error(a[0].messageFaults[0].message),this.serviceURI="/doccenter/R2018b"):this.serviceURI="/doccenter/"+a[0].results[0].trim():(d.error("Error in HelpDataService._updateRelease, switch to use the default release"),this.serviceURI="/doccenter/R2018b");var b=this._getSuggestionRoute();e.setServicePathSuffixForEndPoint("HELP_DATA_ROUTER_ENDPOINT",
b)},_handleEndpointFaultFEval:function(a,c){d.error(a);this.endpoint="https://www.mathworks.com";this.disable()},_handleReleaseFaultFEval:function(a,c){d.error(a);this.disable()},_emitSearchSuggestionRespond:function(a){this.emit("searchSuggestionRespond",a)},_getSuggestionRoute:function(){return"v1/suggest"+this.serviceURI.replace("doccenter","doccenter/en")},getWebHelpEndpoint:function(){return this.endpoint+this.WEB_ENDPOINT+"?"+this.DOCVIEWER_PARAM},getMaximizeUrl:function(a){return a.replace(this.DOCVIEWER_PARAM,
"docviewer\x3dnull")},addMOQueryParameter:function(a){a=0<=a.indexOf("?")?a+"\x26":a+"?";return a+=this.DOCVIEWER_PARAM}})})},"MOTW/iframecontainer/IframeContainer":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-style dojo/query dojo/on dojo/window dojo/Evented ./IframeWidget".split(" "),function(g,f,e,d,b,a,c,h){return g([c],{constructor:function(a){this.iframeLayoutManager=a.iframeLayoutManager},removeWindow:function(a){this.iframeLayoutManager.remove(a)},showIframe:function(a){return this.create(a)},
create:function(c){if(!c.position){var b=a.getBox(),d=b.w/1.5,e=b.h/1.5;c.position=[Math.floor((b.h-e)/2),Math.floor((b.w-d)/2),d,e]}c.peerNodeId||(c.peerNodeId="iframe_"+Math.random());b=new h(c);this.iframeLayoutManager.addWidget(c,b,c.attachMouseMoveEvent);b.onClose=f.hitch(this,"removeWindow",c.peerNodeId);!1!==c.maximize&&this.enableMaximizeButton(b.layoutWidgetId,c.maximizeUrl);return b},enableMaximizeButton:function(c,f){var h=this,g=d('div[id\x3d"'+c+'"] .dojoxFloatingMaximizeIcon')[0];e.set(g,
{display:"inherit",cursor:"default"});b(g,"click",function(){h.removeWindow(c);a.get(document).open(f)})}})})},"MOTW/iframecontainer/IframeWidget":function(){define("dojo/_base/declare dojo/dom-style dojo/dom-geometry dojo/_base/lang dojo/Evented dojo/on dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!./IframeWidgetTemplate.html dojo/text!./IframeWidgetUnsupportedBrowserTemplate.html".split(" "),function(g,f,e,d,b,a,c,h,k,l,m){return g([c,h,k,b],{templateString:l,constructor:function(a,
c){this.browserSupport=!0;this.isMoving=!1;!1===c&&(this.templateString=m,this.browserSupport=!1);this.layoutWidgetId=a.peerNodeId;this.style="width:"+a.position[2]+"px; height:"+a.position[3]+"px;";this.onLoad=a.onLoad||function(){}},postCreate:function(){var c=this;this.browserSupport&&(this.frame.src=this.host,this.frame.onreadystatechange?this.frame.onreadystatechange=this.onLoad:this.frame.onload=this.onLoad,this.update(this.position[2],this.position[3]),a(this.transparentDiv,"click, mouseup, MSPointerUp",
function(){c.isMoving=!1;c.onBringToTop()}),this.emit("onWidgetStartup"))},destroyRecursive:function(){},update:function(a,c){this.browserSupport&&(f.set(this.domNode,{width:a+"px",height:c+"px"}),f.set(this.transparentDiv,{width:a+"px",height:c+"px"}),this.frame.width=a,this.frame.height=c)},onBringToTop:function(){this.isMoving||f.set(this.transparentDiv,{display:"none"})},onSendBack:function(){f.set(this.transparentDiv,{display:"block"})},getPosition:function(){return e.position(this.domNode)},
onResize:function(a){if(this.browserSupport){var c=this.getPosition(),c=[c.y,c.x,a.w,a.h];this.update(a.w,a.h);this.emit("onContainerResize",c)}}})})},"MOTW/modules/figureapps/index":function(){define(["dojo/Deferred","dojo/_base/lang","MOTW/figureapps/MOFigureManager"],function(g,f,e){return{_isSubscribed:!1,initialize:function(d){var b=new g,a=new e({iframeLayoutManager:d.iframeLayoutManager});this._isSubscribed=a.subscribe();d.workerReady.then(f.hitch(this,"_start",{moFigureManager:a}));b.resolve({exports:{moFigureManager:a}});
return b.promise},_start:function(d){d.moFigureManager&&d.moFigureManager.moRefreshed()},reset:function(d){this._isSubscribed&&(d.moFigureManager.reset(),d.moFigureManager.destroy(),this._isSubscribed=!1)}}})},"MOTW/figureapps/MOFigureManager":function(){define(["dojo/_base/declare","dojo/on","dijit/Destroyable","MOTW/figureapps/MOFigureMsgService","MOTW/figureapps/MOFigureContainerController"],function(g,f,e,d,b){return g([e],{moFigureManagerChannel:"/mlapp/figure",constructor:function(a){this.iframeLayoutManager=
a.iframeLayoutManager;this.messageService=new d;this._figureMap={};this.fn=this._createMOFigureContainerController.bind(this);var c=this;this.listenMessage(function(a){"updateMOWindowBounds"===a.data.msgType&&c._handleUpdatesFormFigure(a);"getRenderedWindowBounds"===a.data.msgType&&c._handleGetRenderedWindowBounds(a)})},subscribe:function(){var a=!0;try{this.messageService.subscribe(this.moFigureManagerChannel,this.fn)}catch(c){a=!1}return a},moRefreshed:function(){this.messageService.sendMORefreshMessage(this.moFigureManagerChannel)},
_createMOFigureContainerController:function(a){"windowOpen"===a.data.eventType&&(this.moFigureContainerController=new b({channel:this.moFigureManagerChannel,iframeLayoutManager:this.iframeLayoutManager,messageService:this.messageService,data:a.data}),this.moFigureContainerController.createFigureContainer(),this._figureMap[a.data.peerNodeId]=this.moFigureContainerController,this.own(f(this.moFigureContainerController,"moFigureContainerClosed",function(a){this._onFigureContainerClosed(a)}.bind(this))))},
listenMessage:function(a){var c=window.addEventListener?"addEventListener":"attachEvent";(0,window[c])("attachEvent"===c?"onmessage":"message",a,!1)},_handleUpdatesFormFigure:function(a){var c=this._getMOFigureController(a.data.peerNodeId);c&&c.handleFigureResized(a)},_handleGetRenderedWindowBounds:function(a){(a=this._getMOFigureController(a.data.peerNodeId))&&a.handleFigureRendered()},reset:function(){this._figureMap&&Object.keys(this._figureMap).forEach(function(a){(a=this._figureMap[a])&&a.destroy()},
this);this._figureMap=null;this.messageService.unsubscribe(this.moFigureManagerChannel,this.fn)},_onFigureContainerClosed:function(a){a=a.peerNodeId;var c=this._getMOFigureController(a);c&&c.destroy();delete this._figureMap[a]},_getMOFigureController:function(a){return this._figureMap[a]},destroy:function(){this.inherited(arguments);this._figureMap=null}})})},"MOTW/figureapps/MOFigureMsgService":function(){define(["dojo/_base/declare","mw-messageservice/MessageService"],function(g,f){return g([],
{subscribe:function(e,d){f.subscribe(e,d)},unsubscribe:function(e,d){f.unsubscribe(e,d)},sendViewReadyMessage:function(e){f.publish(e,{eventType:"windowReady"})},sendMORefreshMessage:function(e){f.publish(e,{eventType:"moRefreshed"})},sendCloseMessage:function(e){f.publish(e,{eventType:"windowClosed"})},sendPropertyChangeMessage:function(e,d){f.publish(e,{eventType:"windowPropertyChanged",data:d})},postMessageToFrame:function(e,d){d.contentWindow.postMessage(e,e.href)},getMessageService:function(){return f.messageService}})})},
"MOTW/figureapps/MOFigureContainerController":function(){define("dojo/_base/declare dojo/on dojo/Evented dojo/window dijit/Destroyable MOTW/figureapps/MOFigureContainer".split(" "),function(g,f,e,d,b,a){return g([e,b],{moPositionCorrection:[1,1,0,0],constructor:function(a){if(!a.channel)throw"Constructor arguments to a MOFigureContainerController  should be given a channel.";if(!a.iframeLayoutManager)throw"Constructor arguments to a MOFigureContainerController should be given a iframeLayoutManager.";
if(!a.messageService)throw"Constructor arguments to a MOFigureContainerController should be given a messageService.";if(!a.data)throw"Constructor arguments to a MOFigureContainerController should be given a peerNodeInfo.";this.data=a.data;this.messageService=a.messageService;this.iframeLayoutManager=a.iframeLayoutManager;this.moFigureChannel=a.channel+"/"+a.data.peerNodeId;this.fn=this._handleMessage.bind(this);this.messageService.subscribe(this.moFigureChannel,this.fn)},createFigureContainer:function(){this.moFigureContainer=
new a({iframeLayoutManager:this.iframeLayoutManager});this.moData=dojo.clone(this.data);var c=this;this.moData.position=this.moData.position.map(function(a,b){return a-c.moPositionCorrection[b]});this.moData.position=this._calculateMATLABOnlinePosition(this.moData.position);this.moFigureContainer.createView(this.moData);this.own(f(this.moFigureContainer,"moFigureResized",function(a){this._onMOFigureResize(a)}.bind(this)),f(window,"resize",function(a){this._onMOWindowResize(a)}.bind(this)),f(this.moFigureContainer,
"moFigureClosed",function(a){this._onMOFigureClosed(a)}.bind(this)))},_handleMessage:function(a){if("windowPropertyChanged"===a.data.eventType){if(a.data.position){this.data.positon=a.data.position;var b=this;a.data.position=a.data.position.map(function(a,c){return a-b.moPositionCorrection[c]});a.data.position=this._calculateMATLABOnlinePosition(a.data.position)}this.moFigureContainer.updateProperty(a.data.peerNodeId,a.data)}else"windowClosed"===a.data.eventType?(this.moFigureContainer.close(a.data.peerNodeId),
this.messageService.unsubscribe(this.moFigureChannel,this.fn),a={peerNodeId:a.data.peerNodeId},this.emit("moFigureContainerClosed",a)):"windowToFront"===a.data.eventType&&this.moFigureContainer.windowToFront(a.data.peerNodeId)},handleFigureResized:function(a){if(a.data.position){var b=a.data.peerNodeId;this.data.position=a.data.position;var d=this;a.data.position=a.data.position.map(function(a,c){return a-d.moPositionCorrection[c]});a.data.position=this._calculateMATLABOnlinePosition(a.data.position);
this.moFigureContainer.setPosition(b,a.data)}},handleFigureRendered:function(){var a=this._calculateMATLABPosition(this.moFigureContainer.getRenderedPosition()),a=[a[1],a[0],a[2],a[3]],b=this,a=a.map(function(a,c){return a+b.moPositionCorrection[c]});this._postMsgToFigure(a)},destroy:function(){this.moFigureContainer&&("destroy"in this.moFigureContainer&&"function"===typeof this.moFigureContainer.destroy)&&this.moFigureContainer.destroy()},_onMOFigureResize:function(a){if(!a.newPosition||!a.peerNodeId)throw"PeerNodeId and Position is needed to send the information to the server";
a=this._calculateMATLABPosition(a.newPosition);a=[a[1],a[0],a[2],a[3]];var b=this;a=a.map(function(a,c){return a+b.moPositionCorrection[c]});this.data.position=a;this.messageService.sendPropertyChangeMessage(this.moFigureChannel,{position:a});this._postMsgToFigure(a)},_onMOWindowResize:function(a){var b=this;a=this.data.position.map(function(a,c){return a-b.moPositionCorrection[c]});a=this._calculateMATLABOnlinePosition(a);this.moFigureContainer.setPosition(this.data.peerNodeId,{peerNodeId:this.data.peerNodeId,
position:a,eventType:"windowPropertyChanged"})},_postMsgToFigure:function(a){this.moFigureContainer.widget.frame.contentWindow.postMessage({position:a,msgType:"updateFigureMOStrategyBounds"},this.moData.host)},_onMOFigureClosed:function(a){this.messageService.sendCloseMessage(this.moFigureChannel,{eventType:"windowClosed"})},_calculateMATLABPosition:function(a){var b=d.getBox();a[0]=b.h-a[3]-a[0];return[a[0],a[1],a[2],a[3]]},_calculateMATLABOnlinePosition:function(a){var b=d.getBox(),e=a[0],f=a[1],
g=a[2];a=a[3];g>b.w?(e=0,g=b.w):g+e>b.w&&(e=b.w-g);a>b.h?(f=0,a=b.h):(f=b.h-a-f,0>f&&(f=0));0<f&&f>this.moFigureContainer.containerTitleBarHeight?f-=this.moFigureContainer.containerTitleBarHeight:a-=this.moFigureContainer.containerTitleBarHeight;return[f,e,g,a]}})})},"MOTW/figureapps/MOFigureContainer":function(){define("dojo/_base/declare dojo/_base/lang dojo/on dijit/Destroyable MOTW/iframecontainer/IframeContainer MOTW/iframecontainer/IframeContainerConnectionUtil MOTW/motw/UnsupportedBrowserCheck".split(" "),
function(g,f,e,d,b,a,c){return g([d,b],{containerTitleBarHeight:22,_position:[],constructor:function(a){this.inherited(arguments);if(!a.iframeLayoutManager)throw"Constructor arguments to a AppFigureContainer should be given a iframeLayoutManager.";this.iframeLayoutManager=a.iframeLayoutManager},createView:function(c){f.mixin(c,a.getRemoteConnectionProperties(c.host));c.maximize=!1;this.showIframe(c,!0)},setPosition:function(a,c){if(!(this._position[0]===c.position[0]&&this._position[1]===c.position[1]&&
this._position[2]===c.position[2]&&this._position[3]===c.position[3])){this.iframeLayoutManager.updateVisibleWidget(a,c);var b=this.getRenderedPosition();this.emit("moFigureResized",{peerNodeId:a,newPosition:b});this._position=c.position}},updateProperty:function(a,c){this.iframeLayoutManager.updateVisibleWidget(a,c);if(c.position){this._position=c.position;var b=this.getRenderedPosition();this.emit("moFigureResized",{peerNodeId:a,newPosition:b})}},getRenderedPosition:function(){var a=this.widget.getPosition();
return[a.y-1,a.x-1,a.w,a.h]},showIframe:function(a,c){this.widget=this.inherited(arguments,[a,c]);this.own(e(this.widget,"onContainerResize",function(c,b){this._onContainerResize(c,a.peerNodeId)}.bind(this)))},_onContainerResize:function(a,c){var b={peerNodeId:c,newPosition:a};this.iframeLayoutManager.layoutService.updateWidget(c,"top",a[0]-1-this.containerTitleBarHeight);this.iframeLayoutManager.layoutService.updateWidget(c,"left",a[1]-1);this.emit("moFigureResized",b)},removeWindow:function(a){this.emit("moFigureClosed",
{peerNodeId:a})},windowToFront:function(a){this.iframeLayoutManager.bringToTop(a)},close:function(a){this.iframeLayoutManager.remove(a)},destroy:function(){this.inherited(arguments);this.widget.destroy()}})})},"MOTW/modules/editor/index":function(){define("dojo/Deferred dojo/_base/lang MOTW/motw/MotwApp MOTW/editor/EditorService MOTW/editor/EditorVersioningService MOTW/editor/ProgrammingAidsFeature MOTW/editor/UntitledBufferFeature MW/rtc/editordataservice/EditorDataServiceManagerFactory MW/uiframework/FeatureDetectionService MOTW/motw/CoreActions".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return{initialize:function(m){var p=new g,n={},q=h.getInstance(),r=new a("ProgrammingAids");m.featureService.addFeature(r);r=new c("UntitledBuffer");m.featureService.addFeature(r);m.featureService.enableFeature("motw.internal.ProgrammingAids");r=new d({fileDataService:m.fileDataService,executionService:m.executionService,actionService:m.actionService,featureService:m.featureService,uiContainer:m.uiContainer,figureAnnotationsGalleryManager:m.figureAnnotationsGalleryManager});
l.setService({editorService:r});e.editorService=r;!0===k.getFeatureStatus(k.FeatureNames.GDS)&&(n=new b({editorService:r,versioningService:m.versioningService,actionService:m.actionService,fileDataService:m.fileDataService}));m.workerReady.then(f.hitch(this,"_start",{editorDataService:q}));p.resolve({exports:{editorDataService:q,editorService:r,editorVersioningService:n}});return p.promise},_start:function(a){a.editorDataService.start()}}})},"MOTW/editor/EditorService":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/array dojo/_base/Deferred dojo/aspect dojo/on dijit/Destroyable dojo/i18n!MOTW/l10n/nls/motw dojo/i18n!mw-dialog-utils/l10n/nls/dialog MOTW/dnd/DnDUtils MOTW/editor/EditorView MOTW/editor/EditorIdGenerator MOTW/editor/EquationEditorTabGroupFactory MOTW/editor/LiveEditorWidget MOTW/editor/LiveEditorTabGroupFactory MOTW/editor/LiveEditorWidgetFactory MOTW/editor/PlainEditorTabGroupFactory MOTW/editor/PlainEditorWidgetFactory MOTW/editor/actions/ActionIdConstants MOTW/editor/OpenAsLiveCodeService MOTW/editor/actions/ActionProviderFactory mw-filename-utils/FileNameUtil mw-html-utils/HtmlUtils mw-utils/Utils mw-notifications/Notifications mw-remote/Remote MOTW/motw/ActionIdConstants MOTW/toolstrip/configs/editor/FigureTabGroupConfig MOTW/toolstrip/qab/QABContextualControls MW/rtc/keyBindingUtils MW/rtc/plugins/debug/DebugServicesFactory MW/uiframework/uicontainer/ChildProperties MW/uiframework/uicontainer/DocumentTypeProperties mw-log/Log".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x,y,B,D,E,F,I,L,C,M,G,N,P,R){return g(c,{_liveCodeFileExtension:"mlx",constructor:function(a){R.assert(a.uiContainer,"uiContainer is required to initialize EditorService");R.assert(a.executionService,"executionService is required to initialize EditorService");R.assert(a.actionService,"actionService is required to initialize EditorService");R.assert(a.fileDataService,"fileDataService is required to initialize EditorService");this._editorViews={};this.currentId=
0;this._actionProviders={};this._activeEditor=null;this.uiContainer=a.uiContainer;this.executionDataService=a.executionService;this.actionService=a.actionService;this.fileDataService=a.fileDataService;this.own(b.after(this.fileDataService,"onFileOpen",f.hitch(this,"_onFileOpen"),!0));this.own(b.after(this.fileDataService,"onFileClose",f.hitch(this,"_onFileClose"),!0));this.own(b.after(this.fileDataService,"onFileClosed",f.hitch(this,"_onFileClosed"),!0));this.own(b.after(this.fileDataService,"onFileShow",
f.hitch(this,"_onFileShow"),!0));this.own(b.after(this.fileDataService,"onFileModificationChange",f.hitch(this,"_onFileModificationChange"),!0));this.own(b.after(this.fileDataService,"onCurrentFolderChange",f.hitch(this,"_updateSaveActionState")));this.own(b.after(this.fileDataService,"saveOpenFiles",f.hitch(this,"_onSaveOpenFiles"),!0));M.addLabelsForActionService(this.actionService);this._plainEditorWidgetFactory=new u;this._liveEditorWidgetFactory=new s;var c={};c[C.UNDO]=v.UNDO_EDITOR;c[C.REDO]=
v.REDO_EDITOR;this._editorProperties=new P({defaultRegion:"left",title:"Editor",collectiveLabel:"Editor Files",willReopen:!0,plusActions:[I.NEW_FILE],tabGroupTags:["motwToolstrip.editorTabGroup"],qabControlToActionMap:c,documentFactory:this._plainEditorWidgetFactory,tabGroupFactories:{"motwToolstrip.editorTabGroup":new t}});this._liveEditorProperties=new P({defaultRegion:"left",title:"Live Editor",collectiveLabel:"Live Code Files",willReopen:!0,plusActions:[I.NEW_LIVE_SCRIPT],tabGroupTags:["motwToolstrip.liveEditorTabGroup"],
contexts:[{contextId:"motwToolstrip.equationEditorContext",tabGroupTags:["motwToolstrip.equationEditorTabGroup"]},{contextId:"motwToolstrip.figuretab",tabGroupTags:[L.tag]}],qabControlToActionMap:c,documentFactory:this._liveEditorWidgetFactory,tabGroupFactories:{"motwToolstrip.liveEditorTabGroup":new r,"motwToolstrip.equationEditorTabGroup":new n}});B.parseQueryString().editorUndocking||(this._editorProperties.documentFactory=null,this._liveEditorProperties.documentFactory=null);this.setActionProviders(x.createActionProviders(this,
this.actionService,this.fileDataService),window);this.uiContainer.registerDocumentType("editorFile",this._editorProperties);this.uiContainer.registerDocumentType("liveCodeFile",this._liveEditorProperties);a.figureAnnotationsGalleryManager&&(a.figureAnnotationsGalleryManager.buildGalleryPopup(),this.uiContainer.addTabGroupFromConfig(L,L.tag),a.figureAnnotationsGalleryManager.postPopulateGallery());this._openAsLiveScriptService=new w(this.fileDataService)},_loadEditor:function(a,c,d,e){this.own(b.after(a,
"undoRedoStackUpdated",f.hitch(this,"_updateUndoRedoActionState",a),!0));var h=y.pathFromFileInfo(c.fileInfo);this._editorViews[h]=a;var g=this;a.canClose=f.hitch(this,function(){return!g._isLiveCodeFile(a.getFile().fileInfo.name)||g.onEditorSave(a.getFile().id)});a.watch(N.IS_OPEN,function(c,b,d){b&&!d&&(g._isLiveCodeFile(a.getFile().fileInfo.name)?(g.fileDataService.openedFilesDataStore.remove(y.pathFromFileInfo(a.getFile().fileInfo)),g.fileDataService.onFileClose(a.getFile().fileInfo),g.actionService.updateAction(I.SAVE,
{enabled:!1})):g.fileDataService._isFileOpen(a.getFile().fileInfo)&&g.fileDataService.closeFile(a.getFile().fileInfo))});a.watch(N.IS_SELECTED,function(c,b,d){d&&(g._getActionProviders(a).lastSelectedType=a.isLiveEditor()?"live":"plain",a.setActive&&a.setActive(),g._notifyOfActiveEditor(a),g._updateActions(a))});a.watch(N.IS_DOCKED,function(c,b,d){a.get(N.IS_SELECTED)&&g._updateActions(a)});this._pendingUndockFileInfo&&(this._pendingUndockFileInfo.location===c.fileInfo.location&&this._pendingUndockFileInfo.name===
c.fileInfo.name)&&(a.isDocked=!1);this._pendingUndockFileInfo=null;this.uiContainer.addDocument(a.widget,a);a.setActive();a.get(N.IS_SELECTED)||a.editor.blur();this._notifyOfActiveEditor(a);if(c=this._getActionProviders(a))c.liveEditorActionProvider.setActionPropertiesOnLoad(a),this._updateActions(a);this._goToPositionInLine(a,d,e);this.onOpen(a)},hasActionProviders:function(a){return!!this._getActionProvidersForWindow(a)},setActionProviders:function(c,b){var d=this,e=b.name||"";c.window=b;this._actionProviders[e]=
c;a(b,"unload",function(){delete d._actionProviders[e]});this._editorProperties.watchForWindow(b,P.LAST_SELECTED,function(a,c,b){b&&(d._actionProviders[e].lastSelectedType="plain",d._updateActions(b.editorView))});this._liveEditorProperties.watchForWindow(b,P.LAST_SELECTED,function(a,c,b){b&&(d._actionProviders[e].lastSelectedType="live")})},_getActionProviders:function(a){return this._getActionProvidersForWindow(a.window)},_getActionProvidersForWindow:function(a){return this._actionProviders[a.name||
""]},_onSaveOpenFiles:function(a){var c={},b=this.fileDataService._createUpdateFileRequest(c);this._saveLiveScriptFile(b);0<b.length?(c.postSaveWork=a,F.sendMessage({UpdateFile:b},c,this.classifier)):a&&a()},_saveLiveScriptFile:function(a){for(var c=a.length;c--;){var b=a[c].file.fileInfo,d=this._getEditorFromFileInfo(b);this._isLiveCodeFile(b.name)&&(this.fileDataService.setFileClean(d.getFile()),this.onEditorSave(d.getFile().id),a.splice(c,1));d&&d.file&&(d.file.savePending=!1)}},_onFileOpen:function(c,
d,e,g,k){var l=document.activeElement,n=this;this.currentId=p.nextId();if(this._editorViews[c.id])this._onFileShow(c,d,e,g);else{var q=(d=this._isLiveCodeFile(c.fileInfo.name))?"liveCodeFile":"editorFile",w=d?"liveEditor"+D.generateUuid():"editor"+this.currentId,r=y.pathFromFileInfo(c.fileInfo),q={id:w,file:c,documentId:r,fileDataService:this.fileDataService,executionDataService:this.executionDataService,debugServices:G.getInstance(),uiContainer:this.uiContainer,documentType:q,title:c.fileInfo.name,
closable:!0},s=new m(q);this.own(b.after(s,"setEditor",function(){n._getActionProviders(s).matlabActionProvider.setupEditor(s);var c=s.editor._pluginResolver._cachedInjector.getDependency("rtc.code.sections");c&&s.editor.own(a(c._sectionsList,"sectionsChangedEvent",f.hitch(n,"_updateSectionActions",s)))}));d?(this._liveEditorWidgetFactory.createWidget(this.uiContainer,void 0,s),this._onEditorLoad(r,s).then(function(a){if(a)n._loadEditor(s,c,e,g),n.fileDataService.refreshOpenFolders();else{a=h.disableFunctionSaveTitle;
var b=h.errorLoadingText.replace("{0}",r),d=n._createDialogBox("error");E.displayConfirmDialog(a,b,d);n.fileDataService.openedFilesDataStore.remove(y.pathFromFileInfo(editor.getFile().fileInfo))}})):(this._plainEditorWidgetFactory.createWidget(this.uiContainer,void 0,s),this._loadEditor(s,c,e,g));k&&l&&l.focus()}},_setupDropTarget:function(a){var c=this;l.createSelectableDnDTarget(a.editor.domNode,{accept:["dgrid-row"]},function(a,b){if(a.accept.hasOwnProperty("dgrid-row")){var d=a.getItem(a.anchor.id).data;
d&&c.actionService.executeAction(I.OPEN_FILE,{fileInfo:d})}})},_goToPositionInLine:function(a,c,b){-1<c&&a.editor.getCursor().setLineColumn(c,Math.max(b,1),!0)},closeAllEditors:function(){Object.keys(this._editorViews).forEach(function(a){this._closeEditor(this._editorViews[a])},this);this._editorViews={}},_onFileClose:function(a){var c=this._getViewFromFileInfo(a);this._closeEditor(c);a=y.pathFromFileInfo(a);delete this._editorViews[a]},_closeEditor:function(a){a.get(N.IS_OPEN)&&a.set(N.IS_OPEN,
!1);this._activeEditor===a&&(this._activeEditor=null);this.onClose(a)},_onFileClosed:function(a){this._updateSaveActionState()},_onFileShow:function(a,c,b,d,e){c=document.activeElement;a=this._getViewFromFileInfo(a.fileInfo);a.set(N.IS_SELECTED,!0);this._goToPositionInLine(a,b,d);e&&c?c.focus():a.set(N.IS_SELECTED,!0)},_onFileModificationChange:function(a,c){var b=this._getViewFromFileInfo(a);b.set(N.TITLE,b.getFile().fileInfo.name+(c?"":" *"));this._updateActions(b)},_getEditorFromFileInfo:function(a){a=
y.pathFromFileInfo(a);var c=this._editorViews[a];R.assert(c,"Editor does not exist for file: "+a);return c},_getViewFromFileInfo:function(a){a=y.pathFromFileInfo(a);var c=this._editorViews[a];R.assert(c,"Editor does not exist for file: "+a);return c},_updateSaveActionState:function(){var a=this;this.fileDataService&&Object.keys(this._actionProviders).forEach(function(c){c=a._actionProviders[c];var b=!1;if(a._editorProperties.getForWindow(c.window,P.LAST_SELECTED)||a._liveEditorProperties.getForWindow(c.window,
P.LAST_SELECTED))b=!0;var d=a.fileDataService.doesOpenModifiedFileExist();c.actionService.updateAction(I.SAVE,{enabled:b});c.liveEditorActionProvider.updateSaveActionState(b,d);d?c.actionService.updateAction(I.SAVE,{icon:"save_dirty_24",quickAccessIcon:"save_dirty_16"}):c.actionService.updateAction(I.SAVE,{icon:"save_24",quickAccessIcon:"save_16"});c.actionService.updateAction(v.SAVEAS,{enabled:b&&y.isWritable(a.fileDataService.currentWorkingFolder),currentWorkingFolder:a.fileDataService.currentWorkingFolder})})},
_updateSectionActions:function(a){var c=this._getActionProviders(a);c.matlabActionProvider.updateActions(a);c.publishTabActionProvider.updateActions(a)},_updateUndoRedoActionState:function(a,c){var b=!a||!a.isEditable()?!1:c.isUndoable,d=!a||!a.isEditable()?!1:c.isRedoable,e=this._getActionProviders(a);e.actionService.updateAction(v.UNDO_EDITOR,{enabled:b});e.actionService.updateAction(v.REDO_EDITOR,{enabled:d})},_notifyOfActiveEditor:function(a){var c=this._activeEditor;this._activeEditor=a;this.onActiveEditor(a,
c)},onOpen:function(a){},onClose:function(a){},_updateActions:function(a){this._updateSaveActionState();this._updateUndoRedoActionState(a,a.getUndoRedoStates());var c=this._getActionProviders(a);c.editSectionActionProvider.updateActions(a);c.matlabActionProvider.updateActions(a)},onShow:function(a){},onActiveEditor:function(a,c){},onEditorSave:function(a){var c=this.getAllOpenEditors(a);if(c&&c.widget.getBackingStore){c=c.widget.getBackingStore().save(a);if(!c.status&&"notASupportedFileError"===c.errorId){var b=
h.disableFunctionSaveTitle,d=h.disableFunctionSaveText;a=y.fileInfoFromPath(a);var e=this._createDialogBox("warning");this._getViewFromFileInfo(a).set(N.IS_SELECTED,!0);E.displayConfirmDialog(b,d,e)}return c.status}},_createDialogBox:function(a){return{icon:a,buttonText:[k.ok],defaultAcceptButton:1,closeCallback:function(){}}},_createDisableSaveFunctionDialogBox:function(){return{icon:"warning",buttonText:[k.ok],defaultAcceptButton:1,closeCallback:function(){}}},getLiveEditorToolstripActionProvider:function(){return this._getActionProviders(window).liveEditorActionProvider},
_isLiveCodeFile:function(a){return y.getFileNameExtension(a)===this._liveCodeFileExtension},_onEditorLoad:function(a,c){return c.widget.getBackingStore().load(a)},getActiveEditor:function(a){if(this._activeEditorForTest)return this._activeEditorForTest;a||(a=window);var c=this._getActionProvidersForWindow(a).lastSelectedType,b=this._editorProperties.getForWindow(a,P.LAST_SELECTED);a=this._liveEditorProperties.getForWindow(a,P.LAST_SELECTED);var d;"plain"===c&&b?d=b:"live"===c&&a&&(d=a);d||(d=b||a);
return d?d.editorView:void 0},_setActiveEditorForTest:function(a){if(this._activeEditorForTest!==a&&(this._activeEditorForTest=a)){var c=y.pathFromFileInfo(a.getFile().fileInfo);this._editorViews[c]||(this._editorViews[c]=a);a.setActive&&a.setActive();this._notifyOfActiveEditor(a);this._updateActions(a)}},getAllOpenEditors:function(a){return this._editorViews[a]},setUndockUponOpen:function(a){this._pendingUndockFileInfo=a}})})},"MOTW/dnd/DnDUtils":function(){define(["dojo/_base/declare","dojo/dnd/Target"],
function(g,f){var e=g(f,{onSelectStart:function(d){}});return{createSelectableDnDTarget:function(d,b,a){d=new e(d,b);a&&(d.onDrop=a);return d}}})},"MOTW/editor/EditorView":function(){define("dojo/_base/declare dojo/_base/lang dojo/i18n!MOTW/l10n/nls/motw mw-filename-utils/FileNameUtil mw-log/Log MW/uiframework/uicontainer/ChildProperties".split(" "),function(g,f,e,d,b,a){return g([a],{constructor:function(a){b.assert(a.file,"No file specified");b.assert(a.file.fileInfo,"The file specified does not have a fileInfo object.");
b.assert(a.file.fileInfo.name,"The file specified does have a name.");this._isLatest=!0;this.file=a.file;this.initialDocumentText=a.file.content||"";this.fileDataService=a.fileDataService;this.executionDataService=a.executionDataService;this.debugServices=a.debugServices;this.uiContainer=a.uiContainer;this.documentType=a.documentType;this.title=a.file.fileInfo.name;this.closable=!0},setEditor:function(a,b){this.editor=a;this._isLiveEditor=b;this.description=d.pathFromFileInfo(this.file.fileInfo)+
(a.isEditable()?"":e.readOnly)},isLiveEditor:function(){return this._isLiveEditor},focus:function(){if(this.widget)this.widget.onFocus()},setActive:function(){this._checkEditor();this.editor.setActive()},insert:function(a,b){this._checkEditor();this.editor.cursor.setPosition(a);this.editor.getDocument().insertTextAtCurrentPosition(b)},remove:function(a,b){this._checkEditor();this.editor.remove(a,b)},resetEditor:function(a,b){this._checkEditor();this.editor.resetEditor(a,b)},hasSelection:function(){this._checkEditor();
return this.editor.hasSelection()},getSelection:function(){this._checkEditor();return this.editor.getSelection()},setSelection:function(a,b){this._checkEditor();return this.editor.setSelection(a,b)},addDocumentChangeListener:function(a){this._checkEditor();this.editor.addDocumentChangeListener(a)},getId:function(){return this.id},getFile:function(){return this.file},undo:function(){this._checkEditor();this.editor.undo();this.editor.focus()},redo:function(){this._checkEditor();this.editor.redo();this.editor.focus()},
getUndoRedoStates:function(){this._checkEditor();return this.editor.getUndoRedoStates()},undoRedoStackUpdated:function(){},isFileEditable:function(){return!this.file||!this.file.fileInfo||!this.file.fileInfo.filePermissions?!1:this.file.fileInfo.filePermissions.canWrite},isEditable:function(){this._checkEditor();return this.editor.isEditable()},evaluate:function(){this.executionDataService.runFile(this.file.fileInfo);this.editor.focus()},publishAsHTML:function(a){this.executionDataService.publishFile(this.file.fileInfo,
"html",a);this.editor.focus()},publishAsPDF:function(a){this.executionDataService.publishFile(this.file.fileInfo,"pdf",a);this.editor.focus()},getText:function(){this._checkEditor();return this.editor.getText()},getLanguage:function(){this._checkEditor();return this.editor.getLanguage()},getBackup:function(){this._checkEditor();return{content:this.file.content,editable:this.isEditable(),cursorOffset:this.editor.cursor.getPosition()}},loadFromBackup:function(a){this._checkEditor();this.resetEditor(a.content,
{readOnly:!a.editable,cursorOffset:a.cursorOffset,silentUpdate:!0,preserveUndoStack:!0})},redraw:function(){this._checkEditor();this.editor.redraw()},_updateFile:function(){this._checkEditor();this.file.content=this.editor.getDocument().getText()},_checkEditor:function(){if(!this.editor)throw Error("editor property is undefined");}})})},"MOTW/editor/EditorIdGenerator":function(){define([],function(){var g=0;return{nextId:function(){return g+=1}}})},"MOTW/editor/EquationEditorTabGroupFactory":function(){define(["dojo/_base/declare",
"MW/uiframework/uicontainer/UIComponentFactory","MOTW/toolstrip/configs/editor/EquationEditorTabGroupConfig","MOTW/toolstrip/equationGalleries/EquationEditorStructuresGalleryManager","MOTW/toolstrip/equationGalleries/EquationEditorSymbolsGalleryManager"],function(g,f,e,d,b){return g([f],{modulePath:"MOTW/editor/EquationEditorTabGroupFactory",createWidget:function(a,c){var f=a.uiBuilder,g=a.getRootUIContainer();this.equationEditorSymbolsGalleryManager=new b({uiBuilder:f,authorizationDetailsService:g.application.authorizationDetailsService,
executionService:g.application.executionService});this.equationEditorStructuresGalleryManager=new d({uiBuilder:f,authorizationDetailsService:g.application.authorizationDetailsService,executionService:g.application.executionService});c?(this.equationEditorSymbolsGalleryManager.setGalleryState(c.symbolsGalleryState),this.equationEditorStructuresGalleryManager.setGalleryState(c.structuresGalleryState)):g.application.sessionService?(g.application.sessionService.registerGalleryManager("EquationEditorSymbols",
this.equationEditorSymbolsGalleryManager),g.application.sessionService.registerGalleryManager("EquationEditorStructures",this.equationEditorStructuresGalleryManager)):(g.application.galleryManagers||(g.application.galleryManagers={}),g=g.application.galleryManagers,g.EquationEditorSymbols=this.equationEditorSymbolsGalleryManager,g.EquationEditorStructures=this.equationEditorStructuresGalleryManager);this.equationEditorSymbolsGalleryManager.buildGalleryPopup();this.equationEditorStructuresGalleryManager.buildGalleryPopup();
f.addTabGroupFromConfig(e,"motwToolstrip.equationEditorTabGroup");this.equationEditorSymbolsGalleryManager.postPopulateGallery();this.equationEditorStructuresGalleryManager.postPopulateGallery()},getState:function(){return{symbolsGalleryState:this.equationEditorSymbolsGalleryManager.getGalleryState(),structuresGalleryState:this.equationEditorStructuresGalleryManager.getGalleryState()}}})})},"MW/uiframework/uicontainer/UIComponentFactory":function(){define(["dojo/_base/declare"],function(g){return g([],
{modulePath:"MW/uiframework/uicontainer/UIComponentFactory",createWidget:function(f,e,d){return null},createProperties:function(f,e){return null},getState:function(f,e){return null},destroyWidget:function(f,e){},getCssFiles:function(){return[]}})})},"MOTW/toolstrip/configs/editor/EquationEditorTabGroupConfig":function(){define("MW/toolstrip/constants/TypeConstants MOTW/motw/ActionIdConstants MOTW/editor/actions/ActionIdConstants MOTW/editor/actions/EquationEditorActionIdConstants dojo/i18n!MOTW/l10n/nls/equationeditor dojo/i18n!MOTW/l10n/nls/liveeditor dojo/i18n!MOTW/l10n/nls/motw dojo/i18n!MOTW/l10n/nls/toolstrip MW/toolstrip/constants/MiscConstants".split(" "),
function(g,f,e,d,b,a,c,h,k){return{tag:"motwToolstrip.equationEditorTabGroup",type:g.TAB_GROUP,children:[{tag:"motwToolstrip.equationEditorTab",type:g.TAB,title:c.equationEditorTabTitle,mnemonic:"E",children:[{tag:"motwToolstrip.equationEditorTab.format",type:g.SECTION,title:h.formatSectionTitle,children:[{tag:"motwToolstrip.equationEditorTab.format.column",type:g.COLUMN,horizontalAlignment:"center",children:[{tag:"motwToolstrip.equationEditorTab.format.bold",type:g.TOGGLE_BUTTON,actionId:d.ids.BOLD,
description:a.boldDescription,textOverride:k.DO_NOT_DISPLAY,icon:"smallBold"},{tag:"motwToolstrip.equationEditorTab.format.italics",type:g.TOGGLE_BUTTON,textOverride:k.DO_NOT_DISPLAY,actionId:d.ids.ITALIC,description:a.italicDescription,icon:"smallItalic"}]}]},{tag:"motwToolstrip.equationEditorTab.symbols",type:g.SECTION,title:b.symbolsSectionTitle,children:[{tag:"motwToolstrip.equationEditorTab.symbols.column1",type:g.COLUMN,children:[{tag:"motwToolstrip.equationEditorTab.symbols.gallery",type:g.GALLERY,
galleryPopupTag:"motwToolstrip.equationEditorTab.symbols.galleryPopup",minColumnCount:5,maxColumnCount:15}]}]},{tag:"motwToolstrip.equationEditorTab.structures",type:g.SECTION,title:b.structuresSectionTitle,children:[{tag:"motwToolstrip.equationEditorTab.structures.column1",type:g.COLUMN,children:[{tag:"motwToolstrip.equationEditorTab.structures.gallery",type:g.GALLERY,galleryPopupTag:"motwToolstrip.equationEditorTab.structures.galleryPopup",maxColumnCount:12}]}]},{tag:"motwToolstrip.equationEditorTab.matrices",
type:g.SECTION,title:b.matricesSectionTitle,children:[{tag:"motwToolstrip.equationEditorTab.matrices.column",type:g.COLUMN,horizontalAlignment:"center",children:[{tag:"motwToolstrip.equationEditorTab.matrices.insertMatrix",type:g.PUSH_BUTTON,text:b.insertMatrix,description:b.insertMatrixDescription,actionId:d.ids.INSERT_MATRIX2X2,icon:"smallMatrix"}]}]}]}]}})},"MOTW/editor/actions/ActionIdConstants":function(){define([],function(){return{RUN:"motw.run",RUN_CELL:"motw.runCell",ADVANCE_CELL:"motw.advanceCell",
RUN_CELL_ADVANCE:"motw.runCellAdvance",FIND:"motw.find",FIND_NEXT:"motw.findNext",FIND_PREVIOUS:"motw.findPrevious",FIND_SELECTION:"motw.findSelection",GOTO:"motw.goTo",GOTO_LINE:"motw.goToLine",GOTO_SECTION_HEADER:"motw.goToSectionHeader",INSERT_SECTION:"motw.insertSection",INSERT_COMMENT:"motw.insertComment",SMART_INDENT:"motw.smartIndent",UNCOMMENT:"motw.uncomment",INDENT:"motw.indent",OUTDENT:"motw.outdent",NEW_SECTION:"motw.newSection",INSERT_SECTION_WITH_TITLE:"motw.insertSectionWithTitle",
BOLD:"motw.bold",ITALIC:"motw.italic",MONOSPACED:"motw.monospaced",HYPERLINK:"motw.hyperlink",INLINE_LATEX:"motw.inlineLatex",BULLETED_LIST:"motw.bulletedList",NUMBERED_LIST:"motw.numberedList",IMAGE:"motw.image",PREFORMATTED_TEXT:"motw.preformattedText",CODE:"motw.code",DISPLAY_LATEX:"motw.displayLatex",PUBLISH_AS_HTML:"motw.publishAsHtml",PUBLISH_AS_PDF:"motw.publishAsPdf",BREAKPOINTS:"motw.breakpoints",CLEAR_ALL_BREAKPOINTS:"motw.clearAllBreakpoints",TOGGLE_BREAKPOINT:"motw.toggleBreakpoint",TOGGLE_ENABLE_BREAKPOINT:"motw.toggleEnableBreakpoint",
TOGGLE_STOP_IF_ERROR:"motw.stopIfError",TOGGLE_STOP_IF_WARNING:"motw.stopIfWarning",TOGGLE_STOP_IF_NAN_INF:"motw.stopIfNanInf",SAVEAS:"motw.saveAs",EXPORT_AS_MFILE:"motw.exportAsMFile",UNDO_EDITOR:"motw.undoEditor",REDO_EDITOR:"motw.redoEditor",VERSION_LIST:"motw.versionList",GET_OLDER_VERSION:"motw.getOlderVersion",GET_NEWER_VERSION:"motw.getNewerVersion",RESTORE_AS_LATEST:"motw.restoreAsLatest"}})},"MOTW/editor/actions/EquationEditorActionIdConstants":function(){define(["./LiveEditorConstants",
"MW/equations/editor/utils/Templates"],function(g,f){function e(b,a,c){d.ids[b]=g.MOTW_PREFIX+a;c&&(d.rtcAttributes[b]=c)}var d={ids:{},rtcAttributes:{}};e("BOLD","equationeditor.format.bold",{selected:!1});e("ITALIC","equationeditor.format.italic",{selected:!1});f.getCommands().forEach(function(b){var a=b.replace(/([A-Z])/g,function(a){return"_"+a+"_"}).toUpperCase();e("INSERT_"+a,"equationeditor.insert."+b)});return d})},"MOTW/editor/actions/LiveEditorConstants":function(){define([],function(){return{MOTW_PREFIX:"motw.liveeditor."}})},
"MOTW/toolstrip/equationGalleries/EquationEditorStructuresGalleryManager":function(){define(["dojo/_base/declare","dijit/registry","MOTW/toolstrip/configs/editor/EquationEditorStructuresGalleryPopupConfig","../managers/GalleryManagerBase"],function(g,f,e,d){return g([d],{constructor:function(){this._galleryTag="motwToolstrip.equationEditorTab.structures.gallery";this._galleryPopupTag="motwToolstrip.equationEditorTab.structures.galleryPopup"},buildGalleryPopup:function(){var b=this._uiBuilder;b.createGalleryPopupFromConfig(e);
"superscript frac sqrt subscript subsuperscript sumdef intdef".split(" ").forEach(function(a){b.addGalleryItemToFavorites("motwToolstrip.equationEditorTab.structures."+a)})},postPopulateGallery:function(){this._galleryId=this._uiBuilder.tagToId(this._galleryTag);this._galleryWidget=f.byId(this._galleryId);this._postPopulateGallery()}})})},"MOTW/toolstrip/configs/editor/EquationEditorStructuresGalleryPopupConfig":function(){define(["MW/toolstrip/constants/TypeConstants","MOTW/editor/actions/EquationEditorActionIdConstants",
"dojo/i18n!MOTW/l10n/nls/equationeditor"],function(g,f,e){return{type:g.GALLERY_POPUP,tag:"motwToolstrip.equationEditorTab.structures.galleryPopup",galleryItemTextLineCount:1,favCategoryId:"motwToolstrip.equationEditorTab.structures.favorites",children:[{tag:"motwToolstrip.equationEditorTab.structures.favorites",type:g.GALLERY_FAVORITE_CATEGORY},{tag:"motwToolstrip.equationEditorTab.structures.script",type:g.GALLERY_CATEGORY,title:e.categoryScript,children:[{tag:"motwToolstrip.equationEditorTab.structures.superscript",
type:g.GALLERY_ITEM,text:e.superscript,description:e.superscriptDescription,actionId:f.ids.INSERT_SUPERSCRIPT,icon:"gallerySuperscript"},{tag:"motwToolstrip.equationEditorTab.structures.subscript",type:g.GALLERY_ITEM,text:e.subscript,description:e.subscriptDescription,actionId:f.ids.INSERT_SUBSCRIPT,icon:"gallerySubscript"},{tag:"motwToolstrip.equationEditorTab.structures.subsuperscript",type:g.GALLERY_ITEM,text:e.subsuperscript,description:e.subsuperscriptDescription,actionId:f.ids.INSERT_SUBSUPERSCRIPT,
icon:"gallerySupersubscript"},{tag:"motwToolstrip.equationEditorTab.structures.multiscript",type:g.GALLERY_ITEM,text:e.multiscript,description:e.multiscriptDescription,actionId:f.ids.INSERT_MULTISCRIPT,icon:"galleryMultiscript"},{tag:"motwToolstrip.equationEditorTab.structures.over",type:g.GALLERY_ITEM,text:e.over,description:e.overDescription,actionId:f.ids.INSERT_OVER,icon:"galleryOver"},{tag:"motwToolstrip.equationEditorTab.structures.under",type:g.GALLERY_ITEM,text:e.under,description:e.underDescription,
actionId:f.ids.INSERT_UNDER,icon:"galleryUnder"},{tag:"motwToolstrip.equationEditorTab.structures.underover",type:g.GALLERY_ITEM,text:e.underover,description:e.underoverDescription,actionId:f.ids.INSERT_UNDEROVER,icon:"galleryUnderover"}]},{tag:"motwToolstrip.equationEditorTab.structures.fractionsAndRadicals",type:g.GALLERY_CATEGORY,title:e.categoryFractionsAndRadicals,children:[{tag:"motwToolstrip.equationEditorTab.structures.frac",type:g.GALLERY_ITEM,text:e.frac,description:e.fracDescription,actionId:f.ids.INSERT_FRAC,
icon:"galleryFrac"},{tag:"motwToolstrip.equationEditorTab.structures.fracbevelled",type:g.GALLERY_ITEM,text:e.fracbevelled,description:e.fracbevelledDescription,actionId:f.ids.INSERT_FRACBEVELLED,icon:"galleryFracbevelled"},{tag:"motwToolstrip.equationEditorTab.structures.fracinline",type:g.GALLERY_ITEM,text:e.fracinline,description:e.fracinlineDescription,actionId:f.ids.INSERT_FRACINLINE,icon:"galleryFracinline"},{tag:"motwToolstrip.equationEditorTab.structures.sqrt",type:g.GALLERY_ITEM,text:e.sqrt,
description:e.sqrtDescription,actionId:f.ids.INSERT_SQRT,icon:"gallerySqrt"},{tag:"motwToolstrip.equationEditorTab.structures.root",type:g.GALLERY_ITEM,text:e.root,description:e.rootDescription,actionId:f.ids.INSERT_ROOT,icon:"galleryRoot"}]},{tag:"motwToolstrip.equationEditorTab.structures.operators",type:g.GALLERY_CATEGORY,title:e.categoryOperators,children:[{tag:"motwToolstrip.equationEditorTab.structures.int",type:g.GALLERY_ITEM,text:e["int"],description:e.intDescription,actionId:f.ids.INSERT_INT,
icon:"galleryInt"},{tag:"motwToolstrip.equationEditorTab.structures.intdef",type:g.GALLERY_ITEM,text:e.intdef,description:e.intdefDescription,actionId:f.ids.INSERT_INTDEF,icon:"galleryIntdef"},{tag:"motwToolstrip.equationEditorTab.structures.oint",type:g.GALLERY_ITEM,text:e.oint,description:e.ointDescription,actionId:f.ids.INSERT_OINT,icon:"galleryOint"},{tag:"motwToolstrip.equationEditorTab.structures.ointdef",type:g.GALLERY_ITEM,text:e.ointdef,description:e.ointdefDescription,actionId:f.ids.INSERT_OINTDEF,
icon:"galleryOintdef"},{tag:"motwToolstrip.equationEditorTab.structures.sum",type:g.GALLERY_ITEM,text:e.sum,description:e.sumDescription,actionId:f.ids.INSERT_SUM,icon:"gallerySum"},{tag:"motwToolstrip.equationEditorTab.structures.sumdef",type:g.GALLERY_ITEM,text:e.sumdef,description:e.sumdefDescription,actionId:f.ids.INSERT_SUMDEF,icon:"gallerySumdef"},{tag:"motwToolstrip.equationEditorTab.structures.prod",type:g.GALLERY_ITEM,text:e.prod,description:e.prodDescription,actionId:f.ids.INSERT_PROD,icon:"galleryProd"},
{tag:"motwToolstrip.equationEditorTab.structures.proddef",type:g.GALLERY_ITEM,text:e.proddef,description:e.proddefDescription,actionId:f.ids.INSERT_PRODDEF,icon:"galleryProddef"},{tag:"motwToolstrip.equationEditorTab.structures.lim",type:g.GALLERY_ITEM,text:e.lim,description:e.limDescription,actionId:f.ids.INSERT_LIM,icon:"galleryLim"}]},{tag:"motwToolstrip.equationEditorTab.structures.misc",type:g.GALLERY_CATEGORY,title:e.categoryMisc,children:[{tag:"motwToolstrip.equationEditorTab.structures.cases",
type:g.GALLERY_ITEM,text:e.cases,description:e.casesDescription,actionId:f.ids.INSERT_CASES,icon:"galleryCases"},{tag:"motwToolstrip.equationEditorTab.structures.derivative",type:g.GALLERY_ITEM,text:e.derivative,description:e.derivativeDescription,actionId:f.ids.INSERT_DERIVATIVE,icon:"galleryDerivative"},{tag:"motwToolstrip.equationEditorTab.structures.derivativeN",type:g.GALLERY_ITEM,text:e.derivativeN,description:e.derivativeNDescription,actionId:f.ids.INSERT_DERIVATIVE_N_,icon:"galleryDerivativeN"},
{tag:"motwToolstrip.equationEditorTab.structures.partialderivative",type:g.GALLERY_ITEM,text:e.partialderivative,description:e.partialderivativeDescription,actionId:f.ids.INSERT_PARTIALDERIVATIVE,icon:"galleryPartialDerivative"},{tag:"motwToolstrip.equationEditorTab.structures.partialderivativeN",type:g.GALLERY_ITEM,text:e.partialderivativeN,description:e.partialderivativeNDescription,actionId:f.ids.INSERT_PARTIALDERIVATIVE_N_,icon:"galleryPartialDerivativeN"}]},{tag:"motwToolstrip.equationEditorTab.structures.bracketpairs",
type:g.GALLERY_CATEGORY,title:e.categoryBracketPairs,children:[{tag:"motwToolstrip.equationEditorTab.structures.parentheses",type:g.GALLERY_ITEM,text:e.parentheses,description:e.parenthesesDescription,actionId:f.ids.INSERT_PARENTHESES,icon:"galleryParentheses"},{tag:"motwToolstrip.equationEditorTab.structures.brackets",type:g.GALLERY_ITEM,text:e.brackets,description:e.bracketsDescription,actionId:f.ids.INSERT_BRACKETS,icon:"galleryBrackets"},{tag:"motwToolstrip.equationEditorTab.structures.braces",
type:g.GALLERY_ITEM,text:e.braces,description:e.bracesDescription,actionId:f.ids.INSERT_BRACES,icon:"galleryBraces"},{tag:"motwToolstrip.equationEditorTab.structures.ceil",type:g.GALLERY_ITEM,text:e.ceil,description:e.ceilDescription,actionId:f.ids.INSERT_CEIL,icon:"galleryCeil"},{tag:"motwToolstrip.equationEditorTab.structures.floor",type:g.GALLERY_ITEM,text:e.floor,description:e.floorDescription,actionId:f.ids.INSERT_FLOOR,icon:"galleryFloor"},{tag:"motwToolstrip.equationEditorTab.structures.anglebracket",
type:g.GALLERY_ITEM,text:e.anglebracket,description:e.anglebracketDescription,actionId:f.ids.INSERT_ANGLEBRACKET,icon:"galleryAnglebracket"},{tag:"motwToolstrip.equationEditorTab.structures.bars",type:g.GALLERY_ITEM,text:e.bars,description:e.barsDescription,actionId:f.ids.INSERT_BARS,icon:"galleryBars"},{tag:"motwToolstrip.equationEditorTab.structures.doublebars",type:g.GALLERY_ITEM,text:e.doublebars,description:e.doublebarsDescription,actionId:f.ids.INSERT_DOUBLEBARS,icon:"galleryDoublebars"}]},
{tag:"motwToolstrip.equationEditorTab.structures.accents",type:g.GALLERY_CATEGORY,title:e.categoryAccents,children:[{tag:"motwToolstrip.equationEditorTab.structures.hat",type:g.GALLERY_ITEM,text:e.hat,description:e.hatDescription,actionId:f.ids.INSERT_HAT,icon:"galleryHat"},{tag:"motwToolstrip.equationEditorTab.structures.breve",type:g.GALLERY_ITEM,text:e.breve,description:e.breveDescription,actionId:f.ids.INSERT_BREVE,icon:"galleryBreve"},{tag:"motwToolstrip.equationEditorTab.structures.grave",type:g.GALLERY_ITEM,
text:e.grave,description:e.graveDescription,actionId:f.ids.INSERT_GRAVE,icon:"galleryGrave"},{tag:"motwToolstrip.equationEditorTab.structures.bar",type:g.GALLERY_ITEM,text:e.bar,description:e.barDescription,actionId:f.ids.INSERT_BAR,icon:"galleryBar"},{tag:"motwToolstrip.equationEditorTab.structures.dot",type:g.GALLERY_ITEM,text:e.dot,description:e.dotDescription,actionId:f.ids.INSERT_DOT,icon:"galleryDot"},{tag:"motwToolstrip.equationEditorTab.structures.check",type:g.GALLERY_ITEM,text:e.check,description:e.checkDescription,
actionId:f.ids.INSERT_CHECK,icon:"galleryCheck"},{tag:"motwToolstrip.equationEditorTab.structures.acute",type:g.GALLERY_ITEM,text:e.acute,description:e.acuteDescription,actionId:f.ids.INSERT_ACUTE,icon:"galleryAcute"},{tag:"motwToolstrip.equationEditorTab.structures.tilde",type:g.GALLERY_ITEM,text:e.tilde,description:e.tildeDescription,actionId:f.ids.INSERT_TILDE,icon:"galleryTilde"},{tag:"motwToolstrip.equationEditorTab.structures.vec",type:g.GALLERY_ITEM,text:e.vec,description:e.vecDescription,
actionId:f.ids.INSERT_VEC,icon:"galleryOverrightarrow"},{tag:"motwToolstrip.equationEditorTab.structures.ddot",type:g.GALLERY_ITEM,text:e.ddot,description:e.ddotDescription,actionId:f.ids.INSERT_DDOT,icon:"galleryDdot"},{tag:"motwToolstrip.equationEditorTab.structures.widehat",type:g.GALLERY_ITEM,text:e.widehat,description:e.widehatDescription,actionId:f.ids.INSERT_WIDEHAT,icon:"galleryWidehat"},{tag:"motwToolstrip.equationEditorTab.structures.widetilde",type:g.GALLERY_ITEM,text:e.widetilde,description:e.widetildeDescription,
actionId:f.ids.INSERT_WIDETILDE,icon:"galleryWidetilde"},{tag:"motwToolstrip.equationEditorTab.structures.overleftarrow",type:g.GALLERY_ITEM,text:e.overleftarrow,description:e.overleftarrowDescription,actionId:f.ids.INSERT_OVERLEFTARROW,icon:"galleryOverleftarrow"},{tag:"motwToolstrip.equationEditorTab.structures.overrightarrow",type:g.GALLERY_ITEM,text:e.overrightarrow,description:e.overrightarrowDescription,actionId:f.ids.INSERT_OVERRIGHTARROW,icon:"galleryOverrightarrow"},{tag:"motwToolstrip.equationEditorTab.structures.overleftrightarrow",
type:g.GALLERY_ITEM,text:e.overleftrightarrow,description:e.overleftrightarrowDescription,actionId:f.ids.INSERT_OVERLEFTRIGHTARROW,icon:"galleryOverleftrightarrow"},{tag:"motwToolstrip.equationEditorTab.structures.overbrace",type:g.GALLERY_ITEM,text:e.overbrace,description:e.overbraceDescription,actionId:f.ids.INSERT_OVERBRACE,icon:"galleryOverbrace"},{tag:"motwToolstrip.equationEditorTab.structures.overline",type:g.GALLERY_ITEM,text:e.overline,description:e.overlineDescription,actionId:f.ids.INSERT_OVERLINE,
icon:"galleryOverline"},{tag:"motwToolstrip.equationEditorTab.structures.underbrace",type:g.GALLERY_ITEM,text:e.underbrace,description:e.underbraceDescription,actionId:f.ids.INSERT_UNDERBRACE,icon:"galleryUnderbrace"},{tag:"motwToolstrip.equationEditorTab.structures.underline",type:g.GALLERY_ITEM,text:e.underline,description:e.underlineDescription,actionId:f.ids.INSERT_UNDERLINE,icon:"galleryUnderline"}]}]}})},"MOTW/toolstrip/equationGalleries/EquationEditorSymbolsGalleryManager":function(){define(["dojo/_base/declare",
"dijit/registry","MOTW/toolstrip/configs/editor/EquationEditorSymbolsGalleryPopupConfig","../managers/GalleryManagerBase"],function(g,f,e,d){return g([d],{constructor:function(){this._galleryTag="motwToolstrip.equationEditorTab.symbols.gallery";this._galleryPopupTag="motwToolstrip.equationEditorTab.symbols.galleryPopup"},buildGalleryPopup:function(){var b=this._uiBuilder;b.createGalleryPopupFromConfig(e);"alpha lambda pi sigma Delta Lambda infty nabla cdot cdots ddots vdots neq leq geq approx in".split(" ").forEach(function(a){b.addGalleryItemToFavorites("motwToolstrip.equationEditorTab.symbols."+
a)})},postPopulateGallery:function(){this._galleryId=this._uiBuilder.tagToId(this._galleryTag);this._galleryWidget=f.byId(this._galleryId);this._postPopulateGallery()}})})},"MOTW/toolstrip/configs/editor/EquationEditorSymbolsGalleryPopupConfig":function(){define(["MW/toolstrip/constants/TypeConstants","MOTW/editor/actions/EquationEditorActionIdConstants","dojo/i18n!MOTW/l10n/nls/equationeditor"],function(g,f,e){return{type:g.GALLERY_POPUP,tag:"motwToolstrip.equationEditorTab.symbols.galleryPopup",
galleryItemWidth:50,galleryItemRowCount:3,galleryItemTextLineCount:0,favCategoryId:"motwToolstrip.equationEditorTab.symbols.favorites",children:[{tag:"motwToolstrip.equationEditorTab.symbols.favorites",type:g.GALLERY_FAVORITE_CATEGORY},{tag:"motwToolstrip.equationEditorTab.symbols.greekLetters",type:g.GALLERY_CATEGORY,title:e.categoryGreekLetters,children:[{tag:"motwToolstrip.equationEditorTab.symbols.alpha",type:g.GALLERY_ITEM,text:e.alpha,description:e.alphaDescription,actionId:f.ids.INSERT_ALPHA,
icon:"galleryalpha"},{tag:"motwToolstrip.equationEditorTab.symbols.beta",type:g.GALLERY_ITEM,text:e.beta,description:e.betaDescription,actionId:f.ids.INSERT_BETA,icon:"gallerybeta"},{tag:"motwToolstrip.equationEditorTab.symbols.gamma",type:g.GALLERY_ITEM,text:e.gamma,description:e.gammaDescription,actionId:f.ids.INSERT_GAMMA,icon:"gallerygamma"},{tag:"motwToolstrip.equationEditorTab.symbols.delta",type:g.GALLERY_ITEM,text:e.delta,description:e.deltaDescription,actionId:f.ids.INSERT_DELTA,icon:"gallerydelta"},
{tag:"motwToolstrip.equationEditorTab.symbols.epsilon",type:g.GALLERY_ITEM,text:e.epsilon,description:e.epsilonDescription,actionId:f.ids.INSERT_EPSILON,icon:"galleryepsilon"},{tag:"motwToolstrip.equationEditorTab.symbols.varepsilon",type:g.GALLERY_ITEM,text:e.varepsilon,description:e.varepsilonDescription,actionId:f.ids.INSERT_VAREPSILON,icon:"galleryvarepsilon"},{tag:"motwToolstrip.equationEditorTab.symbols.zeta",type:g.GALLERY_ITEM,text:e.zeta,description:e.zetaDescription,actionId:f.ids.INSERT_ZETA,
icon:"galleryzeta"},{tag:"motwToolstrip.equationEditorTab.symbols.eta",type:g.GALLERY_ITEM,text:e.eta,description:e.etaDescription,actionId:f.ids.INSERT_ETA,icon:"galleryeta"},{tag:"motwToolstrip.equationEditorTab.symbols.theta",type:g.GALLERY_ITEM,text:e.theta,description:e.thetaDescription,actionId:f.ids.INSERT_THETA,icon:"gallerytheta"},{tag:"motwToolstrip.equationEditorTab.symbols.vartheta",type:g.GALLERY_ITEM,text:e.vartheta,description:e.varthetaDescription,actionId:f.ids.INSERT_VARTHETA,icon:"galleryvartheta"},
{tag:"motwToolstrip.equationEditorTab.symbols.iota",type:g.GALLERY_ITEM,text:e.iota,description:e.iotaDescription,actionId:f.ids.INSERT_IOTA,icon:"galleryiota"},{tag:"motwToolstrip.equationEditorTab.symbols.kappa",type:g.GALLERY_ITEM,text:e.kappa,description:e.kappaDescription,actionId:f.ids.INSERT_KAPPA,icon:"gallerykappa"},{tag:"motwToolstrip.equationEditorTab.symbols.lambda",type:g.GALLERY_ITEM,text:e.lambda,description:e.lambdaDescription,actionId:f.ids.INSERT_LAMBDA,icon:"gallerylambda"},{tag:"motwToolstrip.equationEditorTab.symbols.mu",
type:g.GALLERY_ITEM,text:e.mu,description:e.muDescription,actionId:f.ids.INSERT_MU,icon:"gallerymu"},{tag:"motwToolstrip.equationEditorTab.symbols.nu",type:g.GALLERY_ITEM,text:e.nu,description:e.nuDescription,actionId:f.ids.INSERT_NU,icon:"gallerynu"},{tag:"motwToolstrip.equationEditorTab.symbols.xi",type:g.GALLERY_ITEM,text:e.xi,description:e.xiDescription,actionId:f.ids.INSERT_XI,icon:"galleryxi"},{tag:"motwToolstrip.equationEditorTab.symbols.omicron",type:g.GALLERY_ITEM,text:e.omicron,description:e.omicronDescription,
actionId:f.ids.INSERT_OMICRON,icon:"galleryomicron"},{tag:"motwToolstrip.equationEditorTab.symbols.pi",type:g.GALLERY_ITEM,text:e.pi,description:e.piDescription,actionId:f.ids.INSERT_PI,icon:"gallerypi"},{tag:"motwToolstrip.equationEditorTab.symbols.varpi",type:g.GALLERY_ITEM,text:e.varpi,description:e.varpiDescription,actionId:f.ids.INSERT_VARPI,icon:"galleryvarpi"},{tag:"motwToolstrip.equationEditorTab.symbols.rho",type:g.GALLERY_ITEM,text:e.rho,description:e.rhoDescription,actionId:f.ids.INSERT_RHO,
icon:"galleryrho"},{tag:"motwToolstrip.equationEditorTab.symbols.varrho",type:g.GALLERY_ITEM,text:e.varrho,description:e.varrhoDescription,actionId:f.ids.INSERT_VARRHO,icon:"galleryvarrho"},{tag:"motwToolstrip.equationEditorTab.symbols.sigma",type:g.GALLERY_ITEM,text:e.sigma,description:e.sigmaDescription,actionId:f.ids.INSERT_SIGMA,icon:"gallerysigma"},{tag:"motwToolstrip.equationEditorTab.symbols.varsigma",type:g.GALLERY_ITEM,text:e.varsigma,description:e.varsigmaDescription,actionId:f.ids.INSERT_VARSIGMA,
icon:"galleryvarsigma"},{tag:"motwToolstrip.equationEditorTab.symbols.tau",type:g.GALLERY_ITEM,text:e.tau,description:e.tauDescription,actionId:f.ids.INSERT_TAU,icon:"gallerytau"},{tag:"motwToolstrip.equationEditorTab.symbols.upsilon",type:g.GALLERY_ITEM,text:e.upsilon,description:e.upsilonDescription,actionId:f.ids.INSERT_UPSILON,icon:"galleryupsilon"},{tag:"motwToolstrip.equationEditorTab.symbols.phi",type:g.GALLERY_ITEM,text:e.phi,description:e.phiDescription,actionId:f.ids.INSERT_PHI,icon:"galleryphi"},
{tag:"motwToolstrip.equationEditorTab.symbols.varphi",type:g.GALLERY_ITEM,text:e.varphi,description:e.varphiDescription,actionId:f.ids.INSERT_VARPHI,icon:"galleryvarphi"},{tag:"motwToolstrip.equationEditorTab.symbols.chi",type:g.GALLERY_ITEM,text:e.chi,description:e.chiDescription,actionId:f.ids.INSERT_CHI,icon:"gallerychi"},{tag:"motwToolstrip.equationEditorTab.symbols.psi",type:g.GALLERY_ITEM,text:e.psi,description:e.psiDescription,actionId:f.ids.INSERT_PSI,icon:"gallerypsi"},{tag:"motwToolstrip.equationEditorTab.symbols.omega",
type:g.GALLERY_ITEM,text:e.omega,description:e.omegaDescription,actionId:f.ids.INSERT_OMEGA,icon:"galleryomega"},{tag:"motwToolstrip.equationEditorTab.symbols.Alpha",type:g.GALLERY_ITEM,text:e.Alpha,description:e.AlphaDescription,actionId:f.ids.INSERT__A_LPHA,icon:"galleryAlpha"},{tag:"motwToolstrip.equationEditorTab.symbols.Beta",type:g.GALLERY_ITEM,text:e.Beta,description:e.BetaDescription,actionId:f.ids.INSERT__B_ETA,icon:"galleryBeta"},{tag:"motwToolstrip.equationEditorTab.symbols.Gamma",type:g.GALLERY_ITEM,
text:e.Gamma,description:e.GammaDescription,actionId:f.ids.INSERT__G_AMMA,icon:"galleryGamma"},{tag:"motwToolstrip.equationEditorTab.symbols.Delta",type:g.GALLERY_ITEM,text:e.Delta,description:e.DeltaDescription,actionId:f.ids.INSERT__D_ELTA,icon:"galleryDelta"},{tag:"motwToolstrip.equationEditorTab.symbols.Epsilon",type:g.GALLERY_ITEM,text:e.Epsilon,description:e.EpsilonDescription,actionId:f.ids.INSERT__E_PSILON,icon:"galleryEpsilon"},{tag:"motwToolstrip.equationEditorTab.symbols.Zeta",type:g.GALLERY_ITEM,
text:e.Zeta,description:e.ZetaDescription,actionId:f.ids.INSERT__Z_ETA,icon:"galleryZeta"},{tag:"motwToolstrip.equationEditorTab.symbols.Eta",type:g.GALLERY_ITEM,text:e.Eta,description:e.EtaDescription,actionId:f.ids.INSERT__E_TA,icon:"galleryEta"},{tag:"motwToolstrip.equationEditorTab.symbols.Theta",type:g.GALLERY_ITEM,text:e.Theta,description:e.ThetaDescription,actionId:f.ids.INSERT__T_HETA,icon:"galleryTheta"},{tag:"motwToolstrip.equationEditorTab.symbols.Iota",type:g.GALLERY_ITEM,text:e.Iota,
description:e.IotaDescription,actionId:f.ids.INSERT__I_OTA,icon:"galleryIota"},{tag:"motwToolstrip.equationEditorTab.symbols.Kappa",type:g.GALLERY_ITEM,text:e.Kappa,description:e.KappaDescription,actionId:f.ids.INSERT__K_APPA,icon:"galleryKappa"},{tag:"motwToolstrip.equationEditorTab.symbols.Lambda",type:g.GALLERY_ITEM,text:e.Lambda,description:e.LambdaDescription,actionId:f.ids.INSERT__L_AMBDA,icon:"galleryLambda"},{tag:"motwToolstrip.equationEditorTab.symbols.Mu",type:g.GALLERY_ITEM,text:e.Mu,description:e.MuDescription,
actionId:f.ids.INSERT__M_U,icon:"galleryMu"},{tag:"motwToolstrip.equationEditorTab.symbols.Nu",type:g.GALLERY_ITEM,text:e.Nu,description:e.NuDescription,actionId:f.ids.INSERT__N_U,icon:"galleryNu"},{tag:"motwToolstrip.equationEditorTab.symbols.Xi",type:g.GALLERY_ITEM,text:e.Xi,description:e.XiDescription,actionId:f.ids.INSERT__X_I,icon:"galleryXi"},{tag:"motwToolstrip.equationEditorTab.symbols.Omicron",type:g.GALLERY_ITEM,text:e.Omicron,description:e.OmicronDescription,actionId:f.ids.INSERT__O_MICRON,
icon:"galleryOmicron"},{tag:"motwToolstrip.equationEditorTab.symbols.Pi",type:g.GALLERY_ITEM,text:e.Pi,description:e.PiDescription,actionId:f.ids.INSERT__P_I,icon:"galleryPi"},{tag:"motwToolstrip.equationEditorTab.symbols.Rho",type:g.GALLERY_ITEM,text:e.Rho,description:e.RhoDescription,actionId:f.ids.INSERT__R_HO,icon:"galleryRho"},{tag:"motwToolstrip.equationEditorTab.symbols.Sigma",type:g.GALLERY_ITEM,text:e.Sigma,description:e.SigmaDescription,actionId:f.ids.INSERT__S_IGMA,icon:"gallerySigma"},
{tag:"motwToolstrip.equationEditorTab.symbols.Tau",type:g.GALLERY_ITEM,text:e.Tau,description:e.TauDescription,actionId:f.ids.INSERT__T_AU,icon:"galleryTau"},{tag:"motwToolstrip.equationEditorTab.symbols.Upsilon",type:g.GALLERY_ITEM,text:e.Upsilon,description:e.UpsilonDescription,actionId:f.ids.INSERT__U_PSILON,icon:"galleryUpsilon"},{tag:"motwToolstrip.equationEditorTab.symbols.Phi",type:g.GALLERY_ITEM,text:e.Phi,description:e.PhiDescription,actionId:f.ids.INSERT__P_HI,icon:"galleryPhi"},{tag:"motwToolstrip.equationEditorTab.symbols.Chi",
type:g.GALLERY_ITEM,text:e.Chi,description:e.ChiDescription,actionId:f.ids.INSERT__C_HI,icon:"galleryChi"},{tag:"motwToolstrip.equationEditorTab.symbols.Psi",type:g.GALLERY_ITEM,text:e.Psi,description:e.PsiDescription,actionId:f.ids.INSERT__P_SI,icon:"galleryPsi"},{tag:"motwToolstrip.equationEditorTab.symbols.Omega",type:g.GALLERY_ITEM,text:e.Omega,description:e.OmegaDescription,actionId:f.ids.INSERT__O_MEGA,icon:"galleryOmega"}]},{tag:"motwToolstrip.equationEditorTab.symbols.operatorSymbols",type:g.GALLERY_CATEGORY,
title:e.categoryOperatorSymbols,children:[{tag:"motwToolstrip.equationEditorTab.symbols.pm",type:g.GALLERY_ITEM,text:e.pm,description:e.pmDescription,actionId:f.ids.INSERT_PM,icon:"gallerypm"},{tag:"motwToolstrip.equationEditorTab.symbols.mp",type:g.GALLERY_ITEM,text:e.mp,description:e.mpDescription,actionId:f.ids.INSERT_MP,icon:"gallerymp"},{tag:"motwToolstrip.equationEditorTab.symbols.times",type:g.GALLERY_ITEM,text:e.times,description:e.timesDescription,actionId:f.ids.INSERT_TIMES,icon:"gallerytimes"},
{tag:"motwToolstrip.equationEditorTab.symbols.div",type:g.GALLERY_ITEM,text:e.div,description:e.divDescription,actionId:f.ids.INSERT_DIV,icon:"gallerydiv"},{tag:"motwToolstrip.equationEditorTab.symbols.cdot",type:g.GALLERY_ITEM,text:e.cdot,description:e.cdotDescription,actionId:f.ids.INSERT_CDOT,icon:"gallerycdot"},{tag:"motwToolstrip.equationEditorTab.symbols.ast",type:g.GALLERY_ITEM,text:e.ast,description:e.astDescription,actionId:f.ids.INSERT_AST,icon:"galleryast"},{tag:"motwToolstrip.equationEditorTab.symbols.star",
type:g.GALLERY_ITEM,text:e.star,description:e.starDescription,actionId:f.ids.INSERT_STAR,icon:"gallerystar"},{tag:"motwToolstrip.equationEditorTab.symbols.dagger",type:g.GALLERY_ITEM,text:e.dagger,description:e.daggerDescription,actionId:f.ids.INSERT_DAGGER,icon:"gallerydagger"},{tag:"motwToolstrip.equationEditorTab.symbols.ddagger",type:g.GALLERY_ITEM,text:e.ddagger,description:e.ddaggerDescription,actionId:f.ids.INSERT_DDAGGER,icon:"galleryddagger"},{tag:"motwToolstrip.equationEditorTab.symbols.amalg",
type:g.GALLERY_ITEM,text:e.amalg,description:e.amalgDescription,actionId:f.ids.INSERT_AMALG,icon:"galleryamalg"},{tag:"motwToolstrip.equationEditorTab.symbols.cap",type:g.GALLERY_ITEM,text:e.cap,description:e.capDescription,actionId:f.ids.INSERT_CAP,icon:"gallerycap"},{tag:"motwToolstrip.equationEditorTab.symbols.cup",type:g.GALLERY_ITEM,text:e.cup,description:e.cupDescription,actionId:f.ids.INSERT_CUP,icon:"gallerycup"},{tag:"motwToolstrip.equationEditorTab.symbols.uplus",type:g.GALLERY_ITEM,text:e.uplus,
description:e.uplusDescription,actionId:f.ids.INSERT_UPLUS,icon:"galleryuplus"},{tag:"motwToolstrip.equationEditorTab.symbols.sqcap",type:g.GALLERY_ITEM,text:e.sqcap,description:e.sqcapDescription,actionId:f.ids.INSERT_SQCAP,icon:"gallerysqcap"},{tag:"motwToolstrip.equationEditorTab.symbols.sqcup",type:g.GALLERY_ITEM,text:e.sqcup,description:e.sqcupDescription,actionId:f.ids.INSERT_SQCUP,icon:"gallerysqcup"},{tag:"motwToolstrip.equationEditorTab.symbols.vee",type:g.GALLERY_ITEM,text:e.vee,description:e.veeDescription,
actionId:f.ids.INSERT_VEE,icon:"galleryvee"},{tag:"motwToolstrip.equationEditorTab.symbols.wedge",type:g.GALLERY_ITEM,text:e.wedge,description:e.wedgeDescription,actionId:f.ids.INSERT_WEDGE,icon:"gallerywedge"},{tag:"motwToolstrip.equationEditorTab.symbols.setminus",type:g.GALLERY_ITEM,text:e.setminus,description:e.setminusDescription,actionId:f.ids.INSERT_SETMINUS,icon:"gallerysetminus"},{tag:"motwToolstrip.equationEditorTab.symbols.wr",type:g.GALLERY_ITEM,text:e.wr,description:e.wrDescription,actionId:f.ids.INSERT_WR,
icon:"gallerywr"},{tag:"motwToolstrip.equationEditorTab.symbols.circ",type:g.GALLERY_ITEM,text:e.circ,description:e.circDescription,actionId:f.ids.INSERT_CIRC,icon:"gallerycirc"},{tag:"motwToolstrip.equationEditorTab.symbols.bullet",type:g.GALLERY_ITEM,text:e.bullet,description:e.bulletDescription,actionId:f.ids.INSERT_BULLET,icon:"gallerybullet"},{tag:"motwToolstrip.equationEditorTab.symbols.oslash",type:g.GALLERY_ITEM,text:e.oslash,description:e.oslashDescription,actionId:f.ids.INSERT_OSLASH,icon:"galleryoslash"},
{tag:"motwToolstrip.equationEditorTab.symbols.odot",type:g.GALLERY_ITEM,text:e.odot,description:e.odotDescription,actionId:f.ids.INSERT_ODOT,icon:"galleryodot"},{tag:"motwToolstrip.equationEditorTab.symbols.bigcirc",type:g.GALLERY_ITEM,text:e.bigcirc,description:e.bigcircDescription,actionId:f.ids.INSERT_BIGCIRC,icon:"gallerybigcirc"},{tag:"motwToolstrip.equationEditorTab.symbols.bigtriangleup",type:g.GALLERY_ITEM,text:e.bigtriangleup,description:e.bigtriangleupDescription,actionId:f.ids.INSERT_BIGTRIANGLEUP,
icon:"gallerybigtriangleup"},{tag:"motwToolstrip.equationEditorTab.symbols.bigtriangledown",type:g.GALLERY_ITEM,text:e.bigtriangledown,description:e.bigtriangledownDescription,actionId:f.ids.INSERT_BIGTRIANGLEDOWN,icon:"gallerybigtriangledown"},{tag:"motwToolstrip.equationEditorTab.symbols.triangleleft",type:g.GALLERY_ITEM,text:e.triangleleft,description:e.triangleleftDescription,actionId:f.ids.INSERT_TRIANGLELEFT,icon:"gallerytriangleleft"},{tag:"motwToolstrip.equationEditorTab.symbols.triangleright",
type:g.GALLERY_ITEM,text:e.triangleright,description:e.trianglerightDescription,actionId:f.ids.INSERT_TRIANGLERIGHT,icon:"gallerytriangleright"},{tag:"motwToolstrip.equationEditorTab.symbols.oplus",type:g.GALLERY_ITEM,text:e.oplus,description:e.oplusDescription,actionId:f.ids.INSERT_OPLUS,icon:"galleryoplus"},{tag:"motwToolstrip.equationEditorTab.symbols.ominus",type:g.GALLERY_ITEM,text:e.ominus,description:e.ominusDescription,actionId:f.ids.INSERT_OMINUS,icon:"galleryominus"},{tag:"motwToolstrip.equationEditorTab.symbols.otimes",
type:g.GALLERY_ITEM,text:e.otimes,description:e.otimesDescription,actionId:f.ids.INSERT_OTIMES,icon:"galleryotimes"},{tag:"motwToolstrip.equationEditorTab.symbols.bot",type:g.GALLERY_ITEM,text:e.bot,description:e.botDescription,actionId:f.ids.INSERT_BOT,icon:"gallerybot"},{tag:"motwToolstrip.equationEditorTab.symbols.top",type:g.GALLERY_ITEM,text:e.top,description:e.topDescription,actionId:f.ids.INSERT_TOP,icon:"gallerytop"},{tag:"motwToolstrip.equationEditorTab.symbols.sumop",type:g.GALLERY_ITEM,
text:e.sumop,description:e.sumopDescription,actionId:f.ids.INSERT_SUMOP,icon:"gallerysumop"},{tag:"motwToolstrip.equationEditorTab.symbols.prodop",type:g.GALLERY_ITEM,text:e.prodop,description:e.prodopDescription,actionId:f.ids.INSERT_PRODOP,icon:"galleryprodop"},{tag:"motwToolstrip.equationEditorTab.symbols.intop",type:g.GALLERY_ITEM,text:e.intop,description:e.intopDescription,actionId:f.ids.INSERT_INTOP,icon:"galleryintop"},{tag:"motwToolstrip.equationEditorTab.symbols.ointop",type:g.GALLERY_ITEM,
text:e.ointop,description:e.ointopDescription,actionId:f.ids.INSERT_OINTOP,icon:"galleryointop"},{tag:"motwToolstrip.equationEditorTab.symbols.biguplus",type:g.GALLERY_ITEM,text:e.biguplus,description:e.biguplusDescription,actionId:f.ids.INSERT_BIGUPLUS,icon:"gallerybiguplus"},{tag:"motwToolstrip.equationEditorTab.symbols.bigoplus",type:g.GALLERY_ITEM,text:e.bigoplus,description:e.bigoplusDescription,actionId:f.ids.INSERT_BIGOPLUS,icon:"gallerybigoplus"},{tag:"motwToolstrip.equationEditorTab.symbols.bigvee",
type:g.GALLERY_ITEM,text:e.bigvee,description:e.bigveeDescription,actionId:f.ids.INSERT_BIGVEE,icon:"gallerybigvee"},{tag:"motwToolstrip.equationEditorTab.symbols.bigcap",type:g.GALLERY_ITEM,text:e.bigcap,description:e.bigcapDescription,actionId:f.ids.INSERT_BIGCAP,icon:"gallerybigcap"},{tag:"motwToolstrip.equationEditorTab.symbols.bigotimes",type:g.GALLERY_ITEM,text:e.bigotimes,description:e.bigotimesDescription,actionId:f.ids.INSERT_BIGOTIMES,icon:"gallerybigotimes"},{tag:"motwToolstrip.equationEditorTab.symbols.bigwedge",
type:g.GALLERY_ITEM,text:e.bigwedge,description:e.bigwedgeDescription,actionId:f.ids.INSERT_BIGWEDGE,icon:"gallerybigwedge"},{tag:"motwToolstrip.equationEditorTab.symbols.bigcup",type:g.GALLERY_ITEM,text:e.bigcup,description:e.bigcupDescription,actionId:f.ids.INSERT_BIGCUP,icon:"gallerybigcup"},{tag:"motwToolstrip.equationEditorTab.symbols.bigodot",type:g.GALLERY_ITEM,text:e.bigodot,description:e.bigodotDescription,actionId:f.ids.INSERT_BIGODOT,icon:"gallerybigodot"},{tag:"motwToolstrip.equationEditorTab.symbols.bigsqcup",
type:g.GALLERY_ITEM,text:e.bigsqcup,description:e.bigsqcupDescription,actionId:f.ids.INSERT_BIGSQCUP,icon:"gallerybigsqcup"}]},{tag:"motwToolstrip.equationEditorTab.symbols.relationSymbols",type:g.GALLERY_CATEGORY,title:e.categoryRelationSymbols,children:[{tag:"motwToolstrip.equationEditorTab.symbols.equiv",type:g.GALLERY_ITEM,text:e.equiv,description:e.equivDescription,actionId:f.ids.INSERT_EQUIV,icon:"galleryequiv"},{tag:"motwToolstrip.equationEditorTab.symbols.lt",type:g.GALLERY_ITEM,text:e.lt,
description:e.ltDescription,actionId:f.ids.INSERT_LT,icon:"gallerylt"},{tag:"motwToolstrip.equationEditorTab.symbols.gt",type:g.GALLERY_ITEM,text:e.gt,description:e.gtDescription,actionId:f.ids.INSERT_GT,icon:"gallerygt"},{tag:"motwToolstrip.equationEditorTab.symbols.cong",type:g.GALLERY_ITEM,text:e.cong,description:e.congDescription,actionId:f.ids.INSERT_CONG,icon:"gallerycong"},{tag:"motwToolstrip.equationEditorTab.symbols.leq",type:g.GALLERY_ITEM,text:e.leq,description:e.leqDescription,actionId:f.ids.INSERT_LEQ,
icon:"galleryleq"},{tag:"motwToolstrip.equationEditorTab.symbols.geq",type:g.GALLERY_ITEM,text:e.geq,description:e.geqDescription,actionId:f.ids.INSERT_GEQ,icon:"gallerygeq"},{tag:"motwToolstrip.equationEditorTab.symbols.neq",type:g.GALLERY_ITEM,text:e.neq,description:e.neqDescription,actionId:f.ids.INSERT_NEQ,icon:"galleryneq"},{tag:"motwToolstrip.equationEditorTab.symbols.prec",type:g.GALLERY_ITEM,text:e.prec,description:e.precDescription,actionId:f.ids.INSERT_PREC,icon:"galleryprec"},{tag:"motwToolstrip.equationEditorTab.symbols.succ",
type:g.GALLERY_ITEM,text:e.succ,description:e.succDescription,actionId:f.ids.INSERT_SUCC,icon:"gallerysucc"},{tag:"motwToolstrip.equationEditorTab.symbols.sim",type:g.GALLERY_ITEM,text:e.sim,description:e.simDescription,actionId:f.ids.INSERT_SIM,icon:"gallerysim"},{tag:"motwToolstrip.equationEditorTab.symbols.preceq",type:g.GALLERY_ITEM,text:e.preceq,description:e.preceqDescription,actionId:f.ids.INSERT_PRECEQ,icon:"gallerypreceq"},{tag:"motwToolstrip.equationEditorTab.symbols.succeq",type:g.GALLERY_ITEM,
text:e.succeq,description:e.succeqDescription,actionId:f.ids.INSERT_SUCCEQ,icon:"gallerysucceq"},{tag:"motwToolstrip.equationEditorTab.symbols.simeq",type:g.GALLERY_ITEM,text:e.simeq,description:e.simeqDescription,actionId:f.ids.INSERT_SIMEQ,icon:"gallerysimeq"},{tag:"motwToolstrip.equationEditorTab.symbols.ll",type:g.GALLERY_ITEM,text:e.ll,description:e.llDescription,actionId:f.ids.INSERT_LL,icon:"galleryll"},{tag:"motwToolstrip.equationEditorTab.symbols.gg",type:g.GALLERY_ITEM,text:e.gg,description:e.ggDescription,
actionId:f.ids.INSERT_GG,icon:"gallerygg"},{tag:"motwToolstrip.equationEditorTab.symbols.approx",type:g.GALLERY_ITEM,text:e.approx,description:e.approxDescription,actionId:f.ids.INSERT_APPROX,icon:"galleryapprox"},{tag:"motwToolstrip.equationEditorTab.symbols.subset",type:g.GALLERY_ITEM,text:e.subset,description:e.subsetDescription,actionId:f.ids.INSERT_SUBSET,icon:"gallerysubset"},{tag:"motwToolstrip.equationEditorTab.symbols.supset",type:g.GALLERY_ITEM,text:e.supset,description:e.supsetDescription,
actionId:f.ids.INSERT_SUPSET,icon:"gallerysupset"},{tag:"motwToolstrip.equationEditorTab.symbols.asymp",type:g.GALLERY_ITEM,text:e.asymp,description:e.asympDescription,actionId:f.ids.INSERT_ASYMP,icon:"galleryasymp"},{tag:"motwToolstrip.equationEditorTab.symbols.subseteq",type:g.GALLERY_ITEM,text:e.subseteq,description:e.subseteqDescription,actionId:f.ids.INSERT_SUBSETEQ,icon:"gallerysubseteq"},{tag:"motwToolstrip.equationEditorTab.symbols.supseteq",type:g.GALLERY_ITEM,text:e.supseteq,description:e.supseteqDescription,
actionId:f.ids.INSERT_SUPSETEQ,icon:"gallerysupseteq"},{tag:"motwToolstrip.equationEditorTab.symbols.doteq",type:g.GALLERY_ITEM,text:e.doteq,description:e.doteqDescription,actionId:f.ids.INSERT_DOTEQ,icon:"gallerydoteq"},{tag:"motwToolstrip.equationEditorTab.symbols.sqsubseteq",type:g.GALLERY_ITEM,text:e.sqsubseteq,description:e.sqsubseteqDescription,actionId:f.ids.INSERT_SQSUBSETEQ,icon:"gallerysqsubseteq"},{tag:"motwToolstrip.equationEditorTab.symbols.sqsupseteq",type:g.GALLERY_ITEM,text:e.sqsupseteq,
description:e.sqsupseteqDescription,actionId:f.ids.INSERT_SQSUPSETEQ,icon:"gallerysqsupseteq"},{tag:"motwToolstrip.equationEditorTab.symbols.propto",type:g.GALLERY_ITEM,text:e.propto,description:e.proptoDescription,actionId:f.ids.INSERT_PROPTO,icon:"gallerypropto"},{tag:"motwToolstrip.equationEditorTab.symbols.mid",type:g.GALLERY_ITEM,text:e.mid,description:e.midDescription,actionId:f.ids.INSERT_MID,icon:"gallerymid"},{tag:"motwToolstrip.equationEditorTab.symbols.in",type:g.GALLERY_ITEM,text:e["in"],
description:e.inDescription,actionId:f.ids.INSERT_IN,icon:"galleryin"},{tag:"motwToolstrip.equationEditorTab.symbols.models",type:g.GALLERY_ITEM,text:e.models,description:e.modelsDescription,actionId:f.ids.INSERT_MODELS,icon:"gallerymodels"},{tag:"motwToolstrip.equationEditorTab.symbols.parallel",type:g.GALLERY_ITEM,text:e.parallel,description:e.parallelDescription,actionId:f.ids.INSERT_PARALLEL,icon:"galleryparallel"},{tag:"motwToolstrip.equationEditorTab.symbols.notin",type:g.GALLERY_ITEM,text:e.notin,
description:e.notinDescription,actionId:f.ids.INSERT_NOTIN,icon:"gallerynotin"},{tag:"motwToolstrip.equationEditorTab.symbols.perp",type:g.GALLERY_ITEM,text:e.perp,description:e.perpDescription,actionId:f.ids.INSERT_PERP,icon:"galleryperp"},{tag:"motwToolstrip.equationEditorTab.symbols.vdash",type:g.GALLERY_ITEM,text:e.vdash,description:e.vdashDescription,actionId:f.ids.INSERT_VDASH,icon:"galleryvdash"},{tag:"motwToolstrip.equationEditorTab.symbols.ni",type:g.GALLERY_ITEM,text:e.ni,description:e.niDescription,
actionId:f.ids.INSERT_NI,icon:"galleryni"},{tag:"motwToolstrip.equationEditorTab.symbols.bowtie",type:g.GALLERY_ITEM,text:e.bowtie,description:e.bowtieDescription,actionId:f.ids.INSERT_BOWTIE,icon:"gallerybowtie"},{tag:"motwToolstrip.equationEditorTab.symbols.dashv",type:g.GALLERY_ITEM,text:e.dashv,description:e.dashvDescription,actionId:f.ids.INSERT_DASHV,icon:"gallerydashv"},{tag:"motwToolstrip.equationEditorTab.symbols.notlt",type:g.GALLERY_ITEM,text:e.notlt,description:e.notltDescription,actionId:f.ids.INSERT_NOTLT,
icon:"gallerynotlt"},{tag:"motwToolstrip.equationEditorTab.symbols.notgt",type:g.GALLERY_ITEM,text:e.notgt,description:e.notgtDescription,actionId:f.ids.INSERT_NOTGT,icon:"gallerynotgt"},{tag:"motwToolstrip.equationEditorTab.symbols.notleq",type:g.GALLERY_ITEM,text:e.notleq,description:e.notleqDescription,actionId:f.ids.INSERT_NOTLEQ,icon:"gallerynotleq"},{tag:"motwToolstrip.equationEditorTab.symbols.notgeq",type:g.GALLERY_ITEM,text:e.notgeq,description:e.notgeqDescription,actionId:f.ids.INSERT_NOTGEQ,
icon:"gallerynotgeq"},{tag:"motwToolstrip.equationEditorTab.symbols.notequiv",type:g.GALLERY_ITEM,text:e.notequiv,description:e.notequivDescription,actionId:f.ids.INSERT_NOTEQUIV,icon:"gallerynotequiv"},{tag:"motwToolstrip.equationEditorTab.symbols.notapprox",type:g.GALLERY_ITEM,text:e.notapprox,description:e.notapproxDescription,actionId:f.ids.INSERT_NOTAPPROX,icon:"gallerynotapprox"},{tag:"motwToolstrip.equationEditorTab.symbols.notcong",type:g.GALLERY_ITEM,text:e.notcong,description:e.notcongDescription,
actionId:f.ids.INSERT_NOTCONG,icon:"gallerynotcong"},{tag:"motwToolstrip.equationEditorTab.symbols.notsim",type:g.GALLERY_ITEM,text:e.notsim,description:e.notsimDescription,actionId:f.ids.INSERT_NOTSIM,icon:"gallerynotsim"},{tag:"motwToolstrip.equationEditorTab.symbols.notsimeq",type:g.GALLERY_ITEM,text:e.notsimeq,description:e.notsimeqDescription,actionId:f.ids.INSERT_NOTSIMEQ,icon:"gallerynotsimeq"},{tag:"motwToolstrip.equationEditorTab.symbols.notmodels",type:g.GALLERY_ITEM,text:e.notmodels,description:e.notmodelsDescription,
actionId:f.ids.INSERT_NOTMODELS,icon:"gallerynotmodels"},{tag:"motwToolstrip.equationEditorTab.symbols.notni",type:g.GALLERY_ITEM,text:e.notni,description:e.notniDescription,actionId:f.ids.INSERT_NOTNI,icon:"gallerynotni"},{tag:"motwToolstrip.equationEditorTab.symbols.notsucc",type:g.GALLERY_ITEM,text:e.notsucc,description:e.notsuccDescription,actionId:f.ids.INSERT_NOTSUCC,icon:"gallerynotsucc"},{tag:"motwToolstrip.equationEditorTab.symbols.notsucceq",type:g.GALLERY_ITEM,text:e.notsucceq,description:e.notsucceqDescription,
actionId:f.ids.INSERT_NOTSUCCEQ,icon:"gallerynotsucceq"},{tag:"motwToolstrip.equationEditorTab.symbols.notprec",type:g.GALLERY_ITEM,text:e.notprec,description:e.notprecDescription,actionId:f.ids.INSERT_NOTPREC,icon:"gallerynotprec"},{tag:"motwToolstrip.equationEditorTab.symbols.notpreceq",type:g.GALLERY_ITEM,text:e.notpreceq,description:e.notpreceqDescription,actionId:f.ids.INSERT_NOTPRECEQ,icon:"gallerynotpreceq"},{tag:"motwToolstrip.equationEditorTab.symbols.notparallel",type:g.GALLERY_ITEM,text:e.notparallel,
description:e.notparallelDescription,actionId:f.ids.INSERT_NOTPARALLEL,icon:"gallerynotparallel"},{tag:"motwToolstrip.equationEditorTab.symbols.notsubset",type:g.GALLERY_ITEM,text:e.notsubset,description:e.notsubsetDescription,actionId:f.ids.INSERT_NOTSUBSET,icon:"gallerynotsubset"},{tag:"motwToolstrip.equationEditorTab.symbols.notsupset",type:g.GALLERY_ITEM,text:e.notsupset,description:e.notsupsetDescription,actionId:f.ids.INSERT_NOTSUPSET,icon:"gallerynotsupset"},{tag:"motwToolstrip.equationEditorTab.symbols.notsubseteq",
type:g.GALLERY_ITEM,text:e.notsubseteq,description:e.notsubseteqDescription,actionId:f.ids.INSERT_NOTSUBSETEQ,icon:"gallerynotsubseteq"},{tag:"motwToolstrip.equationEditorTab.symbols.notsupseteq",type:g.GALLERY_ITEM,text:e.notsupseteq,description:e.notsupseteqDescription,actionId:f.ids.INSERT_NOTSUPSETEQ,icon:"gallerynotsupseteq"}]},{tag:"motwToolstrip.equationEditorTab.symbols.arrows",type:g.GALLERY_CATEGORY,title:e.categoryArrows,children:[{tag:"motwToolstrip.equationEditorTab.symbols.leftarrow",
type:g.GALLERY_ITEM,text:e.leftarrow,description:e.leftarrowDescription,actionId:f.ids.INSERT_LEFTARROW,icon:"galleryleftarrow"},{tag:"motwToolstrip.equationEditorTab.symbols.rightarrow",type:g.GALLERY_ITEM,text:e.rightarrow,description:e.rightarrowDescription,actionId:f.ids.INSERT_RIGHTARROW,icon:"galleryrightarrow"},{tag:"motwToolstrip.equationEditorTab.symbols.uparrow",type:g.GALLERY_ITEM,text:e.uparrow,description:e.uparrowDescription,actionId:f.ids.INSERT_UPARROW,icon:"galleryuparrow"},{tag:"motwToolstrip.equationEditorTab.symbols.Leftarrow",
type:g.GALLERY_ITEM,text:e.Leftarrow,description:e.LeftarrowDescription,actionId:f.ids.INSERT__L_EFTARROW,icon:"galleryLeftarrow"},{tag:"motwToolstrip.equationEditorTab.symbols.Rightarrow",type:g.GALLERY_ITEM,text:e.Rightarrow,description:e.RightarrowDescription,actionId:f.ids.INSERT__R_IGHTARROW,icon:"galleryRightarrow"},{tag:"motwToolstrip.equationEditorTab.symbols.Uparrow",type:g.GALLERY_ITEM,text:e.Uparrow,description:e.UparrowDescription,actionId:f.ids.INSERT__U_PARROW,icon:"galleryUparrow"},
{tag:"motwToolstrip.equationEditorTab.symbols.longleftarrow",type:g.GALLERY_ITEM,text:e.longleftarrow,description:e.longleftarrowDescription,actionId:f.ids.INSERT_LONGLEFTARROW,icon:"gallerylongleftarrow"},{tag:"motwToolstrip.equationEditorTab.symbols.longrightarrow",type:g.GALLERY_ITEM,text:e.longrightarrow,description:e.longrightarrowDescription,actionId:f.ids.INSERT_LONGRIGHTARROW,icon:"gallerylongrightarrow"},{tag:"motwToolstrip.equationEditorTab.symbols.downarrow",type:g.GALLERY_ITEM,text:e.downarrow,
description:e.downarrowDescription,actionId:f.ids.INSERT_DOWNARROW,icon:"gallerydownarrow"},{tag:"motwToolstrip.equationEditorTab.symbols.Longleftarrow",type:g.GALLERY_ITEM,text:e.Longleftarrow,description:e.LongleftarrowDescription,actionId:f.ids.INSERT__L_ONGLEFTARROW,icon:"galleryLongleftarrow"},{tag:"motwToolstrip.equationEditorTab.symbols.Longrightarrow",type:g.GALLERY_ITEM,text:e.Longrightarrow,description:e.LongrightarrowDescription,actionId:f.ids.INSERT__L_ONGRIGHTARROW,icon:"galleryLongrightarrow"},
{tag:"motwToolstrip.equationEditorTab.symbols.Downarrow",type:g.GALLERY_ITEM,text:e.Downarrow,description:e.DownarrowDescription,actionId:f.ids.INSERT__D_OWNARROW,icon:"galleryDownarrow"},{tag:"motwToolstrip.equationEditorTab.symbols.hookleftarrow",type:g.GALLERY_ITEM,text:e.hookleftarrow,description:e.hookleftarrowDescription,actionId:f.ids.INSERT_HOOKLEFTARROW,icon:"galleryhookleftarrow"},{tag:"motwToolstrip.equationEditorTab.symbols.hookrightarrow",type:g.GALLERY_ITEM,text:e.hookrightarrow,description:e.hookrightarrowDescription,
actionId:f.ids.INSERT_HOOKRIGHTARROW,icon:"galleryhookrightarrow"},{tag:"motwToolstrip.equationEditorTab.symbols.updownarrow",type:g.GALLERY_ITEM,text:e.updownarrow,description:e.updownarrowDescription,actionId:f.ids.INSERT_UPDOWNARROW,icon:"galleryupdownarrow"},{tag:"motwToolstrip.equationEditorTab.symbols.leftharpoondown",type:g.GALLERY_ITEM,text:e.leftharpoondown,description:e.leftharpoondownDescription,actionId:f.ids.INSERT_LEFTHARPOONDOWN,icon:"galleryleftharpoondown"},{tag:"motwToolstrip.equationEditorTab.symbols.rightharpoondown",
type:g.GALLERY_ITEM,text:e.rightharpoondown,description:e.rightharpoondownDescription,actionId:f.ids.INSERT_RIGHTHARPOONDOWN,icon:"galleryrightharpoondown"},{tag:"motwToolstrip.equationEditorTab.symbols.Updownarrow",type:g.GALLERY_ITEM,text:e.Updownarrow,description:e.UpdownarrowDescription,actionId:f.ids.INSERT__U_PDOWNARROW,icon:"galleryUpdownarrow"},{tag:"motwToolstrip.equationEditorTab.symbols.leftharpoonup",type:g.GALLERY_ITEM,text:e.leftharpoonup,description:e.leftharpoonupDescription,actionId:f.ids.INSERT_LEFTHARPOONUP,
icon:"galleryleftharpoonup"},{tag:"motwToolstrip.equationEditorTab.symbols.rightharpoonup",type:g.GALLERY_ITEM,text:e.rightharpoonup,description:e.rightharpoonupDescription,actionId:f.ids.INSERT_RIGHTHARPOONUP,icon:"galleryrightharpoonup"},{tag:"motwToolstrip.equationEditorTab.symbols.leftrightarrow",type:g.GALLERY_ITEM,text:e.leftrightarrow,description:e.leftrightarrowDescription,actionId:f.ids.INSERT_LEFTRIGHTARROW,icon:"galleryleftrightarrow"},{tag:"motwToolstrip.equationEditorTab.symbols.swarrow",
type:g.GALLERY_ITEM,text:e.swarrow,description:e.swarrowDescription,actionId:f.ids.INSERT_SWARROW,icon:"galleryswarrow"},{tag:"motwToolstrip.equationEditorTab.symbols.nearrow",type:g.GALLERY_ITEM,text:e.nearrow,description:e.nearrowDescription,actionId:f.ids.INSERT_NEARROW,icon:"gallerynearrow"},{tag:"motwToolstrip.equationEditorTab.symbols.Leftrightarrow",type:g.GALLERY_ITEM,text:e.Leftrightarrow,description:e.LeftrightarrowDescription,actionId:f.ids.INSERT__L_EFTRIGHTARROW,icon:"galleryLeftrightarrow"},
{tag:"motwToolstrip.equationEditorTab.symbols.nwarrow",type:g.GALLERY_ITEM,text:e.nwarrow,description:e.nwarrowDescription,actionId:f.ids.INSERT_NWARROW,icon:"gallerynwarrow"},{tag:"motwToolstrip.equationEditorTab.symbols.searrow",type:g.GALLERY_ITEM,text:e.searrow,description:e.searrowDescription,actionId:f.ids.INSERT_SEARROW,icon:"gallerysearrow"},{tag:"motwToolstrip.equationEditorTab.symbols.longleftrightarrow",type:g.GALLERY_ITEM,text:e.longleftrightarrow,description:e.longleftrightarrowDescription,
actionId:f.ids.INSERT_LONGLEFTRIGHTARROW,icon:"gallerylongleftrightarrow"},{tag:"motwToolstrip.equationEditorTab.symbols.mapsto",type:g.GALLERY_ITEM,text:e.mapsto,description:e.mapstoDescription,actionId:f.ids.INSERT_MAPSTO,icon:"gallerymapsto"},{tag:"motwToolstrip.equationEditorTab.symbols.longmapsto",type:g.GALLERY_ITEM,text:e.longmapsto,description:e.longmapstoDescription,actionId:f.ids.INSERT_LONGMAPSTO,icon:"gallerylongmapsto"},{tag:"motwToolstrip.equationEditorTab.symbols.Longleftrightarrow",
type:g.GALLERY_ITEM,text:e.Longleftrightarrow,description:e.LongleftrightarrowDescription,actionId:f.ids.INSERT__L_ONGLEFTRIGHTARROW,icon:"galleryLongleftrightarrow"}]},{tag:"motwToolstrip.equationEditorTab.symbols.brackets",type:g.GALLERY_CATEGORY,title:e.categoryBrackets,children:[{tag:"motwToolstrip.equationEditorTab.symbols.lbrace",type:g.GALLERY_ITEM,text:e.lbrace,description:e.lbraceDescription,actionId:f.ids.INSERT_LBRACE,icon:"gallerylbrace"},{tag:"motwToolstrip.equationEditorTab.symbols.rbrace",
type:g.GALLERY_ITEM,text:e.rbrace,description:e.rbraceDescription,actionId:f.ids.INSERT_RBRACE,icon:"galleryrbrace"},{tag:"motwToolstrip.equationEditorTab.symbols.vert",type:g.GALLERY_ITEM,text:e.vert,description:e.vertDescription,actionId:f.ids.INSERT_VERT,icon:"galleryvert"},{tag:"motwToolstrip.equationEditorTab.symbols.lbrack",type:g.GALLERY_ITEM,text:e.lbrack,description:e.lbrackDescription,actionId:f.ids.INSERT_LBRACK,icon:"gallerylbrack"},{tag:"motwToolstrip.equationEditorTab.symbols.rbrack",
type:g.GALLERY_ITEM,text:e.rbrack,description:e.rbrackDescription,actionId:f.ids.INSERT_RBRACK,icon:"galleryrbrack"},{tag:"motwToolstrip.equationEditorTab.symbols.Vert",type:g.GALLERY_ITEM,text:e.Vert,description:e.VertDescription,actionId:f.ids.INSERT__V_ERT,icon:"galleryVert"},{tag:"motwToolstrip.equationEditorTab.symbols.langle",type:g.GALLERY_ITEM,text:e.langle,description:e.langleDescription,actionId:f.ids.INSERT_LANGLE,icon:"gallerylangle"},{tag:"motwToolstrip.equationEditorTab.symbols.rangle",
type:g.GALLERY_ITEM,text:e.rangle,description:e.rangleDescription,actionId:f.ids.INSERT_RANGLE,icon:"galleryrangle"},{tag:"motwToolstrip.equationEditorTab.symbols.backslash",type:g.GALLERY_ITEM,text:e.backslash,description:e.backslashDescription,actionId:f.ids.INSERT_BACKSLASH,icon:"gallerybackslash"},{tag:"motwToolstrip.equationEditorTab.symbols.lceil",type:g.GALLERY_ITEM,text:e.lceil,description:e.lceilDescription,actionId:f.ids.INSERT_LCEIL,icon:"gallerylceil"},{tag:"motwToolstrip.equationEditorTab.symbols.rceil",
type:g.GALLERY_ITEM,text:e.rceil,description:e.rceilDescription,actionId:f.ids.INSERT_RCEIL,icon:"galleryrceil"},{tag:"motwToolstrip.equationEditorTab.symbols.lfloor",type:g.GALLERY_ITEM,text:e.lfloor,description:e.lfloorDescription,actionId:f.ids.INSERT_LFLOOR,icon:"gallerylfloor"},{tag:"motwToolstrip.equationEditorTab.symbols.rfloor",type:g.GALLERY_ITEM,text:e.rfloor,description:e.rfloorDescription,actionId:f.ids.INSERT_RFLOOR,icon:"galleryrfloor"}]},{tag:"motwToolstrip.equationEditorTab.symbols.miscSymbols",
type:g.GALLERY_CATEGORY,title:e.categoryMiscSymbols,children:[{tag:"motwToolstrip.equationEditorTab.symbols.aleph",type:g.GALLERY_ITEM,text:e.aleph,description:e.alephDescription,actionId:f.ids.INSERT_ALEPH,icon:"galleryaleph"},{tag:"motwToolstrip.equationEditorTab.symbols.infty",type:g.GALLERY_ITEM,text:e.infty,description:e.inftyDescription,actionId:f.ids.INSERT_INFTY,icon:"galleryinfty"},{tag:"motwToolstrip.equationEditorTab.symbols.forall",type:g.GALLERY_ITEM,text:e.forall,description:e.forallDescription,
actionId:f.ids.INSERT_FORALL,icon:"galleryforall"},{tag:"motwToolstrip.equationEditorTab.symbols.wp",type:g.GALLERY_ITEM,text:e.wp,description:e.wpDescription,actionId:f.ids.INSERT_WP,icon:"gallerywp"},{tag:"motwToolstrip.equationEditorTab.symbols.nabla",type:g.GALLERY_ITEM,text:e.nabla,description:e.nablaDescription,actionId:f.ids.INSERT_NABLA,icon:"gallerynabla"},{tag:"motwToolstrip.equationEditorTab.symbols.exists",type:g.GALLERY_ITEM,text:e.exists,description:e.existsDescription,actionId:f.ids.INSERT_EXISTS,
icon:"galleryexists"},{tag:"motwToolstrip.equationEditorTab.symbols.angle",type:g.GALLERY_ITEM,text:e.angle,description:e.angleDescription,actionId:f.ids.INSERT_ANGLE,icon:"galleryangle"},{tag:"motwToolstrip.equationEditorTab.symbols.partial",type:g.GALLERY_ITEM,text:e.partial,description:e.partialDescription,actionId:f.ids.INSERT_PARTIAL,icon:"gallerypartial"},{tag:"motwToolstrip.equationEditorTab.symbols.emptyset",type:g.GALLERY_ITEM,text:e.emptyset,description:e.emptysetDescription,actionId:f.ids.INSERT_EMPTYSET,
icon:"galleryemptyset"},{tag:"motwToolstrip.equationEditorTab.symbols.triangle",type:g.GALLERY_ITEM,text:e.triangle,description:e.triangleDescription,actionId:f.ids.INSERT_TRIANGLE,icon:"gallerytriangle"},{tag:"motwToolstrip.equationEditorTab.symbols.Im",type:g.GALLERY_ITEM,text:e.Im,description:e.ImDescription,actionId:f.ids.INSERT__I_M,icon:"galleryIm"},{tag:"motwToolstrip.equationEditorTab.symbols.imath",type:g.GALLERY_ITEM,text:e.imath,description:e.imathDescription,actionId:f.ids.INSERT_IMATH,
icon:"galleryimath"},{tag:"motwToolstrip.equationEditorTab.symbols.hbar",type:g.GALLERY_ITEM,text:e.hbar,description:e.hbarDescription,actionId:f.ids.INSERT_HBAR,icon:"galleryhbar"},{tag:"motwToolstrip.equationEditorTab.symbols.Re",type:g.GALLERY_ITEM,text:e.Re,description:e.ReDescription,actionId:f.ids.INSERT__R_E,icon:"galleryRe"},{tag:"motwToolstrip.equationEditorTab.symbols.jmath",type:g.GALLERY_ITEM,text:e.jmath,description:e.jmathDescription,actionId:f.ids.INSERT_JMATH,icon:"galleryjmath"},
{tag:"motwToolstrip.equationEditorTab.symbols.prime",type:g.GALLERY_ITEM,text:e.prime,description:e.primeDescription,actionId:f.ids.INSERT_PRIME,icon:"galleryprime"},{tag:"motwToolstrip.equationEditorTab.symbols.ldots",type:g.GALLERY_ITEM,text:e.ldots,description:e.ldotsDescription,actionId:f.ids.INSERT_LDOTS,icon:"galleryldots"},{tag:"motwToolstrip.equationEditorTab.symbols.ell",type:g.GALLERY_ITEM,text:e.ell,description:e.ellDescription,actionId:f.ids.INSERT_ELL,icon:"galleryell"},{tag:"motwToolstrip.equationEditorTab.symbols.colon",
type:g.GALLERY_ITEM,text:e.colon,description:e.colonDescription,actionId:f.ids.INSERT_COLON,icon:"gallerycolon"},{tag:"motwToolstrip.equationEditorTab.symbols.cdots",type:g.GALLERY_ITEM,text:e.cdots,description:e.cdotsDescription,actionId:f.ids.INSERT_CDOTS,icon:"gallerycdots"},{tag:"motwToolstrip.equationEditorTab.symbols.neg",type:g.GALLERY_ITEM,text:e.neg,description:e.negDescription,actionId:f.ids.INSERT_NEG,icon:"galleryneg"},{tag:"motwToolstrip.equationEditorTab.symbols.ddots",type:g.GALLERY_ITEM,
text:e.ddots,description:e.ddotsDescription,actionId:f.ids.INSERT_DDOTS,icon:"galleryddots"},{tag:"motwToolstrip.equationEditorTab.symbols.surd",type:g.GALLERY_ITEM,text:e.surd,description:e.surdDescription,actionId:f.ids.INSERT_SURD,icon:"gallerysurd"},{tag:"motwToolstrip.equationEditorTab.symbols.ldotp",type:g.GALLERY_ITEM,text:e.ldotp,description:e.ldotpDescription,actionId:f.ids.INSERT_LDOTP,icon:"galleryldotp"},{tag:"motwToolstrip.equationEditorTab.symbols.vdots",type:g.GALLERY_ITEM,text:e.vdots,
description:e.vdotsDescription,actionId:f.ids.INSERT_VDOTS,icon:"galleryvdots"},{tag:"motwToolstrip.equationEditorTab.symbols.to",type:g.GALLERY_ITEM,text:e.to,description:e.toDescription,actionId:f.ids.INSERT_TO,icon:"galleryto"},{tag:"motwToolstrip.equationEditorTab.symbols.gets",type:g.GALLERY_ITEM,text:e.gets,description:e.getsDescription,actionId:f.ids.INSERT_GETS,icon:"gallerygets"}]}]}})},"MOTW/editor/LiveEditorWidget":function(){define("dojo/aspect dojo/_base/declare dojo/_base/lang dojo/text!MOTW/editor/liveEditorWindow.html liveeditor/LiveEditorFactory liveeditor/plugin/JavascriptToolstripManager mw-actiondataservice/ActionDataService mw-filename-utils/FileNameUtil mw-log/Log MOTW/editor/EditorWidgetBase MOTW/editor/plugins/filemodificationnotifier/MatlabOnlineFileModificationNotifier MOTW/motw/ActionIdConstants MW/rtc/clipboardservice/ClipboardService MW/rtc/datamodel/RichTextBackingStore MOTW/editor/plugins/contextmenu/ReconfigureContextMenuModelProvider MOTW/editor/plugins/settings/MatlabSettingSynchronizerProvider MOTW/editor/plugins/textstyletoolstrip/TextStyleToolstripProvider MW/rtc/plugins/images/SimpleInsertImageProvider MOTW/editor/toolstrip/ExecutionControlsToolstripProvider MOTW/editor/plugins/busyidle/BusyIdleServicesProvider MOTW/editor/plugins/save/MatlabOnlineSaveReadyPluginProvider".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q){return f([l],{templateString:d,constructor:function(a){this._templateType=this.editorView.file.content;"binary"===this.editorView.file.content&&(this._templateType="");this._filePath=h.pathFromFileInfo(this.editorView.file.fileInfo);this._fileDataService=a.fileDataService},postCreate:function(){this.inherited(arguments);this.editorView.setEditor(this.editor,!0);this._listeners.push(g.after(this.editor,"resize",e.hitch(this._liveEditorView,"onResize")))},_initializeEditor:function(){var d=
n.getBrowserSyncedClipboard();this._richTextBackingStore=new q(this._filePath,this.id);this._liveEditorView=this.editorWindow;this._liveEditorView.onResize=function(){};var e=new m(this._fileDataService,this.editorView.file),d={"liveeditor.view":this._liveEditorView,"rtc.backingstore":this._richTextBackingStore,"rtc.clipboard":d,"rtc.id":this.id,"liveeditor.showlinenumber":!1,"liveeditor.toolstripmanager":new a(this.editorView),"liveeditor.filemodificationnotifier":e,"rtc.templateType":this._templateType,
"rtc.executionservice":this.editorView.executionDataService},e=new c({nameSpace:"/actions/liveeditormodule/"+this.id,mode:"StandAlone"});e.loadActions([this.actionService.getAction(p.SAVE)]);return b.createLiveEditor({containerNode:this.liveEditorWindow,id:"internal_"+this.id,dependencies:d,actionDataService:e,additionalFeaturesToEnable:["liveeditor.toolstrip.textStyle","liveeditor.contentmodifiedlistener","liveeditor.toolstrip.execution","motw.saveready","settings.matlabsynchronizer"],additionalFeaturesToDisable:["rtc.embeddedoutputs.copyoutputs"],
additionalPluginsToAdd:[{id:"rtc.richtext.insertimage",path:"MW/rtc/plugins/images/SimpleInsertImageProvider"},{id:"rtc.contextmenu.reconfiguremodel",path:"MOTW/editor/plugins/contextmenu/ReconfigureContextMenuModelProvider",family:"contextmenu"},{id:"settings.matlabsynchronizer",path:"MOTW/editor/plugins/settings/MatlabSettingSynchronizerProvider"},{id:"liveeditor.toolstrip.textStyle",path:"MOTW/editor/plugins/textstyletoolstrip/TextStyleToolstripProvider"},{id:"liveeditor.toolstrip.execution",path:"MOTW/editor/toolstrip/ExecutionControlsToolstripProvider"},
{id:"matlab.services.busyidle",path:"MOTW/editor/plugins/busyidle/BusyIdleServicesProvider"},{id:"motw.saveready",path:"MOTW/editor/plugins/save/MatlabOnlineSaveReadyPluginProvider"}]})},getBackingStore:function(){return this._richTextBackingStore}})})},"liveeditor/LiveEditorFactory":function(){define(["dojo/_base/lang","MW/rtc/RichTextComponent","mw-log/Log","./config/CommonConfiguration","./config/CommonRegistry"],function(g,f,e,d,b){return{_updateFeatureList:function(a,c,b){Array.prototype.push.apply(a.enabled,
c);Array.prototype.push.apply(a.disabled,b);return a},_addAdditionaPluginsToRegistry:function(a,c){Array.prototype.push.apply(a,c);return a},createLiveEditor:function(a){e.assert(a.containerNode,"No container node specified");e.assert(a.id,"No Live editor ID specified");e.assert(a.dependencies,"No dependencies supplied");e.assert(a.actionDataService,"No action data service supplied");var c=a.containerNode,h=a.id,k=a.keyBindings,l=a.dependencies,m=a.actionDataService,p=a.additionalFeaturesToEnable,
n=a.additionalFeaturesToDisable;a=a.additionalPluginsToAdd;var q=g.clone(d),p=this._updateFeatureList(q,p,n),n=g.clone(b);a=this._addAdditionaPluginsToRegistry(n,a);l["rtc.columnselection.enabled"]=!0;return new f({"class":"rtePaneFixedSize",id:h,actionDataService:m,keyBindings:k,dependencies:l,registry:a,features:p},c)}}})},"liveeditor/config/CommonConfiguration":function(){define([],function(){return{fixedSize:!0,fileEndSelectable:!0,enabled:"rtc.serializers.serialize layoutrules codeanalyzer rtc.code.codeanalyzerpreferences contextmenu embeddedoutputs executioncontrols typocorrection margin.linenumber rtc.margin.execution rtc.margin.empty rtc.margin.sectionexpander matlab.code.variables.highlighting matlab.code.variables.rename messagebar matlab.code.variablehighlightingmessagelayer rtc.alert rtc.livecontrols rtc.code.autoindent rtc.code.autoindentpreference rtc.code.comment rtc.code.datatip rtc.code.formatcode rtc.code.parenmatch syntaxhighlighter rtc.code.localfunctions rtc.code.codingui rtc.code.sections.navigate rtc.code.sections.insert rtc.code.sections.view.currentsection rtc.code.sections.view.containerutility rtc.contextualselection.evaluateselection rtc.contextualselection.openselection rtc.margin.severitystatusbutton rtc.serializers.containers.container rtc.findandreplace rtc.navigate.goto rtc.caseconverter rtc.richtext rtc.richtext.anchor rtc.richtext.lists rtc.richtext.codeexample rtc.richtext.hyperlink rtc.richtext.equations rtc.richtext.images rtc.richtext.insertimage rtc.richtext.resizeimage rtc.sectionbreak rtc.richtext.tableofcontents smartformatting rtc.view.smoothscrolling rtc.indent rtc.tooltipservice rtc.diagnosticmessage rtc.cutcopypaste rtc.draganddrop rtc.smarttab rtc.linenumberpreference liveeditor.opentolinecolumn liveeditor.saveload liveeditor.saveload.forwardcompatibilty liveeditor.disablefunctionsclasses liveeditor.smoothscrollingpreference liveeditor.figure.toolstrip liveeditor.embeddedoutputs.variablestringoutputhandler liveeditor.embeddedoutputs.export.html.interactivetableoutput liveeditor.embeddedoutputs.export.html.matrixoutput matlab.templateservice liveeditor.embeddedoutputs.matrixoutputhandler rtc.execution.actions debug.control debug.executionlines rtc.debug.breadcrumbstackbanner debug.lineautoscroll debug.linefocus debug.breakpointactions rtc.helponselection".split(" "),
disabled:["rtc.code.sections"]}})},"liveeditor/config/CommonRegistry":function(){define("liveeditor/plugin/LiveEditorHTMLGeneratorProvider liveeditor/plugin/LiveEditorRTFGeneratorProvider liveeditor/plugin/InsertImageProvider liveeditor/plugin/OpenToLineColumnProvider liveeditor/plugin/LiveEditorSaveLoadProvider liveeditor/plugin/ForwardCompatibilityHandlerProvider liveeditor/plugin/ContentModifiedListenerProvider liveeditor/plugin/DisableFunctionsClassesHandlerProvider liveeditor/plugin/RightMarginContainerProvider liveeditor/plugin/SeverityStatusButtonProvider liveeditor/plugin/SmoothScrollingPreferenceProvider liveeditor/plugin/figure/FigureToolstripManagerProvider liveeditor/plugin/variableeditor/InteractiveTableOutputHandlerProvider liveeditor/plugin/variableeditor/InteractiveVariableExports/VariableMatrixElement2HTMLProvider liveeditor/plugin/variableeditor/InteractiveVariableExports/TableElement2HTMLProvider liveeditor/plugin/variableeditor/InteractiveMatrixOutputHandlerProvider liveeditor/plugin/variableeditor/MatrixOutputHandlerProvider liveeditor/plugin/variableeditor/VariableStringOutputHandlerProvider MW/rtc/margin/LineNumberDecoratorProvider MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointStylerProvider MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointDirtyServiceProvider MW/rtc/plugins/margin/LineNumberWithBreakpointsMarginProvider".split(" "),
function(){return[{id:"rtc.cutcopypaste.htmlgenerator",path:"liveeditor/plugin/LiveEditorHTMLGeneratorProvider"},{id:"rtc.cutcopypaste.rtfgenerator",path:"liveeditor/plugin/LiveEditorRTFGeneratorProvider"},{id:"margin.linenumberdecorator",path:"MW/rtc/margin/LineNumberDecoratorProvider"},{id:"liveeditor.opentolinecolumn",path:"liveeditor/plugin/OpenToLineColumnProvider"},{id:"liveeditor.saveload",path:"liveeditor/plugin/LiveEditorSaveLoadProvider"},{id:"liveeditor.saveload.forwardcompatibilty",path:"liveeditor/plugin/ForwardCompatibilityHandlerProvider"},
{id:"liveeditor.disablefunctionsclasses",path:"liveeditor/plugin/DisableFunctionsClassesHandlerProvider"},{id:"rtc.messagebar.rightmargincontainer",path:"liveeditor/plugin/RightMarginContainerProvider"},{id:"rtc.margin.severitystatusbutton",path:"liveeditor/plugin/SeverityStatusButtonProvider"},{id:"liveeditor.smoothscrollingpreference",path:"liveeditor/plugin/SmoothScrollingPreferenceProvider"},{id:"liveeditor.figure.toolstrip",path:"liveeditor/plugin/figure/FigureToolstripManagerProvider"},{id:"liveeditor.embeddedoutputs.interactivetableoutputhandler",
path:"liveeditor/plugin/variableeditor/InteractiveTableOutputHandlerProvider"},{id:"liveeditor.embeddedoutputs.export.html.matrixoutput",path:"liveeditor/plugin/variableeditor/InteractiveVariableExports/VariableMatrixElement2HTMLProvider",subsystem:"rtc.export.htmloutputwriters"},{id:"liveeditor.embeddedoutputs.export.html.interactivetableoutput",path:"liveeditor/plugin/variableeditor/InteractiveVariableExports/TableElement2HTMLProvider",subsystem:"rtc.export.htmloutputwriters"},{id:"liveeditor.embeddedoutputs.interactivematrixoutputhandler",
path:"liveeditor/plugin/variableeditor/InteractiveMatrixOutputHandlerProvider"},{id:"liveeditor.embeddedoutputs.variablestringoutputhandler",path:"liveeditor/plugin/variableeditor/VariableStringOutputHandlerProvider"},{id:"liveeditor.embeddedoutputs.matrixoutputhandler",path:"liveeditor/plugin/variableeditor/MatrixOutputHandlerProvider"},{id:"liveeditor.contentmodifiedlistener",path:"liveeditor/plugin/ContentModifiedListenerProvider"},{id:"margin.linenumber",path:"MW/rtc/plugins/margin/LineNumberWithBreakpointsMarginProvider",
subsystem:"rtc.left.margin"},{id:"debug.margin.matlab.breakpointstyler",path:"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointStylerProvider"},{id:"debug.breakpointdirtyservice",path:"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointDirtyServiceProvider"}]})},"liveeditor/plugin/LiveEditorHTMLGeneratorProvider":function(){define(["dojo/_base/declare","liveeditor/plugin/LiveEditorHTMLGenerator","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/cutcopypaste/HTMLGenerator"],function(g,f,e,d){return g(e,
{requires:function(){return{createInstance:["rtc.cutcopypaste.converter","rtc.clipboardtempdirpath","rtc.internaldocument","rtc.embeddedoutputs"]}},createInstance:function(b,a,c,d){return new f(b,a,c,d)},priority:function(){return 50}})})},"liveeditor/plugin/LiveEditorHTMLGenerator":function(){define(["dojo/_base/declare","MW/rtc/plugins/cutcopypaste/HTMLGenerator"],function(g,f){return g([f],{constructor:function(e,d,b,a){this.embeddedOutputsView=a.getEmbeddedOutputsView()},_write:function(e){var d=
{};this._clipboardTempDirPath?(e=this._htmlWriter.writeWithImageList(this._internalDocument,e,this._clipboardTempDirPath,this.embeddedOutputsView),d.htmlStr=e.html,d.imageList=e.images):d.htmlStr=this._htmlWriter.write(this._internalDocument,e,this.embeddedOutputsView);return d}})})},"liveeditor/plugin/LiveEditorRTFGeneratorProvider":function(){define(["dojo/_base/declare","liveeditor/plugin/LiveEditorRTFGenerator","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/cutcopypaste/RTFGenerator"],
function(g,f,e,d){return g(e,{requires:function(){return{createInstance:["rtc.cutcopypaste.converter","rtc.internaldocument","rtc.embeddedoutputs"]}},createInstance:function(b,a,c){return new f(b,a,c)},priority:function(){return 50}})})},"liveeditor/plugin/LiveEditorRTFGenerator":function(){define(["dojo/_base/declare","MW/rtc/plugins/cutcopypaste/RTFGenerator"],function(g,f){return g([f],{constructor:function(e,d,b){this._embeddedOutputsView=b.getEmbeddedOutputsView()},_write:function(e){return this._rtfWriter.write(this._internalDocument,
e,this._embeddedOutputsView)}})})},"liveeditor/plugin/InsertImageProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","liveeditor/plugin/InsertImage"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cursor","rtc.view","rtc.id","rtc.actionservice","rtc.richtext.images"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)},priority:function(){return 2}})})},"liveeditor/plugin/InsertImage":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/aspect","mw-log/Log","mw-messageservice/MessageService"],function(g,f,e,d,b){return g(null,{_IMAGE_REQUEST_CHANNEL_PREFIX:"/imageservice/request/",_IMAGE_RESPONSE_CHANNEL_PREFIX:"/imageservice/response/",_USE_DEFAULT_SIZE:-1,constructor:function(a,c,d,g,l){this._cursor=a;this._view=c;this._imagesPlugin=l;this._actionService=g;this._id=d;this._actionService.loadActions([{id:"rtc_image",enabled:!1,callback:f.hitch(this,this._insertImage)}]);e.after(this._cursor,"onChange",f.hitch(this,
this._updateActions));b.subscribe(this._IMAGE_RESPONSE_CHANNEL_PREFIX+this._id,"_imageRequestResponse",this)},_updateActions:function(){this._actionService.updateAction("rtc_image",{enabled:this._canInsertImage()})},_insertImage:function(){d.assert(this._canInsertImage(),"Insert image action called even though it should have been disabled.");b.publish(this._IMAGE_REQUEST_CHANNEL_PREFIX+this._id)},_canInsertImage:function(){return this._imagesPlugin.canInsertImage()},_imageRequestResponse:function(a){d.assert(a&&
a.data,"Invalid message data.");var c=this._imagesPlugin.getWidthToFitOnScreen();a={imgSrc:a.data.imgSrc,width:a.data.width>c?c:this._USE_ORIGINAL_SIZE,height:this._USE_ORIGINAL_SIZE,altText:a.data.fileName};this._imagesPlugin.startImageChange();a=this._imagesPlugin.insertImageFromData(a);this._imagesPlugin.endImageChange(a)}})})},"liveeditor/plugin/OpenToLineColumnProvider":function(){define(["dojo/_base/declare","liveeditor/plugin/OpenToLineColumn","MW/rtc/core/provider/PluginProvider"],function(g,
f,e){return g(e,{requires:function(){return{createInstance:["rtc.id","rtc.internaldocument","rtc.cursor","rtc.linenumberservice"]}},createInstance:function(d,b,a,c){return new f(d,b,a,c)},destroyInstance:function(d){d.destroy()}})})},"liveeditor/plugin/OpenToLineColumn":function(){define(["dojo/_base/declare","mw-messageservice/MessageService","MW/rtc/plugins/goto/GotoUtilities"],function(g,f,e){return g(null,{_OPEN_TO_CODE_LINE_COLUMN_PREFIX:"/liveeditor/opentolinecolumn/code/",_OPEN_TO_DOCUMENT_LINE_COLUMN_PREFIX:"/liveeditor/opentolinecolumn/document/",
_LINE:"line",_COLUMN:"column",constructor:function(d,b,a,c){this._internalDocument=b;this._cursor=a;this._lineNumberService=c;this._codeLineNamespace=this._OPEN_TO_CODE_LINE_COLUMN_PREFIX+d;this._documentLineNamespace=this._OPEN_TO_DOCUMENT_LINE_COLUMN_PREFIX+d;this._installSubscribers()},_installSubscribers:function(){f.subscribe(this._codeLineNamespace,"_openToCodeLineColumnRequest",this);f.subscribe(this._documentLineNamespace,"_openToDocumentLineColumnRequest",this)},_openToCodeLineColumnRequest:function(d){d=
d.data;e.gotoCodeLineColumn(this._internalDocument,this._lineNumberService,this._cursor,d[this._LINE],d[this._COLUMN])},_openToDocumentLineColumnRequest:function(d){d=d.data;e.gotoDocumentLineColumn(this._internalDocument,this._cursor,d[this._LINE],d[this._COLUMN])},destroy:function(){f.unsubscribe(this._codeLineNamespace,"_openToCodeLineColumnRequest",this);f.unsubscribe(this._documentLineNamespace,"_openToDocumentLineColumnRequest",this)}})})},"liveeditor/plugin/LiveEditorSaveLoadProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","liveeditor/plugin/LiveEditorSaveLoad"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.id rtc.internaldocument rtc.view.viewportopenedservice rtc.export.pdf rtc.export.html rtc.embeddedoutputs rtc.embeddedoutputs.model rtc.exportnotifier rtc.actionservice rtc.backingstore rtc.serializers rtc.code.matlabfiletype rtc.templateType matlab.templateservice rtc.settings.service".split(" ")}},createInstance:function(d,b,a,c,f,g,l,m,p,n,q,r,
s,t,u){return new e(d,b,a,c,f,g,l,m,p,n,q,r,s,t,u)}})})},"liveeditor/plugin/LiveEditorSaveLoad":function(){define("dojo/_base/declare dojo/_base/lang dojo/Deferred dojo/aspect dojo/when mw-messageservice/MessageService MW/rtc/model/io/DocumentTag MW/rtc/model/io/MDocumentWriter MW/rtc/model/io/LaTeXDocumentWriter MW/rtc/model/io/OpcPackage MW/rtc/model/io/Reader MW/rtc/model/io/Writer MW/rtc/model/io/documentation/DocumentationWriter MW/rtc/plugins/embeddedoutputs/model/io/OutputWriter MW/rtc/plugins/embeddedoutputs/model/io/OutputReader MW/rtc/plugins/view/exporters/DocBookXMLWriter mw-log/Log mw-filename-utils/FileNameUtil".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u){return g(null,{_EVENT_CHANNEL_PREFIX:"/liveeditor/events/",_EVENT_GET_CONTENT_REQUEST_CHANNEL_PREFIX:"/liveeditor/events/getContentRequest/",_EVENT_GET_CONTENT_RESPONSE_CHANNEL_PREFIX:"/liveeditor/events/getContentResponse/",_EVENT_SET_CONTENT_REQUEST_CHANNEL_PREFIX:"/liveeditor/events/setContentRequest/",_EVENT_SET_CONTENT_RESPONSE_CHANNEL_PREFIX:"/liveeditor/events/setContentResponse/",_EVENT_WRITE_CONTENT_REQUEST_CHANNEL_PREFIX:"/mlx/service/writeRequest",
_EVENT_WRITE_CONTENT_RESPONSE_CHANNEL_PREFIX:"/mlx/service/writeResponse/",_EVENT_READ_CONTENT_REQUEST_CHANNEL_PREFIX:"/mlx/service/readRequest",_EVENT_READ_CONTENT_RESPONSE_CHANNEL_PREFIX:"/mlx/service/readResponse/",_OUTPUT_LOCATION:"/matlab/output.xml",_OUTPUT_FORMAT:"text/xml",_OUTPUT_RELATIONSHIP_TYPE:"http://schemas.mathworks.com/matlab/code/2013/relationships/output",DEFER_SET_CONTENT_UNTIL_VIEWPORT_OPENED_SETTING:"deferSetContentUntilViewportOpened",constructor:function(c,b,d,h,g,k,l,m,p,
n,q,r,s,t,u){this._rtcId=c;this._internalDocument=b;this._viewportService=d;this._embeddedOutputsPlugin=k;this._exportNotifier=m;this._embeddedOutputsModel=l;this._actionService=p;this._backingStore=n;this._requestedLoadContent=!1;this._serializers=q;this._fileType=r;this._rtcSettingService=u;this._templateType=s;this._templateService=t;this._templateName=null;this._addActions();this._pdfExporter=h;this._htmlExporter=g;a.subscribe(this._EVENT_GET_CONTENT_REQUEST_CHANNEL_PREFIX+c,"_handleGetContentRequest",
this);a.subscribe(this._EVENT_SET_CONTENT_REQUEST_CHANNEL_PREFIX+c,"_handleSetContentRequest",this);a.subscribe(this._EVENT_WRITE_CONTENT_RESPONSE_CHANNEL_PREFIX+c,"_handleWriteContentResponse",this);a.subscribe(this._EVENT_READ_CONTENT_RESPONSE_CHANNEL_PREFIX+c,"_handleReadContentResponse",this);this._backingStore._save=f.hitch(this,this._save);this._backingStore._load=f.hitch(this,this._load);this._loaddeferred=new e;"sampleLiveCodeFile.mlx"!==this._backingStore.getAbsoluteFilePath()&&(this._load(),
this._requestedLoadContent=!0)},_handleWriteContentResponse:function(a){a.data||t.error("Error while writing MLX file: "+a.data)},_handleReadContentResponse:function(a){if(a.data.status){try{this._templateType?(this._templateService.applyTemplate(this._templateType,this._templateName),this._templateType="",this._save(this._backingStore.getAbsoluteFilePath())):this._deferSetContentUntilViewportOpened()?this._viewportService.whenViewportOpened(function(){this._loadDocumentAndOutput(a.data)}.bind(this)):
this._loadDocumentAndOutput(a.data)}catch(c){t.error("Error while loading the document or output:"+c)}this._loaddeferred.resolve(!0)}else this._loaddeferred.resolve(!1)},onLoadFutureVersion:function(){},_save:function(c){if(c){if(this._fileType.getFileType()===this._fileType.FILE_TYPE.ClassDefinitionFile)return{status:!1,errorId:"notASupportedFileError"};var b=this._handleGetMLXContentRequest();a.publish(this._EVENT_WRITE_CONTENT_REQUEST_CHANNEL_PREFIX,{status:!0,rtcId:this._rtcId,exception:null,
contentType:"text/xml",content:b,filePath:c});return{status:!0}}this._fireEvent("save")},_load:function(c){if(c)return""!==this._templateType&&(this._templateName=u.getFileNameNoExtension(u.nameFromPath(c))),a.publish(this._EVENT_READ_CONTENT_REQUEST_CHANNEL_PREFIX,{filePath:c,rtcId:this._rtcId}),this._loaddeferred.promise;this._fireEvent("load").then(function(){},f.hitch(this,function(){this._fireEvent("load")}))},_addActions:function(){var a=[{id:"save",enabled:!0,key:"ctrl_s",platformKey:{mac:"meta_s"},
callback:f.hitch(this,"_save")}];this._actionService.loadActions(a)},_handleGetContentRequest:function(c){var d=c.data;c=d.contentType;var d=d.additionalArguments,e={status:!0,exception:null,contentType:c,content:null};try{var f;"mlx"===c?f=this._handleGetMLXContentRequest():"html"===c?f=this._handleGetHTMLContentRequest(d):"pdf"===c?f=this._handleGetPDFContentRequest(d):"m"===c?f=this._handleGetMContentRequest():"xml"===c?f=this._handleGetDocBookXMLContentRequest(d):"tex"===c&&(f=this._handleGetLaTeXContentRequest(d));
e.content=f}catch(h){e.exception=h.stack,e.status=!1}var g=this._EVENT_GET_CONTENT_RESPONSE_CHANNEL_PREFIX+this._rtcId;b(f,function(c){e.content=c;a.publish(g,e)},function(c){e.exception=c;e.status=!1;e.content=null;a.publish(g,e)})},_handleGetDocBookXMLContentRequest:function(a){var c=new s(a[0],a[1],a[2],a[3],a[4],a[5]);this._notifyOnExport();(a=this._isInline())||this._switchInline();var b=this._embeddedOutputsPlugin.getEmbeddedOutputsView(),c=c.write(this._internalDocument,"",b);a||this._switchOnRight();
return c},_handleGetMLXContentRequest:function(){var a=new l;n.write(this._internalDocument,a);p.write(this._internalDocument,a,this._serializers);var c=q.write(this._embeddedOutputsPlugin);a.createPart(this._OUTPUT_LOCATION,this._OUTPUT_FORMAT).setContent(c);a.createRelationship(this._OUTPUT_RELATIONSHIP_TYPE,this._OUTPUT_LOCATION);return l.toJson(a)},_handleGetHTMLContentRequest:function(a){this._notifyOnExport();var c=this._isInline();c||this._switchInline();var b={range:this._internalDocument.getFullRange()};
a&&0<a.length&&(b.MATLABRelease=a[0]);a=this._htmlExporter.export(b);c||this._switchOnRight();return a},_handleGetPDFContentRequest:function(a){this._notifyOnExport();var c=this._isInline();c||this._switchInline();var b={};a&&0<a.length&&(a=a[0],a.figurePath&&(b.figurePath=a.figurePath));b=this._pdfExporter.saveAsPDF(b);c||this._switchOnRight();return b},_handleGetMContentRequest:function(){return h.write(this._internalDocument)},_handleGetLaTeXContentRequest:function(a){this._notifyOnExport();return k.write(this._internalDocument,
this._embeddedOutputsModel,a)},_notifyOnExport:function(){this._exportNotifier.notifyExportStart()},_loadDocumentAndOutput:function(a){var c=l.fromJson(a);a=m.read(this._internalDocument,c,this._serializers);var c=c.getPart(this._OUTPUT_LOCATION),b=!0;this._embeddedOutputsPlugin&&(0!==Object.keys(c).length&&c.getContent())&&(b=r.read(this._embeddedOutputsPlugin,{output:c.getContent()}));if(!a||!b)this.onLoadFutureVersion()},_handleSetContentRequest:function(a){var c=a.data;c.deferSetContentUntilViewportOpened||
this._deferSetContentUntilViewportOpened()?this._viewportService.whenViewportOpened(function(){this._processContentJson(c.opcPackage)}.bind(this)):this._processContentJson(c.opcPackage)},_processContentJson:function(c){var b={status:!0,exception:null};try{this._loadDocumentAndOutput(c)}catch(d){b.exception=d.stack,b.status=!1}a.publish(this._EVENT_SET_CONTENT_RESPONSE_CHANNEL_PREFIX+this._rtcId,b);this._requestedLoadContent&&(this._fireEvent("content_set").then(function(){},f.hitch(this,function(){this._fireEvent("content_set")})),
this._requestedLoadContent=!1)},_fireEvent:function(c,b){return a.publish(this._EVENT_CHANNEL_PREFIX+this._rtcId,{eventName:c,eventData:b})},_isInline:function(){var a=!1,c=this._actionService.getAction("rtc_inline_view");c&&(c.enabled&&c.selected)&&(a=!0);return a},_switchInline:function(){this._actionService.getAction("rtc_inline_view_no_animation")&&this._actionService.executeAction("rtc_inline_view_no_animation")},_switchOnRight:function(){this._actionService.getAction("_rtc_on_right_view_no_animation")&&
this._actionService.executeAction("_rtc_on_right_view_no_animation")},_deferSetContentUntilViewportOpened:function(){return this._rtcSettingService.get(this.DEFER_SET_CONTENT_UNTIL_VIEWPORT_OPENED_SETTING)}})})},"MW/rtc/model/io/LaTeXDocumentWriter":function(){define("dojo/_base/declare dojo/Deferred dojo/DeferredList MW/equations/renderer/model/utils/TeXUtils MW/equations/renderer/Renderer MW/rtc/plugins/equations/equationcontroller/nodes/EquationNode MW/rtc/plugins/hyperlink/model/HyperlinkNode MW/rtc/plugins/images/ImageRemoteService MW/rtc/plugins/images/model/ImageNode MW/rtc/plugins/sectionbreak/model/SectionBreakNode mw-log/Log".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m){return{_BEGIN_COMMAND:"\\begin",_END_COMMAND:"\\end",_TEXT_TITLE_COMMAND:"\\matlabtitle",_TEXT_HEADING_COMMAND:"\\matlabheading",_TEXT_HEADING2_COMMAND:"\\matlabheadingtwo",_TEXT_HEADING3_COMMAND:"\\matlabheadingthree",_BOLD_COMMAND:"\\textbf",_ITALIC_COMMAND:"\\textit",_MONOSPACE_COMMAND:"\\texttt",_UNDERLINE_COMMAND:"\\underline",_HYPERLINK_COMMAND:"\\href",_HYPERREF_COMMAND:"\\hyperref",_GRAPHICS_COMMAND:"\\includegraphics",_VERTICAL_SPACE_COMMAND:"\\vspace",_HORIZONTAL_SPACE_COMMAND:"\\hfill",
_BREAK_COMMAND:"\\break",_DOCUMENT_CLASS_COMMAND:"\\documentclass",_USE_PACKAGE_COMMAND:"\\usepackage",_SLOPPY_COMMAND:"\\sloppy",_EPS_TO_PDF_COMMAND:"\\epstopdfsetup",_GRAPHICS_PATH_COMMAND:"\\graphicspath",_SET_LENGTH_COMMAND:"\\setlength",_ITEM_COMMAND:"   \\item",_MAX_WIDTH_COMMAND:"\\maxwidth",_OUTPUT_TABLECELL_COMMAND:"\\mlcell",_DISPLAY_STYLE_COMMAND:"\\displaystyle ",_HAS_MULTI_TITLE_COMMAND:"\\matlabmultipletitles",_LABEL_COMMAND:"\\label",_SOFT_LINEBREAK_COMMAND:"\\linebreak",_HAS_TOC_COMMAND:"\\matlabhastoc",
_TABLE_OF_CONTENTS_COMMAND:"\\matlabtableofcontents",_DOCUMENT_ENVIRONMENT:"document",_PARAGRAPH_ENVIRONMENT:"par",_ORDERED_LIST_ENVIRONMENT:"enumerate",_UNORDERED_LIST_ENVIRONMENT:"itemize",_TABLE_ENVIRONMENT:"tabular",_CODE_ENVIRONMENT:"matlabcode",_OUTPUT_ENVIRONMENT:"matlaboutput",_SYMBOLIC_ENVIRONMENT:"matlabsymbolicoutput",_OUTPUT_TABLE_ENVIRONMENT:"matlabtableoutput",_CENTER_ENVIRONMENT:"center",_EQUATION_INLINE_DELIMITER:"$",_EQUATION_DISPLAY_DELIMITER:"$$",_CODE_EXAMPLE_ENVIRONMENT:"lstlisting",
_CENTER:"center",_RIGHT:"right",_ALIGN_RIGHT:"flushright",_ALIGN_LEFT:"flushleft",_TABLE_LEFT_JUSTIFIED:"l",_TABLE_CENTERED:"c",_TABLE_RIGHT_JUSTIFIED:"r",_TABLE_VERTICAL_LINE:"|",_TABLE_CELL_SEPARATOR:"\x26",_TABLE_ROW_END:"\\\\",_TABLE_HORIZONTAL_LINE:"\\hline",_TABLE_MULTI_COLUMN:"\\multicolumn",_SPECIAL_CHARS:[[/\$/g,"\\$"],[/%/g,"\\%"],[/\{/g,"\\{"],[/}/g,"\\}"],[/_/g,"\\_"],[/#/g,"\\#"],[/&/g,"\\\x26"],[/</g,"\\textless{}","\x3c"],[/>/g,"\\textgreater{}","\x3e"],[/~/g,"\\textasciitilde{}","\\~"],
[/\^/g,"\\textasciicircum{}","^"]],_ESCAPE_BACKSLASH:[/\\/g,"\\textbackslash{}","\\\\"],_BlockTypeEnum:{CODE:0,TITLE:1,HEADING:2,TEXT:3,LIST:4,OUTPUT:5,SYMBOLIC:6,FIGURE:7,OUTPUT_TABLE:8},_DisplayModeEnum:{FULL_DISPLAY:0,MIXED:1,FULL_INLINE:2},_EMPTY_SPACE_SIZE:"1em",_PIXELS_TO_EM:9.965,_IMAGE_PREFIX:"image_",_FIGURE_PREFIX:"figure_",_IMAGE_DEFAULT_EXT:".png",_FIGURE_DEFAULT_EXT:".eps",_FIGURE_DEFAULT_FORMAT:"epsc",_FIGURE_DEFAULT_RESOLUTION:"0",_FIGURE_DEFAULT_SIZE:560,_INTERNAL:"internal:",write:function(a,
c,d){this._internalDocument=a;this._outputsModel=c;this._graphicsPath=d;this._figureCount=this._imageCount=0;this._promiseList=[];this._hasToC=!1;this._currentBlockType=this._BlockTypeEnum.TITLE;this._mathMLRenderer=new b({equationFormat:"mathml",cacheFontMetrics:!1});this._regions=this._outputsModel.getRegions();var h=this._tempCodeText="";this._titleCount=0;a=this._internalDocument.getMaxLineNumber();for(c=0;c<a;c+=1)d=this._internalDocument.getLineNode(c),d.anchorId&&(h+=this._LABEL_COMMAND+"{"+
d.anchorId+"}"),h+=this._getLaTeXTextForNode(d);this._multipleTitles=1<this._titleCount;a=RegExp("(?:\\n\\"+this._VERTICAL_SPACE_COMMAND+"{"+this._EMPTY_SPACE_SIZE+"}\\n)+$");var h=h.replace(RegExp("^(?:\\n\\"+this._VERTICAL_SPACE_COMMAND+"{"+this._EMPTY_SPACE_SIZE+"}\\n)+"),""),h=h.replace(a,""),h=this._generatePreamble()+this._wrapInEnvironment(h,this._DOCUMENT_ENVIRONMENT),g=new f;0<this._promiseList.length?(new e(this._promiseList)).then(function(a){var c=[];a.forEach(function(a){a[0]||c.push(a[1].messageFaults[0].message)});
0<c.length?g.reject(c.join("\n\n")):g.resolve(h)}):g.resolve(h);return g},_generatePreamble:function(){var a;a="% This LaTeX was auto-generated from MATLAB code.\n% To make changes, update the MATLAB code and export to LaTeX again.\n\n"+this._insertCommand(this._DOCUMENT_CLASS_COMMAND,"article");a+="\n"+this._insertCommand(this._USE_PACKAGE_COMMAND,"inputenc","utf8")+this._insertCommand(this._USE_PACKAGE_COMMAND,"fontenc","T1")+this._insertCommand(this._USE_PACKAGE_COMMAND,"lmodern")+this._insertCommand(this._USE_PACKAGE_COMMAND,
"graphicx")+this._insertCommand(this._USE_PACKAGE_COMMAND,"color")+this._insertCommand(this._USE_PACKAGE_COMMAND,"listings")+this._insertCommand(this._USE_PACKAGE_COMMAND,"hyperref")+this._insertCommand(this._USE_PACKAGE_COMMAND,"amsmath")+this._insertCommand(this._USE_PACKAGE_COMMAND,"amsfonts")+this._insertCommand(this._USE_PACKAGE_COMMAND,"epstopdf")+this._insertCommand(this._USE_PACKAGE_COMMAND,"matlab");a+="\n"+this._insertCommand(this._SLOPPY_COMMAND);a+=this._insertCommand(this._EPS_TO_PDF_COMMAND,
"outdir\x3d./");var c=""+this._graphicsPath,b=c.split("/");2<=b.length&&(c="./"+b[b.length-2]+"/");a+=this._insertCommand(this._GRAPHICS_PATH_COMMAND," {"+c+"} ")+"\n";this._multipleTitles&&(a+=this._insertCommand(this._HAS_MULTI_TITLE_COMMAND));this._hasToC&&(a+=this._insertCommand(this._HAS_TOC_COMMAND));return a+=this._multipleTitles||this._hasToC?"\n":""},_getLaTeXTextForNode:function(a){var c=this._getContainerNodeType(a);switch(c){case "title":return this._visitTitle(a);case "heading":return this._visitHeadingFormat(a,
this._TEXT_HEADING_COMMAND);case "heading2":return this._visitHeadingFormat(a,this._TEXT_HEADING2_COMMAND);case "heading3":return c=(c=a.nextSibling())&&"code"===this._getContainerNodeType(c),this._visitHeadingFormat(a,this._TEXT_HEADING3_COMMAND,c);case "text":return this._visitText(a);case "code":return this._visitCode(a);case "ordered":return this._visitList(a,this._ORDERED_LIST_ENVIRONMENT);case "unordered":return this._visitList(a,this._UNORDERED_LIST_ENVIRONMENT);case "toc":return this._visitToC(a);
case "codeexample_plain":case "codeexample_matlab":return this._visitCodeExample(a);case "":if(this._isSectionBreakNode(a))return this._visitSectionBreak();default:return m.warn("Node type "+c+" with class name "+a.className+" is not supported for exporting to LaTeX."),""}},_getContainerNodeType:function(a){return a.containerType()},_visitTitle:function(a){this._currentBlockType=this._BlockTypeEnum.TITLE;this._titleCount++;a=this._visitRichText(a);return""===a?"\n"+this._insertCommand(this._VERTICAL_SPACE_COMMAND,
this._EMPTY_SPACE_SIZE):"\n"+this._insertCommand(this._TEXT_TITLE_COMMAND,a)},_visitToC:function(a){this._hasToC=!0;a=a.firstChild().getText();return"\n"+this._insertCommand(this._TABLE_OF_CONTENTS_COMMAND,a)},_visitHeadingFormat:function(a,c,b){b=b||!1;this._currentBlockType=this._BlockTypeEnum.HEADING;a=this._visitRichText(a);if(""===a)return"\n"+this._insertCommand(this._VERTICAL_SPACE_COMMAND,this._EMPTY_SPACE_SIZE);c="\n"+this._insertCommand(c,a);b&&(c+="\n"+this._wrapInEnvironment(this._HORIZONTAL_SPACE_COMMAND+
" "+this._BREAK_COMMAND,this._PARAGRAPH_ENVIRONMENT));return c},_visitText:function(a){this._currentBlockType=this._BlockTypeEnum.TEXT;a=this._visitRichText(a);return""===a?"\n"+this._insertCommand(this._VERTICAL_SPACE_COMMAND,this._EMPTY_SPACE_SIZE):"\n"+this._wrapInEnvironment(a,this._PARAGRAPH_ENVIRONMENT)},_visitCode:function(a){this._currentBlockType=this._BlockTypeEnum.CODE;this._tempCodeText+=a.getText();var c=this._getOutputText(a),b=""!==c;a=!a.nextSibling()||"code"!==this._getContainerNodeType(a.nextSibling());
if(b||a){var d=this._wrapInEnvironment(this._tempCodeText,this._CODE_ENVIRONMENT);this._tempCodeText="";d="\n"+d+c;return a&&b?d+"\n":d}this._tempCodeText+="\n";return""},_visitCodeExample:function(a){a=a.children.map(function(a){return a.getText()}).join("\n");return this._wrapInEnvironment(a,this._CODE_EXAMPLE_ENVIRONMENT)},_getOutputText:function(a){var c="";a=this._getGroupedOutputsForNode(a);if(0===a.length)return c;var b="",d=[];a.forEach(function(a){b=a.type;var e="";"figure"===b?(this._currentBlockType!==
this._BlockTypeEnum.FIGURE&&(c+=this._wrapInEnvironmentForCurrentBlockType(d),d=[]),this._currentBlockType=this._BlockTypeEnum.FIGURE,e=this._visitFigure(a)):"symbolic"===b?(this._currentBlockType!==this._BlockTypeEnum.SYMBOLIC&&(c+=this._wrapInEnvironmentForCurrentBlockType(d),d=[]),this._currentBlockType=this._BlockTypeEnum.SYMBOLIC,e=this._visitSymbolic(a)):this._isTableOutput(a)?(this._currentBlockType!==this._BlockTypeEnum.OUTPUT_TABLE&&(c+=this._wrapInEnvironmentForCurrentBlockType(d),d=[]),
this._currentBlockType=this._BlockTypeEnum.OUTPUT_TABLE,e=this._visitTable(a)):(this._currentBlockType!==this._BlockTypeEnum.OUTPUT&&(c+=this._wrapInEnvironmentForCurrentBlockType(d),d=[]),this._currentBlockType=this._BlockTypeEnum.OUTPUT,e=a.getText());d.push(e)},this);c+=this._wrapInEnvironmentForCurrentBlockType(d);c=c.replace(/\u00D7/g,"x");c=c.replace(/\u0160|\u2009/g,String.fromCharCode(32));return c.trim()},_getGroupedOutputsForNode:function(a){var c=[],b=this._internalDocument.getLineNumber(a);
this._regions.forEach(function(a){var d=a.code.regionPositions;d[d.length-1].line===b&&(c=c.concat(this._outputsModel.getOutputsForRegion(a)))},this);return c},_wrapInEnvironmentForCurrentBlockType:function(a){var c=this._getEnvironmentForBlockType(this._currentBlockType);return this._wrapInEnvironment(a.join("\n"),c)},_getEnvironmentForBlockType:function(a){switch(a){case this._BlockTypeEnum.CODE:return this._CODE_ENVIRONMENT;case this._BlockTypeEnum.OUTPUT:return this._OUTPUT_ENVIRONMENT;case this._BlockTypeEnum.SYMBOLIC:return this._SYMBOLIC_ENVIRONMENT;
case this._BlockTypeEnum.OUTPUT_TABLE:return this._OUTPUT_TABLE_ENVIRONMENT;default:return""}},_visitList:function(a,c){this._currentBlockType=this._BlockTypeEnum.LIST;var b="\n"+this._insertCommand(this._SET_LENGTH_COMMAND,["\\itemsep","-1ex"]);a.children.forEach(function(a){b+=this._insertCommand(this._ITEM_COMMAND,this._visitRichText(a))},this);return"\n"+this._wrapInEnvironment(b.trim(),c)},_visitSectionBreak:function(){return"\n"},_visitRichText:function(a){var c=a.children,b="",d=this._ALIGN_LEFT;
a.align===this._RIGHT?d=this._ALIGN_RIGHT:a.align===this._CENTER&&(d=this._CENTER);if(this._currentBlockType===this._BlockTypeEnum.TITLE||this._currentBlockType===this._BlockTypeEnum.HEADING)d="";c.forEach(function(a){var c="";this._isHyperLinkNode(a)?c+=this._visitHyperlink(a):this._isEquationNode(a)?(c+=this._visitEquation(a),this._getDisplayModeForEquation(a)===this._DisplayModeEnum.FULL_DISPLAY&&(d="")):this._isImageNode(a)?c+=this._visitImage(a):(c+=this._handleSpecialCharacters(a.text),c=this._wrapInlineMarkup(c,
a));b+=c},this);a=null;this._currentBlockType===this._BlockTypeEnum.LIST&&(a=" ");b=b.replace(/(\r\n|\n|\r)/gm,this._SOFT_LINEBREAK_COMMAND+" \n");return this._wrapInEnvironment(b,d,null,a).trim()},_visitHyperlink:function(a){var c="";a.children.forEach(function(a){c=void 0!==a.hyperlink?c+this._visitHyperlink(a):c+this._handleSpecialCharacters(a.text)},this);return 0===a.hyperlink.indexOf(this._INTERNAL)?this._insertCommandSameLine(this._HYPERREF_COMMAND,c,a.hyperlink.substring(this._INTERNAL.length)):
this._insertCommandSameLine(this._HYPERLINK_COMMAND,[a.hyperlink,c])},_visitEquation:function(a){var c=this._getDisplayModeForEquation(a);a=a.getTeXString();return""===a?a:this._wrapEquation(c,a)},_getDisplayModeForEquation:function(a){var c=this._DisplayModeEnum.FULL_INLINE;a.getDisplayStyle()&&(c=this._currentBlockType===this._BlockTypeEnum.LIST?this._DisplayModeEnum.MIXED:this._DisplayModeEnum.FULL_DISPLAY);return c},_visitImage:function(a){var c=this._IMAGE_PREFIX+this._imageCount,b=this._graphicsPath+
c+this._IMAGE_DEFAULT_EXT;this._imageCount+=1;b=h.writeToPath(a.imgSrc,b);this._promiseList.push(b);a=this._insertCommandSameLine(this._MAX_WIDTH_COMMAND,(-1<a.width?a.width:a.box.naturalWidth)/this._PIXELS_TO_EM+"em");return this._insertCommandSameLine(this._GRAPHICS_COMMAND,c,"width\x3d"+a)},_visitFigure:function(a){var c=this._FIGURE_PREFIX+this._figureCount,b=this._graphicsPath+c;this._figureCount+=1;a.canPrintToFile()?(b+=this._FIGURE_DEFAULT_EXT,b=a.printToFile(this._FIGURE_DEFAULT_FORMAT,this._FIGURE_DEFAULT_RESOLUTION,
b)):(b+=this._IMAGE_DEFAULT_EXT,b=h.writeToPath(a.getFigureUri(),b));this._promiseList.push(b);a=a.getFigureSize();a=this._insertCommandSameLine(this._MAX_WIDTH_COMMAND,(a?a[0]:this._FIGURE_DEFAULT_SIZE)/this._PIXELS_TO_EM+"em");c=this._insertCommandSameLine(this._GRAPHICS_COMMAND,c,"width\x3d"+a);return this._wrapInEnvironment(c,this._CENTER_ENVIRONMENT)},_visitSymbolic:function(a){var c=a.getName(),c=""===c?"":c+" \x3d \n    ";a=a.getValue();a=this._mathMLRenderer.getModel(a).exportLaTeX({});return c+
this._wrapSymbolicOutput(a)},_visitTable:function(a){var c=a.getTableData();a=c.columnCount;c=this._getTableLaTeXString(c.data,c.colSpan);a=this._insertTableColumnFormat(a);c=this._wrapInEnvironment(c,this._TABLE_ENVIRONMENT,a);return"{\n"+c+"}"},_insertTableColumnFormat:function(a){var c=this._TABLE_VERTICAL_LINE+this._TABLE_CENTERED;a||(a=1);return c=Array(a+1).join(c)+this._TABLE_VERTICAL_LINE},_getTableLaTeXString:function(a,c){var b=this._TABLE_HORIZONTAL_LINE+"\n",d=a.shift(),e=b+this._insertTableLaTeXColumnHeader(d,
c);a.forEach(function(a,c){e+=b+this._insertTableLaTeXRow(a)},this);return e+="\n"+this._TABLE_HORIZONTAL_LINE},_insertTableLaTeXColumnHeader:function(a,c){var b="",d=[],b=" "+this._TABLE_CELL_SEPARATOR+" ";a.forEach(function(a,b){a=this._handleSpecialCharacters(a);var e=this._insertCommandSameLine(this._OUTPUT_TABLECELL_COMMAND,a);if(1<c[b])var f=c[b].toString(),h=this._insertTableColumnFormat(1),e=this._insertCommandSameLine(this._TABLE_MULTI_COLUMN,[f,h,e]);d.push(e)},this);return b=d.join(b)+
" "+this._TABLE_ROW_END+" "},_insertTableLaTeXRow:function(a){var c="",b=[],c=" "+this._TABLE_CELL_SEPARATOR+" ";a.forEach(function(a){(!Array.isArray(a)?[a]:a).forEach(function(a){a=this._handleSpecialCharacters(a);a=this._insertCommandSameLine(this._OUTPUT_TABLECELL_COMMAND,a);b.push(a)},this)},this);return c=b.join(c)+" "+this._TABLE_ROW_END+" "},_wrapInlineMarkup:function(a,c){if(""===a)return a;c.bold&&(a=this._insertCommandSameLine(this._BOLD_COMMAND,a));c.italic&&(a=this._insertCommandSameLine(this._ITALIC_COMMAND,
a));c.underline&&(a=this._insertCommandSameLine(this._UNDERLINE_COMMAND,a));c.monospace&&(a=this._insertCommandSameLine(this._MONOSPACE_COMMAND,a));return a},_wrapEquation:function(a,c){c=c.replace(/^\$+/,"");c=c.replace(/\$+$/,"");if(a===this._DisplayModeEnum.FULL_DISPLAY)return this._EQUATION_DISPLAY_DELIMITER+c+this._EQUATION_DISPLAY_DELIMITER;a===this._DisplayModeEnum.MIXED&&(c=this._DISPLAY_STYLE_COMMAND+c);return this._EQUATION_INLINE_DELIMITER+c+this._EQUATION_INLINE_DELIMITER},_wrapInEnvironment:function(a,
c,b,d){if(""===a)return"";if(""===c)return a;var e=this._insertCommandSameLine(this._BEGIN_COMMAND,c);b&&(e=this._insertCommandSameLine(e,b));c=this._insertCommand(this._END_COMMAND,c);if(void 0===d||null===d)d="\n";return e+d+a+d+c},_wrapSymbolicOutput:function(a){return this._wrapEquation(this._DisplayModeEnum.MIXED,a)},_handleSpecialCharacters:function(a){if(""===a)return"";var c=this._currentBlockType===this._BlockTypeEnum.OUTPUT_TABLE;a=a.split(this._ESCAPE_BACKSLASH[0]);a=a.map(function(a){this._SPECIAL_CHARS.forEach(function(b){a=
a.replace(b[0],c&&b[2]?b[2]:b[1])},this);return a},this);return a=a.join(c?this._ESCAPE_BACKSLASH[2]:this._ESCAPE_BACKSLASH[1])},_insertCommand:function(a,c,b){return this._insertCommandSameLine(a,c,b)+"\n"},_insertCommandSameLine:function(a,c,b){var d=a;b&&(b=Array.isArray(b)?b:[b],b.forEach(function(a){d+="["+a+"]"}));c&&(c=Array.isArray(c)?c:[c],c.forEach(function(a){d+="{"+a+"}"}));return d},_isTableOutput:function(a){if("variableString"!==a.type||void 0===a.getVariableType)return!1;a=a.getVariableType();
return"table"!==a&&"timetable"!==a?!1:!0},_isSectionBreakNode:function(a){return a.isInstanceOf(l)},_isHyperLinkNode:function(a){return a.isInstanceOf(c)},_isEquationNode:function(c){return c.isInstanceOf(a)},_isImageNode:function(a){return a.isInstanceOf(k)}}})},"MW/rtc/plugins/images/ImageRemoteService":function(){define(["mw-remote/Remote","dojo/Deferred"],function(g,f){g.registerResponseHandler("FEvalResponse:WriteImageToPath",function(e,d){1===e.length?e[0].isError?d.reject(e[0]):d.resolve():
d.reject("Error while writing Image: Expected 1 result message back, received: "+e.length)},this);g.registerFaultHandler("FEval:WriteImageToPath",function(e,d){d.reject(e)},this);return{writeToPath:function(e,d){var b=new f;g.sendMessage({FEval:{"function":"javaMethod",arguments:["writeBase64Image","com.mathworks.mde.liveeditor.widget.rtc.export.FileUtils",e,d],nargout:0,priority:1}},b,"WriteImageToPath");return b}}})},"MW/rtc/model/io/OpcPackage":function(){define(["dojo/_base/declare","dojo/_base/lang",
"MW/rtc/model/io/relationship/OpcRelationshipCollection","MW/rtc/model/io/part/OpcPart","MW/rtc/model/io/OpcUtils"],function(g,f,e,d,b){var a=g(null,{constructor:function(){this._opcParts=[];this._opcPackageRelationship=new e},createPart:function(a,b){var e=new d(a,b);this._opcParts.push(e);return e},getPart:function(a){a=a.replace(/^(?:\.\.\/)+/,"/");var b={};this._opcParts.forEach(function(d){var e=d.getPartURI();"/"!==e.charAt(0)&&(e="/"+e);a===e&&(b=d)});return b},getParts:function(){return this._opcParts},
getPartURI:function(a,d,e){var f=[];this._opcParts.forEach(function(a){f.push(a.getPartURI())});return b.getUniquePartUri(a,d,e,f)},createRelationship:function(a,b){return this._opcPackageRelationship.createRelationship(a,b)}});a.toJson=function(a){var b=[];a._opcParts.forEach(function(e,f){b.push(d.toJson(a._opcParts[f]))},this);return{parts:b,relationships:e.toJson(a._opcPackageRelationship)}};a.fromJson=function(c){var b=new a,f;for(f in c.parts)b._opcParts.push(d.fromJson(c.parts[f]));b._opcPackageRelationship=
e.fromJson(c.relationships);return b};return a})},"MW/rtc/model/io/relationship/OpcRelationshipCollection":function(){define(["dojo/_base/declare","MW/rtc/model/io/relationship/OpcRelationship"],function(g,f){var e=g(null,{_baseRelationshipId:"rId",constructor:function(){this._relationshipIdCounter=0;this._opcRelationshipCollection={}},createRelationship:function(d,b){this._relationshipIdCounter+=1;var a=this._baseRelationshipId+this._relationshipIdCounter;this._opcRelationshipCollection[a]=new f(a,
d,b);return a},getRelationship:function(d){return this._opcRelationshipCollection[d]},getRelationshipCollection:function(){return this._opcRelationshipCollection}});e.toJson=function(d){var b=[],a;for(a in d._opcRelationshipCollection)b.push(f.toJson(d._opcRelationshipCollection[a]));return 0===b.length?null:b};e.fromJson=function(d){var b=e.createInstance();d.forEach(function(a){b._opcRelationshipCollection[a.relationshipId]=f.fromJson(a)});return b};e.createInstance=function(){return new e};return e})},
"MW/rtc/model/io/relationship/OpcRelationship":function(){define(["dojo/_base/declare"],function(g){var f=g(null,{constructor:function(e,d,b){this._relationshipType=d;this._target=b;this._relationshipId=e},getRelationshipType:function(){return this._relationshipType},getTarget:function(){return this._target}});f.toJson=function(e){return{relationshipType:e._relationshipType,target:e._target,relationshipId:e._relationshipId}};f.fromJson=function(e){return new f(e.relationshipId,e.relationshipType,
e.target)};return f})},"MW/rtc/model/io/part/OpcPart":function(){define(["dojo/_base/declare","MW/rtc/model/io/relationship/OpcRelationshipCollection"],function(g,f){var e=g(null,{_relationshipIdCounter:0,constructor:function(d,b){this._partUri=d;this._contentType=b;this._opcPartRelationship=new f},setContent:function(d){this._content=d},getContent:function(){return this._content},getContentType:function(){return this._contentType},getPartURI:function(){return this._partUri},createRelationship:function(d,
b){return this._opcPartRelationship.createRelationship(d,b)},getAllRelationships:function(){return this._opcPartRelationship},getRelationship:function(d){return this._opcPartRelationship.getRelationship(d)}});e.toJson=function(d){return{partUri:d._partUri,contentType:d._contentType,content:d._content,relationship:f.toJson(d._opcPartRelationship)}};e.fromJson=function(d){var b=new e(d.partUri,d.contentType);b.setContent(d.content);d.relationship&&(b._opcPartRelationship=f.fromJson(d.relationship));
return b};return e})},"MW/rtc/model/io/OpcUtils":function(){define(["dojo/_base/lang"],function(g){return{getUniquePartUri:function(f,e,d,b){return this._getUpdatedPartUri(f+(e?e:"")+"."+(d?d:""),b)},_getUpdatedPartUri:function(f,e){var d=this._getFileNameWithCount(f),b=d;e.some(function(a){a=this._getFileNameWithCount(a);a.partUri===d.partUri&&a.fileName===d.fileName&&a.fileExtension===d.fileExtension&&a.count>b.count&&(b=a)},this);b||(b=d);b.count+=1;return this._getPartUri(b)},_getFileNameWithCount:function(f){var e=
f.split(".");f=e[0];var e=e[1],d=f.lastIndexOf("/"),b=f.slice(d+1),a=b.match(/\d+$/),a=a?parseInt(a[0]):0,b=b.replace(/\d+/g,"");-1===d?f=b:(f=f.slice(0,d),f=f+"/"+b);return{partUri:f,fileName:b,fileExtension:e,count:a}},_getPartUri:function(f){var e=f.partUri+f.count;0!==f.fileExtension.length&&(e=e+"."+f.fileExtension);return e}}})},"MW/rtc/model/io/Reader":function(){define("dojo/_base/lang mw-log/Log MW/rtc/model/io/DocumentTag MW/rtc/model/io/ForwardCompatibility MW/rtc/model/io/XmlUtils MW/rtc/model/io/Serializers".split(" "),
function(g,f,e,d,b,a){return{_SUPPORTED_READER_VERSIONS:["R2018a","R2018b"],read:function(a,b,f){var l=b.getPart(e.DOCUMENT_TARGET),l=d.processXML(l.getContent(),this._SUPPORTED_READER_VERSIONS),m=this._getAllTopItems(l.xmlDocument).reduce(g.partial(this._reduceByNodeType,f),[]);b=this._readItems(m,b,f);this._insertNodeInDocument(b.readArray,a);return!l.status},_readItems:function(a,d,e){var f=!0,g=[];a.forEach(function(a){var c=this._getParagraph(a);if(c)a=this._readParagraph(c,d,e),g=g.concat(a.readObject),
f=f&&a.readStatus;else{var q=this._getSDT(a);q&&(a=b.getSdtAttribute(q),c=e.getSerializer(a),q=this._getSDTContent(q),c&&q&&(a=c.read(q,d,e,a),g=g.concat(a.readObject),f=f&&a.readStatus))}},this);return{readStatus:f,readArray:g}},_getParagraph:function(a){return a&&a[0]&&a[0].localName===e.PARAGRAPH_TAG_NAME?a:null},_getSDT:function(a){return a&&a[0]&&a[0].localName===e.SDT_TAG?a[0]:null},_getSDTContent:function(a){for(var b=0;b<a.childNodes.length;b++){var d=a.childNodes[b];if(d.localName===e.SDT_CONTENT_TAG)return d}return null},
_readParagraph:function(a,d,e){var f=!0,g=b.getAttribute(a[0]),p=e.getSerializer(g);if(!g||!p)p=e.getSerializer("text"),f=!1;a=p.read(a,d,e);a.readStatus||(f=!1);return{readObject:a.readObject,readStatus:f}},_reduceByNodeType:function(a,d,e){if(a=a.getSerializer(b.getAttribute(e))){var f=d[d.length-1];f&&b.getAttribute(f[0])===b.getAttribute(e)&&a.mustMerge(f[0],e)?f.push(e):d.push([e])}return d},_insertNodeInDocument:function(a,b){var d={className:"RootNode",children:[]};a.forEach(function(a){d.children.push(a)});
b.deserialize(d)},_getAllTopItems:function(a){a=(new window.DOMParser).parseFromString(a,"text/xml").getElementsByTagNameNS(e.NAMESPACE_URL,e.BODY_TAG_NAME)[0].childNodes;for(var b=[],d=0;d<a.length;d++)b.push(a[d]);return b}}})},"MW/rtc/model/io/ForwardCompatibility":function(){define([],function(){return{_ALTERNATE_CONTENT_TAG:"mc:AlternateContent",_FALLBACK_TAG:"Fallback",_CHOICE_TAG:"Choice",_MARKUP_COMPATIBILITY_NAMESPACE:"http://schemas.openxmlformats.org/markup-compatibility/2006",_REQUIRE_TAG:"Requires",
_supportedVersions:[],_showCompatibilityBanner:!1,processXML:function(g,f){this._showCompatibilityBanner=!1;this._supportedVersions=f;this._latestMatlabVersion=this._getLatestMatlabVersion(f);var e=this._getXMLDocumentObject(g);this._createCompatibilityNode(e);return{xmlDocument:(new window.XMLSerializer).serializeToString(e),status:this._showCompatibilityBanner}},_getLatestMatlabVersion:function(g){if(0===g.length)return"";g.sort();g.reverse();return g[0]},_getXMLDocumentObject:function(g){return(new window.DOMParser).parseFromString(g,
"text/xml")},_hasCompatibilityTag:function(g){return g.nodeName===this._ALTERNATE_CONTENT_TAG},_createCompatibilityNode:function(g){if(this._hasCompatibilityTag(g))return this._getChoiceNodeVersion(g)>this._latestMatlabVersion&&(this._showCompatibilityBanner=!0),this._getCompatibleNode(g);var f=this;[].forEach.call(g.childNodes,function(e,d){var b=f._createCompatibilityNode(e);b?g.replaceChild(b,g.childNodes.item(d)):g.removeChild(e)});return g},_getCompatibleNode:function(g){if(!this._hasElementWithTag(g,
this._CHOICE_TAG)&&!this._hasElementWithTag(g,this._FALLBACK_TAG))return g.childNodes[0];var f=this._hasSupportedVersion(g,this._supportedVersions)?this._CHOICE_TAG:this._FALLBACK_TAG;g=g.getElementsByTagNameNS(this._MARKUP_COMPATIBILITY_NAMESPACE,f);return!g[0]||0===g[0].getElementsByTagName("*").length?null:f===this._FALLBACK_TAG?this._getCompatibleNode(g[0]):g[0].childNodes[0]},_hasElementWithTag:function(g,f){g=g.getElementsByTagNameNS(this._MARKUP_COMPATIBILITY_NAMESPACE,f);return!g||0===g.length?
!1:!0},_getChoiceNodeVersion:function(g){return(g=g.getElementsByTagNameNS(this._MARKUP_COMPATIBILITY_NAMESPACE,this._CHOICE_TAG))&&g[0]?g[0].getAttribute(this._REQUIRE_TAG):!1},_hasSupportedVersion:function(g,f){if(!this._hasElementWithTag(g,this._CHOICE_TAG))return!1;var e=this._getChoiceNodeVersion(g);return-1!==f.indexOf(e)}}})},"MW/rtc/model/io/Writer":function(){define(["dojo/_base/lang","MW/rtc/model/io/DocumentTag","MW/rtc/model/io/XmlUtils"],function(g,f,e){return{write:function(d,b,a){d=
d.serialize(d.root).children.reduce(this._reduceByNodeType,[]);var c=e.createXMLElement(f.BODY_TAG_NAME),h=this._createPart(b,c);this._addRelationship(b);d.forEach(function(d){this._createAndAppendParagraphs(c,d,b,a)},this);h.setContent(this._getDocumentXML(c))},_addRelationship:function(d){d.createRelationship(f.RELATIONSHIP_TYPE,f.DOCUMENT_TARGET)},_createPart:function(d,b){return d.createPart(f.DOCUMENT_TARGET,f.DOCUMENT_CONTENT_TYPE,this._getDocumentXML(b))},_reduceByNodeType:function(d,b){var a=
d[d.length-1];a&&a[0].className===b.className?a.push(b):d.push([b]);return d},_getDocumentXML:function(d){var b=e.createDocument(f.ROOT_TAG_NAME);b.documentElement.appendChild(d);return e.serializeToFormattedString(b)},_createAndAppendParagraphs:function(d,b,a,c){b=c.getSerializer(b[0].className).write(b,a,c);for(a=b.childNodes.length;0!==a;)d.appendChild(b.childNodes[0]),a--}}})},"MW/rtc/model/io/documentation/DocumentationWriter":function(){define("dojo/_base/lang MW/rtc/model/CodeUtilities MW/rtc/model/io/XmlUtils MW/rtc/model/Selection MW/rtc/model/Position MW/rtc/plugins/view/exporters/DocumentationHTMLWriter".split(" "),
function(g,f,e,d,b,a){return{_DOCUMENTATION_LOCATION:"/documentation/doc.xml",_DOCUMENTATION_FORMAT:"text/xml",_DOCUMENTATION_RELATIONSHIP_TYPE:"http://schemas.mathworks.com/matlab/code/2013/relationships/documentation",_DOCUMENTATION_TAG:"documentation",_DOCUMENTATION_SYNTAXES:"syntaxes",_DOCUMENTATION_SYNTAX:"syntax",_DOCUMENTATION_PURPOSE:"purpose",_DOCUMENTATION_TITLE:"title",_DOCUMENTATION_DESCRIPTION:"description",_FUNCTION_SYNTAX:"",_FUNCTION_PURPOSE:"",write:function(a,b){var d=e.createDocument(this._DOCUMENTATION_TAG),
f=this._createDocumentationBlock(a);if(0!==this._FUNCTION_SYNTAX.length){var g=this._getSyntaxContainer(),p=this._getTitleContainer(),n=this._getPurposeContainer();d.documentElement.appendChild(p);d.documentElement.appendChild(g);d.documentElement.appendChild(n);this._createDocumentationXML(a,d,f);f=b.createPart(this._DOCUMENTATION_LOCATION,this._DOCUMENTATION_FORMAT);d=e.serializeToFormattedString(d);f.setContent(d);b.createRelationship(this._DOCUMENTATION_RELATIONSHIP_TYPE,this._DOCUMENTATION_LOCATION);
this._FUNCTION_PURPOSE=this._FUNCTION_SYNTAX=""}},_getPurposeContainer:function(){var a=document.createElementNS(null,this._DOCUMENTATION_PURPOSE),b=document.createTextNode(this._FUNCTION_PURPOSE);a.appendChild(b);return a},_getSyntaxContainer:function(){var a=document.createElementNS(null,this._DOCUMENTATION_SYNTAXES),b=document.createElementNS(null,this._DOCUMENTATION_SYNTAX),d=document.createTextNode(this._FUNCTION_SYNTAX);b.appendChild(d);a.appendChild(b);return a},_getTitleContainer:function(){var a=
document.createElementNS(null,this._DOCUMENTATION_TITLE),b=f.extractFunctionName(this._FUNCTION_SYNTAX),b=document.createTextNode(b.trim());a.appendChild(b);return a},_createDocumentationXML:function(c,e,f){var g=document.createElementNS(null,this._DOCUMENTATION_DESCRIPTION),m=f.length,p=f[0];f=f[m-1];1==m&&(f=p);if(0<m){m=new b(p);p=new b(f,f.maxOffset());f=!this._isNodeSectionBreak(f);f=new d(m,p,!1,f);var n=(new a).write(c,f)}n||(n="");c=document.createTextNode(n);g.appendChild(c);e.documentElement.appendChild(g)},
_createDocumentationBlock:function(a){var b=a.getMaxLineNumber(),d,e=[],g=!0;for(d=0;d<b;d++){var p=a.getLineNode(d);if(this._containsFunction(p)&&g){this._FUNCTION_SYNTAX=this._processSyntax(p.getText());break}else f.isCodeContainer(p)&&""!==p.getText().trim()&&(g=!1),""===this._FUNCTION_PURPOSE?this._FUNCTION_PURPOSE=p.getText():f.isCodeContainer(p)||e.push(p)}return e},_isNodeSectionBreak:function(a){return"SectionBreak"===a.className},_processSyntax:function(a){return a.replace("function","")},
_containsFunction:function(a){var b=a.getText(),d=/\b(function)\b/;a=f.isCodeContainer(a)&&null!=b.match(d);d=b.indexOf("%");b=-1===d||d>b.indexOf("function");return a&&b}}})},"MW/rtc/plugins/view/exporters/DocumentationHTMLWriter":function(){define(["dojo/_base/declare","dojo/dom-class","MW/rtc/plugins/view/exporters/HTMLContentWriter","MW/equations/renderer/Renderer","MW/equations/renderer/model/utils/MathMLUtils"],function(g,f,e,d,b){return g(e,{constructor:function(){this._texRenderer=new d({equationFormat:"tex",
cacheFontMetrics:!1})},_startNodeElement:function(a){return f.contains(a,"SectionBlock")?(this._openTag("div",a),!1):f.contains(a,"CodeBlock")?(this._openTag("div",a,' style \x3d"margin: 10px 0 10px 0; background-color: #F7F7F7;"'),!1):this.inherited(arguments)},_writeEquationNode:function(a){a=a.rteNode;var c=a.getMathMLString();""===c&&(a=this._texRenderer.setDisplaystyleIfNeeded(a.getTeXString()),a=this._texRenderer.getModel(a),c=b.exportMathML([a]));return c}})})},"MW/rtc/plugins/view/exporters/HTMLContentWriter":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-class dojo/dom-style mw-html-utils/HtmlUtils MW/rtc/plugins/view/exporters/HTMLWriter".split(" "),
function(g,f,e,d,b,a){return f(a,{_IGNOREDSTYLES:["width","height","max-height","overflow"],constructor:function(){},_getStyle:function(a){var b=d.getComputedStyle(a),f=d.getComputedStyle(a.parentNode),l=g.filter(b,function(a){return b[a]!==f[a]&&0>this._IGNOREDSTYLES.indexOf(a)},this);if(e.contains(a,"CodeExampleBlock")||e.contains(a,"ToC")||e.contains(a,"ToCHeading")||e.contains(a,"ToCItems"))l=g.filter(l,function(a){return 0!==a.indexOf("border")},this);var m,l=l.reduce(function(a,c){m=b[c];"text-decoration"===
c&&(m=-1<m.indexOf("underline")?"underline":"none");return a+c+": "+m+"; "},""),l=l+this._nonInheritedStyles.reduce(function(a,c){return 0<parseInt(b[c],10)?a+c+": "+b[c]+"; ":a},"");e.contains(a,"lineNode")&&(0===parseInt(b.paddingLeft,10)&&a.parentNode.firstChild===a&&a.firstElementChild&&a.firstElementChild.offsetLeft!==a.offsetLeft)&&(l+="; padding-left: "+(a.firstElementChild.offsetLeft-parseInt(b.marginLeft,10))+"px");a.className.match(/\balertPlugin-/)&&(l+="; width: "+b.width+"; height: "+
b.height+";");return l},_startNodeElement:function(a){var d=this._getAttributes(a);if(e.contains(a,"heading-1"))this._openTag("div",a,d);else if(e.contains(a,"heading-2"))this._openTag("div",a,d);else{if(e.contains(a,"textBox"))return this._openTag("span",a,d),this._writeTextNode(a),!0;if(e.contains(a,"equationNode"))return this._body+=this._writeEquationNode(a),!0;if("a"===a.localName)this._openTag("a",a," target\x3d'_blank' href \x3d '"+b.escapeHtml(a.href)+"'");else{if("br"===a.localName||"img"===
a.localName)return this._body+=a.outerHTML,!0;this._openTag(a.localName,a,d)}}return!1},_getAttributes:function(a){a=this._getStyle(a);return' style\x3d"'+b.escapeHtml(a).replace(/"/g,"\x26quot;")+'"'},_endNodeElement:function(a){this._tagStack.length&&this._tagStack[0].node===a&&(this._body+="\x3c/"+this._tagStack[0].tag+"\x3e",this._tagStack.shift())},_enterTextNode:function(a){this._body+=b.escapeHtml(this._getNodeText(a))},_write:function(){this._writeBody();var a=d.getComputedStyle(this._internalDocument.root.box);
return'\x3cdiv style \x3d "'+this._inheritedStyles.reduce(function(b,d){return b+d+": "+a[d]+"; "},"")+'"\x3e'+this._body+"\x3c/div\x3e"}})})},"MW/rtc/plugins/embeddedoutputs/model/io/OutputWriter":function(){define(["dojo/_base/lang","mw-log/Log","MW/rtc/plugins/embeddedoutputs/model/io/OutputTag","MW/rtc/model/io/XmlUtils"],function(g,f,e,d){return{write:function(b){try{var a=b.save();if(!a)return null;var c=d.createDocument(e.lookup.OUTPUT_ROOT_TAG_NAME),h;for(h in a)if(a.hasOwnProperty(h)){var g=
document.createElementNS(null,h),g=this._writeElement(g,a[h]);c.documentElement.appendChild(g)}return d.serializeToFormattedString(c)}catch(l){return f.assert(!1,"Exception occurred while writing output object. Outputs will not be saved:"+l),null}},_createArrayElement:function(b,a){var c;b.setAttribute(e.lookup.TYPE_ATTRIBUTE_NAME,e.lookup.ARRAY);for(var d=0;d<a.length;d++)c=document.createElementNS(null,e.lookup.ELEMENT_TAG_NAME),b.appendChild(c),this._writeElement(c,a[d])},_createObjectElement:function(b,
a){var c,d;for(d in b)b.hasOwnProperty(d)&&(c=document.createElementNS(null,d),c=this._writeElement(c,b[d]),a.appendChild(c))},_createTextElement:function(b,a){if(b.tagName===e.lookup.META_DATA_TAG_NAME)b.setAttribute(e.lookup.VALUE,a);else{var c=document.createTextNode(a);b.appendChild(c)}},_writeElement:function(b,a){Array.isArray(a)?this._createArrayElement(b,a):this._isObject(a)?this._createObjectElement(a,b):this._createTextElement(b,a);return b},_isObject:function(b){return b&&"object"===typeof b}}})},
"MW/rtc/plugins/embeddedoutputs/model/io/OutputTag":function(){define([],function(){return{lookup:{OUTPUT_ROOT_TAG_NAME:"embeddedOutputs",ELEMENT_TAG_NAME:"element",TYPE_ATTRIBUTE_NAME:"type",META_DATA_TAG_NAME:"metaData",REGION_TAG_NAME:"region",VALUE:"value",ARRAY:"array",NAMESPACE_TAG:"mc",MARKUP_COMPATIBILITY_NAMESPACE:"http://schemas.openxmlformats.org/markup-compatibility/2006",ALTERNATE_CONTENT_TAG:"AlternateContent",CHOICE_TAG:"Choice",REQUIRE_TAG:"Requires",MATLAB_VERSION_R2016B:"R2016b",
FALLBACK_TAG:"Fallback"}}})},"MW/rtc/plugins/embeddedoutputs/model/io/OutputReader":function(){define(["dojo/_base/lang","dojo/dom-construct","mw-log/Log","MW/rtc/model/io/ForwardCompatibility","MW/rtc/plugins/embeddedoutputs/model/io/OutputTag"],function(g,f,e,d,b){return{_ELEMENT_NODE:1,_TEXT_NODE:3,read:function(a,c){try{var f=d.processXML(c.output,[]),g=(new window.DOMParser).parseFromString(f.xmlDocument,"text/xml").getElementsByTagName(b.lookup.OUTPUT_ROOT_TAG_NAME)[0],l=this._visitNode(g);
a.load(l);return!f.status}catch(m){return e.assert(!1,"Exception occurred while reading output object. Outputs will not be loaded:"+m),!0}},_visitLeafNode:function(a){return this._getValue(a)},_visitNonLeafNode:function(a){return this._isArrayNode(a)?this._getArrayObject(a):this._getObject(a)},_visitNode:function(a){return this._isLeafNode(a)?this._visitLeafNode(a):this._visitNonLeafNode(a)},_getArrayObject:function(a){for(var c=[],b=0;b<a.childNodes.length;b++){var d=this._visitNode(a.childNodes[b]);
c.push(d)}return c},_getObject:function(a){if(!a.hasChildNodes())return"";for(var c={},b=0;b<a.childNodes.length;b++){var d=this._visitNode(a.childNodes[b]),e=a.childNodes[b].nodeName;this._isArrayElement(e)?c=d:c.hasOwnProperty(e)||(c[e]=d)}return c},_getValue:function(a){return"undefined"!==typeof a.childNodes[1]?a.textContent:a.childNodes[0].nodeValue},_isLeafNode:function(a){return a.childNodes[0]&&a.childNodes[0].nodeType===this._TEXT_NODE},_isArrayNode:function(a){return 1===a.attributes.length&&
a.attributes[0].nodeValue===b.lookup.ARRAY},_isObjectNode:function(a){return a.childNodes[0].nodeType==this._ELEMENT_NODE},_isArrayElement:function(a){return a===b.lookup.ELEMENT_TAG_NAME}}})},"MW/rtc/plugins/view/exporters/DocBookXMLWriter":function(){define("dojo/_base/declare dojo/dom-class dojo/has dojo/query MW/rtc/misc/ImageURIUtilities MW/rtc/plugins/equations/equationcontroller/view/EquationViewUtilities MW/rtc/plugins/view/exporters/ExampleProductToBasecodeConverter MW/rtc/plugins/view/exporters/ViewBaseWriter mw-filename-utils/FileNameUtil".split(" "),
function(g,f,e,d,b,a,c,h,k){return g(h,{_XML_VERSION:'\x3c?xml version\x3d"1.0" encoding\x3d"UTF-8"?\x3e',_DOCTYPE:"",_XMLNS_TAG:' xmlns\x3d"http://www.w3.org/1999/xhtml"',_ID_TAGNAME:"xml:id",_DEFAULT_TITLE:"Untitled",_SECTION_DECLARATION:'\x3cgeneratedlist role\x3d"topiclist"/\x3e\n\x3cprocedure role\x3d"unnumberedsteps"\x3e\n\x3cstep\x3e',_CELLSCRIPTWRAPPER:"cellscriptwrapper",_CELLSCRIPTWRAPPERATTRIBUTES:[{key:"xmlns",value:"http://docbook.org/ns/docbook"},{key:"xmlns:mw",value:"http://mathworks.com/namespace/tmwbook"},
{key:"xmlns:xi",value:"http://www.w3.org/2001/XInclude"},{key:"xmlns:xlink",value:"http://www.w3.org/1999/xlink"},{key:"version",value:"5.0-variant tmwbook5.0"}],_NAME_SPACE:null,_AUTO_GENERATED:"Auto-generated from published MATLAB code. DO NOT EDIT.",_SECTION_TYPE:"unnumberedsteps",_SECTION_STEP:"step",_SECTION_HEADER:"procedure",_COMMAND_CODE:"matlab:openExample",_TITLE:"title",_RELATED_FILES:"relatedfiles",_REMARK:"remark",_TYPE:"type",_TYPE_VALUE:"Live Script",_ANCHOR:"anchor",_COMMAND:"literal",
_CONTEXT:"context",_PARA:"para",_SHORTDESC:"shortdesc",_FILEREF:"fileref",_FILE:"file",_FILENAME:"filename",_TOKEN:"token",_PRODUCTNUMBER:"productnumber",_NUMBERLIST:"orderedlist",_BULLETLIST:"itemizedlist",_LISTITEM:"listitem",_BOLD:"bold",_UNDERLINE:"underline",_ITALIC:"italic",_MONOSPACE:"monospace",_ALL_STYLES_STRING:"bold italic monospace underline",_ULINK:"ulink",_OLINK:"olink",_LINK:"link",_ROLE_ATTR:"role",_URL:"xlink:href",_LINK_ROLE:"xlink:role",_LINK_ROLE_VAL:"http://docbook.org/xlink/role/olink",
_LOCALINFO:"localinfo",_EMPHASIS:"emphasis",_LITERAL:"literal",_SUPERSCRIPT:"superscript",_CODE_NODE:"programlisting",_CODE_NODE_LABEL:"colorscheme",_LANGUAGE:"language",_CODE_OUTPUT:"output",_CODE_TEXT:"matlabcode",_CODE_EXAMPLE_MATLAB:"matlab",_FIGURE:"informalfigure",_EQUATION:"informalequation",_INLINE_EQUATION:"inlineequation",_INLINE_MEDIA_OBJECT:"inlinemediaobject",_MEDIA_OBJECT:"mediaobject",_TEXT_OBJECT:"textobject",_PHRASE:"phrase",_IMAGE_OBJECT:"imageobject",_IMAGE_DATA:"imagedata",_CANVAS:"canvas",
_XML_EXT:".xml",_HTML_SPACE:"\x26nbsp;",_GLOBAL_REGEXP_FLAG:"g",_HTML_BREAK:"\x3cbr\x3e",_VERTICAL_ELLIPSIS_UC:"\u22ee",_DATA_TYPE_BASE64:"Base64",_DATA_TYPE_RAW:"Raw",_THUMBNAIL_MAX_HEIGHT:118,_THUMBNAIL_MAX_WIDTH:210,_COPYRIGHT_PATTERN:/^Copyright [\d-]+ [^\n]*The MathWorks, Inc\.$/,_DOC_ID_SCHEMA:"docid:",_EQUATION_SCALING:1,_EQUATION_MAX_CLIENT_WIDTH:1920,_SCALING_FACTOR_CLASS:"veScalingFactor",_SCALING_FACTOR_BASE:"10",_SCALING_EXPONENT_CLASS:"scaleExponent",_MULTIPLIER_CLASS:"multiply",_VARIABLE_VALUE_CLASS:"variableValue",
constructor:function(a,c,b,d,e,f){this._imageLocation=c;this._exampleComponent=b;a=k.nameFromPath(a);this._fileName=k.getFileNameNoExtension(a);this._tmwbook4=!1;""!==d&&(this._customThumbnail=d);""!==e&&(this._requireProducts=e);""!==f&&(this._supportingFiles=f)},useTMWBook4:function(){this._tmwbook4=!0;this._DOCTYPE='\x3c!DOCTYPE cellscriptwrapper PUBLIC "-//The MathWorks//DTD axdocbook variant//" "tmwbook.dtd"\x3e';this._CELLSCRIPTWRAPPERATTRIBUTES=[];this._ID_TAGNAME="id";this._URL="url";this._COMMAND=
"command"},_init:function(){this._fileDataExportObject=[];this._thumbnail=this._shortDescription=null;this._numSections=this._numEquations=this._numImages=0;this._hasContext=!1;this._blockOfCode=""},_write:function(){this._init();this._visitOpening();this._parseTree();return this._visitClosing()},_visitOpening:function(){this._pageTitleNode=this._createXMLNode(this._TITLE);this._pageTitleNode.textContent=this._DEFAULT_TITLE;this._relatedFilesNode=this._createXMLNode(this._RELATED_FILES);this._cellScriptWrapper=
this._createDocumentRootNode().documentElement;this._CELLSCRIPTWRAPPERATTRIBUTES.forEach(function(a){this._cellScriptWrapper.setAttribute(a.key,a.value)},this);var a=document.createComment(this._AUTO_GENERATED);this._cellScriptWrapper.appendChild(a);this._cellScriptWrapper.appendChild(this._pageTitleNode);this._appendXMLNode(this._ANCHOR,this._cellScriptWrapper).setAttribute(this._ID_TAGNAME,this._fileName);this._cellScriptWrapper.appendChild(this._relatedFilesNode);this._remarkNode=this._appendXMLNode(this._REMARK,
this._cellScriptWrapper);this._requireProducts&&(a=c.convert(this._requireProducts),this._appendXMLNodeWithContent(this._PRODUCTNUMBER,this._remarkNode,a));this._tmwbook4||(this._appendXMLNodeWithContent(this._FILENAME,this._remarkNode,this._fileName),this._appendXMLNodeWithContent(this._TOKEN,this._remarkNode,this._exampleComponent+"."+this._fileName));this._appendXMLNodeWithContent(this._COMMAND,this._remarkNode,this._COMMAND_CODE+"('"+this._exampleComponent+"/"+this._fileName+"')");this._appendXMLNodeWithContent(this._TYPE,
this._remarkNode,this._TYPE_VALUE);this._appendMetadata()},_visitClosing:function(){this._createThumbnail();this._createSupportingFile();this._shortDescription&&this._appendXMLNodeWithContent(this._PARA,this._remarkNode,this._shortDescription).setAttribute(this._ROLE_ATTR,this._SHORTDESC);var a=RegExp(this._XMLNS_TAG,this._GLOBAL_REGEXP_FLAG),a=this._XML_VERSION+this._DOCTYPE+this._serializeToFormattedString(this._cellScriptWrapper).replace(a,"");this._addToFileDataExport(this._fileName+this._XML_EXT,
a);return this._fileDataExportObject},_startNodeElement:function(a){var c=!1;if(f.contains(a,"ToC"))return!0;f.contains(a,"heading-1")?(this._pageTitleNode.textContent===this._DEFAULT_TITLE?(this._pageTitleNode.textContent="",this._doParseNestedNodes(this._TITLE,a,this._pageTitleNode)):this._appendNewSection(a),c=!0):f.contains(a,"paragraphNode")?(this._COPYRIGHT_PATTERN.test(a.innerText)||(a=this._parseNestedNodes(this._PARA,this._currentSection,a),this._hasContext||a.setAttribute(this._ROLE_ATTR,
this._SHORTDESC),this._hasContext=!0),c=!0):f.contains(a,"heading-2")?(this._appendNewSection(a),c=!0):f.contains(a,"RTClistNode")?(this._parseList(a),c=!0):f.contains(a,"inlineWrapper")?(this._processInlineCodeWrapper(a),c=!0):f.contains(a,"CodeExampleBlock")&&(this._processCodeExample(a),c=!0);return c},_endNodeElement:function(a){},_processCodeExample:function(a){var c;c=f.contains(a,"codeexample_matlab")?this._appendXMLNodeWithAttr(this._CODE_NODE,this._currentSection,this._LANGUAGE,this._CODE_EXAMPLE_MATLAB):
this._appendXMLNode(this._CODE_NODE,this._currentSection);for(var b=0;b<a.childNodes.length;b++)c.appendChild(document.createTextNode(a.childNodes[b].textContent+"\n"))},_processInlineCodeWrapper:function(a){for(var c=0;c<a.childNodes.length;c++){var b=a.childNodes[c];if(f.contains(b,"lineNode")){for(var d="",e,h=0;h<b.childNodes.length;h++)e=b.childNodes[h],f.contains(e,"liveControlOuterNode")&&(e=e.getElementsByClassName("liveControlTextView")[0]),d+=e.textContent;this._blockOfCode=this._blockOfCode+
"\n"+d;b=a.nextSibling&&f.contains(a.nextSibling,"inlineWrapper");d=c+1<a.childNodes.length&&f.contains(a.childNodes[c+1],"outputParagraph");if(!b||d)this._appendXMLNodeWithAttr(this._CODE_NODE,this._currentSection,this._CODE_NODE_LABEL,this._CODE_TEXT).textContent=this._blockOfCode.slice(1,this._blockOfCode.length),this._blockOfCode=""}else f.contains(b,"outputParagraph")&&this._processCodeOutput(b)}},_processCodeOutput:function(c){var b,e;b="";for(var h=0;h<c.childNodes.length;h++){b=c.childNodes[h];
e=this._appendXMLNodeWithAttr(this._CODE_NODE,this._currentSection,this._CODE_NODE_LABEL,this._CODE_OUTPUT);var g=null;this._embeddedOutputsView&&this._embeddedOutputsView.getOutputFromOutputDiv&&(g=this._embeddedOutputsView.getOutputFromOutputDiv(b));if(g&&g.getDocbookContent)this._createTableVariableNode(e,b,g.getDocbookContent(g));else if(f.contains(b,"embeddedOutputsVariableElement"))this._createVariableNode(e,b);else if(f.contains(b,"embeddedOutputsMatrixElement")||f.contains(b,"embeddedOutputsVariableMatrixElement"))this._createMatrixNode(e,
b);else if(f.contains(b,"embeddedOutputsSymbolicElement")){g=b.childNodes[0];b="";var k=g.childNodes[0];f.contains(k,"embeddedOutputsVariableElement")&&(b+=k.textContent);g=d(".MathEquation",g);0<g.length&&(k=g[0],f.contains(k,"displaySymbolicElement")&&(b+="\n"),g=a.exportDomnodeToImageURL(k,this._EQUATION_SCALING,this._EQUATION_MAX_CLIENT_WIDTH),this._createAndAppendImage(g.dataURL,this._currentSection,this._FIGURE,this._MEDIA_OBJECT,!1));""===b?this._currentSection.removeChild(e):e.textContent=
b}else f.contains(b,"embeddedOutputsFigure")?(this._currentSection.removeChild(e),e=d(".figureContainingNode",b)[0],b=e.parentNode?d("img",e.parentNode)[0]:d("img",e)[0],b=b.getAttribute("src"),e=parseInt(e.style.width,10),this._createAndAppendImage(b,this._currentSection,this._FIGURE,this._MEDIA_OBJECT,!0,e)):f.contains(b,"embeddedOutputsVariableStringElement")?this._createVariableStringNode(e,b):f.contains(b,"embeddedOutputsTextElement")?(b=this._processHtmlFormatting(b.childNodes[0].textContent),
e.textContent=b+"\n"):f.contains(b,"embeddedOutputsWarningElement")?(b=this._processHtmlFormatting(b.childNodes[0].childNodes[0].innerHTML),e.textContent=b+"\n"):f.contains(b,"embeddedOutputsFigure")?(this._currentSection.removeChild(e),e=d(".figureContainingNode",b)[0],b=e.parentNode?d("img",e.parentNode)[0]:d("img",e)[0],b=b.getAttribute("src"),e=parseInt(e.style.width,10),this._createAndAppendImage(b,this._currentSection,this._FIGURE,this._MEDIA_OBJECT,!0,e)):f.contains(b,"embeddedOutputsVariableStringElement")?
this._createVariableStringNode(e,b):f.contains(b,"embeddedOutputsTextElement")?(b=this._processHtmlFormatting(b.childNodes[0].textContent),e.textContent=b+"\n"):f.contains(b,"embeddedOutputsWarningElement")&&(b=this._processHtmlFormatting(b.childNodes[0].childNodes[0].innerHTML),e.textContent=b+"\n")}},_createVariableNode:function(a,c){c.childNodes[0].childNodes[0].childNodes[0]?(a=this._createVariableNameAndHeader(a,c),a.appendChild(document.createTextNode(c.childNodes[0].childNodes[1].textContent+
"\n"))):a.appendChild(document.createTextNode(c.childNodes[0].textContent+"\n"));return a},_createTableVariableNode:function(a,c,b){a=this._createTableVariableNameAndHeader(a,c,b);a.appendChild(b.docBookXML);return a},_createMatrixNode:function(a,c){a=this._createVariableNameAndHeader(a,c);var b=c.getElementsByClassName(this._SCALING_FACTOR_CLASS),e="";0<b.length?(a.appendChild(document.createTextNode("\n"+this._SCALING_FACTOR_BASE)),e=b[0].getElementsByClassName(this._SCALING_EXPONENT_CLASS)[0].textContent,
this._appendXMLNode(this._SUPERSCRIPT,a).innerText=e,b=b[0].getElementsByClassName(this._MULTIPLIER_CLASS)[0].textContent,a.appendChild(document.createTextNode(b)),e=c.getElementsByClassName(this._VARIABLE_VALUE_CLASS)[0].textContent):e=c.childNodes[0].childNodes[1].textContent;b=d(".verticalEllipsis",c);0<b.length&&!f.contains(b[0],"hide")&&(e+="      "+this._VERTICAL_ELLIPSIS_UC+"\n");a.appendChild(document.createTextNode("\n\n"+e+"\n"));return a},_createVariableNameAndHeader:function(a,c){a.appendChild(document.createTextNode(c.childNodes[0].childNodes[0].childNodes[0].textContent));
c.childNodes[0].childNodes[0].childNodes[1]&&(this._appendXMLNode(this._EMPHASIS,a).innerText=c.childNodes[0].childNodes[0].childNodes[1].textContent);return a},_createTableVariableNameAndHeader:function(a,c,b){a.appendChild(document.createTextNode(b.varName+"\x3d"));this._appendXMLNode(this._EMPHASIS,a).innerText=b.varSize+" "+b.varType;return a},_createVariableStringNode:function(a,c){if(c.childNodes[0].childNodes[0].childNodes[0])a.appendChild(document.createTextNode(c.childNodes[0].childNodes[0].childNodes[0].childNodes[0].textContent)),
c.childNodes[0].childNodes[0].childNodes[0].childNodes[1]&&(this._appendXMLNode(this._EMPHASIS,a).innerText=c.childNodes[0].childNodes[0].childNodes[0].childNodes[1].textContent),c.childNodes[0].childNodes[0].childNodes[1]?a.appendChild(document.createTextNode("\n"+c.childNodes[0].childNodes[0].childNodes[1].textContent+"\n")):c.childNodes[0].childNodes[1]&&a.appendChild(document.createTextNode("\n"+c.childNodes[0].childNodes[1].textContent+"\n"));else{var b=this._processHtmlFormatting(c.childNodes[0].childNodes[0].innerText)+
"\n";a.textContent=b+"\n"}return a},_processHtmlFormatting:function(a){var c=RegExp(this._HTML_BREAK,this._GLOBAL_REGEXP_FLAG);a=a.replace(RegExp(this._HTML_SPACE,this._GLOBAL_REGEXP_FLAG)," ");return a=a.replace(c,"\n")},_parseList:function(a){for(var c="",c="OL"===a.tagName?this._NUMBERLIST:this._BULLETLIST,c=this._appendXMLNode(c,this._currentSection),b=0;b<a.childNodes.length;b++){var d=this._appendXMLNode(this._LISTITEM,c);this._parseNestedNodes(this._PARA,d,a.childNodes[b])}},_parseNestedNodes:function(a,
c,b){var d=this._createXMLNode(!this._tmwbook4&&(a===this._OLINK||a===this._ULINK)?this._LINK:a);this._doParseNestedNodes(a,b,d);!this._hasContext&&0===this._numSections?(this._contextNode=d,c.appendChild(d),this._contextNode.tagName===this._PARA&&(this._shortDescription=this._contextNode.innerText)):""===d.innerHTML&&a!==this._OLINK&&a!==this._ULINK||c.appendChild(d);return d},_doParseNestedNodes:function(c,b,d){if(c!==this._OLINK){var e=b.childNodes.length;if(0<e)for(var h,g=0;g<e;g++)if(h=b.childNodes[g],
f.contains(h,"equationNode"))h=a.exportDomnodeToImageURL(h,this._EQUATION_SCALING,this._EQUATION_MAX_CLIENT_WIDTH),this._createAndAppendImage(h.dataURL,d,1<e?this._INLINE_EQUATION:this._EQUATION,1<e?this._INLINE_MEDIA_OBJECT:this._MEDIA_OBJECT,!1);else if(f.contains(h,"imageNode"))this._createAndAppendImage(h.src,d,this._FIGURE,this._MEDIA_OBJECT,!0);else if(h.href||0<h.style.length)this._processNodeFormatting(h,d);else if(f.contains(h,"textBox")){h=h.childNodes;for(var k=0;k<h.length;k+=1){var t=
h[k];t.href||0<t.style.length?this._processNodeFormatting(t,d):(t=t.firstChild)&&d.appendChild(t.cloneNode())}}else 0<h.childNodes.length&&(h=h.childNodes[0].cloneNode(),d.appendChild(h));else d.innerHTML=b.childNodes[0].innerHTML}c===this._ULINK&&d.setAttribute(this._URL,b.href);c===this._OLINK&&(c=b.href.replace(this._DOC_ID_SCHEMA,""),this._tmwbook4?(b=document.createAttribute(this._LOCALINFO),b.value=c,d.setAttributeNode(b)):(c=c.replace(/^([^#.]*)\./,"$1#"),d.setAttribute(this._URL,c),d.setAttribute(this._LINK_ROLE,
this._LINK_ROLE_VAL)));return d},_processNodeFormatting:function(a,c){var b=c,d=this._getStylesList(a);if(1<=d.length){for(var e=0;e<d.length;e++)b=this._processIndividualFormatting(d[e],b);b.textContent=a.textContent}else"hyperlinkNode"===a.className&&(a.href.startsWith(this._DOC_ID_SCHEMA)?this._parseNestedNodes(this._OLINK,c,a):this._parseNestedNodes(this._ULINK,c,a))},_processIndividualFormatting:function(a,c){var b;a===this._MONOSPACE?b=this._appendXMLNode(this._LITERAL,c):a===this._BOLD?(b=
this._appendXMLNode(this._EMPHASIS,c),b.setAttribute(this._ROLE_ATTR,this._BOLD)):a===this._ITALIC?b=this._appendXMLNode(this._EMPHASIS,c):a===this._UNDERLINE&&(b=this._appendXMLNode(this._EMPHASIS,c),b.setAttribute(this._ROLE_ATTR,this._UNDERLINE));return b},_getStylesList:function(a){var c=[];if(0===a.style.length)return c;a=a.style.cssText;a=a.slice(0,a.lastIndexOf(";"));a=a.split(";");for(var b,d=0;d<a.length;d++)b=a[d].split(":")[1].trim(),b=0<=b.indexOf(this._MONOSPACE)?this._MONOSPACE:b,-1===
this._ALL_STYLES_STRING.indexOf(b)?(a.splice(d,1),d--):c[d]=b;return c},_createXMLNode:function(a){return document.createElement(a)},_addToFileDataExport:function(a,c,b){this._fileDataExportObject.push({fileName:a,dataType:b||this._DATA_TYPE_RAW,data:c})},_createThumbnail:function(){this._customThumbnail&&(this._thumbnail=this._customThumbnail);this._thumbnail&&this._appendXMLNodeWithAttr(this._FILE,this._relatedFilesNode,this._FILEREF,this._imageLocation+this._thumbnail)},_createSupportingFile:function(){if(this._supportingFiles)for(var a=
this._supportingFiles.split(" "),c=0;c<a.length;c++)this._appendXMLNodeWithAttr(this._FILE,this._relatedFilesNode,this._FILEREF,a[c]).setAttribute("role","supportingfile")},_resizeDataUri:function(a,c,b){var d=document.createElement(this._CANVAS),e=d.getContext("2d");d.width=c;d.height=b;e.drawImage(a,0,0,c,b);return d.toDataURL()},_createAndAppendImage:function(a,c,d,e,f,h){var g=b.splitImageDataURI(a);if(g){var k,u;f?(k=this._numImages+=1,u="_"):(k=this._numEquations+=1,u="_eq");g=this._fileName+
u+(10>k?"0"+k:k)+"."+g.format;k=this._imageLocation+g;d=this._createXMLNode(d);e=this._appendXMLNode(e,d);e=this._appendXMLNode(this._IMAGE_OBJECT,e);e=this._appendXMLNode(this._IMAGE_DATA,e);this._addToFileDataExport(g,a,this._DATA_TYPE_BASE64);f&&(this._thumbnail=g);e.setAttribute(this._FILEREF,k);h&&e.setAttribute("width",h);c.appendChild(d)}},_appendMetadata:function(){this._contextNode=this._appendXMLNode(this._CONTEXT,this._cellScriptWrapper);this._sectionAnchor=this._appendXMLNodeWithAttr(this._SECTION_HEADER,
this._cellScriptWrapper,this._ROLE_ATTR,this._SECTION_TYPE);this._currentSection=this._contextNode},_appendNewSection:function(a){this._currentSection=this._appendXMLNode(this._SECTION_STEP,this._sectionAnchor);a=this._parseNestedNodes(this._TITLE,this._currentSection,a);this._appendXMLNode(this._ANCHOR,a).setAttribute(this._ID_TAGNAME,this._fileName+"-"+this._numSections);this._numSections+=1},_appendXMLNode:function(a,c){var b=this._createXMLNode(a);c.appendChild(b);return b},_appendXMLNodeWithAttr:function(a,
c,b,d){a=this._appendXMLNode(a,c);a.setAttribute(b,d);return a},_appendXMLNodeWithContent:function(a,c,b){a=this._appendXMLNode(a,c);a.textContent=b;return a},_createDocumentRootNode:function(){return document.implementation.createDocument(this._NAME_SPACE,this._CELLSCRIPTWRAPPER,null)},_serializeToFormattedString:function(a){return(new window.XMLSerializer).serializeToString(a)}})})},"MW/rtc/plugins/view/exporters/ExampleProductToBasecodeConverter":function(){define([],function(){var g={"5g":"5G",
aero:"AT",aeroblks:"AE",autoblks:"XX",antenna:"AA",audio:"AU",bioinfo:"BI",coder:"ME",comm:"CM",compiler:"CO",compilersdk:"MJ",control:"CT",curvefit:"CF",daq:"DA",database:"DB",datafeed:"DF",distcomp:"DM",distcomp_client:"DM",distcomp_server:"DW",do_qualkit:"DO",driving:"DR",dsp:"DS",ecoder:"EC",econ:"ET",edalink:"ES",elec:"PS",exlink:"EL",finance:"FI",fininst:"IT",fixedpoint:"PO",fusion:"TF",fuzzy:"FL",globaloptim:"GD",hdlcoder:"HD",hdlfilter:"FH",hdlverifier:"ES",ident:"ID",iec_certkit:"IE",images:"IP",
imaq:"IA",instrument:"IC",lte:"LS",map:"MG",matlab:"ML",matlabcoder:"ME",mbc:"MB",mpc:"MP",mts:"PR",nnet:"NN",opc:"OT",optim:"OP",pde:"PD",phased:"AR",plccoder:"PL",polyspace_bf:"BF",polyspace_cp:"PB",polyspace_code_prover:"PB",rf:"RF",risk:"RK",robotics:"RO",robust:"RC",rptgen:"MR",rptgenext:"SR",sdl:"LD",sh:"SH",signal:"SG",simbio:"SB",simevents:"SE",simrf:"RB",simscape:"SS",simscapeelectronics:"SN",simscapefluids:"SH",simscapemultibody:"MS",simscapepowersystems:"PS",simulink:"SL",simulinkcoder:"RT",
simulinktest:"SZ",sl3d:"VR",slci:"CI",slcontrol:"SD",sldo:"SO",sldrt:"WT",sldv:"DV",slrt:"XP",slvnv:"VV",sm:"MS",sps:"PS",stateflow:"SF",stats:"ST",symbolic:"SM",textanalytics:"TA",trading:"TR",vision:"VP",visionhdl:"VT",vnt:"VN",wavelet:"WA",wlan:"WL",android:"ANDROID",tic2000:"TIC2000",tic6000:"TIC6000",texasinstrumentsc2000:"TIC2000",texasinstrumentsc2000base:"TIC2000",alterafpgaboards:"HDLVALTERA",alterafpgaturnkeyboards:"HDLCALTERA",alterasocembeddedcoder:"EC_ALTERA_SOC",alterasochdlcoder:"HDL_ALTERA_SOC",
analogdevicesadalm1000:"DAT_ANALOG_DEV_ADALM1000",appleios:"SL_IOS",arduino:"ARDUINO",arduinoio:"ML_ARDUINO",armcortexa:"ECCORTEXA",armcortexadst:"DST_ARM_CORTEX_A",armcortexbasedvexmicrocontroller:"EC_VEX_MICRO",armcortexm:"ECCORTEXM",armcortexmdst:"DSPCORTEXM",armcortexr:"ECCORTEXR",autosarstandard:"EC_AUTOSAR",beaglebone:"EC_BEAGLEBONE",beagleboneio:"ML_BEAGLEBONE_BLACK_IO",freedomboard:"EC_FREEDOM_BOARD",freescalefrdmk64fboard:"EC_FRDM_K64F",gige:"GIGEVISION",iossensor:"ML_APPLE_IOS_SENSORS",
ipcamera:"ML_IP_CAMERAS",kinectforwindowsruntime:"KINECT",legomindstormsev3:"LEGOEV3",legomindstormsev3io:"ML_LEGO_EV3",legomindstormsnxt:"LEGONXT",mobilesensor:"ML_ANDROID_SENSORS",ni845xi2cdriver:"NI845XI2C",nidcpower:"NIDCPOWER",nidmm:"NIDMM",nivisaandicp:"ICT_NI_VISA_ICP_INTERFACES",nucleo:"NUCLEO",nvidia:"NVIDIA",oceanopticsspectrometers:"OCEANOPT",px4:"PX4AUTOPILOTS",raspberrypi:"RASPPI",raspberrypiio:"RASPPIIO",rtlsdrradio:"RTLSDR",stm32f4discovery:"STMICRODIS",texasinstrumentsc2000:"TIC2000",
texasinstrumentsc2000concerto:"EC_TIC2000_CONCERTO",turtlebotrobot:"RO_TURTLEBOT",usbwebcams:"USBWEBCAM",usrpembeddedseriesradio:"USRPEMBED",usrpradio:"USRP",vexv5:"VEXV5",windrivervxworks:"VXWORKS",xilinxfpgabasedradio:"XILINXFPGA",xilinxfpgaboards:"HDLCVXILINX",xilinxfpgaturnkeyboards:"HDLCXILINX",xilinxzynq7000:"HCZYNQ7000",xilinxzynq7000ec:"ECZYNQ7000",xilinxzynqbasedradio:"XILINXZYNQ",xilinxzynqbasedvision:"VP_VISION_ZYNQ"};return{convert:function(f){return f.split(",").map(function(e){return g[e.trim()]}).join(" ")}}})},
"liveeditor/plugin/ForwardCompatibilityHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","liveeditor/plugin/ForwardCompatibilityHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"liveeditor.saveload rtc.document rtc.featureinterface liveeditor.view rtc.domnode rtc.focusservice".split(" ")}},createInstance:function(d,b,a,c,f,g){return new e(d,b,a,c,f,g)}})})},"liveeditor/plugin/ForwardCompatibilityHandler":function(){define("dojo/aspect dojo/dom-style dojo/query dojo/_base/declare dojo/_base/lang MW/rtc/plugins/view/banner/Banner dojo/i18n!liveeditor/l10n/nls/liveeditor".split(" "),
function(g,f,e,d,b,a,c){return d(null,{constructor:function(a,c,d,e,f,n){this._featureInterface=d;this._document=c;this._liveEditorView=e;this._rtcDomNode=f;this._focusService=n;g.after(a,"onLoadFutureVersion",b.hitch(this,"_showForwardCompatibilityBanner"))},_showForwardCompatibilityBanner:function(){this._banner=new a({bannerText:c.forwardCompatibleNotification,buttons:[{text:"Edit",callback:b.hitch(this,this._makeDocumentEditable,this._document)}],closable:!1,parent:this._liveEditorView,position:"first",
resizer:this._featureInterface.resize,sibling:this._rtcDomNode});this._document.setReadOnly(!0)},_makeDocumentEditable:function(a){a.setReadOnly(!1);this._banner.closeBanner();this._focusService.setFocus()}})})},"liveeditor/plugin/ContentModifiedListenerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./ContentModifiedListener"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["liveeditor.filemodificationnotifier","rtc.document","rtc.internaldocument",
"rtc.embeddedoutputs.clearoutputscache","rtc.embeddedoutputs.statehandler"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)}})})},"liveeditor/plugin/ContentModifiedListener":function(){define(["dojo/_base/lang","dojo/_base/declare","dojo/aspect","MW/rtc/abstract/AbstractPlugin"],function(g,f,e,d){return f(d,{constructor:function(b,a,c,d,f){this._fileModificationNotifier=b;this._document=a;this._internalDocument=c;this._clearOutputsCache=d;this._stateHandler=f;this._aspectHandles=[];this.own(e.after(this._internalDocument,
"onDocumentChanged",g.hitch(this,"_setFileDirty")));this.own(e.after(this._clearOutputsCache,"onOutputsCleared",g.hitch(this,"_setFileDirty")));this.own(e.before(this._stateHandler,"onStateChanged",g.hitch(this,"_handleStateChanged"),!0))},_handleStateChanged:function(b){b===this._stateHandler.CHANGE_TYPE_ENUM.EVAL_COMPLETE&&this._setFileDirty()},_setFileDirty:function(){this._document.isReadOnly()||this._fileModificationNotifier.setModified()}})})},"liveeditor/plugin/DisableFunctionsClassesHandlerProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","liveeditor/plugin/DisableFunctionsClassesHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.code.matlabfiletype","rtc.featureinterface","liveeditor.view","rtc.domnode","rtc.hyperlinkservice"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)},destroyInstance:function(d){d.destroy()}})})},"liveeditor/plugin/DisableFunctionsClassesHandler":function(){define("dojo/aspect dojo/dom-style dojo/dom-construct dojo/query dojo/_base/declare dojo/_base/lang dojo/_base/event MW/rtc/plugins/view/banner/Banner dojo/i18n!liveeditor/l10n/nls/liveeditor".split(" "),
function(g,f,e,d,b,a,c,h,k){return b(null,{_FUNCTIONS_IN_SCRIPTS_DOC_ID:"matlab_prog_localfunctions_livescripts",constructor:function(c,b,d,e,f){this._fileType=c;this._featureInterface=b;this._liveEditorView=d;this._rtcDomNode=e;this._hyperlinkService=f;this._aspectHandles=[];this._aspectHandles.push(g.after(this._fileType,"onSupportedFileTypeChange",a.hitch(this,"_handleSupportedFileTypeChange"),!0));this._aspectHandles.push(g.after(this._liveEditorView,"onResize",a.hitch(this,"_resize"),!0))},_handleSupportedFileTypeChange:function(a){a?
this._removeBanner():this._fileType.getFileType()===this._fileType.FILE_TYPE.FunctionFile?(this._createBanner(k.disableFunctionsBannerText),this._attachOnClickCallbackToHyperlink(this._FUNCTIONS_IN_SCRIPTS_DOC_ID,"#bannerHyperLink")):this._createBanner(k.disableClassesBannerText)},_attachOnClickCallbackToHyperlink:function(b,e){d(e)[0].onclick=a.hitch(this,function(a){this._onHyperlinkClick(b);c.stop(a)})},_onHyperlinkClick:function(a){this._hyperlinkService.openUrl("matlab:helpview(fullfile(docroot,'matlab','helptargets.map'), '"+
a+"')")},_createBanner:function(a){this._liveEditorView&&!this._banner&&(this._banner=new h({bannerText:a,iconType:"error",parent:this._liveEditorView,position:"first",resizer:this._featureInterface.resize,sibling:this._rtcDomNode}))},_resize:function(){this._banner&&this._banner.resize()},_removeBanner:function(){this._banner&&(this._banner.closeBanner(),this._banner=null)},destroy:function(){this._removeBanner();this._aspectHandles.forEach(function(a){a.remove()})}})})},"liveeditor/plugin/RightMarginContainerProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/margin/RightMarginContainer"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.view","rtc.domnode","rtc.bordercontainer","rtc.focusservice"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c,11)},destroyInstance:function(d){d.destroy()},priority:function(){return 3}})})},"liveeditor/plugin/SeverityStatusButtonProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"MW/rtc/plugins/margin/SeverityStatusButton"],function(g,f,e){return g(f,{_EXTRA_HEIGHT_OF_BUTTON_ICON:6,isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.margin.button","rtc.code.codeanalyzermodel","rtc.code.codeanalyzerpreferences","rtc.cursor","rtc.focusservice"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f,this._EXTRA_HEIGHT_OF_BUTTON_ICON)},priority:function(){return 3}})})},"liveeditor/plugin/SmoothScrollingPreferenceProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","liveeditor/plugin/SmoothScrollingPreference"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.preferences.service","rtc.view.smoothscrolling"]}},createInstance:function(d,b){return new e(d,b)}})})},"liveeditor/plugin/SmoothScrollingPreference":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","dojo/has"],function(g,f,e,d){return g(null,{_LIVE_EDITOR_PREFERENCE_KEY:"LiveEditorSmoothScrolling",
constructor:function(b,a){this._preferencesService=b;this._smoothScrollingPlugin=a;e.after(this._preferencesService,"onPreferencesChanged",f.hitch(this,"_onPreferencesChanged"))},_onPreferencesChanged:function(){this._smoothScrollingPlugin.setEnabled(d("mac")?!1:this._preferencesService.getValue(this._LIVE_EDITOR_PREFERENCE_KEY,!1))}})})},"liveeditor/plugin/figure/FigureToolstripManagerProvider":function(){define(["dojo/_base/declare","liveeditor/plugin/figure/FigureToolstripManager","MW/rtc/core/provider/PluginProvider"],
function(g,f,e){return g(e,{requires:function(){return{createInstance:["rtc.embeddedoutputs.figureoutputhandler","liveeditor.toolstripmanager"]}},createInstance:function(d,b){return new f(d,b)}})})},"liveeditor/plugin/figure/FigureToolstripManager":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect","graphics/SceneWidgets/GraphicsView"],function(g,f,e,d){return g([],{_figureIds:null,_toolstripManager:null,_TABNAME:"figuretab",_onOutputDestroyedAspect:null,_figureOutputHandler:null,
constructor:function(b,a){this._toolstripManager=a;this._aspectHandles=[];this._figureIds=[];this._aspectHandles.push(e.after(b,"onOutputFocused",f.hitch(this,"_outputFocused"),!0));this._aspectHandles.push(e.after(b,"onOutputsSelected",f.hitch(this,"_outputsSelected"),!0));this._figureOutputHandler=b},_outputFocused:function(b){if(0==this._figureIds.length&&null===this._onOutputDestroyedAspect){var a=this;this._onOutputDestroyedAspect=e.after(this._figureOutputHandler,"onOutputDestroyed",function(c){a._figureIds.some(function(a){return a===
c})&&(a._toolstripManager.setVisible(a._TABNAME,!1,{selectedFigureProperties:null,showing:!1}),a._onOutputDestroyedAspect.remove(),a._onOutputDestroyedAspect=null,a._figureIds=[])},!0)}b&&!this._figureIds.some(f.hitch(this,function(a){return a===b.figureId}))&&this._figureIds.push(b.figureId);this._toolstripManager.selectTab(this._TABNAME,{focusedFigureProperties:b,selected:null!=b,showing:null!=b&&b.enableToolstrip})},_outputsSelected:function(b){b=b.filter(function(a){return null!==a});var a=b.map(function(a){return a.figureId});
this._figureIds.join()!==a.join()&&(this._figureIds=a,a=0<a.length&&!b.some(function(a){return!1==a.enableToolstrip}),this._toolstripManager.setVisible(this._TABNAME,a,{selectedFigureProperties:b,showing:a}),this._onOutputDestroyedAspect&&(this._onOutputDestroyedAspect.remove(),this._onOutputDestroyedAspect=null))},destroy:function(){this._aspectHandles.forEach(function(b){b.remove()});this._aspectHandles=[]}})})},"graphics/SceneWidgets/GraphicsView":function(){function g(f){return"number"===typeof f&&
isFinite(f)?f:f.toString()}define("dojo/_base/declare dojo/dom-style dojo/dom-construct dojo/Deferred dojo/promise/all graphics/system/GLUtils graphics/services/ConnectionStatus graphics/services/MessageServiceProxy graphics/services/EnvironmentService graphics/MWSG/CanvasACTResponder graphics/SceneWidgets/SceneView graphics/SceneWidgets/ImageView graphics/services/PixelScaleMonitoring graphics/GraphicsInteractions/ScenePickingController graphics/GraphicsInteractions/ImageMouseController graphics/GraphicsInteractions/NOPController graphics/axes/AxesExternalInterface graphics/mixins/EventEmitter graphics/services/BinaryDataReceiver graphics/services/BinaryDataSink graphics/MWSG/Utilities graphics/graphicscontrol/ControlManager graphics/graphicscontrol/InteractionsManager graphics/MWSG/object_picker dijit/_WidgetBase dijit/_TemplatedMixin dijit/Destroyable dojo/text!./templates/GraphicsView.html".split(" "),
function(f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x,y,B,D,E,F,I,L,C){return f([F,I,v],{baseClass:"GraphicsView",ViewMode:{none:0,scene:1,image:2},_viewMode:null,_View:null,_pixelScaleMonitoringToken:null,_channelID:"",_MessageServiceProxy:null,_subscriptions:{},_interactionEnabled:!0,templateString:C,constructor:function(a){if(a&&!a.Container)throw Error("Container argument must be passed to the GraphicsView Dijit constructor");this.target=a.Container;a.Container.containerNode&&(this.target=a.Container.containerNode);
this._MessageServiceProxy=new k(a.MessageService);this.own(this._MessageServiceProxy);this._subscriptions={};this._viewMode=this.ViewMode.none;this._CanvasACTResponder=new m({});this.own(this._CanvasACTResponder);this._boundDispatchCommandFcn=this._dispatchCommand.bind(this);this._interactionsManager=new D(this);void 0!==a.ControlManager?this._controlManager=a.ControlManager:(this._controlManager=new B(this),this._layoutableObject=this._controlManager.getLayoutableObject());this._controlManager.onEvent("request",
function(a){a={message:JSON.stringify(a)};this._sendHgCanvasEvent(this._channelID,a,"controlmanagermessage")}.bind(this));this._fUseBinaryChannel=!1;this._binaryDataSink=new x;var c=w;void 0!==a.BinaryDataReceiverConstructor&&(c=a.BinaryDataReceiverConstructor);this._binaryDataReceiver=new c;this._binaryDataReceiver.onEvent("datareceived",function(a){this._binaryDataSink.processData(a.uri,a.data)}.bind(this));this._ConnectionStatus=new h;this.own(this._ConnectionStatus);this._ConnectionStatus.addReconnectEventCallback(this._MessageServiceProxy,
function(){this._MessageServiceProxy.publish("/graphics/"+this._channelID+"/reconnectEvent",{})}.bind(this));this._defineEvent("graphicscomplete");this._defineEvent("viewchanged");this.own(l.getInstance().onEvent("environmentchanged",function(a){this._handleEnvironmentEvent(a)}.bind(this)))},destroy:function(){this.inherited(arguments);null!==this._pixelScaleMonitoringToken&&q.unsubscribe(this._pixelScaleMonitoringToken);this._binaryDataReceiver&&this._binaryDataReceiver.disconnect()},postCreate:function(){this.inherited(arguments);
e.set(this.domNode,"width","100%");e.set(this.domNode,"height","100%")},addToContainer:function(){this.target.contains(this.domNode)||(d.place(this.domNode,this.target,"first"),this._pixelScaleMonitoringToken=q.subscribe(this.redrawScene.bind(this)))},_setUseBinaryChannelAttr:function(a){this._fUseBinaryChannel=a},_getUseBinaryChannelAttr:function(){return this._fUseBinaryChannel},_setServerIdAttr:function(a){this.setSceneChannel(a);this._checkWebglSupport(a);this._handleEnvironmentEvent(l.getInstance().getViewData())},
_getServerIdAttr:function(){return this.getSceneChannel()},getObjectPicker:function(){if(this.hasOwnProperty("_objectPicker"))return this._objectPicker;this._objectPicker=new E(this);this._objectPicker.onEvent("request",function(a){a={message:JSON.stringify(a)};this._sendHgCanvasEvent(this._channelID,a,"objectpickermessage")}.bind(this));return this._objectPicker},draw:function(){this._View.draw()},redrawScene:function(){this._View&&this._View.redraw()},getRenderer:function(){if(this._View)return this._View.getRenderer()},
setRenderer:function(a){this._View&&this._View.setRenderer(a)},_getSubscriptionKey:function(a,c){return a+c},unsubscribeChannel:function(a,c,b){a=this._getSubscriptionKey(a,c);if(a in this._subscriptions)this._subscriptions[a].destroy();else throw Error("Unsubscribing to a non-existent key");this._binaryDataReceiver.disconnect()},subscribeChannel:function(c,d,e){var f=new b,h=(new b).resolve();this._fUseBinaryChannel&&(h=this._binaryDataReceiver.connect("hgbinary"+c));var g=this._getSubscriptionKey(c,
d);if(g in this._subscriptions&&!this._subscriptions[g].isDestroyed())throw Error("Subscribing to the same key twice");var k="/graphics/"+c+"/"+d;this._subscriptions[g]=this._MessageServiceProxy.subscribe(k,e);this.own(this._subscriptions[g]);a([h,this._subscriptions[g].Promise]).then(function(){var a=k+"/channelReady",c=this._binaryDataReceiver.getConnectionStatus();this._MessageServiceProxy.publish(a,{binaryChannelStatus:c});this._sendNewViewEvent();this.emit("attached",{});f.resolve()}.bind(this));
return f},setSceneChannel:function(a){var c=!1;this._channelID!==a&&(""!==this._channelID&&this.unsubscribeChannel(this._channelID,"command",this._boundDispatchCommandFcn),""!==a&&(c=!0));this._channelID=a;return!0===c?this.subscribeChannel(this._channelID,"command",this._boundDispatchCommandFcn):(new b).resolve()},_dispatchCommand:function(a){var c=a.data.cmd;if("viewMode"===c)this.setViewMode(a);else if("disconnect"===c)setTimeout(function(){this.setSceneChannel("")}.bind(this),0);else if("binarydata"===
c){a=a.data.data;for(var b in a)a.hasOwnProperty(b)&&this._binaryDataReceiver.handleBase64Data(b,a[b])}else if("serverBaselinePPI"===c)this.setServerBaselinePPI(a);else if("controlmanagermessage"===c)this._controlManager.handleMessage(a.data.message);else if("interactionsmanagermessage"===c)this._interactionsManager.handleMessage(a.data.message);else if("objectpickermessage"===c)this.getObjectPicker().handleMessage(a.data.message);else if(this._View){if(!a||!a.data)throw Error("Argument cmd must have a valid data object");
this._View.processCmd(a.data)}},setViewMode:function(a){this.addToContainer();a=a.data.viewMode;a!==this._viewMode&&(this._viewMode!==this.ViewMode.none&&this._teardownView(),this._viewMode=a,a===this.ViewMode.scene?this._setupSceneView():a===this.ViewMode.image&&this._setupImageView(),this._interactionEnabled&&this._interactionsManager.setup(),this.emitEvent("viewchanged",{}))},setServerBaselinePPI:function(a){y._ServerBaselinePPI=a.data.baselineppi},getSceneChannel:function(){return this._channelID},
_setupSceneView:function(){this._View=new p({Container:this.graphicsViewNode});this._View.placeAt(this.graphicsViewNode,"first");this._binaryDataSink&&this._View.setBinaryDataSink(this._binaryDataSink);this._View.onEvent("scenehit",function(a){this._handleSceneHitEvent(a)}.bind(this));this._View.onEvent("buttondown",function(a){this._handleButtonDownEvent(a)}.bind(this));this._View.onEvent("buttonup",function(a){this._handleButtonUpEvent(a)}.bind(this));this._View.onEvent("buttonmotion",function(a){this._handleButtonMotionEvent(a)}.bind(this));
this._setupControllerForSceneView();this._View.onEvent("cdata_notify",function(a){this._sendHgCanvasEvent(this._channelID,a.data,"CData")}.bind(this));this._View.onEvent("act",function(a){this._CanvasACTResponder.update(a.data)}.bind(this));this._View.onEvent("contextlost",function(a){this._sendHgCanvasEvent(this._channelID,{Status:!1},"WebglSupport")}.bind(this));this._View.onEvent("graphicscomplete",function(a){this.emitEvent("graphicscomplete")}.bind(this));this._View.onEvent("renderstatistics",
function(a){a.Type="RenderStatistics";this._sendSceneEvent(a.Statistics)}.bind(this));this._View.onEvent("textextent",function(a){a.Type="TextExtentsResult";this._MessageServiceProxy.publish("/graphics/"+this._channelID+"/scene/textextents",a)}.bind(this));this._View.onEvent("hitresult",function(a){a.Type="HitTestComplete";this._MessageServiceProxy.publish("/graphics/"+this._channelID+"/scene/event",a)}.bind(this));this._View.onEvent("exception",function(a){a.Type="Exception";this._sendSceneEvent(a)}.bind(this))},
_setupImageView:function(){this._View=new n(this._channelID);this._View.placeAt(this.graphicsViewNode,"first");this._binaryDataSink&&this._View.setBinaryDataSink(this._binaryDataSink);this._View.onEvent("mouseevent",function(a){this._handleMouseEventFromView(a)}.bind(this));this._setupControllerForImageView();this._View.onEvent("cdata_notify",function(a){this._sendHgCanvasEvent(this._channelID,a.data,"CData")}.bind(this));this._View.onEvent("act",function(a){this._CanvasACTResponder.update(a.data)}.bind(this));
this._View.onEvent("graphicscomplete",function(a){this.emitEvent("graphicscomplete")}.bind(this))},_teardownView:function(){this._View.destroyRecursive();this._View=null},_setupControllerForSceneView:function(){this._interactionEnabled?this._View.setController(new r):this._View.setController(new t)},_setupControllerForImageView:function(){this._interactionEnabled?this._View.setController(new s):this._View.setController(new t)},setInteractionEnabled:function(a){a!==this._interactionEnabled&&(this._interactionEnabled=
a,this._viewMode===this.ViewMode.scene?this._setupControllerForSceneView():this._viewMode===this.ViewMode.image&&this._setupControllerForImageView())},getAxesControl:function(a){return this._View?this._View.getAxesControl(a):null},getAxesExternalAPI:function(){return this._View?this._View.getAxesExternalInterface(0):new u(null)},getSceneView:function(){return this._View},getImageDataURL:function(){return this._View.getImageDataURL()},_checkWebglSupport:function(a){var b=c.isGLAvailable();this._sendHgCanvasEvent(a,
{Status:b},"WebglSupport")},_handleSceneHitEvent:function(a){a={Type:"SceneNodeHit",Owner:a.Owner,Button:a.MouseData.button,Modifier:a.MouseData.modifier,IsPopupTrigger:!1,IsDoubleClick:a.MouseData.doubleClick,DataX:g(a.Intersection.X),DataY:g(a.Intersection.Y),DataZ:g(a.Intersection.Z),X:a.MouseData.offsetX,Y:a.MouseData.offsetY,ScreenX:a.MouseData.pageX+1,ScreenY:document.body.clientHeight-a.MouseData.pageY};this._sendSceneEvent(a)},_handleButtonUpEvent:function(a){var c={Type:"ButtonUp",Button:a.MouseData.button,
Modifier:a.MouseData.modifier,IsPopupTrigger:!1,IsDoubleClick:!1,X:a.MouseData.offsetX,Y:a.MouseData.offsetY,ScreenX:a.MouseData.pageX+1,ScreenY:document.body.clientHeight-a.MouseData.pageY};null!==a.Owner&&null!==a.Intersection&&(c.Owner=a.Owner,c.DataX=g(a.Intersection.X),c.DataY=g(a.Intersection.Y),c.DataZ=g(a.Intersection.Z));this._sendSceneEvent(c)},_handleButtonDownEvent:function(a){this._sendSceneEvent({Type:"ButtonDown",Button:a.MouseData.button,Modifier:a.MouseData.modifier,IsPopupTrigger:!1,
IsDoubleClick:a.MouseData.doubleClick,X:a.MouseData.offsetX,Y:a.MouseData.offsetY,ScreenX:a.MouseData.pageX+1,ScreenY:document.body.clientHeight-a.MouseData.pageY})},_handleButtonMotionEvent:function(a){var c={Type:"ButtonMotion",Button:a.MouseData.button,Modifier:a.MouseData.modifier,IsDragged:!1,X:a.MouseData.offsetX,Y:a.MouseData.offsetY,ScreenX:a.MouseData.pageX+1,ScreenY:document.body.clientHeight-a.MouseData.pageY};null!==a.Owner&&null!==a.Intersection&&(c.Owner=a.Owner,c.DataX=g(a.Intersection.X),
c.DataY=g(a.Intersection.Y),c.DataZ=g(a.Intersection.Z));this._sendSceneEvent(c)},_handleEnvironmentEvent:function(a){this._sendHgCanvasEvent(this._channelID,a.toPlainObject(),"ViewEnvironment")},_sendSceneEvent:function(a){this._MessageServiceProxy.publish("/graphics/"+this._channelID+"/scene/event",a)},_sendHgCanvasEvent:function(a,c,b){c.Type=b;this._MessageServiceProxy.publish("/graphics/"+a+"/hgcanvas/event",c)},_sendNewViewEvent:function(){this._ConnectionStatus.newViewEvent(this._MessageServiceProxy,
"/graphics/"+this._channelID+"/newViewEvent")},_handleMouseEventFromView:function(a){this._MessageServiceProxy.publish("/graphics/"+this._channelID+"/SSR/events",a.MouseEvent)},createCloneDOMNode:function(){return this._View?this._View.createCloneDOMNode():null},getLayoutableChildren:function(){return this._layoutableObject.getLayoutableChildren()},setChildAddedCallback:function(a){return this._layoutableObject.setChildAddedCallback(a)},setChildRemovedCallback:function(a){return this._layoutableObject.setChildRemovedCallback(a)}})})},
"graphics/system/GLUtils":function(){define(["dojo/_base/declare","dojo/dom-construct","graphics/system/GLInfo"],function(g,f,e){function d(){return{antialias:!0,alpha:!1,preserveDrawingBuffer:!0}}var b=null,a=null;return{createContext:function(a){var b=null;try{b=a.getContext("webgl",d())||a.getContext("experimental-webgl",d())}catch(e){}return b},isGLAvailable:function(){if(null==b){var a=f.create("canvas");b=null!==this.createContext(a)}return b},getSystemGLInfo:function(){if(!a){var c=f.create("canvas");
(c=this.createContext(c))&&(a=new e(c));b=null!==a}return a?a:new e(null)},_setSystemGL:function(c){var d={Available:b,GLInfo:a};b=c.Available;a=c.GLInfo;return d}}})},"graphics/system/GLInfo":function(){define(["dojo/_base/declare","graphics/mixins/PlainObjectSerializable"],function(g,f){return g([f],{Vendor:"",Renderer:"",Version:"",ShadingLanguageVersion:"",MaxTextureSize:0,MaxViewportDims:null,AlphaBits:0,RedBits:0,GreenBits:0,BlueBits:0,SubpixelBits:0,DepthBits:0,DepthRange:null,MaxRenderBufferSize:0,
Extensions:null,constructor:function(e){if(e){this.Vendor=e.getParameter(e.VENDOR);this.Renderer=e.getParameter(e.RENDERER);this.Version=e.getParameter(e.VERSION);this.ShadingLanguageVersion=e.getParameter(e.SHADING_LANGUAGE_VERSION);this.MaxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE);this.MaxViewportDims=e.getParameter(e.MAX_VIEWPORT_DIMS);this.AlphaBits=e.getParameter(e.ALPHA_BITS);this.RedBits=e.getParameter(e.RED_BITS);this.GreenBits=e.getParameter(e.GREEN_BITS);this.BlueBits=e.getParameter(e.BLUE_BITS);
this.SubpixelBits=e.getParameter(e.SUBPIXEL_BITS);this.DepthBits=e.getParameter(e.DEPTH_BITS);this.DepthRange=e.getParameter(e.DEPTH_RANGE);this.MaxRenderBufferSize=e.getParameter(e.MAX_RENDERBUFFER_SIZE);this.Extensions=e.getSupportedExtensions();var d=e.getExtension("WEBGL_debug_renderer_info");d&&(this.Renderer=e.getParameter(d.UNMASKED_RENDERER_WEBGL),this.Vendor=e.getParameter(d.UNMASKED_VENDOR_WEBGL))}else this.MaxViewportDims=new Int32Array([0,0]),this.DepthRange=new Float32Array([0,0]),this.Extensions=
[]},hasExtension:function(e){return 0<=this.Extensions.indexOf(e)},toPlainObject:function(){return{Vendor:this.Vendor,Renderer:this.Renderer,Version:this.Version,ShadingLanguageVersion:this.ShadingLanguageVersion,MaxTextureSize:this.MaxTextureSize,MaxViewportDims:{width:this.MaxViewportDims[0],height:this.MaxViewportDims[1]},AlphaBits:this.AlphaBits,RedBits:this.RedBits,GreenBits:this.GreenBits,BlueBits:this.BlueBits,SubpixelBits:this.SubpixelBits,DepthBits:this.DepthBits,DepthRange:{min:this.DepthRange[0],
max:this.DepthRange[1]},MaxRenderBufferSize:this.MaxRenderBufferSize,Extensions:this.Extensions}}})})},"graphics/mixins/PlainObjectSerializable":function(){define(["dojo/_base/declare"],function(g){return g([],{isPlainObjectSerializable:function(){return!0},toPlainObject:function(){return{}},varToPlainObject:function(f){return f&&f.isPlainObjectSerializable&&f.isPlainObjectSerializable()?f.toPlainObject():f},arrayToPlainObject:function(f){for(var e=Array(f.length),d=0;d<f.length;d++)e[d]=this.varToPlainObject(f[d]);
return e}})})},"graphics/services/ConnectionStatus":function(){define(["dijit/Destroyable","dojo/_base/declare","dojo/aspect"],function(g,f,e){return f([g],{constructor:function(){},newViewEvent:function(d,b){d.publish(b,{})},addReconnectEventCallback:function(d,b){this.own(e.after(d,"onReconnected",function(){b()}))}})})},"graphics/services/MessageServiceProxy":function(){define(["dijit/Destroyable","dojo/_base/declare","dojo/aspect","graphics/services/MinChannelMessageService"],function(g,f,e,d){var b=
f([],{constructor:function(a,c,b,d){this._MessageService=a;this._channel=c;this._callback=b;this.Promise=d},destroy:function(){this.isDestroyed()||(this._MessageService.unsubscribe(this._channel,this._callback),this._destroyed=!0)},isDestroyed:function(){return this._destroyed},Promise:null,_destroyed:!1});return f([g],{constructor:function(a){this._MessageService=void 0===a?d:a;this.own(e.after(this._MessageService,"onReconnected",function(){this.onReconnected()}.bind(this),!0))},publish:function(a,
c){this._MessageService.publish(a,c)},subscribe:function(a,c){var d=this._MessageService.subscribe(a,c);return new b(this._MessageService,a,c,d)},unsubscribe:function(a,c){throw Error("Unsubscribe unavailable. Call destroy on the object returned by subscribe instead");},onReconnected:function(){}})})},"graphics/services/MinChannelMessageService":function(){define(["dojo/_base/lang","dojo/Deferred","dojo/aspect","mw-messageservice/MessageService"],function(g,f,e,d){var b={publish:function(a,c){c.topic=
a;this._MessageService.publish(this._publishChannel,c);this._publishCallback({data:c})},subscribe:function(a,c){a in this._topicMap||(this._topicMap[a]=[]);this._topicMap[a].push(c);var b=new f;this._connectorSubscribePromise.then(function(){b.resolve()});return b.promise},unsubscribe:function(a,c){if(a in this._topicMap)this._topicMap[a]=this._topicMap[a].filter(function(a){return a!==c}),0===this._topicMap[a].length&&delete this._topicMap[a];else throw Error("Not subscribed to "+a);},onReconnected:function(){},
_initialize:function(a){this._MessageService=void 0===a?d:a;this._topicMap={};this._connectorSubscribePromise=this._MessageService.subscribe(this._subscribeChannel,this._publishCallback.bind(this));null!==this._reconnectAspect&&this._reconnectAspect.remove();this._reconnectAspect=e.after(this._MessageService,"onReconnected",g.hitch(this,"onReconnected"),!0)},_isInitialized:function(){return null!==this._MessageService},_publishCallback:function(a){var c=a.data.topic;if(c in this._topicMap)for(var b=
0;b<this._topicMap[c].length;++b)this._topicMap[c][b](a)},_MessageService:null,_subscribeChannel:"/graphics/JavaScript",_publishChannel:"/graphics/MATLAB",_connectorSubscribePromise:null,_reconnectAspect:null,_topicMap:{}};b._isInitialized()||b._initialize();return b})},"graphics/services/EnvironmentService":function(){define("dojo/_base/declare dojo/aspect dijit/Destroyable graphics/MWSG/RendererInfo graphics/system/FontMap graphics/system/EnvironmentData graphics/system/GLUtils graphics/services/PixelScaleMonitoring graphics/mixins/EventEmitter graphics/MWSG/transparency/DepthPeelerResourceManager".split(" "),
function(g,f,e,d,b,a,c,h,k){var l=g([k,e],{_EnvChangedListenerCount:0,_PixelScaleListener:null,constructor:function(){this._defineEvent("environmentchanged");f.around(this,"onEvent",function(a){return function(c,b){var d=a.call(this,c,b);"environmentchanged"===c&&(this._addChangeListener(),f.after(d,"remove",function(a){this._removeChangeListener();return a}.bind(this)));return d}.bind(this)}.bind(this))},_getDeviceDPI:function(){return 96*window.devicePixelRatio},_getFontNameMap:function(){return b.getFontMap()},
_getRenderers:function(){return{opengl:d.getGLRendererInfo()}},_getGLInfo:function(){return c.getSystemGLInfo()},getViewData:function(){return new a(this._getDeviceDPI(),this._getFontNameMap(),this._getRenderers(),this._getGLInfo())},sendChangeEvent:function(){this.emitEvent("environmentchanged",this.getViewData())},_addChangeListener:function(){0===this._EnvChangedListenerCount&&(this._PixelScaleListener=h.subscribe(function(){this.sendChangeEvent()}.bind(this)),this.own(this._PixelScaleListener));
this._EnvChangedListenerCount++},_removeChangeListener:function(){this._EnvChangedListenerCount--;0===this._EnvChangedListenerCount&&(h.unsubscribe(this._PixelScaleListener),this._PixelScaleListener=null)}}),m=null;l.getInstance=function(){m||(m=new l);return m};return l})},"graphics/MWSG/RendererInfo":function(){define(["dojo/_base/declare","graphics/mixins/PlainObjectSerializable","graphics/system/GLUtils","graphics/MWSG/transparency/DepthPeelerResourceManager"],function(g,f,e,d){var b=g([f],{Name:"",
Available:!1,TransparencyOrderMethods:null,constructor:function(a,c,b){this.Name=a;this.Available=c;this.TransparencyOrderMethods=b},toPlainObject:function(){return{Name:this.Name,Available:this.Available,TransparencyOrderMethods:this.TransparencyOrderMethods}}});b.TransparencyOrderMethod={DEPTHPEEL:"depthpeel",OBJECTSORT:"objectsort"};b.getGLRendererInfo=function(){var a=[];d.canRunDepthPeeling()&&a.push(b.TransparencyOrderMethod.DEPTHPEEL);return new b("WebGL",e.isGLAvailable(),a)};return b})},
"graphics/MWSG/transparency/DepthPeelerResourceManager":function(){define(["dojo/_base/declare","graphics/system/GLUtils","graphics/MWSG/transparency/ComposeTexturesCommand"],function(g,f,e){var d=g([],{constructor:function(b,a){this._gl=b;b.getExtension("WEBGL_depth_texture");this._numTransparentLayers=a},setNumLayers:function(b){this._numTransparentLayers=b},updateResources:function(b,a){if(!d.canRunDepthPeeling())throw Error("updateResource should only be called if depth texture extension is available");
this._initFBO();if(!this._prevWidth||!this._prevHeight||b!==this._prevWidth||a!==this._prevHeight||this._prevNumLayers!==this._numTransparentLayers)this._destroyTextures(),this._initTextures(this._numTransparentLayers,b,a),this._prevWidth=b,this._prevHeight=a,this._prevNumLayers=this._numTransparentLayers;this._composeTexturesCmd||(this._composeTexturesCmd=new e)},bindFBO:function(b,a){var c=this._gl;c.bindFramebuffer(c.FRAMEBUFFER,this._frameBuffer);c.framebufferTexture2D(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,
c.TEXTURE_2D,b,0);c.framebufferTexture2D(c.FRAMEBUFFER,c.DEPTH_ATTACHMENT,c.TEXTURE_2D,a,0)},unbindFBO:function(){var b=this._gl;b.bindFramebuffer(b.FRAMEBUFFER,this._prevFBO)},bindTexture:function(b){var a=this._gl;a.activeTexture(this._textureNameToIndex[b.name]);a.bindTexture(a.TEXTURE_2D,b.texture)},getComposeTexturesCmd:function(){return this._composeTexturesCmd},getOpaqueColorTexture:function(){return{texture:this._colorTextures.OpaqueTexture,name:"OpaqueColorTexture"}},getTransparentColorTexture:function(b){if(b>=
this._numTransparentLayers)throw Error("currentLayer index can't be greater than total number of layers supported");return{texture:this._colorTextures.TransparentTextures[b],name:"TransparentColorTexture"+b}},getOpaqueDepthTexture:function(){return{texture:this._depthTextures.OpaqueDepthTexture,name:"OpaqueDepthTexture"}},getLastTransparentPassDepthTexture:function(){return{texture:this._depthTextures.LastTransparentPassDepthTexture,name:"LastTransparentPassDepthTexture"}},getTransparentDepthTexture:function(b){if(b>=
this._numTransparentLayers)throw Error("currentLayer index can't be greater than total number of layers supported");return 0===b%2?this.getCurrentTransparentPassDepthTexture():this.getLastTransparentPassDepthTexture()},getCurrentTransparentPassDepthTexture:function(){return{texture:this._depthTextures.CurrentTransparentPassDepthTexture,name:"CurrentTransparentPassDepthTexture"}},getColorTexturesAlongWithUnit:function(){var b={};b[this._textureNameToIndex[this.getOpaqueColorTexture().name]]=this._colorTextures.OpaqueTexture;
var a=0;this._colorTextures.TransparentTextures.slice().reverse().forEach(function(c){b[this._textureNameToIndex[this.getTransparentColorTexture(a++).name]]=c}.bind(this));return b},getSamplerIndex:function(b){return this._textureNameToIndex[b.name]-this._gl.TEXTURE0},_initTextures:function(b,a,c){var d=this._gl;this._depthTextures={OpaqueDepthTexture:null,LastTransparentPassDepthTexture:null,CurrentTransparentPassDepthTexture:null};this._textureNameToIndex={};this._textureIndexToTexture={};var d=
d.TEXTURE1,e;for(e in this._depthTextures){var f=d;this._depthTextures[e]=this._createTexture(d++,!0,a,c);this._textureNameToIndex[e]=f;this._textureIndexToTexture[f]=this._depthTextures[e]}this._colorTextures={};this._colorTextures.OpaqueTexture=this._createTexture(d++,!1,a,c);this._textureNameToIndex.OpaqueColorTexture=d-1;this._textureIndexToTexture[d-1]=this._colorTextures.OpaqueTexture;this._colorTextures.TransparentTextures=[];for(e=0;e<b;++e)this._colorTextures.TransparentTextures.push(this._createTexture(d++,
!1,a,c)),f=this._colorTextures.TransparentTextures[this._colorTextures.TransparentTextures.length-1],this._textureNameToIndex["TransparentColorTexture"+e]=d-1,this._textureIndexToTexture[d-1]=f;this.currentTextureIndex=d},_initFBO:function(){if(!this._frameBuffer){var b=this._gl;this._prevFBO=b.getParameter(b.FRAMEBUFFER_BINDING);this._frameBuffer=b.createFramebuffer()}},_destroyTextures:function(){if(this._depthTextures){var b=this._gl;b.deleteTexture(this._depthTextures.OpaqueDepthTexture);b.deleteTexture(this._depthTextures.LastTransparentPassDepthTexture);
b.deleteTexture(this._depthTextures.CurrentTransparentPassDepthTexture);b.deleteTexture(this._colorTextures.OpaqueTexture);for(var a=0;a<this._prevNumLayers;++a)b.deleteTexture(this._colorTextures.TransparentTextures[a])}this._tailColorTexture&&(b.deleteTexture(this._tailColorTexture),b.deleteTexture(this._tailDepthTexture))},tailBlendingColorTexture:function(b,a){this._tailColorTexture||(this._tailColorTexture=this._createTexture(this.currentTextureIndex++,!1,b,a));return this._tailColorTexture},
tailBlendingDepthTexture:function(b,a){this._tailDepthTexture||(this._tailDepthTexture=this._createTexture(this.currentTextureIndex++,!0,b,a));return this._tailDepthTexture},_createTexture:function(b,a,c,d){var e=this._gl,f=e.createTexture();e.activeTexture(b);e.bindTexture(e.TEXTURE_2D,f);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_2D,
e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);a?e.texImage2D(e.TEXTURE_2D,0,e.DEPTH_COMPONENT,c,d,0,e.DEPTH_COMPONENT,e.UNSIGNED_SHORT,null):e.texImage2D(e.TEXTURE_2D,0,e.RGBA,c,d,0,e.RGBA,e.UNSIGNED_BYTE,null);e.bindTexture(e.TEXTURE_2D,null);return f}});d.canRunDepthPeeling=function(){return f.getSystemGLInfo().hasExtension("WEBGL_depth_texture")};return d})},"graphics/MWSG/transparency/ComposeTexturesCommand":function(){define(["dojo/_base/declare","graphics/MWSG/ShaderConfigFcns/DrawPassShaderConfigFcns",
"graphics/MWSG/TypedArrayUtils","graphics/MWSG/matrix4x4","graphics/MWSG/Enum"],function(g,f,e,d,b){return g([],{constructor:function(){},_saveRendererMatrices:function(a){this._currentProjMat=a.getProjectionMatrix();this._currentViewMat=a.getViewTransform();this._currentModelMat=a.getModelTransform()},_setRendererMatricesToIdentity:function(a){this._identityMat||(this._identityMat=new d);a.setProjectionMatrix(this._identityMat);a.setViewTransform(this._identityMat);a.setModelTransform(this._identityMat)},
_restoreRendererMatrices:function(a){a.setProjectionMatrix(this._currentProjMat);a.setViewTransform(this._currentViewMat);a.setModelTransform(this._currentModelMat)},compose:function(a,c,d){this._saveRendererMatrices(a);this._setRendererMatricesToIdentity(a);var g=a.getWebGLContext();g.enable(g.BLEND);g.blendFunc(g.SRC_ALPHA,g.ONE_MINUS_SRC_ALPHA);g.depthMask(!1);g.disable(g.DEPTH_TEST);if(void 0===this._resultDrawCache){g={};g.vertexData=e.createFloat32Array([-1,-1,0,-1,1,0,1,-1,0,1,1,0]);g.stripData=
e.createFloat32Array([1,5]);g.colorData=e.createFloat32Array([0,0,0,1,1,0,1,1]);g.colorBinding=b.Binding.vertex;g.colorType=b.ColorType.texturemapped;g.clipping=!1;g.texture=null;this._drawPassShaderConfigFcns||(this._drawPassShaderConfigFcns=new f);var l=a.getTriangleShaderConfig(g,this._drawPassShaderConfigFcns);this._resultDrawCache=a.makeTriangleDrawCache(g,l)}this.i=0;this.tailBlendedEnabled=!0;Object.keys(c).forEach(function(b){this._resultDrawCache.textureUnit=b;this._resultDrawCache.texture=
c[b];1===this.i&&this.tailBlendedEnabled&&(this._restoreRendererMatrices(a),d.draw(a),this._setRendererMatricesToIdentity(a));a.drawTriangles(this._resultDrawCache);this.i++}.bind(this));this._restoreRendererMatrices(a)}})})},"graphics/MWSG/ShaderConfigFcns/DrawPassShaderConfigFcns":function(){define(["dojo/_base/declare","graphics/MWSG/Enum","graphics/MWSG/shader/WebGLShaderConfiguration"],function(g,f,e){return g([],{constructor:function(){},addConfigBeforeFragColorIsSet:function(d,b){d.addShaderOption(d.Opt.pick);
d.addShaderOption(d.Opt.renderScreenSpaceDepth)},shouldProceedAfterFragColorIsSet:function(){return!0},_addClippingConfig:function(d,b){d.useShaderClipping&&(b.addShaderOption(b.Opt.clipPos),d.needsFragCoordClipping&&!0!==d.isWideLines?b.addShaderOption(b.Opt.fragCoordForClip):b.addShaderOption(b.Opt.clip))},getLineShaderConfiguration:function(d){var b=new e;!0===d.isWideLines?b.addShaderOption(b.Opt.widelinesPos):b.addShaderOption(b.Opt.pos);this._addClippingConfig(d,b);d.alignVertexCenters&&b.addShaderOption(b.Opt.avc);
d.useStippleShader&&b.addShaderOption(b.Opt.stipple);this.addConfigBeforeFragColorIsSet(b,d);if(!1!==this.shouldProceedAfterFragColorIsSet())return d.colorType===f.ColorType.texturemapped?b.addShaderOption(b.Opt.texture2d):d.colorType===f.ColorType.colormapped?b.addShaderOption(b.Opt.texture1d):d.colorBinding===f.Binding.object?b.addShaderOption(b.Opt.constColor):b.addShaderOption(b.Opt.vertexcolors),!0===d.applyLighting&&b.addShaderOption(b.Opt.lighting_OneSided),b},getLineCapsOrJoinsShaderConfiguration:function(d,
b){var a=new e;b?a.addShaderOption(a.Opt.linecapsPos):a.addShaderOption(a.Opt.linejoinsPos);this._addClippingConfig(d,a);d.useStippleShader&&a.addShaderOption(a.Opt.stipple);this.addConfigBeforeFragColorIsSet(a,d);if(!1!==this.shouldProceedAfterFragColorIsSet())return d.colorType===f.ColorType.texturemapped?a.addShaderOption(a.Opt.texture2d):d.colorType===f.ColorType.colormapped?a.addShaderOption(a.Opt.texture1d):d.colorBinding===f.Binding.object?a.addShaderOption(a.Opt.constColor):a.addShaderOption(a.Opt.vertexcolors),
!0===d.applyLighting&&a.addShaderOption(a.Opt.lighting_OneSided),a},getTriangleShaderConfiguration:function(d){var b=new e;b.addShaderOption(b.Opt.pos);this._addClippingConfig(d,b);this.addConfigBeforeFragColorIsSet(b,d);if(!1!==this.shouldProceedAfterFragColorIsSet())return d.colorType===f.ColorType.texturemapped?b.addShaderOption(b.Opt.texture2d):d.colorType===f.ColorType.colormapped?b.addShaderOption(b.Opt.texture1d):d.colorBinding===f.Binding.object?b.addShaderOption(b.Opt.constColor):b.addShaderOption(b.Opt.vertexcolors),
!0===d.applyLighting&&(!0===d.twoSidedLighting?b.addShaderOption(b.Opt.lighting_TwoSided):b.addShaderOption(b.Opt.lighting_OneSided)),b},getScreenSpaceImageShader:function(d,b,a){var c=new e;c.addShaderOption(c.Opt.imagePos);d===f.ClipMode.planes?!0===b?(c.addShaderOption(c.Opt.clipPos),c.addShaderOption(c.Opt.clip)):c.addShaderOption(c.Opt.anchorpt_3DBoxClip):d===f.ClipMode.scissor&&a&&c.addShaderOption(c.Opt.anchorpt_ScissorClip);this.addConfigBeforeFragColorIsSet(c);if(!1!==this.shouldProceedAfterFragColorIsSet())return c.addShaderOption(c.Opt.texture2d),
c},getScreenSpaceConstantColorShader:function(d,b,a,c){var g=new e;a?g.addShaderOption(g.Opt.anchorptPosAVC):g.addShaderOption(g.Opt.anchorptPos);d===f.ClipMode.planes?c?g.addShaderOption(g.Opt.anchorpt_3DBoxClip):(g.addShaderOption(g.Opt.clipPosModelSpace),g.addShaderOption(g.Opt.clip)):d===f.ClipMode.scissor&&c&&g.addShaderOption(g.Opt.anchorpt_ScissorClip);this.addConfigBeforeFragColorIsSet(g);if(!1!==this.shouldProceedAfterFragColorIsSet())return g.addShaderOption(g.Opt.constColor),b&&g.addShaderOption(g.Opt.stipple),
g}})})},"graphics/MWSG/Enum":function(){define([],function(){return{PrimitiveType:{point:0,line:1,linestrip:2,triangle:3,trianglestrip:4},Binding:{none:0,object:1,primitive:2,vertex:3},ClipMode:{none:0,scissor:1,planes:2},ColorType:{colormapped:0,truecolor:1,truecoloralpha:2,texturemapped:3},TextureColorType:{truecolor:0,truecoloralpha:1},TextureSamplingFilterType:{nearest:0,linear:1,bilinear:2,trilinear:3},Layer:{back:1,middle:0,front:2},HorizontalAlignment:{left:0,center:1,right:2},VerticalAlignment:{baseline:0,
top:1,cap:2,middle:3,bottom:4},VerticalAlignment_GUI:{top:0,cap:1,middle:2,baseline:3,bottom:4},TextInterpreter:{none:0,tex:1,latex:2},MarkerStyle:{plus:0,circle:1,asterisk:2,point:3,x:4,square:5,diamond:6,triangle:7,pyramid:8,right:9,left:10,pentagram:11,hexagram:12,vbar:13,hbar:14,none:15},LineStyle:{solid:0,dashed:1,dotted:2,dashdotted:3,none:4},Platform:{Windows:0,Apple:1,Linux:2},GPUVendor:{Other:-1,Intel:0,NVidia:1,AMD:2,VMWare:3},ImageFormat:{Raw:0,PNG:1,JPG:2},LineJoin:{chamfer:0,miter:1,
round:2,none:3},LineCap:{none:0,square:1,round:2},Dependency:{none:0,viewport:1,view:2,screen_resolution:4},RenderTraversalMode:{pick:1,draw:2},PixelUnitType:{csspixel:1,devicepixel:2},LightStyle:{infinite:0,local:1,ambient:2}}})},"graphics/MWSG/shader/WebGLShaderConfiguration":function(){define("dojo/_base/declare graphics/MWSG/shader/UseFragCoordForClippingShaderSourceProvider graphics/MWSG/shader/ClippingPositionShaderSourceProvider graphics/MWSG/shader/ClippingPositionShaderSourceProvider_ModelSpace graphics/MWSG/shader/PositionShaderSourceProvider graphics/MWSG/shader/WideLinesPositionShaderSourceProvider graphics/MWSG/shader/ClippingShaderSourceProvider graphics/MWSG/shader/StippleShaderSourceProvider graphics/MWSG/shader/Texture1DShaderSourceProvider graphics/MWSG/shader/Texture2DShaderSourceProvider graphics/MWSG/shader/VertexColorShaderSourceProvider graphics/MWSG/shader/AnchorPointPositionShaderSourceProvider graphics/MWSG/shader/AnchorPointClippingShaderSourceProvider_3dBox graphics/MWSG/shader/AnchorPointClippingShaderSourceProvider_ScissorRect graphics/MWSG/shader/ConstantColorShaderSourceProvider graphics/MWSG/shader/ImagePositionShaderSourceProvider graphics/MWSG/shader/AlignVertexCentersSourceProvider graphics/MWSG/shader/LineJoinsPositionShaderSourceProvider graphics/MWSG/shader/LineCapsPositionShaderSourceProvider graphics/MWSG/shader/PickShaderSourceProvider graphics/MWSG/shader/DepthRenderShaderSourceProvider graphics/MWSG/shader/DiscardFragUsingDepthTextureShaderSourceProvider graphics/MWSG/shader/LightingGouraudShaderSourceProvider graphics/MWSG/Enum".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x,y,B,D){return g([],{constructor:function(){this._shaderOptions=[]},Opt:{clip:{id:"clip",Provider:new c},fragCoordForClip:{id:"fragCoordForClip",Provider:new f},clipPos:{id:"clipPos",Provider:new e},clipPosModelSpace:{id:"clipPosModelSpace",Provider:new d},pos:{id:"pos",Provider:new b},widelinesPos:{id:"widelinesPos",Provider:new a},stipple:{id:"stipple",Provider:new h},texture1d:{id:"texture1d",Provider:new k},texture2d:{id:"texture2d",Provider:new l},
vertexcolors:{id:"vertexcolors",Provider:new m},anchorptPos:{id:"anchorptPos",Provider:new p(!1)},anchorptPosAVC:{id:"anchorptPosAVC",Provider:new p(!0)},anchorpt_3DBoxClip:{id:"anchorpt_3DBoxClip",Provider:new n},anchorpt_ScissorClip:{id:"anchorpt_ScissorClip",Provider:new q},constColor:{id:"constColor",Provider:new r},imagePos:{id:"imagePos",Provider:new s},avc:{id:"avc",Provider:new t(!0)},linejoinsPos:{id:"linejoinsPos",Provider:new u},linecapsPos:{id:"linecapsPos",Provider:new v},pick:{id:"pick",
Provider:new w},renderScreenSpaceDepth:{id:"renderScreenSpaceDepth",Provider:new x},discardFragUsingOneDepthTexture:{id:"discardFragUsingOneDepthTexture",Provider:new y},discardFragUsingTwoDepthTexture:{id:"discardFragUsingTwoDepthTexture",Provider:new y(!0)},lighting_TwoSided:{id:"lighting_TwoSided",Provider:new B(!0)},lighting_OneSided:{id:"lighting_OneSided",Provider:new B(!1)}},addShaderOption:function(a){if(!this.Opt.hasOwnProperty(a.id))throw Error("Shader Option not found");this._shaderOptions.push(a)},
getUniqueIdentifier:function(){var a="shader_";this._shaderOptions.slice().sort(function(a,c){return a.id<c.id?-1:1}).forEach(function(c){a=a+"_"+c.id});return a},getSourceProviderList:function(){return this._shaderOptions.map(function(a){return a.Provider})}})})},"graphics/MWSG/shader/UseFragCoordForClippingShaderSourceProvider":function(){define(["dojo/_base/declare"],function(g){return g([],{constructor:function(){this._name="UseFragCoordForClippingShaderSourceProvider"},getName:function(){return this._name},
getVertexSourceUniformDeclarationBlock:function(){return"#ifndef UNIFORM_MODELVIEWMAT   \n#define UNIFORM_MODELVIEWMAT   \n    uniform mat4 u_ModelViewMat;   \n#endif                         \n"},getVertexSourceAttributeDeclarationBlock:function(){return""},getVertexSourceVaryingDeclarationBlock:function(){return"varying vec4 v_PosInEyeCoord;\n"},getVertexSourceFunctionDeclarationBlock:function(){return""},getVertexSourceCodeBlock:function(){return"        v_PosInEyeCoord \x3d (u_ModelViewMat*clipPosition);\n"},
getFragmentSourceUniformDeclarationBlock:function(){return"    uniform mat4 u_MVPInverseMatrix;                    \n    uniform vec4 u_xMinClipPlane;                       \n    uniform vec4 u_xMaxClipPlane;                       \n    uniform vec4 u_yMinClipPlane;                       \n    uniform vec4 u_yMaxClipPlane;                       \n    uniform vec4 u_zMinClipPlane;                       \n    uniform vec4 u_zMaxClipPlane;                       \n    uniform vec2 u_ViewportSize;                        \n    #ifndef UNIFORM_PROJMAT                             \n    #define UNIFORM_PROJMAT                             \n        uniform mat4 u_ProjectionMat;                   \n    #endif                                              \n"},
getFragmentSourceVaryingDeclarationBlock:function(){return"    varying vec4 v_PosInEyeCoord; \n"},getFragmentSourceFunctionDeclarationBlock:function(){return"    bool is_clipped(vec3 point, vec4 plane) {                             \n        const float eps \x3d 0.00000012; //  eps for single precision (rounded 00000011920928955078)              \n        float adjEps \x3d eps * max(abs(plane[3]), 1.0);                                                         \n        float dist \x3d dot(point, plane.xyz) - plane.w;                                                         \n        return dist \x3c (-adjEps);  // use plane equation to find if point is inside or outside plane \n    }  \n"},
getFragmentSourceCodeBlock:function(){return" // The basic idea is to use window coordinate (provided by gl_FragCoord) and unproject it to the point in world Coordinate \n // gl_FragCoord gives x,y in windows coordinate \n // Step1: Convert to normalized device coordinates (-1,1) \n // Step2: divide ndc by gl_FragCoord.w to get clip coord, gl_FragCoord.w stores inverse of clip space w \n // Step3: Convert to world coordinate by multiplying it with mvp inverse matrix \n // Step4: Use this position to find whether its inside the clipping plane or not \n   vec4 posInClipSpace \x3d (u_ProjectionMat*v_PosInEyeCoord); \n   vec4 ndcCoord \x3d vec4(                                                \n               2.0 * (gl_FragCoord.x) / u_ViewportSize.x - 1.0,     \n              2.0 * (gl_FragCoord.y) / u_ViewportSize.y - 1.0,      \n              posInClipSpace.z/posInClipSpace.w,                    \n              1.0);                                                 \n   vec4 clipCoord\x3d ndcCoord/gl_FragCoord.w;          \n   vec4 unProjectedPosition \x3d u_MVPInverseMatrix * clipCoord;       \n   if( is_clipped(unProjectedPosition.xyz, u_xMinClipPlane) || is_clipped(unProjectedPosition.xyz, u_xMaxClipPlane) ||                   \n       is_clipped(unProjectedPosition.xyz, u_yMinClipPlane) || is_clipped(unProjectedPosition.xyz, u_yMaxClipPlane) ||                   \n       is_clipped(unProjectedPosition.xyz, u_zMinClipPlane) || is_clipped(unProjectedPosition.xyz, u_zMaxClipPlane) )                    \n   {                                                                     \n       discard;                                                          \n   }                                                                     \n"},
getUniformIDs:function(f){return[f.MVPInverseMatrix,f.xMinClipPlane,f.xMaxClipPlane,f.yMinClipPlane,f.yMaxClipPlane,f.zMinClipPlane,f.zMaxClipPlane,f.ViewportSize,f.ModelViewMatrix,f.ProjectionMat]},getAttributeIDs:function(f){return[]}})})},"graphics/MWSG/shader/ClippingPositionShaderSourceProvider":function(){define(["dojo/_base/declare"],function(g){return g([],{constructor:function(){this._name="ClippingPositionShaderSourceProvider"},getName:function(){return this._name},getVertexSourceUniformDeclarationBlock:function(){return""},
getVertexSourceAttributeDeclarationBlock:function(){return""},getVertexSourceVaryingDeclarationBlock:function(){return""},getVertexSourceFunctionDeclarationBlock:function(){return""},getVertexSourceCodeBlock:function(){return"// Define a variable to store position used for clipping.\nvec4 clipPosition \x3d modelPos;\n"},getFragmentSourceUniformDeclarationBlock:function(){return""},getFragmentSourceVaryingDeclarationBlock:function(){return""},getFragmentSourceFunctionDeclarationBlock:function(){return""},
getFragmentSourceCodeBlock:function(){return""},getUniformIDs:function(f){return[]},getAttributeIDs:function(f){return[]}})})},"graphics/MWSG/shader/ClippingPositionShaderSourceProvider_ModelSpace":function(){define(["dojo/_base/declare"],function(g){return g([],{constructor:function(){this._name="ClippingPositionShaderSourceProvider_ModelSpace"},getName:function(){return this._name},getVertexSourceUniformDeclarationBlock:function(){return"uniform mat4 u_MVPInverseMatrix;\n"},getVertexSourceAttributeDeclarationBlock:function(){return""},
getVertexSourceVaryingDeclarationBlock:function(){return""},getVertexSourceFunctionDeclarationBlock:function(){return""},getVertexSourceCodeBlock:function(){return"// Define a variable to store the position used for clipping in model space.\nvec4 clipPosition \x3d u_MVPInverseMatrix * gl_Position;\n"},getFragmentSourceUniformDeclarationBlock:function(){return""},getFragmentSourceVaryingDeclarationBlock:function(){return""},getFragmentSourceFunctionDeclarationBlock:function(){return""},getFragmentSourceCodeBlock:function(){return""},
getUniformIDs:function(f){return[f.MVPInverseMatrix]},getAttributeIDs:function(f){return[]}})})},"graphics/MWSG/shader/PositionShaderSourceProvider":function(){define(["dojo/_base/declare"],function(g){return g([],{constructor:function(){this._name="PositionShaderSourceProvider"},getName:function(){return this._name},getVertexSourceUniformDeclarationBlock:function(){return"    uniform mat4 u_MVPMatrix; \n"},getVertexSourceAttributeDeclarationBlock:function(){return"    attribute vec3 a_Position; \n"},
getVertexSourceVaryingDeclarationBlock:function(){return""},getVertexSourceFunctionDeclarationBlock:function(){return""},getVertexSourceCodeBlock:function(){return"        // Remember the position for drawing.\n        vec4 modelPos \x3d vec4(a_Position,1.);                 \n        gl_Position \x3d u_MVPMatrix * modelPos;           \n"},getFragmentSourceUniformDeclarationBlock:function(){return""},getFragmentSourceVaryingDeclarationBlock:function(){return""},getFragmentSourceFunctionDeclarationBlock:function(){return""},
getFragmentSourceCodeBlock:function(){return""},getUniformIDs:function(f){return[f.MVPMatrix]},getAttributeIDs:function(f){return[f.Position]}})})},"graphics/MWSG/shader/WideLinesPositionShaderSourceProvider":function(){define(["dojo/_base/declare"],function(g){return g([],{constructor:function(){this._name="WideLinesPositionShaderSourceProvider"},getName:function(){return this._name},getVertexSourceUniformDeclarationBlock:function(){return"    uniform mat4 u_MVPMatrix;     \n    uniform vec2 u_ViewportSize; \n    uniform float u_LineWidth;   \n"},
getVertexSourceAttributeDeclarationBlock:function(){return"    attribute vec3 a_Position; \n    attribute vec3 a_UnitDistPoint; \n"},getVertexSourceVaryingDeclarationBlock:function(){return""},getVertexSourceFunctionDeclarationBlock:function(){return""},getVertexSourceCodeBlock:function(){return"        vec4 pUDP_ClipSpace \x3d u_MVPMatrix * vec4(a_UnitDistPoint, 1.0); \n        vec4 pUDP_NDC \x3d vec4(pUDP_ClipSpace.xyz / pUDP_ClipSpace.w, 1.0); \n        vec2 pUDP_Pix \x3d vec2((pUDP_NDC.x + 1.0) * u_ViewportSize.x / 2.0, (pUDP_NDC.y + 1.0) * u_ViewportSize.y / 2.0); \n        vec4 modelPos \x3d vec4(a_Position, 1.0); \n        vec4 clipSpacePosition \x3d u_MVPMatrix * modelPos; \n        vec4 pNDC \x3d vec4(clipSpacePosition.xyz / clipSpacePosition.w, 1.0); \n        vec2 pPix \x3d vec2((pNDC.x + 1.0) * u_ViewportSize.x / 2.0, (pNDC.y + 1.0) * u_ViewportSize.y / 2.0); \n        vec2 vec \x3d pUDP_Pix - pPix; \n        if(length(vec) \x3d\x3d 0.0) { \n            gl_Position \x3d clipSpacePosition; \n        } else { \n        vec2 vDirVector \x3d normalize(vec); \n        vec2 pRot \x3d vec2(-vDirVector.y, vDirVector.x); \n        vec2 delta \x3d pRot * (u_LineWidth / 2.0); \n        vec2 pNew \x3d pPix + delta; \n        gl_Position \x3d vec4(2.0 * pNew.x  / u_ViewportSize.x - 1.0, 2.0 * pNew.y  / u_ViewportSize.y - 1.0, pNDC.z, 1.0); \n        } \n"},
getFragmentSourceUniformDeclarationBlock:function(){return""},getFragmentSourceVaryingDeclarationBlock:function(){return""},getFragmentSourceFunctionDeclarationBlock:function(){return""},getFragmentSourceCodeBlock:function(){return""},getUniformIDs:function(f){return[f.MVPMatrix,f.ViewportSize,f.LineWidth]},getAttributeIDs:function(f){return[f.Position,f.UnitDistPoint]}})})},"graphics/MWSG/shader/ClippingShaderSourceProvider":function(){define(["dojo/_base/declare"],function(g){return g([],{constructor:function(){this._name=
"ClippingShaderSourceProvider"},getName:function(){return this._name},getVertexSourceUniformDeclarationBlock:function(){return"    uniform vec4 u_xMinClipPlane;                       \n    uniform vec4 u_xMaxClipPlane;                       \n    uniform vec4 u_yMinClipPlane;                       \n    uniform vec4 u_yMaxClipPlane;                       \n    uniform vec4 u_zMinClipPlane;                       \n    uniform vec4 u_zMaxClipPlane;                       \n"},getVertexSourceAttributeDeclarationBlock:function(){return""},
getVertexSourceVaryingDeclarationBlock:function(){return"    varying float v_xMinClipDist;                       \n    varying float v_xMaxClipDist;                       \n    varying float v_yMinClipDist;                       \n    varying float v_yMaxClipDist;                       \n    varying float v_zMinClipDist;                       \n    varying float v_zMaxClipDist;                       \n"},getVertexSourceFunctionDeclarationBlock:function(){return"    float point_plane_distance( vec4 plane, vec4 point ){                            \n       const float eps \x3d 0.0000002384185791015625;                                                     \n       float adjEps \x3d eps * max(abs(plane[3]), 1.0);                                                   \n       return ( dot(vec3(plane.xyz), vec3(point.xyz)) - plane[3] + adjEps );  \n }  \n"},
getVertexSourceCodeBlock:function(){return"        v_xMinClipDist \x3d point_plane_distance( u_xMinClipPlane,  clipPosition );   \n        v_xMaxClipDist \x3d point_plane_distance( u_xMaxClipPlane , clipPosition);   \n        v_yMinClipDist \x3d point_plane_distance( u_yMinClipPlane , clipPosition);   \n        v_yMaxClipDist \x3d point_plane_distance( u_yMaxClipPlane , clipPosition);   \n        v_zMinClipDist \x3d point_plane_distance( u_zMinClipPlane , clipPosition);   \n        v_zMaxClipDist \x3d point_plane_distance( u_zMaxClipPlane , clipPosition);   \n"},
getFragmentSourceUniformDeclarationBlock:function(){return""},getFragmentSourceVaryingDeclarationBlock:function(){return"    varying float v_xMinClipDist;                       \n    varying float v_xMaxClipDist;                       \n    varying float v_yMinClipDist;                       \n    varying float v_yMaxClipDist;                       \n    varying float v_zMinClipDist;                       \n    varying float v_zMaxClipDist;                       \n"},getFragmentSourceFunctionDeclarationBlock:function(){return""},
getFragmentSourceCodeBlock:function(){return"   if( v_xMinClipDist \x3c 0.0 || v_yMinClipDist \x3c 0.0 ||                   \n       v_zMinClipDist \x3c 0.0 || v_xMaxClipDist \x3c 0.0 ||                   \n       v_yMaxClipDist \x3c 0.0 || v_zMaxClipDist \x3c 0.0)                     \n   {                                                                     \n       discard;                                                          \n   }                                                                     \n"},
getUniformIDs:function(f){return[f.xMinClipPlane,f.xMaxClipPlane,f.yMinClipPlane,f.yMaxClipPlane,f.zMinClipPlane,f.zMaxClipPlane]},getAttributeIDs:function(f){return[]}})})},"graphics/MWSG/shader/StippleShaderSourceProvider":function(){define(["dojo/_base/declare"],function(g){return g([],{constructor:function(){this._name="StippleShaderSourceProvider"},getName:function(){return this._name},getVertexSourceUniformDeclarationBlock:function(){return""},getVertexSourceAttributeDeclarationBlock:function(){return"attribute float a_StippleCoord;                   \n"},
getVertexSourceVaryingDeclarationBlock:function(){return"varying float v_StippleCoord;                      \n"},getVertexSourceFunctionDeclarationBlock:function(){return""},getVertexSourceCodeBlock:function(){return"v_StippleCoord \x3d  a_StippleCoord;              \n"},getFragmentSourceUniformDeclarationBlock:function(){return"uniform vec4 u_StipplePattern;                    \n"},getFragmentSourceVaryingDeclarationBlock:function(){return"varying float v_StippleCoord;                      \n"},
getFragmentSourceFunctionDeclarationBlock:function(){return""},getFragmentSourceCodeBlock:function(){return"float len \x3d u_StipplePattern.x + u_StipplePattern.y + u_StipplePattern.z + u_StipplePattern.w;       \nfloat modCoord \x3d floor(mod(v_StippleCoord,len) + 0.5);                                      \nif( (modCoord \x3e u_StipplePattern.x) \x26\x26 (modCoord \x3c (u_StipplePattern.x + u_StipplePattern.y) ) ) {                                              \n   discard;                                                                    \n}                                                                              \nif( modCoord \x3e (u_StipplePattern.x+u_StipplePattern.y+u_StipplePattern.z)) {                                              \n   discard;                                                                    \n}                                                                              \n"},
getUniformIDs:function(f){return[f.StipplePattern]},getAttributeIDs:function(f){return[f.StippleCoord]}})})},"graphics/MWSG/shader/Texture1DShaderSourceProvider":function(){define(["dojo/_base/declare"],function(g){return g([],{constructor:function(){this._name="Texture1DShaderSourceProvider"},getName:function(){return this._name},getVertexSourceUniformDeclarationBlock:function(){return""},getVertexSourceAttributeDeclarationBlock:function(){return"    attribute float a_TexCoord;                          \n"},
getVertexSourceVaryingDeclarationBlock:function(){return"    varying vec2 v_TexCoord;                            \n"},getVertexSourceFunctionDeclarationBlock:function(){return""},getVertexSourceCodeBlock:function(){return"        v_TexCoord \x3d vec2(a_TexCoord,0.5);                     \n"},getFragmentSourceUniformDeclarationBlock:function(){return"    uniform sampler2D u_Sampler2D; \n"},getFragmentSourceVaryingDeclarationBlock:function(){return"    varying vec2 v_TexCoord;                            \n"},
getFragmentSourceFunctionDeclarationBlock:function(){return""},getFragmentSourceCodeBlock:function(){return"        gl_FragColor \x3d texture2D(u_Sampler2D, v_TexCoord);  \n"},getUniformIDs:function(f){return[f.Sampler2D]},getAttributeIDs:function(f){return[f.TexCoord]}})})},"graphics/MWSG/shader/Texture2DShaderSourceProvider":function(){define(["dojo/_base/declare"],function(g){return g([],{constructor:function(){this._name="Texture2DShaderSourceProvider"},getName:function(){return this._name},getVertexSourceUniformDeclarationBlock:function(){return""},
getVertexSourceAttributeDeclarationBlock:function(){return"    attribute vec2 a_TexCoord;                          \n"},getVertexSourceVaryingDeclarationBlock:function(){return"    varying vec2 v_TexCoord;                            \n"},getVertexSourceFunctionDeclarationBlock:function(){return""},getVertexSourceCodeBlock:function(){return"        v_TexCoord \x3d a_TexCoord.st;                     \n"},getFragmentSourceUniformDeclarationBlock:function(){return"    uniform sampler2D u_Sampler2D; \n"},
getFragmentSourceVaryingDeclarationBlock:function(){return"    varying vec2 v_TexCoord;                            \n"},getFragmentSourceFunctionDeclarationBlock:function(){return""},getFragmentSourceCodeBlock:function(){return"        gl_FragColor \x3d texture2D(u_Sampler2D, v_TexCoord);  \n"},getUniformIDs:function(f){return[f.Sampler2D]},getAttributeIDs:function(f){return[f.TexCoord]}})})},"graphics/MWSG/shader/VertexColorShaderSourceProvider":function(){define(["dojo/_base/declare"],function(g){return g([],
{constructor:function(){this._name="VertexColorShaderSourceProvider"},getName:function(){return this._name},getVertexSourceUniformDeclarationBlock:function(){return""},getVertexSourceAttributeDeclarationBlock:function(){return" attribute vec4 a_Color; \n"},getVertexSourceVaryingDeclarationBlock:function(){return" varying vec4 v_Color; \n"},getVertexSourceFunctionDeclarationBlock:function(){return""},getVertexSourceCodeBlock:function(){return" v_Color \x3d a_Color; \n"},getFragmentSourceUniformDeclarationBlock:function(){return""},
getFragmentSourceVaryingDeclarationBlock:function(){return" varying vec4 v_Color; \n"},getFragmentSourceFunctionDeclarationBlock:function(){return""},getFragmentSourceCodeBlock:function(){return" gl_FragColor \x3d v_Color; \n"},getUniformIDs:function(f){return[]},getAttributeIDs:function(f){return[f.Color]}})})},"graphics/MWSG/shader/AnchorPointPositionShaderSourceProvider":function(){define(["dojo/_base/declare","graphics/MWSG/shader/AlignVertexCentersSourceProvider"],function(g,f){return g([],{constructor:function(e){this._name=
"AnchorPointPositionShaderSourceProvider";this._AVC=e;!0===e&&(this._AVCSrcProvider=new f(!1))},getName:function(){return this._name},getVertexSourceUniformDeclarationBlock:function(){var e="uniform mat4 u_MVPMatrix;                           \nuniform vec3 u_Anchor;                              \nuniform float u_Scale;                              \n";this._AVC&&(e+=this._AVCSrcProvider.getVertexSourceUniformDeclarationBlock());return e},getVertexSourceAttributeDeclarationBlock:function(){return"    attribute vec2 a_Coord2D;                             \n    attribute vec2 a_Coord2DOffset;        \n"},
getVertexSourceVaryingDeclarationBlock:function(){return""},getVertexSourceFunctionDeclarationBlock:function(){return this._AVC?this._AVCSrcProvider.getVertexSourceFunctionDeclarationBlock():""},getVertexSourceCodeBlock:function(){var e="        // Remember the position for drawing.                \n        vec4 modelPos \x3d vec4(u_Anchor,1.);                   \n        vec4 pos \x3d u_MVPMatrix * modelPos;                   \n        // Offset anchor point.                              \n        // Maybe I shouldn't be dividing here?  If not, would I multiply a_Coord2D by pos.w? \n        pos.x \x3d pos.x / pos.w;                               \n        pos.y \x3d pos.y / pos.w;                               \n        pos.z \x3d pos.z / pos.w;                               \n        pos.w \x3d 1.;                                          \n";
this._AVC&&(e=e+"    pos \x3d "+this._AVCSrcProvider.getStrAVCMasterFunc("pos")+"; \n");return e+"        gl_Position \x3d pos + vec4(a_Coord2D.x * u_Scale \n + a_Coord2DOffset.x, a_Coord2D.y * u_Scale \n +  a_Coord2DOffset.y, 0., 0.);           \n"},getFragmentSourceUniformDeclarationBlock:function(){return""},getFragmentSourceVaryingDeclarationBlock:function(){return""},getFragmentSourceFunctionDeclarationBlock:function(){return""},getFragmentSourceCodeBlock:function(){return""},getUniformIDs:function(e){var d=
[e.MVPMatrix,e.Anchor,e.Scale];this._AVC&&(d=d.concat(this._AVCSrcProvider.getUniformIDs(e)));return d},getAttributeIDs:function(e){return[e.Coord2D,e.Coord2DOffset]}})})},"graphics/MWSG/shader/AlignVertexCentersSourceProvider":function(){define(["dojo/_base/declare"],function(g){return g([],{constructor:function(f){this._name="AlignVertexCentersShaderSourceProvider";this._geometryAVC=f},getName:function(){return this._name},getVertexSourceUniformDeclarationBlock:function(){return"#ifndef UNIFORM_VIEWPORTSIZE   \n#define UNIFORM_VIEWPORTSIZE   \nuniform vec2 u_ViewportSize;   \n#endif                         \n#ifndef UNIFORM_PLOTBOX        \n#define UNIFORM_PLOTBOX        \nuniform vec4 u_PlotBox;        \n#endif                         \n#ifndef UNIFORM_PCENTER        \n#define UNIFORM_PCENTER        \nuniform vec2 u_AVCOffset;      \n#endif                         \n"},
getVertexSourceAttributeDeclarationBlock:function(){return""},getVertexSourceVaryingDeclarationBlock:function(){return""},getVertexSourceFunctionDeclarationBlock:function(){return"#ifndef DECLARE_AVCFUNCTIONS                                           \n#define DECLARE_AVCFUNCTIONS                                           \nfloat filter(in float v, in float low, in float high)                  \n{                                                                      \n   float threshold \x3d 0.01;                                             \n   if (abs(v - low) \x3c threshold) {                                     \n       return low + 0.1;                                               \n   }                                                                   \n   else if (abs(v - high) \x3c threshold) {                               \n       return high - 0.1;                                              \n   }                                                                   \n   else {                                                              \n       return v;                                                       \n   }                                                                   \n}                                                                      \n                                                                       \nvec4 computePixelLocation(in vec4 point, in vec2 screensize, vec4 plotBox, vec2 AVCOffset) \n{                                                                      \n   vec2 offset \x3d vec2(0.5, 0.5);                                       \n   vec2 pts \x3d point.xy/point.w;                                        \n   vec2 xyf \x3d vec2((pts/2.0+.5)*screensize);                           \n   float x \x3d filter(xyf.x, plotBox.x, plotBox.z);                      \n   float y \x3d filter(xyf.y, plotBox.y, plotBox.w);                      \n   ivec2 xy \x3d ivec2(int(x-0.0001), int(y-0.0001));                       \n   vec2 res \x3d (vec2(xy) + offset + AVCOffset)*2.0/screensize-1.0;                    \n   vec4 p \x3d vec4(res*point.w, point.z, point.w);                       \n   return p;                                                           \n}                                                                      \n#endif // #ifndef DECLARE_AVCFUNCTIONS                                 \n"},
getVertexSourceCodeBlock:function(){return this._geometryAVC?"   gl_Position \x3d computePixelLocation(gl_Position, u_ViewportSize, u_PlotBox, u_AVCOffset);   \n":"   pos \x3d computePixelLocation(pos, u_ViewportSize, u_PlotBox, u_AVCOffset);   \n"},getVertexDeferredSourceCodeBlock:function(){return""},getFragmentSourceUniformDeclarationBlock:function(){return""},getFragmentSourceVaryingDeclarationBlock:function(){return""},getFragmentSourceFunctionDeclarationBlock:function(){return""},getFragmentSourceCodeBlock:function(){return""},
getUniformIDs:function(f){return[f.ViewportSize,f.PlotBox,f.AVCOffset]},getAttributeIDs:function(f){return[]},getStrAVCMasterFunc:function(f){return"computePixelLocation("+f+", u_ViewportSize, u_PlotBox, u_AVCOffset)"}})})},"graphics/MWSG/shader/AnchorPointClippingShaderSourceProvider_3dBox":function(){define(["dojo/_base/declare"],function(g){return g([],{constructor:function(){this._name="AnchorPointClippingShaderSourceProvider_3dBox"},getName:function(){return this._name},getVertexSourceUniformDeclarationBlock:function(){return"    uniform vec4 u_xMinClipPlane;                       \n    uniform vec4 u_xMaxClipPlane;                       \n    uniform vec4 u_yMinClipPlane;                       \n    uniform vec4 u_yMaxClipPlane;                       \n    uniform vec4 u_zMinClipPlane;                       \n    uniform vec4 u_zMaxClipPlane;                       \n"},
getVertexSourceAttributeDeclarationBlock:function(){return""},getVertexSourceVaryingDeclarationBlock:function(){return""},getVertexSourceFunctionDeclarationBlock:function(){return"    float point_plane_distance( vec4 plane, vec4 point ){           \n       const float eps \x3d 0.0000002384185791015625;                                                     \n       float adjEps \x3d eps * max(abs(plane[3]), 1.0);                                                   \n       return ( (plane[0]*point[0]) + (plane[1]*point[1]) + (plane[2]*point[2]) - plane[3] + adjEps );  \n  }  \n"},
getVertexSourceCodeBlock:function(){return"        if (point_plane_distance( u_xMinClipPlane, modelPos ) \x3c 0.0 || \n            point_plane_distance( u_xMaxClipPlane, modelPos ) \x3c 0.0 || \n            point_plane_distance( u_yMinClipPlane, modelPos ) \x3c 0.0 || \n            point_plane_distance( u_yMaxClipPlane, modelPos ) \x3c 0.0 || \n            point_plane_distance( u_zMinClipPlane, modelPos ) \x3c 0.0 || \n            point_plane_distance( u_zMaxClipPlane, modelPos ) \x3c 0.0) { \n            // Use anchor point to make degenerate geometry      \n            gl_Position \x3d pos;                                   \n        }                                                        \n"},
getFragmentSourceUniformDeclarationBlock:function(){return""},getFragmentSourceVaryingDeclarationBlock:function(){return""},getFragmentSourceFunctionDeclarationBlock:function(){return""},getFragmentSourceCodeBlock:function(){return""},getUniformIDs:function(f){return[f.xMinClipPlane,f.xMaxClipPlane,f.yMinClipPlane,f.yMaxClipPlane,f.zMinClipPlane,f.zMaxClipPlane]},getAttributeIDs:function(f){return[]}})})},"graphics/MWSG/shader/AnchorPointClippingShaderSourceProvider_ScissorRect":function(){define(["dojo/_base/declare"],
function(g){return g([],{constructor:function(){this._name="AnchorPointClippingShaderSourceProvider_ScissorRect"},getName:function(){return this._name},getVertexSourceUniformDeclarationBlock:function(){return"    uniform vec4 u_ScissorRect;                         \n    #ifndef UNIFORM_VIEWPORTSIZE                        \n    #define UNIFORM_VIEWPORTSIZE                        \n    uniform vec2 u_ViewportSize;                        \n    #endif                                              \n"},
getVertexSourceAttributeDeclarationBlock:function(){return""},getVertexSourceVaryingDeclarationBlock:function(){return""},getVertexSourceFunctionDeclarationBlock:function(){return"    int isPointOutsideScissorRect(vec4 rect, vec4 pos) { \n        vec2 p \x3d pos.xy; \n        float x \x3d 0.5 * u_ViewportSize.x * (p.x + 1.0); \n        float y \x3d 0.5 * u_ViewportSize.y * (p.y + 1.0); \n        if( (x \x3e\x3d (rect.x - 1.0)) \x26\x26 (x \x3c\x3d (rect.x + rect.z + 1.0)) \x26\x26 \n            (y \x3e\x3d (rect.y - 1.0)) \x26\x26 (y \x3c\x3d (rect.y + rect.w + 1.0))) { \n                return 0; \n        } else { \n                return 1; \n        } \n    } \n"},
getVertexSourceCodeBlock:function(){return"    if (isPointOutsideScissorRect(u_ScissorRect, pos) \x3d\x3d 1) { \n        gl_Position \x3d pos; \n    } \n"},getFragmentSourceUniformDeclarationBlock:function(){return""},getFragmentSourceVaryingDeclarationBlock:function(){return""},getFragmentSourceFunctionDeclarationBlock:function(){return""},getFragmentSourceCodeBlock:function(){return""},getUniformIDs:function(f){return[f.ScissorRect,f.ViewportSize]},getAttributeIDs:function(f){return[]}})})},"graphics/MWSG/shader/ConstantColorShaderSourceProvider":function(){define(["dojo/_base/declare"],
function(g){return g([],{constructor:function(){this._name="ConstantColorShaderSourceProvider"},getName:function(){return this._name},getVertexSourceUniformDeclarationBlock:function(){return""},getVertexSourceAttributeDeclarationBlock:function(){return""},getVertexSourceVaryingDeclarationBlock:function(){return""},getVertexSourceFunctionDeclarationBlock:function(){return""},getVertexSourceCodeBlock:function(){return""},getFragmentSourceUniformDeclarationBlock:function(){return"    uniform vec4 u_Color;       \n"},
getFragmentSourceVaryingDeclarationBlock:function(){return""},getFragmentSourceFunctionDeclarationBlock:function(){return""},getFragmentSourceCodeBlock:function(){return"        gl_FragColor \x3d u_Color;                         \n"},getUniformIDs:function(f){return[f.Color]},getAttributeIDs:function(f){return[]}})})},"graphics/MWSG/shader/ImagePositionShaderSourceProvider":function(){define(["dojo/_base/declare"],function(g){return g([],{constructor:function(){this._name="ImagePositionShaderSourceProvider"},
getName:function(){return this._name},getVertexSourceUniformDeclarationBlock:function(){return"    uniform mat4 u_MVPMatrix;                           \n    uniform vec3 u_Anchor;                              \n    #ifndef UNIFORM_VIEWPORTSIZE                        \n    #define UNIFORM_VIEWPORTSIZE                        \n    uniform vec2 u_ViewportSize;                        \n    #endif                                              \n"},getVertexSourceAttributeDeclarationBlock:function(){return"    attribute vec2 a_Coord2D;                             \n"},
getVertexSourceVaryingDeclarationBlock:function(){return""},getVertexSourceFunctionDeclarationBlock:function(){return"    vec4 align_to_pixel( vec4 pos, vec2 screensize){ \n    vec2 pt2 \x3d pos.xy; \n    vec2 xyf \x3d vec2((pt2/2.0+0.5)*screensize);\n   vec2 xy \x3d vec2(floor(xyf.x+0.5), floor(xyf.y+0.5));\n   vec2 res \x3d xy*2.0/screensize-1.0; \n   return vec4(res, pos.z, pos.w); \n  }  \n"},getVertexSourceCodeBlock:function(){return"        // Remember the position for drawing.           \n        vec4 modelPos \x3d vec4(u_Anchor,1.);                 \n        vec4 pos \x3d u_MVPMatrix * modelPos;              \n        pos.x \x3d pos.x / pos.w;                               \n        pos.y \x3d pos.y / pos.w;                               \n        pos.z \x3d pos.z / pos.w;                               \n        pos.w \x3d 1.;                                          \n        vec4 newpos \x3d align_to_pixel(pos, u_ViewportSize); \n        vec2 halfViewportSize \x3d u_ViewportSize / 2.0;        vec2 offset \x3d a_Coord2D / halfViewportSize;        gl_Position \x3d newpos + vec4(offset, 0., 0.); \n"},
getFragmentSourceUniformDeclarationBlock:function(){return""},getFragmentSourceVaryingDeclarationBlock:function(){return""},getFragmentSourceFunctionDeclarationBlock:function(){return""},getFragmentSourceCodeBlock:function(){return""},getUniformIDs:function(f){return[f.MVPMatrix,f.Anchor,f.ViewportSize]},getAttributeIDs:function(f){return[f.Coord2D]}})})},"graphics/MWSG/shader/LineJoinsPositionShaderSourceProvider":function(){define(["dojo/_base/declare"],function(g){return g([],{constructor:function(){this._name=
"WideLinesPositionShaderSourceProvider"},getName:function(){return this._name},getVertexSourceUniformDeclarationBlock:function(){return"    uniform mat4 u_MVPMatrix;     \n    uniform vec2 u_ViewportSize; \n    uniform float u_LineWidth;   \n    uniform int u_JoinStyle;   \n    uniform int u_SegmentsPerJoin; \n"},getVertexSourceAttributeDeclarationBlock:function(){return"    attribute vec3 a_Position; \n    attribute float a_VertexIndex; \n    attribute vec3 a_UnitDistPointPrev; \n    attribute vec3 a_UnitDistPointNext; \n"},
getVertexSourceVaryingDeclarationBlock:function(){return""},getVertexSourceFunctionDeclarationBlock:function(){return"        vec2 calculateOuterBisector(vec2 u, vec2 v) { \n            float magU \x3d length(u); \n            float magV \x3d length(v); \n            vec2 uVec \x3d u * magV; \n            vec2 vVec \x3d v * magU; \n            return (-1.0 * (uVec + vVec)); \n        } \n"},getVertexSourceCodeBlock:function(){return"        vec4 pPrev_ClipSpace \x3d u_MVPMatrix * vec4(a_UnitDistPointPrev, 1.0); \n        vec4 pPrev_NDC \x3d vec4(pPrev_ClipSpace.xyz / pPrev_ClipSpace.w, 1.0); \n        vec2 pPrev_Pix \x3d vec2((pPrev_NDC.x + 1.0) * u_ViewportSize.x / 2.0, (pPrev_NDC.y + 1.0) * u_ViewportSize.y / 2.0); \n        vec4 pNext_ClipSpace \x3d u_MVPMatrix * vec4(a_UnitDistPointNext, 1.0); \n        vec4 pNext_NDC \x3d vec4(pNext_ClipSpace.xyz / pNext_ClipSpace.w, 1.0); \n        vec2 pNext_Pix \x3d vec2((pNext_NDC.x + 1.0) * u_ViewportSize.x / 2.0, (pNext_NDC.y + 1.0) * u_ViewportSize.y / 2.0); \n        vec4 modelPos \x3d vec4(a_Position, 1.0); \n        vec4 clipSpacePosition \x3d u_MVPMatrix * modelPos; \n        vec4 pNDC \x3d vec4(clipSpacePosition.xyz / clipSpacePosition.w, 1.0); \n        vec2 pPix \x3d vec2((pNDC.x + 1.0) * u_ViewportSize.x / 2.0, (pNDC.y + 1.0) * u_ViewportSize.y / 2.0); \n        if(a_VertexIndex \x3d\x3d 0.0) { \n            gl_Position \x3d clipSpacePosition; \n        } else { \n            vec2 dirVectorPrev \x3d normalize(pPrev_Pix - pPix); \n            vec2 dirVectorNext \x3d normalize(pNext_Pix - pPix); \n            float innerAngle \x3d acos(dot(dirVectorPrev, dirVectorNext)); \n            float joinAngle \x3d 3.1415926 - innerAngle; \n            float joinAngle_Half \x3d joinAngle / 2.0; \n            vec2 outerBisector \x3d calculateOuterBisector(dirVectorPrev, dirVectorNext); \n            vec2 outerBisector_Rot \x3d vec2(outerBisector.x * cos(-joinAngle_Half) - outerBisector.y * sin(-joinAngle_Half), outerBisector.x * sin(-joinAngle_Half) + outerBisector.y * cos(-joinAngle_Half)); \n            outerBisector_Rot \x3d normalize(outerBisector_Rot); \n            float rotationAngle \x3d 0.0; \n            float scaleFactor \x3d u_LineWidth / 2.0; \n            rotationAngle \x3d (a_VertexIndex - 1.0) * (joinAngle / float(u_SegmentsPerJoin)); \n            if(u_JoinStyle \x3d\x3d 1 \x26\x26 a_VertexIndex \x3d\x3d 2.0) { \n                float miterLimit \x3d 4.0 * 2.5 * scaleFactor; \n                scaleFactor \x3d scaleFactor / cos(joinAngle_Half); \n                if (scaleFactor \x3e miterLimit) { \n                    scaleFactor \x3d (u_LineWidth / 2.0) * cos(joinAngle_Half); \n                } \n            } \n            vec2 pRot \x3d vec2(outerBisector_Rot.x * cos(rotationAngle) - outerBisector_Rot.y * sin(rotationAngle), outerBisector_Rot.x * sin(rotationAngle) + outerBisector_Rot.y * cos(rotationAngle)); \n            vec2 delta \x3d pRot * scaleFactor; \n            vec2 pNew \x3d pPix + delta; \n            gl_Position \x3d vec4(2.0 * pNew.x  / u_ViewportSize.x - 1.0, 2.0 * pNew.y  / u_ViewportSize.y - 1.0, pNDC.z, 1.0); \n        } \n"},
getFragmentSourceUniformDeclarationBlock:function(){return""},getFragmentSourceVaryingDeclarationBlock:function(){return""},getFragmentSourceFunctionDeclarationBlock:function(){return""},getFragmentSourceCodeBlock:function(){return""},getUniformIDs:function(f){return[f.MVPMatrix,f.ViewportSize,f.LineWidth,f.JoinStyle,f.SegmentsPerJoin]},getAttributeIDs:function(f){return[f.Position,f.VertexIndex,f.UnitDistPointPrev,f.UnitDistPointNext]}})})},"graphics/MWSG/shader/LineCapsPositionShaderSourceProvider":function(){define(["dojo/_base/declare"],
function(g){return g([],{constructor:function(){this._name="WideLinesPositionShaderSourceProvider"},getName:function(){return this._name},getVertexSourceUniformDeclarationBlock:function(){return"    uniform mat4 u_MVPMatrix;     \n    uniform vec2 u_ViewportSize; \n    uniform float u_LineWidth;   \n    uniform int u_CapStyle;   \n    uniform int u_SegmentsPerCap; \n"},getVertexSourceAttributeDeclarationBlock:function(){return"    attribute vec3 a_Position; \n    attribute float a_VertexIndex; \n    attribute vec3 a_UnitDistPoint; \n"},
getVertexSourceVaryingDeclarationBlock:function(){return""},getVertexSourceFunctionDeclarationBlock:function(){return""},getVertexSourceCodeBlock:function(){return"        vec4 pUDP_ClipSpace \x3d u_MVPMatrix * vec4(a_UnitDistPoint, 1.0); \n        vec4 pUDP_NDC \x3d vec4(pUDP_ClipSpace.xyz / pUDP_ClipSpace.w, 1.0); \n        vec2 pUDP_Pix \x3d vec2((pUDP_NDC.x + 1.0) * u_ViewportSize.x / 2.0, (pUDP_NDC.y + 1.0) * u_ViewportSize.y / 2.0); \n        vec4 modelPos \x3d vec4(a_Position, 1.0); \n        vec4 clipSpacePosition \x3d u_MVPMatrix * modelPos; \n        vec4 pNDC \x3d vec4(clipSpacePosition.xyz / clipSpacePosition.w, 1.0); \n        vec2 pPix \x3d vec2((pNDC.x + 1.0) * u_ViewportSize.x / 2.0, (pNDC.y + 1.0) * u_ViewportSize.y / 2.0); \n        if(a_VertexIndex \x3d\x3d 0.0) { \n            gl_Position \x3d clipSpacePosition; \n        } else { \n            vec2 dirVector \x3d normalize(pUDP_Pix - pPix); \n            vec2 reverseDirVector \x3d -dirVector; \n            vec2 reverseDirVector_Rot \x3d vec2(reverseDirVector.y, -reverseDirVector.x); \n            float rotationAngle \x3d 0.0; \n            float scaleFactor \x3d u_LineWidth / 2.0; \n            if(u_CapStyle \x3d\x3d 1 \x26\x26 (a_VertexIndex \x3d\x3d 2.0 || a_VertexIndex \x3d\x3d 4.0)) { \n                scaleFactor \x3d sqrt(2.0) * scaleFactor; \n            } \n            float capAngle \x3d 3.1415926; \n            rotationAngle \x3d (a_VertexIndex - 1.0) * (capAngle / float(u_SegmentsPerCap)); \n            vec2 pRot \x3d vec2(reverseDirVector_Rot.x * cos(rotationAngle) - reverseDirVector_Rot.y * sin(rotationAngle), reverseDirVector_Rot.x * sin(rotationAngle) + reverseDirVector_Rot.y * cos(rotationAngle)); \n            vec2 delta \x3d pRot * scaleFactor; \n            vec2 pNew \x3d pPix + delta; \n            gl_Position \x3d vec4(2.0 * pNew.x  / u_ViewportSize.x - 1.0, 2.0 * pNew.y  / u_ViewportSize.y - 1.0, pNDC.z, 1.0); \n        } \n"},
getFragmentSourceUniformDeclarationBlock:function(){return""},getFragmentSourceVaryingDeclarationBlock:function(){return""},getFragmentSourceFunctionDeclarationBlock:function(){return""},getFragmentSourceCodeBlock:function(){return""},getUniformIDs:function(f){return[f.MVPMatrix,f.ViewportSize,f.LineWidth,f.CapStyle,f.SegmentsPerCap]},getAttributeIDs:function(f){return[f.Position,f.VertexIndex,f.UnitDistPoint]}})})},"graphics/MWSG/shader/PickShaderSourceProvider":function(){define(["dojo/_base/declare"],
function(g){return g([],{constructor:function(){this._name="PickShaderSourceProvider"},getName:function(){return this._name},getVertexSourceUniformDeclarationBlock:function(){return""},getVertexSourceAttributeDeclarationBlock:function(){return""},getVertexSourceVaryingDeclarationBlock:function(){return""},getVertexSourceFunctionDeclarationBlock:function(){return""},getVertexSourceCodeBlock:function(){return""},getFragmentSourceUniformDeclarationBlock:function(){return"uniform bool u_Pick;\nuniform vec4 u_PickColor;\n  "},
getFragmentSourceVaryingDeclarationBlock:function(){return""},getFragmentSourceFunctionDeclarationBlock:function(){return""},getFragmentSourceCodeBlock:function(){return" if(u_Pick){\n  gl_FragColor \x3d u_PickColor;\n  return;\n} "},getUniformIDs:function(f){return[f.Pick,f.PickColor]},getAttributeIDs:function(f){return[]}})})},"graphics/MWSG/shader/DepthRenderShaderSourceProvider":function(){define(["dojo/_base/declare","graphics/MWSG/EncodeFloat"],function(g,f){return g([],{constructor:function(){this._name=
"DepthRenderShaderSourceProvider"},getName:function(){return this._name},getVertexSourceUniformDeclarationBlock:function(){return"uniform mat4 u_ProjectionInvMat;\n"},getVertexSourceAttributeDeclarationBlock:function(){return""},getVertexSourceVaryingDeclarationBlock:function(){return"varying vec4 v_DepthInEyeCoord;\n"},getVertexSourceFunctionDeclarationBlock:function(){return""},getVertexSourceCodeBlock:function(){return"v_DepthInEyeCoord \x3d (u_ProjectionInvMat*gl_Position);\n"},getFragmentSourceUniformDeclarationBlock:function(){return"uniform bool u_StoreScreenSpaceDepth;                   \n    #ifndef UNIFORM_PROJMAT                             \n    #define UNIFORM_PROJMAT                             \n        uniform mat4 u_ProjectionMat;                   \n    #endif                                              \n"},
getFragmentSourceVaryingDeclarationBlock:function(){return"varying vec4 v_DepthInEyeCoord;\n"},getFragmentSourceFunctionDeclarationBlock:function(){return f.encodeFloatToColor_GLSL()},getFragmentSourceCodeBlock:function(){return" if(u_StoreScreenSpaceDepth){\n  vec4 clipPos \x3d (u_ProjectionMat*v_DepthInEyeCoord); \n  float zDepthNDC \x3d clipPos.z/clipPos.w; \n  float zScreenSpace \x3d zDepthNDC/2.0+0.5; \n  const vec4 scale \x3d vec4(256.0/255.0, 256.0/255.0, 256.0/255.0, 256.0/255.0);\n  gl_FragColor \x3d (encodeDepth(zScreenSpace) * scale);\n  return;\n} "},
getUniformIDs:function(e){return[e.StoreScreenSpaceDepth,e.ProjectionInverseMatrix,e.ProjectionMat]},getAttributeIDs:function(e){return[]}})})},"graphics/MWSG/EncodeFloat":function(){define([],function(){return{encodeFloatToColor:function(g){if(0>=g||1<=g)throw"This function expects a float strictly in range of 0 \x26 1 (excluding 0.0 \x26 1.0) to encode float into rgba successfully";var f=16777216*g,e=65536*g,d=256*g;g*=1;f-=Math.floor(f);e-=Math.floor(e);d-=Math.floor(d);g-=Math.floor(g);f-=0*f;
e-=f/256;d-=e/256;g-=d/256;return[Math.floor(255*(256*f/255)),Math.floor(255*(256*e/255)),Math.floor(255*(256*d/255)),Math.floor(255*(256*g/255))]},encodeFloatToColor_GLSL:function(){return"vec4 encodeDepth(float depth) {\n     const vec4 bitShift \x3d vec4(256.0*256.0*256.0, 256.0*256.0, 256.0, 1.0);\n     const vec4 bitMask  \x3d vec4(0.0, 1.0/256.0, 1.0/256.0, 1.0/256.0);\n     vec4 rgbaDepth \x3d fract(depth * bitShift);\n     rgbaDepth -\x3d rgbaDepth.xxyz * bitMask;\n     return rgbaDepth;\n}\n"},
decodeColorToFloat:function(g,f,e,d){g=[g/256,f/256,e/256,d/256];f=[1/16777216,1/65536,1/256,1];return g[0]*f[0]+g[1]*f[1]+g[2]*f[2]+g[3]*f[3]}}})},"graphics/MWSG/shader/DiscardFragUsingDepthTextureShaderSourceProvider":function(){define(["dojo/_base/declare"],function(g){return g([],{constructor:function(f){this._name="DiscardFragUsingDepthTextureShaderSourceProvider";this._useTwoTexturesForDepthTest=f},getName:function(){return this._name},getVertexSourceUniformDeclarationBlock:function(){return""},
getVertexSourceAttributeDeclarationBlock:function(){return""},getVertexSourceVaryingDeclarationBlock:function(){return"varying vec2 v_texPos;\nvarying float v_Depth; \n"},getVertexSourceFunctionDeclarationBlock:function(){return""},getVertexSourceCodeBlock:function(){return"v_texPos \x3d (gl_Position.xy / gl_Position.w) * 0.5 + 0.5;\nv_Depth \x3d gl_Position.z/gl_Position.w;\n"},getFragmentSourceUniformDeclarationBlock:function(){var f="uniform sampler2D u_D0;\n";this._useTwoTexturesForDepthTest&&
(f+="uniform sampler2D u_D1;\n");return f},getFragmentSourceVaryingDeclarationBlock:function(){return"varying vec2 v_texPos;\nvarying float v_Depth; \n"},getFragmentSourceFunctionDeclarationBlock:function(){return""},getFragmentSourceCodeBlock:function(){var f="float D0Depth \x3d texture2D(u_D0, v_texPos.xy).r;\nconst float eps \x3d 0.0000002384185791015625;// 1/2^22 \n float currDepth \x3d (v_Depth/2.0+0.5)+eps;\n";return f=this._useTwoTexturesForDepthTest?f+"float D1Depth \x3d texture2D(u_D1, v_texPos.xy).r;\nif ((currDepth \x3e D0Depth  || currDepth \x3c D1Depth)) {\n discard;\n}\n":
f+"if (currDepth \x3e D0Depth) { \n   discard;\n}\n"},getUniformIDs:function(f){var e=[];e.push(f.D0Sampler);this._useTwoTexturesForDepthTest&&e.push(f.D1Sampler);return e},getAttributeIDs:function(f){return[]}})})},"graphics/MWSG/shader/LightingGouraudShaderSourceProvider":function(){define(["dojo/_base/declare","graphics/MWSG/Enum"],function(g,f){return g([],{constructor:function(e){this._name="LightingGouraudShaderSourceProvider";this._twoSidedLighting=e},getName:function(){return this._name},
getVertexSourceUniformDeclarationBlock:function(){return"#ifndef UNIFORM_MODELVIEWMAT \n#define UNIFORM_MODELVIEWMAT \nuniform mat4 u_ModelViewMat; \n#endif \nuniform mat3 u_NormalMatrix; \nstruct Light { \n    int style; \n    vec3 color; \n    vec3 position; \n}; \nstruct Material { \n    float ambientStrength; \n    float diffuseStrength; \n    float specularStrength; \n    float specularColorReflectance; \n    float specularExponent; \n}; \nuniform vec3 u_EyePos; \nuniform int u_LightCount; \nuniform Light u_Lights[8]; \nuniform Material u_Material; \nuniform vec3 u_SceneAmbientLightColor; \n"},
getVertexSourceAttributeDeclarationBlock:function(){return"attribute vec3 a_Normal; \n"},getVertexSourceVaryingDeclarationBlock:function(){return"varying vec3 vAmbientWt; \nvarying vec3 vDiffuseWt; \nvarying vec3 vSpecularWt; \nvarying vec3 vNormal; \n"},getVertexSourceFunctionDeclarationBlock:function(){return"void computeInfiniteOrLocalLighting(in Light l, in vec3 lDir, in vec3 norm, in vec3 eyeCoordPos, inout vec3 diffCol, inout vec3 specCol) { \n    float nDotLD \x3d 0.0; \n    nDotLD \x3d max(0.0, dot(norm, lDir)); \n    float diffFactor \x3d max(nDotLD, 0.0); \n    vec3 viewDir \x3d normalize(u_EyePos - eyeCoordPos); \n    vec3 reflectDir \x3d reflect(-lDir, norm); \n    float specFactor \x3d pow(max(dot(viewDir, reflectDir), 0.0), u_Material.specularExponent); \n    diffCol +\x3d l.color * (diffFactor * u_Material.diffuseStrength); \n    specCol +\x3d l.color * (specFactor * u_Material.specularStrength); \n} \n"},
getVertexSourceCodeBlock:function(){return!0===this._twoSidedLighting?"    vec3 normal \x3d u_NormalMatrix * a_Normal; \n    vec4 eyeCoordPos \x3d u_ModelViewMat * vec4(a_Position, 1.0); \n    vec3 eyeCoordPosition \x3d eyeCoordPos.xyz/eyeCoordPos.w; \n    vec3 diffuseColor \x3d vec3(0.0, 0.0, 0.0); \n    vec3 specularColor \x3d vec3(0.0, 0.0, 0.0); \n    vec3 norm \x3d normalize(normal); \n    vNormal \x3d norm; \n    if(norm.z \x3c 0.0) { \n        norm \x3d -norm; \n    } \n    for(int i \x3d 0; i \x3c 8; i++) { \n        if(i \x3c u_LightCount) { \n            Light l \x3d u_Lights[i]; \n            if(l.style \x3d\x3d 0) { \n                computeInfiniteOrLocalLighting(l, normalize(l.position), normalize(norm), eyeCoordPosition, diffuseColor, specularColor); \n            } else if(l.style \x3d\x3d 1) { \n                computeInfiniteOrLocalLighting(l, normalize(l.position - eyeCoordPosition), normalize(norm), eyeCoordPosition, diffuseColor, specularColor); \n            } \n        } \n    } \n    vAmbientWt \x3d u_Material.ambientStrength * u_SceneAmbientLightColor; \n    vDiffuseWt \x3d diffuseColor; \n    vSpecularWt \x3d specularColor; \n":
"    vec3 normal \x3d u_NormalMatrix * a_Normal; \n    vec4 eyeCoordPos \x3d u_ModelViewMat * vec4(a_Position, 1.0); \n    vec3 eyeCoordPosition \x3d eyeCoordPos.xyz/eyeCoordPos.w; \n    vec3 diffuseColor \x3d vec3(0.0, 0.0, 0.0); \n    vec3 specularColor \x3d vec3(0.0, 0.0, 0.0); \n    vec3 norm \x3d normalize(normal); \n    vNormal \x3d norm; \n    for(int i \x3d 0; i \x3c 8; i++) { \n        if(i \x3c u_LightCount) { \n            Light l \x3d u_Lights[i]; \n            if(l.style \x3d\x3d 0) { \n                computeInfiniteOrLocalLighting(l, normalize(l.position), normalize(norm), eyeCoordPosition, diffuseColor, specularColor); \n            } else if(l.style \x3d\x3d 1) { \n                computeInfiniteOrLocalLighting(l, normalize(l.position - eyeCoordPosition), normalize(norm), eyeCoordPosition, diffuseColor, specularColor); \n            } \n        } \n    } \n    vAmbientWt \x3d u_Material.ambientStrength * u_SceneAmbientLightColor; \n    vDiffuseWt \x3d diffuseColor; \n    vSpecularWt \x3d specularColor; \n"},
getFragmentSourceUniformDeclarationBlock:function(){return"struct Material { \n    float ambientStrength; \n    float diffuseStrength; \n    float specularStrength; \n    float specularColorReflectance; \n    float specularExponent; \n}; \nuniform Material u_Material; \nuniform int u_SeparateSpecularColor; \n"},getFragmentSourceVaryingDeclarationBlock:function(){return"varying vec3 vAmbientWt; \nvarying vec3 vDiffuseWt; \nvarying vec3 vSpecularWt; \nvarying vec3 vNormal; \n"},getFragmentSourceFunctionDeclarationBlock:function(){return""},
getFragmentSourceCodeBlock:function(){var e="";return e=!0===this._twoSidedLighting?"    vec4 baseFragmentColor \x3d gl_FragColor; \n    vec3 finalColor \x3d vec3(1.0, 1.0, 1.0); \n    if(u_SeparateSpecularColor \x3d\x3d 1) { \n        finalColor \x3d (vAmbientWt + vDiffuseWt) * baseFragmentColor.rgb + vSpecularWt; \n    } else { \n        vec3 specColFactor \x3d (1.0 - u_Material.specularColorReflectance) * baseFragmentColor.rgb + vec3(u_Material.specularColorReflectance); \n        finalColor \x3d (vAmbientWt + vDiffuseWt) * baseFragmentColor.rgb + specColFactor * vSpecularWt; \n    } \n    gl_FragColor \x3d vec4(finalColor, baseFragmentColor.a); \n":
"    vec4 baseFragmentColor \x3d gl_FragColor; \n    vec3 finalColor \x3d vec3(1.0, 1.0, 1.0); \n    vec3 norm \x3d normalize(vNormal); \n    if(norm.z \x3c 0.0) { \n        finalColor \x3d vAmbientWt * baseFragmentColor.rgb; \n    } else { \n        if(u_SeparateSpecularColor \x3d\x3d 1) { \n            finalColor \x3d (vAmbientWt + vDiffuseWt) * baseFragmentColor.rgb + vSpecularWt; \n        } else { \n            vec3 specColFactor \x3d (1.0 - u_Material.specularColorReflectance) * baseFragmentColor.rgb + vec3(u_Material.specularColorReflectance); \n            finalColor \x3d (vAmbientWt + vDiffuseWt) * baseFragmentColor.rgb + specColFactor * vSpecularWt; \n        } \n   } \n    gl_FragColor \x3d vec4(finalColor, baseFragmentColor.a); \n"},
getUniformIDs:function(e){return[e.ModelViewMatrix,e.NormalMatrix,e.Material_AmbientStrength,e.Material_DiffuseStrength,e.Material_SpecularStrength,e.Material_SpecularColorReflectance,e.Material_SpecularExponent,e.LightCount,e.Light0_Style,e.Light0_Color,e.Light0_Position,e.Light1_Style,e.Light1_Color,e.Light1_Position,e.Light2_Style,e.Light2_Color,e.Light2_Position,e.Light3_Style,e.Light3_Color,e.Light3_Position,e.Light4_Style,e.Light4_Color,e.Light4_Position,e.Light5_Style,e.Light5_Color,e.Light5_Position,
e.Light6_Style,e.Light6_Color,e.Light6_Position,e.Light7_Style,e.Light7_Color,e.Light7_Position,e.SeparateSpecularColor,e.SceneAmbientLightColor]},getAttributeIDs:function(e){return[e.Normal]}})})},"graphics/MWSG/TypedArrayUtils":function(){define([],function(){var g={},f=!1;"sort slice reduce map forEach fill".split(" ").forEach(function(d){Float32Array.prototype[d]||(g[d]=function(){var b=Array.prototype[d].apply(this,arguments);return new Float32Array(b)},f=!0)});var e={_polyfillFloat32ArrayIfNeeded:function(d){for(var b in g)g.hasOwnProperty(b)&&
(d[b]=g[b]);return d},createFloat32Array:function(d){d=new Float32Array(d);return this._polyfillFloat32ArrayIfNeeded(d)}};!1===f&&(e._polyfillFloat32ArrayIfNeeded=function(d){return d});return e})},"graphics/MWSG/matrix4x4":function(){define(["dojo/_base/declare","graphics/MWSG/Point3","graphics/MWSG/Point4","graphics/MWSG/TypedArrayUtils"],function(g,f,e,d){var b=g("graphics.MWSG.Matrix4x4",[],{constructor:function(){this._data=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},getElements:function(){return this._data},
setElements:function(a){var c;for(c=0;16>c;c+=1)this._data[c]=a[c]},transpose:function(){function a(a,c,b){var d=a[c];a[c]=a[b];a[b]=d}var c=this.getElements(),d=new b;d.setElements(c);a(d._data,1,4);a(d._data,2,8);a(d._data,3,12);a(d._data,6,9);a(d._data,7,13);a(d._data,11,14);return d},scale:function(a){var c=this.getElements(),d=new b;d.setElements(c);d._data[0]*=a;d._data[5]*=a;d._data[10]*=a;return d},getAsFloat32Array:function(){var a=this.getElements(),c=d.createFloat32Array(16),b;for(b=0;16>
b;b+=1)c[b]=a[b];return c},toString:function(){var a="[",c,b;for(c=0;4>c;c+=1)for(b=0;4>b;b+=1)a+=this._data[4*c+b],a=3===b?a+"; ":a+", ";return a+"]"},times:function(a){var c=new b,d=Array(16),e,f;for(e=0;4>e;e+=1)for(f=0;4>f;f+=1)d[e+4*f]=this._data[e]*a._data[4*f]+this._data[e+4]*a._data[1+4*f]+this._data[e+8]*a._data[2+4*f]+this._data[e+12]*a._data[3+4*f];c.setElements(d);return c},transform:function(a){var c=a.getX(),b=a.getY(),d=a.getZ();a=a.getW();return new e(c*this._data[0]+b*this._data[4]+
d*this._data[8]+a*this._data[12],c*this._data[1]+b*this._data[5]+d*this._data[9]+a*this._data[13],c*this._data[2]+b*this._data[6]+d*this._data[10]+a*this._data[14],c*this._data[3]+b*this._data[7]+d*this._data[11]+a*this._data[15])},rotate:function(a){var c=a.getX(),b=a.getY(),d=a.getZ();a.getW();return new e(c*this._data[0]+b*this._data[4]+d*this._data[8],c*this._data[1]+b*this._data[5]+d*this._data[9],c*this._data[2]+b*this._data[6]+d*this._data[10],1)},createInverseTranspose:function(){var a=new b,
c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],d,e;a.setElements(this._data);a.invert();for(d=0;4>d;d+=1)for(e=0;4>=e;e+=1)c[d+4*e]=a._data[e+4*d];a=new b;a.setElements(c);return a},invert:function(){var a=this._data[0],c=this._data[4],b=this._data[8],d=this._data[12],e=this._data[1],f=this._data[5],g=this._data[9],n=this._data[13],q=this._data[2],r=this._data[6],s=this._data[10],t=this._data[14],u=this._data[3],v=this._data[7],w=this._data[11],x=this._data[15],y=1/(a*f*s*x-a*f*t*w-a*r*g*x+a*r*n*w+a*v*g*t-a*
v*n*s-e*c*s*x+e*c*t*w+e*r*b*x-e*r*d*w-e*v*b*t+e*v*d*s+q*c*g*x-q*c*n*w-q*f*b*x+q*f*d*w+q*v*b*n-q*v*d*g-u*c*g*t+u*c*n*s+u*f*b*t-u*f*d*s-u*r*b*n+u*r*d*g);this._data[0]=(f*s*x-f*t*w-r*g*x+r*n*w+v*g*t-v*n*s)*y;this._data[4]=-(c*s*x-c*t*w-r*b*x+r*d*w+v*b*t-v*d*s)*y;this._data[8]=(c*g*x-c*n*w-f*b*x+f*d*w+v*b*n-v*d*g)*y;this._data[12]=-(c*g*t-c*n*s-f*b*t+f*d*s+r*b*n-r*d*g)*y;this._data[1]=-(e*s*x-e*t*w-q*g*x+q*n*w+u*g*t-u*n*s)*y;this._data[5]=(a*s*x-a*t*w-q*b*x+q*d*w+u*b*t-u*d*s)*y;this._data[9]=-(a*g*x-
a*n*w-e*b*x+e*d*w+u*b*n-u*d*g)*y;this._data[13]=(a*g*t-a*n*s-e*b*t+e*d*s+q*b*n-q*d*g)*y;this._data[2]=(e*r*x-e*t*v-q*f*x+q*n*v+u*f*t-u*n*r)*y;this._data[6]=-(a*r*x-a*t*v-q*c*x+q*d*v+u*c*t-u*d*r)*y;this._data[10]=(a*f*x-a*n*v-e*c*x+e*d*v+u*c*n-u*d*f)*y;this._data[14]=-(a*f*t-a*n*r-e*c*t+e*d*r+q*c*n-q*d*f)*y;this._data[3]=-(e*r*w-e*s*v-q*f*w+q*g*v+u*f*s-u*g*r)*y;this._data[7]=(a*r*w-a*s*v-q*c*w+q*b*v+u*c*s-u*b*r)*y;this._data[11]=-(a*f*w-a*g*v-e*c*w+e*b*v+u*c*g-u*b*f)*y;this._data[15]=(a*f*s-a*g*r-
e*c*s+e*b*r+q*c*g-q*b*f)*y}});b.multiply=function(a,c){var d=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e=a.getElements(),f=c.getElements();d[0]=e[0]*f[0]+e[1]*f[4]+e[2]*f[8]+e[3]*f[12];d[1]=e[0]*f[1]+e[1]*f[5]+e[2]*f[9]+e[3]*f[13];d[2]=e[0]*f[2]+e[1]*f[6]+e[2]*f[10]+e[3]*f[14];d[3]=e[0]*f[3]+e[1]*f[7]+e[2]*f[11]+e[3]*f[15];d[4]=e[4]*f[0]+e[5]*f[4]+e[6]*f[8]+e[7]*f[12];d[5]=e[4]*f[1]+e[5]*f[5]+e[6]*f[9]+e[7]*f[13];d[6]=e[4]*f[2]+e[5]*f[6]+e[6]*f[10]+e[7]*f[14];d[7]=e[4]*f[3]+e[5]*f[7]+e[6]*f[11]+e[7]*f[15];
d[8]=e[8]*f[0]+e[9]*f[4]+e[10]*f[8]+e[11]*f[12];d[9]=e[8]*f[1]+e[9]*f[5]+e[10]*f[9]+e[11]*f[13];d[10]=e[8]*f[2]+e[9]*f[6]+e[10]*f[10]+e[11]*f[14];d[11]=e[8]*f[3]+e[9]*f[7]+e[10]*f[11]+e[11]*f[15];d[12]=e[12]*f[0]+e[13]*f[4]+e[14]*f[8]+e[15]*f[12];d[13]=e[12]*f[1]+e[13]*f[5]+e[14]*f[9]+e[15]*f[13];d[14]=e[12]*f[2]+e[13]*f[6]+e[14]*f[10]+e[15]*f[14];d[15]=e[12]*f[3]+e[13]*f[7]+e[14]*f[11]+e[15]*f[15];e=new b;e.setElements(d);return e};b.createScale=function(a,c,d){1===arguments.length&&(d=c=a);var e=
new b;e.setElements([a,0,0,0,0,c,0,0,0,0,d,0,0,0,0,1]);return e};b.createXRotation=function(a){var c=new b,d=Math.cos(a);a=Math.sin(a);c.setElements([1,0,0,0,0,d,a,0,0,-a,d,0,0,0,0,1]);return c};b.createYRotation=function(a){var c=new b,d=Math.cos(a);a=Math.sin(a);c.setElements([d,0,-a,0,0,1,0,0,a,0,d,0,0,0,0,1]);return c};b.createZRotation=function(a){var c=new b,d=Math.cos(a);a=Math.sin(a);c.setElements([d,a,0,0,-a,d,0,0,0,0,1,0,0,0,0,1]);return c};b.rot_createTensorProduct=function(a,c){var d=
[a.getX()*c.getX(),a.getY()*c.getX(),a.getZ()*c.getX(),0,a.getX()*c.getY(),a.getY()*c.getY(),a.getZ()*c.getY(),0,a.getX()*c.getZ(),a.getY()*c.getZ(),a.getZ()*c.getZ(),0,0,0,0,1],e=new b;e.setElements(d);return e};b.rot_createSkewSymmetric=function(a){a=[0,a.getZ(),-a.getY(),0,-a.getZ(),0,a.getX(),0,a.getY(),-a.getX(),0,0,0,0,0,1];var c=new b;c.setElements(a);return c};b.rot_multiply=function(a,c){var d=c.getElements(),e=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],f,g;for(f=0;4>f;f+=1)for(g=0;4>g;g+=1){var p=
4*g+f;e[p]=3>f&&3>g?a*d[p]:d[p]}e[15]=1;d=new b;d.setElements(e);return d};b.rot_add=function(a,c,d){a=a.getElements();c=c.getElements();var e=d.getElements();d=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];var f,g;for(f=0;4>f;f+=1)for(g=0;4>g;g+=1){var p=4*g+f;d[p]=3>f&&3>g?a[p]+c[p]+e[p]:a[p]}d[15]=1;a=new b;a.setElements(d);return a};b.createRotation=function(a,c){var d=a.getX(),e=a.getY(),g=a.getZ(),m=d*d+e*e+g*g;if(1E-10>m)return new b;m=1/Math.sqrt(m);e=new f(d*m,e*m,g*m);m=Math.cos(c);g=Math.sin(c);d=
b.rot_multiply(m,new b);m=b.rot_multiply(1-m,b.rot_createTensorProduct(e,e));e=b.rot_multiply(g,b.rot_createSkewSymmetric(e));return b.rot_add(d,m,e)};b.createTranslation=function(a,c,d){var e=new b;e.setElements([1,0,0,0,0,1,0,0,0,0,1,0,a,c,d,1]);return e};b.createFrustum=function(a,c,d,e,f,g){if(a>=c||d>=e||f>=g)throw"InvalidBoundsException";a=[2*f/(c-a),0,0,0,0,2*f/(e-d),0,0,(c+a)/(c-a),(e+d)/(e-d),-(g+f)/(g-f),-1,0,0,-2*g*f/(g-f),0];c=new b;c.setElements(a);return c};b.createOrtho=function(a,
c,d,e,f,g){var p=new b,n=c-a,q=e-d,r=g-f;p.setElements([2/n,0,0,0,0,2/q,0,0,0,0,-2/r,0,-(c+a)/n,-(e+d)/q,-(g+f)/r,1]);return p};b.compare=function(a,c,b){var d=a.getElements(),e=c.getElements();if(a.length!==c.length)return!1;for(a=0;a<d.length;a+=1)if(Math.abs(d[a]-e[a])/Math.max(Math.abs(d[a]),Math.abs(e[a]),1)>b)return!1;return!0};b.adjustOrthoNearFar=function(a,c){var b,d=c;b=Math.max(0,0.98*a);var e=b+1E3;return[b,0>=d?e:1.02*d]};b.adjustPerspNearFar=function(a,c){var b=a,d=c,d=0>d?100:1.02*
d;0.01>b?100<d/0.01?(b=0.01,d=Math.min(d,1E4*b)):b=Math.max(b,d/100):(b*=0.98,d=Math.min(d,1E4*b));return[b,d]};b.clampProjectionMatrix=function(a,c,d){if(void 0!==a&&void 0!==a._data)if(1E-8>Math.abs(a._data[3])&&1E-8>Math.abs(a._data[7])&&1E-8>Math.abs(a._data[11]))c=b.adjustOrthoNearFar(c,d),a._data[10]=-2/(c[1]-c[0]),a._data[14]=-1*(c[1]+c[0])/(c[1]-c[0]);else{d=b.adjustPerspNearFar(c,d);c=(-d[0]*a._data[10]+a._data[14])/(-d[0]*a._data[11]+a._data[15]);var e=(-d[1]*a._data[10]+a._data[14])/(-d[1]*
a._data[11]+a._data[15]);d=Math.abs(2/(c-e));c=-(c+e)/2;c=b.multiply(b.createScale(1,1,d),b.createTranslation(0,0,d*c));a.setElements(c.times(a).getElements())}return a};b.getFrustum=function(a){if(0!==a._data[3]||0!==a._data[7]||-1!==a._data[11]||0!==a._data[15])return!1;var c=a._data[14]/(a._data[10]-1);return[c*(a._data[8]-1)/a._data[0],c*(1+a._data[8])/a._data[0],c*(1+a._data[9])/a._data[5],c*(a._data[9]-1)/a._data[5],c,a._data[14]/(1+a._data[10])]};b.getPerspective=function(a){a=b.getFrustum(a);
return!1===a?!1:[180*(Math.atan(a[2]/a[4])-Math.atan(a[3]/a[4]))/Math.PI,(a[1]-a[0])/(a[2]-a[3]),a[4],a[5]]};return b})},"graphics/MWSG/Point3":function(){define(["dojo/_base/declare"],function(g){var f=g([],{constructor:function(e,d,b){void 0===e?this._z=this._y=this._x=0:(this._x=e,this._y=d,this._z=b)},getX:function(){return this._x},getY:function(){return this._y},getZ:function(){return this._z},getW:function(){return 1},distance:function(e){var d=this._x-e._x,b=this._y-e._y;e=this._z-e._z;return Math.sqrt(d*
d+b*b+e*e)},length:function(){void 0===this._length&&(this._length=Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z));return this._length},normalize:function(){var e=this.length();return 0!==e?new f(this.getX()/e,this.getY()/e,this.getZ()/e):new f(0,0,0)},dotProduct:function(e){return this._x*e._x+this._y*e._y+this._z*e._z},scalarMult:function(e){this._x*=e;this._y*=e;this._z*=e},isSameAs:function(e){return this._x===e.getX()&&this._y===e.getY()&&this._z===e.getZ()},toString:function(){var e;
e="["+this._x;e=e+", "+this._y;e+=", ";e+=this._z;return e+="]"}});return f})},"graphics/MWSG/Point4":function(){define(["dojo/_base/declare","graphics/MWSG/Point3"],function(g,f){var e=g([],{constructor:function(d,b,a,c){void 0===d?(this._z=this._y=this._x=0,this._w=1):d instanceof f?(this._x=d.getX(),this._y=d.getY(),this._z=d.getZ(),this._w=1):(this._x=d,this._y=b,this._z=a,this._w=void 0===c?1:c)},getX:function(){return this._x},getY:function(){return this._y},getZ:function(){return this._z},
getW:function(){return this._w},setX:function(d){this._x=d},setY:function(d){this._y=d},setZ:function(d){this._z=d},setW:function(d){this._w=d},toString:function(){var d;d="["+this._x;d=d+", "+this._y;d+=", ";d+=this._z;d+=", ";d+=this._w;return d+="]"},project:function(){return new f(this._x/this._w,this._y/this._w,this._z/this._w)},calculateOutcodes:function(d){var b=0;this._x<-this._w&&(b+=1);this._x>this._w&&(b+=2);this._y<-this._w&&(b+=4);this._y>this._w&&(b+=8);this._z<-this._w&&(b+=16);this._z>
this._w&&(b+=32);if(void 0!==d){var a;for(a=0;a<d.length;a+=1)0<d[a].distance(new f(this._x,this._y,this._z))&&(b+=1<<6+a)}return b}});e.outCodeForPlane=function(d){return 1<<d};e.ClipPlanes={XMIN:0,XMAX:1,YMIN:2,YMAX:3,ZMIN:4,ZMAX:5,USER:6};e.OutCodes={OUT_XMIN:1<<e.ClipPlanes.XMIN,OUT_XMAX:1<<e.ClipPlanes.XMAX,OUT_YMIN:1<<e.ClipPlanes.YMIN,OUT_YMAX:1<<e.ClipPlanes.YMAX,OUT_ZMIN:1<<e.ClipPlanes.ZMIN,OUT_ZMAX:1<<e.ClipPlanes.ZMAX};return e})},"graphics/system/FontMap":function(){function g(){var f=
window.navigator.platform,e="";f&&(f.search("/^win/i")?e="windows":f.search("/^Linux/i")||f.search("/X11/")?e="linux":f.search("/^mac/i")&&(e="mac"));return e}define(["graphics/system/detail/FontUtils"],function(f){var e=null;return{getFontMap:function(){null===e&&(e=this.createFontMap());return e},createFontMap:function(){for(var d=document.createElement("canvas").getContext("2d"),b={},a=f.measureFont(d,"sans-serif"),c=f.measureFont(d,"serif"),e=f.measureFont(d,"monospace"),k=f.getStandardFonts(g()),
l=k.length,m=0;m<l;m++){var p=k[m],n=f.measureFont(d,p+", sans-serif"),q=f.measureFont(d,p+", serif"),r=f.measureFont(d,p+", monospace"),q=f.areMeasuresEqual(q,c),n=f.areMeasuresEqual(n,a),r=f.areMeasuresEqual(r,e);if(!q||!n||!r)q&&!b.serif&&(b.serif=p),n&&!b["sans-serif"]&&(b["sans-serif"]=p),r&&!b.monospace&&(b.monospace=p);if(b.hasOwnProperty("serif")&&b.hasOwnProperty("sans-serif")&&b.hasOwnProperty("monospace"))break}return b}}})},"graphics/system/detail/FontUtils":function(){define([],function(){return{measureFont:function(g,
f){g.font="100pt "+f;return g.measureText("mmmmmmmmmmmlllllggggghhhhh1234567890")},areMeasuresEqual:function(g,f){var e=g.width===f.width;e&&(g.fontBoundingBoxAscent&&f.fontBoundingBoxAscent)&&(e=e&&g.fontBoundingBoxAscent===f.fontBoundingBoxAscent);e&&(g.fontBoundingBoxDescent&&f.fontBoundingBoxDescent)&&(e=e&&g.fontBoundingBoxDescent===f.fontBoundingBoxDescent);return e},getStandardFonts:function(g){var f=this.getUniversalFonts(),e=[];switch(g){case "windows":e=this.getWindowsFonts();break;case "linux":e=
this.getLinuxFonts();break;case "mac":e=this.getMacFonts();break;default:e=this.getWindowsFonts(),e=e.concat(this.getLinuxFonts()),e=e.concat(this.getMacFonts())}return f.concat(e)},getUniversalFonts:function(){return"Arial;Times New Roman;Arial Black;Courier New;Verdana;Comic Sans MS;Courier;Trebuchet MS;Georgia;Impact;Arial Narrow;Helvetica;Times;Terminal".split(";")},getWindowsFonts:function(){return"Tahoma;Century Gothic;MS Sans Serif;Lucida Console;Garamond;Lucida Sans Unicode;Bookman Old Style;Book Antiqua;Microsoft Sans Serif;Palatino Linotype;Monotype Corsiva;Haettenschweiler;Modern;Franklin Gothic Medium;Script;Consolas".split(";")},
getMacFonts:function(){return"Geneva;Monaco;Skia;Apple Chancery;Hoefler Text;Optima;Futura;Lucida Grande;Helvetica Neue;Herculanum;Papyrus;Baskerville;Gill Sans;Didot;Arial Rounded MT Bold;Brush Script MT;Zapfino;Copperplate;Marker Felt;American Typewriter;Big Caslon;y.n.w.u.a.y;Zapf Humanist 601 Demi BT;Zapf Humanist 601 Ultra BT;SWF!T_v01;UniversS 45 Light;UniversS 47 Condensed Light;UniversS 55 Roman;UniversS Euro 45 Light;SWF!T_v02;A.C.M.E. Secret Agent;Geometric Slabserif 703 Extra Bold BT;Humanist 777 Black BT;Humanist 777 Light BT;Alpha Silouettes 3;Alpha-Silouettes 2;Business/Industrial Regular;Cochin;ESRI Environmental \x26 Icons;ESRI Oil, Gas, \x26 Water;ESRI Transportation \x26 Civic;ESRI Transportation \x26 Municipal;Garamond Narrow Bold:001.022;Garamond Narrow Italic:001.022;Garamond Narrow Plain:001.022;German Blackletters, 15th c.;hooge 05_54;Humanist 521 Extra Bold BT;Humanist 521 Light BT;Humanist 521 Ultra Bold BT;Humanist 777 BT;Chicago;Osaka;Palatino;Charcoal;Andale Mono;New York;Univers 45 Light;Univers 57 Condensed;Helvetica 35 Thin;Helvetica 45 Light;Helvetica 55 Roman;Helvetica 65 Medium;Helvetica 95 Black;Gothic 13;Helvetica 85 Heavy;Gadget;Warren 1;week (sRB);Zartz!;Trade Gothic Bold Condensed No.20;Trade Gothic Condensed No.18;Aldine 401 BT;hooge 05_53;Orator 10 Pitch BT;Orator 15 Pitch BT;Aldine 721 BT;Aldine 721 Light BT;Geometric Slabserif 703 Bold BT;Hemi Head 426;Misbehavin';Papyrus LET Plain:1.0;Scriptina - Alternates;Broken 15;Day Roman - Expert;Helvetica 25 Ultra Light;Helvetica 75 Bold Outline;L'Elf Noir du Mal Normal;Techno;Textile;Capitals;Sand".split(";")},
getLinuxFonts:function(){return"Utopia;Lucidatypewriter;New Century Schoolbook;Lucida;Lucidabright;Charter;Fixed;Nimbus Mono L;Nimbus Roman No9 L;Nimbus Sans L;Century Schoolbook L;ClearlyU;Helvetica-Narrow-BoldOblique".split(";")}}})},"graphics/system/EnvironmentData":function(){define(["dojo/_base/declare","graphics/mixins/PlainObjectSerializable"],function(g,f){return g([f],{DeviceDPI:0,FontNameMap:{},RendererSupport:{},GLInfo:{},constructor:function(e,d,b,a){this.DeviceDPI=e;this.FontNameMap=
d;this.RendererSupport=b;this.GLInfo=a},toPlainObject:function(){var e={},d;for(d in this.RendererSupport)this.RendererSupport.hasOwnProperty(d)&&(e[d]=this.RendererSupport[d].toPlainObject());return{DeviceDPI:this.DeviceDPI,FontNameMap:this.FontNameMap,RendererSupport:e,GLInfo:this.varToPlainObject(this.GLInfo)}}})})},"graphics/services/PixelScaleMonitoring":function(){define(["dojo/_base/declare","dojo/Evented"],function(g,f){var e=g([f],{_running:!1,_devicePixelRatio:1,_timerID:null,_windowInterface:window,
startTimer:function(){this._devicePixelRatio=this._windowInterface.devicePixelRatio;this._timerID=this._windowInterface.setInterval(function(){var d=this._windowInterface.devicePixelRatio;this._devicePixelRatio!==d&&(this._devicePixelRatio=d,this.emit("pixelScaleChanged",{}))}.bind(this),100);this._running=!0},stopTimer:function(){this._windowInterface.clearInterval(this._timerID);this._running=!1}});return{_pixelScaleMonitorHelper:new e,_numSubscribers:0,subscribe:function(d){!1===this._pixelScaleMonitorHelper._running&&
this._pixelScaleMonitorHelper.startTimer();this._numSubscribers++;return this._pixelScaleMonitorHelper.on("pixelScaleChanged",d)},unsubscribe:function(d){this._numSubscribers--;d.remove();0===this._numSubscribers&&this._pixelScaleMonitorHelper.stopTimer()},reset:function(){this._pixelScaleMonitorHelper=new e;this._numSubscribers=0}}})},"graphics/mixins/EventEmitter":function(){define(["dojo/_base/declare","dojo/Evented"],function(g,f){return g(null,{_knownEvents:null,_evented:null,constructor:function(){this._knownEvents=
[];this._evented=new f},_defineEvent:function(e){this._knownEvents[e]=1},emitEvent:function(e,d){if(this._knownEvents.hasOwnProperty(e))this._evented.emit(e,d);else throw Error("emitEvent: event '"+e+"' undefined");},onEvent:function(e,d){if(this._knownEvents.hasOwnProperty(e))return this._evented.on(e,d);throw Error("onEvent: event '"+e+"' undefined");}})})},"graphics/MWSG/CanvasACTResponder":function(){define(["dijit/Destroyable","dojo/_base/declare","graphics/services/MessageServiceProxy","graphics/services/TestUtils"],
function(g,f,e,d){return f([g],{_MessageServiceProxy:null,constructor:function(b){this._MessageServiceProxy=new e(b.MessageService);this.own(this._MessageServiceProxy)},update:function(b){this._MessageServiceProxy.publish(b.returnChannel,b)}})})},"graphics/services/TestUtils":function(){define(["dojo/_base/declare","mw-messageservice/MessageService"],function(g,f){var e={start:function(){f.subscribe("/test/JavascriptThreadBlockingService",this._pubsubCallback.bind(this))},_pubsubCallback:function(d){d=
d.data.millisecondsToBlockJavascript;var b=new Date,a=null;do a=new Date;while(a-b<d)}};e.start();return e})},"graphics/SceneWidgets/SceneView":function(){define("dijit/Destroyable dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/dom-style dojo/on dojo/Deferred graphics/MWSG/json_scenetree graphics/axes/SceneTreeAxesControl graphics/axes/AxesExternalInterface dijit/_WidgetBase graphics/mixins/EventEmitter graphics/MWSG/CommandProcessor graphics/MWSG/Enum graphics/MWSG/Utilities graphics/MWSG/TextUtils dijit/_TemplatedMixin dojo/text!./templates/SceneView.html".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u){return f([m,t,g,p],{baseClass:"SceneView",canvasHeight:420,canvasWidth:560,templateString:u,_SceneTree:null,_Controller:null,_Started:!1,_renderStatsEnabled:!1,constructor:function(a){if(a&&!a.Container)throw Error("Container argument must be passed to the SceneView Dijit constructor");this.container=a.Container;a.Container.containerNode&&(this.container=a.Container.containerNode);this._defineEvent("contextlost");this._defineEvent("act");this._defineEvent("cdata_notify");
this._defineEvent("graphicscomplete");this._defineEvent("renderstatistics");this._defineEvent("scenehit");this._defineEvent("buttondown");this._defineEvent("buttonup");this._defineEvent("buttonmotion");this._defineEvent("textextent");this._defineEvent("hitresult");this._defineEvent("exception");this._renderCompletePromise=null;this._fonts=[];this._TextUtils=s;a=this._commandProcessor=new n;a.onCmd("beginEdit",function(){this.resetAxesControls()}.bind(this));a.onCmd("endEdit",function(){this.initializeAxesControls()}.bind(this));
a.onCmd("collectRenderStats",function(a){this.setCollectRenderStatistics(a.flag)}.bind(this));a.onCmd("requestCData",function(a){a=this._getImageDataFromSceneTree();this._commandProcessor.lock("requestCData");a.then(function(a){this.emitEvent("cdata_notify",{data:a});this._commandProcessor.unlock("requestCData")}.bind(this))}.bind(this));a.onCmd("insertChild",function(a){this._SceneTree.insertChild(a.parent,a.child,a.index)}.bind(this));a.onCmd("replaceChild",function(a){this._SceneTree.replaceChild(a.parent,
a.oldchild,a.newchild)}.bind(this));a.onCmd("removeChild",function(a){this._SceneTree.removeChild(a.parent,a.child)}.bind(this));a.onCmd("reparentChildren",function(a){this._SceneTree.reparentChildren(a.oldparent,a.newparent)}.bind(this));a.onCmd("insertCamera",function(a){this._SceneTree.insertCamera(a.camera,a.cameraindex,a.depthsort)}.bind(this));a.onCmd("replaceCamera",function(a){this._SceneTree.replaceCamera(a.oldcamera,a.newcamera,a.depthsort)}.bind(this));a.onCmd("createPeer",function(a){this._SceneTree.insertPeer(a.peerCookie,
a.ownerCookie,a.peer)}.bind(this));a.onCmd("setRenderMode",function(a){this._SceneTree.setRenderer(a.mode,!1)}.bind(this));a.onCmd("setColor",function(a){this._SceneTree.setClearColor(a.color)}.bind(this));a.onCmd("destroyNodePeer",function(a){this._SceneTree.deletePeer(a.peerCookie)}.bind(this));a.onCmd("destroyAllNodePeers",function(a){this._SceneTree.destroyAllNodePeers()}.bind(this));a.onCmd("causeExpose",function(a){var b=a.actData;b&&void 0!==b.clientReceiveTS&&(b.clientReceiveTS=Date.now());
this._commandProcessor.lock("renderComplete");this._renderCompletePromise=new c;this._renderCompletePromise.then(function(){b&&(void 0!==b.clientSendTS&&(b.clientSendTS=Date.now()),this.emitEvent("act",{data:b}));this._commandProcessor.unlock("renderComplete")}.bind(this));this._SceneTree.causeExposeWhenReady()}.bind(this));a.onCmd("createAndRegisterFont",function(a){this._fonts[a.peerCookie]={name:a.name,size:a.size,weight:a.weight,angle:a.angle}}.bind(this));a.onCmd("releaseFont",function(a){delete this._fonts[a.peerCookie]}.bind(this));
a.onCmd("releaseAllFonts",function(a){this._fonts=[]}.bind(this));a.onCmd("setFont",function(a){this._SceneTree.setFont(a.peerCookie,this._fonts[a.font])}.bind(this));a.onCmd("hitTest",function(a){var c=this._SceneTree._renderer.getPixelScale(),c=this._SceneTree._renderer.getDrawViewport().height/c-a.y,c=this._SceneTree.hitTest(a.x,c),b=0;null!==c&&(b=c.getNode().ownerCookie);this.emitEvent("hitresult",{EventCookie:a.eventCookie,OwnerCookie:b})}.bind(this));a.onCmd("computeTextExtents",function(a){var c=
function(a,c){var b=c._TextUtils.calculateTextExtents(c._fonts[a.font],a.interpreter,a.string,a.horizontalalignment,a.verticalalignment);b.RequestID=a.requestID;c.emitEvent("textextent",b)};a.interpreter!==q.TextInterpreter.none?this._TextUtils.TexFontsPromise.then(function(){c(a,this)}.bind(this)):c(a,this)}.bind(this));this._axesControls={};this._axesExternalInterfaceList={}},postCreate:function(){this.inherited(arguments);b.set(this.domNode,"width","100%");b.set(this.domNode,"height","100%");this._SceneTree=
new h(this);this.own(this._SceneTree);a(this.domNode,"webglcontextlost",function(a){this.emitEvent("contextlost",{})}.bind(this));this._SceneTree.onEvent("exception",function(a){this.emitEvent("exception",a)}.bind(this));this._SceneTree.onEvent("rendercomplete",function(a){this.emitEvent("graphicscomplete",{});this._renderStatsEnabled&&(a=a.Statistics,a.UpdateTime=-1,a.TransparencyTestTime=-1,a.FontCount=-1,a.TransparencyCount=-1,a.GPUMemory=-1,this.emitEvent("renderstatistics",{Statistics:a}));if(a=
this._renderCompletePromise)this._renderCompletePromise=null,a.resolve()}.bind(this))},destroy:function(){this._Controller&&this._Controller.uninstall();this.inherited(arguments)},getContainerDimensions:function(a){var c=this.container;switch(a){case q.PixelUnitType.csspixel:a=1;break;case q.PixelUnitType.devicepixel:a=window.devicePixelRatio;break;default:throw Error("Argument 'units' must be defined");}var b={x:0,y:0,w:c.clientWidth*a,h:c.clientHeight*a};if(0===b.h||0===b.w)c=window.getComputedStyle(c),
b.w=parseInt(c.width)*a,b.h=parseInt(c.height)*a;return b},setDimensions:function(a,c){this.domNode.height=!isNaN(parseFloat(c))&&isFinite(c)?c:0;this.domNode.width=!isNaN(parseFloat(a))&&isFinite(a)?a:0},setDefaultDimensions:function(){var a=this.getContainerDimensions(q.PixelUnitType.devicepixel);this.setDimensions(a.w,a.h)},getImageDataURL:function(){return this._getImageDataFromSceneTree()},_getImageDataFromSceneTree:function(){return this._SceneTree.getCData()},_updateSize:function(){var a=this.getContainerDimensions(q.PixelUnitType.devicepixel),
c=this.domNode.height!==a.h||this.domNode.width!==a.w;this.setDimensions(a.w,a.h);return c},getCanvas:function(){this.setDefaultDimensions();return this.domNode},replaceCanvas:function(){var a=d.create("canvas",{width:"100%",height:"100%"});d.place(a,this.domNode,"replace");this.domNode=a},setSceneTree:function(a){this._SceneTree=a},getSceneTree:function(){return this._SceneTree},createSceneTree:function(){this.getSceneTree()},setController:function(a){this._Controller&&this._Controller.uninstall();
this._Controller=a;this._Controller.install(this)},getController:function(){return this._Controller},redraw:function(){!0===this._updateSize()&&this.draw()},draw:function(){this._SceneTree.draw()},getRenderer:function(){return this._SceneTree.getRenderer()},setRenderer:function(a){this._SceneTree.setRenderer(a,!1);this.draw()},setCollectRenderStatistics:function(a){this._SceneTree.setRequestEndFrame(a);this._renderStatsEnabled=a},processCmd:function(a){"createCanvas"===a.cmd?this._commandProcessor.initialize():
this._commandProcessor.processCmd(a)},setBinaryDataSink:function(a){this._SceneTree.setBinaryDataSink(a)},initializeAxesControls:function(){this._SceneTree._cameras&&this._SceneTree._cameras.forEach(function(a){void 0!==a.nodeinfo&&("axescamera"===a.nodeinfo.category&&void 0!==a.nodeinfo.owneraxes)&&(this._axesControls[a.nodeinfo.owneraxes]=new k(a))}.bind(this))},resetAxesControls:function(){Object.keys(this._axesControls).forEach(function(a){this._axesControls[a].reset()}.bind(this));this._axesControls=
{}},getAxesControl:function(a){var c=null;a?(c=this._axesControls[a])||(c=null):(a=Object.keys(this._axesControls),0<a.length&&(c=this._axesControls[a[0]]));return c},getAxesExternalInterface:function(a){var c=0;if(1===arguments.length){if(0<a)return null;c=a}void 0===this._axesExternalInterfaceList[c]&&(this._axesExternalInterfaceList[c]=new l(this));return this._axesExternalInterfaceList[c]},fireSceneHitEvent:function(a,c,b){this.emitEvent("scenehit",{Owner:c,Intersection:b,MouseData:a})},fireMouseDownEvent:function(a){this.emitEvent("buttondown",
{MouseData:a})},fireMouseUpEvent:function(a,c,b){this.emitEvent("buttonup",{Owner:c,Intersection:b,MouseData:a})},fireMouseMoveEvent:function(a,c,b){this.emitEvent("buttonmotion",{Owner:c,Intersection:b,MouseData:a})},createCloneDOMNode:function(){var a=e.clone(this.domNode);a.getContext("2d").drawImage(this.domNode,0,0);return a}})})},"graphics/MWSG/json_scenetree":function(){define("dijit/Destroyable dojo/_base/declare dojo/Deferred dojo/dom-construct dojo/promise/all graphics/MWSG/webgl_renderer graphics/MWSG/PickRenderPass graphics/MWSG/StateSet graphics/MWSG/draw_fcns graphics/MWSG/cull_fcns graphics/MWSG/create_fcns graphics/MWSG/traverse_fcns graphics/MWSG/dependency_fcns graphics/MWSG/RenderTimes graphics/MWSG/Enum graphics/MWSG/Utilities graphics/MWSG/PickResult graphics/MWSG/Picker graphics/MWSG/SceneTreeUtils graphics/mixins/EventEmitter graphics/MWSG/matrix4x4 graphics/MWSG/bounding_box_fcns".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x,y){return f([g,w],{constructor:function(a){this._server=a;if(!a)throw Error("SceneTree must be given a server.");this._canvas=a.getCanvas();this._cameras=[];this._peers={};this._clearColor=[240,240,240,240];this._renderTimes=new q;this._requestEndFrame=!1;this.DPI=s.FindDPI();this._nodeReadyPromises={};this._defineEvent("rendercomplete");this._defineEvent("exception");this._binaryDataSink=null;this._drawReadyPromise=(new e).resolve()},setBinaryDataSink:function(a){this._binaryDataSink=
a},getBinaryDataSink:function(){return this._binaryDataSink},hitTest:function(a,b){var d=this._renderer.getPixelScale(),e={x:0,y:0,width:Math.round(4*d),height:Math.round(4*d)};if(void 0===this._pickRenderPass||this._pickRenderPass.getPickViewSize()!==e)this._pickRenderPass=new c(e);a*=d;b=this._renderer.getDrawViewport().height-b*d;return this.pick(a,b)},_sendExceptionEvent:function(a){this.emitEvent("exception",{Message:a})},_lookupPeerNode:function(a,c){var b=this._peers[a];return!b?(this._sendExceptionEvent("Could not find node in peer tree during "+
c),null):b},insertChild:function(a,c,b){a=this._lookupPeerNode(a,"insertChild");c=this._lookupPeerNode(c,"insertChild");a&&c&&(a.hasOwnProperty("_children")||(a._children=[]),c.parent=a,a._children.splice(b,0,c))},replaceChild:function(a,c,b){a=this._lookupPeerNode(a,"replaceChild");c=this._lookupPeerNode(c,"replaceChild");b=this._lookupPeerNode(b,"replaceChild");if(a&&c&&b){var d=!1;if(a.hasOwnProperty("_children"))for(var e=a._children.length,f=0;f<e;f+=1)if(a._children[f]===c){b.parent=a;a._children[f]=
b;d=!0;break}d||this._sendExceptionEvent("Error in json_scenetree: Could not find node in replaceChild")}},removeChild:function(a,c){var b=this._lookupPeerNode(a,"removeChild"),d=this._lookupPeerNode(c,"removeChild");if(b&&d){var e=!1;b.hasOwnProperty("_children")&&(e=v.removeFromArray(b._children,d));d.parent=null;e||this._sendExceptionEvent("Error in json_scenetree: Could not find node in removeChild")}},reparentChildren:function(a,c){var b=this._lookupPeerNode(a,"reparentChildren"),d=this._lookupPeerNode(c,
"reparentChildren");if(b&&d&&b.hasOwnProperty("_children")&&0<b._children.length){for(var e=b._children.length,f=0;f<e;f+=1)b._children[f].parent=d;d._children=b._children;b._children=[]}},insertCamera:function(a,c,b){if(a=this._lookupPeerNode(a,"insertCamera"))a.depthsort=b,this._cameras.splice(c,0,a)},replaceCamera:function(a,c,b){a=this._lookupPeerNode(a,"replaceCamera");c=this._lookupPeerNode(c,"replaceCameara");if(a&&c){c.depthsort=b;b=!1;for(var d=this._cameras.length,e=0;e<d;e+=1)if(this._cameras[e]===
a){this._cameras[e]=c;b=!0;break}b||this._sendExceptionEvent("Error in json_scenetree: Could not find node in replaceCamera")}},insertPeer:function(a,c,b){b.clean=!1;b.cookie=a;var d=m[b.type];void 0!==d&&d(b,this);b.ownerCookie=c;b.draw_fcn=k[b.type];b.cull_fcn=l[b.type];b.traverse_fcn=p[b.type];b.dep_consumed_fcn=n.dep_consumed_fcns[b.type];b.dep_produced_fcn=n.dep_produced_fcns[b.type];b.compute_bounding_box=y[b.type];b.pick_fcn=this.getGraphicsPickingFunction();this._peers[a]=b},deletePeer:function(a){var c=
this._peers[a];if(c){"Camera"===c.type&&v.removeFromArray(this._cameras,c);var b=c.parent;b&&b.hasOwnProperty("_children")&&v.removeFromArray(b._children,c);void 0!==c.deleteFcn&&c.deleteFcn(c,this);this.removeWaitForNodeReady(a);delete this._peers[a]}},destroyAllNodePeers:function(){this._nodeReadyPromises={};this._peers={};this._cameras=[]},setFont:function(a,c){this._peers[a]._font=c},getGraphicsPickingFunction:function(){return function(a,c,b,d,e){c.apply_stateset(b);a.draw_fcn&&a.draw_fcn(a,
b,d,e)}},setClearColor:function(a){this._clearColor=a},setCanvas:function(a){this._canvas=a},_clearDrawCache:function(a){void 0!==a&&a.hasOwnProperty("drawCache")&&(a.drawCache=void 0,a.clean=!1);for(var c in a._children)a._children.hasOwnProperty(c)&&this._clearDrawCache(a._children[c])},_clearAllDrawCaches:function(){for(var a in this._cameras)this._cameras.hasOwnProperty(a)&&this._clearDrawCache(this._cameras[a])},setRenderer:function(c,b){if((c!==this._renderMode||b)&&this._canvas)this._renderer&&
(this._server.replaceCanvas(),this.setCanvas(this._server.getCanvas()),this._clearAllDrawCaches()),"opengl"===c?(this._renderer=new a(this._canvas),this._renderMode="opengl"):(this._renderer=new a(this._canvas),this._renderMode="painters")},getRenderer:function(){return this._renderMode},getPixelScale:function(){return window.devicePixelRatio},_preprocessCamera:function(a,c,b){var d=new h,e=a.traverse_fcn;e&&(b.removeAllLights(),a.hasOwnProperty("activelights")&&b.setActiveLights(a.activelights),
e(a,d,c,b.appendRenderNode,b))},makeImage:function(){return new Image},draw:function(){this._drawReadyPromise.isResolved()&&(this._drawReadyPromise=new e,b(this._nodeReadyPromises).then(function(){this._nodeReadyPromises={};this._renderer.setTraversalMode(r.RenderTraversalMode.draw);this._renderer.setDrawViewport(0,0,this._canvas.width,this._canvas.height);var a=this.calculateDependencies();this.drawImplementation(a)&&(this._drawReadyPromise.resolve(),this.fireRenderComplete(this._renderTimes,{DrawnCount:this._renderer._drawn_count,
TotalCount:this._renderer._drawn_count}))}.bind(this)))},pick:function(a,c){this._renderer.setTraversalMode(r.RenderTraversalMode.pick);var b=this.calculateDependencies();return this.pickImplementation(b,a,c)},calculateDependencies:function(){var a=r.Dependency.none,c=this._renderer.getViewport();if(void 0!==this._cachedCanvasWidth&&void 0!==this._cachedCanvasHeight){if(this._cachedCanvasWidth!==c.width||this._cachedCanvasHeight!==c.height)a|=r.Dependency.viewport}else a|=r.Dependency.viewport;this._cachedCanvasWidth=
c.width;this._cachedCanvasHeight=c.height;c=this.getPixelScale();void 0!==this._cachedPixelScale?this._cachedPixelScale!==c&&(a|=r.Dependency.screen_resolution):a|=r.Dependency.screen_resolution;this._cachedPixelScale=c;return a},_drawRenderList:function(a,c,b){for(var d in a)if(a.hasOwnProperty(d)){var e=a[d],f=e.node;e.stateset.apply_stateset(c);f.draw_fcn&&f.draw_fcn(f,c,null,b)}},drawImplementation:function(a){this.DPI=s.FindDPI();this._renderer.setDrawViewport(0,0,this._canvas.width,this._canvas.height);
var c=this.getPixelScale();this._renderer.setDPI(this.DPI*c);this._renderer.setPixelScale(c);this._renderTimes.reset();this._renderTimes.beginFrame();this._renderTimes.beginInit();this._renderer.beginDraw();if(!this._renderer.checkContext())return!1;this._renderTimes.endInit();this._renderTimes.beginClear();this._renderer.setClearColor(this._clearColor);this._renderer.clearDraw();this._renderTimes.endClear();if(void 0===this._cameras||null===this._cameras)return!0;for(c=0;c<this._cameras.length;++c){var b=
this._cameras[c];this._renderTimes.beginCull();this._Near=Infinity;this._Far=-Infinity;try{this._preprocessCamera(b,a,this._renderer)}catch(d){this._sendExceptionEvent("Error in web cull traversal: "+d);continue}finally{this._renderTimes.endCull()}this._renderTimes.beginDraw();this._renderer.beginDrawCamera();try{this._renderer.drawCamera(b,this._drawRenderList.bind(this))}catch(e){this._sendExceptionEvent("Error in web draw traversal: "+e)}finally{this._renderTimes.endDraw(),this._renderer.endDrawCamera()}}this._renderTimes.beginEndFrame();
this._renderer.endDraw(this._requestEndFrame);this._renderTimes.endEndFrame();this._renderTimes.endFrame();delete this._renderer._Near;delete this._renderer._Far;return!0},_createPicker:function(a,c,b,d,e){return new u(a,c,b,d,e)},_pickRenderList:function(a,c,b){var d;c=this._createPicker(a.length,c,b,this._renderer,this._pickRenderPass);for(d in a)a.hasOwnProperty(d)&&(b=a[d],c.pickNode(b.node,b.stateset,d));b=c.getHitInfo();d=b.hitIndex;var e=b.pickedPixelIndex;b=null;-1<d&&d<a.length&&(b=new t,
b.setTraversalIndex(d),b.setNode(a[d].node),a=c.findIntersectionPoint(a[d].node,a[d].stateset,e),b.setIntersectionPoint(a));return b},pickImplementation:function(a,c,b){if(!(void 0===this._cameras||null===this._cameras)&&this._renderer.checkContext()){var d=null,e=this._renderer.getPixelScale();this._renderer.setPickSize(4*e,4*e);this._renderer.setPickLocation(c,b);for(e=this._cameras.length-1;0<=e;e--){var f=this._cameras[e];try{this._preprocessCamera(f,a,this._renderer)}catch(g){this._sendExceptionEvent("Error in web pick cull traversal: "+
g);continue}try{this._renderer.setPlotBox(f.plotBox),d=this._pickRenderPass.draw(this._renderer.getWebGLContext(),this._pickRenderList.bind(this),c,b,f.depthsort,this._renderer.front_render_list,this._renderer.middle_opaque_render_list,this._renderer.middle_transparent_render_list,this._renderer.back_render_list),this._renderer.clearRenderLists()}catch(h){this._sendExceptionEvent("Error in web pick traversal: "+h)}if(null!==d)break}return d}},getCData:function(){var a=new e;this._drawReadyPromise.then(function(){var c=
{width:this._canvas.width,height:this._canvas.height,urlString:this._canvas.toDataURL()};a.resolve(c)}.bind(this));return a},setRequestEndFrame:function(a){this._requestEndFrame=a},causeExposeWhenReady:function(){this.draw()},addWaitForNodeReady:function(a,c){this._nodeReadyPromises[a]=c},removeWaitForNodeReady:function(a){this._nodeReadyPromises.hasOwnProperty(a)&&(this._nodeReadyPromises[a].cancel("node removed"),delete this._nodeReadyPromises[a])},fireRenderComplete:function(a,c){var b={Statistics:{TotalTime:a.getTotalTime(),
InitTime:a.getInitTime(),ClearTime:a.getClearTime(),CullTime:a.getCullTime(),DrawTime:a.getDrawTime(),EndFrameTime:a.getEndFrameTime(),DrawnCount:c.DrawnCount,TotalCount:c.TotalCount}};this.emitEvent("rendercomplete",b)}})})},"graphics/MWSG/webgl_renderer":function(){define("dojo/_base/declare graphics/system/GLUtils graphics/MWSG/Enum graphics/MWSG/matrix4x4 graphics/MWSG/Point3 graphics/MWSG/Point4 graphics/MWSG/shader/WebGLShaderFactory graphics/MWSG/shader/WebGLShaderVariables graphics/MWSG/SceneTreeUtils graphics/MWSG/Utilities graphics/MWSG/LineUtils graphics/MWSG/TextUtils graphics/MWSG/MarkerUtils graphics/MWSG/View graphics/MWSG/WideLineUtils graphics/MWSG/TypedArrayUtils graphics/MWSG/ShaderConfigFcns/DrawPassShaderConfigFcns graphics/MWSG/LightingUtils graphics/MWSG/transparency/DepthPeelerDrawer".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v){return g("graphics.MWSG.WebGLRenderer",[],{constructor:function(a){this._canvas=a;this.modelTransform=new d;this.modelInvTransform=new d;this.viewTransform=new d;this.viewInvTransform=new d;this.projectionMatrix=new d;this.projectionInvMatrix=new d;this.back_render_list=[];this.middle_opaque_render_list=[];this.middle_transparent_render_list=[];this.front_render_list=[];this.shouldRunTransparencyPass=!1;this._drawn_count=0;this._shader_list={};this.clipPlanes=
[];this.clipMode=e.ClipMode.none;this.scissorRectangle=[];this.plotBox=[];this._lights=[];this._activeLights=[];this._sceneAmbientLightColor=[];this._numLights=0;this.drawViewport={x:0,y:0,width:a.width,height:a.height};this.pickViewport={x:0,y:0,width:4,height:4};this.pickLocation={x:0,y:0};this.traversalMode=e.RenderTraversalMode.draw;this.DPI=l.FindDPI();this.platform=l.GetPlatform();this.GPUVendor=e.GPUVendor.Other;this.MAX_TEXT_DIM=4096;this._initContext()},addLight:function(a){a.style===e.LightStyle.ambient?
this._sceneAmbientLightColor=a.color:8>this._numLights&&(this._lights[this._numLights++]=a)},getLights:function(){return this._lights},setActiveLights:function(a){this._activeLights=a.slice()},getActiveLights:function(a){return this._activeLights},getSceneAmbientLightColor:function(){return this._sceneAmbientLightColor},removeAllLights:function(){this._lights=[];this._activeLights=[];this._numLights=0},setTraversalMode:function(a){this.traversalMode=a},checkContext:function(){return!(void 0===this._context||
null===this._context)},_initContext:function(){if(void 0===this._context){var a=f.createContext(this._canvas);if(this._context=a)a.checkGLError=function(){a=this;var c=a.getError();if(c!==a.NO_ERROR)throw c="GL Error: "+c,document.body.appendChild(document.createTextNode(c)),c;},this.GPUVendor=l.GetVendor(a),a.clearColor(1,1,1,1),a.clearDepth(1),a.enable(a.DEPTH_TEST),a.depthFunc(a.LEQUAL),a.checkGLError(),a.enable(a.BLEND),a.blendFunc(a.SRC_ALPHA,a.ONE_MINUS_SRC_ALPHA),a.frontFace(a.CW)}},beginDraw:function(){this._drawn_count=
0},beginDrawCamera:function(){},endDrawCamera:function(){this._drawn_count+=this.back_render_list.length+this.middle_opaque_render_list.length+this.middle_transparent_render_list.length+this.front_render_list.length;this.back_render_list=[];this.middle_opaque_render_list=[];this.middle_transparent_render_list=[];this.front_render_list=[];this.shouldRunTransparencyPass=!1},endDraw:function(a){var c=this._context;a&&c.finish()},getWebGLContext:function(){return this._context},setClearColor:function(a){this.clearColor=
a.slice(0);a=1/255;this.clearColor[0]*=a;this.clearColor[1]*=a;this.clearColor[2]*=a;this.clearColor[3]*=a},clearDraw:function(a){var c=this._context,b=this.getViewport();c.viewport(b.x,b.y,b.width,b.height);c.disable(c.SCISSOR_TEST);void 0!==a?c.clearColor(a[0],a[1],a[2],a[3]):c.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]);c.clear(c.COLOR_BUFFER_BIT|c.DEPTH_BUFFER_BIT)},clearDepth:function(){var a=this._context;a.clear(a.DEPTH_BUFFER_BIT)},addTexture1D:function(a,
c,b,d){d=a.createTexture();a.bindTexture(a.TEXTURE_2D,d);c=new Uint8Array(c);a.texImage2D(a.TEXTURE_2D,0,a.RGBA,b[1],1,0,a.RGBA,a.UNSIGNED_BYTE,c);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.NEAREST);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.NEAREST);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE);a.bindTexture(a.TEXTURE_2D,null);return d},_setAVCForDrawCache:function(a){a.AVC_uniLoc=[];a.viewportSizeLoc=
a.shader.getUniformLocation(h.ViewportSize.id);a.AVC_uniLoc.push(a.viewportSizeLoc);a.uPlotBox=a.shader.getUniformLocation(h.PlotBox.id);a.AVC_uniLoc.push(a.uPlotBox);a.uAVCOffset=a.shader.getUniformLocation(h.AVCOffset.id);a.AVC_uniLoc.push(a.uAVCOffset)},setAlignVertexCenters:function(a,c,b){if(a.hasOwnProperty("AVC_uniLoc")){var d=this._context;d.uniform2f(a.AVC_uniLoc[0],c.width,c.height);d.uniform4f(a.AVC_uniLoc[1],b.x0,b.y0,b.x1,b.y1);c=[0,0];this.GPUVendor===e.GPUVendor.Intel&&this.platform===
e.Platform.Windows&&(c=[-0.5,-0.5]);d.uniform2f(a.AVC_uniLoc[2],c[0],c[1])}},_applyMatrices:function(a){var c=this._context,b=this.computedMVPTransform(),d=a.getUniformLocation(h.MVPMatrix.id);c.uniformMatrix4fv(d,!1,b.getAsFloat32Array());a=a.getUniformLocation(h.MVPInverseMatrix.id);void 0!==a&&null!==a&&(d=this.getMVPInvTransform(),c.uniformMatrix4fv(a,!1,d.getAsFloat32Array()));return b},_applyClipPlanes:function(a){var c=this._context,b=[];a.uXMinClipPlaneLoc=a.getUniformLocation(h.xMinClipPlane.id);
b.push(a.uXMinClipPlaneLoc);a.uXMaxClipPlaneLoc=a.getUniformLocation(h.xMaxClipPlane.id);b.push(a.uXMaxClipPlaneLoc);a.uYMinClipPlaneLoc=a.getUniformLocation(h.yMinClipPlane.id);b.push(a.uYMinClipPlaneLoc);a.uYMaxClipPlaneLoc=a.getUniformLocation(h.yMaxClipPlane.id);b.push(a.uYMaxClipPlaneLoc);a.uZMinClipPlaneLoc=a.getUniformLocation(h.zMinClipPlane.id);b.push(a.uZMinClipPlaneLoc);a.uZMaxClipPlaneLoc=a.getUniformLocation(h.zMaxClipPlane.id);b.push(a.uZMaxClipPlaneLoc);if(0<this.clipPlanes.length){var d;
for(d=0;d<this.clipPlanes.length;d+=1){var e=this.clipPlanes[d];c.uniform4fv(b[d],s.createFloat32Array([e.getNormal().getX(),e.getNormal().getY(),e.getNormal().getZ(),e.getOffset()]))}}b=a.getUniformLocation(h.MVPInverseMatrix.id);d=this.getMVPInvTransform();c.uniformMatrix4fv(b,!1,d.getAsFloat32Array());b=this.getModelViewTransform();d=a.getUniformLocation(h.ModelViewMatrix.id);c.uniformMatrix4fv(d,!1,b.getAsFloat32Array());b=this.getProjectionMatrix();d=a.getUniformLocation(h.ProjectionMat.id);
c.uniformMatrix4fv(d,!1,b.getAsFloat32Array());b=this.getViewport();a=a.getUniformLocation(h.ViewportSize.id);c.uniform2fv(a,[b.width,b.height])},applyScissorRect:function(a){var c=this._context;a.uScissorRectLoc=a.getUniformLocation(h.ScissorRect.id);c.uniform4fv(a.uScissorRectLoc,this.scissorRectangle)},setModelTransform:function(a){delete this._mvp;this.modelTransform=a;this.modelInvTransform.setElements(this.modelTransform.getElements());this.modelInvTransform.invert()},getModelTransform:function(){return this.modelTransform},
setViewTransform:function(a){delete this._mvp;this.viewTransform=a;this.viewInvTransform.setElements(this.viewTransform.getElements());this.viewInvTransform.invert()},getViewTransform:function(){return this.viewTransform},getModelViewTransform:function(){return this.viewTransform.times(this.modelTransform)},computedMVPTransform:function(){if(!this._mvp){var a=this.getModelViewTransform();this._mvp=this.getProjectionMatrix().times(a)}return this._mvp},getModelViewInvTransform:function(){return this.modelInvTransform.times(this.viewInvTransform)},
getMVPInvTransform:function(){return this.modelInvTransform.times(this.viewInvTransform.times(this.projectionInvMatrix))},setProjectionMatrix:function(a){delete this._mvp;this.projectionMatrix=a;this.projectionInvMatrix.setElements(this.projectionMatrix.getElements());this.projectionInvMatrix.invert()},getProjectionMatrix:function(){return this.projectionMatrix},getProjectionInvMatrix:function(){return this.projectionInvMatrix},setDrawViewport:function(a,c,b,d){this.drawViewport={x:a,y:c,width:b,
height:d}},getDrawViewport:function(){return this.drawViewport},setPickSize:function(a,c){this.pickViewport={x:0,y:0,width:a,height:c}},setPlotBox:function(a){this.plotBox=a},getPickViewport:function(){return this.pickViewport},setPickLocation:function(a,c){this.pickLocation={x:a,y:c}},getPickLocation:function(){return this.pickLocation},getViewport:function(){return this.traversalMode===e.RenderTraversalMode.pick?this.pickViewport:this.drawViewport},getPickMatrix:function(){var a=this.getDrawViewport(),
c=this.getPickViewport(),b=this.getPickLocation(),c=d.createScale(a.width/c.width,a.height/c.height,1),e=a.width/2,a=a.height/2,b=d.createTranslation((e-b.x)/e,(a-b.y)/a,0);return c.times(b)},transformProjectionMatrixForPass:function(a){return this.traversalMode===e.RenderTraversalMode.pick?this.getPickMatrix().times(a):a},untransformProjectionMatrixForPass:function(a){if(this.traversalMode===e.RenderTraversalMode.pick){var c=this.getPickMatrix();c.invert();return c.times(a)}return a},setDPI:function(a){this.DPI=
a},getDPI:function(){return this.DPI},setPixelScale:function(a){this.pixelScale=a},getPixelScale:function(){return this.pixelScale},setDepthSort:function(a){var c=this._context;a?(c.enable(c.DEPTH_TEST),c.depthFunc(c.LEQUAL)):c.disable(c.DEPTH_TEST)},_clipUtil:function(a,c,b){a.clipMode===e.ClipMode.scissor?(a=a.scissorRectangle,c.enable(c.SCISSOR_TEST),c.scissor(a[0],a[1],a[2],a[3])):a.clipMode===e.ClipMode.planes?(c.disable(c.SCISSOR_TEST),this._applyClipPlanes(b)):c.disable(c.SCISSOR_TEST)},_setPickProperties:function(a,
c,b){c.use(a);var d=c.getUniformLocation(h.Pick.id),e=c.getUniformLocation(h.StoreScreenSpaceDepth.id);a.uniform1i(d,0);a.uniform1i(e,0);b&&(b.isFindIntersectionPointEnabled()?(a.uniform1i(e,1),b=this.getProjectionInvMatrix(),d=c.getUniformLocation(h.ProjectionInverseMatrix.id),a.uniformMatrix4fv(d,!1,b.getAsFloat32Array()),b=this.getProjectionMatrix(),c=c.getUniformLocation(h.ProjectionMat.id),a.uniformMatrix4fv(c,!1,b.getAsFloat32Array())):(a.uniform1i(d,1),c=c.getUniformLocation(h.PickColor.id),
b=b.getCurrentPickColor(),a.uniform4fv(c,this.convertUint8ColorsToFloat([b[0],b[1],b[2],255]))))},getLineCapsShaderConfig:function(a,c){var b={};b.lineWidth=a.lineWidth;b.isWideLines=1<b.lineWidth?!0:!1;b.useStippleShader=a.lineStyle!==e.LineStyle.solid;b.isLineLoop=a.isLineLoop;b.isTransparentObject=a.isTransparentObject;b.colorType=a.colorType;b.clipping=a.clipping;b.colorBinding=a.colorBinding;b.useShaderClipping=b.clipping&&this.clipMode===e.ClipMode.planes;b.needsFragCoordClipping=a.needsFragCoordClipping;
b.applyLighting=a.applyLighting;return c.getLineCapsOrJoinsShaderConfiguration(b,!0)},getLineJoinsShaderConfig:function(a,c){var b={};b.lineWidth=a.lineWidth;b.isWideLines=1<b.lineWidth?!0:!1;b.useStippleShader=a.lineStyle!==e.LineStyle.solid;b.isLineLoop=a.isLineLoop;b.isTransparentObject=a.isTransparentObject;b.colorType=a.colorType;b.colorBinding=a.colorBinding;b.clipping=a.clipping;b.alignVertexCenters=!1;b.useShaderClipping=b.clipping&&this.clipMode===e.ClipMode.planes;b.needsFragCoordClipping=
a.needsFragCoordClipping;b.applyLighting=a.applyLighting;return c.getLineCapsOrJoinsShaderConfiguration(b,!1)},getLineShaderConfig:function(a,c){var b={};void 0!==a&&void 0!==a.stripData?(b.isLineStrip=!0,b.isLineLoop=a.isLineLoop,b.useStippleShader=a.lineStyle!==e.LineStyle.solid,b.isLineLoop&&b.useStippleShader&&(a=m.convertLineLoopsToLineStrip(a),b.useStippleShader.isLineLoop=!1)):(b.isLineStrip=!1,b.useStippleShader=a.lineStyle!==e.LineStyle.solid);b.drawLineJoins=!1;b.lineWidth=a.lineWidth;b.isWideLines=
1<b.lineWidth?!0:!1;b.drawLineCaps=b.isWideLines&&a.lineCap!==e.LineCap.none;b.alignVertexCenters=!1===b.isWideLines?a.alignVertexCenters:!1;b.isTransparentObject=a.isTransparentObject;b.colorType=a.colorType;b.colorBinding=a.colorBinding;b.clipping=a.clipping;b.useShaderClipping=b.clipping&&this.clipMode===e.ClipMode.planes;b.needsFragCoordClipping=a.needsFragCoordClipping;b.applyLighting=a.applyLighting;return c.getLineShaderConfiguration(b)},makeLineDrawCache:function(a,c){if(void 0!==a&&void 0!==
a.stripData)return this.makeLineStripDrawCache(a,c);var b={isLineStrip:!1,drawLineJoins:!1},d=this._context;b.lineWidth=a.lineWidth;b.isWideLines=1<b.lineWidth?!0:!1;b.drawLineCaps=b.isWideLines&&a.lineCap!==e.LineCap.none;b.alignVertexCenters=!1===b.isWideLines?a.alignVertexCenters:!1;b.isTransparentObject=a.isTransparentObject;b.colorType=a.colorType;b.clipping=a.clipping;b.useStippleShader=a.lineStyle!==e.LineStyle.solid;b.useShaderClipping=b.clipping&&this.clipMode===e.ClipMode.planes;b.applyLighting=
a.applyLighting;b.shader=this._getShader(d,c);var f=b.shader;b.alignVertexCenters&&this._setAVCForDrawCache(b);b.stippleUniformLoc=f.getUniformLocation(h.StipplePattern.id);b.stippleCoordLoc=f.getAttributeLocation(h.StippleCoord.id);b.stipplePattern=m.makeLineStipple(a.lineStyle,b.lineWidth,this.getPixelScale());!0===b.isWideLines?(b.nVertices=2*(a.vertexData.length/3),b.vertexData=r.addWideLinePerVertexData(a.vertexData,3,2),b.unitDistPointData=r.addWideLineVertexUnitDistPointData(a.vertexData,3*
b.nVertices),b.lineWidthLoc=f.getUniformLocation(h.LineWidth.id),b.viewportSizeLoc=f.getUniformLocation(h.ViewportSize.id)):(b.nVertices=a.vertexData.length/3,b.vertexData=a.vertexData);this._addPositionToDrawCache(d,f,b,b.vertexData);if(a.colorType===e.ColorType.truecolor||a.colorType===e.ColorType.truecoloralpha){var g=this.convertUint8ColorsToFloat(a.colorData),k=a.colorBinding,l=[];if(k===e.Binding.primitive){var k=e.Binding.vertex,p=0,n=0,q=0;!0===b.isWideLines?(q=b.nVertices/4,l=s.createFloat32Array(2*
b.nVertices)):(q=b.nVertices/2,l=s.createFloat32Array(4*b.nVertices));var t;for(t=0;t<q;t+=1){var v=g[n++],P=g[n++],R=g[n++],S=g[n++];l[p++]=v;l[p++]=P;l[p++]=R;l[p++]=S;l[p++]=v;l[p++]=P;l[p++]=R;l[p++]=S}}else l=g;b.colorBinding=k;b.colorData=l;k===e.Binding.vertex?(b.colorLoc=f.getAttributeLocation(h.Color.id),!0===b.isWideLines&&(b.colorData=r.addWideLinePerVertexData(l,4,2)),b.colorBuffer=this._setupBuffer(d,b.colorLoc,b.colorData)):b.colorLoc=f.getUniformLocation(h.Color.id)}else b.colorType===
e.ColorType.texturemapped?this._add2DTextureToDrawCache(d,f,b,a.colorData,a.texture):b.colorType===e.ColorType.colormapped&&(b.colorData=r.addWideLinePerVertexData(a.colorData,1,2),this._add1DTextureToDrawCache(d,f,b,b.colorData,a.texture));!0===b.applyLighting&&(u.addMaterialProperties(b,a),g=u.processNormalsData(b,a.normalBinding,a.normalsData,e.PrimitiveType.line),b.normalsData=!0===b.isWideLines?r.addWideLinePerVertexData(g,3,2):g,b.normalsAttribLoc=f.getAttributeLocation(h.Normal.id),b.normalsBuffer=
this._setupBuffer(d,b.normalsAttribLoc,b.normalsData),u.addUniformLocations(b));return b},_bindTextureUnitWithSamplerLoc:function(a){var c=this._context;if(void 0===a.textureUnit)throw Error("Texture unit must be defined");c.activeTexture(a.textureUnit);c.bindTexture(c.TEXTURE_2D,a.texture);c.uniform1i(a.textureSamplerLoc,a.textureUnit-c.TEXTURE0)},drawLines:function(a,c){if(null!==a&&void 0!==a.stripData)this.drawLineStrip(a,c);else{var b=this._context,d=a.shader;d.use(b);var f=this._applyMatrices(d),
f=new q(f,b.canvas.width,b.canvas.height),g=this.getViewport();b.uniform2fv(a.viewportSizeLoc,[g.width,g.height]);this.fillUniformsCB&&this.fillUniformsCB(d,b);this._setPickProperties(b,d,c);if(void 0!==a.stippleCoordLoc&&(void 0===a.viewCache||!1===f.compare(a.viewCache)))g=m.calculateStippleCoordinates(a.nVertices,a.vertexData,a.stripData,f,a.isWideLines),a.stippleCoordsBuffer=this._setupBuffer(b,a.stippleCoordLoc,g),a.viewCache=f;this._clipUtil(this,b,d);!0===a.alignVertexCenters&&(f=this.getViewport(),
this.setAlignVertexCenters(a,f,{x0:this.plotBox[0],y0:this.plotBox[1],x1:this.plotBox[2],y1:this.plotBox[3]}));this._useAttribBuffer(b,a.posBuffer,a.posLoc,3,b.FLOAT);void 0!==a.stippleUniformLoc&&void 0!==a.stippleCoordLoc&&(this._useAttribBuffer(b,a.stippleCoordsBuffer,a.stippleCoordLoc,1,b.FLOAT),b.uniform4fv(a.stippleUniformLoc,a.stipplePattern));!0===a.isWideLines&&(a.unitDistPointLoc=d.getAttributeLocation(h.UnitDistPoint.id),a.unitDistPointBuffer=this._setupBuffer(b,a.unitDistPointLoc,a.unitDistPointData),
this._useAttribBuffer(b,a.unitDistPointBuffer,a.unitDistPointLoc,3,b.FLOAT),b.uniform1f(a.lineWidthLoc,a.lineWidth));a.colorType===e.ColorType.truecolor||a.colorType===e.ColorType.truecoloralpha?a.colorBinding===e.Binding.vertex?this._useAttribBuffer(b,a.colorBuffer,a.colorLoc,4,b.FLOAT):b.uniform4fv(a.colorLoc,a.colorData):a.colorType===e.ColorType.texturemapped?(this._useAttribBuffer(b,a.texCoordBuffer,a.texCoordLoc,2,b.FLOAT),this._bindTextureUnitWithSamplerLoc(a)):a.colorType===e.ColorType.colormapped&&
(this._useAttribBuffer(b,a.texCoordBuffer,a.texCoordLoc,1,b.FLOAT),this._bindTextureUnitWithSamplerLoc(a));!0===a.applyLighting&&(d=0,a.colorType===e.ColorType.texturemapped&&(d=1),u.loadDataToUniforms(b,this.getModelTransform(),this.getViewTransform(),a,this.getLights(),this.getActiveLights(),this.getSceneAmbientLightColor(),d),this._useAttribBuffer(b,a.normalsBuffer,a.normalsAttribLoc,3,b.FLOAT));if(!0===a.isWideLines)for(d=0;d<a.nVertices;d+=4)b.drawArrays(b.TRIANGLE_STRIP,d,4);else b.drawArrays(b.LINES,
0,a.nVertices)}},makeLineStripDrawCache:function(a,c){var b={isLineStrip:!0},d=this._context;b.isLineLoop=a.isLineLoop;b.useStippleShader=a.lineStyle!==e.LineStyle.solid;b.isLineLoop&&b.useStippleShader&&(a=m.convertLineLoopsToLineStrip(a),b.isLineLoop=!1);if(a.colorBinding===e.Binding.primitive)return b;b.lineWidth=a.lineWidth;b.isWideLines=1<b.lineWidth?!0:!1;b.drawLineJoins=b.isWideLines;b.drawLineCaps=b.isWideLines&&a.lineCap!==e.LineCap.none&&!1===b.isLineLoop;b.alignVertexCenters=!1===b.isWideLines?
a.alignVertexCenters:!1;b.isTransparentObject=a.isTransparentObject;b.colorType=a.colorType;b.clipping=a.clipping;b.useShaderClipping=b.clipping&&this.clipMode===e.ClipMode.planes;b.applyLighting=a.applyLighting;b.shader=this._getShader(d,c);var f=b.shader;b.alignVertexCenters&&this._setAVCForDrawCache(b);b.stippleUniformLoc=f.getUniformLocation(h.StipplePattern.id);b.stippleCoordLoc=f.getAttributeLocation(h.StippleCoord.id);b.stipplePattern=m.makeLineStipple(a.lineStyle,b.lineWidth,this.getPixelScale());
b.stripData=a.stripData;b.actualVertexDataLen=a.vertexData.length/3;!0===b.isWideLines?(b.vertexData=r.addWideLineStripPerVertexData(b.stripData,a.vertexData,3,3,b.isLineLoop),b.nVertices=b.vertexData.length/3,b.unitDistPointData=r.addWideLineStripVertexUnitDistPointData(b.stripData,a.vertexData,3*b.nVertices,b.isLineLoop),b.lineWidthLoc=f.getUniformLocation(h.LineWidth.id),b.viewportSizeLoc=f.getUniformLocation(h.ViewportSize.id)):(b.nVertices=a.vertexData.length/3,b.vertexData=a.vertexData);this._addPositionToDrawCache(d,
f,b,b.vertexData);a.colorType===e.ColorType.truecolor||a.colorType===e.ColorType.truecoloralpha?(b.colorBinding=a.colorBinding,b.colorData=this.convertUint8ColorsToFloat(a.colorData),b.colorBinding===e.Binding.vertex?(b.colorLoc=f.getAttributeLocation(h.Color.id),!0===b.isWideLines&&(b.colorData=r.addWideLineStripPerVertexData(b.stripData,b.colorData,4,3,b.isLineLoop)),b.colorBuffer=this._setupBuffer(d,b.colorLoc,b.colorData)):b.colorLoc=f.getUniformLocation(h.Color.id)):b.colorType===e.ColorType.texturemapped?
this._add2DTextureToDrawCache(d,f,b,a.colorData,a.texture):b.colorType===e.ColorType.colormapped&&(b.colorData=!0===b.isWideLines?r.addWideLineStripPerVertexData(b.stripData,a.colorData,1,3,b.isLineLoop):a.colorData,this._add1DTextureToDrawCache(d,f,b,b.colorData,a.texture));!0===b.isWideLines&&(b.wideLineStripDrawIndices=r.getWideLineStripDrawIndices(b),b.drawIndexBuffer=this._setupIndexBuffer(d,b.wideLineStripDrawIndices),b.drawIndexBufferLen=b.wideLineStripDrawIndices.length);if(!0===b.applyLighting){u.addMaterialProperties(b,
a);var g=u.processNormalsData(b,a.normalBinding,a.normalsData,e.PrimitiveType.line);b.normalsData=!0===b.isWideLines?r.addWideLineStripPerVertexData(b.stripData,g,3,3,b.isLineLoop):g;b.normalsAttribLoc=f.getAttributeLocation(h.Normal.id);b.normalsBuffer=this._setupBuffer(d,b.normalsAttribLoc,b.normalsData);u.addUniformLocations(b)}return b},drawLineStrip:function(a,c){var b=this._context,d=a.shader;d.use(b);var f=this._applyMatrices(d),f=new q(f,b.canvas.width,b.canvas.height),g=this.getViewport();
b.uniform2fv(a.viewportSizeLoc,[g.width,g.height]);this.fillUniformsCB&&this.fillUniformsCB(d,b);this._setPickProperties(b,d,c);if(void 0!==a.stippleCoordLoc&&(void 0===a.viewCache||!1===f.compare(a.viewCache)))g=m.calculateStippleCoordinates(a.nVertices,a.vertexData,a.stripData,f,a.isWideLines),a.stippleCoordsBuffer=this._setupBuffer(b,a.stippleCoordLoc,g),a.viewCache=f;this._clipUtil(this,b,d);!0===a.alignVertexCenters&&(f=this.getViewport(),this.setAlignVertexCenters(a,f,{x0:this.plotBox[0],y0:this.plotBox[1],
x1:this.plotBox[2],y1:this.plotBox[3]}));this._useAttribBuffer(b,a.posBuffer,a.posLoc,3,b.FLOAT);void 0!==a.stippleUniformLoc&&void 0!==a.stippleCoordLoc&&(this._useAttribBuffer(b,a.stippleCoordsBuffer,a.stippleCoordLoc,1,b.FLOAT),b.uniform4fv(a.stippleUniformLoc,a.stipplePattern));!0===a.isWideLines&&(a.unitDistPointLoc=d.getAttributeLocation(h.UnitDistPoint.id),a.unitDistPointBuffer=this._setupBuffer(b,a.unitDistPointLoc,a.unitDistPointData),this._useAttribBuffer(b,a.unitDistPointBuffer,a.unitDistPointLoc,
3,b.FLOAT),b.uniform1f(a.lineWidthLoc,a.lineWidth));a.colorType===e.ColorType.truecolor||a.colorType===e.ColorType.truecoloralpha?a.colorBinding===e.Binding.vertex?this._useAttribBuffer(b,a.colorBuffer,a.colorLoc,4,b.FLOAT):b.uniform4fv(a.colorLoc,a.colorData):a.colorType===e.ColorType.texturemapped?(this._useAttribBuffer(b,a.texCoordBuffer,a.texCoordLoc,2,b.FLOAT),this._bindTextureUnitWithSamplerLoc(a)):a.colorType===e.ColorType.colormapped&&(this._useAttribBuffer(b,a.texCoordBuffer,a.texCoordLoc,
1,b.FLOAT),this._bindTextureUnitWithSamplerLoc(a));!0===a.applyLighting&&(d=0,a.colorType===e.ColorType.texturemapped&&(d=1),u.loadDataToUniforms(b,this.getModelTransform(),this.getViewTransform(),a,this.getLights(),this.getActiveLights(),this.getSceneAmbientLightColor(),d),this._useAttribBuffer(b,a.normalsBuffer,a.normalsAttribLoc,3,b.FLOAT));if(!1===a.isWideLines){d=b.LINE_STRIP;!0===a.isLineLoop&&(d=b.LINE_LOOP);f=a.stripData[0];for(g=0;g<a.stripData.length-1;g+=1){var k=a.stripData[g+1];b.drawArrays(d,
f-1,k-f);f=k}}else{b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,a.drawIndexBuffer);for(d=0;d<a.drawIndexBufferLen;d+=6)b.drawElements(b.TRIANGLE_STRIP,6,b.UNSIGNED_SHORT,2*d);b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,null)}},makeLineJoinsDrawCache:function(a,c){var b={},d=this._context;if(a.colorBinding===e.Binding.primitive)return b;b.lineWidth=a.lineWidth;b.isWideLines=1<b.lineWidth?!0:!1;b.useStippleShader=a.lineStyle!==e.LineStyle.solid;b.isLineLoop=a.isLineLoop;b.isTransparentObject=a.isTransparentObject;b.colorType=
a.colorType;b.clipping=a.clipping;b.alignVertexCenters=!1;b.useShaderClipping=b.clipping&&this.clipMode===e.ClipMode.planes;b.applyLighting=a.applyLighting;b.shader=this._getShader(d,c);var f=b.shader,g=a.vertexData.length/3;b.joinStyleLoc=f.getUniformLocation(h.JoinStyle.id);b.segmentsPerJoinLoc=f.getUniformLocation(h.SegmentsPerJoin.id);b.lineWidthLoc=f.getUniformLocation(h.LineWidth.id);b.viewportSizeLoc=f.getUniformLocation(h.ViewportSize.id);b.lineJoin=a.lineJoin;b.numVerticesPerJoin=r.vertexCountPerJoin(b.lineJoin);
b.joinsVertexData=r.addWideLineStripJoinsVertexData(a.stripData,a.vertexData,g,b.numVerticesPerJoin,b.isLineLoop);b.actualVertexData=a.vertexData;b.stippleUniformLoc=f.getUniformLocation(h.StipplePattern.id);b.stippleCoordLoc=f.getAttributeLocation(h.StippleCoord.id);b.stipplePattern=m.makeLineStipple(a.lineStyle,b.lineWidth,this.getPixelScale());var k=r.addWideLineStripJoinsUnitVectorData(a.stripData,a.vertexData,g,b.numVerticesPerJoin,b.isLineLoop);b.joinsVertexIndices=k[0];b.joinsUnitDistPoints_Prev=
k[1];b.joinsUnitDistPoints_Next=k[2];this._addPositionToDrawCache(d,f,b,b.joinsVertexData);b.stripData=a.stripData;a.colorType===e.ColorType.truecolor||a.colorType===e.ColorType.truecoloralpha?(b.colorBinding=a.colorBinding,b.colorData=this.convertUint8ColorsToFloat(a.colorData),b.colorBinding===e.Binding.object?b.colorLoc=f.getUniformLocation(h.Color.id):(b.colorLoc=f.getAttributeLocation(h.Color.id),!0===b.isWideLines&&(b.colorData=r.addWideLineStripJoinsPerVertexColorData(a.stripData,b.colorData,
g,b.numVerticesPerJoin,4,b.isLineLoop)),b.colorBuffer=this._setupBuffer(d,b.colorLoc,b.colorData))):b.colorType===e.ColorType.texturemapped?this._add2DTextureToDrawCache(d,f,b,a.colorData,a.texture):b.colorType===e.ColorType.colormapped&&(b.colorData=r.addWideLineStripJoinsPerVertexColorData(a.stripData,a.colorData,g,b.numVerticesPerJoin,1,b.isLineLoop),this._add1DTextureToDrawCache(d,f,b,b.colorData,a.texture));!0===b.applyLighting&&(u.addMaterialProperties(b,a),k=u.processNormalsData(b,a.normalBinding,
a.normalsData,e.PrimitiveType.line),b.normalsData=!0===b.isWideLines?r.addWideLineStripJoinsVertexData(b.stripData,k,g,b.numVerticesPerJoin,b.isLineLoop):k,b.normalsAttribLoc=f.getAttributeLocation(h.Normal.id),b.normalsBuffer=this._setupBuffer(d,b.normalsAttribLoc,b.normalsData),u.addUniformLocations(b));return b},drawLineJoins:function(a,c){if(!0===a.isWideLines){var b=this._context,d=a.shader;d.use(b);var f=this._applyMatrices(d),f=new q(f,b.canvas.width,b.canvas.height);this._clipUtil(this,b,
d);var g=this.getViewport();b.uniform2fv(a.viewportSizeLoc,[g.width,g.height]);this.fillUniformsCB&&this.fillUniformsCB(d,b);this._setPickProperties(b,d,c);if(void 0!==a.stippleCoordLoc&&(void 0===a.viewCache||!1===f.compare(a.viewCache)))g=r.addLineJoinsStippleCoords(a.joinsVertexData.length/3,a.actualVertexData,a.stripData,a.numVerticesPerJoin,f),a.stippleCoordsBuffer=this._setupBuffer(b,a.stippleCoordLoc,g),a.viewCache=f;this._useAttribBuffer(b,a.posBuffer,a.posLoc,3,b.FLOAT);a.joinsVertexIndexLoc=
d.getAttributeLocation(h.VertexIndex.id);a.joinsVertexIndexBuffer=this._setupBuffer(b,a.joinsVertexIndexLoc,a.joinsVertexIndices);this._useAttribBuffer(b,a.joinsVertexIndexBuffer,a.joinsVertexIndexLoc,1,b.FLOAT);a.joinsUnitDistPointPrevLoc=d.getAttributeLocation(h.UnitDistPointPrev.id);a.joinsUnitDistPointPrevBuffer=this._setupBuffer(b,a.joinsUnitDistPointPrevLoc,a.joinsUnitDistPoints_Prev);this._useAttribBuffer(b,a.joinsUnitDistPointPrevBuffer,a.joinsUnitDistPointPrevLoc,3,b.FLOAT);a.joinsUnitDistPointNextLoc=
d.getAttributeLocation(h.UnitDistPointNext.id);a.joinsUnitDistPointNextBuffer=this._setupBuffer(b,a.joinsUnitDistPointNextLoc,a.joinsUnitDistPoints_Next);this._useAttribBuffer(b,a.joinsUnitDistPointNextBuffer,a.joinsUnitDistPointNextLoc,3,b.FLOAT);b.uniform1i(a.joinStyleLoc,a.lineJoin);b.uniform1i(a.segmentsPerJoinLoc,a.numVerticesPerJoin-2);b.uniform1f(a.lineWidthLoc,a.lineWidth);void 0!==a.stippleUniformLoc&&void 0!==a.stippleCoordLoc&&(this._useAttribBuffer(b,a.stippleCoordsBuffer,a.stippleCoordLoc,
1,b.FLOAT),b.uniform4fv(a.stippleUniformLoc,a.stipplePattern));a.colorType===e.ColorType.truecolor||a.colorType===e.ColorType.truecoloralpha?a.colorBinding===e.Binding.vertex?this._useAttribBuffer(b,a.colorBuffer,a.colorLoc,4,b.FLOAT):b.uniform4fv(a.colorLoc,a.colorData):a.colorType===e.ColorType.texturemapped?(this._useAttribBuffer(b,a.texCoordBuffer,a.texCoordLoc,2,b.FLOAT),this._bindTextureUnitWithSamplerLoc(a)):a.colorType===e.ColorType.colormapped&&(this._useAttribBuffer(b,a.texCoordBuffer,a.texCoordLoc,
1,b.FLOAT),this._bindTextureUnitWithSamplerLoc(a));for(d=0;d<a.joinsVertexData.length/3;d+=a.numVerticesPerJoin)b.drawArrays(b.TRIANGLE_FAN,d,a.numVerticesPerJoin)}},makeLineCapsDrawCache:function(a,c,b){var d={},f=this._context;d.lineWidth=a.lineWidth;d.isWideLines=1<d.lineWidth?!0:!1;d.useStippleShader=a.lineStyle!==e.LineStyle.solid;d.isLineLoop=a.isLineLoop;d.isForLineStrip=c;d.isTransparentObject=a.isTransparentObject;d.colorType=a.colorType;d.clipping=a.clipping;d.useShaderClipping=d.clipping&&
this.clipMode===e.ClipMode.planes;d.applyLighting=!1;d.shader=this._getShader(f,b);var g=d.shader;d.capStyleLoc=g.getUniformLocation(h.CapStyle.id);d.segmentsPerCapLoc=g.getUniformLocation(h.SegmentsPerCap.id);d.lineWidthLoc=g.getUniformLocation(h.LineWidth.id);d.viewportSizeLoc=g.getUniformLocation(h.ViewportSize.id);d.lineCap=a.lineCap;d.numVerticesPerCap=r.vertexCountPerCap(d.lineCap);if(!0===c)d.stripData=a.stripData,d.capsVertexData=r.addWideLineCapsVertexData(a.stripData,a.vertexData,d.numVerticesPerCap);
else{var k=a.vertexData.length/3;d.capsVertexData=s.createFloat32Array(3*k*d.numVerticesPerCap);for(b=0;b<k;b+=2){var l=r.addWideLineCapsVertexData([1,3],a.vertexData.slice(3*b,3*(b+2)),d.numVerticesPerCap);d.capsVertexData.set(l,3*b*d.numVerticesPerCap)}}d.actualVertexData=a.vertexData;d.stippleUniformLoc=g.getUniformLocation(h.StipplePattern.id);d.stippleCoordLoc=g.getAttributeLocation(h.StippleCoord.id);d.stipplePattern=m.makeLineStipple(a.lineStyle,d.lineWidth,this.getPixelScale());if(!0===c)b=
r.addWideLineCapsUnitVectorData(a.stripData,a.vertexData,d.numVerticesPerCap),d.capsVertexIndices=b[0],d.capsUnitDistPoints=b[1];else{k=a.vertexData.length/3;d.capsVertexIndices=s.createFloat32Array(k*d.numVerticesPerCap);d.capsUnitDistPoints=s.createFloat32Array(3*k*d.numVerticesPerCap);for(b=0;b<k;b+=2){var l=r.addWideLineCapsUnitVectorData([1,3],a.vertexData.slice(3*b,3*(b+2)),d.numVerticesPerCap),p=l[1];d.capsVertexIndices.set(l[0],b*d.numVerticesPerCap);d.capsUnitDistPoints.set(p,3*b*d.numVerticesPerCap)}}this._addPositionToDrawCache(f,
g,d,d.capsVertexData);if(a.colorType===e.ColorType.truecolor||a.colorType===e.ColorType.truecoloralpha)if(d.colorBinding=a.colorBinding,d.colorData=this.convertUint8ColorsToFloat(a.colorData),d.colorBinding===e.Binding.object)d.colorLoc=g.getUniformLocation(h.Color.id);else{d.colorLoc=g.getAttributeLocation(h.Color.id);if(!0===d.isWideLines)if(!0===c)d.colorData=r.addWideLineCapsPerVertexColorData(a.stripData,d.colorData,d.numVerticesPerCap,4);else{a=d.colorData.length/4;c=s.createFloat32Array(4*
2*a*d.numVerticesPerCap);for(b=0;b<a;b++)g=r.addWideLineCapsPerVertexColorData([1,3],d.colorData.slice(4*b,4*(b+1)),d.numVerticesPerCap,4),c.set(g,4*2*b*d.numVerticesPerCap);d.colorData=c}d.colorBuffer=this._setupBuffer(f,d.colorLoc,d.colorData)}else d.colorType===e.ColorType.texturemapped?this._add2DTextureToDrawCache(f,g,d,a.colorData,a.texture):d.colorType===e.ColorType.colormapped&&(d.colorData=r.addWideLineCapsPerVertexColorData(a.stripData,a.colorData,d.numVerticesPerCap,1),this._add1DTextureToDrawCache(f,
g,d,d.colorData,a.texture));return d},drawLineCaps:function(a,c){if(!0===a.isWideLines){var d=this._context,f=a.shader;f.use(d);var g=this._applyMatrices(f),k=new q(g,d.canvas.width,d.canvas.height),g=this.getViewport();d.uniform2fv(a.viewportSizeLoc,[g.width,g.height]);this.fillUniformsCB&&this.fillUniformsCB(f,d);this._setPickProperties(d,f,c);this._clipUtil(this,d,f);if(void 0!==a.stippleCoordLoc&&(void 0===a.viewCache||!1===k.compare(a.viewCache))){var l=null;if(!0===a.isForLineStrip)l=r.addLineCapsStippleCoords(a.stripData,
a.actualVertexData,a.numVerticesPerCap,k);else for(var g=a.actualVertexData.length/3,l=s.createFloat32Array(g*a.numVerticesPerCap),m=0;m<g;m+=2){var p=r.addLineCapsStippleCoords(void 0,a.actualVertexData.slice(3*m,3*(m+2)),a.numVerticesPerCap,k);l.set(p,m*a.numVerticesPerCap)}a.stippleCoordsBuffer=this._setupBuffer(d,a.stippleCoordLoc,l);a.viewCache=k}this._useAttribBuffer(d,a.posBuffer,a.posLoc,3,d.FLOAT);a.capsVertexIndexLoc=f.getAttributeLocation(h.VertexIndex.id);a.capsVertexIndexBuffer=this._setupBuffer(d,
a.capsVertexIndexLoc,a.capsVertexIndices);this._useAttribBuffer(d,a.capsVertexIndexBuffer,a.capsVertexIndexLoc,1,d.FLOAT);a.capsUnitDistPointLoc=f.getAttributeLocation(h.UnitDistPoint.id);a.capsUnitDistPointBuffer=this._setupBuffer(d,a.capsUnitDistPointLoc,a.capsUnitDistPoints);this._useAttribBuffer(d,a.capsUnitDistPointBuffer,a.capsUnitDistPointLoc,3,d.FLOAT);d.uniform1i(a.capStyleLoc,a.lineCap);d.uniform1i(a.segmentsPerCapLoc,a.numVerticesPerCap-2);d.uniform1f(a.lineWidthLoc,a.lineWidth);void 0!==
a.stippleUniformLoc&&void 0!==a.stippleCoordLoc&&(this._useAttribBuffer(d,a.stippleCoordsBuffer,a.stippleCoordLoc,1,d.FLOAT),d.uniform4fv(a.stippleUniformLoc,a.stipplePattern));a.colorType===e.ColorType.truecolor||a.colorType===e.ColorType.truecoloralpha?a.colorBinding===e.Binding.vertex?this._useAttribBuffer(d,a.colorBuffer,a.colorLoc,4,d.FLOAT):d.uniform4fv(a.colorLoc,a.colorData):a.colorType===e.ColorType.texturemapped?(this._useAttribBuffer(d,a.texCoordBuffer,a.texCoordLoc,2,d.FLOAT),this._bindTextureUnitWithSamplerLoc(a)):
a.colorType===e.ColorType.colormapped&&(this._useAttribBuffer(d,a.texCoordBuffer,a.texCoordLoc,1,d.FLOAT),this._bindTextureUnitWithSamplerLoc(a));if(!0===a.isForLineStrip)for(m=0;m<a.capsVertexData.length/3;m+=a.numVerticesPerCap)d.drawArrays(d.TRIANGLE_FAN,m,a.numVerticesPerCap);else{g=a.actualVertexData.length/3;for(m=0;m<g;m++){if(0<m&&m<g-1){if(f=new b(a.actualVertexData[3*m],a.actualVertexData[3*m+1],a.actualVertexData[3*m+2]),k=new b(a.actualVertexData[3*((m+1)%g)],a.actualVertexData[3*((m+
1)%g)+1],a.actualVertexData[3*((m+1)%g)+2]),!0===f.isSameAs(k))continue}else if(0===m&&(f=new b(a.actualVertexData[3*m],a.actualVertexData[3*m+1],a.actualVertexData[3*m+2]),k=new b(a.actualVertexData[3*(g-1)],a.actualVertexData[3*(g-1)+1],a.actualVertexData[3*(g-1)+2]),!0===f.isSameAs(k)))continue;d.drawArrays(d.TRIANGLE_FAN,m*a.numVerticesPerCap,a.numVerticesPerCap)}}}},getTriangleShaderConfig:function(a,c){var b={};b.isTransparentObject=a.isTransparentObject;b.colorType=a.colorType;b.colorBinding=
a.colorBinding;b.clipping=a.clipping;b.useShaderClipping=b.clipping&&this.clipMode===e.ClipMode.planes;b.needsFragCoordClipping=a.needsFragCoordClipping;b.applyLighting=a.applyLighting;b.twoSidedLighting=a.twoSidedLighting;return c.getTriangleShaderConfiguration(b)},makeTriangleDrawCache:function(a,c){if(void 0!==a&&void 0!==a.stripData)return this.makeTriangleStripDrawCache(a,c);var b={},d=this._context;b.isTransparentObject=a.isTransparentObject;b.colorType=a.colorType;b.clipping=a.clipping;b.colorBinding=
a.colorBinding;b.useShaderClipping=b.clipping&&this.clipMode===e.ClipMode.planes;b.applyLighting=a.applyLighting;b.twoSidedLighting=a.twoSidedLighting;b.shader=this._getShader(d,c);var f=b.shader;b.nVertices=a.vertexData.length/3;this._addPositionToDrawCache(d,f,b,a.vertexData);if(a.colorType===e.ColorType.truecolor||a.colorType===e.ColorType.truecoloralpha){var g=a.colorBinding,k=this.convertUint8ColorsToFloat(a.colorData),l=[];if(g===e.Binding.primitive){var g=e.Binding.vertex,l=s.createFloat32Array(4*
b.nVertices),m=0,p=0,n=b.nVertices/3,q;for(q=0;q<n;q+=1){var r=k[p++],t=k[p++],v=k[p++],S=k[p++];l[m++]=r;l[m++]=t;l[m++]=v;l[m++]=S;l[m++]=r;l[m++]=t;l[m++]=v;l[m++]=S;l[m++]=r;l[m++]=t;l[m++]=v;l[m++]=S}}else l=k;b.colorBinding=g;b.colorData=l;g===e.Binding.vertex?(b.colorLoc=f.getAttributeLocation(h.Color.id),b.colorBuffer=this._setupBuffer(d,b.colorLoc,b.colorData)):b.colorLoc=f.getUniformLocation(h.Color.id)}else b.colorType===e.ColorType.texturemapped?this._add2DTextureToDrawCache(d,f,b,a.colorData,
a.texture):b.colorType===e.ColorType.colormapped&&this._add1DTextureToDrawCache(d,f,b,a.colorData,a.texture);void 0!==a&&a.hasOwnProperty("faceOffsetBias")&&a.hasOwnProperty("faceOffsetFactor")?(b.polygonOffsetUnits=10*a.faceOffsetBias/1E-4,b.polygonOffsetFactor=a.faceOffsetFactor,b.polygonOffsetEnabled=!0):b.polygonOffsetEnabled=!1;!0===b.applyLighting&&(u.addMaterialProperties(b,a),b.normalsData=u.processNormalsData(b,a.normalBinding,a.normalsData,e.PrimitiveType.triangle),b.normalsAttribLoc=f.getAttributeLocation(h.Normal.id),
b.normalsBuffer=this._setupBuffer(d,b.normalsAttribLoc,b.normalsData),u.addUniformLocations(b));return b},drawTriangles:function(a,c){if(void 0!==a&&a.hasOwnProperty("stripData"))this.drawTriangleStrip(a,c);else{var b=this._context,d=a.shader;d.use(b);this._applyMatrices(d);this._clipUtil(this,b,d);a.polygonOffsetEnabled?(b.polygonOffset(a.polygonOffsetFactor,a.polygonOffsetUnits),b.enable(b.POLYGON_OFFSET_FILL)):b.disable(b.POLYGON_OFFSET_FILL);this.fillUniformsCB&&this.fillUniformsCB(d,b);this._setPickProperties(b,
d,c);this._useAttribBuffer(b,a.posBuffer,a.posLoc,3,b.FLOAT);a.colorType===e.ColorType.truecolor||a.colorType===e.ColorType.truecoloralpha?a.colorBinding===e.Binding.vertex?this._useAttribBuffer(b,a.colorBuffer,a.colorLoc,4,b.FLOAT):b.uniform4fv(a.colorLoc,a.colorData):a.colorType===e.ColorType.texturemapped?(this._useAttribBuffer(b,a.texCoordBuffer,a.texCoordLoc,2,b.FLOAT),this._bindTextureUnitWithSamplerLoc(a)):a.colorType===e.ColorType.colormapped&&(this._useAttribBuffer(b,a.texCoordBuffer,a.texCoordLoc,
1,b.FLOAT),this._bindTextureUnitWithSamplerLoc(a));!0===a.applyLighting&&(d=0,a.colorType===e.ColorType.texturemapped&&(d=1),u.loadDataToUniforms(b,this.getModelTransform(),this.getViewTransform(),a,this.getLights(),this.getActiveLights(),this.getSceneAmbientLightColor(),d),this._useAttribBuffer(b,a.normalsBuffer,a.normalsAttribLoc,3,b.FLOAT));b.drawArrays(b.TRIANGLES,0,a.nVertices)}},makeTriangleStripDrawCache:function(a,c){var b={},d=this._context;if(a.colorBinding===e.Binding.primitive)return b;
b.isTransparentObject=a.isTransparentObject;b.colorType=a.colorType;b.clipping=a.clipping;b.colorBinding=a.colorBinding;b.useShaderClipping=b.clipping&&this.clipMode===e.ClipMode.planes;b.applyLighting=a.applyLighting;b.twoSidedLighting=a.twoSidedLighting;b.shader=this._getShader(d,c);var f=b.shader;b.nVertices=a.vertexData.length/3;this._addPositionToDrawCache(d,f,b,a.vertexData);b.stripData=a.stripData;a.colorType===e.ColorType.truecolor||a.colorType===e.ColorType.truecoloralpha?(b.colorData=this.convertUint8ColorsToFloat(a.colorData),
a.colorBinding===e.Binding.object?b.colorLoc=f.getUniformLocation(h.Color.id):(b.colorLoc=f.getAttributeLocation(h.Color.id),b.colorBuffer=this._setupBuffer(d,b.colorLoc,b.colorData))):b.colorType===e.ColorType.texturemapped?this._add2DTextureToDrawCache(d,f,b,a.colorData,a.texture):b.colorType===e.ColorType.colormapped&&this._add1DTextureToDrawCache(d,f,b,a.colorData,a.texture);void 0!==a&&a.hasOwnProperty("faceOffsetBias")&&a.hasOwnProperty("faceOffsetFactor")?(b.polygonOffsetUnits=10*a.faceOffsetBias/
1E-4,b.polygonOffsetFactor=a.faceOffsetFactor,b.polygonOffsetEnabled=!0):b.polygonOffsetEnabled=!1;!0===b.applyLighting&&(u.addMaterialProperties(b,a),b.normalsData=u.processNormalsData(b,a.normalBinding,a.normalsData,e.PrimitiveType.triangle),b.normalsAttribLoc=f.getAttributeLocation(h.Normal.id),b.normalsBuffer=this._setupBuffer(d,b.normalsAttribLoc,b.normalsData),u.addUniformLocations(b));return b},drawTriangleStrip:function(a,c){var b=this._context,d=a.shader;d.use(b);this._applyMatrices(d);this._clipUtil(this,
b,d);a.polygonOffsetEnabled?(b.polygonOffset(a.polygonOffsetFactor,a.polygonOffsetUnits),b.enable(b.POLYGON_OFFSET_FILL)):b.disable(b.POLYGON_OFFSET_FILL);this.fillUniformsCB&&this.fillUniformsCB(d,b);this._setPickProperties(b,d,c);this._useAttribBuffer(b,a.posBuffer,a.posLoc,3,b.FLOAT);a.colorType===e.ColorType.truecolor||a.colorType===e.ColorType.truecoloralpha?a.colorBinding===e.Binding.vertex?this._useAttribBuffer(b,a.colorBuffer,a.colorLoc,4,b.FLOAT):b.uniform4fv(a.colorLoc,a.colorData):a.colorType===
e.ColorType.texturemapped?(this._useAttribBuffer(b,a.texCoordBuffer,a.texCoordLoc,2,b.FLOAT),this._bindTextureUnitWithSamplerLoc(a)):a.colorType===e.ColorType.colormapped&&(this._useAttribBuffer(b,a.texCoordBuffer,a.texCoordLoc,1,b.FLOAT),this._bindTextureUnitWithSamplerLoc(a));!0===a.applyLighting&&(d=0,a.colorType===e.ColorType.texturemapped&&(d=1),u.loadDataToUniforms(b,this.getModelTransform(),this.getViewTransform(),a,this.getLights(),this.getActiveLights(),this.getSceneAmbientLightColor(),d),
this._useAttribBuffer(b,a.normalsBuffer,a.normalsAttribLoc,3,b.FLOAT));var d=a.stripData[0],f;for(f=0;f<a.stripData.length-1;f+=1){var g=a.stripData[f+1];b.drawArrays(b.TRIANGLE_STRIP,d-1,g-d);d=g}},_makeTextBackgroundCache:function(a,c,b,d,e){var f={};b=p.makeTextBackgroundVertexArray(b,d,e,this.getViewport());d=s.createFloat32Array(8);for(e=0;e<d.length;e++)d[e]=0;this._addCoord2DOffsetToDrawCache(a,c,f,d);this._addCoord2DToDrawCache(a,c,f,b);return f},_makeTextEdgeCache:function(a,c,b,d,f,g,h,
k){var l={};b=p.makeTextEdgeVertexArray(b,d,f,this.getViewport(),g,h);l.numVertices=b.vertexArray.length/2;this._addCoord2DToDrawCache(a,c,l,b.vertexArray);d=s.createFloat32Array(b.vertexArray.length);for(f=0;f<d.length;f++)d[f]=0;this._addCoord2DOffsetToDrawCache(a,c,l,d);h!==e.LineStyle.solid&&(l.edgeStippleCoordsBuffer=this._setupBuffer(a,k,b.stippleCoords));return l},getTextBackgroundShaderConfig:function(a,c){var b=e.ClipMode.none;a.clipping&&(b=this.clipMode);return c.getScreenSpaceConstantColorShader(b,
!1,!1,!1)},getTextEdgeShaderConfig:function(a,c){var b=e.ClipMode.none;a.clipping&&(b=this.clipMode);return c.getScreenSpaceConstantColorShader(b,a.lineStyle!==e.LineStyle.solid,!1,!1)},getTextShaderConfig:function(a,c){var b=!1,d=e.ClipMode.none;a.clipping&&(d=this.clipMode,d===e.ClipMode.planes&&!a.anchorPointClipping&&(b=!0));return c.getScreenSpaceImageShader(d,b,!1)},makeTextDrawCache:function(c,b,d,f){var g={},k=this._context,l=this.getViewport();g.alignVertexCenters=!1;g.clipping=c.clipping;
g.anchorPointClipping=c.anchorPointClipping;b=this._getShader(k,b);g.shader=b;var n=c.vertexData.length/3;g.nVertices=n;g.txtCache=Array(n);g.anchorLoc=b.getUniformLocation(h.Anchor.id);g.viewportSizeLoc=b.getUniformLocation(h.ViewportSize.id);var q="rgba("+c.colorData[0]+","+c.colorData[1]+","+c.colorData[2]+","+c.colorData[3]/255+")";g.margin=c.margin;g.drawBackground=c.hasOwnProperty("background");g.drawBackground&&(g.backgroundCache=Array(n),g.backgroundColorUniformData=this.convertUint8ColorsToFloat(c.background),
d=this._getShader(k,d),g.backgroundShader=d,g.backgroundAnchorLoc=d.getUniformLocation(h.Anchor.id),g.backgroundColorLoc=d.getUniformLocation(h.Color.id),g.bgScaleLoc=d.getUniformLocation(h.Scale.id));g.drawEdge=c.hasOwnProperty("edgeColor");g.drawEdge&&(g.lineWidth=c.lineWidth,g.edgeCache=Array(n),g.edgeColorUniformData=this.convertUint8ColorsToFloat(c.edgeColor),g.lineStyle=c.lineStyle,f=this._getShader(k,f),g.lineStyle!==e.LineStyle.solid&&(g.edgeStippleUniformLoc=f.getUniformLocation(h.StipplePattern.id),
g.edgeStippleCoordLoc=f.getAttributeLocation(h.StippleCoord.id),g.edgeStipplePattern=m.makeLineStipple(c.lineStyle,g.lineWidth,this.getPixelScale())),g.edgeShader=f,g.edgeAnchorLoc=f.getUniformLocation(h.Anchor.id),g.edgeColorLoc=f.getUniformLocation(h.Color.id),g.edgeScaleLoc=f.getUniformLocation(h.Scale.id),g.edgeCoord2DOffsetLoc=f.getAttributeLocation(h.Coord2DOffset.id),d=s.createFloat32Array(8),function(a,c){for(var b=0;b<a.length;b++)a[b]=c}(d,0),this._addCoord2DToDrawCache(k,f,g,d));g.viewdependent=
!1;for(f=0;f<n;f+=1){d={};var r=1;if(1===n&&1<c.string.length)for(var t=1;t<c.string.length;t+=1)r+=1;var v=c.string.slice(f,f+r);if(function(a){var c=!0,b;for(b=0;b<a.length;b++)if(0!==a[b].length){c=!1;break}return c}(v))g.txtCache[f]=void 0;else{var t=3*f,u=c.vertexData,P=p.makeTextHandler(c.interpreter,v),r=this._makeTextBuffer(v,q,r,c,new a(u[t],u[t+1],u[t+2],1),P);P.destroy();if(null===r)g.txtCache[f]=void 0,g.viewdependent=!0;else if(!0===r.cropped&&(g.viewdependent=!0),d.textureData=r.textureData,
P=r.pixelBounds,v=s.createFloat32Array(8),v[0]=P.x,v[1]=P.y,v[2]=P.x,v[3]=P.y+P.height,v[4]=P.x+P.width,v[5]=P.y,v[6]=P.x+P.width,v[7]=P.y+P.height,this._addCoord2DToDrawCache(k,b,d,v),d.vertexData=s.createFloat32Array([u[t],u[t+1],u[t+2]]),this._add2DTextureToDrawCache(k,b,d,s.createFloat32Array([0,1,0,0,1,1,1,0]),d.textureData),g.txtCache[f]=d,g.drawBackground||g.drawEdge)d=c.rotation*(Math.PI/180),t=p.calculateTextBackgroundRect(r.logicalBounds,g.margin,c,l),g.drawBackground&&(g.backgroundCache[f]=
this._makeTextBackgroundCache(k,g.backgroundShader,t,d,l.width/l.height)),g.drawEdge&&(g.edgeCache[f]=this._makeTextEdgeCache(k,g.edgeShader,t,d,l.width/l.height,g.lineWidth,g.lineStyle,g.edgeStippleCoordLoc))}}return g},_makeTextBufferCropped:function(a,c,b,d,f,g,h,k,m){var p=this.getViewport(),n=l.getPixelBounds(b.width,b.height,k.horizontalAlignment,k.verticalAlignment,k.rotation),r=this.computedMVPTransform(),r=new q(r,p.width,p.height);m=l.convertPointToScreenSpace(m,r);n={x:n.x+Math.round(m[0]),
y:n.y+Math.round(m[1]),width:n.width,height:n.height};n=l.intersectBounds(n,p);if(void 0===n)return null;if(this.textCanvas.width<p.width||this.textCanvas.height<p.height)this.textCanvas.width=p.width,this.textCanvas.height=p.height,c=this.textContext=this.textCanvas.getContext("2d"),c.font=f,c.textAlign=l.getHorizontalAlignment(k.horizontalAlignment),c.textBaseline="bottom";c.save();c.clearRect(0,0,p.width,p.height);c.translate(m[0],p.height-m[1]);c.rotate(-k.rotation*Math.PI/180);f=l.getVerticalTranslation(b.height,
k.verticalAlignment);c.translate(0,f);c.fillStyle=g;a.drawStrings(d,h,c,k,b.width,b.height);a={};d={};d.dims=[4,n.width,n.height];p=c.getImageData(n.x,p.height-n.y-n.height,n.width,n.height);d.CData=p.data;d.colorType=e.TextureColorType.truecoloralpha;a.textureData=d;a.pixelBounds={x:n.x-Math.round(m[0]),y:n.y-Math.round(m[1]),width:n.width,height:n.height};a.logicalBounds=b;a.cropped=!0;c.restore();return a},_makeTextBufferNormal:function(a,c,b,d,f,g,h,k){var m=l.getPixelBounds(b.width,b.height,
k.horizontalAlignment,k.verticalAlignment,k.rotation),p=l.getVerticalTranslation(b.height,k.verticalAlignment);if(this.textCanvas.width<2*m.width||this.textCanvas.height<2*m.height)this.textCanvas.width=2*m.width,this.textCanvas.height=2*m.height,c=this.textContext=this.textCanvas.getContext("2d"),c.font=f,c.textAlign=l.getHorizontalAlignment(k.horizontalAlignment),c.textBaseline="bottom";f=this.textCanvas.width;var n=this.textCanvas.height;c.save();c.clearRect(0,0,f,n);c.translate(f/2,n/2);c.rotate(-k.rotation*
Math.PI/180);c.translate(0,p);c.fillStyle=g;a.drawStrings(d,h,c,k,b.width,b.height);a={};d={};d.dims=[4,m.width,m.height];f=c.getImageData(f/2+m.x,n/2-m.y-m.height,m.width,m.height);d.CData=f.data;d.colorType=e.TextureColorType.truecoloralpha;a.textureData=d;a.pixelBounds=m;a.logicalBounds=b;a.cropped=!1;c.restore();return a},_makeTextBuffer:function(a,c,b,d,e,f){var g=k.makeFont(d.font,this.getDPI());this.textContext||(this.textCanvas=document.getElementById("txtCanvas"),null===this.textCanvas&&
(this.textCanvas=document.createElement("canvas"),this.textCanvas.width=500,this.textCanvas.height=500,this.textCanvas.id="txtCanvas"),this.textContext=this.textCanvas.getContext("2d"));var h=this.textContext;h.font=g;h.textAlign=l.getHorizontalAlignment(d.horizontalAlignment);h.textBaseline="bottom";var m=l.convertPoints2DevicePixels(this,d.font.size),m=f.computeSize(d,a,b,c,h,m);return null===m?null:m.width>this.MAX_TEXT_DIM||m.height>this.MAX_TEXT_DIM?this._makeTextBufferCropped(f,h,m,a,g,c,b,
d,e):this._makeTextBufferNormal(f,h,m,a,g,c,b,d)},drawText:function(a,c){var b=this._context,d=b.isEnabled(b.BLEND);d||b.enable(b.BLEND);if(a.drawBackground){var f=a.backgroundShader;f.use(b);this._setPickProperties(b,f,c);this._applyMatrices(f);this._clipUtil(this,b,f);4===a.backgroundColorUniformData.length?b.uniform4fv(a.backgroundColorLoc,a.backgroundColorUniformData):b.uniform3fv(a.backgroundColorLoc,a.backgroundColorUniformData);b.uniform1f(a.bgScaleLoc,1);for(f=0;f<a.nVertices;f+=1){var g=
a.txtCache[f];if(void 0!==g){var h=a.backgroundCache[f];b.uniform3fv(a.backgroundAnchorLoc,g.vertexData);this._useAttribBuffer(b,h.coord2DOffsetBuffer,h.coord2DOffsetLoc,2,b.FLOAT);this._useAttribBuffer(b,h.coord2DBuffer,h.coord2DLoc,2,b.FLOAT);b.drawArrays(b.TRIANGLE_STRIP,0,4)}}}if(a.drawEdge){f=a.edgeShader;f.use(b);this._setPickProperties(b,f,c);this._applyMatrices(f);this._clipUtil(this,b,f);4===a.edgeColorUniformData.length?b.uniform4fv(a.edgeColorLoc,a.edgeColorUniformData):b.uniform3fv(a.edgeColorLoc,
a.edgeColorUniformData);b.uniform1f(a.edgeScaleLoc,1);for(f=0;f<a.nVertices;f+=1)g=a.txtCache[f],void 0!==g&&(h=a.edgeCache[f],this._useAttribBuffer(b,h.coord2DOffsetBuffer,h.coord2DOffsetLoc,2,b.FLOAT),a.lineStyle!==e.LineStyle.solid&&(b.uniform4fv(a.edgeStippleUniformLoc,a.edgeStipplePattern),this._useAttribBuffer(b,h.edgeStippleCoordsBuffer,a.edgeStippleCoordLoc,1,b.FLOAT)),b.uniform3fv(a.edgeAnchorLoc,g.vertexData),this._useAttribBuffer(b,h.coord2DBuffer,h.coord2DLoc,2,b.FLOAT),b.drawArrays(b.TRIANGLES,
0,h.numVertices))}f=a.shader;f.use(b);this._applyMatrices(f);!0===a.alignVertexCenters&&(g=this.getViewport(),this.setAlignVertexCenters(a,g,{x0:this.plotBox[0],y0:this.plotBox[1],x1:this.plotBox[2],y1:this.plotBox[3]}));!0===a.clipping?this.clipMode===e.ClipMode.scissor?(b.enable(b.SCISSOR_TEST),g=this.scissorRectangle,b.scissor(g[0],g[1],g[2],g[3])):this.clipMode===e.ClipMode.planes&&(b.disable(b.SCISSOR_TEST),this._applyClipPlanes(f)):b.disable(b.SCISSOR_TEST);g=this.getViewport();b.uniform2fv(a.viewportSizeLoc,
[g.width,g.height]);this.fillUniformsCB&&this.fillUniformsCB(f,b);this._setPickProperties(b,f,c);for(f=0;f<a.nVertices;f+=1)g=a.txtCache[f],void 0!==g&&(b.uniform3fv(a.anchorLoc,g.vertexData),this._useAttribBuffer(b,g.texCoordBuffer,g.texCoordLoc,2,b.FLOAT),this._useAttribBuffer(b,g.coord2DBuffer,g.coord2DLoc,2,b.FLOAT),this._bindTextureUnitWithSamplerLoc(g),b.drawArrays(b.TRIANGLE_STRIP,0,4));d||b.disable(b.BLEND)},needsPickCache:function(a){return a.hasOwnProperty("edgeColor")&&!a.hasOwnProperty("faceColor")&&
(a.style===e.MarkerStyle.circle||a.style===e.MarkerStyle.square||a.style===e.MarkerStyle.triangle||a.style===e.MarkerStyle.pyramid||a.style===e.MarkerStyle.left||a.style===e.MarkerStyle.right||a.style===e.MarkerStyle.diamond||a.style===e.MarkerStyle.pentagram||a.style===e.MarkerStyle.hexagram)},makePickCacheIfNeeded:function(a,c,b){var d=void 0;if(this.needsPickCache(a)){a.faceColor=[255,255,255,255];a=n.makeShape(c,a,this.getViewport(),n.computeMarkerLOD(this,a),!1,!0);d={};d.primType=a.facePrimType;
d.nVerts=a.nFaceVerts;this._addCoord2DToDrawCache(c,b,d,a.faceVertexData);for(var e=Array(2*a.nFaceVerts),f=0;f<e.length;f++)e[f]=0;this._addCoord2DOffsetToDrawCache(c,b,d,e);d.faceColorUniformData=this.convertUint8ColorsToFloat(a.faceColor)}return d},getMarkerShaderConfig:function(a,c){var b=e.ClipMode.none;a.clipping&&(b=this.clipMode);return c.getScreenSpaceConstantColorShader(b,!1,!0,a.anchorPointClipping)},makeMarkerDrawCache:function(a,c){var b={};b.nVertices=a.vertexData.length/3;b.clipping=
a.clipping;b.anchorPointClipping=a.anchorPointClipping;b.alignVertexCenters=!0;var d=this._context;b.isWideEdge=1<a.lineWidth;b.isTransparentObject=a.isTransparentObject;var f=this._getShader(d,c);b.shader=f;b.alignVertexCenters&&this._setAVCForDrawCache(b);b.anchorLoc=f.getUniformLocation(h.Anchor.id);b.colorLoc=f.getUniformLocation(h.Color.id);b.scaleLoc=f.getUniformLocation(h.Scale.id);b.lineWidth=a.lineWidth;b.style=a.style;var g=void 0!==a&&a.hasOwnProperty("faceColor"),k=void 0!==a&&a.hasOwnProperty("edgeColor"),
m=n.makeShape(d,a,this.getViewport(),n.computeMarkerLOD(this,a),k,g),g=m.drawFace,k=m.drawEdge;b.drawFace=g;b.drawEdge=k;if(g){g={};b.faceColorUniformData=this.convertUint8ColorsToFloat(m.faceColor);this._addCoord2DToDrawCache(d,f,g,m.faceVertexData);g.primType=m.facePrimType;g.nVerts=m.nFaceVerts;var p=Array.apply(null,{length:2*m.nFaceVerts}).map(function(){return 0});this._addCoord2DOffsetToDrawCache(d,f,g,p);b.faceCache=g}k&&(g={},b.edgeColorUniformData=this.convertUint8ColorsToFloat(m.edgeColor),
this._addCoord2DToDrawCache(d,f,g,m.edgeVertexData),g.primType=m.edgePrimType,g.nVerts=m.nEdgeVerts,this._addCoord2DOffsetToDrawCache(d,f,g,m.coordOffsetData),b.edgeCache=g);b.pickCache=this.makePickCacheIfNeeded(a,d,f);b.markerCache=Array(b.nVertices);for(d=0;d<b.nVertices;d+=1)f={},k=3*d,f.vertexData=a.vertexData.slice(k,k+3),b.markerCache[d]=f;if(a.sizeBinding===e.Binding.primitive)for(d=0;d<b.nVertices;d+=1)b.markerCache[d].size=l.convertPoints2DevicePixels(this,a.size[d]);else{f=l.convertPoints2DevicePixels(this,
a.size[0]);for(d=0;d<b.nVertices;d+=1)b.markerCache[d].size=f}return b},drawMarkers:function(a,c){var b=this._context,d=a.shader;d.use(b);this._applyMatrices(d);this.fillUniformsCB&&this.fillUniformsCB(d,b);this._setPickProperties(b,d,c);if(a.alignVertexCenters){var f=this.getViewport();this.setAlignVertexCenters(a,f,{x0:this.plotBox[0],y0:this.plotBox[1],x1:this.plotBox[2],y1:this.plotBox[3]})}!0===a.clipping?!0===a.anchorPointClipping?(b.disable(b.SCISSOR_TEST),this.clipMode===e.ClipMode.scissor?
(this.applyScissorRect(d),f=this.getViewport(),b.uniform2fv(a.viewportSizeLoc,[f.width,f.height])):this.clipMode===e.ClipMode.planes&&this._applyClipPlanes(d)):this.clipMode===e.ClipMode.scissor?(b.enable(b.SCISSOR_TEST),f=this.scissorRectangle,b.scissor(f[0],f[1],f[2],f[3])):this.clipMode===e.ClipMode.planes&&(b.disable(b.SCISSOR_TEST),this._applyClipPlanes(d)):b.disable(b.SCISSOR_TEST);this.fillUniformsCB&&this.fillUniformsCB(d,b);var d=a.drawFace,f=a.drawEdge,g=a.style===e.MarkerStyle.plus||a.style===
e.MarkerStyle.vbar||a.style===e.MarkerStyle.hbar||a.style===e.MarkerStyle.x||a.style===e.MarkerStyle.asterisk,h=a.edgeCache,k=a.faceCache,l=a.faceColorUniformData,m=a.edgeColorUniformData;void 0!==c&&(null!==c&&void 0!==a.pickCache)&&(d=!0,k=a.pickCache,l=a.pickCache.faceColorUniformData);var p=1,n=1;d&&(p=l.length/4);f&&(n=m.length/4);for(var q=0;q<a.nVertices;q+=1){var r=a.markerCache[q];b.uniform3fv(a.anchorLoc,r.vertexData);b.uniform1f(a.scaleLoc,r.size);d&&(r=4*(q%p),r=l.slice(r,r+4),b.uniform4fv(a.colorLoc,
r),this._useAttribBuffer(b,k.coord2DOffsetBuffer,k.coord2DOffsetLoc,2,b.FLOAT),this._useAttribBuffer(b,k.coord2DBuffer,k.coord2DLoc,2,b.FLOAT),b.drawArrays(k.primType,0,k.nVerts));if(f)if(r=q%n,r=m.slice(4*r,4*r+4),b.uniform4fv(a.colorLoc,r),this._useAttribBuffer(b,h.coord2DBuffer,h.coord2DLoc,2,b.FLOAT),this._useAttribBuffer(b,h.coord2DOffsetBuffer,h.coord2DOffsetLoc,2,b.FLOAT),h.primType===b.TRIANGLE_STRIP&&g)for(r=0;r<h.nVerts;r+=4)b.drawArrays(b.TRIANGLE_STRIP,r,4);else b.drawArrays(h.primType,
0,h.nVerts)}},_getShader:function(a,b){var d=b.getUniqueIdentifier();if(void 0===this._shader_list[d]){var e=c.createShader(b);e.load(a);this._shader_list[d]=e}return this._shader_list[d]},_setupBuffer:function(a,c,b){return null!==c?(c=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,c),a.bufferData(a.ARRAY_BUFFER,b,a.STATIC_DRAW),c):null},_setupIndexBuffer:function(a,c){var b=a.createBuffer();a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,b);a.bufferData(a.ELEMENT_ARRAY_BUFFER,c,a.STATIC_DRAW);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,
null);return b},_useAttribBuffer:function(a,c,b,d,e){a.bindBuffer(a.ARRAY_BUFFER,c);a.enableVertexAttribArray(b);a.vertexAttribPointer(b,d,e,!1,0,0)},_addPositionToDrawCache:function(a,c,b,d){b.posLoc=c.getAttributeLocation(h.Position.id);b.posBuffer=this._setupBuffer(a,b.posLoc,d)},_addCoord2DToDrawCache:function(a,c,b,d){b.coord2DLoc=c.getAttributeLocation(h.Coord2D.id);b.coord2DBuffer=this._setupBuffer(a,b.coord2DLoc,d)},_addCoord2DOffsetToDrawCache:function(a,c,b,d){b.coord2DOffsetLoc=c.getAttributeLocation(h.Coord2DOffset.id);
b.coord2DOffsetBuffer=this._setupBuffer(a,b.coord2DOffsetLoc,s.createFloat32Array(d))},_applyTextureSamplingFilter:function(a,c,b){c===e.TextureSamplingFilterType.bilinear||c===e.TextureSamplingFilterType.trilinear?b?(c===e.TextureSamplingFilterType.bilinear?a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR_MIPMAP_NEAREST):c===e.TextureSamplingFilterType.trilinear&&a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR_MIPMAP_LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,
a.LINEAR),a.generateMipmap(a.TEXTURE_2D)):(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR)):c===e.TextureSamplingFilterType.linear?(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR)):(a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.NEAREST),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.NEAREST))},_add2DTextureToDrawCache:function(a,c,b,d,e){if(e){b.texture=
a.createTexture();a.bindTexture(a.TEXTURE_2D,b.texture);var f=0,g=0;if(void 0!==e.image)f=e.image.width,g=e.image.height,a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,e.image);else{var k=new Uint8Array(e.CData),m=e.dims[1],p=e.dims[2];void 0===p&&(p=1);f=m;g=p;a.texImage2D(a.TEXTURE_2D,0,a.RGBA,m,p,0,a.RGBA,a.UNSIGNED_BYTE,k)}f=l.isPOWOf2(f)&&l.isPOWOf2(g);this._applyTextureSamplingFilter(a,e.samplingFilter,f);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_2D,
a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE);a.bindTexture(a.TEXTURE_2D,null)}b.texCoordLoc=c.getAttributeLocation(h.TexCoord.id);b.texCoordBuffer=this._setupBuffer(a,b.texCoordLoc,d);b.textureSamplerLoc=c.getUniformLocation(h.Sampler2D.id);b.textureUnit=a.TEXTURE0},_add1DTextureToDrawCache:function(a,c,b,d,e){e&&(b.texture=this.addTexture1D(a,e.CData,e.dims,e.colorType));b.texCoordLoc=c.getAttributeLocation(h.TexCoord.id);b.texCoordBuffer=this._setupBuffer(a,b.texCoordLoc,d);b.textureSamplerLoc=c.getUniformLocation(h.Sampler2D.id);
b.textureUnit=a.TEXTURE0},convertUint8ColorsToFloat:function(a){var c=a.length,b=s.createFloat32Array(c),d;for(d=0;d<c;d+=1)b[d]=a[d]/255;return b},setClipMode:function(a){this.clipMode=a},setClipPlanes:function(a){this.clipPlanes=void 0!==a&&0<a.length?a:[]},setScissorRectangle:function(a){this.scissorRectangle=void 0!==a&&4===a.length?a:[]},clearRenderLists:function(){this.back_render_list=[];this.middle_opaque_render_list=[];this.middle_transparent_render_list=[];this.front_render_list=[]},drawCamera:function(a,
c){this.fillUniformsCB=void 0;var b=a.depthsort;this.plotBox=a.plotBox;this.setProjectionMatrix(a.projectionMatrix);this._depthPeeler||(this._depthPeeler=new v);this._depthPeeler.canDraw(this)&&b&&!0===this.shouldRunTransparencyPass?this._depthPeeler.draw(this,this.front_render_list,this.middle_opaque_render_list,this.middle_transparent_render_list,this.back_render_list,c):this._defaultRenderingPass(c,b)},_defaultRenderingPass:function(a,c){this._drawPassShaderConfigFcns||(this._drawPassShaderConfigFcns=
new t);var b=this._context;b.depthMask(!0);b.enable(b.DEPTH_TEST);b.depthFunc(b.LEQUAL);this.clearDepth();b.disable(b.DEPTH_TEST);b.depthMask(!1);b.enable(b.BLEND);a(this.back_render_list,this,this._drawPassShaderConfigFcns);c?(b.enable(b.DEPTH_TEST),b.depthMask(!0),b.disable(b.BLEND),a(this.middle_opaque_render_list,this,this._drawPassShaderConfigFcns),b.depthMask(!1),b.enable(b.BLEND),a(this.middle_transparent_render_list,this,this._drawPassShaderConfigFcns),b.disable(b.DEPTH_TEST),b.depthMask(!1)):
a(this.middle_opaque_render_list,this,this._drawPassShaderConfigFcns);a(this.front_render_list,this,this._drawPassShaderConfigFcns)},appendRenderNode:function(a,c,b){b===e.Layer.middle?c.stateset.depthSort&&c.node.isTransparentObject?(a.middle_transparent_render_list.push(c),"Text"!==c.node.type&&(a.shouldRunTransparencyPass=!0)):a.middle_opaque_render_list.push(c):b===e.Layer.front?a.front_render_list.push(c):b===e.Layer.back&&a.back_render_list.push(c)},drawTextures:function(a,c){this.setModelTransform(new d);
this.setProjectionMatrix(new d);this.setViewTransform(new d);var b=this.getDrawViewport(),f=Math.ceil(a.length/3),g=b.width/3,h=b.height/f,k=0,l=0;c&&(b=this._context,b.enable(b.BLEND),b.blendFunc(b.SRC_ALPHA,b.ONE_MINUS_SRC_ALPHA));a.forEach(function(a){3===k&&(k=0,l++);var c=this._context,b=this.getDrawViewport();c.viewport(b.x+g*k,b.y+h*l,g,h);k++;c={};c.vertexData=s.createFloat32Array([-1,-1,0,-1,1,0,1,-1,0,1,1,0]);c.stripData=s.createFloat32Array([1,5]);c.colorData=s.createFloat32Array([0,0,
0,1,1,0,1,1]);c.colorBinding=e.Binding.vertex;c.colorType=e.ColorType.texturemapped;c.clipping=!1;c.texture=null;b=this.getTriangleShaderConfig(c,new t);c=this.makeTriangleDrawCache(c,b);c.texture=a;this.drawTriangles(c)}.bind(this))}})})},"graphics/MWSG/shader/WebGLShaderFactory":function(){define(["graphics/MWSG/shader/webgl_shader","graphics/MWSG/shader/WebGLShaderGenerator"],function(g,f){return{createWebGLShader:function(e,d,b,a){return new g(e,d,b,a)},createShader:function(e){var d=f();e.getSourceProviderList().forEach(function(a){d.addShaderSourceProvider(a)});
e=d.generateVertexSource();var b=d.generateFragmentSource(),a=d.getUniformIDs(),c=d.getAttributeIDs();return this.createWebGLShader(c,a,e,b)}}})},"graphics/MWSG/shader/webgl_shader":function(){define(["dojo/_base/declare"],function(g){return g("graphics.MWSG.shader.WebGLShader",[],{constructor:function(f,e,d,b){this._attributes=f;this._uniforms=e;this._vtext=d;this._ftext=b;this._fshader=this._vshader=null;this._attributeLocations=[];this._uniformLocations=[]},prepareShaderType:function(f,e,d){e=
f.createShader(e);f.shaderSource(e,d);f.compileShader(e);f.getShaderParameter(e,f.COMPILE_STATUS);f.attachShader(this._program,e);return e},getAttributeLocation:function(f){return this._attributeLocations[f]},getUniformLocation:function(f){return this._uniformLocations[f]},use:function(f){f.useProgram(this._program)},load:function(f){this._program=f.createProgram();this._vshader=this.prepareShaderType(f,f.VERTEX_SHADER,this._vtext);this._fshader=this.prepareShaderType(f,f.FRAGMENT_SHADER,this._ftext);
f.linkProgram(this._program);this._attributeLocations=[];var e;for(e=0;e<this._attributes.length;e+=1){var d=f.getAttribLocation(this._program,this._attributes[e].aName);this._attributeLocations[this._attributes[e].id]=d}this._uniformLocations=[];for(e=0;e<this._uniforms.length;e+=1)d=f.getUniformLocation(this._program,this._uniforms[e].uName),this._uniformLocations[this._uniforms[e].id]=d},getAttributes:function(){return this._attributes},getUniforms:function(){return this._uniforms}})})},"graphics/MWSG/shader/WebGLShaderGenerator":function(){define(["dojo/_base/declare",
"graphics/MWSG/shader/WebGLShaderVariables"],function(g,f){return g([],{constructor:function(){this._shader_source_providers=[]},addShaderSourceProvider:function(e){this._shader_source_providers.push(e)},generateVertexSource:function(){for(var e=this._shader_source_providers.length,d="",b=0;b<e;b++)var a=this._shader_source_providers[b],d=d+a.getVertexSourceUniformDeclarationBlock();for(b=0;b<e;b++)a=this._shader_source_providers[b],d+=a.getVertexSourceAttributeDeclarationBlock();for(b=0;b<e;b++)a=
this._shader_source_providers[b],d+=a.getVertexSourceVaryingDeclarationBlock();for(b=0;b<e;b++)a=this._shader_source_providers[b],d+=a.getVertexSourceFunctionDeclarationBlock();d+="void main() { \n";for(b=0;b<e;b++)a=this._shader_source_providers[b],d+=a.getVertexSourceCodeBlock();return d+"    }"},generateFragmentSource:function(){var e=this._shader_source_providers.length,d;d="#ifdef GL_ES \n    precision highp float; \n#endif   \n";for(var b=0;b<e;b++){var a=this._shader_source_providers[b];d+=
a.getFragmentSourceUniformDeclarationBlock()}for(b=0;b<e;b++)a=this._shader_source_providers[b],d+=a.getFragmentSourceVaryingDeclarationBlock();for(b=0;b<e;b++)a=this._shader_source_providers[b],d+=a.getFragmentSourceFunctionDeclarationBlock();d+="void main() { \n";for(b=0;b<e;b++)a=this._shader_source_providers[b],d+=a.getFragmentSourceCodeBlock();return d+" }"},getAttributeIDs:function(){for(var e=[],d=this._shader_source_providers.length,b=0;b<d;b++)e=e.concat(this._shader_source_providers[b].getAttributeIDs(f));
return e},getUniformIDs:function(){for(var e=[],d=this._shader_source_providers.length,b=0;b<d;b++)e=e.concat(this._shader_source_providers[b].getUniformIDs(f));return e}})})},"graphics/MWSG/shader/WebGLShaderVariables":function(){define([],function(){return{Position:{id:0,aName:"a_Position",uName:"u_Position"},Color:{id:1,aName:"a_Color",uName:"u_Color"},MVPMatrix:{id:2,aName:null,uName:"u_MVPMatrix"},TexCoord:{id:3,aName:"a_TexCoord",uName:null},Sampler2D:{id:4,aName:null,uName:"u_Sampler2D"},Anchor:{id:5,
aName:null,uName:"u_Anchor"},Coord2D:{id:6,aName:"a_Coord2D",uName:null},xMinClipPlane:{id:7,aName:null,uName:"u_xMinClipPlane"},xMaxClipPlane:{id:8,aName:null,uName:"u_xMaxClipPlane"},yMinClipPlane:{id:9,aName:null,uName:"u_yMinClipPlane"},yMaxClipPlane:{id:10,aName:null,uName:"u_yMaxClipPlane"},zMinClipPlane:{id:11,aName:null,uName:"u_zMinClipPlane"},zMaxClipPlane:{id:12,aName:null,uName:"u_zMaxClipPlane"},StipplePattern:{id:13,aName:null,uName:"u_StipplePattern"},StippleCoord:{id:14,aName:"a_StippleCoord",
uName:null},ViewportSize:{id:15,aName:null,uName:"u_ViewportSize"},PlotBox:{id:16,aName:null,uName:"u_PlotBox"},ScissorRect:{id:17,aName:null,uName:"u_ScissorRect"},AVCOffset:{id:18,aName:null,uName:"u_AVCOffset"},LineWidth:{id:19,aName:null,uName:"u_LineWidth"},UnitDistPoint:{id:20,aName:"a_UnitDistPoint",uName:null},JoinStyle:{id:21,aName:null,uName:"u_JoinStyle"},VertexIndex:{id:22,aName:"a_VertexIndex",uName:null},UnitDistPointPrev:{id:23,aName:"a_UnitDistPointPrev",uName:null},UnitDistPointNext:{id:24,
aName:"a_UnitDistPointNext",uName:null},SegmentsPerJoin:{id:25,aName:null,uName:"u_SegmentsPerJoin"},CapStyle:{id:26,aName:null,uName:"u_CapStyle"},SegmentsPerCap:{id:27,aName:null,uName:"u_SegmentsPerCap"},Pick:{id:28,aName:null,uName:"u_Pick"},PickColor:{id:29,aName:null,uName:"u_PickColor"},Scale:{id:30,aName:null,uName:"u_Scale"},Coord2DOffset:{id:31,aName:"a_Coord2DOffset",uName:null},MVPInverseMatrix:{id:32,aName:null,uName:"u_MVPInverseMatrix"},StoreScreenSpaceDepth:{id:33,aName:null,uName:"u_StoreScreenSpaceDepth"},
ModelViewMatrix:{id:34,aName:null,uName:"u_ModelViewMat"},ProjectionMat:{id:35,aName:null,uName:"u_ProjectionMat"},ProjectionInverseMatrix:{id:36,aName:null,uName:"u_ProjectionInvMat"},NormalMatrix:{id:37,aName:null,uName:"u_NormalMatrix"},Normal:{id:38,aName:"a_Normal",uName:null},Material_AmbientStrength:{id:39,aName:null,uName:"u_Material.ambientStrength"},Material_DiffuseStrength:{id:40,aName:null,uName:"u_Material.diffuseStrength"},Material_SpecularStrength:{id:41,aName:null,uName:"u_Material.specularStrength"},
Material_SpecularColorReflectance:{id:42,aName:null,uName:"u_Material.specularColorReflectance"},Material_SpecularExponent:{id:43,aName:null,uName:"u_Material.specularExponent"},LightCount:{id:44,aName:null,uName:"u_LightCount"},Light0_Style:{id:45,aName:null,uName:"u_Lights[0].style"},Light0_Color:{id:46,aName:null,uName:"u_Lights[0].color"},Light0_Position:{id:47,aName:null,uName:"u_Lights[0].position"},Light1_Style:{id:48,aName:null,uName:"u_Lights[1].style"},Light1_Color:{id:49,aName:null,uName:"u_Lights[1].color"},
Light1_Position:{id:50,aName:null,uName:"u_Lights[1].position"},Light2_Style:{id:51,aName:null,uName:"u_Lights[2].style"},Light2_Color:{id:52,aName:null,uName:"u_Lights[2].color"},Light2_Position:{id:53,aName:null,uName:"u_Lights[2].position"},Light3_Style:{id:54,aName:null,uName:"u_Lights[3].style"},Light3_Color:{id:55,aName:null,uName:"u_Lights[3].color"},Light3_Position:{id:56,aName:null,uName:"u_Lights[3].position"},Light4_Style:{id:57,aName:null,uName:"u_Lights[4].style"},Light4_Color:{id:58,
aName:null,uName:"u_Lights[4].color"},Light4_Position:{id:59,aName:null,uName:"u_Lights[4].position"},Light5_Style:{id:60,aName:null,uName:"u_Lights[5].style"},Light5_Color:{id:61,aName:null,uName:"u_Lights[5].color"},Light5_Position:{id:62,aName:null,uName:"u_Lights[5].position"},Light6_Style:{id:63,aName:null,uName:"u_Lights[6].style"},Light6_Color:{id:64,aName:null,uName:"u_Lights[6].color"},Light6_Position:{id:65,aName:null,uName:"u_Lights[6].position"},Light7_Style:{id:66,aName:null,uName:"u_Lights[7].style"},
Light7_Color:{id:67,aName:null,uName:"u_Lights[7].color"},Light7_Position:{id:68,aName:null,uName:"u_Lights[7].position"},EyePos:{id:69,aName:null,uName:"u_EyePos"},SeparateSpecularColor:{id:70,aName:null,uName:"u_SeparateSpecularColor"},SceneAmbientLightColor:{id:71,aName:null,uName:"u_SceneAmbientLightColor"},D0Sampler:{id:72,aName:null,uName:"u_D0"},D1Sampler:{id:73,aName:null,uName:"u_D1"}}})},"graphics/MWSG/SceneTreeUtils":function(){define(["graphics/MWSG/TypedArrayUtils","graphics/MWSG/Base64Decode"],
function(g,f){var e=function(b){b=f.base64ToArrayBuffer(b);return g.createFloat32Array(b)},d=function(b,a){var c={numElems:0},d=b[a];if(!Array.isArray(d)&&"object"===typeof d)if(void 0!==d["const"]){var f=d["const"],g=f[0];c.numElems=f[1];c.get=function(a){return g}}else if(void 0!==d.aseries){var f=d.aseries,g=f[0],m=f[1];c.numElems=f[2];c.get=function(a){return g+a*m}}else{if(void 0!==d.b64){var f=d.b64,p=e(f);c.numElems=p.length;c.get=function(a){return p[a]}}}else c.numElems=d.length,c.get=function(a){return d[a]};
return c};return{makeFont:function(b,a){var c=b.angle+" ",c="bold"===b.weight?c+"700":c+"500",c=c+" "+b.size*a/72+"px ",d=null,d=/sans\s*serif/i.test(b.name)||/symbol/i.test(b.name)?"sans-serif":/\w+\s+\w+/.test(b.name)?"'"+b.name+"'":b.name;return c+d},convertEncodedArray:function(b){if(void 0!==b.b64)return e(b.b64);var a=[],c=0;Object.keys(b).sort().forEach(function(e){b.hasOwnProperty(e)&&(e=d(b,e),a.push(e),0===c&&(c=e.numElems))});for(var f=a.length,k=g.createFloat32Array(c*f),l=0,m=0;m<c;m++)for(var p=
0;p<f;p++)k[l++]=a[p].get(m);return k},convertArray:function(b){return void 0!==b&&b.hasOwnProperty("data")?!Array.isArray(b.data)&&"object"===typeof b.data?this.convertEncodedArray(b.data):g.createFloat32Array(b.data):void 0!==b&&b.hasOwnProperty("binarydata")&&b.hasOwnProperty("binaryDataConversionFcn")?b.binaryDataConversionFcn(b.binarydata):[]},removeFromArray:function(b,a){var c=b.length,d;for(d=0;d<c;d+=1)if(b[d]===a)return b.splice(d,1),!0;return!1},visualizeTextImage:function(b){var a=b.toDataURL("image/png");
b=window.open("","image from canvas","width\x3d"+b.width+", height\x3d"+b.height,"false");b.document.open();b.document.write("\x3cimg src\x3d'"+a+"' alt\x3d'from canvas'/\x3e");b.document.close()},calcTextWidth:function(b,a,c){if(1===c)return Math.ceil(b.measureText(a[0]).width);for(var d=0,e=0;e<c;e++){var f=Math.ceil(b.measureText(a[e]).width);f>d&&(d=f)}return d},getNextPowerOfTwo:function(b,a){for(a=a||1;a<b;)a*=2;return a}}})},"graphics/MWSG/Base64Decode":function(){define(["graphics/MWSG/TypedArrayUtils"],
function(g){return{base64ToArrayBuffer:function(f){f=window.atob(f);for(var e=f.length,d=new Uint8Array(e),b=0;b<e;b++)d[b]=f.charCodeAt(b);return d.buffer}}})},"graphics/MWSG/Utilities":function(){define("dojo/dom-construct graphics/MWSG/Point4 graphics/MWSG/matrix4x4 graphics/MWSG/View graphics/MWSG/Enum graphics/MWSG/Rectangle graphics/MWSG/SceneTreeUtils graphics/MWSG/TypedArrayUtils".split(" "),function(g,f,e,d,b,a,c,h){return{convertPointToScreenSpace:function(a,c){return this.convertPointToScreenSpace2(a,
c.getMatrix(),c.getWidth(),c.getHeight())},convertPointToScreenSpace2:function(a,c,b,d){a=c.transform(a).project();b=(a.getX()+1)*b/2;d=(a.getY()+1)*d/2;a=1*(a.getZ()+1)/2;return[b,d,a]},convertScreenSpaceToWorldPoint:function(a,c,b,d){a=new f(2*a[0]/b-1,2*a[1]/d-1,2*a[2]-1,1);c=c.transform(a);return 0!==c.getW()?(c=c.project(),[c.getX(),c.getY(),c.getZ()]):[Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE]},isBoundingBoxTooLargeInClipSpace:function(a,c,b){if(c.isValid()){c=c.getAllCorners();for(var d in c){var e=
c[d],g=new f(e.x,e.y,void 0===e.z?1:e.z,1),g=a.transform(g);if(Math.abs(g.getX())>b||Math.abs(g.getY())>b||void 0!==e.z&&Math.abs(g.getZ())>b)return!0}}return!1},isPOWOf2:function(a){return 1<a&&0===(a&a-1)},copyVertex:function(a,c,b,d,e,f){if(c+e>a.length)throw"error in copyVertex - 1";if(d+e*f>b.length)throw"error in copyVertex - 2";for(var g=0;g<f;++g)for(var h=0;h<e;++h){var t=c+h;b[d++]=a[t]}return d},GetPlatform:function(){var a=navigator.platform.toLowerCase();return 0<=a.indexOf("win")?b.Platform.Windows:
0<=a.indexOf("mac")||0<=a.indexOf("ipad")||0<=a.indexOf("iphone")?b.Platform.Apple:b.Platform.Linux},FindDPI:function(){if(this.hasOwnProperty("_ServerBaselinePPI"))return this._ServerBaselinePPI;var a=96;switch(this.GetPlatform()){case b.Platform.Windows:case b.Platform.Linux:a=96;break;case b.Platform.Apple:a=72}return a},getDistanceInEyeSpace:function(a,c){return-(a[0]*c._data[2]+a[1]*c._data[6]+a[2]*c._data[10]+c._data[14])},getFarthestBBCorner:function(a){a=[-a._data[2],-a._data[6],-a._data[10]];
return(0<=a[0]?1:0)|(0<=a[1]?2:0)|(0<=a[2]?4:0)},getBBoxNearFar:function(a,c){var b=this.getFarthestBBCorner(a),d=this.getDistanceInEyeSpace(c.getCorner(~b&7),a),b=this.getDistanceInEyeSpace(c.getCorner(b),a);return[d,b]},getHorizontalAlignment:function(a){var c=[];switch(a){case b.HorizontalAlignment.left:c="left";break;case b.HorizontalAlignment.right:c="right";break;case b.HorizontalAlignment.center:c="center";break;default:c="start "}return c},getHorizontalTranslation:function(a,c){var d=0;switch(c){case b.HorizontalAlignment.left:d=
0;break;case b.HorizontalAlignment.right:d=a;break;case b.HorizontalAlignment.center:d=a/2;break;default:d=0}return d},getVerticalTranslation:function(a,c){var d=0;switch(c){case b.VerticalAlignment.baseline:d=0;break;case b.VerticalAlignment.top:d=a;break;case b.VerticalAlignment.cap:d=a;break;case b.VerticalAlignment.bottom:d=0;break;case b.VerticalAlignment.middle:d=a/2;break;default:d=a/2}return d},getVerticalAlignment:function(a){var c=[];switch(a){case b.VerticalAlignment.baseline:c="alphabetic";
break;case b.VerticalAlignment.top:c="top";break;case b.VerticalAlignment.cap:c="hanging";break;case b.VerticalAlignment.bottom:c="bottom";break;case b.VerticalAlignment.middle:c="middle";break;default:c="middle"}return c},intersectBounds:function(a,c){var b=Math.max(a.x,c.x),d=Math.max(a.y,c.y),e=Math.min(a.x+a.width,c.x+c.width),f=Math.min(a.y+a.height,c.y+c.height);if(e>b&&f>d)return{x:b,y:d,width:e-b,height:f-d}},getPixelBounds:function(c,b,d,e,f){var g=function(a){return 1E-6>Math.abs(Math.round(a)-
a)?Math.round(a):a};d=this.getHorizontalTranslation(c,d);e=this.getVerticalTranslation(b,e);c=new a(0,0,c,b);c.translate(d,e);c.rotate(f*Math.PI/180);f=Math.floor(g(c.getXMin()));b=Math.floor(g(c.getYMin()));d=Math.ceil(g(c.getXMax()));g=Math.ceil(g(c.getYMax()));return{x:f,y:b,width:d-f,height:g-b}},rotate2DWithAspect:function(a,c,b,d){var e=h.createFloat32Array(2*c),f=1/d,g=Math.sin(b);b=Math.cos(b);for(var s=0;s<2*c;s+=2)e[s]=(a[s]*d*b-a[s+1]*g)*f,e[s+1]=a[s]*d*g+a[s+1]*b;return e},getNumCircleSegments:function(a,
c){var b=4;1<=a&&(b=Math.ceil(Math.PI/Math.acos(1-c/a)),b%2&&(b+=1));return Math.max(Math.min(b,200),4)},GetVendor:function(a){if(null==a||!a instanceof WebGLRenderingContext)throw"Not proper GL context is passed to GetVendor function.";var c="",d="",e=a.getExtension("WEBGL_debug_renderer_info");void 0!==e&&null!==e&&(c=a.getParameter(e.UNMASKED_RENDERER_WEBGL),d=a.getParameter(e.UNMASKED_VENDOR_WEBGL));if(null!==c&&null!=d){a=c.concat(",",d).toLowerCase();if(0<=a.indexOf("intel"))return b.GPUVendor.Intel;
if(0<=a.indexOf("nvidia"))return b.GPUVendor.NVidia;if(0<=a.indexOf("amd"))return b.GPUVendor.AMD;if(0<=a.indexOf("vmware"))return b.GPUVendor.VMWare}return b.GPUVendor.Other},convertPoints2DevicePixels:function(a,c){return c*a.getDPI()/72},convertScaledPixels2DevicePixels:function(a,c){return c*a.getPixelScale()},convertRectangleScaledPixels2DevicePixels:function(a,c){var b=a.getPixelScale();return{x:c.x*b,y:c.y*b,width:c.width*b,height:c.height*b}},getTextCenter:function(a,c,d,e,f,g){var h=Math.sin(-g*
(Math.PI/180));g=Math.cos(-g*(Math.PI/180));var s=[a[0],a[1]];switch(c){case b.HorizontalAlignment.left:s[0]+=e/2;break;case b.HorizontalAlignment.right:s[0]+=-e/2}switch(d){case b.VerticalAlignment.top:case b.VerticalAlignment.cap:s[1]+=f/2;break;case b.VerticalAlignment.bottom:case b.VerticalAlignment.baseline:s[1]+=-f/2}s[0]-=a[0];s[1]-=a[1];return[a[0]+(s[0]*g-s[1]*h),a[1]+(s[0]*h+s[1]*g)]},computeTextLogicalBounds:function(a,b,d,e,f){var h=g.create("canvas");h.width=500;h.height=500;var r=h.getContext("2d"),
h=this.FindDPI();r.font=c.makeFont(b,h);r.textAlign=this.getHorizontalAlignment(d);r.textBaseline="bottom";a=f.computeSize({font:b},a,a.length,"rgba(1, 0 ,0)",r,b.size*(h/72));d=this.getPixelBounds(a.width,a.height,d,e,0);e=72/h;d.x*=e;d.y*=e;d.width*=e;d.height*=e;return d},guiVertAlignToJSVertAlign:function(a){switch(a){case b.VerticalAlignment_GUI.top:return b.VerticalAlignment.top;case b.VerticalAlignment_GUI.bottom:return b.VerticalAlignment.bottom;case b.VerticalAlignment_GUI.cap:return b.VerticalAlignment.cap;
case b.VerticalAlignment_GUI.baseline:return b.VerticalAlignment.baseline;case b.VerticalAlignment_GUI.middle:return b.VerticalAlignment.middle}}}})},"graphics/MWSG/View":function(){define(["dojo/_base/declare","graphics/MWSG/matrix4x4"],function(g,f){return g([],{constructor:function(e,d,b){this._mat=e;this._width=d;this._height=b},getMatrix:function(){return this._mat},getWidth:function(){return this._width},getHeight:function(){return this._height},compare:function(e){return this._width===e._width&&
this._height===e._height?f.compare(this._mat,e._mat,1E-7):!1}})})},"graphics/MWSG/Rectangle":function(){define(["dojo/_base/declare"],function(g){return g([],{constructor:function(f,e,d,b){void 0===f?this._y2=this._x2=this._y1=this._x1=0:(this._x1=f,this._y1=e,this._x2=f+d,this._y2=e+b)},getXMin:function(){return this._x1},getYMin:function(){return this._y1},getXMax:function(){return this._x2},getYMax:function(){return this._y2},translate:function(f,e){this._x1-=f;this._y1-=e;this._x2-=f;this._y2-=
e},rotate:function(f){var e=Math.cos(f),d=Math.sin(f);f=this._x1*e-this._y1*d;var b=this._x1*d+this._y1*e,a=this._x2*e-this._y1*d,c=this._x2*d+this._y1*e,g=this._x2*e-this._y2*d,k=this._x2*d+this._y2*e,l=this._x1*e-this._y2*d,e=this._x1*d+this._y2*e;this._x1=Math.min(f,a,g,l);this._x2=Math.max(f,a,g,l);this._y1=Math.min(b,c,k,e);this._y2=Math.max(b,c,k,e)},toString:function(){var f;f="["+this._x1;f=f+", "+this._y1;f+=", ";f+=this._x2;f+=", ";f+=this._y2;return f+="]"}})})},"graphics/MWSG/LineUtils":function(){define(["dojo/_base/array",
"graphics/MWSG/Point4","graphics/MWSG/Enum","graphics/MWSG/Utilities","graphics/MWSG/TypedArrayUtils"],function(g,f,e,d,b){return{convertVertexToScreenSpace:function(a,c,b){a=new f(a[c],a[c+1],a[c+2],1);return d.convertPointToScreenSpace(a,b)},distanceBetween:function(a,c){var b=c[0]-a[0],d=c[1]-a[1];return Math.sqrt(b*b+d*d)},computeStippleCoordinates_Line:function(a,c,d,e){for(var f=b.createFloat32Array(a),g=!0===e?4:2,p=g/2,n=0;n<a-(g-2);n+=g){var q=n,r=n+p,s=this.convertVertexToScreenSpace(c,
3*q,d),t=this.convertVertexToScreenSpace(c,3*r,d),s=this.distanceBetween(t,s);f[q]=0;f[r]=s;!0===e&&(f[q+1]=0,f[r+1]=s)}return f},computeStippleCoordinates_LineStrip:function(a,c,d,e,f){a=b.createFloat32Array(a);var g=d.length-1;if(!1===f)for(f=0;f<g;f++){var p=d[f]-1,n=d[f+1]-2,q=this.convertVertexToScreenSpace(c,3*p,e),r=0;a[p]=r;for(p+=1;p<=n;p++){var s=this.convertVertexToScreenSpace(c,3*p,e),q=this.distanceBetween(s,q),r=r+q;a[p]=r;q=s}}else for(f=0;f<g;f++){n=d[f+1]-2;p=6*(d[f]-1-f);n=6*n-3*
(2*f+1);q=this.convertVertexToScreenSpace(c,3*p,e);r=0;a[p]=r;a[p+1]=r;a[p+2]=r;for(p+=3;p<=n;p+=6)s=this.convertVertexToScreenSpace(c,3*p,e),q=this.distanceBetween(s,q),r+=q,a[p]=r,a[p+1]=r,a[p+2]=r,p!==n&&(a[p+3]=r,a[p+4]=r,a[p+5]=r),q=s}return a},calculateStippleCoordinates:function(a,c,b,d,e){return void 0===b||0===b.length?this.computeStippleCoordinates_Line(a,c,d,e):this.computeStippleCoordinates_LineStrip(a,c,b,d,e)},makeLineStipple:function(a,c,b){var d=2*b,f=0,m=0,p=0,n=0;a===e.LineStyle.solid?
(f=p=4*b,m=n=0):a===e.LineStyle.dashed?c<d?(f=p=10*b,m=n=6*b):f=p=m=n=4*c:a===e.LineStyle.dotted?c<d?(f=p=1*b,m=n=3*b):f=p=m=n=c:a===e.LineStyle.dashdotted?c<d?(f=8*b,p=2*b,m=n=3*b):(f=4*c,p=2*c,m=n=c):a===e.LineStyle.none&&(f=p=0,m=n=4*b);a=[f,m,p,n];return a=g.map(a,Math.round)},convertLineLoopsToLineStrip:function(a){if(void 0===a.stripData||2>a.stripData.length)return a;var c=a.stripData,d=[1],f=a.vertexData,g=[],m=a.colorData,p=[],n=!1,q=4;a.colorType===e.ColorType.truecolor||a.colorType===e.ColorType.truecoloralpha?
a.colorBinding===e.Binding.object?(n=!1,p=m):(n=!0,q=4):a.colorType===e.ColorType.texturemapped?(n=!0,q=2):a.colorType===e.ColorType.colormapped&&(n=!0,q=1);for(var r=1;r<c.length;r++){for(var s=c[r-1]-1,t=c[r]-2,u=s;u<=t;u++)if(g.push(f[3*u]),g.push(f[3*u+1]),g.push(f[3*u+2]),n)for(var v=0;v<q;v++)p.push(m[q*u+v]);g.push(f[3*s]);g.push(f[3*s+1]);g.push(f[3*s+2]);if(n)for(v=0;v<q;v++)p.push(m[q*s+v]);d.push(d[r-1]+(c[r]-c[r-1])+1)}a.vertexData=b.createFloat32Array(g);a.colorData=b.createFloat32Array(p);
a.stripData=b.createFloat32Array(d);a.isLineLoop=!1;return a}}})},"graphics/MWSG/TextUtils":function(){define("dojo/Deferred graphics/MWSG/Enum graphics/MWSG/Utilities graphics/MWSG/TextPlainHandler graphics/MWSG/TextTeXHandler MW/equations/renderer/view/FontsLoaded graphics/MWSG/TypedArrayUtils".split(" "),function(g,f,e,d,b,a,c){return{TexFontsPromise:function(){var c=new g;a.then(function(){c.resolve()});return c}(),calculateTextBackgroundRect:function(a,c,b,d){var f=d.width/2,g=d.height/2;d=c/
f;c/=g;var q=a.width/f,r=a.height/g,f=e.getHorizontalTranslation(a.width,b.horizontalAlignment)/f;a=e.getVerticalTranslation(a.height,b.verticalAlignment)/g;return{x:-d-f,y:-c-a,width:q+2*d,height:r+2*c}},makeTextBackgroundVertexArray:function(a,b,d){var f=c.createFloat32Array(8);f[0]=a.x;f[1]=a.y;f[2]=a.x;f[3]=a.y+a.height;f[4]=a.x+a.width;f[5]=a.y;f[6]=a.x+a.width;f[7]=a.y+a.height;return e.rotate2DWithAspect(f,4,b,d)},makeTextEdgeVertexArray:function(a,b,d,g,p,n){1>p&&(p=1);var q=p/g.width,r=p/
g.height,s=a.height*(g.height/2),t=a.width*(g.width/2),u=p,v=c.createFloat32Array(48),w=0;g=0;var x=a.x,y=a.y,B=a.x,D=a.y+a.height,E=a.x+a.width,F=a.y+a.height,I=a.x+a.width;a=a.y;v[w++]=x-q;v[w++]=y-r;v[w++]=x+q;v[w++]=y-r;v[w++]=B+q;v[w++]=D+r;v[w++]=x-q;v[w++]=y-r;v[w++]=B-q;v[w++]=D+r;v[w++]=B+q;v[w++]=D+r;v[w++]=B+q;v[w++]=D-r;v[w++]=B+q;v[w++]=D+r;v[w++]=E+q;v[w++]=F+r;v[w++]=B+q;v[w++]=D-r;v[w++]=E+q;v[w++]=F-r;v[w++]=E+q;v[w++]=F+r;v[w++]=E+q;v[w++]=F-r;v[w++]=E-q;v[w++]=F-r;v[w++]=I+q;v[w++]=
a-r;v[w++]=E-q;v[w++]=F-r;v[w++]=I-q;v[w++]=a-r;v[w++]=I+q;v[w++]=a-r;v[w++]=I-q;v[w++]=a-r;v[w++]=I-q;v[w++]=a+r;v[w++]=x+q;v[w++]=y+r;v[w++]=I-q;v[w++]=a-r;v[w++]=x+q;v[w++]=y-r;v[w++]=x+q;v[w++]=y+r;b=e.rotate2DWithAspect(v,w/2,b,d);d=null;n!==f.LineStyle.solid&&(d=c.createFloat32Array(24),n=s+u,a=n+t,s=a+s,t=s+t-u,d[g++]=0,d[g++]=0,d[g++]=n,d[g++]=0,d[g++]=n,d[g++]=n,d[g++]=n,d[g++]=n,d[g++]=a,d[g++]=n,d[g++]=a,d[g++]=a,d[g++]=a,d[g++]=a,d[g++]=s,d[g++]=a,d[g++]=s,d[g++]=s,d[g++]=s,d[g++]=s,d[g++]=
t,d[g++]=s,d[g++]=t,d[g++]=t);return{vertexArray:b,stippleCoords:d,lineWidth:p}},makeTextHandler:function(a,c){var e=null,g=/[{_^\\]/,p;if(a===f.TextInterpreter.none)e=new d;else if(a===f.TextInterpreter.latex)e=new b("tex");else{for(p=0;p<c.length;++p)if(c[p].match(g)){e=new b("simpletex");break}null===e&&(e=new d)}return e},calculateTextExtents:function(a,c,b,d,f){f=e.guiVertAlignToJSVertAlign(f);c=this.makeTextHandler(c,b);a=e.computeTextLogicalBounds(b,a,d,f,c);c.destroy();return{xmin:a.x,ymin:a.y,
xmax:a.x+a.width,ymax:a.y+a.height}}}})},"graphics/MWSG/TextPlainHandler":function(){define(["dojo/_base/declare","graphics/MWSG/Enum","graphics/MWSG/SceneTreeUtils"],function(g,f,e){return g([],{constructor:function(){this._lineHeight=0},computeSize:function(d,b,a,c,f,g){this._lineHeight=Math.ceil(1.2*g);return{width:e.calcTextWidth(f,b,a),height:this._lineHeight*a}},drawStrings:function(d,b,a,c){if(1<b)for(c=b-1;0<=c;c--)a.fillText(d[c],0,-(b-c-1)*this._lineHeight);else a.fillText(d[0],0,0)},destroy:function(){}})})},
"graphics/MWSG/TextTeXHandler":function(){define("dojo/_base/declare dojo/dom-construct dojo/dom-geometry graphics/MWSG/Enum graphics/MWSG/Utilities MW/equations/renderer/Renderer MW/equations/renderer/view/exporters/CanvasRenderer".split(" "),function(g,f,e,d,b,a,c){return g([],{constructor:function(a){this._texDoms=[];this._equationFormat=a;this._vA=this._ty=this._tx=0},_rescale:function(a){return(Math.round(1E5*(parseFloat(a)/255))/1E5).toString()},decorateSimpleTeX:function(a,c,b){"bold"===c.weight&&
(a="\\bf"+a);a="italic"===c.angle?"\\it"+a:"\\rm"+a;void 0!==c.name&&(a="\\fontname{"+c.name+"}"+a);var d=b.match(/rgba\(([0-9]*),([0-9]*),([0-9]*)/);d&&(c=this._rescale(d[1]),b=this._rescale(d[2]),d=this._rescale(d[3]),a="\\color[rgb]{"+c+","+b+","+d+"}"+a);return a},_getTeXDom:function(c,b,d,e){e/=1.1;"simpletex"===this._equationFormat&&(c=this.decorateSimpleTeX(c,b,d));b=new a({equationFormat:this._equationFormat,pxPerEm:e,_minimalFontSize:5});var g=f.create("span",{style:{display:"inline-block",
position:"absolute",right:"-1000px",bottom:"-1000px",fontSize:e+"px",whiteSpace:"pre-wrap",color:d}},document.body);c=b.render(c,g);if(!c.isResolved())return f.destroy(g),null;var n=null;c.then(function(a){n=g});return n},_destroyTexDoms:function(){for(var a=0;a<this._texDoms.length;a++)f.destroy(this._texDoms[a]);this._texDoms=[]},destroy:function(){this._destroyTexDoms()},_renderTeXToDoms:function(a,c,b,d){var e,f,g;g=!0;for(e=0;e<a.length;++e)if(f=this._getTeXDom(a[e],c,b,d))this._texDoms.push(f);
else{g=!1;break}return g},_getTeXBounds:function(a){var c,b,d=0,f=0;for(c=0;c<a.length;++c){b=a[c];var g=e.position(b.firstElementChild,!0);b&&(f+=g.h,g.w>d&&(d=g.w))}return{width:d,height:f}},_drawDoms:function(a,d,f,g,p){g.save();d=new c;g.textAlign="left";for(var n=f=0,q=a.length-1;0<=q;q--)n=e.position(a[q].firstElementChild,!0),f+=n.h,n=b.getHorizontalTranslation(n.w,p),g.save(),g.translate(-n,-f),d.renderToContext(a[q].firstElementChild,1,g),g.restore();g.restore()},computeSize:function(a,c,
b,d,e,f){return!this._renderTeXToDoms(c,a.font,d,f)?null:this._getTeXBounds(this._texDoms)},drawStrings:function(a,c,b,d){this._drawDoms(this._texDoms,0,0,b,d.horizontalAlignment)}})})},"graphics/MWSG/MarkerUtils":function(){function g(d,b){var a=d.lineWidth;return{hx:1/b.width,hy:1/b.height,hLWX:a/b.width,hLWY:a/b.height}}function f(d){for(var b=Array(d),a=0;a<d;a++)b[a]=0;return b}function e(d,b,a,c){for(var e=d.length/2,f=0;f<e;f++){var g=b([d[2*f],d[2*f+1]]);g[0]*=a;g[1]*=c;d[2*f]=g[0];d[2*f+
1]=g[1]}return d}define(["graphics/MWSG/Enum","graphics/MWSG/Utilities","graphics/MWSG/TypedArrayUtils"],function(d,b,a){return{makeShape:function(a,b,e,f,g,p){var n=null;switch(b.style){case d.MarkerStyle.plus:n=this.makePlusShape(a,b,e,g);break;case d.MarkerStyle.vbar:n=this.makeVBarShape(a,b,e,g);break;case d.MarkerStyle.hbar:n=this.makeHBarShape(a,b,e,g);break;case d.MarkerStyle.point:n=this.makePointShape(a,b,e,g);break;case d.MarkerStyle.circle:n=this.makeCircleShape(a,b,e,f,p,g);break;case d.MarkerStyle.x:n=
this.makeXShape(a,b,e,g);break;case d.MarkerStyle.asterisk:n=this.makeAsteriskShape(a,b,e,g);break;case d.MarkerStyle.square:n=this.makeSquareShape(a,b,e,p,g);break;case d.MarkerStyle.pyramid:n=this.makePyramidShape(a,b,e,p,g);break;case d.MarkerStyle.triangle:n=this.makeTriangleShape(a,b,e,p,g);break;case d.MarkerStyle.left:n=this.makeLeftShape(a,b,e,p,g);break;case d.MarkerStyle.right:n=this.makeRightShape(a,b,e,p,g);break;case d.MarkerStyle.diamond:n=this.makeDiamondShape(a,b,e,p,g);break;case d.MarkerStyle.pentagram:n=
this.makeStarShape(5,a,b,e,p,g);break;case d.MarkerStyle.hexagram:n=this.makeStarShape(6,a,b,e,p,g);break;default:n={drawFace:!1,drawEdge:!1}}return n},makePlusShape:function(c,b,d,e){var m={};m.drawEdge=e;m.drawFace=!1;e&&(d=g(b,d),1<b.lineWidth?(m.edgePrimType=c.TRIANGLE_STRIP,m.nEdgeVerts=8,m.edgeVertexData=a.createFloat32Array([-d.hx,0,-d.hx,0,d.hx,0,d.hx,0,0,-d.hy,0,-d.hy,0,d.hy,0,d.hy]),m.coordOffsetData=[0,d.hLWY,0,-d.hLWY,0,d.hLWY,0,-d.hLWY,d.hLWX,0,-d.hLWX,0,d.hLWX,0,-d.hLWX,0]):(m.edgePrimType=
c.LINES,m.nEdgeVerts=4,m.edgeVertexData=a.createFloat32Array([-d.hx,0,d.hx,0,0,-d.hy,0,d.hy]),m.coordOffsetData=f(8)),m.edgeColor=b.edgeColor);return m},makeVBarShape:function(c,b,d,e){var m={};m.drawEdge=e;m.drawFace=!1;e&&(d=g(b,d),1<b.lineWidth?(m.edgePrimType=c.TRIANGLE_STRIP,m.nEdgeVerts=4,m.edgeVertexData=a.createFloat32Array([0,-d.hy,-0,-d.hy,0,d.hy,-0,d.hy]),m.coordOffsetData=[d.hLWX,0,-d.hLWX,0,d.hLWX,0,-d.hLWX,0]):(m.edgePrimType=c.LINES,m.nEdgeVerts=2,m.edgeVertexData=a.createFloat32Array([0,
-d.hy,0,d.hy]),m.coordOffsetData=f(4)),m.edgeColor=b.edgeColor);return m},makeHBarShape:function(c,b,d,e){var m={};m.drawEdge=e;m.drawFace=!1;e&&(d=g(b,d),1<b.lineWidth?(m.edgePrimType=c.TRIANGLE_STRIP,m.nEdgeVerts=4,m.edgeVertexData=a.createFloat32Array([-d.hx,0,-d.hx,-0,d.hx,0,d.hx,-0]),m.coordOffsetData=[0,d.hLWY,0,-d.hLWY,0,d.hLWY,0,-d.hLWY]):(m.edgePrimType=c.LINES,m.nEdgeVerts=2,m.edgeVertexData=a.createFloat32Array([-d.hx,0,d.hx,0]),m.coordOffsetData=f(4)),m.edgeColor=b.edgeColor);return m},
makePointShape:function(c,b,d,e){var f={drawEdge:!1};if(f.drawFace=e){d=g(b,d);e=2*Math.PI/14;var p=Array(32);p[0]=0;for(var n=p[1]=0;15>n;n+=1){var q=n+1,r=n*e,s=d.hx*Math.cos(r),r=d.hy*Math.sin(r);p[2*q]=s;p[2*q+1]=r}f.facePrimType=c.TRIANGLE_FAN;f.nFaceVerts=16;f.faceVertexData=a.createFloat32Array(p);f.faceColor=b.edgeColor}return f},makeCircleShape:function(c,d,e,l,m,p){var n={};n.drawEdge=p;n.drawFace=m;e=g(d,e);l=b.getNumCircleSegments(l,0.1);var q=2*Math.PI/(l-1),r=Array(2*(l+1)),s=Array(2*
l);r[0]=0;for(var t=r[1]=0;t<l;t+=1){var u=t+1,v=t*q,w=e.hx*Math.cos(v),v=e.hy*Math.sin(v);r[2*u]=w;r[2*u+1]=v;s[2*t]=w;s[2*t+1]=v}m&&(n.facePrimType=c.TRIANGLE_FAN,n.nFaceVerts=l+1,n.faceVertexData=a.createFloat32Array(r),n.faceColor=d.faceColor);if(p){if(1<d.lineWidth){m=Array(4*l);p=Array(4*l);for(r=0;r<l;r+=1)s=r*q,t=e.hx*Math.cos(s),u=e.hy*Math.sin(s),w=e.hx*Math.cos(s),v=e.hy*Math.sin(s),m[4*r]=t,m[4*r+1]=u,m[4*r+2]=w,m[4*r+3]=v,t=-e.hLWX*Math.cos(s),u=-e.hLWY*Math.sin(s),w=e.hLWX*Math.cos(s),
s=e.hLWY*Math.sin(s),p[4*r]=t,p[4*r+1]=u,p[4*r+2]=w,p[4*r+3]=s;n.edgePrimType=c.TRIANGLE_STRIP;n.nEdgeVerts=2*l;n.edgeVertexData=a.createFloat32Array(m);n.coordOffsetData=p}else n.edgePrimType=c.LINE_STRIP,n.nEdgeVerts=l,n.edgeVertexData=a.createFloat32Array(s),n.coordOffsetData=f(2*l);n.edgeColor=d.edgeColor}return n},makeXShape:function(c,b,d,e){var m={};m.drawEdge=e;m.drawFace=!1;if(e){var p=g(b,d);d=0.7071*p.hx;e=0.7071*p.hy;if(1<b.lineWidth){var n=0.7071*p.hLWX,p=0.7071*p.hLWY;m.edgePrimType=
c.TRIANGLE_STRIP;m.nEdgeVerts=8;m.edgeVertexData=a.createFloat32Array([-d,-e,-d,-e,d,e,d,e,-d,e,-d,e,d,-e,d,-e]);m.coordOffsetData=[-n,p,n,-p,-n,p,n,-p,n,p,-n,-p,n,p,-n,-p]}else m.edgePrimType=c.LINES,m.nEdgeVerts=4,m.edgeVertexData=a.createFloat32Array([-d,-e,d,e,-d,e,d,-e]),m.coordOffsetData=f(8);m.edgeColor=b.edgeColor}return m},makeAsteriskShape:function(c,b,d,e){var m={};m.drawEdge=e;m.drawFace=!1;if(e){d=g(b,d);e=0.7071*d.hx;var p=0.7071*d.hy;if(1<b.lineWidth){var n=0.7071*d.hLWX,q=0.7071*d.hLWY;
m.edgePrimType=c.TRIANGLE_STRIP;m.nEdgeVerts=16;m.edgeVertexData=a.createFloat32Array([-d.hx,0,-d.hx,0,d.hx,0,d.hx,0,0,-d.hy,0,-d.hy,0,d.hy,0,d.hy,-e,-p,-e,-p,e,p,e,p,-e,p,-e,p,e,-p,e,-p]);m.coordOffsetData=[0,d.hLWY,0,-d.hLWY,0,d.hLWY,0,-d.hLWY,d.hLWX,0,-d.hLWX,0,d.hLWX,0,-d.hLWX,0,-n,q,n,-q,-n,q,n,-q,n,q,-n,-q,n,q,-n,-q]}else m.edgePrimType=c.LINES,m.nEdgeVerts=8,m.edgeVertexData=a.createFloat32Array([-d.hx,0,d.hx,0,0,-d.hy,0,d.hy,-e,-p,e,p,-e,p,e,-p]),m.coordOffsetData=f(16);m.edgeColor=b.edgeColor}return m},
makeSquareShape:function(c,b,d,e,m){var p={};p.drawFace=e;p.drawEdge=m;var n=g(b,d);d=0.78*n.hx;var q=0.78*n.hy;e&&(p.facePrimType=c.TRIANGLE_STRIP,p.nFaceVerts=4,p.faceVertexData=a.createFloat32Array([-d,-q,-d,q,d,-q,d,q]),p.faceColor=b.faceColor);m&&(1<b.lineWidth?(e=0.7071*n.hLWX,m=0.7071*n.hLWY,p.edgePrimType=c.TRIANGLE_STRIP,p.nEdgeVerts=10,p.edgeVertexData=a.createFloat32Array([-d,-q,-d,-q,-d,q,-d,q,d,q,d,q,d,-q,d,-q,-d,-q,-d,-q]),p.coordOffsetData=[e,m,-e,-m,e,-m,-e,m,-e,-m,e,m,-e,m,e,-m,e,
m,-e,-m]):(p.edgePrimType=c.LINE_STRIP,p.nEdgeVerts=5,p.edgeVertexData=a.createFloat32Array([-d,-q,-d,q,d,q,d,-q,-d,-q]),p.coordOffsetData=f(10)),p.edgeColor=b.edgeColor);return p},makePyramidShape:function(a,b,d,e,f){return this.makeGeneralTriangleShape(a,b,d,e,f,function(a){return a})},makeTriangleShape:function(a,b,d,e,f){return this.makeGeneralTriangleShape(a,b,d,e,f,function(a){return[-a[0],-a[1]]})},makeLeftShape:function(a,b,d,e,f){return this.makeGeneralTriangleShape(a,b,d,e,f,function(a){return[-a[1],
a[0]]})},makeRightShape:function(a,b,d,e,f){return this.makeGeneralTriangleShape(a,b,d,e,f,function(a){return[a[1],-a[0]]})},makeGeneralTriangleShape:function(c,b,d,l,m,p){var n={};n.drawFace=l;n.drawEdge=m;d=g(b,d);var q=[-1.154378,-0.6665,1.154378,-0.6665,0,1.333],q=e(q,p,d.hx,d.hy);l&&(n.facePrimType=c.TRIANGLES,n.nFaceVerts=3,n.faceVertexData=a.createFloat32Array(q),n.faceColor=b.faceColor);m&&(1<b.lineWidth?(n.edgePrimType=c.TRIANGLE_STRIP,n.nEdgeVerts=8,n.edgeVertexData=a.createFloat32Array([q[0],
q[1],q[0],q[1],q[2],q[3],q[2],q[3],q[4],q[5],q[4],q[5],q[0],q[1],q[0],q[1]]),c=Math.sqrt(3)/2/0.5,n.coordOffsetData=e([c,1,-c,-1,-c,1,c,-1,0,-2,0,2,c,1,-c,-1],p,d.hLWX,d.hLWY)):(n.edgePrimType=c.LINE_STRIP,n.nEdgeVerts=4,n.edgeVertexData=a.createFloat32Array([q[0],q[1],q[2],q[3],q[4],q[5],q[0],q[1]]),n.coordOffsetData=f(8)),n.edgeColor=b.edgeColor);return n},makeDiamondShape:function(c,b,d,e,m){var p={};p.drawFace=e;p.drawEdge=m;d=g(b,d);var n=1.333*d.hy;e&&(p.facePrimType=c.TRIANGLE_STRIP,p.nFaceVerts=
4,p.faceVertexData=a.createFloat32Array([0,-n,d.hx,0,-d.hx,0,0,n]),p.faceColor=b.faceColor);m&&(1<b.lineWidth?(p.edgePrimType=c.TRIANGLE_STRIP,p.nEdgeVerts=10,c=1.25*d.hLWX,e=5/3*d.hLWY,p.edgeVertexData=a.createFloat32Array([0,-n,0,-n,d.hx,0,d.hx,0,0,n,0,n,-d.hx,0,-d.hx,0,0,-n,0,-n]),p.coordOffsetData=[0,e,0,-e,-c,0,c,0,0,-e,0,e,c,0,-c,0,0,e,0,-e]):(p.edgePrimType=c.LINE_STRIP,p.nEdgeVerts=5,p.edgeVertexData=a.createFloat32Array([0,-n,d.hx,0,0,n,-d.hx,0,0,-n]),p.coordOffsetData=f(10)),p.edgeColor=
b.edgeColor);return p},makeStarShape:function(c,b,d,e,m,p){var n={};n.drawFace=m;n.drawEdge=p;var q=Math.PI/c,r=g(d,e);e=function(a,c,b,d){};if(m){n.facePrimType=b.TRIANGLE_FAN;n.nFaceVerts=2*c+2;n.faceColor=d.faceColor;var s=a.createFloat32Array(2*n.nFaceVerts);s[0]=0;s[1]=0;n.faceVertexData=s;e=function(a,c,b,d){s[2*a+2]=c*r.hx*b;s[2*a+3]=c*r.hy*d}}m=function(a,c,b,d,e){};if(p)if(1<d.lineWidth){n.edgePrimType=b.TRIANGLE_STRIP;n.nEdgeVerts=4*c+2;n.edgeColor=d.edgeColor;var t=a.createFloat32Array(2*
n.nEdgeVerts),u=f(2*n.nEdgeVerts);n.edgeVertexData=t;n.coordOffsetData=u;m=function(a,c,b,e,f){t[4*a]=c*r.hx*e;t[4*a+1]=c*r.hy*f;t[4*a+2]=c*r.hx*e;t[4*a+3]=c*r.hy*f;c=-b;1===d.size.length&&d.lineWidth>d.size[0]&&(c=-d.size[0]/d.lineWidth);u[4*a]=c*r.hLWX*e;u[4*a+1]=c*r.hLWY*f;u[4*a+2]=b*r.hLWX*e;u[4*a+3]=b*r.hLWY*f}}else n.edgePrimType=b.LINE_STRIP,n.nEdgeVerts=2*c+1,n.edgeColor=d.edgeColor,n.coordOffsetData=f(2*n.nEdgeVerts),t=a.createFloat32Array(2*n.nEdgeVerts),n.edgeVertexData=t,m=function(a,
c,b,d,e){t[2*a]=c*r.hx*d;t[2*a+1]=c*r.hy*e};b=Math.cos(2*q)/Math.cos(q);p=1/Math.cos(2*q);for(var v=1/Math.cos(q),w=0;w<c;w++){var x=2*Math.PI*w/c,y=Math.sin(x),B=Math.cos(x);e(2*w,1,y,B);m(2*w,1,p,y,B);y=x+q;x=Math.sin(y);y=Math.cos(y);e(2*w+1,b,x,y);m(2*w+1,b,v,x,y)}e(2*c,1,0,1);m(2*c,1,p,0,1);return n},computeMarkerLOD:function(a,e){var f=1;if(e.style===d.MarkerStyle.circle)if(e.sizeBinding===d.Binding.primitive){for(var g=f=0;g<e.vertexData.length/3;g+=1)e.size[g]>f&&(f=e.size[g]);f=b.convertPoints2DevicePixels(a,
f)}else f=b.convertPoints2DevicePixels(a,e.size[0]);return f}}})},"graphics/MWSG/WideLineUtils":function(){define(["graphics/MWSG/Point3","graphics/MWSG/Point4","graphics/MWSG/Utilities","graphics/MWSG/Enum","graphics/MWSG/TypedArrayUtils"],function(g,f,e,d,b){return{addWideLinePerVertexData:function(a,c,d){if(null===a)throw"data invalid.";if(0!==a.length%c)throw"data length must be divisible by # of components.";for(var e=b.createFloat32Array(a.length*d),f=a.length/c,g=0;g<f;g++)for(var p=0;p<c;p++)e[d*
c*g+p]=a[c*g+p],e[d*c*g+c+p]=a[c*g+p];return e},addWideLineVertexUnitDistPointData:function(a,c){for(var d=b.createFloat32Array(c),e=0;e<a.length/3;e+=2){var f=new g(a[3*e],a[3*e+1],a[3*e+2]),m=new g(a[3*(e+1)],a[3*(e+1)+1],a[3*(e+1)+2]),p=new g(m.getX()-f.getX(),m.getY()-f.getY(),m.getZ()-f.getZ()),p=new g(p.getX()/p.length(),p.getY()/p.length(),p.getZ()/p.length());d[6*e]=f.getX()+p.getX();d[6*e+1]=f.getY()+p.getY();d[6*e+2]=f.getZ()+p.getZ();d[6*e+3]=f.getX()-p.getX();d[6*e+4]=f.getY()-p.getY();
d[6*e+5]=f.getZ()-p.getZ();d[6*(e+1)]=m.getX()+p.getX();d[6*(e+1)+1]=m.getY()+p.getY();d[6*(e+1)+2]=m.getZ()+p.getZ();d[6*(e+1)+3]=m.getX()-p.getX();d[6*(e+1)+4]=m.getY()-p.getY();d[6*(e+1)+5]=m.getZ()-p.getZ()}return d},_getNumStripsWithMinimumVertices:function(a,c){for(var b=a.length-1,d=0,e=0,f=0;f<b;++f){var g=a[f+1]-a[f];g<c||(++d,e+=g)}return[d,e]},addWideLineStripPerVertexData:function(a,c,d,f,g){if(null==c)throw"data is not defined.";if(0>d||4<d)throw"bytes per vertex is not in the proper range.";
if(2>c.length/d)throw"At least the data for two vertex should be passed.";for(var m=a.length-1,p=this._getNumStripsWithMinimumVertices(a,2),n=p[0],p=p[1],p=!0===g?p+n:p,n=b.createFloat32Array((p+(p-2*n))*f*d),q=p=0;q<m;++q){var r=a[q]-1,s=a[q+1]-1-r;if(!(2>s)){for(var t=0;t<s;++t){var u=f;if(0<t&&(t<s-1||!0===g))u*=2;p=e.copyVertex(c,(r+t)*d,n,p,d,u)}!0===g&&(p=e.copyVertex(c,r*d,n,p,d,f))}}return n},_getNextUnitVector:function(a,c,b,d,e,f){function p(a){a+=b;!0===d&&(a<e?a=a-e+f:a>=f&&(a=a-f+e));
return a}if(0===b)throw"increment must be nonzero";if(Math.abs(b)>f-e)throw"increment is larger than difference between endInd and stInd";for(var n=new g(a[3*c],a[3*c+1],a[3*c+2]),q=new g(0,0,0),r=p(c);0===q.length()&&(d?r!==c:r>e-1&&r<f);)q=new g(a[3*r],a[3*r+1],a[3*r+2]),q=0>b?new g(n.getX()-q.getX(),n.getY()-q.getY(),n.getZ()-q.getZ()):new g(q.getX()-n.getX(),q.getY()-n.getY(),q.getZ()-n.getZ()),r=p(r);return q.normalize()},addWideLineStripVertexUnitDistPointData:function(a,c,d,e){d=b.createFloat32Array(d);
for(var f=a.length-1,m=0,p=0;p<f;++p){var n=a[p]-1,q=a[p+1]-1;if(!(2>q-n)){var r=n,s=new g(c[3*r],c[3*r+1],c[3*r+2]),t=this._getNextUnitVector(c,r,1,e,n,q);d[m++]=s.getX()+t.getX();d[m++]=s.getY()+t.getY();d[m++]=s.getZ()+t.getZ();d[m++]=s.getX();d[m++]=s.getY();d[m++]=s.getZ();d[m++]=s.getX()-t.getX();d[m++]=s.getY()-t.getY();d[m++]=s.getZ()-t.getZ();for(var u=r+1,s=!0===e?q:q-1,t=t=u;t<s;t++){var u=t,v=new g(c[3*u],c[3*u+1],c[3*u+2]),w=this._getNextUnitVector(c,u,-1,e,n,q),u=this._getNextUnitVector(c,
u,1,e,n,q);d[m++]=v.getX()+w.getX();d[m++]=v.getY()+w.getY();d[m++]=v.getZ()+w.getZ();d[m++]=v.getX();d[m++]=v.getY();d[m++]=v.getZ();d[m++]=v.getX()-w.getX();d[m++]=v.getY()-w.getY();d[m++]=v.getZ()-w.getZ();d[m++]=v.getX()+u.getX();d[m++]=v.getY()+u.getY();d[m++]=v.getZ()+u.getZ();d[m++]=v.getX();d[m++]=v.getY();d[m++]=v.getZ();d[m++]=v.getX()-u.getX();d[m++]=v.getY()-u.getY();d[m++]=v.getZ()-u.getZ()}u=t;!0===e&&(u=r);r=new g(c[3*u],c[3*u+1],c[3*u+2]);n=this._getNextUnitVector(c,u,-1,e,n,q);d[m++]=
r.getX()+n.getX();d[m++]=r.getY()+n.getY();d[m++]=r.getZ()+n.getZ();d[m++]=r.getX();d[m++]=r.getY();d[m++]=r.getZ();d[m++]=r.getX()-n.getX();d[m++]=r.getY()-n.getY();d[m++]=r.getZ()-n.getZ()}}return d},getWideLineStripDrawIndices:function(a){var c=a.stripData.length-1;a=a.actualVertexDataLen+(!0===a.isLineLoop?c:0)-c;for(var c=new Uint16Array(6*a),b=0,d=0;d<a;++d){var e=6*d;c[b++]=e+3;c[b++]=e+0;c[b++]=e+4;c[b++]=e+1;c[b++]=e+5;c[b++]=e+2}return c},_calculateNumberOfJoins:function(a,c){for(var b=
a.length-1,d=0,e=0;e<b;++e)2>a[e+1]-a[e]||(d+=a[e+1]-a[e]-2,d+=c?2:0);return d},addWideLineStripJoinsVertexData:function(a,c,d,e,f){function g(a){for(var b=0;b<e;b++){var d=a*p;q[r++]=c[d+0];q[r++]=c[d+1];q[r++]=c[d+2]}}d=a.length-1;for(var p=3,n=this._calculateNumberOfJoins(a,f)*e*p,q=b.createFloat32Array(n),r=0,n=0;n<d;n++){for(var s=a[n];s<a[n+1]-2;s++)g(s);!0===f&&(g(a[n+1]-2),g(a[n]-1))}return q},addWideLineStripJoinsPerVertexColorData:function(a,c,d,e,f,g){function p(a){for(var b=0;b<e;b++)for(var d=
a*f,g=0;g<f;g++)q[r++]=c[d+g]}d=a.length-1;for(var n=this._calculateNumberOfJoins(a,g)*e*f,q=b.createFloat32Array(n),r=0,n=0;n<d;n++)for(var s=a[n];s<a[n+1]-2;s++)p(s),!0===g&&(p(a[n+1]-2),p(a[n]-1));return q},addWideLineStripJoinsUnitVectorData:function(a,c,d,e,f){d=a.length-1;for(var m=this._calculateNumberOfJoins(a,f)*e,p=b.createFloat32Array(3*m),n=b.createFloat32Array(3*m),m=b.createFloat32Array(m),q=0,r=0,s=0,t=0;t<d;++t)for(var u=a[t]-1,v=a[t+1]-1,w=!0===f?v+1:v-1,x=u+1;x<w;x++){var y=x;y>=
v&&(y=y%v+u);for(var B=new g(c[3*y],c[3*y+1],c[3*y+2]),D=this._getNextUnitVector(c,y,-1,f,u,v),y=this._getNextUnitVector(c,y,1,f,u,v),E=0;E<e;E++)p[q++]=B.getX()-D.getX(),p[q++]=B.getY()-D.getY(),p[q++]=B.getZ()-D.getZ(),n[r++]=B.getX()+y.getX(),n[r++]=B.getY()+y.getY(),n[r++]=B.getZ()+y.getZ(),m[s++]=E}return[m,p,n]},addLineJoinsStippleCoords:function(a,c,d,g,l){a=b.createFloat32Array(a);for(var m=d.length-1,p=0;p<m;p++)for(var n=d[p]-1,q=d[p+1]-2,r=n,r=new f(c[3*r],c[3*r+1],c[3*r+2],1),s=e.convertPointToScreenSpace(r,
l),r=0,n=n+1;n<=q;n++){for(var t=new f(c[3*n],c[3*n+1],c[3*n+2],1),u=e.convertPointToScreenSpace(t,l),t=u[0]-s[0],s=u[1]-s[1],s=Math.sqrt(t*t+s*s),r=r+s,t=(n-1)*g;t<n*g;t++)a[t]=r;s=u}return a},vertexCountPerJoin:function(a){var b=0;return b=a===d.LineJoin.chamfer?3:a===d.LineJoin.miter?4:a===d.LineJoin.round?8:0},addWideLineCapsVertexData:function(a,c,d){for(var e=a.length-1,f=b.createFloat32Array(3*2*d*e),g=0,p=0;p<e;++p)for(var n=0;2>n;n++)for(var q=n*(a[p+1]-a[p]-1)+a[p]-1,r=0;r<d;r++)f[g++]=
c[3*q],f[g++]=c[3*q+1],f[g++]=c[3*q+2];return f},addWideLineCapsPerVertexColorData:function(a,c,d,e){for(var f=a.length-1,g=b.createFloat32Array(2*d*f*e),p=0,n=0;n<f;++n)for(var q=0;2>q;q++)for(var r=a[n+1]-a[n],r=c.length===e?0:q*(r-1)+a[n]-1,s=0;s<d;s++)for(var t=0;t<e;t++)g[p++]=c[e*r+t];return g},addWideLineCapsUnitVectorData:function(a,c,d){for(var e=a.length-1,f=2*d*e,m=b.createFloat32Array(3*f),f=b.createFloat32Array(f),p=0;p<e;++p){var n=a[p]-1,q=n+1,n=new g(c[3*n],c[3*n+1],c[3*n+2]),r=new g(c[3*
q],c[3*q+1],c[3*q+2]),q=a[p+1]-2,s=q-1,q=new g(c[3*q],c[3*q+1],c[3*q+2]),s=new g(c[3*s],c[3*s+1],c[3*s+2]),r=new g(r.getX()-n.getX(),r.getY()-n.getY(),r.getZ()-n.getZ()),t=r.length();r.scalarMult(1/t);s=new g(s.getX()-q.getX(),s.getY()-q.getY(),s.getZ()-q.getZ());t=s.length();s.scalarMult(1/t);for(t=0;t<d;t++)m[6*p*d+0*d+3*t]=n.getX()+r.getX(),m[6*p*d+0*d+3*t+1]=n.getY()+r.getY(),m[6*p*d+0*d+3*t+2]=n.getZ()+r.getZ(),f[2*p*d+0*d+t]=t,m[6*p*d+3*d+3*t]=q.getX()+s.getX(),m[6*p*d+3*d+3*t+1]=q.getY()+s.getY(),
m[6*p*d+3*d+3*t+2]=q.getZ()+s.getZ(),f[2*p*d+1*d+t]=t}return[f,m]},addLineCapsStippleCoords:function(a,c,d,g){void 0===a&&(a=[1,3]);for(var l=a.length-1,m=2*d,p=b.createFloat32Array(m*l),n=0;n<l;n++){for(var q=6*(a[n]-1-n),r=6*(a[n+1]-2)-3*(2*n+1),s=new f(c[3*q],c[3*q+1],c[3*q+2],1),t=e.convertPointToScreenSpace(s,g),s=0,q=q+3;q<=r;q+=6)var u=new f(c[3*q],c[3*q+1],c[3*q+2],1),u=e.convertPointToScreenSpace(u,g),v=u[0]-t[0],t=u[1]-t[1],t=Math.sqrt(v*v+t*t),s=s+t,t=u;q=n*m;for(r=q+m;q<r;q++)p[q]=Math.floor(q/
(d+n*m))*s}return p},vertexCountPerCap:function(a){var b=0;return b=a===d.LineCap.square?6:a===d.LineCap.round?10:0}}})},"graphics/MWSG/LightingUtils":function(){define(["graphics/MWSG/shader/WebGLShaderVariables","graphics/MWSG/Enum","graphics/MWSG/TypedArrayUtils","graphics/MWSG/matrix4x4","graphics/MWSG/Point4"],function(g,f,e,d,b){return{transformLightPosToWorld:function(a,c,e,g){var l=new d;c=new b(c[0],c[1],c[2],1);e=g.times(e);a===f.LightStyle.infinite?(c.setW(0),l=e.createInverseTranspose()):
l.setElements(e.getElements());a=l.transform(c);return[a.getX(),a.getY(),a.getZ()]},addMaterialProperties:function(a,b){a.materialProps={ambientStrength:b.ambientStrength,diffuseStrength:b.diffuseStrength,specularStrength:b.specularStrength,specularColorReflectance:b.specularColorReflectance,specularExponent:b.specularExponent}},processNormalsData:function(a,b,d,g){var l=[];if(b===f.Binding.primitive){var l=e.createFloat32Array(3*a.nVertices),m=b=0,p=1;g===f.PrimitiveType.line?p=2:g===f.PrimitiveType.triangle&&
(p=3);a=a.nVertices/p;for(g=0;g<a;g++)for(var n=d[m++],q=d[m++],r=d[m++],s=0;s<p;s++)l[b++]=n,l[b++]=q,l[b++]=r}else b===f.Binding.vertex&&(l=d);return l},addUniformLocations:function(a){var b=a.shader;a.LightingUniforms={};a.LightingUniforms.modelViewMatUniformLoc=b.getUniformLocation(g.ModelViewMatrix.id);a.LightingUniforms.normalMatrixUniformLoc=b.getUniformLocation(g.NormalMatrix.id);a.LightingUniforms.eyePosUniformLoc=b.getUniformLocation(g.EyePos.id);a.LightingUniforms.materialAmbientStrengthUniformLoc=
b.getUniformLocation(g.Material_AmbientStrength.id);a.LightingUniforms.materialDiffuseStrengthUniformLoc=b.getUniformLocation(g.Material_DiffuseStrength.id);a.LightingUniforms.materialSpecularStrengthUniformLoc=b.getUniformLocation(g.Material_SpecularStrength.id);a.LightingUniforms.materialSpecularColorReflectanceUniformLoc=b.getUniformLocation(g.Material_SpecularColorReflectance.id);a.LightingUniforms.materialSpecularExponentUniformLoc=b.getUniformLocation(g.Material_SpecularExponent.id);a.LightingUniforms.lightsCountUniformLoc=
b.getUniformLocation(g.LightCount.id);a.LightingUniforms.lightsUniformLocs=[];for(var d=g.Light0_Style.id,e=g.Light0_Color.id,f=g.Light0_Position.id,m=0;8>m;m++)a.LightingUniforms.lightsUniformLocs[m]={styleUniformLoc:b.getUniformLocation(d+3*m),colorUniformLoc:b.getUniformLocation(e+3*m),positionUniformLoc:b.getUniformLocation(f+3*m)};a.LightingUniforms.separateSpecularColorUniformLoc=b.getUniformLocation(g.SeparateSpecularColor.id);a.LightingUniforms.sceneAmbientLightColorUniformLoc=b.getUniformLocation(g.SceneAmbientLightColor.id)},
_determineEyePos:function(a){var c=new d;c.setElements(a.getElements());c.invert();a=new b(0,0,0,1);c=c.transform(a);return[c.getX(),c.getY(),c.getZ()]},_createNormalMatrix:function(a){var b=new d;b.setElements(a.getElements());b.invert();var f=b.transpose().getElements();a=f[0];var b=f[4],g=f[8],l=f[1],m=f[5],p=f[9],n=f[2],q=f[6],f=f[10],r=e.createFloat32Array(9);r[0]=a;r[1]=l;r[2]=n;r[3]=b;r[4]=m;r[5]=q;r[6]=g;r[7]=p;r[8]=f;return r},loadDataToUniforms:function(a,b,d,e,f,g,p,n){b=d.times(b);var q=
this._createNormalMatrix(b);a.uniformMatrix4fv(e.LightingUniforms.modelViewMatUniformLoc,!1,b.getAsFloat32Array());a.uniformMatrix3fv(e.LightingUniforms.normalMatrixUniformLoc,!1,q);d=this._determineEyePos(d);a.uniform3fv(e.LightingUniforms.eyePosUniformLoc,d);a.uniform1f(e.LightingUniforms.materialAmbientStrengthUniformLoc,e.materialProps.ambientStrength);a.uniform1f(e.LightingUniforms.materialDiffuseStrengthUniformLoc,e.materialProps.diffuseStrength);a.uniform1f(e.LightingUniforms.materialSpecularStrengthUniformLoc,
e.materialProps.specularStrength);a.uniform1f(e.LightingUniforms.materialSpecularColorReflectanceUniformLoc,e.materialProps.specularColorReflectance);a.uniform1f(e.LightingUniforms.materialSpecularExponentUniformLoc,e.materialProps.specularExponent);a.uniform1i(e.LightingUniforms.lightsCountUniformLoc,g.length);for(b=d=0;b<f.length;b++)q=f[b],-1<g.indexOf(q.id)&&(styleLoc=e.LightingUniforms.lightsUniformLocs[d].styleUniformLoc,colorLoc=e.LightingUniforms.lightsUniformLocs[d].colorUniformLoc,positionLoc=
e.LightingUniforms.lightsUniformLocs[d].positionUniformLoc,a.uniform1i(styleLoc,q.style),a.uniform3fv(colorLoc,q.color),a.uniform3fv(positionLoc,q.position),d++);a.uniform1i(e.LightingUniforms.separateSpecularColorUniformLoc,n);a.uniform3fv(e.LightingUniforms.sceneAmbientLightColorUniformLoc,p)}}})},"graphics/MWSG/transparency/DepthPeelerDrawer":function(){define("dojo/_base/declare graphics/MWSG/webgl_renderer graphics/MWSG/transparency/DepthPeelerResourceManager graphics/MWSG/ShaderConfigFcns/DrawPassShaderConfigFcns graphics/MWSG/ShaderConfigFcns/DepthPeelingPassShaderConfigFcns graphics/MWSG/shader/WebGLShaderVariables graphics/MWSG/transparency/TailBlendDrawer graphics/MWSG/transparency/DepthPeelerDebugShowLayer".split(" "),
function(g,f,e,d,b,a,c,h){return g([],{constructor:function(){this._numTransparentLayers=5},setNumLayers:function(a){this._numTransparentLayers=a;this._resourceMgr.setNumLayers(this._numTransparentLayers)},_initShaderConfigFunctions:function(){this._drawPassShaderConfigFcns||(this._drawPassShaderConfigFcns=new d);this._depthPeelerShaderConfigFcns||(this._depthPeelerShaderConfigFcns=new b(!0));this._depthPeelerShaderConfigFcnsForFirstLayer||(this._depthPeelerShaderConfigFcnsForFirstLayer=new b)},draw:function(b,
d,e,f,g,h){this._initShaderConfigFunctions();if(!this.canDraw())throw Error("Depth peeling isn't supported");var r=b.getViewport();this._resourceMgr.updateResources(r.width,r.height);r=b.getWebGLContext();r.depthMask(!0);r.enable(r.DEPTH_TEST);r.depthFunc(r.LEQUAL);r.disable(r.BLEND);r.clear(r.DEPTH_BUFFER_BIT);this.r=b;this._resourceMgr.bindFBO(this._resourceMgr.getOpaqueColorTexture().texture,this._resourceMgr.getOpaqueDepthTexture().texture);b.clearDraw([0,0,0,0]);h(e,b,this._drawPassShaderConfigFcns);
this._resourceMgr.unbindFBO();b.fillUniformsCB=function(b,c){var d=this.r.getModelViewTransform(),e=b.getUniformLocation(a.ModelViewMatrix.id);c.uniformMatrix4fv(e,!1,d.getAsFloat32Array());e=this.r.getProjectionMatrix();d=b.getUniformLocation(a.ProjectionMat.id);c.uniformMatrix4fv(d,!1,e.getAsFloat32Array());for(var d=this.textureList.length,f=0;f<d;f++){e=this.textureList[f];this._resourceMgr.bindTexture(e);var g=this._resourceMgr.getSamplerIndex(e),e=b.getUniformLocation(a["D"+f+"Sampler"].id);
c.uniform1i(e,g)}}.bind(this);this.textureList=[];this.textureList.push(this._resourceMgr.getOpaqueDepthTexture());for(e=0;e<this._numTransparentLayers;++e){0!==e&&(this.textureList[1]=this._resourceMgr.getTransparentDepthTexture(e-1));this._resourceMgr.bindFBO(this._resourceMgr.getTransparentColorTexture(e).texture,this._resourceMgr.getTransparentDepthTexture(e).texture);b.clearDraw([0,0,0,0]);var s=null,s=0===e?this._depthPeelerShaderConfigFcnsForFirstLayer:this._depthPeelerShaderConfigFcns;h(f,
b,s);this._resourceMgr.unbindFBO()}b.fillUniformsCB=void 0;e-=1;var s=this._resourceMgr.getSamplerIndex(this._resourceMgr.getOpaqueDepthTexture()),t=this._resourceMgr.getSamplerIndex(this._resourceMgr.getTransparentDepthTexture(e));f=new c(h,f,this._depthPeelerShaderConfigFcns,this._resourceMgr.getOpaqueDepthTexture().texture,s,this._resourceMgr.getTransparentDepthTexture(e).texture,t);b.clearDraw();r.enable(r.BLEND);h(g,b,this._drawPassShaderConfigFcns);this._resourceMgr.getComposeTexturesCmd().compose(b,
this._resourceMgr.getColorTexturesAlongWithUnit(),f);r.disable(r.DEPTH_TEST);r.depthMask(!1);h(d,b,this._drawPassShaderConfigFcns)},canDraw:function(a){this._initResourceMgr(a);return e.canRunDepthPeeling()},_initResourceMgr:function(a){this._resourceMgr||(this._resourceMgr=new e(a.getWebGLContext(),this._numTransparentLayers))}})})},"graphics/MWSG/ShaderConfigFcns/DepthPeelingPassShaderConfigFcns":function(){define(["dojo/_base/declare","graphics/MWSG/ShaderConfigFcns/DrawPassShaderConfigFcns"],
function(g,f){return g(f,{constructor:function(e){this._useTwoTexturesForDepthTest=e},_addDepthPeelingShaderConfig:function(e){this._useTwoTexturesForDepthTest?e.addShaderOption(e.Opt.discardFragUsingTwoDepthTexture):e.addShaderOption(e.Opt.discardFragUsingOneDepthTexture)},addConfigBeforeFragColorIsSet:function(e,d){this._addDepthPeelingShaderConfig(e);return!1}})})},"graphics/MWSG/transparency/TailBlendDrawer":function(){define(["dojo/_base/declare","graphics/MWSG/shader/WebGLShaderVariables"],
function(g,f){return g([],{constructor:function(e,d,b,a,c,f,g){this._drawCB=e;this._transparentList=d;this._shaderConfig=b;this._opaqueTexture=a;this._opaqueTextureSamplerId=c;this._lastTransparentTexture=f;this._lastTransparentSamplerId=g},draw:function(e){e.fillUniformsCB=function(d,b){b.activeTexture(b.TEXTURE0+this._opaqueTextureSamplerId);b.bindTexture(b.TEXTURE_2D,this._opaqueTexture);var a=d.getUniformLocation(f.D0Sampler.id);b.uniform1i(a,this._opaqueTextureSamplerId);b.activeTexture(b.TEXTURE0+
this._lastTransparentSamplerId);b.bindTexture(b.TEXTURE_2D,this._lastTransparentTexture);a=d.getUniformLocation(f.D1Sampler.id);b.uniform1i(a,this._lastTransparentSamplerId)}.bind(this);this._drawCB(this._transparentList,e,this._shaderConfig);e.fillUniformsCB=void 0}})})},"graphics/MWSG/transparency/DepthPeelerDebugShowLayer":function(){define(["dojo/_base/declare"],function(g){return g([],{drawDebugLayer:function(f,e,d,b,a,c){var g=e.getColorTexturesAlongWithUnit(),k=Object.keys(g).map(function(a){return g[a]}),
l=f.getWebGLContext();e.bindFBO(e.tailBlendingColorTexture(b,a),e.tailBlendingDepthTexture(b,a));l.clear(l.DEPTH_BUFFER_BIT);l.depthMask(!1);l.disable(l.DEPTH_TEST);f.clearDraw([0,0,0,0]);d.draw(f);e.unbindFBO();k.push(e._tailColorTexture);k.push(e.getOpaqueDepthTexture().texture);for(d=c-1;0<=d;d--)k.push(e.getTransparentDepthTexture(d).texture);f.drawTextures(k,!0)}})})},"graphics/MWSG/PickRenderPass":function(){define(["dojo/_base/declare"],function(g){return g([],{constructor:function(f){this.pickViewSize=
f;this.renderDepthBuffer=this.pickFrameBuffer=this.pickTexture=0},getPickViewSize:function(){return this.pickViewSize},draw:function(f,e,d,b,a,c,g,k,l){this._beginPick(f);f.disable(f.BLEND);f.depthMask(!0);f.enable(f.DEPTH_TEST);f.depthFunc(f.LEQUAL);f.clear(f.DEPTH_BUFFER_BIT);var m=null;0<c.length&&(m=e(c,d,b));f.disable(f.DEPTH_TEST);f.depthMask(!1);null===m&&(a?(f.enable(f.DEPTH_TEST),f.depthMask(!0),0<g.length&&(m=e(g,d,b)),f.depthMask(!1),null===m&&0<k.length&&(m=e(k,d,b)),f.disable(f.DEPTH_TEST),
f.depthMask(!1)):0<g.length&&(m=e(g,d,b)));null===m&&0<l.length&&(m=e(l,d,b));this._endPick(f);return m},_beginPick:function(f){void 0!==f&&(0===this.pickTexture&&(this.pickTexture=f.createTexture()),f.bindTexture(f.TEXTURE_2D,this.pickTexture),f.texImage2D(f.TEXTURE_2D,0,f.RGBA,this.pickViewSize.width,this.pickViewSize.height,0,f.RGBA,f.UNSIGNED_BYTE,null),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,f.NEAREST),f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,f.NEAREST),0===this.pickFrameBuffer&&
(this.pickFrameBuffer=f.createFramebuffer()),0===this.renderDepthBuffer&&(this.renderDepthBuffer=f.createRenderbuffer()),f.bindRenderbuffer(f.RENDERBUFFER,this.renderDepthBuffer),f.renderbufferStorage(f.RENDERBUFFER,f.DEPTH_COMPONENT16,this.pickViewSize.width,this.pickViewSize.height),f.bindFramebuffer(f.FRAMEBUFFER,this.pickFrameBuffer),f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,this.pickTexture,0),f.framebufferRenderbuffer(f.FRAMEBUFFER,f.DEPTH_ATTACHMENT,f.RENDERBUFFER,
this.renderDepthBuffer),this.clearPick(f))},clearPick:function(f){f.viewport(0,0,this.pickViewSize.width,this.pickViewSize.height);f.clearColor(0,0,0,0);f.clear(f.COLOR_BUFFER_BIT|f.DEPTH_BUFFER_BIT)},getPickImage:function(f){var e=this.getPickViewSize(),d=new Uint8Array(4*e.width*e.height);f.readPixels(0,0,e.width,e.height,f.RGBA,f.UNSIGNED_BYTE,d);return d},_endPick:function(f){f.bindFramebuffer(f.FRAMEBUFFER,null)}})})},"graphics/MWSG/StateSet":function(){define(["dojo/_base/declare","graphics/MWSG/Point3",
"graphics/MWSG/Plane3","graphics/MWSG/Enum","graphics/MWSG/matrix4x4"],function(g,f,e,d,b){var a=g([],{constructor:function(){this.clipPlanes=[];this.scissorRectangle=[];this.modelTransform=new b;this.viewTransform=new b;this.projectionTransform=new b;this.depthSort=!1},setModelTransform:function(a){this.modelTransform=a},setViewTransform:function(a){this.viewTransform=a},setProjectionTransform:function(a){this.projectionTransform=a},clone_stateset:function(){var b=new a;b.modelTransform=this.modelTransform;
b.viewTransform=this.viewTransform;b.projectionTransform=this.projectionTransform;b.clipPlanes=this.clipPlanes;b.scissorRectangle=this.scissorRectangle;b.depthSort=this.depthSort;return b},appendStatesetModelTransform:function(a){if(void 0!==a){this.modelTransform=this.modelTransform.times(a);var b=this.clipPlanes,d=b.length;this.clipPlanes=[];for(var f=0;f<d;f++)this.clipPlanes.push(e.transformProvidedInverse(a,b[f]))}},setStatesetClipplanes:function(a){this.clipPlanes=[];if(void 0!==a)for(var b=
a.length/4,d=0;d<b;d++){var g=4*d,m=new f(a[g],a[g+1],a[g+2]),g=new e(m,-a[g+3]);this.clipPlanes.push(g)}},setStatesetScissorRectangle:function(a){this.scissorRectangle=void 0===a||4!==a.length?[]:a},apply_stateset:function(a){a.setModelTransform(this.modelTransform);a.setViewTransform(this.viewTransform);a.setProjectionMatrix(this.projectionTransform);a.setClipPlanes(this.clipPlanes);a.setScissorRectangle(this.scissorRectangle);void 0!==this.clipPlanes&&0<this.clipPlanes.length?a.setClipMode(d.ClipMode.planes):
void 0!==this.scissorRectangle&&0<this.scissorRectangle.length?a.setClipMode(d.ClipMode.scissor):a.setClipMode(d.ClipMode.none)}});return a})},"graphics/MWSG/Plane3":function(){define(["dojo/_base/declare","graphics/MWSG/Point3","graphics/MWSG/Point4"],function(g,f,e){var d=g([],{constructor:function(b,a,c){var d;void 0===c?a instanceof f?(c=a,d=Math.sqrt(c.getX()*c.getX()+c.getY()*c.getY()+c.getZ()*c.getZ()),this._nx=c.getX()/d,this._ny=c.getY()/d,this._nz=c.getZ()/d,this._off=this._nx*b.getX()+
this._ny*b.getY()+this._nz*b.getZ()):(c=b,d=Math.sqrt(c.getX()*c.getX()+c.getY()*c.getY()+c.getZ()*c.getZ()),this._nx=c.getX()/d,this._ny=c.getY()/d,this._nz=c.getZ()/d,this._off=a/d):(a=new f(a.getX()-b.getX(),a.getY()-b.getY(),a.getZ()-b.getZ()),c=new f(c.getX()-b.getX(),c.getY()-b.getY(),c.getZ()-b.getZ()),c=new f(a.getY()*c.getZ()-a.getZ()*c.getY(),a.getZ()*c.getX()-a.getX()*c.getZ(),a.getX()*c.getY()-a.getY()*c.getX()),d=Math.sqrt(c.getX()*c.getX()+c.getY()*c.getY()+c.getZ()*c.getZ()),this._nx=
c.getX()/d,this._ny=c.getY()/d,this._nz=c.getZ()/d,this._off=this._nx*b.getX()+this._ny*b.getY()+this._nz*b.getZ())},getNormal:function(){return new f(this._nx,this._ny,this._nz)},getOffset:function(){return this._off},distance:function(b){return this._nx*b.getX()+this._ny*b.getY()+this._nz*b.getZ()-this._off},offset:function(b){return new d(this.getNormal(),this._off+b)},nearestPointOnPlane:function(b){var a=this.getNormal(),c=-this._off,d=b.getX()*a.getX()+b.getY()*a.getY()+b.getZ()*a.getZ(),a=
new f((d+c)*a.getX(),(d+c)*a.getY(),(d+c)*a.getZ());return new f(b.getX()-a.getX(),b.getY()-a.getY(),b.getZ()-a.getZ())},negate:function(){return new d(new f(-this._nx,-this._ny,-this._nz),-this._off)},evaluate:function(b){return this._nx*b.getX()+this._ny*b.getY()+this._nz*b.getZ()-this._off*b.getW()}});d.transform=function(b,a){var c=new e(a.getNormal().getX(),a.getNormal().getY(),a.getNormal().getZ(),-a.getOffset()),c=b.createInverseTranspose().transform(c);return new d(new f(c.getX(),c.getY(),
c.getZ()),-c.getW())};d.transformProvidedInverse=function(b,a){var c=new e(a.getNormal().getX(),a.getNormal().getY(),a.getNormal().getZ(),-a.getOffset()),c=b.transpose().transform(c);return new d(new f(c.getX(),c.getY(),c.getZ()),-c.getW())};return d})},"graphics/MWSG/draw_fcns":function(){define(["dojo/_base/array","graphics/MWSG/Enum","graphics/MWSG/SceneTreeUtils","graphics/MWSG/Utilities","graphics/MWSG/TypedArrayUtils"],function(g,f,e,d,b){function a(a,b){a.isTransparentObject=b.isTransparentObject;
a.vertexData=e.convertArray(b.vertexdata);void 0!==b&&b.hasOwnProperty("stripdata")&&(a.stripData=e.convertArray(b.stripdata));void 0!==b&&b.hasOwnProperty("colordata")?(a.colorData=e.convertArray(b.colordata),a.colorBinding=b.colorbinding,a.colorType=b.colortype):(a.colorData=[0,0,0,1],a.colorBinding=f.Binding.object,a.colorType=f.ColorType.truecolor);if(void 0!==b&&b.hasOwnProperty("texture"))if(b.texture.hasOwnProperty("encoding")){if(b.texture.encoding===f.ImageFormat.PNG&&b.texture.hasOwnProperty("cdata")){if(void 0===
b.image)throw"shouldn't be here";var c={};c.image=b.image;c.colorType=b.texture.colortype;c.samplingFilter=b.texture.samplingfilter;c.encoding=f.ImageFormat.PNG;a.texture=c}}else a.texture={},a.texture.dims=b.texture.cdata.dims,a.texture.CData=e.convertArray(b.texture.cdata),a.texture.colorType=b.texture.colortype,a.texture.samplingFilter=b.texture.samplingfilter;void 0!==b&&b.hasOwnProperty("clipping")&&(a.clipping=b.clipping);void 0!==b&&b.hasOwnProperty("applylighting")?(a.applyLighting=b.applylighting,
a.ambientStrength=b.ambientstrength,a.diffuseStrength=b.diffusestrength,a.specularStrength=b.specularstrength,a.specularColorReflectance=b.specularcolorreflectance,a.specularExponent=b.specularexponent,a.normalBinding=b.normalbinding,a.normalsData=e.convertArray(b.normalsdata),b.hasOwnProperty("twosidedlighting")&&(a.twoSidedLighting=b.twosidedlighting)):a.applyLighting=!1}function c(a,b){return d.isBoundingBoxTooLargeInClipSpace(b,a.compute_bounding_box(),1E3)}b=function(a,b,c){};var h={LineStrip:function(b,
e,f,g){var h={};if(!b.params||!1===b.clean)a(h,b),h.lineWidth=d.convertPoints2DevicePixels(e,b.width),h.lineStyle=b.style,h.alignVertexCenters=b.alignVertexCenters,h.lineJoin=b.join,h.lineCap=b.cap,h.isLineLoop=!1,b.params=h,b.shaderIDToDrawCacheMap={},b.clean=!0;b.params.clipping&&(b.params.needsFragCoordClipping=c(b,e.computedMVPTransform()));var q=e.getLineShaderConfig(b.params,g),r=q.getUniqueIdentifier();void 0===b.shaderIDToDrawCacheMap[r]&&(b.shaderIDToDrawCacheMap[r]=e.makeLineDrawCache(b.params,
q));b.drawCache=b.shaderIDToDrawCacheMap[r];!0===b.drawCache.drawLineJoins&&(q=e.getLineJoinsShaderConfig(b.params,g),r=q.getUniqueIdentifier(),void 0===b.shaderIDToDrawCacheMap[r]&&(b.shaderIDToDrawCacheMap[r]=e.makeLineJoinsDrawCache(b.params,q)),b.lineJoinsDrawCache=b.shaderIDToDrawCacheMap[r]);!0===b.drawCache.drawLineCaps&&(q=e.getLineCapsShaderConfig(b.params,g),r=q.getUniqueIdentifier(),void 0===b.shaderIDToDrawCacheMap[r]&&(b.shaderIDToDrawCacheMap[r]=e.makeLineCapsDrawCache(h,b.drawCache.isLineStrip,
q)),b.lineCapsDrawCache=b.shaderIDToDrawCacheMap[r]);e.drawLines(b.drawCache,f);!0===b.drawCache.drawLineJoins&&e.drawLineJoins(b.lineJoinsDrawCache,f);!0===b.drawCache.drawLineCaps&&e.drawLineCaps(b.lineCapsDrawCache,f)},LineLoop:function(b,e,f,g){var h={};if(!b.params||!1===b.clean)a(h,b),h.lineWidth=d.convertPoints2DevicePixels(e,b.width),h.lineStyle=b.style,h.alignVertexCenters=b.alignVertexCenters,h.lineJoin=b.join,h.isLineLoop=!0,b.params=h,b.shaderIDToDrawCacheMap={},b.clean=!0;b.params.clipping&&
(b.params.needsFragCoordClipping=c(b,e.computedMVPTransform()));var h=e.getLineShaderConfig(b.params,g),q=h.getUniqueIdentifier();void 0===b.shaderIDToDrawCacheMap[q]&&(b.shaderIDToDrawCacheMap[q]=e.makeLineStripDrawCache(b.params,h));b.drawCache=b.shaderIDToDrawCacheMap[q];!0===b.drawCache.drawLineJoins&&(h=e.getLineJoinsShaderConfig(b.params,g),q=h.getUniqueIdentifier(),void 0===b.shaderIDToDrawCacheMap[q]&&(b.shaderIDToDrawCacheMap[q]=e.makeLineJoinsDrawCache(b.params,h)),b.lineJoinsDrawCache=
b.shaderIDToDrawCacheMap[q]);e.drawLineStrip(b.drawCache,f);!0===b.drawCache.drawLineJoins&&e.drawLineJoins(b.lineJoinsDrawCache,f)},TriangleStrip:function(b,d,e,f){var g={};if(!b.params||!1===b.clean)a(g,b),void 0!==b&&b.hasOwnProperty("faceoffsetbias")&&(g.faceOffsetBias=b.faceoffsetbias),void 0!==b&&b.hasOwnProperty("faceoffsetfactor")&&(g.faceOffsetFactor=b.faceoffsetfactor),b.params=g,b.shaderIDToDrawCacheMap={},b.clean=!0;b.params.clipping&&(b.params.needsFragCoordClipping=c(b,d.computedMVPTransform()));
f=d.getTriangleShaderConfig(b.params,f);g=f.getUniqueIdentifier();void 0===b.shaderIDToDrawCacheMap[g]&&(b.shaderIDToDrawCacheMap[g]=d.makeTriangleDrawCache(b.params,f));b.drawCache=b.shaderIDToDrawCacheMap[g];void 0!==b.drawCache&&d.drawTriangles(b.drawCache,e)},Quadrilateral:function(a,b,c,d){a.draw_fcn=h.TriangleStrip;a.draw_fcn(a,b,c,d)},Text:function(a,b,g,h){var n={};if(!a.params||!1===a.clean){var q=a.string;q instanceof Array?n.string=q:(n.string=Array(1),n.string[0]=q);n.vertexData=e.convertArray(a.vertexdata);
n.colorData=e.convertArray(a.colordata);n.font=a._font;n.rotation=a.rotation;n.horizontalAlignment=a.horizontalalignment;n.verticalAlignment=a.verticalalignment;a.hasOwnProperty("clipping")&&(n.clipping=a.clipping);a.hasOwnProperty("anchorPointClipping")&&(n.anchorPointClipping=a.anchorPointClipping);a.hasOwnProperty("backgroundColor")&&(n.background=e.convertArray(a.backgroundColor));a.hasOwnProperty("edgeColor")&&(n.edgeColor=e.convertArray(a.edgeColor));a.hasOwnProperty("lineWidth")&&(n.lineWidth=
d.convertPoints2DevicePixels(b,a.lineWidth));a.hasOwnProperty("margin")?n.margin=d.convertPoints2DevicePixels(b,a.margin):n.margin=5;a.hasOwnProperty("style")?n.lineStyle=a.style:n.lineStyle=f.LineStyle.solid;n.interpreter=a.interpreter;a.params=n;a.shaderIDToDrawCacheMap={};a.clean=!0}a.params.clipping&&(a.params.needsFragCoordClipping=c(a,b.computedMVPTransform()));n=b.getTextShaderConfig(a.params,h);q=n.getUniqueIdentifier();if(void 0===a.shaderIDToDrawCacheMap[q]){var r=b.getTextBackgroundShaderConfig(a.params,
h);h=b.getTextEdgeShaderConfig(a.params,h);a.shaderIDToDrawCacheMap[q]=b.makeTextDrawCache(a.params,n,r,h)}a.drawCache=a.shaderIDToDrawCacheMap[q];b.drawText(a.drawCache,g)},Marker:function(a,b,h,p){var n=a.style;if(n!==f.MarkerStyle.none){var q={};if(!a.params||!1===a.clean){q.vertexData=e.convertArray(a.vertexdata);q.sizeBinding=a.sizeBinding;q.size=e.convertArray(a.size);if(q.sizeBinding===f.Binding.primitive){if(q.size.length!==q.vertexData.length/3)return}else if(1!==q.size.length)return;void 0!==
a&&a.hasOwnProperty("edgeColor")&&(q.edgeColor=e.convertArray(a.edgeColor));void 0!==a&&a.hasOwnProperty("faceColor")&&(q.faceColor=e.convertArray(a.faceColor));q.isTransparentObject=a.isTransparentObject;q.style=n;n===f.MarkerStyle.point&&(q.size=g.map(q.size,function(a){return Math.max(a/3,1)}));q.lineWidth=d.convertPoints2DevicePixels(b,a.lineWidth);a.hasOwnProperty("clipping")&&(q.clipping=a.clipping);a.hasOwnProperty("anchorPointClipping")&&(q.anchorPointClipping=a.anchorPointClipping);a.params=
q;a.shaderIDToDrawCacheMap={};a.clean=!0}a.params.clipping&&(a.params.needsFragCoordClipping=c(a,b.computedMVPTransform()));p=b.getMarkerShaderConfig(a.params,p);n=p.getUniqueIdentifier();void 0===a.shaderIDToDrawCacheMap[n]&&(a.shaderIDToDrawCacheMap[n]=b.makeMarkerDrawCache(a.params,p));a.drawCache=a.shaderIDToDrawCacheMap[n];b.drawMarkers(a.drawCache,h)}},CompositeMarker:b,LightSource:b,Camera:b,Group:b,Transform:b,TextComp:b,DataSpace:b,ClipNode:b,ScissorRectangleClipNode:b,LightSource:b};return h})},
"graphics/MWSG/cull_fcns":function(){define(["graphics/MWSG/Enum","graphics/MWSG/SceneTreeUtils","graphics/MWSG/Utilities"],function(g,f,e){f=function(b){return!1};var d={LineStrip:function(b){return void 0===b.vertexdata||b.style===g.LineStyle.none?!0:!1},LineLoop:function(b){return void 0===b.vertexdata||b.style===g.LineStyle.none?!0:!1},TriangleStrip:function(b){return void 0===b.vertexdata?!0:!1},Quadrilateral:function(b){b.cull_fcn=d.TriangleStrip;return b.cull_fcn(b)},Text:function(b){return void 0===
b.string?!0:!1},Marker:function(b,a,c,d){return void 0===b.vertexdata||void 0===b.size?!0:!1},CompositeMarker:f,LightSource:f,Camera:f,Group:f,Transform:f,TextComp:f,DataSpace:f,ClipNode:f,ScissorRectangleClipNode:f,LightSource:f};return d})},"graphics/MWSG/create_fcns":function(){define("graphics/MWSG/matrix4x4 graphics/MWSG/Enum dojo/Deferred graphics/MWSG/TextUtils graphics/MWSG/TypedArrayUtils dojo/promise/all".split(" "),function(g,f,e,d,b,a){var c=function(a){var b=new g;void 0!==a.data?b.setElements(a.data):
b.setElements(a);return b},h=function(a){void 0!==a&&a.hasOwnProperty("matrix")?a.transformMatrix=c(a.matrix):a.transformMatrix=c([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])},k=function(a){a.transformMatrix=new g},l=function(a,c){var d=a.vertexdata;delete a.vertexdata;var f=new e;a.deleteFcn=function(a,b){b.getBinaryDataSink().forget(d)};c.getBinaryDataSink().onDataReady(d,function(c,d){a.vertexdata={binarydata:c,binaryDataConversionFcn:function(a){return 4>a.byteLength?[]:b.createFloat32Array(a)}};delete a.deleteFcn;
f.resolve()});return f},m=function(a,c){var d=a.stripdata;delete a.stripdata;var f=new e,g=a.deleteFcn;a.deleteFcn=function(a,b){b.getBinaryDataSink().forget(d);g&&g(a,b)};c.getBinaryDataSink().onDataReady(d,function(c,d){a.stripdata={binarydata:c,binaryDataConversionFcn:function(a){return 4>a.byteLength?void 0:b.createFloat32Array(a)}};delete a.deleteFcn;f.resolve()});return f},p=function(b,c){b.isTransparentObject=b.colortype===f.ColorType.truecoloralpha;var d=[];void 0!==b.vertexdata&&"string"===
typeof b.vertexdata&&d.push(l(b,c));if(void 0!==b&&b.hasOwnProperty("texture")&&(b.texture.colortype===f.TextureColorType.truecoloralpha&&(b.isTransparentObject=!0),b.texture.hasOwnProperty("encoding")&&b.texture.hasOwnProperty("cdata")&&b.texture.encoding===f.ImageFormat.PNG)){var g=c.makeImage(),h=new e;g.onload=function(){h.resolve()};d.push(h);g.src="data:image/png;base64,"+b.texture.cdata.data;b.image=g}void 0!==b.stripdata&&"string"===typeof b.stripdata&&d.push(m(b,c));0<d.length&&(d=a(d),c.addWaitForNodeReady(b.cookie,
d))};return{Camera:function(a){a.projectionMatrix=c(a.projection);a.viewMatrix=c(a.view)},DataSpace:h,Transform:h,ClipNode:k,ScissorRectangleClipNode:k,LineLoop:p,LineStrip:p,Marker:function(a,b){a.isTransparentObject=a.edgecolortype===f.ColorType.truecoloralpha||a.facecolortype===f.ColorType.truecoloralpha;if(void 0!==a.vertexdata&&"string"===typeof a.vertexdata){var c=l(a,b);b.addWaitForNodeReady(a.cookie,c)}},TriangleStrip:p,Quadrilateral:p,Text:function(b,c){b.isTransparentObject=!0;var e=[];
b.Interpreter!==f.TextInterpreter.none&&e.push(d.TexFontsPromise);void 0!==b.vertexdata&&"string"===typeof b.vertexdata&&e.push(l(b,c));0<e.length&&(e=a(e),c.addWaitForNodeReady(b.cookie,e))},LightSource:function(a,b){}}})},"graphics/MWSG/traverse_fcns":function(){define("graphics/MWSG/Enum graphics/MWSG/Utilities graphics/MWSG/matrix4x4 graphics/MWSG/Point4 graphics/MWSG/TypedArrayUtils graphics/MWSG/LightingUtils".split(" "),function(g,f,e,d,b,a){var c=function(a,b,c){if(a.clean&&a.dep_consumed_fcn){var d=
a.dep_consumed_fcn(a,c)&b;0!==d&&(a.clean=!1,a.dependencies=d)}!1===a.clean&&(d=0,a.dep_produced_fcn&&(d=a.dep_produced_fcn(a,c)),b|=d);return b},h=function(a,b,d,e,h){c(a,d,h);d={node:a,stateset:b,dependencies:d};var k=g.Layer.middle;void 0!==a&&a.hasOwnProperty("layer")&&(k=a.layer);if(!d.node.cull_fcn||!1===d.node.cull_fcn(a))void 0!==a.compute_bounding_box&&(a=void 0!==a._cachedBoundingBox?a._cachedBoundingBox:d.node.compute_bounding_box(),b=b.viewTransform.times(b.modelTransform),a.isValid()&&
(b=f.getBBoxNearFar(b,a),h._Near=Math.min(h._Near,b[0]),h._Far=Math.max(h._Far,b[1]))),e(h,d,k)},k=function(a,b,c,d,e){for(var f in a._children)if(a._children.hasOwnProperty(f)){var g=a._children[f];void 0!==g&&g.traverse_fcn&&g.traverse_fcn(g,b,c,d,e)}a.clean=!0},l=function(a,b,d,e,f){d=c(a,d,f);b=b.clone_stateset();b.appendStatesetModelTransform(a.transformMatrix);k(a,b,d,e,f)};return{LineStrip:h,LineLoop:h,TriangleStrip:h,Quadrilateral:h,Text:h,Marker:h,Camera:function(a,b,d,f,g){d=c(a,d,g);b=
b.clone_stateset();b.modelTransform=new e;b.viewTransform=a.viewMatrix;b.projectionTransform=g.transformProjectionMatrixForPass(a.projectionMatrix);b.depthSort=a.depthsort;var h=g._Near,l=g._Far;g._Near=Infinity;g._Far=-Infinity;k(a,b,d,f,g);b.projectionTransform=e.clampProjectionMatrix(b.projectionTransform,g._Near,g._Far);g._Near=h;g._Far=l},Group:function(a,b,d,e,f){d=c(a,d,f);b=b.clone_stateset();b.appendStatesetModelTransform(a.transformMatrix);k(a,b,d,e,f)},CompositeMarker:function(a,b,g,h,
l){g=c(a,g,l);if(void 0!==a.origins&&a.origins.hasOwnProperty("dims")&&a.origins.hasOwnProperty("data"))for(var s=l.getDrawViewport(),t=s.width/window.devicePixelRatio,s=s.height/window.devicePixelRatio,u=l._Near,v=l._Far,w=b.viewTransform.times(b.modelTransform),w=l.untransformProjectionMatrixForPass(b.projectionTransform).times(w),x=f.FindDPI()/72,x=e.createScale(x,x,1),y=a.origins.dims[0],B=a.origins.dims[1],D=0;D<B;D++){var E=b.clone_stateset();E.modelTransform=new e;E.viewTransform=new e;E.projectionTransform=
new e;var F=y*D,F=new d(a.origins.data[F],a.origins.data[F+1],a.origins.data[F+2],1),I=f.convertPointToScreenSpace2(F,w,t,s),F=I[0],I=I[1],F=e.createOrtho(-F,-F+t,-I,-I+s,-1,1),F=e.multiply(x,l.transformProjectionMatrixForPass(F));E.projectionTransform.setElements(F._data);k(a,E,g,h,l);l._Near=u;l._Far=v}},TextComp:function(a,b,d,f,g){d=c(a,d,g);var h=g._Near,l=g._Far,u=b;if("pixels"===a.units){u=b.clone_stateset();u.modelTransform=new e;u.viewTransform=new e;b=a.origin[0];var v=a.origin[1],w=g.getDrawViewport();
b=e.createOrtho(-b,-b+w.width/window.devicePixelRatio,-v,-v+w.height/window.devicePixelRatio,-1,1);u.projectionTransform=g.transformProjectionMatrixForPass(b)}k(a,u,d,f,g);"data"!==a.units&&(g._Near=h,g._Far=l)},Transform:l,DataSpace:l,ClipNode:function(a,b,d,e,f){d=c(a,d,f);b=b.clone_stateset();b.setStatesetClipplanes(a.position);b.appendStatesetModelTransform(a.transformMatrix);k(a,b,d,e,f)},ScissorRectangleClipNode:function(a,d,e,g,h){e=c(a,e,h);d=d.clone_stateset();var l=f.convertRectangleScaledPixels2DevicePixels(h,
{x:a.position[0],y:a.position[1],width:a.position[2],height:a.position[3]}),l=b.createFloat32Array([l.x,l.y,l.width,l.height]);d.setStatesetScissorRectangle(l);d.appendStatesetModelTransform(a.transformMatrix);k(a,d,e,g,h)},LightSource:function(b,c,d,e,f){var g={id:b.id,style:b.style,color:b.color,position:a.transformLightPosToWorld(b.style,b.position,c.modelTransform,c.viewTransform)};f.addLight(g);k(b,c,d,e,f)}}})},"graphics/MWSG/dependency_fcns":function(){define(["graphics/MWSG/Enum"],function(g){var f=
function(e){return g.Dependency.none};return{dep_produced_fcns:{Camera:function(e,d){return g.Dependency.view},LineLoop:f,LineStrip:f,Text:f,Marker:f,TriangleStrip:f,Quadrilateral:f,LightSource:f,Group:f,Transform:f,CompositeMarker:f,TextComp:f,DataSpace:f,ClipNode:f,ScissorRectangleClipNode:f},dep_consumed_fcns:{Text:function(e,d,b){d=g.Dependency.screen_resolution;if(e.hasOwnProperty("backgroundColor")||e.hasOwnProperty("edgeColor"))d|=g.Dependency.viewport;void 0!==e.drawCache&&!0===e.drawCache.viewdependent&&
(d|=g.Dependency.viewport|g.Dependency.view);return d},Marker:function(e,d,b){return g.Dependency.viewport|g.Dependency.screen_resolution},LineStrip:function(e,d,b){return g.Dependency.screen_resolution},LineLoop:function(e,d,b){return g.Dependency.screen_resolution},ScissorRectangleClipNode:function(e,d,b){return g.Dependency.screen_resolution},TriangleStrip:f,Quadrilateral:f,LightSource:f,Camera:f,Group:f,Transform:f,CompositeMarker:f,TextComp:f,DataSpace:f,ClipNode:f}}})},"graphics/MWSG/RenderTimes":function(){define(["dojo/_base/declare"],
function(g){var f=function(){return performance.now()};if(!1==="performance"in window||!1==="now"in window.performance)f=function(){return Date.now()};return g([],{constructor:function(){this._endFrameTime=this._initTime=this._drawTime=this._cullTime=this._clearTime=this._totalTime=this._frameTimeStamp=this._currentTimeStamp=0},reset:function(){this._endFrameTime=this._initTime=this._drawTime=this._cullTime=this._clearTime=this._totalTime=this._frameTimeStamp=this._currentTimeStamp=0},beginFrame:function(){this._frameTimeStamp=
f()},endFrame:function(){this._totalTime=f()-this._frameTimeStamp},beginInit:function(){this._currentTimeStamp=f()},endInit:function(){var e=f();this._initTime+=e-this._currentTimeStamp},beginClear:function(){this._currentTimeStamp=f()},endClear:function(){var e=f();this._clearTime+=e-this._currentTimeStamp},beginCull:function(){this._currentTimeStamp=f()},endCull:function(){var e=f();this._cullTime+=e-this._currentTimeStamp},beginDraw:function(){this._currentTimeStamp=f()},endDraw:function(){var e=
f();this._drawTime+=e-this._currentTimeStamp},beginEndFrame:function(){this._currentTimeStamp=f()},endEndFrame:function(){var e=f();this._endFrameTime+=e-this._currentTimeStamp},getTotalTime:function(){return this._totalTime/1E3},getInitTime:function(){return this._initTime/1E3},getClearTime:function(){return this._clearTime/1E3},getCullTime:function(){return this._cullTime/1E3},getDrawTime:function(){return this._drawTime/1E3},getEndFrameTime:function(){return this._endFrameTime/1E3}})})},"graphics/MWSG/PickResult":function(){define(["dojo/_base/declare"],
function(g){return g([],{constructor:function(){this.traversalIndex=-1;this.node=null;this.intersection={X:NaN,Y:NaN,Z:NaN}},getTraversalIndex:function(){return this.traversalIndex},setTraversalIndex:function(f){this.traversalIndex=f},getNode:function(){return this.node},setNode:function(f){this.node=f},getIntersectionPoint:function(){return this.intersection},setIntersectionPoint:function(f){this.intersection=f}})})},"graphics/MWSG/Picker":function(){define("dojo/_base/declare graphics/MWSG/webgl_renderer graphics/MWSG/PickRenderPass graphics/MWSG/PickColorMapper graphics/MWSG/PickProperties graphics/MWSG/PickResult graphics/MWSG/Utilities graphics/MWSG/EncodeFloat graphics/MWSG/ShaderConfigFcns/DrawPassShaderConfigFcns".split(" "),
function(g,f,e,d,b,a,c,h,k){return g([],{constructor:function(a,c,e,f,g){this.pickColorMapper=new d;this.pickColorMapper.initializeMap(a);this.pickRenderer=f;this.pickRenderPass=g;this.pickProperties=new b},pickNode:function(a,b,c){a.hasOwnProperty("pickable")&&(!1!==a.pickable&&a.drawCache)&&(c=this.pickColorMapper.getColorForIndex(c),this.pickProperties.setCurrentPickColor(c),this.pickShaderConfigFcns||(this.pickShaderConfigFcns=new k),a.pick_fcn(a,b,this.pickRenderer,this.pickProperties,this.pickShaderConfigFcns))},
findIntersectionPoint:function(a,b,d){this.pickRenderPass.clearPick(this.pickRenderer.getWebGLContext());this.pickProperties.setFindIntersectionPoint(!0);this.intersectionPointShaderConfigFcns||(this.intersectionPointShaderConfigFcns=new k);a.pick_fcn(a,b,this.pickRenderer,this.pickProperties,this.intersectionPointShaderConfigFcns);this.pickProperties.setFindIntersectionPoint(!1);var e=this.pickRenderPass.getPickImage(this.pickRenderer.getWebGLContext());a=e[d];b=e[d+1];var f=e[d+2],e=e[d+3],g=[NaN,
NaN,NaN];if(0<a||0<b||0<f||0<e)a=h.decodeColorToFloat(a,b,f,e),d/=4,b=this.pickRenderPass.getPickViewSize(),g=c.convertScreenSpaceToWorldPoint([d%b.width,Math.floor(d/b.width),a],this.pickRenderer.getMVPInvTransform(),b.width,b.height);return{X:g[0].toFixed(5),Y:g[1].toFixed(5),Z:g[2].toFixed(5)}},getHitInfo:function(){var a=this.pickRenderPass.getPickImage(this.pickRenderer.getWebGLContext());return this.pickColorMapper.getMaxAndPixelIndexFromColorArray(a)}})})},"graphics/MWSG/PickColorMapper":function(){define(["dojo/_base/declare",
"graphics/MWSG/Point3"],function(g,f){return g([],{constructor:function(){this.mapSize=0;this.rangeMin=100;this.rangeMax=16581375;this.range=this.rangeMax-this.rangeMin},initializeMap:function(e){this.mapSize=e},getColorForIndex:function(e){var d=0;1<this.mapSize&&(d=e/(this.mapSize-1));e=this.rangeMin+Math.round(d*this.range);return[e>>16&255,e>>8&255,e&255]},getIndexForColor:function(e,d,b){var a=-1;if(0<e||0<d||0<b)a=Math.round((65536*e+256*d+b-this.rangeMin)/this.range*(this.mapSize-1));return a},
getMaxAndPixelIndexFromColorArray:function(e){for(var d=-1,b=-1,a=0;a<e.length;a+=4){var c=this.getIndexForColor(e[a],e[a+1],e[a+2]);c>d&&(d=c,b=a)}return{hitIndex:d,pickedPixelIndex:b}}})})},"graphics/MWSG/PickProperties":function(){define(["dojo/_base/declare"],function(g){return g([],{constructor:function(){this.currentPickColor=[1,1,1];this.findIntersectionPoint=!1},setCurrentPickColor:function(f){this.currentPickColor[0]=f[0];this.currentPickColor[1]=f[1];this.currentPickColor[2]=f[2]},getCurrentPickColor:function(){return this.currentPickColor},
setFindIntersectionPoint:function(f){this.findIntersectionPoint=f},isFindIntersectionPointEnabled:function(){return this.findIntersectionPoint}})})},"graphics/MWSG/bounding_box_fcns":function(){define(["graphics/MWSG/SceneTreeUtils","graphics/MWSG/BoundingBox"],function(g,f){var e=function(){var d=null;if(void 0!==this._cachedBoundingBox)d=this._cachedBoundingBox;else{var d=new f,b=g.convertArray(this.vertexdata),a=3,c=b.length/a;void 0!==this.vertexdata.dims&&(a=this.vertexdata.dims[0],c=this.vertexdata.dims[1]);
switch(a){case 2:for(var e=0;e<c*a;e+=a)d.expandBy(b[e],b[e+1]);break;default:for(e=0;e<c*a;e+=a)d.expandBy(b[e],b[e+1],b[e+2])}this._cachedBoundingBox=d}return d};return{LineStrip:e,LineLoop:e,TriangleStrip:e,Quadrilateral:e,Text:e,Marker:e}})},"graphics/MWSG/BoundingBox":function(){define(["dojo/_base/declare"],function(g){return g([],{constructor:function(){this.MinX=Infinity;this.MaxX=-Infinity;this.MinY=Infinity;this.MaxY=-Infinity;this.MinZ=Infinity;this.MaxZ=-Infinity},getMinX:function(){return this.MinX},
getMaxX:function(){return this.MaxX},getMinY:function(){return this.MinY},getMaxY:function(){return this.MaxY},getMinZ:function(){return this.MinZ},getMaxZ:function(){return this.MaxZ},isValid:function(){var f=!1;Infinity===this.MinZ&&-Infinity===this.MaxZ?this.MinX<=this.MaxX&&this.MinY<=this.MaxY&&(f=!0):this.MinX<=this.MaxX&&(this.MinY<=this.MaxY&&this.MinZ<=this.MaxZ)&&(f=!0);return f},expandBy:function(f,e,d){this.MinX=Math.min(this.MinX,f);this.MaxX=Math.max(this.MaxX,f);this.MinY=Math.min(this.MinY,
e);this.MaxY=Math.max(this.MaxY,e);void 0===d?(this.MinZ=Infinity,this.MaxZ=-Infinity):(this.MinZ=Math.min(this.MinZ,d),this.MaxZ=Math.max(this.MaxZ,d))},getCorner:function(f){return[f&1?this.MaxX:this.MinX,f&2?this.MaxY:this.MinY,f&4?this.MaxZ:this.MinZ]},getAllCorners:function(){var f=[];this.isValid()&&(Infinity===this.MinZ&&-Infinity===this.MaxZ?(f.push({x:this.MinX,y:this.MinY}),f.push({x:this.MinX,y:this.MaxY}),f.push({x:this.MaxX,y:this.MinY}),f.push({x:this.MaxX,y:this.MaxY})):(f.push({x:this.MinX,
y:this.MinY,z:this.MinZ}),f.push({x:this.MinX,y:this.MinY,z:this.MaxZ}),f.push({x:this.MinX,y:this.MaxY,z:this.MinZ}),f.push({x:this.MinX,y:this.MaxY,z:this.MaxZ}),f.push({x:this.MaxX,y:this.MinY,z:this.MinZ}),f.push({x:this.MaxX,y:this.MinY,z:this.MaxZ}),f.push({x:this.MaxX,y:this.MaxY,z:this.MinZ}),f.push({x:this.MaxX,y:this.MaxY,z:this.MaxZ})));return f}})})},"graphics/axes/SceneTreeAxesControl":function(){define("dojo/_base/declare graphics/axes/AxesStructureMixin graphics/axes/GridControl graphics/axes/RulerControl graphics/axes/BaselineControl graphics/axes/AxesControlSceneTreeVisitor graphics/MWSG/matrix4x4 graphics/MWSG/Point4 graphics/axes/NullValueAxisDecoration graphics/axes/TextDecorationControl graphics/axes/SceneTreeAxesControlUtils graphics/MWSG/Enum graphics/MWSG/Utilities".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){return g([f],{fCamera:null,fDataSpace:null,fChildContainer:null,fTitle:null,fXLabel:null,fYLabel:null,fZLabel:null,fXRulerControl:new k,fYRulerControl:new k,fZRulerControl:new k,fXGridControl:new k,fYGridControl:new k,fZGridControl:new k,fXBaseLineControl:new k,fYBaseLineControl:new k,fDataSpaceMatrix:null,fDataSpaceMatrixInverse:null,fLimits:[0,1,0,1,0,1],fCurrentLimits:[0,1,0,1,0,1],_getDataspaceToNDCTransform:function(){var a=new c;this.fChildContainer&&this.fChildContainer.hasOwnProperty("transformMatrix")&&
(a=this.fChildContainer.transformMatrix.times(a));this.fDataSpace&&this.fDataSpace.hasOwnProperty("transformMatrix")&&(a=this.fDataSpace.transformMatrix.times(a));this.fCamera&&this.fCamera.hasOwnProperty("viewMatrix")&&(a=this.fCamera.viewMatrix.times(a));this.fCamera&&this.fCamera.hasOwnProperty("projectionMatrix")&&(a=this.fCamera.projectionMatrix.times(a));return a},getNDCToDSTransform:function(){var a=this._getDataspaceToNDCTransform();a.invert();return a},dsWorldToView:function(a,b,d){a=new h(a[0],
a[1],a[2],1);a=this._getDataspaceToNDCTransform().transform(a);var e=a._w;0===e&&(e=1);a._x/=e;a._y/=e;a._z/=e;a=new h(a._x,a._y,a._z,1);e=new c;e.setElements([b/2,0,0,0,0,-d/2,0,0,0,0,0,0,b/2,d/2,0,0]);b=e.transform(a);return[b.getX(),b.getY()]},computeLimits:function(a){var b=a.transform(new h(0,0,0,1));a=a.transform(new h(1,1,1,1));return[b.getX(),a.getX(),b.getY(),a.getY(),b.getZ(),a.getZ()]},getCurrentLimits:function(){return this.fCurrentLimits},is2D:function(){if(null!=this.fCamera&&this.fCamera.hasOwnProperty("viewMatrix"))for(var a=
this.fCamera.viewMatrix.getElements(),b=[1,2,4,6,8,9],c=0;c<b.length;c++)if(0!==a[b[c]])return!1;return!0},constructor:function(b){(new a).traverse(b,this);this.fDataSpaceMatrix=new c;this.fDataSpaceMatrixInverse=new c;null!==this.fDataSpace&&(this.fDataSpaceMatrix.setElements(this.fDataSpace.transformMatrix.getElements()),this.fDataSpaceMatrixInverse.setElements(this.fDataSpace.transformMatrix.getElements()),this.fDataSpaceMatrixInverse.invert());this.fCurrentLimits=this.fLimits=this.computeLimits(this.fDataSpaceMatrixInverse)},
setCamera:function(a){this.fCamera=a},setDataSpace:function(a){this.fDataSpace=a},setChildContainer:function(a){this.fChildContainer=a},setRuler:function(a,b){var c=m.convertAxisFromString(b),e=new d(a,c);0===c?this.fXRulerControl=e:1===c?this.fYRulerControl=e:2===c&&(this.fZRulerControl=e)},setGrid:function(a,b){var c=m.convertAxisFromString(b),d=new e(a,c);0===c?this.fXGridControl=d:1===c?this.fYGridControl=d:2===c&&(this.fZGridControl=d)},setBaseline:function(a,c){var d=m.convertAxisFromString(c),
e=new b(a,d);0===d?this.fXBaseLineControl=e:1===d&&(this.fYBaseLineControl=e)},setLimitsImpl:function(a){var b=this.fLimits;this.fXRulerControl.setLimits(a,b);this.fXGridControl.setLimits(a,b);this.fYRulerControl.setLimits(a,b);this.fYGridControl.setLimits(a,b);this.fZRulerControl.setLimits(a,b);this.fZGridControl.setLimits(a,b);this.fXBaseLineControl.setLimits(a,b);this.fYBaseLineControl.setLimits(a,b);this.fCurrentLimits=a},setLimits:function(a,b,d,e,f,g){this.setLimitsImpl([a,b,d,e,f,g]);var h=
c.createScale(1/(b-a),1/(e-d),1/(g-f));a=c.createTranslation(-a/(b-a),-d/(e-d),-f/(g-f));h=c.multiply(h,a);this.fChildContainer&&(this.fChildContainer.transformMatrix=c.multiply(h,this.fDataSpaceMatrixInverse),this.fChildContainer.clean=!1)},reset:function(){this.setLimitsImpl(this.fLimits);this.fChildContainer&&(this.fChildContainer.transformMatrix=new c,this.fChildContainer.clean=!1)},setTitle:function(a){this.fTitle=new l(a._children[0])},setXLabel:function(a){this.fXLabel=new l(a._children[0])},
setYLabel:function(a){this.fYLabel=new l(a._children[0])},setZLabel:function(a){this.fZLabel=new l(a._children[0])},_retrieveTextProps:function(a,b,c){if(null===a)return null;b=this.dsWorldToView(a.fDataPosition,b,c);return{Position:n.getTextCenter(b,a.fHorizontalAlignment,a.fVerticalAlignment,a.fWidth,a.fHeight,a.fRotation),Dimensions:{width:a.fWidth,height:a.fHeight},Font:a.fFont}},getTitleProperties:function(a,b){return this._retrieveTextProps(this.fTitle,a,b)},getXLabelProperties:function(a,b){return this._retrieveTextProps(this.fXLabel,
a,b)},getYLabelProperties:function(a,b){return this._retrieveTextProps(this.fYLabel,a,b)},getZLabelProperties:function(a,b){return this._retrieveTextProps(this.fZLabel,a,b)}})})},"graphics/axes/AxesStructureMixin":function(){define(["dojo/_base/declare"],function(g){return g([],{constructor:function(){},setCamera:function(f){},setDataSpace:function(f){},setChildContainer:function(f){},setRuler:function(f,e){},setGrid:function(f,e){},setLimits:function(){},setTitle:function(f){},setXLabel:function(f){},
setYLabel:function(f){},setZLabel:function(f){},getNDCToDSTransform:function(){}})})},"graphics/axes/GridControl":function(){define(["dojo/_base/declare","graphics/axes/SceneNodeProxy","graphics/axes/NullValueSceneNodeProxy","graphics/axes/AxisDecorationMixin","graphics/axes/SceneTreeAxesControlUtils"],function(g,f,e,d,b){return g([d],{fMajorGrid:new e,fMinorGrid:new e,fAxis:0,constructor:function(a,b){for(var d in a._children)if(a._children.hasOwnProperty(d)){var e=a._children[d];e.hasOwnProperty("nodeinfo")&&
void 0!==e.nodeinfo&&this.handleGridChild(e,e.nodeinfo)}this.fAxis=b},handleGridChild:function(a,b){var d=a.vertexdata;void 0!==d&&d.hasOwnProperty("data")&&(b.hasOwnProperty("category")&&"gridline"===b.category)&&(b.hasOwnProperty("subcategory")&&"minor"===b.subcategory?this.fMinorGrid=new f(a):this.fMajorGrid=new f(a))},setLimits:function(a,c){var d=this.fAxis,e=b.getAxisTransform(a,c,d),d=this.filterAndTransform.bind(this,a[2*d],a[2*d+1],e,d);this.fMajorGrid.accept(d);this.fMinorGrid.accept(d)}})})},
"graphics/axes/SceneNodeProxy":function(){define(["dojo/_base/declare","graphics/axes/SceneNodeProxyBase","graphics/MWSG/SceneTreeUtils"],function(g,f,e){return g([f],{fNode:null,fNodeVD:null,fNodeSD:null,constructor:function(d){null!==d&&(this.fNode=d,this.fNodeVD=e.convertArray(d.vertexdata),this.fNodeSD=d.string)},disable:function(){delete this.fNode.vertexdata;this.fNode.clean=!1;this.fNode.string=[]},reset:function(){this.fNode.vertexdata={data:this.fNodeVD};this.fNode.clean=!1;this.fNode.string=
this.fNodeSD},accept:function(d){d(this)},setVertexData:function(d){this.fNode.vertexdata={data:d};delete this.fNode._cachedBoundingBox;this.fNode.clean=!1;delete this.fNode.stripdata},getOriginalVertexData:function(){return this.fNodeVD},getOriginalStringData:function(){return this.fNodeSD},setStringData:function(d){this.fNode.string=d;this.fNode.clean=!1}})})},"graphics/axes/SceneNodeProxyBase":function(){define(["dojo/_base/declare"],function(g){return g([],{constructor:function(){},disable:function(){},
reset:function(){},accept:function(){},setVertexData:function(){},getOriginalVertexData:function(){},getOriginalStringData:function(){},setStringData:function(){}})})},"graphics/axes/NullValueSceneNodeProxy":function(){define(["dojo/_base/declare","graphics/axes/SceneNodeProxyBase"],function(g,f){return g([f],{constructor:function(){},disable:function(){},reset:function(){},accept:function(){},setVertexData:function(){},getOriginalVertexData:function(){},getOriginalStringData:function(){},setStringData:function(){}})})},
"graphics/axes/AxisDecorationMixin":function(){define(["dojo/_base/declare","graphics/axes/SceneTreeAxesControlUtils"],function(g,f){return g([],{constructor:function(){},disable:function(){},setLimits:function(){},filterAndTransform:function(e,d,b,a,c){e=f.filterVertexData(c.getOriginalVertexData(),e,d,a);e=f.transformData(e,b);c.setVertexData(e)}})})},"graphics/axes/SceneTreeAxesControlUtils":function(){define(["graphics/MWSG/Point4","graphics/MWSG/matrix4x4","graphics/MWSG/View","graphics/MWSG/Enum",
"graphics/MWSG/Rectangle"],function(g,f,e,d,b){return{getAxleTranslation:function(a,b,d,e){var g=[{t:0},{t:0},{t:0}];e.forEach(function(d){var e=d.axis,f=d.value;d=(f-b[2*e])/(b[2*e+1]-b[2*e]);d=Math.max(0,Math.min(d,1));f=(f-a[2*e])/(a[2*e+1]-a[2*e]);f=Math.max(0,Math.min(f,1));g[e].t=(f-d)*(b[2*e+1]-b[2*e])});return f.createTranslation(g[0].t,g[1].t,g[2].t)},getAxisTransform:function(a,b,d){var e=[{s:1,t:0},{s:1,t:0},{s:1,t:0}];e[d].s=(b[2*d+1]-b[2*d])/(a[2*d+1]-a[2*d]);e[d].t=b[2*d+1]-a[2*d+1]*
e[d].s;a=f.createScale(e[0].s,e[1].s,e[2].s);e=f.createTranslation(e[0].t,e[1].t,e[2].t);return f.multiply(a,e)},transformData:function(a,b){for(var d=a.length,e=Array(d),f=0;f<d;f+=3){var m=new g(a[f],a[f+1],a[f+2],1),m=b.transform(m);e[f]=m.getX();e[f+1]=m.getY();e[f+2]=m.getZ()}return e},filterVertexDataAndString:function(a,b,d,e,f){var g=Math.min(b,d);b=Math.max(b,d);d=f.length;for(var p=[],n=[],q=a.length/3,r=0;r<q;r++){var s=a[3*r+e],t=1.1921E-7*Math.max(Math.abs(s),1);g-t<s&&b+t>s&&(n.push(a[3*
r]),n.push(a[3*r+1]),n.push(a[3*r+2]),0<d&&p.push(f[r]))}return{vertexdata:n,string:p}},filterVertexData:function(a,b,d,e){return this.filterVertexDataAndString(a,b,d,e,[]).vertexdata},convertAxisFromString:function(a){var b=0;"y"===a?b=1:"z"===a&&(b=2);return b}}})},"graphics/axes/RulerControl":function(){define("dojo/_base/declare graphics/axes/AxisDecorationMixin graphics/axes/SceneNodeProxy graphics/axes/NullValueSceneNodeProxy graphics/axes/SceneTreeAxesControlUtils graphics/MWSG/matrix4x4".split(" "),
function(g,f,e,d,b,a){return g([f],{fTickLabels:new d,fMajorTickMarks:new d,fMinorTickMarks:new d,fAxle:new d,fAxis:null,fConstraints:[],constructor:function(a,d){for(var e in a._children)if(a._children.hasOwnProperty(e)){var f=a._children[e];f.hasOwnProperty("nodeinfo")&&void 0!==f.nodeinfo&&this.handleRulerChild(f,f.nodeinfo)}this.fConstraints=[];a.hasOwnProperty("nodeinfo")&&(a.nodeinfo.hasOwnProperty("restrict")&&a.nodeinfo.hasOwnProperty("crossValue"))&&(e=b.convertAxisFromString(a.nodeinfo.restrict),
this.fConstraints.push({axis:e,value:Number(a.nodeinfo.crossValue)}));this.fAxis=d},handleRulerChild:function(a,b){var d=a.vertexdata;void 0!==d&&d.hasOwnProperty("data")&&b.hasOwnProperty("category")&&("ticklabels"===b.category?this.fTickLabels=new e(a):"tickmarks"===b.category?b.hasOwnProperty("subcategory")&&"minor"===b.subcategory?this.fMinorTickMarks=new e(a):this.fMajorTickMarks=new e(a):"axle"===b.category&&(this.fAxle=new e(a)))},filterAndTransformText:function(a,d,e,f,g){a=b.filterVertexDataAndString(g.getOriginalVertexData(),
a,d,f,g.getOriginalStringData());e=b.transformData(a.vertexdata,e);g.setVertexData(e);g.setStringData(a.string)},transformData:function(a,d){var e=b.transformData(d.getOriginalVertexData(),a);d.setVertexData(e)},setLimits:function(c,d){var e=this.fAxis,f=b.getAxleTranslation(c,d,e,this.fConstraints),g=a.multiply(b.getAxisTransform(c,d,e),f),p=c[2*e],e=c[2*e+1],n=this.filterAndTransformText.bind(this,p,e,g,this.fAxis);this.fTickLabels.accept(n);n=this.filterAndTransform.bind(this,p,e,g,this.fAxis);
this.fMajorTickMarks.accept(n);this.fMinorTickMarks.accept(n);n=this.transformData.bind(this,f);this.fAxle.accept(n)}})})},"graphics/axes/BaselineControl":function(){define("dojo/_base/declare graphics/axes/AxisDecorationMixin graphics/axes/SceneNodeProxy graphics/axes/NullValueSceneNodeProxy graphics/axes/SceneTreeAxesControlUtils graphics/MWSG/matrix4x4".split(" "),function(g,f,e,d,b,a){return g([f],{fAxle:new d,fAxis:null,fConstraints:[],constructor:function(a,b){this.fConstraints=[];for(var d in a._children)if(a._children.hasOwnProperty(d)){var f=
a._children[d];void 0!==f&&(f.hasOwnProperty("nodeinfo")&&void 0!==f.nodeinfo&&"axle"===f.nodeinfo.category)&&(this.fAxle=new e(f),f.nodeinfo.hasOwnProperty("value")&&this.fConstraints.push({axis:b,value:Number(f.nodeinfo.value)}))}this.fAxis=b},transformData:function(a,d){var e=b.transformData(d.getOriginalVertexData(),a);d.setVertexData(e)},setLimits:function(a,d){var e=b.getAxleTranslation(a,d,(this.fAxis+1)%2,this.fConstraints),e=this.transformData.bind(this,e);this.fAxle.accept(e)}})})},"graphics/axes/AxesControlSceneTreeVisitor":function(){define(["dojo/_base/declare"],
function(g){return g([],{constructor:function(){},traverse:function(f,e){this.visitNode(f,e)},traverseNode:function(f,e){for(var d in f._children)if(f._children.hasOwnProperty(d)){var b=f._children[d];void 0!==b&&this.visitNode(b,e)}},visitNode:function(f,e){f.hasOwnProperty("nodeinfo")&&void 0!==f.nodeinfo?this.visitNodeWithInfo(f,e,f.nodeinfo):this.traverseNode(f,e)},visitNodeWithInfo:function(f,e,d){if(d.hasOwnProperty("category")){var b=d.category;"axescamera"===b?(e.setCamera(f),this.traverseNode(f,
e)):"axesdataspace"===b?(e.setDataSpace(f),this.traverseNode(f,e)):"childcontainer"===b?(e.setChildContainer(f),this.traverseNode(f,e)):"grid"===b?d.hasOwnProperty("axis")&&e.setGrid(f,d.axis):"ruler"===b?(d.hasOwnProperty("axis")&&e.setRuler(f,d.axis),this.traverseNode(f,e)):"baseline"===b?d.hasOwnProperty("axis")&&e.setBaseline(f,d.axis):"title"===b?e.setTitle(f):"xlabel"===b?e.setXLabel(f):"ylabel"===b?e.setYLabel(f):"zlabel"===b&&e.setZLabel(f)}}})})},"graphics/axes/NullValueAxisDecoration":function(){define(["dojo/_base/declare",
"graphics/axes/AxisDecorationMixin"],function(g,f){return g([f],{constructor:function(){},disable:function(){},setLimits:function(){}})})},"graphics/axes/TextDecorationControl":function(){define(["dojo/_base/declare","dojo/dom-construct","graphics/MWSG/Utilities","graphics/MWSG/SceneTreeUtils"],function(g,f,e,d){return g([],{fString:"",fFont:null,fPxFontSize:null,fDataPosition:null,fHorizontalAlignment:0,fVerticalAlignment:0,fRotation:0,fPixelBounds:{},fWidth:0,fHeight:0,fPixelBounds:null,constructor:function(b){b&&
(this.fString=b.string,this.fFont=d.makeFont(b._font,e.FindDPI()),this.fPxFontSize=b._font.size*e.FindDPI()/72,this.fDataPosition=d.convertArray(b.vertexdata),this.fHorizontalAlignment=b.horizontalalignment,this.fVerticalAlignment=b.verticalalignment,this.fRotation=b.rotation,this.fPixelBounds=this._computePixelBounds())},_computePixelBounds:function(){if(this.fString){var b=f.create("canvas").getContext("2d");b.font=this.fFont;this.fWidth=Math.ceil(d.calcTextWidth(b,this.fString,this.fString.length));
this.fHeight=Math.ceil(1.2*this.fPxFontSize*this.fString.length);return e.getPixelBounds(this.fWidth,this.fHeight,this.fHorizontalAlignment,this.fVerticalAlignment,this.fRotation)}return{x:0,y:0,width:0,height:0}}})})},"graphics/axes/AxesExternalInterface":function(){define(["dojo/_base/declare","graphics/MWSG/Enum"],function(g,f){return g([],{_sceneView:null,constructor:function(e){this._sceneView=e},isValid:function(){return null!==this._sceneView.getAxesControl()},getTextProperties:function(e){if(null!==
this._sceneView){var d=this._sceneView.getContainerDimensions(f.PixelUnitType.csspixel);switch(e){case "Title":return this._sceneView.getAxesControl().getTitleProperties(d.w,d.h);case "XLabel":return this._sceneView.getAxesControl().getXLabelProperties(d.w,d.h);case "YLabel":return this._sceneView.getAxesControl().getYLabelProperties(d.w,d.h);case "ZLabel":return this._sceneView.getAxesControl().getZLabelProperties(d.w,d.h)}}return null},worldToViewCoords:function(e,d){if(null!==this._sceneView){var b=
d;b||(b=this._sceneView.getContainerDimensions(f.PixelUnitType.csspixel));return this._sceneView.getAxesControl().dsWorldToView(e,b.w,b.h)}return[]},is2D:function(){return this._sceneView.getAxesControl().is2D()},setLimits:function(e,d,b,a,c,f){this._sceneView.getAxesControl().setLimits(e,d,b,a,c,f)},getCurrentLimits:function(){return this._sceneView.getAxesControl().getCurrentLimits()},getNDCToDSTransform:function(){return this._sceneView.getAxesControl().getNDCToDSTransform()}})})},"graphics/MWSG/CommandProcessor":function(){define(["dojo/_base/declare"],
function(g){return g([],{constructor:function(){this._cmdQueue=[];this._cmdHandlers={};this._initialized=!1;this._lock=null},onCmd:function(f,e){this._cmdHandlers[f]=e},initialize:function(){this._initialized=!0},lock:function(f){if(void 0===f||null===f)throw Error("Invalid key for CommandProcessor lock");if(null!==this._lock)throw Error("Attempted to lock CommandProcessor with "+f+" when already locked with "+this._lock);this._lock=f},unlock:function(f){if(void 0===f||null===f)throw Error("Invalid key for CommandProcessor unlock");
this._lock===f&&(this._lock=null,this._runQueuedCommands())},processCmd:function(f){this._initialized&&(this._cmdQueue.push(f),null===this._lock&&this._runQueuedCommands())},_runQueuedCommands:function(){for(;0<this._cmdQueue.length&&null===this._lock;){var f=this._cmdQueue.shift(),e=this._cmdHandlers[f.cmd];if(!e)throw Error("Unknown command: "+f.cmd);e(f)}}})})},"graphics/SceneWidgets/ImageView":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-construct dojo/dom-style dojo/Deferred graphics/axes/AxesExternalInterface dijit/_WidgetBase graphics/mixins/EventEmitter dijit/_TemplatedMixin dojo/text!./templates/ImageView.html".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return g([c,k,h],{baseClass:"ImageView",templateString:l,_Controller:null,_channelID:null,constructor:function(a){this._channelID=a;this._defineEvent("mouseevent");this._defineEvent("cdata_notify");this._defineEvent("act");this._defineEvent("graphicscomplete")},postCreate:function(){this.inherited(arguments);d.set(this.domNode,"width","100%");d.set(this.domNode,"height","100%")},destroy:function(){this._Controller&&this._Controller.uninstall();this.inherited(arguments)},
setController:function(a){this._Controller&&this._Controller.uninstall();this._Controller=a;this._Controller.install(this)},getController:function(){return this._Controller},getAxesControl:function(){return null},fireMouseEvent:function(a){this.emitEvent("mouseevent",{MouseEvent:a})},redraw:function(){},draw:function(){},_getCData:function(a){return{width:a.width,height:a.height,urlString:a.src}},getImageDataURL:function(){var a=new b;a.resolve(this._getCData(this.domNode));return a},processCmd:function(a){var b=
a.cmd;if("setImage"===b){var c=a.actData;c&&void 0!==c.clientReceiveTS&&(c.clientReceiveTS=Date.now());this.domNode.src="data:image/png;base64,"+a.cdata.data;this.domNode.onload=function(){c&&(void 0!==c.clientSendTS&&(c.clientSendTS=Date.now()),this.emitEvent("act",{data:c}));this.emitEvent("graphicscomplete",{})}.bind(this)}else"requestCData"===b&&(a=this._getCData(this.domNode),this.emitEvent("cdata_notify",{data:a}))},setBinaryDataSink:function(a){},createCloneDOMNode:function(){return f.clone(this.domNode)},
getAxesExternalInterface:function(b){return new a(null)},getSceneTree:function(){return null}})})},"graphics/GraphicsInteractions/ScenePickingController":function(){define(["dojo/_base/declare","graphics/GraphicsInteractions/BaseMouseController","graphics/MWSG/PickResult"],function(g,f){return g([f],{constructor:function(e){},doScenePicking:function(e,d){var b=e.getSceneTree().hitTest(d.offsetX,d.offsetY),a=null,c=null,f=null;null!==b&&(a=b.getNode(),c=a.ownerCookie,f=b.getIntersectionPoint());return[a,
c,f]},doMouseMove:function(e){this.getView().fireMouseMoveEvent(e,null,null)},doMouseUp:function(e){var d=this.getView(),b=this.doScenePicking(d,e);d.fireMouseUpEvent(e,b[1],b[2])},doMouseDown:function(e){var d=this.getView(),b=this.doScenePicking(d,e);b[0]?d.fireSceneHitEvent(e,b[1],b[2]):d.fireMouseDownEvent(e)}})})},"graphics/GraphicsInteractions/BaseMouseController":function(){define(["dojo/_base/declare","dojo/on","graphics/GraphicsInteractions/AbstractController"],function(g,f,e){return g([e],
{constructor:function(d){this.modifier=0},install:function(d){this.inherited(arguments);this.lastClick=0;this.lastButton=this.lastClickY=this.lastClickX=this.target=null;this._MouseDownHandler=f(d.domNode,"mousedown",this._handleMouseDown.bind(this));this._MouseUpHandler=f(document,"mouseup",this._handleMouseUp.bind(this));this._MouseMoveHandler=f(d.domNode,"mousemove",this._handleMouseMove.bind(this))},uninstall:function(){this.inherited(arguments);this.lastButton=this.lastClickY=this.lastClickX=
this.target=this.lastClick=null;this._MouseDownHandler.remove();this._MouseDownHandler=null;this._MouseUpHandler.remove();this._MouseUpHandler=null;this._MouseMoveHandler.remove();this._MouseMoveHandler=null},doMouseDown:function(d){},doMouseUp:function(d){},doMouseMove:function(d){},_updateModifier:function(d){var b=(new Date).getTime();this.doubleClick="false";400>b-this.lastClick&&this.lastButton===d.button&&3>=Math.abs(d.clientX-this.lastClickX)&&3>=Math.abs(d.clientY-this.lastClickY)?(this.doubleClick=
!0,this.modifier=3):(this.lastClick=b,0===d.button&&!0===d.ctrlKey&&!0===d.shiftKey||0===d.button&&!1===d.ctrlKey&&!1===d.shiftKey?this.modifier=0:0===d.button&&!0===d.ctrlKey||0===d.button&&!1===d.shiftkey||!0===d.ctrlKey&&!1===d.shiftKey?this.modifier=1:!1===d.ctrlKey&&!0===d.shiftKey&&(this.modifier=2));this.lastClick=b;this.lastClickX=d.clientX;this.lastClickY=d.clientY;this.lastButton=d.button;d.doubleClick=this.doubleClick;d.modifier=this.modifier},cancelEventPropagation:function(d){"function"===
typeof d.stopPropagation?d.stopPropagation():d.cancelBubble=!0},_handleMouseDown:function(d){this.target=d.target;this.cancelEventPropagation(d);this._updateModifier(d);this.doMouseDown(d)},_handleMouseUp:function(d){this.target===this._View.domNode&&(this.cancelEventPropagation(d),d.modifier=this.modifier,this.doMouseUp(d));this.target=null},_handleMouseMove:function(d){this.cancelEventPropagation(d);d.modifier=this.modifier;this.doMouseMove(d)}})})},"graphics/GraphicsInteractions/AbstractController":function(){define(["dojo/_base/declare"],
function(g){return g([],{_View:null,constructor:function(f){},install:function(f){if(void 0===f)throw Error("Controller installation requires a view");this._View=f},uninstall:function(){this._View=null},getView:function(){return this._View}})})},"graphics/GraphicsInteractions/ImageMouseController":function(){define(["dojo/_base/declare","graphics/GraphicsInteractions/BaseMouseController"],function(g,f){return g([f],{constructor:function(e){},doMouseDown:function(e){this._sendEventMessage("BtnDown",
e)},doMouseUp:function(e){this._sendEventMessage("BtnUp",e)},doMouseMove:function(e){this._sendEventMessage("Move",e)},_sendEventMessage:function(e,d){var b=this.getView(),b={Type:e,Button:d.button,X:d.offsetX,Y:d.offsetY,Width:b.domNode.width,Height:b.domNode.height,Time:(new Date).getTime().toString(),Shift:d.shiftKey,Alt:d.altKey,Ctrl:d.ctrlKey,ClickCount:d.detail};this.getView().fireMouseEvent(b)}})})},"graphics/GraphicsInteractions/NOPController":function(){define(["dojo/_base/declare","graphics/GraphicsInteractions/AbstractController"],
function(g,f){return g([f],{constructor:function(e){}})})},"graphics/services/BinaryDataReceiver":function(){define(["dojo/_base/declare","dojo/Deferred","graphics/mixins/EventEmitter","graphics/MWSG/Base64Decode","mw-binarystream/BinaryStreamFactory"],function(g,f,e,d,b){return g([e],{ConnectionStatus:{none:0,connected:1,disconnected:2},constructor:function(a){this.messageService=a;this._stream=null;this._connectionStatus=this.ConnectionStatus.none;this._defineEvent("datareceived")},connect:function(a){var c=
new f,d=this;try{this._stream=b.createStream(a,this.messageService),this._stream.start(this._webSocketMessage,this).then(function(){d._connectionStatus=d.ConnectionStatus.connected;c.resolve()},function(a){d._connectionStatus=d.ConnectionStatus.none;c.resolve()})}catch(e){this._connectionStatus=this.ConnectionStatus.none,c.resolve()}return c},_webSocketMessage:function(a){a=a.data;if(8>=a.byteLength)throw Error("Bad data frame : Length less than URISize");var b=new Int32Array(a,0,2),b=b[0].toString()+
" "+b[1].toString(),d=null,d=a.slice(8);this.emitEvent("datareceived",{uri:b,data:d})},disconnect:function(){this._stream&&(this._stream.stop(),this._stream.isConnected()&&this._stream.flush());this._connectionStatus=this.ConnectionStatus.disconnected},getConnectionStatus:function(){return this._connectionStatus},handleBase64Data:function(a,b){var e={uri:a,data:d.base64ToArrayBuffer(b)};this.emitEvent("datareceived",e)}})})},"mw-binarystream/BinaryStreamFactory":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect mw-log/Log ./BinaryStream ./impl/BinaryStreamTransport".split(" "),
function(g,f,e,d,b,a){g=new (g([],{logLifeCycle:!1,constructor:function(){this._streams={};this._nextStreamId=-1},createStream:function(c,e){if(!this._hasStream(c)){this.logLifeCycle&&d.info("Creating new stream: "+c);this._nextStreamId+=2;var f=new a(c,this._nextStreamId),f=new b.Impl(c,this._nextStreamId,this,f,e);this._streams[c]=f}return this._streams[c]},_hasStream:function(a){return this._streams.hasOwnProperty(a)},_removeStream:function(a){return this._hasStream(a)?(this.logLifeCycle&&d.info("Removing stream: "+
a),delete this._streams[a],!0):!1}}));return{factory:g,createStream:f.hitch(g,"createStream")}})},"mw-binarystream/BinaryStream":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/Deferred mw-messageservice/MessageService mw-log/Log".split(" "),function(g,f,e,d,b,a){var c=g([],{getName:function(){},start:function(a,b){},send:function(a){},stop:function(){},isStarted:function(){}});g=g([c],{logSubscriptions:!1,constructor:function(a,c,d,e,f){this._streamName=a;this._streamId=c;
this._factory=d;this._setDelegate(e);this._subscription={};this._onDisconnected();this.messageService=f||b.messageService},getName:function(){return this._streamName},send:function(b){if(this.isStarted())return b=this._queueSend(b),this._deferProcessQueue(),b;a.error("Not connected to a stream, can't send.");return(new d).reject("Not connected to a stream, can't send.")},start:function(b,c){this.logSubscriptions&&a.info("BinaryStream start: "+this._streamName,b,c);var g;if(this._addHandler(b,c)){this._connectHandle=
e.after(this.messageService,"onConnected",f.hitch(this,"_onConnected"),!0);this._disconnectHandle=e.after(this.messageService,"onDisconnected",f.hitch(this,"_onDisconnected"),!0);this.messageService.isConnected()?this._onConnected():this._onDisconnected();this._messageHandle=e.after(this._delegate,"onMessage",f.hitch(this,this._onDelegateMessage),!0);this._closeHandle=e.after(this._delegate,"onClose",f.hitch(this,this._onDelegateClose),!0);if(this.isStarted())return(new d).resolve();g=this._queueStart();
this._deferProcessQueue();return g}a.error("Already connected to a stream, can't start.");return(new d).reject("Already connected to a stream, can't start.")},stop:function(){this.logSubscriptions&&a.info("BinaryStream stop: "+this._streamName);var b;if(this._removeHandler()){if(this.isStarted())return b=this._queueStop().then(f.hitch(this,this._cleanup),f.hitch(this,this._cleanup)),this._deferProcessQueue(),b;this._cleanup();return(new d).resolve()}this._cleanup();return(new d).reject("Not connected to stream, can't stop.")},
flush:function(){var a=new d;this.isConnected()?(this._processQueue(),a.resolve()):a.reject("Can only manually flush the queue when connected.");return a.promise},isConnected:function(){return this._isConnected},isStarted:function(){var a=this._delegate&&this._delegate.delegateConnected();return this.isConnected()&&a},_setDelegate:function(a){this._delegate=a},_onDisconnected:function(){this._isConnected=!1;this._queuedOps=[]},_onConnected:function(){this._isConnected=!0;this._processQueue()},_queueSend:function(a){var b=
new d;this._queuedOps.push({type:"send",data:a,deferred:b});return b.promise},_queueStart:function(){var a=new d;this._queuedOps.push({type:"start",deferred:a});return a.promise},_queueStop:function(){var a=new d;this._queuedOps.push({type:"stop",deferred:a});return a.promise},_processQueue:function(){if(this.isConnected()){var a=this._queuedOps;this._queuedOps=[];a.forEach(function(a){var b;"send"===a.type?this.isStarted()?b=this._delegate.doSend(a.data):this._queuedOps.push(a):"start"===a.type?
b=this._doStart():"stop"===a.type&&(b=this._doStop());b.then(a.deferred.resolve,a.deferred.reject)},this)}},_deferProcessQueue:function(){if(!this._deferredTimeout){var a=this;this._deferredTimeout=setTimeout(function(){a._deferredTimeout=!1;a._processQueue()},0)}},_doStart:function(){if(this.started)return(new d).resolve();var a=this._delegate.connect();this.started=!0;return a},_doStop:function(){if(this.started){var a=this._delegate.disconnect();this.started=!1;return a}return(new d).resolve()},
_onDelegateMessage:function(a){a&&this._callHandler(a)},_addHandler:function(b,c){if(!this._subscription.hasOwnProperty("handler")){c=c||this;if("string"===typeof b&&"function"!==typeof c[b]){a.warn("Not adding, invalid handler: "+b);return}this._subscription={handler:b,scope:c};return!0}return!1},_removeHandler:function(){var a=this._subscription.hasOwnProperty("handler");this._subscription={};return a},_callHandler:function(b){try{"string"===typeof this._subscription.handler?this._subscription.scope[this._subscription.handler].call(this._subscription.scope,
b):this._subscription.handler.call(this._subscription.scope,b)}catch(c){a.error("Error while executing message handler on stream: "+this._streamName+", error: "+c)}},_onDelegateClose:function(){this._cleanup()},_cleanup:function(){this._onDisconnected();this._connectHandle&&this._connectHandle.remove();this._disconnectHandle&&this._disconnectHandle.remove();this._messageHandle&&this._messageHandle.remove();this._closeHandle&&this._closeHandle.remove();this._factory&&this._factory._removeStream(this._streamName)}});
c.Impl=g;return c})},"mw-binarystream/impl/BinaryStreamTransport":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/Deferred mw-remote/Remote mw-log/Log ./BinaryStreamWebSocket ./BinaryStreamFraming".split(" "),function(g,f,e,d,b,a,c,h){return g([],{BASE_END_POINT:"messageservice/binary/",KEEPALIVE_TIMEOUT:2E4,logLifecycle:!1,constructor:function(a,b,c){c=c||{};this._streamName=a;this._streamId=b;this._keepAliveTimeout=c.keepAliveTimeout||this.KEEPALIVE_TIMEOUT;this._timers=[]},
onMessage:function(a){},onClose:function(){},connect:function(){var a=new d;this._routingHost=b.getWorkerRoutingHost();this._routingKey=b.getWorkerRoutingKey();this._computeToken=b.getComputeSessionId();this.delegate=this._createDelegate();this._messageHandle=e.after(this.delegate,"onMessage",f.hitch(this,this._handleTransportMessage),!0);this._closeHandle=e.after(this.delegate,"onClose",f.hitch(this,this._handleTransportClose),!0);this.delegate.setUrl(this._getEndpoint());var c=this;this.delegate.connect().then(function(b){if(0<
c._keepAliveTimeout){var d=setInterval(function(){c._sendKeepAlive(!1)},c._keepAliveTimeout);c._timers.push(d)}a.resolve(b)},function(b){a.reject(b)});this._logLifecycleInfo("BinaryStreamTransport constructing new websocket instance.");return a.promise},disconnect:function(){this.delegate.reset();return(new d).resolve()},cleanup:function(){this.delegate&&(this._logLifecycleInfo("BinaryStreamTransport disconnecting due to cleanup call."),this.delegate.disconnect(),this.delegate=null)},delegateConnected:function(){return this.delegate?
this.delegate.isConnected():!1},doSend:function(a){a=h.getPayloadFrame({streamId:this._streamId,complete:!0,data:a});this._delegateSend(a);return(new d).resolve()},_delegateSend:function(a){a=h.serialize(a);this.delegate.send(a)},_handleTransportMessage:function(a){a=h.deserialize(a.data);this._logLifecycleInfo("Received frame type: "+a.header.type);switch(a.header.type){case h.TYPES.KEEPALIVE:this._handleKeepAlive(a);break;case h.TYPES.PAYLOAD:this._handlePayload(a);break;default:throw Error(a.header.type+
" frame not supported");}},_handleTransportClose:function(a,b){this._timers&&(this._logLifecycleInfo("Canceling all timers"),this._timers.forEach(function(a){clearInterval(a)}));this.onClose();this._messageHandle&&this._messageHandle.remove();this._closeHandle&&this._closeHandle.remove()},_handlePayload:function(a){this._logLifecycleInfo("Received Payload of size: "+a.payload.byteLength);this.onMessage({data:a.payload})},_handleKeepAlive:function(a){this._logLifecycleInfo("Received keepalive from server")},
_sendKeepAlive:function(a){a=a||!1;this.delegateConnected()&&(this._logLifecycleInfo("Sending keep-alive"),a=h.getKeepAliveFrame({respond:a}),this._delegateSend(a))},_getEndpoint:function(){return this._routingHost+this.BASE_END_POINT+this._streamName+"?routingkey\x3d"+this._routingKey+"\x26computeToken\x3d"+this._computeToken},_logLifecycleInfo:function(b){this.logLifecycle&&a.info(b)},_createDelegate:function(){return new c}})})},"mw-binarystream/impl/BinaryStreamWebSocket":function(){define(["dojo/_base/declare",
"dojo/_base/lang","dojo/Deferred","mw-log/Log"],function(g,f,e,d){return g([],{CLOSE_NORMAL_CLOSURE:1E3,CLOSE_GOING_AWAY:1001,CLOSE_PROTOCOL_ERROR:1002,logLifecycle:!1,connectTimeout:5E3,constructor:function(){this._webSocket=null;this._connected=!1},connect:function(){var b=new e,a=this.getUrl();if(!a)return d.error("Invalid URL"),b.reject("Invalid URL"),b.promise;a=a.replace(/^http/,"ws");if(0!==a.indexOf("ws"))return d.error("Invalid URL: ",a),b.reject("Invalid URL: "+a),b.promise;this.logLifecycle&&
d.info("Connecting to URL: "+a);var c=this,f=null;0<this.connectTimeout&&(f=setTimeout(function(){f=null;this._connected||(this.logLifecycle&&d.info("Timed out while connecting to URL ",a,"in "+c.connectTimeout,"ms"),c.onClose(c.CLOSE_PROTOCOL_ERROR,"Connect Timeout"),b.reject("Timed out while connecting to URL"))},this.connectTimeout));var g;try{g=new WebSocket(a);g.binaryType="arraybuffer";var l=function(a){var e=a?a.code:c.CLOSE_NORMAL_CLOSURE;a=a?a.reason:void 0;c.logLifecycle&&d.info("WebSocket closed: "+
e+"/"+a);f&&(window.clearTimeout(f),f=null);b.reject();if(g!==c._webSocket)c.logLifecycle&&d.info("Ignoring close event, WebSocket");else c.onClose(e,a)};g.onopen=function(){c.logLifecycle&&d.info("WebSocket opened: "+g);f&&(window.clearTimeout(f),f=null);b.resolve();if(g!==c._webSocket)c.logLifecycle&&d.info("Ignoring open event, WebSocket"+c._webSocket);else c.onOpen()};g.onclose=l;g.onerror=function(){d.error("WebSocket received error");l({code:c.CLOSE_PROTOCOL_ERROR})};g.onmessage=function(a){c.logLifecycle&&
d.info("WebSocket message received");if(g!==c._webSocket)c.logLifecycle&&d.info("Ignoring message event, WebSocket");else c.onMessage(a)};this._webSocket=g}catch(m){d.error("WebSocket error: ",m),b.reject("Browser does not support WebSockets")}return b.promise},onOpen:function(){this._connected=!0},onMessage:function(b){},onClose:function(b,a){null!==this._webSocket&&this._connected&&this._webSocket.close(this.CLOSE_NORMAL_CLOSURE,"Close");this._connected=!1;this._webSocket=null},send:function(b){try{null===
this._webSocket?(this.logLifecycle&&d.info("WebSocket not connected, connecting..."),this.connect()):this._connected&&(this.logLifecycle&&d.info("Sending data"),this._webSocket.send(b))}catch(a){d.error("Error sending data: ",a)}},abort:function(){if(null!==this._webSocket)try{this.logLifecycle&&d.info("Aborting..."),this._webSocket.close(this.CLOSE_GOING_AWAY)}catch(b){this.logLifecycle&&d.info("Error aborting: ",b)}this.reset()},reset:function(){this.logLifecycle&&d.info("WebSocket closing connection");
null!==this._webSocket&&this._connected&&this._webSocket.close(this.CLOSE_NORMAL_CLOSURE,"Reset");this._webSocket=null;this._connected=!1},setUrl:function(b){this._url=b},getUrl:function(){return this._url},isConnected:function(){return this._connected}})})},"mw-binarystream/impl/BinaryStreamFraming":function(){define(["dojo/_base/declare","dojo/_base/lang","mw-log/Log"],function(g,f,e){var d={RESERVED:0,SETUP:1,KEEPALIVE:2,CONNECT_STREAM:3,DISCONNECT_STREAM:4,PAYLOAD:5,CANCEL_PAYLOAD:6,ERROR:7,EXT:255},
b={EMPTY:0,SETUP_ACK:128,SETUP_RESPOND:64,KEEPALIVE_RESPOND:128,CONNECT_STREAM_ACK:128,PAYLOAD_COMPLETE:128},a={INVALID_SETUP:1,UNSUPPORTED_SETUP:2,REJECTED_SETUP:3,CONNECTION_ERROR:257,APPLICATION_ERROR:513,REJECTED:514,CANCELED:515,INVALID:516,RESERVED:4294967295};g=new (g([],{DEFAULT_MAJOR_VERSION:0,DEFAULT_MINOR_VERSION:1,DEFAULT_KEEPALIVETIME:32,MAX_LIFETIME:65535,MAX_STREAM_ID:4294967295,HEADER_LENGTH:10,ERROR_CODE_LENGTH:4,SETUP_PARAMS_LENGTH:12,HEADER_LENGTH_START:0,HEADER_STREAM_ID_START:4,
HEADER_TYPE_START:8,HEADER_FLAGS_START:9,_convertStringToArrayBuffer:function(a){for(var b=new ArrayBuffer(2*a.length),d=new Uint16Array(b),e=0,f=a.length;e<f;e++)d[e]=a.charCodeAt(e);return b},_convertArrayBufferToString:function(a){return String.fromCharCode.apply(null,new Uint16Array(a))},_copyArrayBuffer:function(a,b,d){(new Uint8Array(b)).set(new Uint8Array(a),d)},_deserializeHeaderLength:function(a){var b=a.byteLength;a=a.getUint32(this.HEADER_LENGTH_START);if(b!==a)throw Error("Header length "+
a+" does not match buffer length "+b);return a},_deserializeType:function(a){return a.getUint8(this.HEADER_TYPE_START)},_deserializeFlags:function(a){return a.getUint8(this.HEADER_FLAGS_START)},_deserializeStreamId:function(a){return a.getUint32(this.HEADER_STREAM_ID_START)},_deserializePayload:function(a,b,d){d.payload=a.slice(b)},_deserializeHeader:function(a,b){b.header={length:this._deserializeHeaderLength(a),streamId:this._deserializeStreamId(a),type:this._deserializeType(a),flags:this._deserializeFlags(a)};
return this.HEADER_LENGTH},_deserializeErrorCode:function(a,b,d){d.errorCode=a.getUint32(b);return b+=this.ERROR_CODE_LENGTH},_deserializeSetupParams:function(a,b,d){d.setupParams={majorVersion:a.getUint32(b),minorVersion:a.getUint32(b+4),keepAliveTime:a.getUint16(b+8),maxLifeTime:a.getUint16(b+10)};b+=this.SETUP_PARAMS_LENGTH;var e=a.getUint8(b);d.dataEncoding=a.getUint8(b,2*e);return b+(1+e)},deserialize:function(a){var b=new window.DataView(a),e={},f=this._deserializeHeader(b,e);switch(e.header.type){case d.SETUP:f=
this._deserializeSetupParams(b,f,e);this._deserializePayload(a,f,e);break;case d.KEEPALIVE:case d.CONNECT_STREAM:case d.PAYLOAD:this._deserializePayload(a,f,e);break;case d.DISCONNECT_STREAM:case d.CANCEL_PAYLOAD:break;case d.ERROR:f=this._deserializeErrorCode(b,f,e);this._deserializePayload(a,f,e);break;default:throw Error("Invalid frame type");}return e},_computeFrameLength:function(a){var b=this.HEADER_LENGTH;a.header.type===d.SETUP?(b+=this.SETUP_PARAMS_LENGTH,b+=1+a.dataEncoding.length):a.header.type===
d.ERROR&&(b+=this.ERROR_CODE_LENGTH);a.payload instanceof ArrayBuffer&&(b+=a.payload.byteLength);return b},_serializeHeader:function(a,b){b.setUint32(this.HEADER_LENGTH_START,a.header.length);b.setUint32(this.HEADER_STREAM_ID_START,a.header.streamId);b.setUint8(this.HEADER_TYPE_START,a.header.type);b.setUint8(this.HEADER_FLAGS_START,a.header.flags);return this.HEADER_LENGTH},_serializePayload:function(a,b,d){this._copyArrayBuffer(a.payload,b,d)},_serializeSetupParams:function(a,b,d){b.setUint32(d,
a.setupParams.majorVersion);b.setUint32(d+4,a.setupParams.minorVersion);b.setUint16(d+8,a.setupParams.keepAliveTime);b.setUint16(d+10,a.setupParams.maxLifeTime);d+=this.SETUP_PARAMS_LENGTH;b.setUint8(d,a.dataEncoding.length);d+=1;this._copyArrayBuffer(this._convertStringToArrayBuffer(a.dataEncoding),b.buffer,d);return d+=2*a.dataEncoding.length},_serializeErrorCode:function(a,b,d){b.setUint32(d,a.errorCode);return d+=this.ERROR_CODE_LENGTH},serialize:function(a){var b=new ArrayBuffer(a.header.length),
e=new window.DataView(b),f=this._serializeHeader(a,e);a.header.type===d.SETUP?f=this._serializeSetupParams(a,e,f):a.header.type===d.ERROR&&(f=this._serializeErrorCode(a,e,f));a.payload instanceof ArrayBuffer&&this._serializePayload(a,b,f);return b},getSetupFrame:function(a){a={header:{type:d.SETUP,flags:a.flags||b.EMPTY,streamId:0},setupParams:{majorVersion:a.majorVersion||this.DEFAULT_MAJOR_VERSION,minorVersion:a.minorVersion||this.DEFAULT_MINOR_VERSION,keepAliveTime:a.keepAliveTime||this.DEFAULT_KEEPALIVETIME,
maxLifeTime:a.maxLifeTime||this.MAX_LIFETIME},dataEncoding:a.dataEncoding||"",payload:a.data||""};a.header.length=this._computeFrameLength(a);return a},getKeepAliveFrame:function(a){a={header:{type:d.KEEPALIVE,flags:a.respond?b.KEEPALIVE_RESPOND:b.EMPTY,streamId:0},payload:a.data||""};a.header.length=this._computeFrameLength(a);return a},getConnectStreamFrame:function(a){a={header:{type:d.CONNECT_STREAM,flags:a.ack?b.CONNECT_STREAM_ACK:b.EMPTY,streamId:a.streamId},payload:a.data};a.header.length=
this._computeFrameLength(a);return a},getDisconnectStreamFrame:function(a){a={header:{type:d.DISCONNECT_STREAM,flags:b.EMPTY,streamId:a.streamId}};a.header.length=this._computeFrameLength(a);return a},getPayloadFrame:function(a){a={header:{type:d.PAYLOAD,flags:a.complete?b.PAYLOAD_COMPLETE:b.EMPTY,streamId:a.streamId},payload:a.data};a.header.length=this._computeFrameLength(a);return a},getCancelPayloadFrame:function(a){a={header:{type:d.CANCEL_PAYLOAD,flags:b.EMPTY,streamId:a.streamId}};a.header.length=
this._computeFrameLength(a);return a},_getErrorFrame:function(a,e){var f={header:{type:d.ERROR,flags:b.EMPTY,streamId:a.streamId},errorCode:e,payload:a.data};f.header.length=this._computeFrameLength(f);return f},getInvalidSetupFrame:function(b){b={streamId:0,data:this._convertStringToArrayBuffer(b)};return this._getErrorFrame(b,a.INVALID_SETUP)},getUnsupportedSetupFrame:function(b){b={streamId:0,data:this._convertStringToArrayBuffer(b)};return this._getErrorFrame(b,a.UNSUPPORTED_SETUP)},getRejectedSetupFrame:function(b){b=
{streamId:0,data:this._convertStringToArrayBuffer(b)};return this._getErrorFrame(b,a.REJECTED_SETUP)},getConnectionErrorFrame:function(b){b.data=this._convertStringToArrayBuffer(b.msg);return this._getErrorFrame(b,a.CONNECTION_ERROR)},getApplicationErrorFrame:function(b){b.data=this._convertStringToArrayBuffer(b.msg);return this._getErrorFrame(b,a.APPLICATION_ERROR)}}));return{impl:g,TYPES:d,FLAGS:b,ERROR_CODES:a,deserialize:g.deserialize.bind(g),serialize:g.serialize.bind(g),getSetupFrame:g.getSetupFrame.bind(g),
getKeepAliveFrame:g.getKeepAliveFrame.bind(g),getConnectStreamFrame:g.getConnectStreamFrame.bind(g),getDisconnectStreamFrame:g.getDisconnectStreamFrame.bind(g),getPayloadFrame:g.getPayloadFrame.bind(g),getCancelPayloadFrame:g.getCancelPayloadFrame.bind(g),getInvalidSetupFrame:g.getInvalidSetupFrame.bind(g),getUnsupportedSetupFrame:g.getUnsupportedSetupFrame.bind(g),getRejectedSetupFrame:g.getRejectedSetupFrame.bind(g),getConnectionErrorFrame:g.getConnectionErrorFrame.bind(g),getApplicationErrorFrame:g.getApplicationErrorFrame.bind(g)}})},
"graphics/services/BinaryDataSink":function(){define(["dojo/_base/declare","dojo/Deferred"],function(g,f){return g([],{constructor:function(){this._Subcriptions={};this._DataBank={}},onDataReady:function(e,d){null===this.fWebSocket&&this._requestWebSocketConnection();if(void 0!==this._DataBank[e]){var b=this._DataBank[e];delete this._DataBank[e];d(b,!1)}else this._Subcriptions[e]=d},forget:function(e){void 0!==this._DataBank[e]&&delete this._DataBank[e];void 0!==this._Subcriptions[e]&&delete this._Subcriptions[e]},
processData:function(e,d){if(void 0!==this._Subcriptions[e]){var b=this._Subcriptions[e];delete this._Subcriptions[e];b(d,!0)}else this._DataBank[e]=d}})})},"graphics/graphicscontrol/ControlManager":function(){define("dojo/_base/declare dojo/Deferred dojo/promise/all graphics/mixins/EventEmitter graphics/graphicscontrol/GenericControl graphics/graphicscontrol/AxesControl graphics/graphicscontrol/AxesLayoutableControl graphics/graphicscontrol/LayoutableControl graphics/graphicscontrol/LayoutableChildren".split(" "),
function(g,f,e,d,b,a,c,h,k){return g([d],{constructor:function(a){this._controls={};this._unfullFilledRequestPromises={};this._gview=a;this._defineEvent("request");this._layoutableChildren=new k},getLayoutableObject:function(){return this._layoutableChildren},handleMessage:function(a){if(void 0!==a.cmd)switch(a.cmd){case "response":var b=a.requestToken,c=this._unfullFilledRequestPromises[b];void 0!==c&&(delete this._unfullFilledRequestPromises[b],c.resolve(a));break;case "registration":b=a.peerID;
this._controls[b]=this._createControl(a.type,b);this._controls[b].setRequestHandlerCallback(this._requestCallback.bind(this));this._addLayoutableChild(b);break;case "objectdirty":b=a.peerID;this._controls[b]&&this._objectDirtyResponse(b);break;case "modelSidePositionChanged":b=a.peerID;this._controls[b]&&this._controls[b].positionHasChanged();break;case "removal":b=a.peerID;this._controls[b]&&(this._removeLayoutableChild(b),this._removeControl(b));break;case "requestTestMessage":this._requestCallback({name:"testRequest",
data:73});break;case "testResponse":73===a.data&&this.emitEvent("request",{name:"testRequestDone"})}},_addLayoutableChild:function(a){void 0!==this._controls[a].isLayoutable&&this._controls[a].isLayoutable()&&this._layoutableChildren.addChild(this._controls[a])},_removeLayoutableChild:function(a){void 0!==this._controls[a].isLayoutable()&&this._controls[a].isLayoutable()&&this._layoutableChildren.removeChild(this._controls[a])},_removeControl:function(a){delete this._controls[a]},_objectDirtyResponse:function(a){this._controls[a].clearCache()},
_createControl:function(d,e){var f=new b(e);switch(d){case "axes":f=new a(e,this._gview);break;case "axesLayoutable":f=new c(e,this._gview);break;case "layoutable":f=new h(e,this._gview)}return f},_nextRequestTokenID:function(){void 0===this._nextRequestTokenID.id?this._nextRequestTokenID.id=0:this._nextRequestTokenID.id++;return this._nextRequestTokenID.id},_requestCallback:function(a){var b=this._nextRequestTokenID(),c=new f;this._unfullFilledRequestPromises[b]=c;a.requestToken=b;this.emitEvent("request",
a);return c},findControl:function(a){if(void 0===this._controls[a])throw"A control for this object not found.";return this._controls[a]}})})},"graphics/graphicscontrol/GenericControl":function(){define(["dojo/_base/declare","graphics/graphicscontrol/ControlBase"],function(g,f){return g([f],{constructor:function(e){this._requestHandler=null;this._peerID=e},isLayoutable:function(){return!1},isValidControl:function(){return!0},process:function(e){e.peerID=this._peerID;return this._requestHandler(e)},
setRequestHandlerCallback:function(e){this._requestHandler=e},clearCache:function(){}})})},"graphics/graphicscontrol/ControlBase":function(){define(["dojo/_base/declare","dojo/Deferred"],function(g,f){return g([],{constructor:function(){},process:function(e){return(new f).resolve({})},clearCache:function(){}})})},"graphics/graphicscontrol/AxesControl":function(){define("dojo/_base/declare dojo/Deferred graphics/MWSG/matrix4x4 graphics/graphicscontrol/AxesLayoutableControl graphics/graphicscontrol/ServerSideAxesControlStrategy graphics/graphicscontrol/ClientSideAxesControlStrategy".split(" "),
function(g,f,e,d,b,a){return g([d],{constructor:function(a,b){this._CachedRequestHandler=null;this._axesPeerID=a;this._releaseLimitsRefPromise=(new f).resolve();this._gview=b;b.onEvent("viewchanged",function(){this._setupStretegy()}.bind(this));this._setupStretegy()},_setupStretegy:function(){this._axesControlStrategy=this._gview.ViewMode.scene===this._gview._viewMode?new a(this._axesPeerID,this._gview):new b(this._axesPeerID);this._axesControlStrategy.setRequestHandlerCallback(this._CachedRequestHandler)},
isValidControl:function(){return this._axesControlStrategy.isValidAxesControlStrategy()?!0:!1},setRequestHandlerCallback:function(a){this.inherited(arguments);this._axesControlStrategy.setRequestHandlerCallback(a);this._CachedRequestHandler=a},lockLimitsRef:function(){this._axesControlStrategy.lockLimitsRef()},releaseLimitsRef:function(){this._releaseLimitsRefPromise=this._axesControlStrategy.releaseLimitsRef()},setLimits:function(a,b,d,e,f,g){this._releaseLimitsRefPromise.then(function(){this._axesControlStrategy.setLimits(a,
b,d,e,f,g)}.bind(this))},getCurrentLimits:function(a,b){var d=new f;this._releaseLimitsRefPromise.then(function(){this._axesControlStrategy.getCurrentLimits().then(function(a){d.resolve(a)})}.bind(this));return d},is2D:function(){var a=new f;this._releaseLimitsRefPromise.then(function(){this._axesControlStrategy.is2D().then(function(b){a.resolve(b)})}.bind(this));return a},getNDCToDSTransform:function(){var a=new f;this._releaseLimitsRefPromise.then(function(){this._axesControlStrategy.getNDCToDSTransform().then(function(b){a.resolve(b)})}.bind(this));
return a},clearCache:function(){this.inherited(arguments);this.refreshStrategy()},refreshStrategy:function(){this._axesControlStrategy.clearCache();!this._axesControlStrategy.canHandleMultiplePlotTargets()&&this._CachedRequestHandler&&this._CachedRequestHandler({name:"hasMultipleTargets",peerID:this._axesPeerID}).then(function(a){a.data.multipleTargets&&(this._axesControlStrategy=new b(this._axesPeerID),this._axesControlStrategy.setRequestHandlerCallback(this._CachedRequestHandler))}.bind(this))},
getPixelToDSTransform:function(){var a=this.getCanvasViewport(),b=a.x+a.width/2,d=a.y+a.height/2,g=e.multiply(e.createScale(a.width/2,-1*a.height/2,1),e.createTranslation(b,d,0));g.invert();var m=new f;this.getNDCToDSTransform().then(function(a){a=e.multiply(g,a);m.resolve(a)});return m},getCanvasViewport:function(){var a=this._gview.Container,b=a,d=0,e=0;if(b.offsetParent){do d+=b.offsetLeft,e+=b.offsetTop;while(b=b.offsetParent);return{x:d,y:e,width:a.clientWidth,height:a.clientHeight}}}})})},"graphics/graphicscontrol/AxesLayoutableControl":function(){define(["dojo/_base/declare",
"dojo/Deferred","graphics/graphicscontrol/LayoutableControl"],function(g,f,e){return g([e],{constructor:function(d,b){this._requestHandler=null;this._peerID=d;this._gview=b},isLayoutable:function(){return!0},setRequestHandlerCallback:function(d){this.inherited(arguments);this._requestHandler=d},clearCache:function(){this.inherited(arguments)}})})},"graphics/graphicscontrol/LayoutableControl":function(){define("dojo/_base/declare dojo/Evented dojo/Deferred graphics/mixins/EventEmitter dojo/promise/all graphics/graphicscontrol/GenericControl graphics/graphicscontrol/LayoutableControlUtils gbtshared/layout/LayoutableComponentController".split(" "),
function(g,f,e,d,b,a,c,h){return g([f,d,a,h],{constructor:function(a,b){this._requestHandler=null;this._peerID=a;this._defineEvent("positionAltered");this._defineEvent("activePositionChanged");this._gview=b;this._viewDimensions=this._intervalID=null},isLayoutable:function(){return!0},setRequestHandlerCallback:function(a){this.inherited(arguments);this._requestHandler=a},sendPositionValuesPeriodically:function(a){this.lastKnownPosition=a;this._viewDimensions=[this._gview.domNode.clientWidth,this._gview.domNode.clientHeight];
null===this._intervalID&&(this._intervalID=window.setInterval(function(){null!==this.lastKnownPosition?(this.setOuterPositionInPixels(this.lastKnownPosition),this.lastKnownPosition=null):(window.clearInterval(this._intervalID),this._intervalID=null)}.bind(this),200))},setOuterPositionInPixels:function(a){this._outerPositionCache=a=c.convertFromZeroToOneOrigin(a);this._requestHandler({name:"setOuterPosition",data:a,refFrameDim:this._viewDimensions,peerID:this._peerID})},setActivePositionInPixels:function(a){this.sendPositionValuesPeriodically(a)},
getOuterPositionInPixels:function(){if(void 0!==this._outerPositionCache)return c.convertFromOneToZeroOrigin(this._outerPositionCache)},getOuterPositionDeferred:function(){var a=this._requestHandler({name:"getOuterPosition",peerID:this._peerID}),b=new e;a.then(function(a){this._outerPositionCache=a.data.OuterPosition;b.resolve(this._outerPositionCache)}.bind(this));return b},getActivePositionInPixels:function(){return this.getOuterPositionInPixels()},getInnerPositionInPixels:function(){if(void 0!==
this._innerPositionCache)return c.convertFromOneToZeroOrigin(this._innerPositionCache)},getInnerPositionDeferred:function(){var a=this._requestHandler({name:"getInnerPosition",peerID:this._peerID}),b=new e;a.then(function(a){this._innerPositionCache=a.data.InnerPosition;b.resolve(this._innerPositionCache)}.bind(this));return b},getPositionDeferred:function(){var a=this.getOuterPositionDeferred(),b=this.getInnerPositionDeferred();return[a,b]},setPositionChangedCallback:function(a){this.onEvent("positionAltered",
a)},attachModelSidePositionChangeListener:function(){this.setPositionChangedCallback(function(a){this.emit("modelSidePositionChanged",a)}.bind(this))},positionHasChanged:function(){var a=[this._outerPositionCache,this._innerPositionCache];void 0!==a[0]&&void 0!==a[1]&&(a=this.getPositionDeferred(),b([a[0],a[1]]).then(function(a){this.emitEvent("positionAltered",this);this._outerPositionCache=a[0];this._innerPositionCache=a[1]}.bind(this)))},clearCache:function(){this.inherited(arguments)},getNeighborMarginTolerance:function(){return this.TOLERANCE_FOR_CHARTS},
getId:function(){return this._peerID},getPeerNode:function(){}})})},"graphics/graphicscontrol/LayoutableControlUtils":function(){define([],function(){return{comparePositionValues:function(g,f){for(var e=!1,d=0;4>d;d++)if(0.01<Math.abs(g[d]-f[d])){e=!0;break}return e},convertFromOneToZeroOrigin:function(g){return[g[0]-1,g[1]-1,g[2],g[3]]},convertFromZeroToOneOrigin:function(g){return[g[0]+1,g[1]+1,g[2],g[3]]}}})},"gbtshared/layout/LayoutableComponentController":function(){define(["dojo/_base/declare"],
function(g){return g(null,{TOLERANCE_FOR_CHARTS:20,TOLERANCE_FOR_NON_CHARTS:5,constructor:function(){},getActivePositionInPixels:function(){throw"getActivePositionInPixels must be implemented by the concrete subclass";},getOuterPositionInPixels:function(){throw"getOuterPositionInPixels must be implemented by the concrete subclass";},getInnerPositionInPixels:function(){throw"getInnerPositionInPixels must be implemented by the concrete subclass";},setActivePositionInPixels:function(f){throw"setActivePositionInPixels must be implemented by the concrete subclass";
},getId:function(){throw"getId must be implemented by the concrete subclass";},getDebugId:function(){return this.getId()},attachModelSidePositionChangeListener:function(){},isContainer:function(){return!1},getNeighborMarginTolerance:function(){return this.TOLERANCE_FOR_NON_CHARTS},getProperty:function(f){}})})},"graphics/graphicscontrol/ServerSideAxesControlStrategy":function(){define(["dojo/_base/declare","dojo/Deferred","graphics/MWSG/matrix4x4"],function(g,f,e){return g([],{constructor:function(d){this._requestHandler=
null;this._objectPeerID=d},isValidAxesControlStrategy:function(){return!0},lockLimitsRef:function(){},releaseLimitsRef:function(){this.clearCache();var d={name:"recaptureLimitsRef",peerID:this._objectPeerID},b=new f;this._requestHandler(d).then(function(){this.clearCache();b.resolve()}.bind(this));return b},_computeDSMat:function(d){var b=d[0],a=d[1],c=d[2],f=d[3],g=d[4],l=d[5];d=e.createScale(1/(a-b),1/(f-c),1/(l-g));b=e.createTranslation(-b/(a-b),-c/(f-c),-g/(l-g));return e.multiply(d,b)},setLimits:function(d,
b,a,c,f,g){var l=this._cachedDataSpaceMatrix;this._cachedLimits=[d,b,a,c,f,g];this._cachedDataSpaceMatrix=this._computeDSMat(this._cachedLimits);l&&this._cachedNDC2DS&&(d=new e,d.setElements(this._cachedDataSpaceMatrix.getElements()),d.invert(),this._cachedNDC2DS=e.multiply(this._cachedNDC2DS,e.multiply(l,d)));this._immediateSendLimitsToServer(this._cachedLimits)},_immediateSendLimitsToServer:function(d){this._requestHandler({name:"setlimits",limits:d,peerID:this._objectPeerID})},getCurrentLimits:function(d,
b){if(void 0!==this._cachedLimits)return(new f).resolve(this._cachedLimits);var a={name:"getlimits",peerID:this._objectPeerID},c=new f;this._requestHandler(a).then(function(a){this._cachedLimits=a.data.Limits;this._cachedDataSpaceMatrix=this._computeDSMat(this._cachedLimits);c.resolve(a.data.Limits)}.bind(this));return c},is2D:function(){if(void 0!==this._is2DCache)return(new f).resolve(this._is2DCache);var d={name:"is2D",peerID:this._objectPeerID},b=new f;this._requestHandler(d).then(function(a){this._is2DCache=
a.data.is2D;b.resolve(this._is2DCache)}.bind(this));return b},getNDCToDSTransform:function(){if(this._cachedNDC2DS)return(new f).resolve(this._cachedNDC2DS);var d={name:"getNDCToDSTransform",peerID:this._objectPeerID},b=new f;this._requestHandler(d).then(function(a){var c=new e;c.setElements(a.data.ndc2dstransform);this._cachedNDC2DS=new e;this._cachedNDC2DS.setElements(a.data.ndc2dstransform);b.resolve(c)}.bind(this));return b},setRequestHandlerCallback:function(d){this._requestHandler=d},clearCache:function(){delete this._is2DCache;
delete this._cachedNDC2DS;delete this._cachedLimits;delete this._cachedDataSpaceMatrix},canHandleMultiplePlotTargets:function(){return!0}})})},"graphics/graphicscontrol/ClientSideAxesControlStrategy":function(){define(["dojo/_base/declare","dojo/Deferred"],function(g,f){return g([],{constructor:function(e,d){this._gview=d;this._requestHandler=null;this._objectPeerID=e;this.setLimitsTimeoutID=null;this._limitsLocked=!1},isValidAxesControlStrategy:function(){var e=this._gview.getAxesControl(this._objectPeerID);
return null!==e&&void 0!==e&&0!==Object.keys(e).length?!0:!1},lockLimitsRef:function(){this._limitsLocked=!0},releaseLimitsRef:function(){this._limitsLocked=!1;var e=new f;this._lastLimits?this._immediateSendLimitsToServer(this._lastLimits).then(function(){e.resolve()}):e.resolve();return e},setLimits:function(e,d,b,a,c,f){this._gview.getAxesControl(this._objectPeerID).setLimits(e,d,b,a,c,f);window.requestAnimationFrame(function(){this._gview.draw()}.bind(this));this._lastLimits=[e,d,b,a,c,f];this._limitsLocked||
this._delayedSendCachedLimits()},_delayedSendCachedLimits:function(){window.clearTimeout(this.setLimitsTimeoutID);this.setLimitsTimeoutID=window.setTimeout(function(){this.releaseLimitsRef()}.bind(this),200)},_immediateSendLimitsToServer:function(e){return this._requestHandler({name:"setlimits",limits:e,peerID:this._objectPeerID})},getCurrentLimits:function(e,d){var b=this._gview.getAxesControl(this._objectPeerID);return(new f).resolve(b.getCurrentLimits())},is2D:function(){var e=this._gview.getAxesControl(this._objectPeerID);
return(new f).resolve(e.is2D())},getNDCToDSTransform:function(){var e=this._gview.getAxesControl(this._objectPeerID);return(new f).resolve(e.getNDCToDSTransform())},setRequestHandlerCallback:function(e){this._requestHandler=e},clearCache:function(){},canHandleMultiplePlotTargets:function(){return!1}})})},"graphics/graphicscontrol/LayoutableChildren":function(){define(["dojo/_base/declare","dojo/Deferred","dojo/promise/all","graphics/mixins/EventEmitter"],function(g,f,e,d){return g([d],{constructor:function(){this._children=
[];this._defineEvent("addChild");this._defineEvent("removeChild")},getLayoutableChildren:function(){return this._children},addChild:function(b){this._children.push(b);var a=b.getPositionDeferred();e([a[0],a[1]]).then(function(a){void 0!==a[0]&&void 0!==a[1]&&this.emitEvent("addChild",b)}.bind(this))},removeChild:function(b){var a=this._children.indexOf(b);-1!==a&&this._children.splice(a,1);this.emitEvent("removeChild",b)},setChildAddedCallback:function(b){this.onEvent("addChild",b)},setChildRemovedCallback:function(b){this.onEvent("removeChild",
b)}})})},"graphics/graphicscontrol/InteractionsManager":function(){define("dojo/_base/declare dojo/on graphics/graphicscontrol/ControlManager graphics/InteractionObjects/ZoomInteraction graphics/InteractionObjects/RegionZoomInteraction graphics/InteractionObjects/RegionZoomAffordanceInteraction graphics/InteractionObjects/StepZoomInteraction graphics/InteractionObjects/PinchZoomInteraction graphics/InteractionObjects/PanInteraction graphics/InteractionObjects/GenericInteraction graphics/interaction/ActionParser graphics/interaction/CursorFactory".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p){return g([],{_LastMouseMoveResult:null,_MouseCursor:"initial",constructor:function(a){this._interactions={};this._objInteractionsMap={};this._gview=a},setup:function(){this._removeEventHandlers();this._createOrUpdateActionParser();this._container=this._gview.Container;this._createEventHandlers();this._WarmupHandler=this._actionParser.onEvent("warmup",this._handleWarmup.bind(this))},handleMessage:function(a){this.clearLastState();if(void 0!==a.cmd)switch(a.cmd){case "registration":var b=
a.interactionID,c=a.peerID;a=this.createInteraction(a.type,b,c,a.interactionData);this._interactions[b]=a;void 0!==this._objInteractionsMap[c]?this._objInteractionsMap[c].push(b):this._objInteractionsMap[c]=[b];break;case "removeinteraction":c=a.peerID;if(void 0!==this._objInteractionsMap[c]){a=this._objInteractionsMap[c];for(var d=0;d<a.length;d++)b=a[d],this._interactions[b].disable(),delete this._interactions[b]}delete this._objInteractionsMap[c]}},clearLastState:function(){delete this._LastMouseMoveResult},
createInteraction:function(e,f,g,m){var p=null;g=this._gview._controlManager.findControl(g);switch(e){case "zoom":p=new d(f,g,this._actionParser,m);break;case "pinchpanzoom":p=new h(f,g,this._actionParser,m);break;case "stepzoom":p=new c(f,g,this._actionParser,m);break;case "regionzoom":p=new b(f,g,this._actionParser,m);break;case "regionzoomaffordance":p=new a(f,g,this._actionParser,m,this._container);break;case "pan":p=new k(f,g,this._actionParser,m);break;default:p=new l(f,g,this._actionParser,
m)}return p},setCursor:function(a,b){var c=p.createCursorURL(a,b);this._container.style.cursor="unset";this._container.style.cursor=c},_removeEventHandlers:function(){void 0!==this._MouseMoveHandler&&this._MouseMoveHandler.remove();void 0!==this._WarmupHandler&&this._WarmupHandler.remove();void 0!==this._DragStartHandler&&this._DragStartHandler.remove();void 0!==this._DragEndHandler&&this._DragEndHandler.remove()},_createEventHandlers:function(){this._MouseMoveHandler=f.pausable(this._gview.domNode,
"mousemove",this._handleMouseMove.bind(this));this._WarmupHandler=this._actionParser.onEvent("warmup",this._handleWarmup.bind(this));this._DragStartHandler=this._actionParser.onEvent("dragstart",this._handleDragStart.bind(this));this._DragEndHandler=this._actionParser.onEvent("dragend",this._handleDragEnd.bind(this))},_createOrUpdateActionParser:function(){var a={domNode:this._gview.domNode};void 0!==this._actionParser?this._actionParser.updateDomNode(a):this._actionParser=new m(a)},_handleWarmup:function(a){a=
a.hasOwnProperty("pointers")&&0<a.pointers.length?a.pointers[0]:a;"mousemove"!==a.type&&this._handleMouseMove(a)},_handleDragStart:function(a){this._MouseMoveHandler.pause()},_handleDragEnd:function(a){this._MouseMoveHandler.resume()},_handleMouseMove:function(a){var b=this._gview.getObjectPicker(),c=a.type;b.requestHierarchy(a.offsetX,a.offsetY).then(function(a){this._updateCurrentInteraction(a,c);this.setCursor(this._MouseCursor,[7,7])}.bind(this))},_updateCurrentInteraction:function(a,b){if(0<
a.length)for(var c=0;c<a.length;c++){var d=a[c];if(this._LastMouseMoveResult===d)break;var e=this._objInteractionsMap[d];if(void 0!==e&&null!==e){null!==this._LastMouseMoveResult&&(c=this._objInteractionsMap[this._LastMouseMoveResult],this._disableInteractions(c));this._enableInteractions(e);this._LastMouseMoveResult=d;break}}else if(null!==this._LastMouseMoveResult&&"mousemove"===b||"touchstart"===b)c=this._objInteractionsMap[this._LastMouseMoveResult],void 0!==c&&null!==c&&this._disableInteractions(c),
this._LastMouseMoveResult=null,this._MouseCursor="initial"},_disableInteractions:function(a){for(var b=0;b<a.length;b++)this._actionParser._preventDefault=!1,this._interactions[a[b]].disable(),this._MouseCursor="initial"},_enableInteractions:function(a){for(var b=0;b<a.length;b++){this._actionParser._preventDefault=!0;var c=this._interactions[a[b]];c.enable();this._MouseCursor=c.getMouseCursor()}}})})},"graphics/InteractionObjects/ZoomInteraction":function(){define(["dojo/_base/declare","graphics/InteractionObjects/BaseInteraction",
"graphics/InteractionObjects/SingleShotZoomHelper","graphics/MWSG/Point4"],function(g,f,e,d){return g([f],{constructor:function(b,a,c,d){},execute:function(b){if(this._control.isValidControl()){var a=1.1;0>-b.srcEvent.deltaY&&(a=1/a);var c=new d(b.srcEvent.clientX,b.srcEvent.clientY,0,1);b=this._control.getPixelToDSTransform();var f=this._control.is2D(),g=this._control.getCurrentLimits();b.then(function(b){f.then(function(f){g.then(function(g){g=f?b.transform(c):new d((g[0]+g[1])/2,(g[2]+g[3])/2,
(g[4]+g[5])/2,1);e.fire(this._control,g,a)}.bind(this))}.bind(this))}.bind(this))}}})})},"graphics/InteractionObjects/BaseInteraction":function(){define(["dojo/_base/declare","dojo/on"],function(g,f,e){return g([],{_ID:null,_control:null,_actionParser:null,_mouseCursor:null,_actions:null,constructor:function(d,b,a,c){this._ID=d;this._control=b;this._actionParser=a;this._mouseCursor=c.mouseCursor;Array.isArray(c.actions)?this._actions=c.actions:this._actions=[c.actions]},enable:function(){this._listeners=
[];for(var d=0;d<this._actions.length;d++)this._listeners.push(this._actionParser.onEvent(this._actions[d],this.execute.bind(this)))},disable:function(){void 0!==this._listeners&&0<this._listeners.length&&(this._listeners.forEach(function(d){d.remove()}),delete this._listener)},execute:function(){},getMouseCursor:function(){return this._mouseCursor}})})},"graphics/InteractionObjects/SingleShotZoomHelper":function(){define(["dojo/_base/declare"],function(g){return{currentPromise:null,_promiseNumber:0,
fire:function(f,e,d){if(f){this.currentPromise=f.getCurrentLimits();this.lastKnownPoint=e;var b=this._promiseNumber;this._promiseNumber++;this.currentPromise.then(function(a){if(b+1===this._promiseNumber){var c=this.zoomAxisAroundPoint([a[0],a[1]],this.lastKnownPoint.getX(),d),e=this.zoomAxisAroundPoint([a[2],a[3]],this.lastKnownPoint.getY(),d),g=[a[4],a[5]];f.is2D().then(function(b){b||(g=this.zoomAxisAroundPoint([a[4],a[5]],this.lastKnownPoint.getZ(),d));f.setLimits(c[0],c[1],e[0],e[1],g[0],g[1])}.bind(this))}}.bind(this))}},
zoomAxisAroundPoint:function(f,e,d){return[e-(e-f[0])/d,e+(f[1]-e)/d]}}})},"graphics/InteractionObjects/RegionZoomInteraction":function(){define("dojo/_base/declare graphics/InteractionObjects/BaseInteraction graphics/InteractionObjects/DragResponse graphics/MWSG/Point4 graphics/interaction/SingleShotZoom graphics/interaction/ROIZoomAffordance".split(" "),function(g,f,e,d,b,a){return g([f,e],{_regionofinterest:null,_zoomfactor:1.2,constructor:function(a,b,d,e){},destroy:function(){this.disable()},
start:function(a){var b={};a=new d(a.srcEvent.clientX,a.srcEvent.clientY,0,1);b.p2dsPromise=this._control.getPixelToDSTransform();b.orig_point_pixels=a;b.origlimitsPromise=this._control.getCurrentLimits();return b},move:function(a){},stop:function(a,b){var e=this._zoomfactor;a.shiftKey&&(e=1/this._zoomfactor);var f=new d(a.srcEvent.clientX,a.srcEvent.clientY,0,1);b.p2dsPromise.then(function(a){var c=a.transform(b.orig_point_pixels),d=a.transform(f);b.origlimitsPromise.then(function(a){a=this.calculateZoomedLimits(e,
a,b.orig_point_pixels,f,c,d);this.setLimits(a)}.bind(this))}.bind(this))},calculateZoomedLimits:function(a,d,e,f,g,p){var n=Math.abs(e.getX()-f.getX());e=Math.abs(e.getY()-f.getY());n=15>n;e=15>e;n&&e?(n=b.zoomAxisAroundPoint([d[0],d[1]],p.getX(),a),a=b.zoomAxisAroundPoint([d[2],d[3]],p.getY(),a)):(n?(g.setX(d[0]),p.setX(d[1])):e&&(g.setY(d[2]),p.setY(d[3])),n=[g.getX(),p.getX()],a=[g.getY(),p.getY()],n.sort(function(a,b){return a-b}),a.sort(function(a,b){return a-b}));return[n[0],n[1],a[0],a[1]]},
setLimits:function(a){this._control.setLimits(a[0],a[1],a[2],a[3],-1,1)}})})},"graphics/InteractionObjects/DragResponse":function(){define(["dojo/_base/declare"],function(g){return g([],{_startdata:null,execute:function(f){switch(f.name){case "dragstart":this._startdata=this.start(f);break;case "dragprogress":this.move(f,this._startdata);break;case "dragend":this.stop(f,this._startdata),this._startdata=[]}}})})},"graphics/interaction/SingleShotZoom":function(){define(["dojo/_base/declare"],function(g){return{zoomTimeoutId:null,
fire:function(f,e,d){var b=f.widget.GraphicsView,a=b.getAxesExternalAPI();if(a&&a.isValid()){var c=a.getCurrentLimits(),g=this.zoomAxisAroundPoint([c[0],c[1]],e.getX(),d),k=this.zoomAxisAroundPoint([c[2],c[3]],e.getY(),d);a.setLimits(g[0],g[1],k[0],k[1],-1,1);b.draw();window.clearTimeout(this.zoomTimeoutId);this.zoomTimeoutId=window.setTimeout(function(){f.setLimits(g[0],g[1],k[0],k[1],0,1)},100)}},zoomAxisAroundPoint:function(f,e,d){return[e-(e-f[0])/d,e+(f[1]-e)/d]}}})},"graphics/interaction/ROIZoomAffordance":function(){define(["dojo/_base/declare",
"graphics/interaction/Drag","graphics/interaction/Transforms","MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/ROI"],function(g,f,e,d){return g([f],{constructor:function(b){this.con=b},enable:function(){this.initialize(this.con,!0);this.regionofinterest=new d(this.con)},disable:function(){this.cancel(this.con);this.regionofinterest&&(this.regionofinterest.destroy(),this.regionofinterest=null)},destroy:function(){this.disable()},start:function(b){var a=e.getCanvasPos(this.con);this.regionofinterest.setTopLeft(a.y,
a.x);this.regionofinterest.setAnchorPoint(b.x,b.y)},move:function(b){this.regionofinterest.drawROI(b.x,b.y)},stop:function(b,a){this.regionofinterest.hide();this.regionofinterest.resetAnchorPoint()}})})},"graphics/interaction/Drag":function(){define(["dojo/_base/declare"],function(g){return g([],{mousedown:null,mousemove:null,mouseup:null,agnosticstring:null,initialize:function(f,e){var d=this;this.cancel(f);d.mousedown=function(b){d.start_drag(f,b)};d.agnosticstring="";e&&(d.agnosticstring="clientalways");
f.addEventListener("graphicscanvasleftmousedown"+d.agnosticstring,d.mousedown,!1)},cancel:function(f){f.removeEventListener("graphicscanvasleftmousedown"+this.agnosticstring,this.mousedown,!1);f.removeEventListener("graphicsdocumentleftmousemove"+this.agnosticstring,this.mousemove,!1);f.removeEventListener("graphicsdocumentleftmouseup"+this.agnosticstring,this.mousemove,!1)},start_drag:function(f,e){e.preventDefault();var d=this;f.removeEventListener("graphicsdocumentleftmousemove"+d.agnosticstring,
d.mousemove);var b=d.start(e);d.mousemove=function(a){d.move(a,b)};f.addEventListener("graphicsdocumentleftmousemove"+d.agnosticstring,d.mousemove,!1);d.mouseup=function(a){f.removeEventListener("graphicsdocumentleftmouseup"+d.agnosticstring,d.mouseup,!1);f.removeEventListener("graphicsdocumentleftmousemove"+d.agnosticstring,d.mousemove,!1);d.stop(a,b)};f.addEventListener("graphicsdocumentleftmouseup"+d.agnosticstring,d.mouseup,!1)},start:function(f){},move:function(f,e){},stop:function(f,e){}})})},
"graphics/interaction/Transforms":function(){define(["dojo/_base/declare","graphics/MWSG/matrix4x4","graphics/MWSG/Point4"],function(g,f,e){return{getCanvasPos:function(d){var b=0,a=0;if(d.offsetParent){do b+=d.offsetLeft,a+=d.offsetTop;while(d=d.offsetParent);return{x:b,y:a}}},convertPixelsToNDC:function(d,b){return[d[0]/(b.clientWidth/2)-1,1-d[1]/(b.clientHeight/2)]},convertNDCToData:function(d,b){var a=new e(d[0],d[1],0,1);return b.transform(a)},getCurrentPointPixels:function(d,b){var a=this.getCanvasPos(b);
return[d.clientX-a.x,d.clientY-a.y]},getCurrentPointPixelsYDir:function(d,b){var a=this.getCurrentPointPixels(d,b);a[1]=b.clientHeight-a[1];return a}}})},"graphics/InteractionObjects/RegionZoomAffordanceInteraction":function(){define(["dojo/_base/declare","graphics/InteractionObjects/BaseInteraction","graphics/InteractionObjects/DragResponse","graphics/interaction/Transforms","MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/ROI"],function(g,f,e,d,b){return g([f,e],{_regionofinterest:null,_con:null,
constructor:function(a,c,d,e,f){this._con=f;this._regionofinterest=new b(this._con)},destroy:function(){this._regionofinterest.destroy()},start:function(a){var b=d.getCanvasPos(this._con);this._regionofinterest.setTopLeft(b.y,b.x);this._regionofinterest.setAnchorPoint(a.srcEvent.clientX,a.srcEvent.clientY)},move:function(a){this._regionofinterest.drawROI(a.srcEvent.clientX,a.srcEvent.clientY)},stop:function(a){this._regionofinterest.hide();this._regionofinterest.resetAnchorPoint()}})})},"graphics/InteractionObjects/StepZoomInteraction":function(){define(["dojo/_base/declare",
"graphics/InteractionObjects/BaseInteraction","graphics/InteractionObjects/SingleShotZoomHelper","graphics/MWSG/Point4"],function(g,f,e,d){return g([f],{_zoom_factor:1.5,constructor:function(b,a,c,d){},execute:function(b){var a=this._zoom_factor;b.srcEvent.shiftKey&&(a=1/this._zoom_factor);var c=new d(b.srcEvent.clientX,b.srcEvent.clientY,0,1);this._control.getPixelToDSTransform().then(function(b){b=b.transform(c);e.fire(this._control,b,a)}.bind(this))}})})},"graphics/InteractionObjects/PinchZoomInteraction":function(){define("dojo/_base/declare dojo/Deferred graphics/InteractionObjects/BaseInteraction graphics/interaction/Transforms graphics/MWSG/Point4 graphics/MWSG/matrix4x4".split(" "),
function(g,f,e,d,b,a){return g([e],{_regionofinterest:null,_con:null,constructor:function(a,b,d,e){this._lastPanMoveDeferred=(new f).resolve()},start:function(a){this._control.lockLimitsRef();var b=this.getPixelPoint(a.pointers[0]);a=this.getPixelPoint(a.pointers[1]);var d={};d.orig_point_pixels1=b;d.orig_point_pixels2=a;d.p2dsPromise=this._control.getPixelToDSTransform();d.origlimitsPromise=this._control.getCurrentLimits();d.is2DPromise=this._control.is2D();return d},move:function(a,b){var d=this.getPixelPoint(a.pointers[0]),
e=this.getPixelPoint(a.pointers[1]);b&&(b.orig_point_pixels1&&b.orig_point_pixels2)&&(this._lastPanMoveDeferred=new f,b.p2dsPromise.then(function(a){b.origlimitsPromise.then(function(c){b.is2DPromise.then(function(f){var g=b.orig_point_pixels1,r=b.orig_point_pixels2,s=a.transform(g),t=a.transform(r),u=a.transform(d),v=a.transform(e),g=this.calculateScale(g,r,d,e),w=r=0;f&&(r=this.calculateTranslation(s.getX(),t.getX(),u.getX(),v.getX()),w=this.calculateTranslation(s.getY(),t.getY(),u.getY(),v.getY()));
s=this.calculateLimits(c,g,r,w,0);f?this._control.setLimits(s[0],s[1],s[2],s[3],c[4],c[5]):this._control.setLimits(s[0],s[1],s[2],s[3],s[4],s[5]);this._lastPanMoveDeferred.resolve()}.bind(this))}.bind(this))}.bind(this)))},stop:function(a,b){this._lastPanMoveDeferred.then(function(){this._control.releaseLimitsRef()}.bind(this))},execute:function(a){switch(a.name){case "pinchstart":this._startdata=this.start(a);break;case "pinchprogress":this.move(a,this._startdata);break;case "pinchend":this.stop(a,
this._startdata),this._startdata=[]}},getPixelPoint:function(a){return new b(a.clientX,a.clientY,0,1)},calculateScale:function(a,b,d,e){a=Math.sqrt((a.getX()-b.getX())*(a.getX()-b.getX())+(a.getY()-b.getY())*(a.getY()-b.getY()));return Math.sqrt((d.getX()-e.getX())*(d.getX()-e.getX())+(d.getY()-e.getY())*(d.getY()-e.getY()))/a},calculateTranslation:function(a,b,d,e){return(d+e)/2-(a+b)/2},calculateLimits:function(c,d,e,f,g){var p=(c[0]+c[1])/2,n=(c[2]+c[3])/2,q=(c[4]+c[5])/2,r=a.createTranslation(-p,
-n,-q);d=a.createScale(d,d,d);e=a.createTranslation(p+e,n+f,q+g);r=a.multiply(r,d);r=a.multiply(r,e);e=new b(c[0],c[2],c[4],1);c=new b(c[1],c[3],c[5],1);r.invert();e=r.transform(e);c=r.transform(c);return[e.getX(),c.getX(),e.getY(),c.getY(),e.getZ(),c.getZ()]}})})},"graphics/InteractionObjects/PanInteraction":function(){define(["dojo/_base/declare","dojo/Deferred","graphics/InteractionObjects/BaseInteraction","graphics/InteractionObjects/DragResponse","graphics/MWSG/Point4"],function(g,f,e,d,b){return g([e,
d],{constructor:function(a,b,d,e){this._lastPanMoveDeferred=(new f).resolve()},start:function(a){if(this._control.isValidControl()){this._control.lockLimitsRef();a=new b(a.srcEvent.clientX,a.srcEvent.clientY,0,1);var c={};c.orig_point_pixels=a;c.p2dsPromise=this._control.getPixelToDSTransform();c.origlimitsPromise=this._control.getCurrentLimits();return c}},move:function(a,c){this._control.isValidControl()&&(c&&c.orig_point_pixels)&&(this._lastPanMoveDeferred=new f,c.p2dsPromise.then(function(d){c.origlimitsPromise.then(function(e){var f=
new b(a.srcEvent.clientX,a.srcEvent.clientY,0,1);this.canvas_pan(c.orig_point_pixels,f,d,e);this._lastPanMoveDeferred.resolve()}.bind(this))}.bind(this)))},stop:function(a,b){this._control.isValidControl()&&this._lastPanMoveDeferred.then(function(){this._control.releaseLimitsRef()}.bind(this))},canvas_pan:function(a,c,d,e){a=new b(c.getX()-a.getX(),c.getY()-a.getY(),0,0);d=d.transform(a);e=[e[0]-d.getX(),e[1]-d.getX(),e[2]-d.getY(),e[3]-d.getY(),e[4]-d.getZ(),e[5]-d.getZ()];this._control.setLimits(e[0],
e[1],e[2],e[3],e[4],e[5])}})})},"graphics/InteractionObjects/GenericInteraction":function(){define(["dojo/_base/declare","graphics/InteractionObjects/BaseInteraction"],function(g,f){return g([f],{constructor:function(e,d,b,a){},execute:function(e){this._control.process({name:"action",actionData:{x:e.srcEvent.clientX,y:e.srcEvent.clientY,name:e.name}})}})})},"graphics/interaction/ActionParser":function(){define("dojo/_base/declare dojo/dom-style dojo/on mw-gesture/GestureDetector mw-gesture/GestureRegistry graphics/mixins/EventEmitter graphics/interaction/EventCreatorUtils".split(" "),
function(g,f,e,d,b,a,c){return g([a],{_preventDefault:null,_TouchDownHandler:null,__TouchMoveHandler:null,constructor:function(a){this._gestureDetector=void 0!==a.GestureDetectorConstructor?a.GestureDetectorConstructor:d;this._registry=void 0!==a.GestureRegistryObject?a.GestureRegistryObject:b;this._domStyle=void 0!==a.domStyleObject?a.domStyleObject:f;this._domNode=a.domNode;this._detector=null;this._preventDefault=!1;this.setupParser()},updateDomNode:function(a){this._domNode=a.domNode},setupParser:function(){this._defineEvent("dragstart");
this._defineEvent("dragend");this._defineEvent("dragprogress");this._defineEvent("dragcancel");this._defineEvent("click");this._defineEvent("doubleClick");this._defineEvent("rightClick");this._defineEvent("pinchstart");this._defineEvent("pinchend");this._defineEvent("pinchprogress");this._defineEvent("pinchcancel");this._defineEvent("scroll");this._defineEvent("warmup");var a=function(a,b){return function(b,c){b.name=a;this.emitEvent("warmup",b);this._preventDefault&&b.srcEvent.preventDefault();this.emitEvent(a,
b)}.bind(this)}.bind(this);this._domStyle.set(this._domNode,"-webkit-tap-highlight-color","rgba(0,0,0,0)");this._TouchDownHandler=e.pausable(this._domNode,"touchstart",this._handleTouchDown.bind(this));this._TouchMoveHandler=e.pausable(this._domNode,"touchmove",this._handleTouchMove.bind(this));this._detector=new this._gestureDetector(this._domNode);var b=this._registry.leftClick({callbacks:{recognized:a("click")}}),c=this._registry.doubleTap({options:{tapDelay:200},callbacks:{recognized:a("doubleClick")}}),
d=this._registry.pan({options:{minDistance:10},callbacks:{began:a("dragstart",!0),progress:a("dragprogress"),recognized:a("dragend"),cancelled:a("dragcancel")}}),f=this._registry.rightClick({callbacks:{recognized:a("rightClick")}}),g=this._registry.wheel({callbacks:{recognized:a("scroll")}}),a=this._registry.pinch({callbacks:{began:a("pinchstart",!0),progress:a("pinchprogress"),recognized:a("pinchend"),cancelled:a("pinchcancel")}});d.getCoordinator().prevents(b);d.getCoordinator().prevents(f);c.getCoordinator().prevents(b);
this._detector.add([d,c,b,f,g,a])},_handleTouchDown:function(a){this.emitEvent("warmup",a)},_handleTouchMove:function(a){this._preventDefault&&a.preventDefault()}})})},"graphics/interaction/EventCreatorUtils":function(){define([],function(){var g=!1;try{new MouseEvent("test")}catch(f){g=!0}var e=!1;try{new WheelEvent("test")}catch(d){e=!0}var b=function(a,b){var c=document.createEvent("MouseEvent");c.initMouseEvent(a,b.bubbles,b.cancelable,b.view,b.detail,b.screenX,b.screenY,b.clientX,b.clientY,b.ctrlKey,
b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);return c},a=function(a,b){var c=document.createEvent("WheelEvent");c.initWheelEvent(a,b.bubbles,b.cancelable,b.view,b.detail,b.screenX,b.screenY,b.clientX,b.clientY,b.button,b.relatedTarget,null,b.deltaX,b.deltaY,b.deltaZ,0);c.initMouseEvent(a,b.bubbles,b.cancelable,b.view,b.detail,b.screenX,b.screenY,b.clientX,b.clientY,b.ctrlKey,b.altKey,b.shiftKey,b.metaKey,b.button,b.relatedTarget);return c},c={createMouseEvent:function(a,b){return new MouseEvent(a,
b)},createWheelEvent:function(a,b){var c=new WheelEvent(a,b);void 0===c.wheelDelta&&(c.wheelDelta=void 0!==c.wheelDeltaY?c.wheelDeltaY:-120*c.deltaY);return c}};!0===g&&(c.createMouseEvent=b);!0===e&&(c.createWheelEvent=a);return c})},"graphics/interaction/CursorFactory":function(){define(["dojo/has","mw-utils/HtmlUtils"],function(g,f){var e=".png",d=!0;if(g("trident")||g("ie")||g("edge"))e=".cur",d=!1;var b=function(a,b){var g=require.toUrl("images/figurefloatingpalette/"),g=f.parseUrl(g);return d?
"url('"+g.protocol+"//"+g.hostname+":"+g.port+g.pathname+a+e+"') "+b[0]+" "+b[1]+",auto":"url('"+g.protocol+"//"+g.hostname+":"+g.port+g.pathname+a+e+"'), default"};return{createCursorURL:function(a,c){var d="initial";switch(a){case "pan":d=b("pan_cursor",c);break;case "zoom":d=b("zoomin_cursor",c);break;case "zoom3d":d=b("zoomin_cursor3D",c);break;case "rotate":d=b("rotate_cursor",c)}return d}}})},"graphics/MWSG/object_picker":function(){define(["dijit/Destroyable","dojo/_base/declare","dojo/Deferred",
"graphics/mixins/EventEmitter"],function(g,f,e,d){return f([g,d],{constructor:function(b){this._gv=b;this._requestTokenID=0;this._unfulfilledRequestPromises={};this._defineEvent("request")},handleMessage:function(b){if(void 0!==b.cmd)switch(b.cmd){case "response":var a=b.requestToken,c=this._unfulfilledRequestPromises[a];delete this._unfulfilledRequestPromises[a];c.resolve(b)}},requestCallback:function(b){var a=this._requestTokenID;this._requestTokenID++;var c=new e;this._unfulfilledRequestPromises[a]=
c;b.requestToken=a;this.emitEvent("request",b);return c},requestHierarchy:function(b,a){var c=this._gv._View.getSceneTree();if(!c){var d=this.requestCallback({x:b,y:a}),f=new e;d.then(function(a){f.resolve(a.data)});return f}d=new e;c=this._getHierarchy(b,a,c);d.resolve(c);return d.promise},_getHierarchy:function(b,a,c){var d=[];if(null!==c&&(b=c.hitTest(b,a))){b=b.getNode();do d.push(b.ownerCookie),b=b.parent;while(void 0!==b.parent);d.push(b.ownerCookie);void 0!==b.nodeinfo&&void 0!==b.nodeinfo.owneraxes&&
d.push(b.nodeinfo.owneraxes)}return d}})})},"liveeditor/plugin/variableeditor/InteractiveTableOutputHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","liveeditor/plugin/variableeditor/InteractiveTableOutputHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.id rtc.view rtc.embeddedoutputs.currentoutputservice rtc.embeddedoutputs rtc.embeddedoutputs.codegen rtc.embeddedoutputs.model rtc.document rtc.embeddedoutputs.statehandler".split(" ")}},
createInstance:function(d,b,a,c,f,g,l,m){return new e(d,b,a,c,f,g,l,m)}})})},"liveeditor/plugin/variableeditor/InteractiveTableOutputHandler":function(){define(["dojo/_base/declare","dojo/_base/lang","liveeditor/plugin/variableeditor/InteractiveVariableOutputHandler","liveeditor/plugin/variableeditor/InteractiveTableOutput"],function(g,f,e,d){return g([e],{_createVariableOutput:function(b){b=new d(b);b._createCodeGenWidget(b);return b}})})},"liveeditor/plugin/variableeditor/InteractiveVariableOutputHandler":function(){define("dojo/_base/declare dojo/_base/lang liveeditor/plugin/variableeditor/InteractiveVariablePopoutHandler liveeditor/plugin/variableeditor/InteractiveVariableOutput MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseOutputHandler MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerResult MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerResultInstruction MW/rtc/plugins/embeddedoutputs/outputhandlers/OutputHandlerUtility variableeditor_peer/PeerManagerFactory MW/rtc/plugins/embeddedoutputs/codegen/CodeGenFactoryProvider".split(" "),
function(g,f,e,d,b,a,c,h,k,l){k.start();return g([b],{constructor:function(a,b,c,d,f,g,h,k){this._editorId=a;this._ve_channel=null;this._view=b;this._currentOutputService=c;this._interactiveVariablePopoutHandler=new e(a);this._embeddedOutputsView=d.getEmbeddedOutputsView();this._codeGenFactory=f;this._outputsModel=g;this._document=h;this._stateHandler=k},getOutputFromData:function(b,d){this._cleanData(b);this._ve_channel=b.ve_channel;this._interactiveVariablePopoutHandler.initialize(this._ve_channel);
var e=this._getVariableArgs(b,d),e=this._createVariableOutput(e);return new a(c.ADD_OUTPUT,e)},_createVariableOutput:function(a){return new d(a)},_getVariableArgs:function(a,b){return{data:a,outputMetaData:b,editorId:this._editorId,view:this._view,currentOutputService:this._currentOutputService,embeddedOutputsView:this._embeddedOutputsView,interactiveVariablePopoutHandler:this._interactiveVariablePopoutHandler,CodeGenFactory:this._codeGenFactory,outputsModel:this._outputsModel,document:this._document,
stateHandler:this._stateHandler}},_getManager:function(a){return k.createManager(a)},_cleanData:function(a){a.value=h.removeControlCharacters(a.value)},destroy:function(){var a=k.createManager({channel:this._ve_channel,editable:!1});a&&a.destroy()}})})},"liveeditor/plugin/variableeditor/InteractiveVariablePopoutHandler":function(){define(["dojo/_base/declare","variableeditor_peer/PeerManagerFactory","mw-remote/Remote"],function(g,f,e){return g(null,{constructor:function(d){this._editorId=d;this._channel=
null;this._titleText=""},initialize:function(d){this._channel||(this._channel=d,this.peerManager=f.createManager({channel:this._channel,editable:!1}))},launchPopout:function(d){var b=d.docid;this._titleText=d.title;if(d=this.peerManager.getRoot())d.addEventListener("peerEvent",this._dispatchRemoteCall,this),d.dispatchEvent("peerEvent",d,{type:"CloneVariable",docID:b,editorId:this._editorId})},_dispatchRemoteCall:function(d){if("ClonedVariable"===d.data.type){var b=this._titleText,a=d.data.channel,
c=d.data.docID,f=this.peerManager.documents[c];this._titleText&&d.data.fileName&&(b=d.data.fileName+" | "+this._titleText);b=b||this._constructDialogTitle(d.data.fileName,f.varName,f.varSize,f.varType);e.sendMessage({FEval:this._getFEvalArgs("internal.matlab.variableeditor.peer.PeerVariableEditorPopoutHandler.InitDialogHandler",c,a,b)},{});this.peerManager.getRoot().removeEventListener("peerEvent",this._dispatchRemoteCall,this);this._titleText=null}},_getFEvalArgs:function(d,b,a,c){return{"function":d,
arguments:["docID",b,"channel",a,"title",c],dequeMode:"ppe"}},_constructDialogTitle:function(d,b,a,c){b=b+" \x3d "+a+" "+c;d&&(b=d+" | "+b);return b}})})},"variableeditor_peer/PeerManagerFactory":function(){define("variableeditor_peer/PeerManagerFactory","variableeditor_peer/PeerManager mw-peermodel/PeerModelManager mw-log/Log mw-remote/Remote dojo/topic variableeditor_peer/ViewManifest".split(" "),function(g,f,e,d,b,a){function c(){p||(p=f.getInstance("/VariableEditorManager"),p.addEventListener("rootSet",
function(a){m.logDebug("VE: Factory Root Set");var c=a.target;a=c.getProperty("Debug");void 0!==a&&m.setDebug(a.Debug);c.addEventListener("propertySet",function(a){a.data&&a.data.key&&"Managers"===a.data.key?m.logDebug("VE: Factory Managers Updated"):a.data&&(a.data.key&&"Debug"===a.data.key)&&m.setDebug(a.data.newValue.Debug)});c.addEventListener("peerEvent",function(a){a.data.type&&"FactoryInitialized"===a.data.type?(m.logDebug("VE: Factory Initialized"),h()):a.data.type&&"ManagerCreated"===a.data.type?
a.data.Channel&&(n[a.data.Channel]&&n[a.data.Channel].start&&n[a.data.Channel].autoStart)&&(n[a.data.Channel].start(),m.logDebug("VE: Factory Auto Starting Manager ("+a.data.Channel+")")):a.data.type&&"log"===a.data.type&&a.data.message&&m.logDebug("VE: Server Log ("+a.data.message+")")});b.subscribe("variableeditor_client/isDebug",function(a){var b=c.getProperty("Debug");a&&(void 0!==a.Debug&&b&&a.Debug!==b.Debug)&&c.setProperty("Debug",{Debug:a.Debug,Source:"client"})});c&&(c.getProperty("Initialized")&&
c.getProperty("Initialized").Initialized)&&h()}),p.setSyncEnabled(!0));return p}function h(){p&&p.getRoot()&&(q.forEach(function(a,b,c){b=p.getRoot();m.logDebug("VE: Factory Create Manager From Queue ("+a.channel+")");b.dispatchEvent("peerEvent",b,a)}),q=[])}function k(a){a&&!a.isError&&(r=!0,h())}var l=0,m={debug:!1,setDebug:function(a){this.debug=dgb},logDebug:function(a){},runFactoryInitInMATLAB:function(a,b,c){try{l+=1;var f="VariableEditorUtilsResponse_"+l;b&&d.registerResponseHandler("EvalResponse:"+
f,b,this);c&&d.registerFaultHandler("Eval:"+f,c,this);d.sendMessage({Eval:{mcode:a}},{},f)}catch(g){e.error(g),e.trace(g.stack)}}},p,n={},q=[],r=!1,s=0;return{createManager:function(a){c();a.channel||(s+=1,a.channel="/VE_"+s);if(n&&n[a.channel]&&!a.forceNewManager)return n[a.channel];var b=n,d=a.channel,e;if(a){var f=c();a.manager&&(f=a.manager);e=a.channel;var h=a.ignoreUpdates||!1;f||(f=c());(f=f.getRoot())?f.dispatchEvent("peerEvent",f,{type:"CreateManager",channel:e,ignoreUpdates:h||!1}):q.push({type:"CreateManager",
channel:e,ignoreUpdates:h||!1});e=new g(a);e.start()}else e=null;b[d]=e;return n[a.channel]},deleteManager:function(a){if(!a&&a.channel)return null;var b=c(),d=a.channel;b||(b=c());(b=b.getRoot())?b.dispatchEvent("peerEvent",b,{type:"DeleteManager",channel:d}):q.push({type:"DeleteManager",channel:d});n[a.channel]=null},start:function(a){a?m.runFactoryInitInMATLAB("internal.matlab.variableeditor.peer.PeerManagerFactory.startup",k):r=!0;c()},isStarted:function(){return r}}})},"variableeditor_peer/PeerManager":function(){define("variableeditor_peer/PeerManager",
"dojo/_base/declare dojo/_base/lang variableeditor_client/Manager mw-peermodel/PeerModelManager variableeditor_peer/PeerDocument variableeditor_client/VariableEditorUtils datatoolsservices/ActionService/ActionDataServiceFactory datatoolsservices/DataToolsUtils mw-log/Log".split(" "),function(g,f,e,d,b,a,c,h,k){return g("variableeditor_peer.PeerManager",[e],{peerModelManager:null,_FACTORY_CLASS:"variableeditor_peer/PeerManagerFactory",_PEERMODEL_MANAGER_CHANNEL:"/VariableEditorManager",managerProps:{},
constructor:function(a){this.actionDataService=null;this.actionNameSpace="";this.managerProps={};this.focusedDocument=null},_addDocument:function(a){try{if(a.hasProperty("docID")){this.allArgs=h.mergeObjects(this.allArgs,{documentNode:a,rootNode:a&&a.getRoot?a.getRoot():void 0,varName:a.getProperty("name"),varSize:a.getProperty("size"),varType:a.getProperty("type"),manager:this});var b=a.hasProperty("userContext")?a.getProperty("userContext"):null;if(b&&"string"===typeof b&&"{"===b.charAt(0))try{b=
JSON.parse(a.getProperty("userContext"))}catch(c){k.error(c),k.error(c.stack)}var d=a.getProperty("docID");this.documents[d]?this.documents[d].init(this.allArgs):b&&b.veTempID&&this.documents[b.veTempID]?(this.documents[d]=this.documents[b.veTempID],this.documents[d].init(this.allArgs),delete this.documents[b.veTempID]):this.documents[d]=this._createDocument(this.allArgs);this.dispatchEvent("variableAdded",this,{peerDoc:this.documents[d]})}else k.error("Variable Editor Peer Document missing docID properties in childAdded")}catch(e){k.error(e),
k.error(e.stack)}},_createPeerModelManager:function(a){this.channel=this._PEERMODEL_MANAGER_CHANNEL;a&&(this.messageService=a.messageService,this.channel=a.channel||this._PEERMODEL_MANAGER_CHANNEL);this.peerModelManager=d.getInstance(this.channel)},_setupPeerModelManagerListeners:function(){var a=this;this.peerModelManager.addEventListener("rootSet",function(b){b=b.target;a._initProperties(b);a.dispatchEvent("managerReady",a,{peerManager:a});b.addEventListener("childAdded",function(b){a._addDocument(b.data.child)});
if(b.getChildren&&0<b.getChildren().length)for(var c=0,c=0;c<b.getChildren().length;c+=1){var d=b.getChildren()[c];a._addDocument(d)}b.addEventListener("childRemoved",function(b){if(b.data.child.hasProperty("docID")){b=b.data.child.getProperty("docID");var c=a.documents[b];a._removeDocument(b);a.dispatchEvent("variableRemoved",a,{peerDoc:c})}else k.error("Variable Editor Peer Document missing docID properties in childRemoved")});b.addEventListener("peerEvent",function(b){a._handlePeerEvent(b)});b.addEventListener("propertySet",
function(b){a._handlePropertySet(b)},b);b.hasProperty("ActionsInitialized")&&!a.actionDataService&&(b=b.getProperty("ActionsInitialized"),a._initActionService(b.ActionsInitialized,"ActAsClient"))})},_removeDocument:function(a){this.documents[a]&&(this.documents[a].destroy(),delete this.documents[a])},_initProperties:function(a){a=a.getProperties();0<Object.keys(a).length&&f.mixin(this.managerProps,a)},_handlePeerEvent:function(a){a.data.type&&"errormsg"===a.data.type&&(a.data.message?h.displayErrorMessage(a.data.message):
k.warn("VE Server error with no message."))},_init:function(a){this.inherited(arguments);this._createPeerModelManager(a);this._setupPeerModelManagerListeners()},getRoot:function(){return this.peerModelManager.getRoot()},hasRoot:function(){return this.peerModelManager.hasRoot()},_initActionService:function(a,b){this.actionNameSpace=a;this.actionDataService=c.getInstance({nameSpace:a,mode:b})},executeAction:function(a,b){this.actionDataService.executeAction(a,b)},_handlePropertySet:function(a){if((!a.data||
!a.data.newValue||!(a.data.newValue.Source&&"server"!==a.data.newValue.Source))&&"ActionsInitialized"===a.data.key&&!this.actionDataService)a=a.data.newValue,a.ActionsInitialized&&(a=a.ActionsInitialized),this._initActionService(a,"ActAsClient")},setFocusedDocument:function(a){this.focusedDocument=a;this.hasFocus||this.getRoot().setProperty("HasFocus",{HasFocus:!0,Source:"client",Channel:this.channel,Document:a.varName});this.getRoot().setProperty("FocusedDocument",{HasFocus:!0,Source:"client",Channel:this.channel,
Document:a.varDocID});this.hasFocus=!0;this.dispatchEvent("managerFocusChanged",this,{peerManager:this,hasFocus:!0})},setManagerFocus:function(a){a&&!this.hasFocus?(this.hasFocus=!0,this.getRoot().setProperty("HasFocus",{HasFocus:!0,Source:"client",Channel:this.channel})):!a&&this.hasFocus&&(this.hasFocus=!1,this.getRoot().setProperty("HasFocus",{HasFocus:!1,Source:"client",Channel:this.channel}))},openDocument:function(a,b){if(this.documents[a])return this.documents[a];var c=null;b||(b={});b.manager||
(b.manager=this);c=this._createDocument(b);return this.documents[a]=c},_createDocument:function(a){return new b(a)},_dispatchOpenvarEvent:function(a,b,c,d){var e=this.peerModelManager.getRoot();a={type:"OpenVariable",variable:a,userContext:b};c&&(a.value=c);d&&(a.workspace=d);e&&e.dispatchEvent("peerEvent",e,a)},closeVariable:function(a,b){var c=this.peerModelManager.getRoot();c&&c.dispatchEvent("peerEvent",c,{type:"RemoveDocument",variable:a,userContext:this.userContext,workspace:b})},closeAllVariables:function(){var a=
this.peerModelManager.getRoot();a&&a.dispatchEvent("peerEvent",a,{type:"CloseAll",userContext:this.userContext})},purgeAll:function(){this.closeFcn()},start:function(){this.peerModelManager.setSyncEnabled(!0)},stop:function(){this.peerModelManager.setSyncEnabled(!1);var a=this.peerModelManager.getRoot();a&&a.destroy&&a.destroy();d.cleanup(this.channel)},destroy:function(){this.inherited(arguments);this.stop();var a=this;require([this._FACTORY_CLASS],function(b){b.deleteManager(a)})}})})},"variableeditor_client/Manager":function(){define("variableeditor_client/Manager",
["dojo/_base/declare","dojo/_base/connect","mw-peermodel/Observable","variableeditor_client/Document"],function(g,f,e,d){return g("variableeditor_client.Manager",[e.Impl],{documents:[],constructor:function(b){this._init(b)},_init:function(b){this.editable=!0;b&&(this.editable=void 0===b.editable?!0:b.editable,this.ignoreUpdates=void 0===b.ignoreUpdates?!1:b.ignoreUpdates,this.cssSpecifier=b.cssSpecifier||"mw_type_VariableEditorTable",this.allArgs=b,this.autoStart=void 0===b.autoStart?!0:b.autoStart);
this.documents=[]},openDocument:function(b,a){if(this.documents[b])return this.documents[b];var c=null;a||(a={});a.manager||(a.manager=this);c=this.createDocument(a);return this.documents[b]=c},createDocument:function(b){return new d(b)},openVariable:function(b,a,c,d){var e=this._getExistingDoc(b,"varName");e||(e=this.createDocument({manager:this,varName:b,value:c}),this._lastTempID||(this._lastTempID=1),this._lastTempID+=1,e.tempID="_temp_id_"+this._lastTempID,this.documents[e.tempID]=e);a=a||{};
a.veTempID=e.tempID;this._dispatchOpenvarEvent(b,a,c,d);return e},_dispatchOpenvarEvent:function(b,a,c,d){b={type:"variableAdded",variable:b,userContext:a};c&&(b.value=c);d&&(b.workspace=d);this.dispatchEvent("variableAdded",this,b)},_getExistingDoc:function(b,a){var c=null,d=this.documents,e;if(!this.ignoreUpdates)for(e in d)if(d.hasOwnProperty(e)){var f=d[e];b===f[a]&&(c=f)}return c},closeVariable:function(b){this.documents&&this.documents[b]&&(this.documents[b].destroy(),delete this.documents[b])},
closeAllVariables:function(){for(var b in this.documents)this.documents.hasOwnProperty(b)&&this.documents[b].destroy();this.documents=[]}})})},"variableeditor_client/Document":function(){define("variableeditor_client/Document","dojo/_base/declare dojo/_base/lang dijit/_WidgetBase mw-peermodel/Observable mw-log/Log dojo/dom-construct dojo/dom-class dojo/dom-style dojo/query dojo/dom-geometry dojo/Deferred mw-utils/BrowserUtils variableeditor_client/SummaryBar variableeditor_client/VariableEditorUtils dojo/on variableeditor_client/TableViewModel".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s){return g("variableeditor.Document",[e,d.Impl],{allArgs:{},varName:"",varDocID:"",userContext:{},clientPeerView:{},viewListeners:[],clientPeerManager:[],dataTagRoot:"",resizeBehaviour:"default",summaryBar:null,showSummaryBar:!0,varSize:"",varType:"",varSecondaryType:"",varSecondaryStatus:"",requestFocusOnStart:!0,_started:!1,OVERLAY_PREPOPULATED_DATA:"overlayPrepopulatedData",constructor:function(a){this.allArgs={};this.userContext={};this.viewModel=void 0;
this.viewListeners=[];this.varType=this.varSize=this.varName=this.dataTagRoot="";this._started=!1;this.summaryBar=null;this.showSummaryBar=!0;this.init(a)},init:function(a){a&&(this.allArgs=a,a.hasOwnProperty("showSummaryBar")&&(this.showSummaryBar=a.showSummaryBar));this.manager=a.manager;this._constructContainer(a);this.domNode&&this.initSummaryBar(a);this.createView(a)},initSummaryBar:function(a){this.showSummaryBar&&(this.summaryBar||this.setSummaryBar(a))},setSummaryBar:function(b){this.varName=
b.varName;this.varSize=b.varSize;this.varType=b.varType;this.summaryBar=new n(this.varName,this.varSize,this.varType);this.summaryBar.startup();a.place(this.summaryBar.domNode,this.domNode,"first")},startup:function(){this.inherited(arguments);this.viewModel&&this.viewModel.startup&&this.viewModel.startup();this._started=!0},destroy:function(){this.clientPeerView&&this.clientPeerView.destroyView&&this.clientPeerView.destroyView();this.inherited(arguments)},_constructContainer:function(b){this.domNode||
(this.domNode=this.container=b=a.create("div"),c.add(this.domNode,["ClientDocument","veSpecifier"]))},createView:function(a){if(a&&a.viewType){var b=this;require([a.viewType],function(c){var d=new c({data:a});b.viewModel=d;d.getView().then(function(a){b._addView(a,d);b.clientPeerView=d})})}},_addView:function(a,b){this._addToDom(a);this._started&&b.startup();b._updateView();this.dispatchEvent("viewAdded",this,{type:"viewAdded",document:this,viewModel:b})},_addToDom:function(b){var d=a.toDom("\x3cdiv class\x3d'ClientViewDiv'\x3e\x3c/div\x3e"),
e=this;r(this.domNode,"startup",function(a){e.viewModel&&(e.viewModel._updateView(),c.add(e.domNode,e.viewModel.getType()))});a.place(d,this.domNode);this.showSummaryBar&&c.add(d,"hasSummaryBar");d.appendChild(b)},postCreate:function(){var a=this;this.own(r(window,"resize",function(){a.resize&&a.resize()}))},_addOverlay:function(){var b=a.create("div",{className:this.OVERLAY_PREPOPULATED_DATA});this.domNode&&this.domNode.insertBefore(b,this.domNode.firstChild)},_removeOverlay:function(){this.domNode&&
0!==this.domNode.getElementsByClassName(this.OVERLAY_PREPOPULATED_DATA).length&&this.domNode.removeChild(this.domNode.getElementsByClassName(this.OVERLAY_PREPOPULATED_DATA)[0])},_showBusyIndicator:function(){if(this.domNode){var a=this.domNode.getElementsByClassName("loading");a&&(0!==a.length&&a[0].style&&"hidden"===a[0].style.visibility)&&(a[0].style.visibility="visible",a[0].style.opacity=1)}},_hideBusyIndicator:function(){if(this.domNode){var a=this.domNode.getElementsByClassName("loading");a&&
(0!==a.length&&a[0].style)&&(a[0].style.visibility="hidden",a[0].style.opacity=0)}},resize:function(){var a=300,b=300,c=0;switch(this.resizeBehaviour){case "fixed":this.allArgs.size&&(a=this.allArgs.size.width,b=this.allArgs.size.height);break;case "data":c=k(".dataBody",this.domNode);if(0===c.length)break;a=c[0];h.set(a,"min-width","initial");h.set(a,"min-height","initial");c=l.position(a);this.clientPeerView&&this.clientPeerView.table&&this.clientPeerView.table.defaultProperties?(b=c.h+this.clientPeerView.table.rowHeight+
2,a=c.w+this.clientPeerView.table.rowHeaderWidth+2):(b=c.h+20,a=c.w+32);c=this.limitSize(a,b);b=c.height;a=c.width;break;case "window":a=window.innerWidth;b=window.innerHeight;c=this.limitSize(a,b);b=c.height;a=c.width;this._addDataFormatClass(b);break;case "container":a=this.domNode.parentElement;if(!a){this.inherited(arguments);return}c=l.position(a);if(0>=c.w||0>=c.h){this.inherited(arguments);return}a=c.w;b=c.h;c=this.limitSize(a,b);b=c.height;a=c.width;this._addDataFormatClass(b);break;default:this.inherited(arguments);
return}h.set(this.domNode,"width",a+"px");h.set(this.domNode,"height",b+"px");this.clientPeerView.resize();this.inherited(arguments)},_addDataFormatClass:function(a){var b=this.clientPeerView;b&&(b._dataStore&&b._dataStore.dataSize.rows)&&(this._documentFitsToViewport(a,b._dataStore.dataSize.rows.count)?c.add(this.domNode,"DataFitToViewport"):c.remove(this.domNode,"DataFitToViewport"))},_documentFitsToViewport:function(a,b){return a>22*b+24},limitSize:function(a,b){this.allArgs.maxSize&&(this.allArgs.maxSize.width&&
a>this.allArgs.maxSize.width&&(b+=p.getScrollbarWidth()),this.allArgs.maxSize.height&&b>this.allArgs.maxSize.height&&(a+=p.getScrollbarWidth()),this.allArgs.maxSize.width&&(a=Math.min(this.allArgs.maxSize.width,a)),this.allArgs.maxSize.height&&(b=Math.min(this.allArgs.maxSize.height,b)));this.allArgs.minSize&&(this.allArgs.minSize.width&&(a=Math.max(this.allArgs.minSize.width,a)),this.allArgs.minSize.height&&(b=Math.max(this.allArgs.minSize.height,b)));this.allArgs.reduceFixedWidth&&(a-=this.allArgs.reduceFixedWidth);
this.allArgs.reduceFixedHeight&&(b-=this.allArgs.reduceFixedHeight);return{width:a,height:b}},handleStaticView:function(){this.clientPeerView&&this.clientPeerView.handleStaticTableView&&this.clientPeerView.handleStaticTableView()},_getMetaSummary:function(){return""}})})},"mw-utils/BrowserUtils":function(){var g="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(f){return typeof f}:function(f){return f&&"function"===typeof Symbol&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":
typeof f};define(["dojo/_base/lang","dojo/_base/sniff","dojo/dom-class"],function(f,e,d){var b=window,a=null;return{supportsLocalStorage:function(){var a=b&&void 0!==g(b.localStorage)&&null!==b.localStorage;if(a)try{b.localStorage.setItem("motw.test.local.storage","0"),b.localStorage.removeItem("motw.test.local.storage")}catch(d){a=!1}return a},_hasNewIE:function(a){return a&&!e("ie")&&0<e("trident")?parseFloat(a.split("rv:")[1]):a&&0<a.indexOf("Edge")?"Edge "+parseFloat(a.split("Edge/")[1]):""},
_getBrowserInfo:function(a){var b={BROWSER:"OTHER",BROWSER_VER:"OTHER"},d,f={IE:"Microsoft Internet Explorer",FF:"Mozilla Firefox",Chrome:"Google Chrome",Safari:"Apple Safari"};if(a=this._hasNewIE(a))b.BROWSER=f.IE,b.BROWSER_VER=a.toString();else for(d in f)if(f.hasOwnProperty(d)&&e(d.toLowerCase())){a=e(d.toLowerCase());b.BROWSER=f[d];b.BROWSER_VER=a.toString();if("Chrome"===d||"Safari"===d)b.WEBKIT_VER=e("webkit").toString();break}return b},getSystemInfo:function(){var a={},d={};try{a.DEVICE="",
a.LOCALE=b.navigator.language,a.OS=b.navigator.platform,a.PLATFORM=b.navigator.platform,a.SCREEN_RESOLUTION=b.screen.width+"x"+b.screen.height,a.WINDOW_RESOLUTION=b.innerWidth+"x"+b.innerHeight,a.USER_AGENT=b.navigator.userAgent,d=this._getBrowserInfo(b.navigator.appVersion),a=f.mixin(a,d)}catch(e){}return a},setClassName:function(a,b){d.add(a,"mw_type_"+(b.type||"unknownType"));d.add(a,"mw_type_Component");if(b.name){var e="mw_name_"+(b.name.trim().replace(/[^a-zA-Z0-9]/g,"_")||"NO_NAME");d.contains(a,
e)||(a.className=a.className.replace(/mw_name_[^ ]*/,""),d.add(a,e))}},isInFocus:function(a){return"unknown"!==typeof b.document.activeElement?a===b.document.activeElement:!1},getScrollbarWidth:function(){if(null===a){var b=document.createElement("div");b.className="scrollbar-measure";b.style.width="100px";b.style.height="100px";b.style.overflow="scroll";b.style.position="absolute";b.style.top="-9999px";document.body.appendChild(b);var d=b.offsetWidth-b.clientWidth;document.body.removeChild(b);a=
d+2}return a}}})},"variableeditor_client/SummaryBar":function(){define("variableeditor_client/SummaryBar","dojo/_base/declare dojo/_base/lang dijit/_WidgetBase dijit/_TemplatedMixin dojo/on dojo/dom dojo/query dojo/dom-class dojo/text!variableeditor_client/SummaryBar.html".split(" "),function(g,f,e,d,b,a,c,h,k){return g("variableeditor.views.SummaryBar",[e,d],{name:"",size:"",type:"",templateString:k,constructor:function(a,b,c){this.name=a||"";this.size=b||"";this.type=c||""},postCreate:function(){this.setName(this.name);
this.setSize(this.size);this.setType(this.type)},updateIconClass:function(){var a=c(".summaryBarSize",this.domNode)[0];h.contains(a,"variableEditorRenderers")||h.add(a,"variableEditorRenderers")},setName:function(a){this._setDOMText("name",".summaryBarVarName",a+" \x3d ",!1)},setSize:function(a){this._setDOMText("size",".summaryBarSize",a,!1);"0"===a&&(this.size=this.name)},setType:function(a){this._setDOMText("type",".summaryBarType",a,!0);this.updateIconClass()},_setDOMText:function(a,b,d,e){this[a]=
a||"";c(b,this.domNode)[0].textContent=d}})})},"variableeditor_client/VariableEditorUtils":function(){define("variableeditor_client/VariableEditorUtils",["dojo/on","dojo/mouse","dojo/sniff","mw-log/Log","mw-remote/Remote"],function(g,f,e,d,b){var a=0;return{mergeObjects:function(a,b){var d={},e;for(e in a)a.hasOwnProperty(e)&&(d[e]=a[e]);for(e in b)b.hasOwnProperty(e)&&(d[e]=b[e]);return d},setDebug:function(a){},logDebug:function(a){},runFactoryInitInMATLAB:function(c,e,f,g){try{a+=1,c+=a,f&&b.registerResponseHandler("FEvalResponse:"+
c,f,this),g&&b.registerFaultHandler("FEval:"+c,g,this),b.sendMessage({FEval:{"function":e,dequeMode:"ppe"}},{},c)}catch(m){d.error(m),d.trace(m.stack)}},preventPropagationOnWheel:function(a,b){var d=null;a&&(d=g(a,"wheel",function(a){a.stopPropagation();b&&a.preventDefault()}));return d},getTextAlignmentForDatatype:function(a){var b=null;return b=this.isTypeNumeric(a)&&"logical"!==a||this.isTypeTime(a)?"right":"logical"===a?"center":"left"},getParsedData:function(a,b,d){try{for(var e=Array(b),f=0,
f=0;f<e.length;f+=1)e[f]=Array(d);a=this.cleanJSONDataFromServer(a,b,d);var g;for(g=0;g<b;g+=1){var n=a[g],q;for(q=0;q<d;q+=1){var f="NaN",r=Array.isArray(n)?n[q]:n,f=JSON.parse(r).value;try{"NaN"!==f&&Array.isArray(JSON.parse(f))&&(f=JSON.parse(f),f=f.map(function(a){return a}))}catch(s){}e[g][q]=f}}}catch(t){return null}return e},cleanJSONDataFromServer:function(a,b,d){a=this.convertVectorJSONDataToArray(a,b,d);a.forEach(function(a,b,c){Array.isArray(a)?a.forEach(function(a,b,c){c[b]=a.value||a}):
c[b]=a.value});return a},convertVectorJSONDataToArray:function(a,b,d){if(1===a.length||1===b)return[a];1===d&&(a=a.map(function(a){return[a]}));return a},formatString:function(a,b){if(a&&(-1<a.indexOf("\n")||-1<a.indexOf("\t")))a=a.replace(/\n/g,"\u21b5"),a=a.replace(/\t/g,"\t");return a=a.replace(/ /g,"\u00a0")},isTypeNumeric:function(a){return"double single int8 int16 int32 int64 uint8 uint16 uint32 uint64 logical".split(" ").some(function(b){return b===a})},isTypeTable:function(a){return["table",
"timetable"].some(function(b){return b===a})},isTypeTime:function(a){return"datetime"===a||"duration"===a||"calendarDuration"===a},isTypeText:function(a){return["cell","char","categorical","string","nominal"].some(function(b){return b===a})},isGroupingType:function(a){return"ordinal"===a||"nominal"===a},getDefaultColumnWidth:function(a){return"logical"===a?35:75},constructColumnHeader:function(a,b,d,e){d=d||this.getDefaultColumnWidth(e);return{label:a,dataIndex:b,width:{value:d,unit:"px"}}},getViewTypeForLoad:function(a){return this.isTypeTable(a)?
"variableeditor_client/TableViewModel":"variableeditor_client/ArrayViewModel"},preventEventDefaults:function(a){f.isMiddle(a)||(a.stopPropagation(),a.preventDefault())},formatNumeric:function(a){if("Inf"===a||"-Inf"===a)return a;var b=parseFloat(a);a=parseInt(a);return b!==a?0.001>Math.abs(b)||9999<Math.abs(b)?b.toExponential(4):b.toString():9999<Math.abs(a)?a.toExponential(4):a.toString()},isValid:function(a){return null!==a&&void 0!==a},isIELikeBrowser:function(){return 0<=navigator.userAgent.indexOf("Edge")||
e("ie")},cleanUIforTextFiltering:function(a){-1!==a.indexOf(String.fromCharCode(31))&&(a=a.replace(RegExp(String.fromCharCode(31),"g"),""),a=a.replace(/"/g,""));return a}}})},"variableeditor_client/TableViewModel":function(){define("variableeditor_client/TableViewModel",["dojo/_base/declare","dojo/dom-class","variableeditor_client/ArrayViewModel"],function(g,f,e){return g("variableeditor.TableViewModel",[e],{_VIEWTYPE:"table",_TABLE_ROW_HEADER_CLASS:"mw-table-row-header-container",_TABLE_TOP_LEFT_AFFORDANCE_CLASS:"mw-table-top-left-affordance",
_STATIC_TABLE_CLASS:"staticTable",constructor:function(d){},_updateView:function(){this.inherited(arguments);if(this.columns&&(this._table&&this._table.domNode)&&f.contains(this._table.domNode,this._STATIC_TABLE_CLASS)){try{var d=this.columnData.columnModel.columnConfig.reduce(function(a,b){return(b.width?75===b.width.value?82:b.width.value:82)+a},0)}catch(b){d=82*this.columns+2}var a=(this.rowData?this._getRowHeaderWidth():22)+1;this._table.domNode.style.width=d+a+"px"}},_getRowHeaderWidth:function(){var d=
0;this.rowData.forEach(function(a,b){var e=b.toString().length+2+a.label.length;d=e>d?e:d});var b=Math.min(250,5*d+6);this._setWidths(this._TABLE_ROW_HEADER_CLASS,b);this._setWidths(this._TABLE_TOP_LEFT_AFFORDANCE_CLASS,b);return b},_setWidths:function(d,b){var a=this._table.domNode.getElementsByClassName(d);a&&a[0]&&(a[0].style.minWidth=b+"px",a[0].style.maxWidth=b+"px")},handleStaticTableView:function(){f.add(this._table.domNode,this._STATIC_TABLE_CLASS)}})})},"variableeditor_client/ArrayViewModel":function(){define("variableeditor_client/ArrayViewModel",
"dijit/registry dijit/_WidgetBase dojo/_base/declare dojo/Deferred dojo/dom dojo/dom-class dojo/dom-construct dojo/on dojo/query mw-tabular-data-model/DataStore variableeditor_client/VariableEditorUtils variableeditor_client/VETable variableeditor_client/ViewModel".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p,n){return e("variableeditor.ArrayViewModel",[n,f],{_table:null,_tableScrollListener:null,ColumnModelProperties:{},RowModelProperties:{},CellModelProperties:{},TableModelProperties:{},_overlayScrollListener:null,
_selection:null,_VIEWTYPE:"numeric",constructor:function(a){},init:function(a){},startup:function(a){this.inherited(arguments);this._table||this.createTable(a)},createView:function(a){this.createTable(a)},_updateModelProperties:function(a,b){"ColumnModelProperties"===a&&(this.ColumnModelProperties=JSON.parse(b));"RowModelProperties"===a&&(this.RowModelProperties=JSON.parse(b));"CellModelProperties"===a&&(this.CellModelProperties=JSON.parse(b));"TableModelProperties"===a&&(this.TableModelProperties=
JSON.parse(b),this._handleTableModelProperties())},_handleTableModelProperties:function(){},getView:function(){var a=!1,b=new d(function(){a=!0});if(this._table&&this._table.domNode)b.resolve(this._table.domNode);else var c=this,e=this.addEventListener("viewReady",function(){try{e&&c.removeEventListener("viewReady",e)}catch(d){}!a&&(c._table&&c._table.domNode)&&b.resolve(c._table.domNode)});return b},blurView:function(){},createTable:function(b){var c=this.getDataStore(b),d=b&&b.data&&b.data.rowData?
b.data.rowData:null;d&&(c.getLocalRowMetaData=function(a){return d[a]});var e=null;b&&(b.data&&b.data.columnData)&&(e=b.data.columnData,e.features=this._getTableFeatures(),this._table=b=new p(c,e),a.add(b.domNode,["toggleOverflowCss","mwTable"]))},_getTableFeatures:function(){return[p.FEATURE.RowHeaders]},_updateView:function(){if(this._table){if(!this._tableStarted){this._table.startup();this._tableStarted=!0;var a=c.create("div",{className:"loading"}),b=this._table.domNode.getElementsByClassName("mw-table-outer-wrapper-blurred");
0<b.length&&(b[0].appendChild(a),this._tableScrollListener=m.preventPropagationOnWheel(b[0]));this._overlayScrollListener=m.preventPropagationOnWheel(a,!0);this.dispatchEvent("viewReady",this,{type:"viewReady",viewModel:this,table:this._table})}this.resize&&this.resize()}},resize:function(){try{this._table&&(this._table.domNode&&this._tableStarted)&&this._table.resizeHandler()}catch(a){}},getDataStore:function(a){var b=null;this._dataStore?b=this._dataStore:(b=null,a&&(a.data&&a.data.data)&&(b=a.data.data),
this._dataStore=b=new l(b));return b},getColumnModel:function(a){return a.data.columnData},destroyView:function(){this._table&&this._table.destroy&&this._table.destroy();this._tableScrollListener&&this._tableScrollListener.remove();this._overlayScrollListener&&this._overlayScrollListener.remove()},getType:function(){return this._VIEWTYPE}})})},"variableeditor_client/VETable":function(){define("variableeditor_client/VETable","dojo/_base/declare mw-table/Table dojo/dom dojo/query dijit/registry dojo/dom-class dojo/dom-construct".split(" "),
function(g,f,e,d,b,a,c,h){g=g("variableeditor_client.VETable",[f],{TableModelProperties:{},RowModelProperties:{},ColumnModelProperties:{},constructor:function(a){this.TableModelProperties=a.TableModelProperties||{};this.RowModelProperties=a.RowModelProperties||{};this.ColumnModelProperties=a.ColumnModelProperties||{}}});g.FEATURE=f.FEATURE;return g})},"variableeditor_client/ViewModel":function(){define("variableeditor_client/ViewModel",["dojo/_base/declare","dojo/_base/lang","mw-peermodel/Observable",
"dojo/on"],function(g,f,e,d){return g("variableeditor_client.ViewModel",[e.Impl],{constructor:function(b){this.init(b);this.createView(b)},init:function(b){throw"Need to overwrite init in implementation";},createView:function(b){throw"Need to overwrite createView in implementation";},getView:function(){throw"Need to overwrite getView in implementation";},destroy:function(){this.destroyView()},destroyView:function(){throw"Need to overwrite destroyView in implementation";}})})},"variableeditor_peer/PeerDocument":function(){define("variableeditor_peer/PeerDocument",
"dojo/_base/declare dojo/_base/lang dojo/on dojo/dom-class dojo/dom-construct dojo/dom dojo/dom-geometry dojo/_base/fx dojo/dom-style dojo/query variableeditor_client/Document variableeditor_client/VariableEditorUtils dojo/Deferred mw-log/Log".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p,n,q){return g("variableeditor_peer.PeerDocument",[m],{_TIMES_SYMBOL:"\u00d7",constructor:function(){this._viewUpdatedListenerAdded=!1},init:function(a){a&&(this.documentNode=a.documentNode);var b=this.documentNode;
b&&(this.varName=a.varName,this.varSize=a.varSize,this.varType=a.varType,this.varDocID=b.getProperty("docID"),this.userContext=b.hasProperty("userContext")?b.getProperty("userContext"):{},this.workspace=b.hasProperty("workspace")?b.getProperty("workspace"):"caller");this.inherited(arguments);this.summaryBar&&a.showSummaryBar&&(this.summaryBar.setName(this.varName),this.summaryBar.setSize(this.varSize),this.summaryBar.setType(this.varType))},destroy:function(){this.destroyPeerView();this.inherited(arguments);
this.manager.closeVariable(this.varDocID,this.workspace)},destroyPeerView:function(){this&&(this.clientPeerView&&this.clientPeerView.destroy)&&(this._viewUpdatedListenerAdded&&this.clientPeerView.removeEventListener("viewUpdated",this._handleViewUpdatedCallback,this),this.clientPeerView.destroy(),this.clientPeerView={})},createView:function(a){var b=this;a.viewType&&this._updateView(a.viewType,b,b.clientPeerView.peerNode,a.varName,a);if(b.documentNode){b.documentNode.addEventListener("childAdded",
function(c){var d=c.data.child;c=c.target.getProperty("name");var e=d.getProperty("Editor");b._updateView(e,b,d,c,a);b.clientPeerView.addEventListener("viewUpdated",b._handleViewUpdatedCallback,b);b._viewUpdatedListenerAdded=!0});if(b.documentNode.getChildren&&0<b.documentNode.getChildren().length){var c=b.documentNode.getChildren()[0],d=b.documentNode.getProperty("name"),e=c.getProperty("Editor");b.clientPeerView.peerDocument||b._addView(e,b,c,d,null,a)}b.documentNode.addEventListener("childRemoved",
function(a){b._removeView(b,a.data.child)})}},_updateView:function(a,b,c,d,e){!b.viewAdded||0==Object.keys(b.clientPeerView).length?b._addView(a,b,c,d,null,e):b.clientPeerView.setPeerNode(c)},_handleViewUpdatedCallback:function(a){if("sizeChange"===a.data.type){if(this.summaryBar){var b=this.clientPeerView.getDataStore();a=b.dataSize.rows.count;this.summaryBar.setSize([a+this._TIMES_SYMBOL+b.dataSize.columns.count]);b=this.summaryBar.domNode.getElementsByClassName("filterSummaryData")[0];a<this.rows?
(b.innerText=["| Reduced from "+this.rows+" rows"],d.replace(b,"filterSummaryData show")):d.replace(b,"filterSummaryData hide")}this.clientPeerView.resize()}},close:function(){this.clientPeerManager&&this.clientPeerManager.removeFocusedDocument(this);this.rootNode.dispatchEvent("peerEvent",this.rootNode,{type:"RemoveDocument",variable:this.varName,workspace:this.documentNode.getProperty("workspace")})},_addView:function(a,b,c,d,e,g){try{require([a],function(a){b.clientPeerView=new a(f.mixin({varName:d,
peerNode:c,peerDocument:b},g));b.domNode&&b._addViewToDom()})}catch(h){q.error(h),q.error(h.stack),e&&e("error",h)}},_addViewToDom:function(a){try{this.allArgs=p.mergeObjects(this.allArgs,{peerNode:this.clientPeerView.peerNode,varName:this.clientPeerView.varName,container:this});this.clientPeerView.init(this.allArgs);this.resize();var b=this;this.clientPeerView.getView().then(function(c){b._addToDom(c);b._started&&b.clientPeerView.startup();d.add(b.domNode,b.clientPeerView.getType());e(b.domNode,
"startup",function(a){b.clientPeerView._updateView()});b.dispatchEvent("viewAdded",b.domNode,{peerDoc:b,peerView:b.clientPeerView});b.viewAdded=!0;b.clientPeerView.addEventListener&&b.clientPeerView.addEventListener("serverInitialized",function(a){b._removeOverlay()});a&&a("success")})}catch(c){q.error(c),q.error(c.stack),a&&a("error",c)}},_removeView:function(b,c){b.dispatchEvent("viewRemoved",b.domNode,{peerDoc:b,peerView:b.clientPeerView});this.destroyPeerView();if(b.domNode){var d=b.domNode.getElementsByClassName("clientPeerViewDiv");
d&&d.hasOwnProperty(0)&&(d=d[0],a.empty(d))}c&&c.destroy()},postCreate:function(){var a=this;this.own(e(window,"resize",function(){a.resize&&a.resize()}))},getView:function(a){if(a)return this.clientPeerView;var b=!1,c=new n(function(){b=!0});if(this.clientPeerView&&!(0===Object.keys(this.clientPeerView).length&&this.clientPeerView.constructor===Object))c.resolve(this.clientPeerView);else var d=this,e=this.addEventListener("viewAdded",function(){try{e&&d.removeEventListener("viewAdded",d)}catch(a){}b||
c.resolve(d.clientPeerView)});return c},_getMetaSummary:function(){var a=this.summaryBar.FilteredSummary;return d.contains(a,"show")?a.innerText:""},focus:function(){var a=this;a.id&&require(["dijit/focus","dojo/dom","dojo/domReady!"],function(b,c){var d=c.byId(a.id);c.isDescendant(b.curNode,d)||b.focus(c.byId(a.id))})}})})},"variableeditor_peer/ViewManifest":function(){define("variableeditor_peer/ViewManifest",["dojo/_base/declare","variableeditor_peer/PeerTableViewModel","variableeditor_peer/PeerArrayViewModel",
"variableeditor_peer/PeerPopoutHandlerWidget"],function(g){return g("variableeditor_peer.ViewManifest",[],{constructor:function(f){}})})},"variableeditor_peer/PeerTableViewModel":function(){define("variableeditor_peer/PeerTableViewModel",["dojo/_base/declare","variableeditor_client/TableViewModel","variableeditor_peer/PeerArrayViewModel"],function(g,f,e){return g("variableeditor_peer.PeerTableViewModel",[f,e],{constructor:function(d){this._tableStarted=!1},createTable:function(d){this.inherited(arguments)},
_setRowHeight:function(){},destroy:function(){this.inherited(arguments)},getType:function(){return this._VIEWTYPE}})})},"variableeditor_peer/PeerArrayViewModel":function(){define("variableeditor_peer/PeerArrayViewModel","dojo/_base/declare dojo/dom-class variableeditor_client/ArrayViewModel variableeditor_client/VariableEditorUtils variableeditor_peer/PeerViewModel variableeditor_peer/MixedDataStoreWrapper variableeditor_peer/HeaderMenuMixin variableeditor_client/VETable dojo/_base/lang dojo/on variableeditor_client/ColumnWidthSizingPlugin datatoolsservices/ActionService/ActionDataServiceFactory".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p){return g("variableeditor_peer.PeerArrayViewModel",[e,b,c],{_dataStore:null,_ROW_HEIGHT:14,SORT_ACTION:"NewSortAction",UNDO_ACTION:"UndoAction",REDO_ACTION:"RedoAction",_MENU_OFFSET:8,constructor:function(a){this._initializeListeners()},createTable:function(a){var b=this.getDataStore(a);this._setupDataChangeListener(b);this._createTableWithFeatures(b);this._setColumnWidth(a);this._setRowHeight(a)},_setColumnWidth:function(a){a.columnWidth?(this.columnWidth=a.columnWidth,
this.peerNode&&this.peerNode.setProperty("ColumnWidth",a.columnWidth.toString())):this.peerNode&&this.peerNode.hasProperty("ColumnWidth")&&(this.columnWidth=parseInt(this.peerNode.getProperty("ColumnWidth")));this._table.setColumnWidth(this.columnWidth)},_setRowHeight:function(){this._table.setRowHeight(this._ROW_HEIGHT)},_createTableWithFeatures:function(a){var b=this._getTableFeatures();this._table=a=new h(a,b);var c=this;this._table.on("headerMenuRequested",function(a){c.initHeaderMenu(a);c.headerMenu(a)});
f.add(a.domNode,["toggleOverflowCss","mwTable"]);this.peerNode&&this._setServerIntializedOnDomNode()},_getTableFeatures:function(){return{features:[h.FEATURE.HeaderMenu,h.FEATURE.RowHeaders,h.FEATURE.IndividualColumnSort,m]}},getColumnModel:function(a){a={columnModel:{columnConfig:[]}};if(this.peerNode&&this.peerNode.hasProperty("Size")){var b=this.peerNode.getProperty("Size"),c;for(c=1;c<b.columnCount;c+=1)a.columnModel.columnConfig.push({label:this.ColumnModelProperties[c]&&this.ColumnModelProperties[c].HeaderName||
c.toString(),dataIndex:c,width:{value:d.getDefaultColumnWidth(),unit:"px"}})}return a},_initializeListeners:function(){if(this.peerNode){var a=this;this.peerNode.addEventListener("propertySet",function(b){try{b&&b.data&&"CellModelProperties"===b.data.key?a._updateModelProperties("CellModelProperties",b.data.newValue,!0):b&&b.data&&"TableModelProperties"===b.data.key?a._updateModelProperties("TableModelProperties",b.data.newValue,!0):b&&b.data&&"RowModelProperties"===b.data.key?a._updateModelProperties("RowModelProperties",
b.data.newValue,!0):b&&b.data&&"ColumnModelProperties"===b.data.key?a._updateModelProperties("ColumnModelProperties",b.data.newValue,!0):b&&b.data&&"Size"===b.data.key&&a._dataStore&&a._dataStore.sizeHandler()}catch(c){}})}},getDataStore:function(a){if(!this._dataStore){var b=/['x'|\u00D7]/,c=null,d=null,e=null,f,g;a&&a.data&&(c=a.data);a&&a.columnData&&(d=a.columnData);a&&a.rowData&&(e=a.rowData);if(a&&a.rows)f=a.rows;else if(this.allArgs&&this.allArgs.varSize){var h=this.allArgs.varSize.split(b);
h&&0<h.length&&(f=parseInt(h[0],10))}a&&a.columns?g=a.columns:this.allArgs&&this.allArgs.varSize&&(h=this.allArgs.varSize.split(b))&&1<h.length&&(g=parseInt(h[1],10));this._dataStore=this._createMixedDataStore(c,d,e,f,g);this.peerNode&&this._setDataStorePeerNode()}return this._dataStore},getPeerDataStore:function(){return this.getDataStore()._dataStore},updateDataStore:function(a,b){var c=this.getDataStore();c._dataStore&&c._dataStore.update(a,b)},fetchFromDataStore:function(a){var b=this.getDataStore();
if(b._dataStore)return b._dataStore.getLocalRangeData(a)},showHeaderHighlight:function(){return this.inherited(arguments)},_createMixedDataStore:function(b,c,d,e,f){return new a(b,c,d,e,f)},destroy:function(){this.inherited(arguments);this._dataStore&&this._dataStore.destroy()},headerMenu:function(a){this._dataStore._dataStore.isSortable&&this.headerMenuRequested(a)},blurView:function(){},_dispatchActionToServer:function(a,b,c){var d=this._dataStore._currentRange[0],e=this.peerDocument.varDocID;c&&
this._clearDataBuffer();this.manager.executeAction(a,{actionInfo:b,range:d,docID:e})},_clearDataBuffer:function(){this._dataStore._dataStore._dataBuffer=[];this.dispatchEvent("dataBufferCleared",this)},viewContentChanged:function(){},onFilteringDone:function(){},undo:function(){this._dispatchActionToServer(this.UNDO_ACTION,null,!0)},redo:function(){this._dispatchActionToServer(this.REDO_ACTION,null,!0)},_setServerIntializedOnDomNode:function(){this._table&&this._table.domNode&&f.add(this._table.domNode,
["serverInitialized"])},_setDataStorePeerNode:function(){this._dataStore.setViewModel(this,this.peerNode);this.dispatchEvent("viewUpdated",this,{type:"metaDataChange",data:this.peerNode.getProperties()});var a=this;this._dataStore.getColumnHeaders().then(function(){a.dispatchEvent("serverInitialized",a,{viewModel:a});a._setServerIntializedOnDomNode()})},setPeerNode:function(a){this.inherited(arguments);this._initializeListeners();this.peerNode=a;this._setDataStorePeerNode()},_setupDataChangeListener:function(a){this.own(a.on("dataChanged",
k.hitch(this,"_updateLastRangeDataTag")))},_updateLastRangeDataTag:function(a,b){this._table&&(this._table.domNode&&this._table.domNode.dataset)&&(this._table.domNode.dataset.lastUpdatedRange=JSON.stringify(b))},getParsedData:function(a){return d.getParsedData(a.data,(a.startRow+a.rowCount-1||0)-(a.startRow||0)+1,(a.startColumn+a.columnCount-1||0)-(a.startColumn||0)+1)},setSortable:function(a){this._dataStore.setSortable(a)},enableCheckboxes:function(a){this._dataStore.enableCheckboxes(a)}})})},"variableeditor_peer/PeerViewModel":function(){define("variableeditor_peer/PeerViewModel",
["dojo/_base/declare","variableeditor_client/ViewModel","mw-peermodel/Observable","dojo/on"],function(g,f,e,d){return g("variableeditor_peer.PeerViewModel",[f],{allArgs:{},peerNode:null,varName:null,init:function(b){this.allArgs={};this.varName=this.peerNode=null;b&&(this.peerNode=b.peerNode,this.varName=b.varName,this.allArgs=b)},setPeerNode:function(b){this.peerNode=b},destroy:function(){this.peerNode=null;this.inherited(arguments)}})})},"variableeditor_peer/MixedDataStoreWrapper":function(){define("variableeditor_peer/MixedDataStoreWrapper",
"mw-tabular-data-model/On variableeditor_peer/PeerDataStore dojo/_base/lang mw-tabular-data-model/rangeUtil mw-messageservice/MessageService mw-tabular-data-model/DataStore mw-peermodel/PeerModelManager mw-peermodel/Observable dojo/_base/declare dojo/Deferred".split(" "),function(g,f,e,d,b,a,c,h,k,l){b.start();return k("variableeditor_peer.MixedDataStoreWrapper",[h],{_dataStore:null,_viewModel:null,_currentRange:d.range(),_colHeaderPromises:[],_rowHeaderPromises:[],dataSize:d.range(),constructor:function(b,
c,d,e,f){this._on=new g;this._dataStore=new a(b);this._columnData=c||null;this._rowData=d||null;this._bindDataStoreMethods(this._dataStore,c,d,e,f)},setViewModel:function(a,b){var c=this._createNewDataStore(a,b);this._dataStore=c;var d=this.dataSize;this._bindDataStoreMethods(this._dataStore);c._initPeerDataStore(a,b);this._initSize(c,d);c.getColumnHeaders();c.getRowHeaders();this._updateColumnHeaders();this._updateRowHeaders();this._viewModel=a},_initSize:function(a,b){var c=a.dataSize;0===c.rows.count&&
0===c.columns.count&&(this.dataSize=b,a.dataSize=b,this._on.emit("dataSizeChanged",a.dataSize))},_createNewDataStore:function(a,b){return new f(a,b)},sizeHandler:function(){this._dataStore&&this._dataStore.sizeHandler&&this._dataStore.sizeHandler()},_bindDataStoreMethods:function(a,b,c,f,g){var h=this;this.setBuffer=function(a){h._currentRange=a;h._dataStore.setBuffer&&h._dataStore.setBuffer(a)};this.getLocalCellData=function(a,b){if(h._dataStore.getLocalCellData)return h._dataStore.getLocalCellData(a,
b)};this.getLocalColumnMetaData=b?function(a){if(b)return a=b.columnModel.columnConfig[a],a.name=a.label,a}:function(a){if(h._dataStore.getLocalColumnMetaData)return h._dataStore.getLocalColumnMetaData(a)};this.getLocalRowMetaData=c?function(a){if(c)return c[a]}:function(a){if(h._dataStore.getLocalRowMetaData)return h._dataStore.getLocalRowMetaData(a)};this.setSortable=a.setSortable?e.hitch(a,"setSortable"):function(){};this.getData=e.hitch(a,"getData");this.insert=e.hitch(a,"insert");this.replaceAll=
e.hitch(a,"replaceAll");this.enableCheckboxes=a.enableCheckboxes?e.hitch(a,"enableCheckboxes"):function(){};a.update?this.update=e.hitch(a,"update"):this.enableCheckboxes=function(){};a.getColumnHeaders&&(this.getColumnHeaders=e.hitch(a,"getColumnHeaders"));a.getDefaultColumnHeaders&&(this.getDefaultColumnHeaders=e.hitch(a,"getDefaultColumnHeaders"));a.getRowHeaders&&(this.getRowHeaders=e.hitch(a,"getRowHeaders"));a.getDefaultRowHeaders&&(this.getDefaultRowHeaders=e.hitch(a,"getDefaultRowHeaders"));
a.on("dataChanged",e.hitch(this,"_reEmit"));a.on("dataSizeChanged",e.hitch(this,"_reEmit"));a.on("pagedColumnMetaDataChanged",e.hitch(this,"_reEmit"));a.on("pagedRowMetaDataChanged",e.hitch(this,"_reEmit"));a.dataSize.rows.count<f||a.dataSize.columns.count<g?this.dataSize=d.range().setRows(0,f-1).setColumns(0,g-1):a.dataSize&&(a.dataSize.rows&&0<a.dataSize.rows.count&&a.dataSize.columns&&0<a.dataSize.columns.count)&&(this.dataSize=a.dataSize)},_reEmit:function(a,b){if(a&&this._on._events[a]){var c=
this.dataSize;this.dataSize=this._dataStore.dataSize;"dataSizeChanged"===a&&!d.isRangeEqual(c,this.dataSize)?this._on.emit(a,b):"dataSizeChanged"!==a&&this._on.emit(a,b)}},on:function(a,b){return this._on.on(a,b)},getColumnHeaders:function(a){var b=new l(function(){});if(this._dataStore.hasOwnProperty("getColumnHeaders"))return this._dataStore.getColumnHeaders(a);this._columnData?b.resolve(this._columnData):this._colHeaderPromises.push(b);return b},getDefaultColumnHeaders:function(){return this.getColumnHeaders(!0)},
getDefaultRowHeaders:function(){return this.getRowHeaders(!0)},getRowHeaders:function(a){var b=new l(function(){});if(this._dataStore.hasOwnProperty("getRowHeaders"))return this._dataStore.getRowHeaders(a);this._rowData&&this._rowData.rowConfig?b.resolve(this._rowData.rowConfig):this._rowHeaderPromises.push(b);return b},sort:function(a){this._dataStore.sort(a)},_updateColumnHeaders:function(){var a=this;this._colHeaderPromises&&this._dataStore.getColumnHeaders().then(function(b){for(;0<a._colHeaderPromises.length;){var c=
a._colHeaderPromises.pop();c.isResolved()||c.resolve(b)}})},_updateRowHeaders:function(){var a=this;this._rowHeaderPromises&&this._dataStore.getRowHeaders().then(function(b){for(;0<a._rowHeaderPromises.length;){var c=a._rowHeaderPromises.pop();c.isResolved()||c.resolve(b)}})},"delete":function(a){delete this._dataStore},destroy:function(){this._dataStore&&this._dataStore.destroy&&(this._dataStore.destroy(),this["delete"]())}})})},"variableeditor_peer/PeerDataStore":function(){define("variableeditor_peer/PeerDataStore",
"mw-tabular-data-model/On mw-tabular-data-model/rangeUtil mw-messageservice/MessageService mw-tabular-data-model/DataStore mw-peermodel/PeerModelManager mw-peermodel/Observable mw-log/Log dojo/_base/declare dojo/Deferred variableeditor_client/renderers/NumericRenderer variableeditor_client/renderers/SpanRenderer variableeditor_client/renderers/TableRenderer variableeditor_client/renderers/TableHeaderRenderer mw-table/renderers/CheckboxRenderer dojo/topic variableeditor_client/VariableEditorUtils dojo/_base/lang dojo/has".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u){return h("variableeditor_peer.PeerDataStore",[a],{SORT_TYPE:"NUMERIC",constructor:function(a,b){this._dataBuffer=[];this._pendingRangeList=[];this._alreadyRequestedRangeList=[];this._on=new g;this.requestTimer=null;this._tableModelProperties=[];this._columnModelProperties=[];this._rowModelProperties=[];this._cellModelProperties=[];this._viewModelNode=this._viewModel=null;this.dataSize=f.range();this._currentRange=f.range();this._promiseBuffer=[];this._colHeaderPromises=
[];this._rowHeaderPromises=[];this._alreadyRequestedRangeList=[];this._counter=0;this._columnConfigs=[];this._spinnerRenderingSubscription=null;this._fetchDataCallCounterForSpinner=0;a&&(this._spinnerRenderingSubscription=r.subscribe("spinnerRendered",function(b){a.peerDocument&&a.peerDocument._hideBusyIndicator()}))},_initPeerDataStore:function(a,b){a&&b&&this.inititalizePeerNode(a,b)},sizeHandler:function(){if(this._viewModel&&this._viewModelNode){var a=this._viewModelNode.getProperty("Size");this.dataSize=
a=f.range().setRows(0,a.rowCount-1).setColumns(0,a.columnCount-1);try{this._on.emit("dataSizeChanged",this.dataSize),this._viewModel.dispatchEvent("viewUpdated",this,{type:"sizeChange",size:a})}catch(b){}}},_handleSpinnerRendering:function(){(0>this.dataSize.rows.end||0>this.dataSize.columns.end)&&r.publish("spinnerRendered",!0)},fetchBufferData:function(a,b){var c=f.range().setRows(a.start,a.end).setColumns(b.start,b.end);this.setBuffer([c])},inititalizePeerNode:function(a,b){this._viewModel=a;this._viewModelNode=
b;this.isSortable=!0;this.renderCheckboxes=!1;b&&(b&&(b.hasProperty&&b.hasProperty("Size"))&&this.sizeHandler(),this._propertySetCallback=t.hitch(this,"_handleServerPropertySet"),b.addEventListener("propertySet",this._propertySetCallback),this._setDataCallback=t.hitch(this,"_handleServerSetData"),b.addEventListener("peerEvent",this._setDataCallback),this._setExisitingModelProperties(b),b.dispatchEvent("peerEvent",b,{type:"getSize"}))},_handleServerPropertySet:function(a){if(a&&a.data)try{switch(a.data.key){case "CellModelProperties":this._updateModelProperties("CellModelProperties",
a.data.newValue);this._viewModel._updateModelProperties("CellModelProperties",a.data.newValue,!0);break;case "TableModelProperties":this._updateModelProperties("TableModelProperties",a.data.newValue);this._viewModel._updateModelProperties("TableModelProperties",a.data.newValue,!0);break;case "RowModelProperties":this._updateModelProperties("RowModelProperties",a.data.newValue);this._updateRowHeaders();this._viewModel._updateModelProperties("RowModelProperties",a.data.newValue,!0);break;case "ColumnModelProperties":this._updateModelProperties("ColumnModelProperties",
a.data.newValue);this._updateColumnHeaders();this._viewModel._updateModelProperties("ColumnModelProperties",a.data.newValue,!0);break;case "Selection":this._updateSelection();break;case "Size":this.sizeHandler()}}catch(b){}},_handleServerSetData:function(a){if(a&&a.data&&a.data.type){if("setData"===a.data.type&&"client"!==a.originator){var b=this._viewModel.getParsedData(a.data);if(b){var c=a.data.startRow,d=a.data.startRow+a.data.rowCount-1||0,e=a.data.startColumn,f=a.data.startColumn+a.data.columnCount-
1||0;if(0<this._promiseBuffer.length)for(;0<this._promiseBuffer.length;)this._promiseBuffer.pop().promise.resolve(b);else this.updateData(b,c,d,e,f),this._viewModel.dispatchEvent("viewUpdated",this,{type:"dataChange",data:b}),u("chrome")&&(b=new CustomEvent("customMPoint",{detail:"viewUpdated"}),window.dispatchEvent(b))}else this._handleSpinnerRendering()}"setStringData"===a.data.type&&this._viewModel.dispatchEvent("viewUpdated",this,{type:"stringDataUpdate",data:a.data})}},_setExisitingModelProperties:function(a){a.hasProperty("TableModelProperties")&&
(this._updateModelProperties("TableModelProperties",a.getProperty("TableModelProperties")),this._viewModel._updateModelProperties("TableModelProperties",a.getProperty("TableModelProperties"),!0));a.hasProperty("ColumnModelProperties")&&this._updateModelProperties("ColumnModelProperties",a.getProperty("ColumnModelProperties"));a.hasProperty("RowModelProperties")&&this._updateModelProperties("RowModelProperties",a.getProperty("RowModelProperties"));a.hasProperty("CellModelProperties")&&this._updateModelProperties("CellModelProperties",
a.getProperty("CellModelProperties"))},_updateModelProperties:function(a,b){var c=JSON.parse(b),d=this;if("TableModelProperties"===a){d._tableModelProperties=c;var c=this._currentRangeInView?this._currentRangeInView:this._currentRange,e=c.columns.start,g=c.columns.end,h=0<=c.rows.start?c.rows.start:0,k=0<=c.rows.end?c.rows.end:0,c=f.range().setRows(h,k).setColumns(e,g);d._updateColumnConfigs(e,g);try{d._on.emit("pagedColumnMetaDataChanged",{rangeList:[c]})}catch(l){}}else if("ColumnModelProperties"===
a){if(0<c.length){c.forEach(function(a){d._columnModelProperties[a.ColumnNumber-1]=a});e=c[0].ColumnNumber-1;g=c[c.length-1].ColumnNumber-1;d._updateColumnConfigs(e,g);try{d._on.emit("pagedColumnMetaDataChanged",{rangeList:[f.range().setRows(0,0).setColumns(e,g)]})}catch(m){}this._handleSpinnerRendering();0>=d._currentRange.columns.count&&(d._currentRange=d._currentRange.setColumns(e,g))}}else if("RowModelProperties"===a){if(0<c.length){c.forEach(function(a){d._rowModelProperties[a.RowNumber-1]=a});
h=c[0].RowNumber-1;k=c[c.length-1].RowNumber-1;try{d._on.emit("pagedRowMetaDataChanged",{rangeList:[f.range().setColumns(0,0).setRows(h,k)]})}catch(p){}0>=d._currentRange.rows.count&&(d._currentRange=d._currentRange.setRows(h,k))}}else"CellModelProperties"===a&&(h=Infinity,k=-1,e=Infinity,g=-1,c.forEach(function(a,b){a.forEach(function(a,b){var c=a.RowNumber-1,f=a.ColumnNumber-1;d._cellModelProperties[c]||(d._cellModelProperties[c]=[]);d._cellModelProperties[c][f]=a;h=Math.min(c,h);k=Math.max(c,k);
e=Math.min(f,e);g=Math.max(f,g)})}),Infinity!==h&&(Infinity!==e&&0<this._dataBuffer.length)&&this._notifyDataStoreOnViewUpdate(h,k,e,g))},_notifyDataStoreOnViewUpdate:function(a,b,c,d){try{this._on.emit("dataChanged",[f.range().setRows(a,b).setColumns(c,d)])}catch(e){}0>=this._currentRange.columns.count&&(this._currentRange=this._currentRange.setColumns(c,d));0>=this._currentRange.rows.count&&(this._currentRange=this._currentRange.setRows(a,b))},getModelProperty:function(a,b,c,d){if("TableModelProperty"===
a&&this._tableModelProperties)return this._tableModelProperties[b];if("ColumnModelProperty"===a&&this._columnModelProperties&&this._columnModelProperties[d])return this._columnModelProperties[d][b];if("RowModelProperty"===a&&this._rowModelProperties&&this._rowModelProperties[c])return this._rowModelProperties[c][b];if("CellModelProperty"===a&&this._cellModelProperties&&this._cellModelProperties[c]&&this._cellModelProperties[c][column])return this._cellModelProperties[c][column][b]},getRangeObject:function(a,
b,c,d){return[f.range().setRows(a,b).setColumns(c,d)]},getExistingData:function(a){var b=a.rows.start,c=a.columns.start,d=a.rows.end;a=a.columns.end;for(var e=Array(d-b+1),f=0;f<e.length;f++)e[f]=Array(a-c+1);for(c="";b<=d;b+=1)c=c+"\n"+this._dataBuffer[0].data[b];return c.replace(/,/g,"\t ")},getCellModelPropertyValue:function(a,b,c,d,e){if(d&&d.hasOwnProperty(c))return d[c];if(this._cellModelProperties&&this._cellModelProperties[a]&&this._cellModelProperties[a][b]&&this._cellModelProperties[a][b].hasOwnProperty(c))return this._cellModelProperties[a][b][c];
if(this._columnModelProperties&&this._columnModelProperties[b]&&this._columnModelProperties[b].hasOwnProperty(c))return this._columnModelProperties[b][c];if(this._rowModelProperties&&this._rowModelProperties[a]&&this._rowModelProperties[a].hasOwnProperty(c))return this._rowModelProperties[a][c];if(this._tableModelProperties&&this._tableModelProperties.hasOwnProperty(c))return this._tableModelProperties[c];if(void 0!==e)return e},_getUnbufferedRanges:function(a,b){for(var c=this._getUnbufferedRangesXOR(a,
b),d=c?c.length:0,e=0;e!==d;)e=d,d=(c=this._getUnbufferedRangesXOR(a,c))?c.length:0;return c},_getUnbufferedRangesXOR:function(a,b){var c=[];if(a&&0<a.length&&b)for(var d=0;d<b.length;d+=1){for(var e=b[d],g=0;g<a.length;g+=1){var h=a[g];if(this._isStrictIntersection(h,e)){if(!f.isRangeInside(h,e)){var g=h.rows.start,k=e.rows.start,l=h.rows.end,m=e.rows.end,p=h.columns.start,n=e.columns.start,h=h.columns.end,e=e.columns.end,q=Math.min(p,n),r=Math.max(p,n),s=Math.min(h,e),t=Math.max(h,e),u=Math.max(l,
m),K=Math.min(l,m),Q=Math.max(g,k),U=Math.min(g,k),T=f.range().setRows(K,u).setColumns(q,r),X=f.range().setRows(K,u).setColumns(r,s),u=f.range().setRows(K,u).setColumns(s,t),$=f.range().setRows(Q,K).setColumns(q,r),K=f.range().setRows(Q,K).setColumns(s,t),q=f.range().setRows(U,Q).setColumns(q,r),r=f.range().setRows(U,Q).setColumns(r,s),s=f.range().setRows(U,Q).setColumns(s,t);k<g&&(n<p&&e>h?c.push(this._horizCombineRange(q,s)):n<p?c.push(this._horizCombineRange(q,r)):e>h?c.push(this._horizCombineRange(r,
s)):c.push(r));m>l&&(n<p&&e>h?c.push(this._horizCombineRange(T,u)):n<p?c.push(this._horizCombineRange(T,X)):e>h?c.push(this._horizCombineRange(X,u)):c.push(X));n<p&&c.push($);e>h&&c.push(K)}e=null;break}}e&&c.push(e)}else return b;return c},_getMinimumRanges:function(a,b){var c=this._reduceRangeOverlaps(a,b),d=[];if(c&&0<c.length)for(var e=0;e<c.length;e+=1){for(var g=c[e],h=e+1;h<c.length;h+=1){var k=c[h];this._isColumnAdjacent(g,k)?(g=this._horizCombineRange(g,k),c[h]=f.range()):this._isRowAdjacent(g,
k)&&(g=this._vertCombineRange(g,k),c[h]=f.range())}g&&(g.rows&&-1!==g.rows.end)&&d.push(g)}else d=c;return d},_reduceRangeOverlaps:function(a,b){if(!a||0>=a.length)return[b];var c=a[0],d=[];1<a.length?(d=this._reduceRangeOverlaps(a.slice(1),b),this._isStrictIntersection(c,b)?(c=this._getUnbufferedRanges(d,[c]))&&0<c.length&&c.forEach(function(a){d.push(a)}):d.push(c)):this._isColumnAdjacent(c,b)?d.push(this._horizCombineRange(c,b)):this._isRowAdjacent(c,b)?d.push(this._vertCombineRange(c,b)):f.isRangeInside(c,
b)?d.push(c):f.isRangeInside(b,c)?d.push(b):this._isStrictIntersection(c,b)?(d.push(c),(c=this._getUnbufferedRanges([c],[b]))&&0<c.length&&c.forEach(function(a){d.push(a)})):(d.push(c),1===a.length&&d.push(b));return d},_isStrictIntersection:function(a,b){return!a||!b||!f.doesRangeIntersect(a,b)?!1:f.isRangeEqual(a,b)?!0:Math.max(a.rows.start,b.rows.start)===Math.min(a.rows.end,b.rows.end)&&1!==this.dataSize.rows.count||Math.max(a.columns.start,b.columns.start)===Math.min(a.columns.end,b.columns.end)&&
1!==this.dataSize.columns.count?!1:!0},_isRowAdjacent:function(a,b){return!a||!b?!1:f.doesRangeIntersect(a,b)&&a.columns.start===b.columns.start&&a.columns.end===b.columns.end},_isColumnAdjacent:function(a,b){return!a||!b?!1:f.doesRangeIntersect(a,b)&&a.rows.start===b.rows.start&&a.rows.end===b.rows.end},_vertCombineRange:function(a,b){return!a?b:!b?a:f.range().setRows(Math.min(a.rows.start,b.rows.start),Math.max(a.rows.end,b.rows.end)).setColumns(a.columns.start,a.columns.end)},_horizCombineRange:function(a,
b){return!a?b:!b?a:f.range().setRows(a.rows.start,a.rows.end).setColumns(Math.min(a.columns.start,b.columns.start),Math.max(a.columns.end,b.columns.end))},_consolidateRanges:function(a){var b=[];if(a&&0<a.length)for(var c=a.slice(0);0<c.length;){for(var d=c.shift(),e=!1,g=0;g<b.length;g+=1){var h=a[g];if(0<this._dataBuffer.length?f.doesRangeIntersect(h,d):this.doColumnsInRangeIntersect(h,d)){var e=!0,k=Math.min(d.rows.start,h.rows.start),l=Math.max(d.rows.end,h.rows.end),m=Math.min(d.columns.start,
h.columns.start),h=Math.max(d.columns.end,h.columns.end),k=f.range().setRows(k,l).setColumns(m,h);b[g]=k}}e||b.push(d)}return b},doColumnsInRangeIntersect:function(a,b){return a.columns.start<=b.columns.end&&a.columns.end>=b.columns.start},fetchDataFromServer:function(a){this._viewModelNode.dispatchEvent("peerEvent",this._viewModelNode,{type:"getData",startRow:a.rows.start,endRow:a.rows.end,startColumn:a.columns.start,endColumn:a.columns.end})},_setCurrentPageOnServer:function(a){this._viewModelNode.dispatchEvent("peerEvent",
this._viewModelNode,{type:"setCurrentPage",startRow:a.rows.start,endRow:a.rows.end,startColumn:a.columns.start,endColumn:a.columns.end})},sendDataToServer:function(a,b){b=b[0][0];try{this._viewModelNode.dispatchEvent("peerEvent",this._viewModelNode,{type:"setData",data:b,row:a.rows.start+1,column:a.columns.start+1},"client")}catch(c){}},setBuffer:function(a){this.requestTimerSetCurrentPage&&clearTimeout(this.requestTimerSetCurrentPage);var b=this._dataBuffer.map(function(a){return a.range}),b=this._getUnbufferedRanges(b,
a),c=this;this._viewModelNode&&b&&0<b.length?(this.requestTimer&&clearTimeout(this.requestTimer),c._updatePendingRangeList(b),c.requestTimer=setTimeout(function(){c._fetchDataInPendingRangeList()},200)):c.requestTimerSetCurrentPage=setTimeout(function(){c._setCurrentPageOnServer(a[0])},200);c._currentRangeInView=a[0]},_fetchDataInPendingRangeList:function(){for(var a=0;a<this._pendingRangeList.length;a+=1){var b=this._pendingRangeList[a];s.isValid(b.rows.count)&&s.isValid(b.columns.count)&&(this._showBusyIndicatorOnFetch(),
this.fetchDataFromServer(b),this._currentRange=b)}this._alreadyRequestedRangeList=this._pendingRangeList;this._pendingRangeList=[]},_updatePendingRangeList:function(a){if(a&&0<a.length&&(a=this._getUnbufferedRanges(this._alreadyRequestedRangeList,a))&&0<a.length)if(a=this._getUnbufferedRanges(this._pendingRangeList,a)){var b=this;a.forEach(function(a){b._pendingRangeList.push(a)});this._pendingRangeList=this._consolidateRanges(this._pendingRangeList)}},getStringData:function(a){this._viewModelNode.dispatchEvent("peerEvent",
this._viewModelNode,{type:"getStringData",startRow:a.rows.start,endRow:a.rows.end,startColumn:a.columns.start,endColumn:a.columns.end})},_showBusyIndicatorOnFetch:function(){1<this._fetchDataCallCounterForSpinner?this._viewModel.peerDocument._showBusyIndicator():this._fetchDataCallCounterForSpinner++},getLocalRowMetaData:function(a){return{label:this.getModelProperty("RowModelProperty","RowName",a)}},_getSingleColumnConfig:function(a){var b=this.getModelProperty("ColumnModelProperty","FilteredColumnWidth",
-1,a)?this.getModelProperty("ColumnModelProperty","FilteredColumnWidth",-1,a):this._viewModel.columnWidth||s.getDefaultColumnWidth(this._viewModel.varType),c=this.getModelProperty("ColumnModelProperty","class",-1,a)?this.getModelProperty("ColumnModelProperty","class",-1,a):this.getModelProperty("TableModelProperty","class"),d=this.getModelProperty("ColumnModelProperty","GroupColumnSize",-1,a)||1,e=this.getModelProperty("TableModelProperty","ShowColumnHeaderLabels")?this.getModelProperty("ColumnModelProperty",
"HeaderName",-1,a)||" ":void 0,f=this.isSortable&&this.getModelProperty("ColumnModelProperty","IsSortable",-1,a),b=s.constructColumnHeader(e,a,b*d,d,c);b.sortType=!0===f?this.SORT_TYPE:void 0;b.headerMenu=f;0===a?this._createRenderer(b,d,c||"double",!0):this._createRenderer(b,d,c||"double");f&&(d=this.getModelProperty("ColumnModelProperty","IsFiltered",-1,a),f=this.getModelProperty("TableModelProperty","LastSorted",-1,-1),e=b.label,b.headerRenderer=new n({columnClass:c}),a={name:e,isFiltered:d,isSorted:f?
f.index===a:!1,sortDirection:f?f.order:"",showHeaderHighlight:this._viewModel.showHeaderHighlight(a)},b.label=a);return b},setSortable:function(a){this.isSortable!==a&&(this.isSortable=a,this._columnConfigs=[],this._on.emit("pagedColumnMetaDataChanged",{rangeList:[f.range().setRows(0,0).setColumns(this._currentRange.columns.start,this._currentRange.columns.end)]}))},enableCheckboxes:function(a){this.renderCheckboxes!==a&&(this.renderCheckboxes=a,this._columnConfigs=[],this._on.emit("pagedColumnMetaDataChanged",
{rangeList:[f.range().setRows(0,0).setColumns(this._currentRange.columns.start,this._currentRange.columns.end)]}))},update:function(a,b){if(a.rows.count!==b.length)throw Error("Range rows count "+a.rows.count+" does not match data.length for update");if(!f.isRangeInside(this.dataSize,a))throw Error("Range exceeds dataSize for update");for(var c=0;c<b.length;c+=1)if(b[c].length!==a.columns.count)throw Error("data["+c+"] needs to contain "+(a.columns.count+" columns of data for update"));this.sendDataToServer(a,
b)},_notifyDataStoreOnSingleColumnUpdate:function(a){this._on.emit("pagedColumnMetaDataChanged",{rangeList:[f.range().setRows(0,0).setColumns(a,a)]})},_updateColumnConfigs:function(a,b){for(var c=a;c<=b;c+=1)this._updateSingleColumnConfig(c)},_updateSingleColumnConfig:function(a){this._columnConfigs||(this._columnConfigs=[]);this._columnConfigs[a]&&(delete this._columnConfigs[a].renderer,delete this._columnConfigs[a]);this._columnConfigs[a]=this._getSingleColumnConfig(a)},getLocalColumnMetaData:function(a){(!this._columnConfigs||
!this._columnConfigs[a])&&this._updateSingleColumnConfig(a);return this._columnConfigs[a]},getLocalCellData:function(a,b){if(this._dataBuffer)for(var c=0;c<this._dataBuffer.length;c+=1){var d=this._dataBuffer[c].range,e=this._dataBuffer[c].data;if(d.rows.start<=a&&d.rows.end>=a&&d.columns.start<=b&&d.columns.end>=b)return e[a-d.rows.start][b-d.columns.start]}},getLocalRangeData:function(a){for(var b=[],c=0,d=0,e=a.rows.start,c=0;e<=a.rows.end;e+=1,c+=1){b[c]=[];for(var f=a.columns.start,d=0;f<=a.columns.end;f+=
1,d+=1)b[c][d]=this.getLocalCellData(e,f)}return b},dataStoreHasSufficientTopLeftData:function(a){return this._dataBuffer.map(function(a){return a.range}).some(function(b){return 0==b.rows.start&&a.rows.end<=b.rows.end&&a.columns.end<=b.columns.end})},getData:function(a){var b=this;a||(a=[f.range().setRows(0,99).setColumns(0,7)]);a.slice();var c=a[0],d=new Promise(function(a,e){if(f.isRangeInside(b._currentRange,c)){for(var g=c.rows.start-b._currentRange.rows.start,h=c.columns.start-b._currentRange.columns.start,
k=c.rows.end-b._currentRange.rows.start,l=c.columns.end-b._currentRange.columns.start,m=Array(k-g+1),p=0;p<m.length;p++)m[p]=Array(l-h+1);for(var n=b._currentRange.rows.start,q=b._currentRange.columns.start;g<=k;g=p+1)for(var r=h;r<=l;r=p+1)m[g-n][r-q]=b._dataBuffer[g][r];a(m)}else b._promiseBuffer.push({promise:d,startRow:c.rows.start,endRow:c.rows.end,startColumn:c.columns.start,endColumn:c.columns.end}),b.fetchDataFromServer(c),b._currentRange=c});return d},insert:function(a,b){},"delete":function(a){},
replaceAll:function(a){var b=0,c=0;a&&(b=a.length,a[0]&&(c=a[0].length));this._currentRange=f.range().setRows(0,b).setColumns(0,c);this._dataBuffer=a},_rangeHasPoint:function(a,b,c){return a&&a.rows.start<=b&&a.rows.end>=b&&a.columns.start<=c&&a.columns.end>=c},_setRangeData:function(a,b,c){var d=a?a.map(function(a){return a.range}):[],e=this,g=[];if(b)if(d&&0<d.length){this._getMinimumRanges(d,b).forEach(function(d){for(var h=[],k=d.rows.start;k<=d.rows.end;k+=1){var l=d.rows.start;h[k-l]=[]}for(var m=
0;m<a.length;m+=1){var p=a[m].range,n=a[m].data;if(e._isStrictIntersection(p,d)||f.isRangeInside(d,p))for(k=d.rows.start;k<=d.rows.end;k+=1)for(var q=d.columns.start;q<=d.columns.end;q+=1){var l=d.rows.start,r=d.columns.start,s=p.rows.start,t=p.columns.start;e._rangeHasPoint(p,k,q)&&(h[k-l][q-r]=n[k-s][q-t])}}if(e._isStrictIntersection(b,d)||f.isRangeInside(d,b))for(k=d.rows.start;k<=d.rows.end;k+=1)for(q=d.columns.start;q<=d.columns.end;q+=1)e._rangeHasPoint(b,k,q)&&(l=d.rows.start,r=d.columns.start,
s=b.rows.start,t=b.columns.start,h[k-l][q-r]=c[k-s][q-t]);g.push({range:d,data:h,lastUpdate:Date.now()})});for(d=0;d<this._alreadyRequestedRangeList.length;d+=1)if(f.isRangeEqual(this._alreadyRequestedRangeList[d],b)){this._alreadyRequestedRangeList.splice(d,1);break}}else g.push({range:b,data:c,lastUpdate:Date.now()});else return a;return g},updateData:function(a,b,c,d,e){b=f.range().setRows(b,c).setColumns(d,e);this._dataBuffer=this._setRangeData(this._dataBuffer,b,a);try{this._on.emit("dataChanged",
[b])}catch(g){}},on:function(a,b){return this._on.on(a,b)},_updateColumnHeaders:function(){if(this._colHeaderPromises)for(var a=this._getColumnHeadersFromNode();0<this._colHeaderPromises.length;){var b=this._colHeaderPromises.pop();b.isResolved()||b.resolve(a)}},_updateRowHeaders:function(){if(this._rowHeaderPromises&&0<this._rowHeaderPromises.length)for(var a=this._getRowHeadersFromNode();0<this._rowHeaderPromises.length;){var b=this._rowHeaderPromises.pop();b.isResolved()||b.resolve(a)}else return this._getRowHeadersFromNode()},
_getColumnHeadersFromNode:function(){var a=this._getPropertyFromViewModel("ColumnModelProperties");if(a){for(var a=JSON.parse(a),b=[],c=0;c<a.length;c+=1)b[c]=this._constructColumnHeaderForSingleHeader(c,a[c]);return this._constructColumnConfig(b)}},_constructColumnHeaderForSingleHeader:function(a,b){var d={};try{var e=b.HeaderName,f=b.GroupColumnSize?parseInt(b.GroupColumnSize):1,g=b.IsSortable,h=this._viewModel.columnWidth?this._viewModel.columnWidth:(b.ColumnWidth||s.getDefaultColumnWidth())*f,
d=s.constructColumnHeader(e,a,h);d.sortType=g?this.SORT_TYPE:void 0;d.headerMenu=g;this._createRenderer(d,f,d["class"])}catch(k){c.error(k)}return d},_createRenderer:function(a,b,c,d){1<b?a.renderer=new m({numCells:b,colClass:c}):d&&this.renderCheckboxes?a.interactiveRenderer=new q({isChecked:function(a){if(a)return Boolean(Number(a[0].value))},getValueForAction:function(a){return a?{oldValue:a,newValue:"0"===a[0].value?"1":"0"}:null}}):a.renderer=new p({colClass:c})},_getDefaultColumnHeadersFromNode:function(){var a=
this._getPropertyFromViewModel("Size");if(a){for(var b=[],c=this._getPropertyFromViewModel("TableModelProperties"),c=JSON.parse(c),d=this._viewModel.columnWidth,e=0;e<a.columnCount;e+=1)b[e]=s.constructColumnHeader((e+1).toString(),e,d,c["class"]),b[e].renderer=new l;return this._constructColumnConfig(b)}},_constructColumnConfig:function(a){return{dataTestId:this._counter+1,columnModel:{columnConfig:a}}},_getPropertyFromViewModel:function(a){return this._viewModelNode&&this._viewModelNode.hasProperty(a)?
this._viewModelNode.getProperty(a):null},_getRowHeadersFromNode:function(){var a=this._getPropertyFromViewModel("RowModelProperties");if(a){for(var a=JSON.parse(a),b=[],c=0;c<a.length;c+=1)b[c]=a[c].RowName;return b}},_getDefaultRowHeadersFromNode:function(){var a=this._getPropertyFromViewModel("Size");if(a){for(var b=[],c=0;c<a.rowCount;c+=1)b[c]=(c+1).toString();return b}},getColumnHeaders:function(a){var b=new k(function(){}),c=[];(c=a?this._getDefaultColumnHeadersFromNode():this._getColumnHeadersFromNode())&&
c.columnModel&&c.columnModel.columnConfig&&(c.columnModel.columnConfig.length==this.dataSize.columns.count||-1===this.dataSize.columns.end)?b.resolve(c):this._colHeaderPromises.push(b);return b},getRowHeaders:function(a){var b=new k(function(){}),c=[];(c=a?this._getDefaultRowHeadersFromNode():this._getRowHeadersFromNode())?b.resolve(c):this._rowHeaderPromises.push(b);return b},getDataBuffer:function(){return this._dataBuffer},_updateSelection:function(){},destroy:function(){this._spinnerRenderingSubscription&&
this._spinnerRenderingSubscription.remove();this._viewModelNode.removeEventListener("propertySet",this._propertySetCallback);this._viewModelNode.removeEventListener("peerEvent",this._setDataCallback)}})})},"variableeditor_client/renderers/NumericRenderer":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);
return e}}();define(["dojo/dom-class","variableeditor_client/VariableEditorUtils","dojo/i18n!variableeditor_client/l10n/nls/app","dojo/topic"],function(f,e,d,b){return function(){function a(b){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");this.config=b}g(a,[{key:"getTooltip",value:function(a){try{return a?a[0].value?{text:a[0].value}:{text:a}:{text:" "}}catch(b){return a}}},{key:"getDomNode",value:function(a){var f=null;if(a){setTimeout(function(){b.publish("spinnerRendered",
!0)},300);var g=this.config&&this.config.colClass?e.getTextAlignmentForDatatype(this.config.colClass):"right",f=document.createElement("div");f.textContent=a;f.style.textOverflow="ellipsis";f.style.overflow="hidden";f.className="mw-table-cell-content";f.style.textAlign=g}else f=document.createElement("div"),f.textContent=d.loading,f.style.color="#f1f1f1";return f}}]);return a}()})},"variableeditor_client/renderers/SpanRenderer":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=
d[b];a.enumerable=a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["variableeditor_client/VariableEditorUtils","dojo/i18n!variableeditor_client/l10n/nls/app"],function(f,e){var d={LOADING_COLOR:"#f1f1f1",LOADING_ALIGNMENT:"left"};return function(){function b(a){if(!(this instanceof b))throw new TypeError("Cannot call a class as a function");this.config=a}g(b,[{key:"getTooltip",
value:function(a){try{return a&&a[0]&&a[0].value?{text:a[0].value}:{text:" "}}catch(b){return a}}},{key:"getDomNode",value:function(a){var b=this.config.numCells,g=f.getTextAlignmentForDatatype(this.config.colClass),k=[],l=[];if(a)if(Array.isArray(a))k=a;else if("string"===typeof a)k=a.replace(/\s\s+/g," "),k=k.split(" ");else{l=[];for(k=0;a.hasOwnProperty(k);k+=1)l.push(a[k]);k=l.map(function(a){return a.value});l=l.map(function(a){return a.isMetaData})}a=document.createElement("div");for(var m=
0;m<b;m+=1){var p=null,n=!1;k[m]?p=f.formatString(k[m]):(p=e.loading,n=!0);var q=document.createElement("div");q.textContent=p;q.className="spanCell";"1"===l[m]&&(q.style.fontStyle="italic");n?(q.style.color=d.LOADING_COLOR,q.style.textAlign=d.LOADING_ALIGNMENT):q.style.textAlign=g;a.appendChild(q)}a.className="spanCellParent";return a}}]);return b}()})},"variableeditor_client/renderers/TableRenderer":function(){var g=function(){function f(e,d){for(var b=0;b<d.length;b++){var a=d[b];a.enumerable=
a.enumerable||!1;a.configurable=!0;"value"in a&&(a.writable=!0);Object.defineProperty(e,a.key,a)}}return function(e,d,b){d&&f(e.prototype,d);b&&f(e,b);return e}}();define(["dojo/dom-class","variableeditor_client/VariableEditorUtils","dojo/i18n!variableeditor_client/l10n/nls/app","dojo/topic"],function(f,e,d,b){return function(){function a(b){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");this.config=b}g(a,[{key:"getTooltip",value:function(a){try{return a?a[0].value?
{text:a[0].value}:{text:a}:{text:""}}catch(b){return a}}},{key:"getDomNode",value:function(a){var f=e.getTextAlignmentForDatatype(this.config.colClass),g=null;if(a){setTimeout(function(){b.publish("spinnerRendered",!0)},300);var l=!1,m="";if("string"===typeof a)m=e.formatString(a);else{g=[];for(m=0;a.hasOwnProperty(m);m+=1)g.push(a[m]);m=g.map(function(a){"1"===a.isMetaData&&(l=!0);return e.formatString(a.value)}).join();m=e.cleanUIforTextFiltering(m)}g=document.createElement("div");g.textContent=
m;g.className="mw-table-cell-content";g.style.textAlign=f;l&&(g.style.fontStyle="italic")}else g=document.createElement("div"),g.textContent=d.loading,g.style.color="#f1f1f1";g.style.textOverflow="ellipsis";g.style.overflow="hidden";return g}}]);return a}()})},"variableeditor_client/renderers/TableHeaderRenderer":function(){define("variableeditor_client/renderers/TableHeaderRenderer",["dojo/_base/declare","dojo/dom-class"],function(g,f){return g("variableeditor_client.renderers.TableHeaderRenderer",
[],{config:{},_CUSTOM_RENDERER_CLASS:"CustomTableHeaderRenderer",_CUSTOM_ICON_CLASS:"customIcon",_LABEL_NODE_CLASS:"labelNode",_HIGHLIGHT_HEADER_CLASS:"HighlightHeader",constructor:function(e){this.config=e},getDomNode:function(e){var d=document.createElement("div");f.add(d,this._CUSTOM_RENDERER_CLASS);var b=document.createElement("div");f.add(b,this._CUSTOM_ICON_CLASS);d.appendChild(b);b=document.createElement("span");b.textContent=e.name;f.add(b,this._LABEL_NODE_CLASS);d.appendChild(b);if(e.isFiltered||
e.isSorted)e.isFiltered&&(d.dataset.filtered=!0),e.isSorted&&(d.dataset.sortDirection=e.sortDirection);f.toggle(d,this._HIGHLIGHT_HEADER_CLASS,e.showHeaderHighlight||!1);return d},getTooltip:function(e){return e.name?{text:e.name}:""}})})},"mw-table/renderers/CheckboxRenderer":function(){var g="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f=
function(){function e(d,b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define(["mw-table/renderers/utils/RendererUtils"],function(e){return function(){function d(b){if(!(this instanceof d))throw new TypeError("Cannot call a class as a function");var a=b=b||{};b=a.isChecked;a=a.getValueForAction;this._checkboxDefaultClasses=["mwDefaultVisualFamily",
"mwEnabled","mwWidget","mwCheckBox","mw-data-checkbox-renderer"];this._checkboxCheckedClasses=["mwCheckBoxChecked"];b&&(this._isChecked=b);a&&(this.getValueForAction=a)}f(d,[{key:"_isChecked",value:function(b){return"object"===("undefined"===typeof b?"undefined":g(b))&&!0===b.checked?!0:!1}},{key:"getDomNode",value:function(b){var a=document.createElement("div"),c=document.createElement("div"),d=document.createElement("div"),e=document.createElement("div");b=this._isChecked(b);c.className=b?this._checkboxDefaultClasses.concat(this._checkboxCheckedClasses).join(" "):
this._checkboxDefaultClasses.join(" ");d.setAttribute("role","checkbox");d.setAttribute("aria-checked",b);d.setAttribute("data-clickable",!0);d.className="mwCheckBoxRadioIconNode";e.className="mwCheckBoxRadioIconInner";e.setAttribute("data-clickable",!0);d.appendChild(e);c.appendChild(d);a.appendChild(c);a.className="mw-table-cell-content mwRenderer";return a}},{key:"getValueForAction",value:function(b){var a=e.shallowCopy(b);if("object"===("undefined"===typeof a?"undefined":g(a))&&a.hasOwnProperty("checked"))a.checked=
!a.checked;return{oldValue:b,newValue:a}}},{key:"handleAction",value:function(b){b=b||{};var a=b.value,c=b.target;return!0===b.shouldUpdate||c&&c.getAttribute("data-clickable")?this.getValueForAction(a):null}}]);return d}()})},"mw-table/renderers/utils/RendererUtils":function(){var g="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f=function(){function e(d,
b){for(var a=0;a<b.length;a++){var c=b[a];c.enumerable=c.enumerable||!1;c.configurable=!0;"value"in c&&(c.writable=!0);Object.defineProperty(d,c.key,c)}}return function(d,b,a){b&&e(d.prototype,b);a&&e(d,a);return d}}();define([],function(){return function(){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");}f(e,null,[{key:"shallowCopy",value:function(d){var b={};if(null!==d&&"object"===("undefined"===typeof d?"undefined":g(d))&&!Array.isArray(d)){for(var a in d)Object.prototype.hasOwnProperty.call(d,
a)&&(b[a]=d[a]);return b}return d}}]);return e}()})},"variableeditor_peer/HeaderMenuMixin":function(){define("variableeditor_peer/HeaderMenuMixin","dijit/Destroyable dojo/_base/declare dojo/_base/lang dojo/on dojo/aspect dojo/dom-class dojo/Deferred dojo/string mw-log/Log mw-menu/ContextMenu mw-menu/MenuItem mw-menu/MenuPanel mw-form/SearchTextField mw-form/Label mw-menu/MenuSeparator variableeditor_client/VariableEditorUtils variableeditor_peer/HeaderMenus/NumericHeaderMenuWidget dojo/i18n!variableeditor_peer/l10n/nls/FilteringHeaderMenu dojo/i18n!variableeditor_peer/l10n/nls/peerarrayviewmodel".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v){return f("variableeditor_peer/HeaderMenuMixin",[],{_COLUMN_HEADER_CLASS:"mw-table-header-wrapper",_ROW_HEADER_CLASS:"mw-table-row-header-container",INITFILTER_ACTION:"InitializeFilterAction",SEARCH_ACTION:"SearchFilterAction",SELECT_ALL_ACTION:"SelectAllAction",CLEAR_ALL_ACTION:"ClearAllAction",EDIT_CHECKBOX_ACTION:"EditCheckboxAction",EDIT_TEXTBOX_ACTION:"EditTextboxAction",_filteredRowCount:0,_totalRowCount:0,_SELECTION_SUMMARY_HEIGHT:"22px",_filteredCountLabel:u.FilteredCountText,
_FILTER_SUMMARY_CLASS:"filteredSummary",_isContextMenuAlive:{},_showHeaderHighlighting:{},_COLUMN_NAME_CLASS:"ColumnNameFooter",constructor:function(){this._isContextMenuAlive={};this._showHeaderHighlighting={}},initHeaderMenu:function(a){var b=this;this._filterManager||(require(["variableeditor_peer/PeerManagerFactory"],function(a){a.start(!0);b._filterManager=a.createManager({channel:"/VE/filter"+b.peerDocument.varDocID,ignoreUpdates:!1});b.managerReadyCallback=e.hitch(b,"_handlePropertySetOnMgr");
b._filterManager.addEventListener("managerReady",b.managerReadyCallback)}),this._embeddedTableDoc={});this.isFilteringEnabled(a.columnIndex)&&!this._embeddedTableDoc[a.columnIndex]&&b._dispatchActionToServer(b.INITFILTER_ACTION,{index:a.columnIndex},null)},_handlePropertySetOnMgr:function(){var a=this._filterManager.getRoot();a.hasProperty("FilterDataSummary")&&this._handleFilteredDataSummaryChange(a.getProperty("FilterDataSummary"));this._filterManager._propertySetListenerOnRoot=e.hitch(this,"_handlePropertySetOnRoot");
a.addEventListener("propertySet",this._filterManager._propertySetListenerOnRoot);this._filterManager.removeEventListener("managerReady",this.managerReadyCallback)},_handlePropertySetOnRoot:function(a){(!a.data||!a.data.newValue||!(a.data.newValue.Source&&"server"!==a.data.newValue.Source))&&"FilterDataSummary"===a.data.key&&this._handleFilteredDataSummaryChange(a.data.newValue)},_handleFilteredDataSummaryChange:function(a){this._totalRowCount=a.OriginalRowCount;this._filteredRowCount=a.FilteredRowCount;
this._selectionFooter&&this._selectionFooter.domNode&&this._updateSelectionFooterSummary()},_updateSelectionFooterSummary:function(){var a=h.substitute(this._filteredCountLabel,{"0":this._filteredRowCount,1:this._totalRowCount});this._selectionFooter.textNode.textContent=a},_createFooterSummary:function(a,b){this._selectionFooter=this._createSelectionSummary();var c=this._createFooterColumnType(b);a.addChild(this._selectionFooter);a.addChild(c)},_createSelectionSummary:function(){var b=h.substitute(this._filteredCountLabel,
{"0":this._filteredRowCount,1:this._totalRowCount}),b=this.createLabel(b);b.domNode.style.height=this._SELECTION_SUMMARY_HEIGHT;b.startup();a.add(b.domNode,this._FILTER_SUMMARY_CLASS);return b},_createFooterColumnType:function(b){b=this.createLabel(b);b.startup();a.add(b.domNode,this._COLUMN_NAME_CLASS);return b},headerMenuRequested:function(c){var d=this.getDataStore()._dataStore._columnModelProperties,e=d[c.columnIndex]["class"],f=d[c.columnIndex].HeaderName,g=this,h=this.createContextMenu();this._addHeaderHighlighting(c.columnIndex);
this._isContextMenuAlive[c.columnIndex]=!0;h.own(h.on("close",function(){g.isFilteringEnabled(c.columnIndex)&&(g._dispatchActionToServer(g.SEARCH_ACTION,{varName:f,searchText:{currentContent:""}},!1),h.removeChild(h.getChildren().filter(function(a){return a.hasOwnProperty("varDocID")})[0]));g._isContextMenuAlive[c.columnIndex]=!1;g.onFilteringDone();h.destroyRecursive();g._removeHeaderHighlighting(c.columnIndex)}));h&&h.own(b.before(this,"blurView",function(){h.close()}));this.createSortMenuItems(h,
e,c);this.isFilteringEnabled(c.columnIndex)?this.createFilteringUIForDataType(h,f,e,c):(a.remove(h.domNode,"sortFilterContextMenu"),this.openMenu(h,c));return h},_addHeaderHighlighting:function(a){this._showHeaderHighlighting[a]=!0;this._updateColumnOnDataStore(a)},_removeHeaderHighlighting:function(a){this._showHeaderHighlighting[a]=!1;this._updateColumnOnDataStore(a)},_updateColumnOnDataStore:function(a){var b=this.getDataStore();b._dataStore&&(b._dataStore._updateColumnConfigs(a,a),b._dataStore._notifyDataStoreOnSingleColumnUpdate(a))},
showHeaderHighlight:function(a){return this._showHeaderHighlighting[a]},createFilteringUIForDataType:function(a,b,c,d){s.isTypeText(c)||s.isGroupingType(c)||"logical"==c?this._createTableFilteringDialog(a,b,d,c):s.isTypeNumeric(c)&&this._createNumericFilteringDialog(a,b,c,d)},_createNumericFilteringDialog:function(c,d,e,f){a.add(c.domNode,"NumericFilterContextMenu");var g=new t({columnName:d,columnClass:e}),h=this,k=f.columnIndex;this.own(b.before(g,"dispatchFilterActionToServer",function(){h.clearAllFilterDocumentBuffers();
h._dispatchActionToServer(h.EDIT_TEXTBOX_ACTION,{index:k},!0)}));c.addChild(g);this.createEmbeddedTable(d,f).then(function(a){if(h._isContextMenuAlive[f.columnIndex]&&!g._beingDestroyed){var b=a.clientPeerView.getDataStore();g.initNumericWidget(a.clientPeerView);b._dataStore.fetchDataFromServer({rows:{start:0,end:0},columns:{start:0,end:Number(a.varSize.split(/[^0-9]/)[1])-1}})}});this._createFooterSummary(c,e);this.openMenu(c,f)},_createTableFilteringDialog:function(b,c,d,e){a.add(b.domNode,"sortFilterContextMenu");
b.addChild(new r);this.createSearchBox(b,c,d);this.createSelectAndClearAllLabels(b,c,d);var f=this;this.createEmbeddedTable(c,d).then(function(a){f._initViewForTable(a);b.addChild(a);f._createFooterSummary(b,e);f._embeddedTableDoc[d.columnIndex]=a;a.own(a.clientPeerView.on("viewUpdated",function(){a.clientPeerView.resize()}));f.openMenu(b,d)})},_initViewForTable:function(a){var b=a.clientPeerView;b.enableCheckboxes(!0);b._setColumnWidth({columnWidth:35});9<Number(a.varSize.split(/[^0-9]/)[0])?a.domNode.setAttribute("style",
"height: 250px"):a.domNode.setAttribute("style","maxHeight: 250px");a.clientPeerView._updateView()},createContextMenu:function(){return new l({targetNodes:[".mwTableHeaderMenuAffordance"]})},createSortMenuItems:function(b,c,d){var e=this,f=this.sortMenuUtils(c,"ascend");a.add(f.domNode,"sort-button");b.addChild(f);f=f.on("click",function(){e._dispatchActionToServer(e.SORT_ACTION,{index:d.columnIndex,order:"ASC"},!0);e.viewContentChanged();b.close()});b.own(f);c=this.sortMenuUtils(c,"descend");a.add(c.domNode,
"sort-button");b.addChild(c);c=c.on("click",function(){e._dispatchActionToServer(e.SORT_ACTION,{index:d.columnIndex,order:"DESC"},!0);e.viewContentChanged();b.close()});b.own(c)},sortMenuUtils:function(a,b){var c=v.numSortTextAsc,d=v.numSortTextDesc,e=v.dtSortTextAsc,f=v.strSortTextAsc,g=v.strSortTextDesc,h=v.dtSortTextDesc;"ascend"===b?(c=s.isTypeText(a)?f:s.isTypeTime(a)?e:c,d="sortAscendingIcon"):(c=s.isTypeText(a)?g:s.isTypeTime(a)?h:d,d="sortDescendingIcon");return this.createMenuItem(c,d)},
createMenuItem:function(a,b){return new m({text:a,icon:b,closeMenuOnClick:!1})},createSearchBox:function(b,c,d){var e=this,f=this.createSearchTextField(d);a.add(f.domNode,"search-textfield");b.addChild(f);f=f.on("typing",function(a){e._embeddedTableDoc[d.columnIndex].clientPeerView.getDataStore()._dataStore._dataBuffer=[];e._dispatchActionToServer(e.SEARCH_ACTION,{varName:c,searchText:a.mwEventData},!1);e._embeddedTableDoc[d.columnIndex].clientPeerView.resize()});b.own(f)},createSearchTextField:function(a){return new n({closeMenuOnClick:!1})},
createSelectAndClearAllLabels:function(b,c,d){var e=this,f=d.columnIndex;c=new p;a.add(c.domNode,"SelectionControls");b.addChild(c);var g=this.createLabel("Select All");a.add(g.domNode,"select-all-label");c.addChild(g);g=g.on("click",function(){var a=e._embeddedTableDoc[d.columnIndex].clientPeerView.getDataStore();a._dataStore._dataBuffer=[];e.clearAllFilterDocumentBuffers();e._dispatchActionToServer(e.EDIT_CHECKBOX_ACTION,{index:f,userAction:"SelectAll",embeddedTableRange:a._currentRange[0]},!0)});
b.own(g);g=this.createLabel("Clear All");a.add(g.domNode,"clear-all-label");c.addChild(g);c=g.on("click",function(){var a=e._embeddedTableDoc[d.columnIndex].clientPeerView.getDataStore();a._dataStore_dataBuffer=[];e.clearAllFilterDocumentBuffers();e._dispatchActionToServer(e.EDIT_CHECKBOX_ACTION,{index:f,userAction:"ClearAll",embeddedTableRange:a._currentRange[0]},!0)});b.own(c)},createLabel:function(a){return new q({text:a})},createEmbeddedTable:function(d,e){var f=this,g=null,h=null,k=e.columnIndex,
l=new c,m=Object.keys(this._filterManager.documents).filter(function(a){return d===f._filterManager.documents[a].varName}).map(function(a){return f._filterManager.documents[a]});0<m.length?l.resolve(m[0]):this._filterManager.addEventListener("variableAdded",g=function(c){m[0]=c.data.peerDoc;a.add(m[0].domNode,"embeddedTable");f._filterManager.removeEventListener("variableAdded",g);m[0].addEventListener("viewAdded",h=function(a){m[0].clientPeerView.setSortable(!1);m[0].own(b.after(m[0].clientPeerView.getDataStore(),
"update",function(){f.clearAllFilterDocumentBuffers();f._dispatchActionToServer(f.EDIT_CHECKBOX_ACTION,{index:k,userAction:"SingleCheckbox"},!0)}));m[0].removeEventListener("viewAdded",h);l.resolve(m[0])})});return l},clearAllFilterDocumentBuffers:function(){for(var a in this._filterManager.documents)this._filterManager.documents[a].clientPeerView.getDataStore()._dataStore._dataBuffer=[]},isFilteringEnabled:function(a){return this.getDataStore()._dataStore.getModelProperty("ColumnModelProperty","IsFilterable",
-1,a)},destroy:function(){this._filterManager&&(this._filterManager.getRoot().removeEventListener("propertySet",this._filterManager._propertySetListenerOnRoot),this._filterManager.destroy())},openMenu:function(a,b){a.open({x:b.left,y:b.top+this._MENU_OFFSET})}})})},"mw-form/SearchTextField":function(){define(["dojo/_base/declare","dojo/keys","dojo/i18n!./l10n/nls/form","mw-mixins/property/PlaceholderMixin","mw-form/TextField"],function(g,f,e,d,b){return g([b,d],{baseClass:"mwWidget mwTextField mwSearchTextField",
placeholder:e.Search,postCreate:function(){this.inherited(arguments);this.clearTextNode=document.createElement("div");this.clearTextNode.classList.add("clearTextContainerNode");this.domNode.insertBefore(this.clearTextNode,this.domNode.firstChild);this._toggleSearchBoxIcon();this.on("typing",this._toggleSearchBoxIcon.bind(this));this.clearTextNode.addEventListener("click",this._handleClearTextNodeClick.bind(this));this.watch("value",this._toggleSearchBoxIcon.bind(this))},_toggleSearchBoxIcon:function(){""===
this.inputNode.value?this.clearTextNode.classList.remove("clearTextIconVisible"):this.clearTextNode.classList.add("clearTextIconVisible")},_handleClearTextNodeClick:function(){this.set("value","");this._triggerTypingEvent("");this._toggleSearchBoxIcon()}})})},"variableeditor_peer/HeaderMenus/NumericHeaderMenuWidget":function(){define("variableeditor_peer/HeaderMenus/NumericHeaderMenuWidget","dijit/_WidgetBase dijit/_TemplatedMixin dojo/_base/declare dojo/_base/lang dojo/dom-class mw-form/Label variableeditor_peer/HeaderMenus/FilteredRangeMixin variableeditor_peer/HeaderMenus/FigureHandlerMixin variableeditor_peer/HeaderMenus/IncludeMissingMixin variableeditor_peer/HeaderMenus/SelectionRangeMixin variableeditor_peer/HeaderMenus/NumericViewColumnConstants variableeditor_peer/TextBoxEditor dojo/text!./NumericHeaderMenu.html".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){return e("variableeditor_peer/HeaderMenus/NumericHeaderMenuMixin",[g,f,c,h,k,l],{templateString:n,_headerMenuView:null,_totalColumnCount:12,_destroyed:!1,_TEXT_FIELD_WIDTH:75,_TEXT_FIELD_HEIGHT:18,_isMenuInteractive:null,_viewUpdateReceived:!1,postCreate:function(){this._headerMenuView=null;this._viewUpdateReceived=this._destroyed=!1;this.createFilteredRangeFields(this.filteredRange);this.createFigureContainer(this.filteredHistogram);this.createSelectionRangeFields(this.selectedRange);
this.createIncludeMissing(this.includeMissing)},initNumericWidget:function(a){this._headerMenuView=a;this._handleViewUpdatedCallBack=d.hitch(this,"_handleViewUpdated");this._handlePeerEventCallBack=d.hitch(this,"_handlePeerEvent");this._headerMenuView.addEventListener("viewUpdated",this._handleViewUpdatedCallBack);this._headerMenuView.peerNode.addEventListener("peerEvent",this._handlePeerEventCallBack);this.initializeFigure(this.filteredHistogram,a.peerNode)},_handlePeerEvent:function(a){"server"===
a.data.source&&("error"===a.data.status&&"dataChangeStatus"===a.data.type)&&this._updateSelectionRangeOnError(a.data.column)},_handleViewUpdated:function(a){"dataChange"===a.data.type&&this.domNode&&(a.data&&a.data.data&&a.data.data[0]?(this._viewUpdateReceived=!0,a=a.target,this._updateFilteredRangeFields(a),this._updateSelectionRangeFields(a),this._updateIncludeMissing(a),this._isInteractive(a)?this._enableFigure(this.filteredHistogram):(this._disableSelectionRangeFields(!0),this._disableFigure(this.filteredHistogram))):
(this._resetFilteredRangeFields(),this._disableSelectionRangeFields(!0),this._resetIncludeMissing(),this._disableFigure(this.filteredHistogram)))},_isInteractive:function(a){if(null==this._isMenuInteractive){var b=a.getLocalCellData(0,m.OriginalMinFullPrecision);a=a.getLocalCellData(0,m.OriginalMaxFullPrecision);b&&a&&(this._isMenuInteractive=this._formatDisplayVal(b)!==this._formatDisplayVal(a))}return this._isMenuInteractive},_updateDataStore:function(a,b){this._headerMenuView.updateDataStore(a,
b);this.dispatchFilterActionToServer()},_createLabel:function(c,d,e){c=new a({text:c});d&&b.add(c.domNode,d);e.appendChild(c.domNode);c.startup();return c},_createTextField:function(a,b){var c={width:this._TEXT_FIELD_WIDTH,height:this._TEXT_FIELD_HEIGHT,preventBlurOnChange:!0};d.mixin(c,a);c=new p(c);b.appendChild(c.getDomNode());c.startup();return c},_formatDisplayVal:function(a){return a[0].value.replace(/["]+/g,"")},dispatchFilterActionToServer:function(){},destroy:function(){this._destroyed||
(this._headerMenuView&&(this._headerMenuView.removeEventListener("viewUpdated",this._handleViewUpdatedCallBack),this._headerMenuView.peerNode.removeEventListener("peerEvent",this._handlePeerEventCallBack)),this.destroySelectionRange(),this.destroyIncludeMissing(),this.destroyFigureHandler(),this.destroyFilteredRange(),this.inherited(arguments),this._destroyed=!0)}})})},"variableeditor_peer/HeaderMenus/FilteredRangeMixin":function(){define("variableeditor_peer/HeaderMenus/FilteredRangeMixin","dojo/_base/declare dojo/dom-construct dojo/string variableeditor_client/VariableEditorUtils variableeditor_peer/HeaderMenus/NumericViewColumnConstants dojo/i18n!variableeditor_peer/l10n/nls/FilteringHeaderMenu".split(" "),
function(g,f,e,d,b,a){return g("variableeditor_peer/HeaderMenus/FilteredRangeMixin",[],{_minVal:"",_maxVal:"",_minValOriginal:"",_maxValOriginal:"",_MIN_LABEL_CLASS:"MinLabel",_MAX_LABEL_CLASS:"MaxLabel",_defaultMissingNotation:"NaN",_minLabelText:a.MinVal,_maxLabelText:a.MaxVal,_minLabelTooltip:a.minValTooltip,_maxLabelTooltip:a.maxValTooltip,createFilteredRangeFields:function(a){this._updateMinMaxValues(this._minValOriginal,this._maxValOriginal);this._minRangeLabel=this._createLabel(this._minVal,
this._MIN_LABEL_CLASS,a);this._maxRangeLabel=this._createLabel(this._maxVal,this._MAX_LABEL_CLASS,a)},_updateToolTips:function(){this._minRangeLabel.domNode.title=this._minLabelTooltip;this._maxRangeLabel.domNode.title=this._maxLabelTooltip},_updateFilteredRangeFields:function(a){var e=a.getLocalCellData(0,b.FilteredMinDispVal);a=a.getLocalCellData(0,b.FilteredMaxDispVal);e&&a&&(this._minValOriginal=this._formatDisplayVal(e),this._maxValOriginal=this._formatDisplayVal(a),e=d.formatNumeric(this._minValOriginal),
a=d.formatNumeric(this._maxValOriginal),this._updateMinMaxValues(e,a),this._minRangeLabel.textNode.textContent=this._minVal,this._maxRangeLabel.textNode.textContent=this._maxVal,this._updateToolTips())},_resetFilteredRangeFields:function(){this._updateMinMaxValues(this._defaultMissingNotation,this._defaultMissingNotation);this._minRangeLabel.textNode.textContent=this._minVal;this._maxRangeLabel.textNode.textContent=this._maxVal},_updateMinMaxValues:function(a,b){this._minVal=e.substitute(this._minLabelText,
{"0":a.toString()});this._maxVal=e.substitute(this._maxLabelText,{"0":b.toString()})},destroyFilteredRange:function(){this._minRangeLabel.destroy();this._maxRangeLabel.destroy()}})})},"variableeditor_peer/HeaderMenus/NumericViewColumnConstants":function(){define("variableeditor_peer/HeaderMenus/NumericViewColumnConstants",[],function(){return{Values:0,OriginalMin:1,OriginalMax:2,FilteredMin:3,FilteredMax:4,IncludeMissing:5,MissingString:6,MissingCount:7,SelectedRangeMin:8,SelectedRangeMax:9,SelectedRangeMinFullPrecision:10,
SelectedRangeMaxFullPrecision:11,FilteredMinDispVal:12,FilteredMaxDispVal:13,rangeMinDispVal:14,rangeMaxDispVal:15,missingCountsDispVal:16,OriginalMinFullPrecision:17,OriginalMaxFullPrecision:18}})},"variableeditor_peer/HeaderMenus/FigureHandlerMixin":function(){define("variableeditor_peer/HeaderMenus/FigureHandlerMixin",["datatoolsservices/Figure/FigureController","dojo/_base/declare","dojo/_base/lang","dojo/dom-class","dojo/dom-construct"],function(g,f,e,d,b){return f("variableeditor_peer/HeaderMenus/FigureHandlerMixin",
[],{_FIGURE_CLASS:"filteredHistogramImg",_listenerAdded:!1,_datatip:null,_FIGURE_MOUSE_MOVE_EVENT:"figuremousemoveHitPosition",_FIGURE_MOUSE_UP_EVENT:"figuremouseupHitPosition",_FIGURE_KEY_UP_EVENT:"figurekeyupKeyPosition",_HIDE_CLASS:"hide",_SHOW_CLASS:"show",_HIGHLIGHT_GRABBER_CLASS:"highlightGrabber",constructor:function(){this._keyUpListener=this._mouseUpListener=this._mouseMoveListener=null},createFigureContainer:function(a,c){var f=a.querySelector(".loading");if(!f){var k=b.create("div",{className:"loading show"});
a.appendChild(k)}c&&(k=new g(c),a.appendChild(k.domNode),k.startup(),this._mouseMoveListener=k.on(this._FIGURE_MOUSE_MOVE_EVENT,e.hitch(this,this._handleMouseMove,k)),this._mouseUpListener=k.on(this._FIGURE_MOUSE_UP_EVENT,this.dispatchFilterActionToServer),this._keyUpListener=k.on(this._FIGURE_KEY_UP_EVENT,this.dispatchFilterActionToServer),d.replace(f,this._HIDE_CLASS,this._SHOW_CLASS),this._viewUpdateReceived||this._disableFigure(a))},_handleMouseMove:function(a,b){d.toggle(a.domNode,this._HIGHLIGHT_GRABBER_CLASS,
b.isOverMaxLine||b.isOverMinLine)},initializeFigure:function(a,b){var d=null;b.hasProperty("CanvasID")?(d=b.getProperty("CanvasID"),this.createFigureContainer(a,d)):(this._propertySetListener=e.hitch(this,this._handlePropertySet,a),b.addEventListener("propertySet",this._propertySetListener),this._listenerAdded=!0)},_handlePropertySet:function(a,b){"CanvasID"===b.data.key&&(this.createFigureContainer(a,b.data.newValue),this._headerMenuView.peerNode.removeEventListener("propertySet",this._propertySetListener),
this._listenerAdded=!1)},_disableFigure:function(a){a=a.getElementsByClassName("loading")[0];d.add(a,"disable")},_enableFigure:function(a){a=a.getElementsByClassName("loading")[0];d.remove(a,"disable")},destroyFigureHandler:function(){this._listenerAdded&&this._headerMenuView.peerNode.removeEventListener("propertySet",this._propertySetListener);this._mouseMoveListener&&(this._mouseMoveListener.remove(),this._mouseUpListener.remove(),this._keyUpListener.remove())}})})},"datatoolsservices/Figure/FigureController":function(){define("datatoolsservices/Figure/FigureController",
"graphics/SceneWidgets/GraphicsView dijit/_WidgetBase dojo/Evented dojo/dom-class dojo/dom-construct dojo/_base/declare dojo/_base/lang datatoolsservices/Figure/FigureChannel datatoolsservices/Figure/KeyConstants mw-messageservice/MessageService".split(" "),function(g,f,e,d,b,a,c,h,k,l){return a("datatoolsservices.Figure.FigureController",[f,e,h],{FIGURE_VIEW_CLASS_NAME:"ddt_figure_view",_sceneWidget:void 0,_canvasID:void 0,_MOUSE_UP_EVENT:"mouseup",_MOUSE_MOVE_EVENT:"mousemove",_MOUSE_DOWN_EVENT:"mousedown",
_MOUSE_ENTER_EVENT:"mouseenter",_MOUSE_LEAVE_EVENT:"mouseleave",_BLUR_EVENT:"blur",_KEY_UP_EVENT:"keyup",_HIT_POSITION:"HitPosition",_KEY_POSITION:"KeyPosition",FIGURE_KEY_UP:"figurekeyup",FIGURE_EVENT_TYPE_PREFIX:"figure",_mouseUpEventFired:!1,constructor:function(a){this._sceneWidget=void 0;this._canvasID=a;this._resetListeners();this._initializeDomNode();a&&this._initializeSceneWidget(a)},_resetListeners:function(){this._handleMouseDownListener=this._handleMouseListener=null;this._handleWindowMouseUpListeners=
[];this._handleKeyUpListener=this._handleHitPositionListener=null},setCanvasID:function(a){this._initializeSceneWidget(a)},_initializeDomNode:function(){this.domNode=b.create("div",{tabIndex:0});d.add(this.domNode,this.FIGURE_VIEW_CLASS_NAME)},_initializeSceneWidget:function(a){this._canvasID=a;var b=new g({Container:this.domNode});b.setInteractionEnabled(!1);b.set("ServerId",a);this.domNode.appendChild(b.domNode);this._sceneWidget=b},startup:function(){this.inherited(arguments);this._sceneWidget.startup();
this._initializeListeners()},_initializeListeners:function(){this._handleMouseListener=c.hitch(this,"_handleMouseEvent");this.domNode.addEventListener(this._MOUSE_UP_EVENT,this._handleMouseListener);this.domNode.addEventListener(this._MOUSE_MOVE_EVENT,this._handleMouseListener);this._handleMouseDownListener=c.hitch(this,"_handleMouseDownEvent");this.domNode.addEventListener(this._MOUSE_DOWN_EVENT,this._handleMouseDownListener);this._handleKeyEventListener=c.hitch(this,"_handleKeyEvent");this.domNode.addEventListener(this._KEY_UP_EVENT,
this._handleKeyEventListener);this._handleMouseAtBoundaryListener=c.hitch(this,"_notifyServer");this.domNode.addEventListener(this._MOUSE_ENTER_EVENT,this._handleMouseAtBoundaryListener);this.domNode.addEventListener(this._MOUSE_LEAVE_EVENT,this._handleMouseAtBoundaryListener);this._handleBlurListener=this._handleBlurEvent.bind(this);this.domNode.addEventListener(this._BLUR_EVENT,this._handleBlurListener);this._initializeMessageServiceListeners()},_handleBlurEvent:function(a){a.target===this.domNode&&
this._notifyServer(a)},_notifyServer:function(a){if(a.type===this._MOUSE_LEAVE_EVENT){var b=this._getViewPortInfo(a);if(b.isLeftRightWithinBounds&&b.isTopBottomWithinBounds)return}l.publish(this.getBaseChannel()+a.type,{})},_initializeMessageServiceListeners:function(){var a=this.getMouseUpChannel(),b=this.getMouseDownChannel(),d=this.getMouseMoveChannel(),e=this.getKeyUpChannel();this._handleHitPositionListener=c.hitch(this,"_handleHitPosition");this._handleKeyUpListener=c.hitch(this,"_handleKeyUp");
l.subscribe(a,this._handleHitPositionListener);l.subscribe(b,this._handleHitPositionListener);l.subscribe(d,this._handleHitPositionListener);l.subscribe(e,this._handleKeyUpListener)},_handleMouseDownEvent:function(a){var b=c.hitch(this,"_handleWindowMouseUp");this._handleWindowMouseUpListeners.push(b);window.addEventListener(this._MOUSE_UP_EVENT,b);this._mouseUpEventFired=!1;this._handleMouseEvent(a)},_handleWindowMouseUp:function(a){this._removeWindowListeners();var b={};b.offsetX=a.offsetX;b.offsetY=
a.offsetY;var c=!1,d=this._getViewPortInfo(a),e=d.boundingPosition;d.isLeftRightWithinBounds?b.clientX=a.clientX:(b.clientX=a.clientX<e.left?e.left:e.left+e.width-1,c=!0);d.isTopBottomWithinBounds?b.clientY=a.clientY:(b.clientY=a.clientY<e.top?e.top:e.top+e.height-1,c=!0);c&&(b.type=this._MOUSE_UP_EVENT,this._handleMouseEvent(b))},_getViewPortInfo:function(a){var b=this.domNode.getBoundingClientRect(),c=b.right-b.left;return{isLeftRightWithinBounds:a.clientX>=b.left&&a.clientX<=b.left+c,isTopBottomWithinBounds:a.clientY>=
b.top&&a.clientY<=b.top+b.height,boundingPosition:b}},_removeWindowListeners:function(){var a=this;this._handleWindowMouseUpListeners.forEach(function(b){window.removeEventListener(a._MOUSE_UP_EVENT,b)});this._handleWindowMouseUpListeners=[]},_handleHitPosition:function(a){if(a&&a.channel&&5<=a.channel.split("/").length&&a.data){var b=a.channel.split("/")[4]+this._HIT_POSITION;this.emit(b,a.data)}},_handleKeyUp:function(){this.emit(this.FIGURE_KEY_UP+this._KEY_POSITION,{})},_handleMouseEvent:function(a){var b=
this._getModifiedMouseEventData(a),c=this.FIGURE_EVENT_TYPE_PREFIX+a.type;a.type===this._MOUSE_UP_EVENT&&(this._mouseUpEventFired=!0);if(a.type===this._MOUSE_MOVE_EVENT&&this._mouseUpEventFired)this._mouseUpEventFired=!1;else{try{this.emit(c,b)}catch(d){}l.publish(this.getBaseChannel()+c,b)}},_getModifiedMouseEventData:function(a){var b=this.domNode.getBoundingClientRect(),c=a.clientX-b.left;a=a.clientY-b.top;return{canvasId:this._canvasID,offsetX:c,offsetY:a,percentageX:c/(b.right-b.left),percentageY:1-
a/(b.bottom-b.top)}},_handleKeyEvent:function(a){var b={canvasId:this._canvasID,code:k[a.keyCode],charCode:a.charCode,key:k[a.keyCode],keyCode:a.keyCode,metaKey:a.metaKey,shiftKey:a.shiftKey,ctrlKey:a.ctrlKey};a=this.FIGURE_EVENT_TYPE_PREFIX+a.type;try{this.emit(a,b)}catch(c){}l.publish(this.getBaseChannel()+a,b)},_notifyServerOnDestroy:function(){l.publish(this.getBaseChannel()+this._MOUSE_LEAVE_EVENT,{eventContext:"destroy"})},destroy:function(){this._sceneWidget&&this._sceneWidget.destroy();this._removeWindowListeners();
this._notifyServerOnDestroy();this.domNode.removeEventListener(this._MOUSE_UP_EVENT,this._handleMouseListener);this.domNode.removeEventListener(this._MOUSE_MOVE_EVENT,this._handleMouseListener);this.domNode.removeEventListener(this._MOUSE_DOWN_EVENT,this._handleMouseDownListener);this.domNode.removeEventListener(this._KEY_UP_EVENT,this._handleKeyEventListener);this.domNode.removeEventListener(this._MOUSE_ENTER_EVENT,this._handleMouseAtBoundaryListener);this.domNode.removeEventListener(this._MOUSE_LEAVE_EVENT,
this._handleMouseAtBoundaryListener);this.domNode.removeEventListener(this._BLUR_EVENT,this._handleBlurListener);l.unsubscribe(this.getMouseUpChannel(),this._handleHitPositionListener);l.unsubscribe(this.getMouseDownChannel(),this._handleHitPositionListener);l.unsubscribe(this.getMouseMoveChannel(),this._handleHitPositionListener);l.unsubscribe(this.getKeyUpChannel(),this._handleKeyUpListener);this.inherited(arguments)}})})},"datatoolsservices/Figure/FigureChannel":function(){define("datatoolsservices/Figure/FigureChannel",
["dojo/_base/declare"],function(g){return g("datatoolsservices/Figure/FigureChannel",[],{_FIGURE_VIEW_CHANNEL_BASE:"/DesktopDataTools/FigureView/",_MOUSE_UP_POSITION_SUFFIX:"/figuremouseup/hitPosition",_MOUSE_DOWN_POSITION_SUFFIX:"/figuremousedown/hitPosition",_MOUSE_MOVE_POSITION_SUFFIX:"/figuremousemove/hitPosition",_KEY_UP_POSITION_SUFFIX:"/figurekeyup/KeyPosition",getMouseUpChannel:function(){return this._FIGURE_VIEW_CHANNEL_BASE+this._canvasID+this._MOUSE_UP_POSITION_SUFFIX},getMouseDownChannel:function(){return this._FIGURE_VIEW_CHANNEL_BASE+
this._canvasID+this._MOUSE_DOWN_POSITION_SUFFIX},getMouseMoveChannel:function(){return this._FIGURE_VIEW_CHANNEL_BASE+this._canvasID+this._MOUSE_MOVE_POSITION_SUFFIX},getKeyUpChannel:function(){return this._FIGURE_VIEW_CHANNEL_BASE+this._canvasID+this._KEY_UP_POSITION_SUFFIX},getBaseChannel:function(){return this._FIGURE_VIEW_CHANNEL_BASE+this._canvasID+"/"}})})},"datatoolsservices/Figure/KeyConstants":function(){define("datatoolsservices/Figure/KeyConstants",[],function(){return{39:"ArrowRight",
37:"ArrowLeft",8:"Backspace",27:"Escape",46:"Delete"}})},"variableeditor_peer/HeaderMenus/IncludeMissingMixin":function(){define("variableeditor_peer/HeaderMenus/IncludeMissingMixin","dojo/_base/declare dojo/_base/lang dojo/dom-class dojo/string mw-form/CheckBox variableeditor_peer/HeaderMenus/NumericViewColumnConstants dojo/i18n!variableeditor_peer/l10n/nls/FilteringHeaderMenu".split(" "),function(g,f,e,d,b,a,c){return g("variableeditor_peer/HeaderMenus/IncludeMissingMixin",[],{_INCLUDE_MISSING_CLASS:"IncludeMissingLabel",
_HIDE_SECTION_CLASS:"HideSection",_SINGLE_COL_CLASS:"single",_DOUBLE_COL_CLASS:"double",_missingRows:"0",_includeMissingText:c.IncludeMissingText,_defaultMissingNotation:"NaN",_INCLUDE_MISSING_CUTOFF:9999999,createIncludeMissing:function(a){if(this.hasIncludeMissing()){this._checkboxIndicator=this._createCheckbox(a,!0);var b=d.substitute(this._includeMissingText,{"0":this._defaultMissingNotation,1:this._missingRows});this._includeMissingLabel=this._createLabel(b,this._INCLUDE_MISSING_CLASS,a)}else e.add(a,
this._HIDE_SECTION_CLASS)},_updateIncludeMissing:function(b){if(this.hasIncludeMissing()){var c=b.getLocalCellData(0,a.MissingString),e=b.getLocalCellData(0,a.missingCountsDispVal);b=b.getLocalCellData(0,a.IncludeMissing);e&&(c=c[0].value,e=this._formatDisplayVal(e),parseInt(e)>this._INCLUDE_MISSING_CUTOFF&&(e=parseInt(e).toExponential(3)),b=this._formatDisplayVal(b),e=d.substitute(this._includeMissingText,{"0":c,1:e.toString()}),this._includeMissingLabel.textNode.textContent=e,this._checkboxIndicator.set("disabled",
!1),this._checkboxIndicator.set("checked",Number(b)))}},_resetIncludeMissing:function(){if(this.hasIncludeMissing()){var a=d.substitute(this._includeMissingText,{"0":this._defaultMissingNotation,1:this._missingRows});this._includeMissingLabel.textNode.textContent=a;this._checkboxIndicator.set("disabled",!0)}},_createCheckbox:function(a,c){var d=new b;a.appendChild(d.domNode);d.startup();d.set("disabled",c);this._handleCheckBoxChangeListener=d.on("change",f.hitch(this,f.hitch(this._handleCheckBoxChange)));
return d},_handleCheckBoxChange:function(b){var c=a.IncludeMissing;this._updateDataStore({rows:{start:0,end:0,count:1},columns:{start:c,end:c,count:1}},[[b.mwEventData.newValue?"1":"0"]]);b.stopPropagation()},hasIncludeMissing:function(){return this.columnClass===this._DOUBLE_COL_CLASS||this.columnClass===this._SINGLE_COL_CLASS},destroyIncludeMissing:function(){this.hasIncludeMissing()&&(this._handleCheckBoxChangeListener&&this._handleCheckBoxChangeListener.remove(),this._includeMissingLabel.destroy(),
this._checkboxIndicator.destroy())}})})},"variableeditor_peer/HeaderMenus/SelectionRangeMixin":function(){define("variableeditor_peer/HeaderMenus/SelectionRangeMixin","dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-class variableeditor_client/VariableEditorUtils variableeditor_peer/HeaderMenus/NumericViewColumnConstants dojo/i18n!variableeditor_peer/l10n/nls/FilteringHeaderMenu".split(" "),function(g,f,e,d,b,a,c){return g("variableeditor_peer/HeaderMenus/SelectionRangeMixin",[],{_SELECTION_MIN_ID:"SelectedRangeMin",
_SELECTION_MAX_ID:"SelectedRangeMax",_SELECTED_MIN_RANGE_CLASS:"SelectedMinRange",_SELECTED_MAX_RANGE_CLASS:"SelectedMaxRange",_EDITED_CLASS:"edited",_MIN_TEXT_ENABLED_CLASS:"MinEnabled",_MAX_TEXT_ENABLED_CLASS:"MaxEnabled",_TEXT_WIDTH:104,_TEXT_HEIGHT:22,_aspectHandles:[],_selectedMinTooltip:c.selectedMinValTooltip,_selectedMaxTooltip:c.selectedMaxValTooltip,constructor:function(){this._aspectHandles=[];this._selectionMaxRangeText=this._selectionMinRangeText=null},createSelectionRangeFields:function(a){this._selectionMinRangeText=
this._createTextField({classList:this._SELECTED_MIN_RANGE_CLASS,selectionProp:this._SELECTION_MIN_ID,width:this._TEXT_WIDTH,height:this._TEXT_HEIGHT},a);this._selectionMaxRangeText=this._createTextField({classList:this._SELECTED_MAX_RANGE_CLASS,selectionProp:this._SELECTION_MAX_ID,width:this._TEXT_WIDTH,height:this._TEXT_HEIGHT},a);this._aspectHandles.push(e.after(this._selectionMinRangeText,"valueChanged",f.hitch(this,"_handleTextFieldChanged",this._selectionMinRangeText)));this._aspectHandles.push(e.after(this._selectionMaxRangeText,
"valueChanged",f.hitch(this,"_handleTextFieldChanged",this._selectionMaxRangeText)));this._disableSelectionRangeFields(!0)},_handleTextFieldChanged:function(b,c,d){c=b.args.selectionProp;b.getDomNode();c=a[c];this._updateDataStore({rows:{start:0,end:0,count:1},columns:{start:c,end:c,count:1}},[[d[0].newValue||b.args.previousValue]])},_updateSelectionRangeFields:function(c){var d=c.getLocalCellData(0,a.rangeMinDispVal),e=c.getLocalCellData(0,a.rangeMaxDispVal),f=c.getLocalCellData(0,a.SelectedRangeMinFullPrecision),
g=c.getLocalCellData(0,a.SelectedRangeMaxFullPrecision);if(d){this._setOriginalValue(this._selectionMinRangeText,a.OriginalMinFullPrecision,c);this._setOriginalValue(this._selectionMaxRangeText,a.OriginalMaxFullPrecision,c);c=this._formatDisplayVal(d);var e=this._formatDisplayVal(e),f=this._formatDisplayVal(f),g=this._formatDisplayVal(g),d=b.formatNumeric(c),n=b.formatNumeric(e);(this._selectionMinRangeText.args.previousValue!==c||d!==this._selectionMinRangeText.getValue("value"))&&this._updateSelectionRange(d,
f,c,this._selectionMinRangeText,this._MIN_TEXT_ENABLED_CLASS);(this._selectionMaxRangeText.args.previousValue!==e||n!==this._selectionMaxRangeText.getValue("value"))&&this._updateSelectionRange(n,g,e,this._selectionMaxRangeText,this._MAX_TEXT_ENABLED_CLASS);this._disableSelectionRangeFields(!1);this._updateTextBoxToolTips()}},_updateTextBoxToolTips:function(){this._selectionMinRangeText.setValue("title",this._selectedMinTooltip);this._selectionMaxRangeText.setValue("title",this._selectedMaxTooltip)},
_setOriginalValue:function(a,b,c){a.originalValue||(b=c.getLocalCellData(0,b),b=this._formatDisplayVal(b),a.originalValue="Inf"===b||"-Inf"===b?b:parseFloat(b).toString())},_updateSelectionRange:function(a,b,c,d,e){b="Inf"===b||"-Inf"===b?b:parseFloat(b).toString();d.setArgs({previousValue:c,previousEditValue:b});d.setValue("value",a);d.setValue("editValue",b);d.setValue("class",e)},_disableSelectionRangeFields:function(a){this._selectionMaxRangeText.setValue("disabled",a);this._selectionMinRangeText.setValue("disabled",
a)},_updateSelectionRangeOnError:function(c){c=c===a.SelectedRangeMin?this._selectionMinRangeText:this._selectionMaxRangeText;var d=b.formatNumeric(c.args.previousValue),e=c.args.previousEditValue;c.setValue("value",d);c.setValue("editValue",e)},destroySelectionRange:function(){this._aspectHandles.forEach(function(a){a.remove()});this._selectionMinRangeText.destroy();this._selectionMaxRangeText.destroy()}})})},"variableeditor_peer/TextBoxEditor":function(){define("datatoolsservices/DataToolsUtils dojo/_base/declare dojo/aspect dojo/on dojo/_base/lang dojo/dom-class mw-form/TextField variableeditor_client/VariableEditorUtils".split(" "),
function(g,f,e,d,b,a,c,h){return f(null,{_editing:!1,value:"",editValue:"",previousValue:"",previousEditValue:"",originalValue:null,_TEXT_BOX_CLASSNAME:"veTextField",_EDITED_CLASS:"edited",constructor:function(a){this.args=a;this.width=a.width||"auto";this.height=a.height||"auto";this.textField=null;this.preventBlurOnChange=a.preventBlurOnChange||!1;this._init()},setArgs:function(a){0<Object.keys(a).length&&b.mixin(this.args,a)},_init:function(){this.textField=new c({width:this.width,height:this.height});
this._initListeners();this.args.classList&&a.add(this.textField.domNode,this.args.classList);a.add(this.textField.domNode,this._TEXT_BOX_CLASSNAME)},handleDrag:function(a){a.preventDefault()},handleMouseDown:function(a){var b=this.textField,c=this.getValue("editValue");b.inputNode.value=c;this._editing||(b.inputNode.select(),a.preventDefault())},handleMouseUp:function(a){this._editing||(a.preventDefault(),this._editing=!0)},handleBlur:function(){var a=this.textField,b=this.value||this.getValue("value");
h.isIELikeBrowser()&&g.clearAllSelection(a.inputNode);a.inputNode.value=b;this._editing=!1},getDomNode:function(){return this.textField.domNode},_initListeners:function(){this._mouseDownListener=this.textField.on("mousedown",b.hitch(this,"handleMouseDown"));this._mouseUpListener=this.textField.on("mouseup",b.hitch(this,"handleMouseUp"));this._dragStartListener=this.textField.on("dragstart",b.hitch(this,"handleDrag"));this._onBlurListener=e.after(this.textField,"onBlur",b.hitch(this,"handleBlur"));
this._onChangeListener=this.textField.on("change",b.hitch(this,"handleChange"))},handleChange:function(a){this.preventBlurOnChange&&a.stopPropagation();var b=a.mwEventData;this.getValue("editValue")!==b.newValue&&this.args.previousValue!==b.newValue&&this.valueChanged(a.mwEventData)},valueChanged:function(a){this.value=a.newValue},startup:function(){this.textField.startup()},setValue:function(a,b){this.textField.set(a,b);this[a]=b;"editValue"===a&&this._handleEditState()},_handleEditState:function(){a.toggle(this.textField.domNode,
this._EDITED_CLASS,this.editValue!==this.originalValue)},getValue:function(a){return this.textField.get(a)},destroy:function(){this.textField.destroy();this._mouseDownListener.remove();this._mouseUpListener.remove();this._dragStartListener.remove();this._onBlurListener.remove();this._onChangeListener.remove()}})})},"variableeditor_client/ColumnWidthSizingPlugin":function(){define([],function(){function g(f){this.adaptor=f.adaptor;Object.defineProperty(this,"emits",{get:function(){return[]}});this.exposedAPI=
function(){return{setRowHeight:this.setRowHeight.bind(this),setColumnWidth:this.setColumnWidth.bind(this)}};this.setRowHeight=function(e){this.adaptor.setDefaultRowHeight(e)};this.setColumnWidth=function(e){this.adaptor.setDefaultColumnWidth(e)}}g.prototype.constructor=g;Object.defineProperty(g,"adaptor",{get:function(){return"SizingAdaptor"}});return g})},"variableeditor_peer/PeerPopoutHandlerWidget":function(){define("dojo/_base/declare dojo/dom-class dojo/dom-construct dojo/on dojo/query dojo/dom-style variableeditor_peer/VariableEditorPopoutHandlerWidget".split(" "),
function(g,f,e,d,b,a,c){var h={};return g("variableeditor_peer.PeerPopoutHandlerWidget",[c],{width:600,height:400,defaultChannel:"/VariableEditor",testID:"veTestPopoutDialog",className:"vePopoutDialog",contentClassName:"vePopoutDialogContent",_SCALING_FACTOR_HEIGHT:22,_SCALING_FACTOR_CLASS:"hasScalingFactor",_SCALING_FACTOR_PROP:"ScalingFactor",constructor:function(a){this.title=a.title||"";this.ID=this.docID=a.docID||"";this.channel=a.channel||this.defaultChannel;this.createNewDialog=!0;this._initialized=
!1},init:function(){if(h[this.docID])this.createNewDialog=!1;else{this.inherited(arguments);var a=this._getClientDocument();if(!this._containerBuilt&&a){this._constructContainer(this.docID,a.domNode);if(a.viewAdded){var b=a.clientPeerView.peerNode;b&&b.hasProperty(this._SCALING_FACTOR_PROP)&&(this._handleScalingFactor(b),a.allArgs.reduceFixedHeight=this._SCALING_FACTOR_HEIGHT,f.add(this.domNode,this._SCALING_FACTOR_CLASS))}a.showSummaryBar&&e.destroy(a.summaryBar.domNode);this._initResize(a)}h[this.docID]=
!0}var c=this;d(this.domNode,"dialogShown",function(a){(a=c._getClientDocument())&&c._emitStartup(a)})},_emitStartup:function(a){this.inherited(arguments);this._initialized||this._initResize(a);this._resizeDocument(a)},_addScalingFactorToDom:function(a){var c=b(this._WRAPPER_SELECTOR_CLASS,this.domNode)[0];e.place(a,c,"first")},_initResize:function(a){a.resizeBehaviour="container";if(a.clientPeerView&&a.clientPeerView.peerNode){if(this._sizeExists(a))a.resize();else{var b=this;a.clientPeerView.peerNode.addEventListener("propertySet",
function(c){c.data&&("Size"===c.data.key&&b._sizeExists(a))&&a.resize()})}this._initialized=!0}},_getClientDocument:function(){return this.manager.documents&&this.manager.documents[this.docID]?this.manager.documents[this.docID]:null},_sizeExists:function(a){a=a.clientPeerView.peerNode;return a.hasProperty("Size")&&0<a.getProperty("Size").rowCount},resize:function(){var a=this._getClientDocument();a&&a.resize&&a.resize()},close:function(){this.manager.closeVariable(this.docID,this.workspace);delete h[this.docID]}})})},
"variableeditor_peer/VariableEditorPopoutHandlerWidget":function(){define("variableeditor_peer/VariableEditorPopoutHandlerWidget","dojo/_base/declare dojo/_base/lang dijit/_WidgetBase mw-messageservice/MessageService mw-remote/Remote dojo/dom dojo/on dojo/dom-class dojo/dom-construct dojo/query dojo/io-query".split(" "),function(g,f,e,d,b,a,c,h,k,l,m){return g([e],{_SCALING_FACTOR:"10",_MULTIPLIER:" \u00d7",_SCALING_FACTOR_HEIGHT:17,_WRAPPER_SELECTOR_CLASS:".popoutWrapper",constructor:function(a){this.manager=
null;this._containerBuilt=!1;this.workspace=a&&a.workspace?a.workspace:"base"},postCreate:function(){this.init()},init:function(){var a=this;require(["variableeditor_peer/PeerManagerFactory"],function(b){var c=d.messageService;c.start();b.start(!0);var e=a.getQueryParams();a.channel=e&&e.channel?e.channel:a.channel;a.channel&&"/"!==a.channel.charAt(0)&&(a.channel="/"+a.channel);a.docID=e&&e.docId?e.docId:a.docID;a.workspace=e&&e.workspace?e.workspace:a.workspace;b=b.createManager({messageService:c,
channel:a.channel,ignoreUpdates:!1,editable:!0,cssSpecifier:"singleVariableVE",resizeBehaviour:"window",showSummaryBar:!1,workspace:a.workspace});a.manager=b;b.addEventListener("variableAdded",function(b){var c=b.data.peerDoc;a.docID&&c.varDocID===a.docID&&(c.addEventListener("viewAdded",function(b){b=b.data.peerView;b.setSortable(!1);a._emitStartup(c);b&&(b.peerNode&&b.peerNode.hasProperty("ScalingFactor"))&&(a._handleScalingFactor(b.peerNode),c.allArgs.reduceFixedHeight=a._SCALING_FACTOR_HEIGHT,
a._resizeDocument(c))}),a._constructContainer(c.varDocID,c.domNode))});b.documents[a.docID]&&b.documents[a.docID].clientPeerView.setSortable(!1);b.addEventListener("variableRemoved",function(b){b.data.peerDoc&&a.destroyWidget(b.data.peerDoc)})})},_handleScalingFactor:function(a){a=a.getProperty("ScalingFactor");this._appendScalingFactor(a)},_resizeDocument:function(a){a.resize&&a.resize()},_appendScalingFactor:function(a){var b=this._constructElement("veScalingFactor",this._SCALING_FACTOR,"block");
a=this._constructElement("scaleExponent",a);var c=this._constructElement("multiply",this._MULTIPLIER);b.appendChild(a);b.appendChild(c);this._addScalingFactorToDom(b)},_addScalingFactorToDom:function(a){var b=l(this._WRAPPER_SELECTOR_CLASS)[0];k.place(a,b,"first")},_constructElement:function(a,b,c){c=document.createElement("block"===c?"div":"span");h.add(c,a);c.innerText=b;return c},destroyWidget:function(a){a.varDocID===this.docID&&(this&&this.domNode)&&this.destroy()},_emitStartup:function(a){c.emit(a.domNode,
"startup",{bubbles:!0,cancelable:!0})},_constructContainer:function(b,c){if(!this._containerBuilt){var d=k.create("div",{style:"overflow: hidden; left: 0px; top: 0px; height: 100%; width: 100%; display: inline-block;",id:"variable_div_"+b});h.add(d,"popoutWrapper");k.place(c,d,"last");k.place(d,this.domNode,"last");var e=a.byId("PopOutHandlerBody");e&&k.place(d,e,"last");this._containerBuilt=!0}},getQueryParams:function(){var a={};try{a=m.queryToObject(decodeURIComponent(dojo.doc.location.search.slice(1)))}catch(b){}return a}})})},
"liveeditor/plugin/variableeditor/InteractiveVariableOutput":function(){define("dojo/_base/declare dojo/_base/event dojo/_base/lang dojo/aspect dojo/dom-construct dojo/dom-class dojo/on dojo/query dijit/registry liveeditor/plugin/variableeditor/ExportDataHandler liveeditor/plugin/variableeditor/InteractiveVariableOutputUtils liveeditor/plugin/variableeditor/InteractiveVariablePromptController liveeditor/plugin/variableeditor/InteractiveVariableRunScriptPromptController MW/rtc/events/MouseEventUtil MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseOutput MW/rtc/plugins/embeddedoutputs/EmbeddedOutputsUtilities mw-gesture/GestureDetector mw-gesture/GestureRegistry mw-html-utils/HtmlUtils mw-log/Log mw-string-utils/StringUtils variableeditor_client/Manager variableeditor_peer/PeerManagerFactory variableeditor_client/VariableEditorUtils liveeditor/plugin/variableeditor/LiveEditorCodePublishService variableeditor_client/TableClassConstants dojo/i18n!liveeditor/l10n/nls/interactiveVariableOutput".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x,y,B,D,E,F,I){return g([r,l],{_TABLEVIEW_ROW_COUNT:9,_TABLEVIEW_COLUMN_COUNT:7,_TABLEVIEW_EXPORT_ROW_COUNT:100,_TABLEVIEW_EXPORT_COLUMN_COUNT:100,_TABLE_TYPE:"table",_TIME_TABLE_TYPE:"timetable",_TIMES_SYMBOL:"\u00d7",_VERTICAL_ELLIPSIS_UC:"\u22ee",_MIDLINE_HORIZONTAL_ELLIPSIS_UC:"\u22ef",_CODEGEN_MINWIDTH:200,type:"interactiveVariable",currentSize:{},constructor:function(a){this._data=a.data;this._outputMetaData=a.outputMetaData;this._editorId=a.editorId;
this._documentView=a.view;this._showSummaryBar=!0;this._exportReady=!1;this._requestedRange=null;this._gestureHandlerInitialized=this._outputInitialized=!1;this._ve_channel=this._data.ve_channel;this._viewUpdatedListener=this._viewAddedListener=null;this._stateHandler=a.stateHandler;this._data.value&&this._data.value.slice&&(this._valueStringData=this._data.value.slice());this.currentSize={};this._data.rows&&this._data.columns&&(this._data.varSize=this._data.rows+this._TIMES_SYMBOL+this._data.columns);
this._data.varType=this._data.subtype;this._isSaveLoad()||(this._aspectHandles=[],this._embeddedOutputsView=a.embeddedOutputsView,this._currentoutputservice=a.currentOutputService,this._aspectHandles.push(d.after(this._currentoutputservice,"onOutputSelected",e.hitch(this,"_handleOutputSelectionChanges"),!0)),a.data.metadata&&(this._data.groupedColumns=m.getGroupedColumnsFromServerData(a.data.metadata)));this._createVariableDocument();this._domElement=this._createDomElement();this._promptController=
this._createPromptController();this._setPromptControllerTarget();this._interactiveVariablePopoutHandler=a.interactiveVariablePopoutHandler;this._codeGenFactory=a.CodeGenFactory;this._codePublishService=null;this._outputsModel=a.outputsModel;this._document=a.document;this.setCurrentSize(0,this._data.rows-1,0,this._data.columns-1)},_handleOutputSelectionChanges:function(){},_handleOutputFocusChanged:function(){},_createVariableDocument:function(){this._varDoc=this.createInteractiveVariableDocument()},
getCssTag:function(){return this._CSS_TAG},getDomElement:function(){return this._domElement},getClientDocument:function(){return this._varDoc.domNode},callScrollableOutputStyler:function(){},getSerializableData:function(){var a={savedData:this._data.savedData?this._data.savedData:this._data.savedPrepopulatedData,header:this._data.header,name:this._data.name,varSize:this._data.varSize||this._data.rows+this._TIMES_SYMBOL+this._data.columns,rows:this._data.rows,columns:this._data.columns,metadata:this._data.metadata,
varType:this._data.varType||this._data.subtype,value:this._valueStringData?this._valueStringData:this._data.value,truncationInfo:this._data.truncationInfo,type:this._data.subtype};this._data.exponent&&"1"!=this._data.exponent&&(a.exponent=this._data.exponent);"logical"!=this._data.type&&(a.subtype=this._data.subtype);this._data.columnWidth&&(a.columnWidth=this._data.columnWidth);Array.isArray(a.metadata)&&(a.metadata={});if("table"===this._data.subtype||"timetable"===this._data.subtype){if(!this._data.metadata.ColumnModelProperties||
this._data.metadata.ColumnModelProperties&&0===this._data.metadata.ColumnModelProperties.length){for(var b=[],c=0;c<this._data.columnClass.length;c++)b[c]={IsSortable:this._data.isSortable[c],IsFilterable:this._data.isFilterable[c],GroupColumnSize:this._data.groupedColumns[c],"class":this._data.columnClass[c],HeaderName:this._data.columnHeaderLabels[c]};a.metadata.ColumnModelProperties=JSON.stringify(b)}if((!this._data.metadata.RowModelProperties||this._data.metadata.RowModelProperties&&0===this._data.metadata.RowModelProperties.length)&&
this._data.rowHeaderLabels){b=[];for(c=0;c<this._data.rowHeaderLabels.length;c++)b[c]={RowName:this._data.rowHeaderLabels[c]};a.metadata.RowModelProperties=JSON.stringify(b)}}return a},updateCssClass:function(b){if(b){var c=this;b.getView?b.getView().then(function(d){(d=d._dataStore.dataSize)&&(d.rows&&d.rows.count>=c._TABLEVIEW_ROW_COUNT)&&a.add(b.domNode,"constrictHeight")}):b.data&&b.data.length>=c._TABLEVIEW_ROW_COUNT&&a.add(b.domNode,"constrictHeight")}},_attachListeners:function(a){a.viewAdded?
this._attachViewUpdatedListener(a.clientPeerView):a.addEventListener("viewAdded",this._handleViewAddedCallback,this);this._documentView&&this._documentView.onResize&&(this._onResizeListener=d.after(this._documentView,"onResize",e.hitch(this,function(b){a.clientPeerView&&a.clientPeerView.resize&&a.clientPeerView.resize();this._codeGenerator&&this.checkToHideCodegen()})));this._stateHandler&&this._stateHandler.attachListener(this._stateHandler.CHANGE_TYPE_ENUM.EVAL_INITIALIZED,e.hitch(this,"_handleEvaluationStart"))},
_handleEvaluationStart:function(){var a=this._varDoc.clientPeerView;a.id&&a.blurView&&a.blurView()},checkToHideCodegen:function(){var a=this._domElement.offsetWidth;this._CODEGEN_MINWIDTH>=a&&0<a?this._codeGenerator.disable():this._codeGenerator.enable()},_attachViewUpdatedListener:function(a){a.addEventListener("viewUpdated",this._handleViewUpdatedCallback,this);this._viewUpdatedListener=!0},_handleViewAddedCallback:function(a){a.data.peerView&&(this._attachViewUpdatedListener(a.data.peerView),this._varDoc&&
this._varDoc.removeEventListener&&this._varDoc.removeEventListener("viewAdded",this._handleViewAddedCallback,this))},_handleViewUpdatedCallback:function(a){var b=this._varDoc.clientPeerView;b&&(this._outputInitialized||(this._initializeCodePublishing(b.peerNode._id),this._constructSaveObject(a,{varName:b.varName,varSize:b.varSize||b.peerDocument&&b.peerDocument.varSize,varType:b.varType},this._data),this._prefetchDataForExport(b),this._outputInitialized=!0),"dataChange"==a.data.type&&this._requestedRange&&
this._requestedRange.rows&&this._requestedRange.columns&&a.data.data&&a.data.data.length===this._requestedRange.rows.end+1&&a.data.data[0].length===this._requestedRange.columns.end+1?(this._exportReady=!0,this._requestedRange=null):"sizeChange"==a.data.type&&this._handleSizeChanged(a))},_prefetchDataForExport:function(a){this._getDataFromBuffer(a)},_addGestureHandler:function(){var a=this._varDoc.clientPeerView;a&&a._table&&(a=h(F.TABLE_COMPONENT_QUERY_CLASS,a._table.domNode),this._gestureDetector=
this._getGestureDetectorInstance(a[0]),this._addGestureHandlerForDownEvent())},_addGestureHandlerForDownEvent:function(){this._gestureDetector.add(u.tapmove({options:{numTaps:0},callbacks:{began:e.hitch(this,function(a){var b=h(F.TABLE_HEADER_COMPONENT_QUERY_CLASS,this._varDoc.clientPeerView._table.domNode);a=a.srcEvent;(q.isEventInScrollbarTrack(a)||b[0].contains(a.target))&&f.stop(a)})}}))},_initializeCodePublishing:function(a){null===this._codePublishService&&(this._codePublishService=new E({executionService:this,
context:a,document:this._document}))},_getGestureDetectorInstance:function(a){return new t(a)},_isDataBufferSufficient:function(a){var b=this.currentSize,c=b.rows.end,b=b.columns.end;a=a.getPeerDataStore();c={rows:{start:0,end:Math.min(c,this._TABLEVIEW_EXPORT_ROW_COUNT-1)},columns:{start:0,end:Math.min(b,this._TABLEVIEW_EXPORT_COLUMN_COUNT-1)}};return a.dataStoreHasSufficientTopLeftData(c)},_getDataFromBuffer:function(a){var b=this.currentSize,c=b.rows.end,b=b.columns.end;this._isDataBufferSufficient(a)?
this._exportReady=!0:(this._requestedRange=c={rows:{start:0,end:Math.min(this._TABLEVIEW_EXPORT_ROW_COUNT-1,c)},columns:{start:0,end:Math.min(this._TABLEVIEW_EXPORT_COLUMN_COUNT-1,b)}},a.getPeerDataStore().fetchDataFromServer(c))},setCurrentSize:function(a,b,c,d){this.currentSize.rows={start:a,end:b};this.currentSize.columns={start:c,end:d}},_createPromptController:function(){return this._outputMetaData&&this._outputMetaData.evaluationId&&s.LOADED_FROM_DISK_EVALUATION_ID===this._outputMetaData.evaluationId?
this._createRunScriptPromptController():this._applyPromptController()},_createRunScriptPromptController:function(){return new n},_createPromptControllerInstance:function(){return new p},_applyPromptController:function(){var a=this._createPromptControllerInstance();a.addInteractionListener(e.hitch(this,"_openCallback"));return a},_openCallback:function(){var a=this._getPopoutCreationArgs();this._interactiveVariablePopoutHandler.launchPopout(a)},_getPopoutCreationArgs:function(a){return{docid:this._data.doc_id}},
_constructSaveObject:function(a,b){b&&b.varName&&(this._data.varName=b.varName);b&&b.varSize&&(this._data.varSize=b.varSize);b&&b.varType&&(this._data.varType=b.varType);b&&b.rows&&(this._data.rows=b.rows);b&&b.columns&&(this._data.columns=b.columns);if("dataChange"===a.data.type&&!this._data.savedData)a.data.data.forEach(function(a){a.forEach(function(a){a[0].editValue&&delete a[0].editValue;a[0].isMetaData&&"0"===a[0].isMetaData&&delete a[0].isMetaData})}),this._data.savedData=JSON.stringify(a.data.data);
else if("sizeChange"===a.data.type){var c=a.data.size;this._data.rows=c.rows.count;this._data.columns=c.columns.count}else"metaDataChange"===a.data.type&&(this._data.metadata=a.data.data,this._cleanSavedData(this._data.metadata))},startup:function(){c.emit(this.getClientDocument(),"startup",{bubbles:!0,cancelable:!0})},_initializeGestureHandler:function(){this._gestureHandlerInitialized||(this._addGestureHandler(),this._gestureHandlerInitialized=!0)},getTableData:function(){var a=[],b=this._getExportObject(),
c=b.headers?b.headers.slice():[],d=b.data?b.data.slice():[],e=b.rowHeaders?b.rowHeaders.slice():[],f=b.columnSpan?b.columnSpan.slice():[],b=this._getColumnCount(f,b.columnCount);0<c.length&&(c.unshift(" "),a.push(c));d.forEach(function(a,b){var c=this._getRowHeaderLabel(e,b);a.unshift(c)},this);f.unshift(1);a=a.concat(d);return{data:a,colSpan:f,columnCount:b}},_getRowHeaderLabel:function(a,b){var c=String(b+1);0<a.length&&a[b]&&(c+=" "+a[b]);return c},_getColumnCount:function(a,b){var c=b+1;a&&a.forEach(function(a){1<
a&&(c+=a-1)});return c},getVariableType:function(){return this._varDoc.varType},_getValueString:function(){return this._data.value?this._data.value:""},isTypeTable:function(){var a=this._data.subtype?this._data.subtype:this._varDoc&&this._varDoc.varType?this._varDoc.varType:"";return a===this._TABLE_TYPE||a===this._TIME_TABLE_TYPE},_isSaveLoadUseCase:function(){return this._outputMetaData&&this._outputMetaData.evaluationId&&s.LOADED_FROM_DISK_EVALUATION_ID===this._outputMetaData.evaluationId},_createName:function(a){return v.treatHtmlLikeCommandWindow(a)+
" \x3d "},_createText:function(a){a=x.normalizeNewlines(a);return a=v.treatHtmlLikeCommandWindow(a)},_createDomElement:function(){var a=b.create("div");b.place(this._varDoc.domNode,a);this._updateNodeStyles(a);return a},_updateNodeStyles:function(){},createInteractiveVariableDocument:function(){var a=null;this._isSaveLoad()?a=this._loadDataFromSavedObject():(a=this.buildInteractiveVariableDocument(),this._addOverlay(a));this._attachListeners(a);this.updateCssClass(a);return a},_addOverlay:function(a){a._addOverlay()},
_getPromptControllerTargetNode:function(){return this._varDoc.domNode},_setPromptControllerTarget:function(){var a=this._getPromptControllerTargetNode();a&&this._promptController&&this._promptController.setTarget(a)},_loadDataFromSavedObject:function(){var a=this._getManagerInstance({editable:!1});this._data.isSortable=this._data.metadata&&this._data.metadata.ColumnModelProperties?m.getPropValueFromModelProps(this._data.metadata.ColumnModelProperties,"isSortable"):[];this._data.isFilterable=this._data.metadata&&
this._data.metadata.ColumnModelProperties?m.getPropValueFromModelProps(this._data.metadata.ColumnModelProperties,"isFilterable"):[];var b=this._data.metadata&&this._data.metadata.ColumnModelProperties?m.getPropValueFromModelProps(this._data.metadata.ColumnModelProperties,"HeaderName"):this._data.columnHeaderLabels,b=m.getColumnConfig(b,this._data),c=this._data.metadata&&this._data.metadata.RowModelProperties?m.getPropValueFromModelProps(this._data.metadata.RowModelProperties,"RowName"):[],c=m.getRowConfig(c);
try{return a.openDocument("",{data:this._data.savedData?JSON.parse(this._data.savedData):this._data.savedPrepopulatedData?JSON.parse(this._data.savedPrepopulatedData):[],columnData:b,rowData:c,varName:this._data.name,varSize:this._data.varSize,varType:this._data.varType?this._data.varType:this._data.subtype?this._data.subtype:this._data.type,viewType:D.getViewTypeForLoad(this._data.subtype)})}catch(d){}},_isSaveLoad:function(){return this._outputMetaData&&this._outputMetaData.evaluationId&&s.LOADED_FROM_DISK_EVALUATION_ID===
this._outputMetaData.evaluationId},_getManagerInstance:function(a){return new y(a)},buildInteractiveVariableDocument:function(){var a=m.getPrepopulatedData(this._data),b=null,c=null;this._data.header?((b=this._data.header.split("\x3ca")[0].trim())||(b=this._data.rows+"\u00d7"+this._data.columns),(c=this._data.header.match(/\>(.*)\</))&&0!==c.length&&(c=c[1].trim())):c=this._data.subtype;var d=this._getManager({channel:this._data.ve_channel,editable:!1});this._createSaveObjectWithPrepopulatedData(a);
return this._getInteractiveDocument(d,this._data.doc_id,this._data.name,b,this._data.rows,this._data.columns,c,a.data,a.columnInfo,a.rowInfo,this._data.viewType,this.getSummaryBarStatus())},_getInteractiveDocument:function(a,b,c,d,e,f,g,h,k,l,m,p){return a.openDocument(b,{varName:c,varSize:d,rows:e,columns:f,varType:g,data:h,columnData:k,rowData:l,viewType:m,showSummaryBar:p})},getSummaryBarStatus:function(){return this._showSummaryBar},_createSaveObjectWithPrepopulatedData:function(a){a&&0<a.data.length&&
(a.data&&(this._data.savedPrepopulatedData=JSON.stringify(a.data)),a.columnInfo&&(this._data.savedPrepopulatedColumnHeaderInfo=JSON.stringify(a.columnInfo)),a.rowInfo&&(this._data.savedPrepopulatedRowHeaderInfo=JSON.stringify(a.rowInfo)))},_cleanSavedData:function(a,b){for(var c in a)if("ColumnModelProperties"===c){var d=!1;try{a.ColumnModelProperties=JSON.parse(a.ColumnModelProperties),a.ColumnModelProperties.map(function(a){delete a.ColumnNumber}),a.ColumnModelProperties.forEach(function(a){delete a.ColumnNumber;
a||(d=!0)}),d?delete a.ColumnModelProperties:a.ColumnModelProperties=JSON.stringify(a.ColumnModelProperties)}catch(e){}}else if("RowModelProperties"===c){var f=!0;try{a.RowModelProperties=JSON.parse(a.RowModelProperties),a.RowModelProperties.forEach(function(a){delete a.RowNumber;for(var b in a)a.hasOwnProperty(b)&&(f=!1)}),f?delete a.RowModelProperties:a.RowModelProperties=JSON.stringify(a.RowModelProperties)}catch(g){}}else"name"!==c&&delete a[c]},_getManager:function(a){return B.createManager(a)},
_createCodeGenWidget:function(a){this._codeGenerator=this._codeGenFactory.createEditorCodeGenerator();this._codeGenerator.setCodeGenDependencies({output:a,outputPositions:[],overrideInlinePosition:!0});this._codeGenerator.setEnablementCondition(e.hitch(this,"_isCodeUpdateAllowed"),I.disableUpdateCodeTooltip)},showCodeInOutput:function(a){var b=I.disableUpdateCodeTooltip;this._isCodeUpdateAllowed()||this._codeGenerator.disableUpdateCodeBtn(b);this._codeGenerator.setGeneratedCode(a);a=this._codeGenerator.attach(this._domElement.firstElementChild);
var c=this._codeGenerator;a&&a.then(function(a){c.updateCodeArea();""===c._generatedCode[0]&&c.detach();c._embeddedOutputsView.outputChanged()})},_isCodeUpdateAllowed:function(){return null===this.codeLinePositions?!1:1===this._outputsModel.getOutputsForPosition(this.codeLinePositions[this.codeLinePositions.length-1]).length},destroy:function(){this._gestureDetector&&this._gestureDetector.destroy();this._onResizeListener&&this._onResizeListener.remove();this._codeGenerator&&this._codeGenerator.destroy();
var a=this._getManager({channel:this._data?this._data.ve_channel:this._ve_channel,editable:!1});a&&this._data&&(a.documents&&a.documents[this._data.doc_id]&&a.documents[this._data.doc_id].destroy)&&(a.documents[this._data.doc_id].destroy(),delete a.documents[this._data.doc_id]);this._varDoc&&(this._varDoc.clientPeerView&&this._varDoc.clientPeerView.removeEventListener&&this._viewUpdatedListener)&&this._varDoc.clientPeerView.removeEventListener("viewUpdated",this._handleViewUpdatedCallback,this)}})})},
"liveeditor/plugin/variableeditor/ExportDataHandler":function(){define("liveeditor/plugin/variableeditor/ExportDataHandler",["dojo/_base/declare","dojo/_base/lang","liveeditor/plugin/variableeditor/InteractiveVariableOutputUtils"],function(g,f,e){return g("liveeditor.plugin.ExportDataHandler",[],{getMetaSummary:function(){return""},_handleSizeChanged:function(d){d=d.data.size;this._exportReady||(this.setCurrentSize(d.rows.start,d.rows.end,d.columns.start,d.columns.end),this._exportReady=!0)},_handleFilteringDone:function(){this._tableHasContent()&&
this._prefetchDataForExport(this._varDoc.clientPeerView)},_getExportObject:function(){var d=this._getExportData();return f.mixin({varName:this._varDoc.varName,varSize:this._varDoc.varSize,varType:this._varDoc.varType,currentSize:this.currentSize},d)},_getExportData:function(){var d=this._varDoc,b=null,a=null,c=[],e=this.currentSize,f=this._getDataStore(),g=this.getMetaSummary();d&&this._tableHasContent()?(this._isSaveLoadUseCaseForExport()?(c=this._getSaveLoadDataForExport(),g=""):c=this._getDataBufferDataForExport(f),
0>=c.length&&(c=d.data),a=c.length,b=c[0].length):b=Math.min(e.columns.end+1,this._TABLEVIEW_EXPORT_COLUMN_COUNT);d=e.rows.end+1>c.length||!1;e=this._getRowLabelsForExport(f,a);f=this._getColumnMetaDataForExport(f,b);return{data:this._processExportData(c),headers:f.columnHeaders,columnClass:f.columnClass,columnSpan:f.columnSpan,rowHeaders:e,columnCount:b,rowCount:a,truncated:d,metaSummary:g}},_tableHasContent:function(){return this.currentSize&&0<=this.currentSize.rows.end&&0<=this.currentSize.columns.end},
_isDataBufferEmpty:function(){var d=this._getDataStore();return!d||0>=d._dataBuffer.length},_getDataStore:function(){return this._varDoc.clientPeerView&&this._varDoc.clientPeerView.getPeerDataStore?this._varDoc.clientPeerView.getPeerDataStore():null},_isSaveLoadUseCaseForExport:function(){return this._isSaveLoadUseCase()||!this._exportReady||this._isDataBufferEmpty()},_getSaveLoadDataForExport:function(){return this._data.savedPrepopulatedData?JSON.parse(this._data.savedPrepopulatedData):this._data.savedData?
JSON.parse(this._data.savedData):[]},_getDataBufferDataForExport:function(d){var b={rows:{start:0,end:Math.min(this.currentSize.rows.end,this._TABLEVIEW_EXPORT_ROW_COUNT-1)},columns:{start:0,end:Math.min(this.currentSize.columns.end,this._TABLEVIEW_EXPORT_COLUMN_COUNT-1)}};return this._fetchFromDataBuffer(d,b)},_fetchFromDataBuffer:function(d,b){var a=d.getLocalRangeData(b),c=this._getSmallestRowCountToExport(a,b.rows.end);a.splice(c,b.rows.end+1);var e=this._getSmallestColumnCountToExport(a,b.columns.end);
a.forEach(function(a,c){a.splice(e,b.columns.end+1)});return a},_getSmallestRowCountToExport:function(d,b){var a=b+1;d.forEach(function(b,d){var e=Array.isArray(b)?b[0]:b;a=Math.min(void 0===e?d:a,a)});return a},_getSmallestColumnCountToExport:function(d,b){var a=b+1;d.forEach(function(b,d){b.forEach(function(b,c){a=Math.min(void 0===b?c:a,a)})});return a},_processExportData:function(d){return d.map(function(b){return b.map(function(a){return Array.isArray(a)?a.map(function(a){return a.value}):a})})},
_getRowLabelsForExport:function(d,b){var a=null;if(d&&d._rowModelProperties&&0<d._rowModelProperties.length&&this._exportReady&&!this._isSaveLoadUseCase()){var c=d._rowModelProperties;c&&c[0].hasOwnProperty("RowName")&&(a=c.map(function(a){return a.RowName}).slice(0,b))}else this._data.savedPrepopulatedRowHeaderInfo?a=(JSON.parse(this._data.savedPrepopulatedRowHeaderInfo)||[]).map(function(a){return a.label}).slice(0,b):this._data.metadata.RowModelProperties&&(c=this._data.metadata.RowModelProperties||
[],a=JSON.parse(c).map(function(a){return a.RowName}).slice(0,b));return a},_getColumnMetaDataForExport:function(d,b){var a=[],c=[],f=[];d&&d._columnModelProperties&&0<d._columnModelProperties.length&&this._exportReady&&!this._isSaveLoadUseCase()?(f=d._columnModelProperties,a=this._getColumnMetaDataInfo(f,"HeaderName"),c=this._getColumnMetaDataInfo(f,"class"),f=this._getColumnMetaDataInfo(f,"GroupColumnSize")):this._data.savedPrepopulatedColumnHeaderInfo?(f=JSON.parse(this._data.savedPrepopulatedColumnHeaderInfo),
a=e.getHeaderLabelsFromColumnConfigObject(f),c=e.getColumnClassesFromColumnConfigObject(f),f=e.getColumnSpanFromColumnConfigObject(f)):this._data.metadata.ColumnModelProperties&&(f=this._data.metadata.ColumnModelProperties,a=e.getPropValueFromModelProps(f,"HeaderName"),c=e.getPropValueFromModelProps(f,"class"),f=e.getPropValueFromModelProps(f,"GroupColumnSize"));f=f.map(function(a){return parseInt(a)});return{columnHeaders:a.slice(0,b),columnSpan:f.slice(0,b),columnClass:c.slice(0,b)}},_getColumnMetaDataInfo:function(d,
b){var a=[];d&&d[0].hasOwnProperty(b)&&(a=d.map(function(a){return a[b]}));return a}})})},"liveeditor/plugin/variableeditor/InteractiveVariableOutputUtils":function(){define("dojo/dom-construct liveeditor/plugin/variableeditor/InteractiveVariableOutputUtils MW/rtc/plugins/embeddedoutputs/outputhandlers/matrix/CharacterWidthUtility variableeditor_client/renderers/NumericRenderer variableeditor_client/renderers/SpanRenderer variableeditor_client/renderers/TableRenderer variableeditor_client/VariableEditorUtils".split(" "),
function(g,f,e,d,b,a,c){return{getPrepopulatedData:function(a){var b={columnInfo:[],data:[]};try{b.data=c.getParsedData(JSON.parse(a.prepopulatedData),Math.min(10,a.rows),Math.min(30,a.columns))}catch(d){}b.columnInfo=a.columnHeaderLabels?this.getColumnConfig(a.columnHeaderLabels,a):this.getDefaultColumnConfig(a);b.rowInfo=a.rowHeaderLabels?this.getRowConfig(a.rowHeaderLabels):null;return b},getColumnWidth:function(a){var b=a.value,c=this.getFirstDataEntryFromJSON(a);return this.computeColumnWidth(b,
c,a.subtype)},computeColumnWidth:function(a,b,c){a=a.search(/\S/);var d=1;"logical"!=c&&(d=b.value.trim().length);return Math.ceil((a+d)*e.getNumericCharacterWidth())},getFirstDataEntryFromJSON:function(a){var b=a.prepopulatedData?a.prepopulatedData:a.savedData,b=JSON.parse(b);return 1===a.rows||1===a.columns?JSON.parse(b[0].value):JSON.parse(b[0][0].value)},getGroupedColumnsFromMetaDataJSON:function(a){a=a.ColumnModelProperties;try{return a?(a=JSON.parse(a),a.map(function(a){return parseInt(a.GroupColumnSize)})):
null}catch(b){}},getPropValueFromModelProps:function(a,b){try{return a?JSON.parse(a).map(function(a){return a[b]}):null}catch(c){}},getColumnConfig:function(d,e){if(!d||0<!d.length)return null;var f={columnModel:{columnConfig:[]}},g=[];e&&e.metadata instanceof Array?g=this.getGroupedColumnsFromServerData(e.metadata):e&&(g=this.getGroupedColumnsFromMetaDataJSON(e.metadata));var p=e.columnClass?e.columnClass:this.getPropValueFromModelProps(e.metadata.ColumnModelProperties,"class");d.forEach(function(d,
h){var r=g[h],s=!1,t=p[h];e.isSortable&&(s=e.isSortable[h]);var u=c.constructColumnHeader(d,h,c.getDefaultColumnWidth()*r,r,t);u.sortType=!0===s?"NUMERIC":void 0;u.headerMenu=s;u.renderer=1<r?new b({numCells:r,colClass:t}):new a({colClass:t});f.columnModel.columnConfig.push(u)});return f},getGroupedColumnsFromServerData:function(a){return a.map(function(a,b,c){return b===c.length-1?0:c[b+1]-c[b]})},getDefaultColumnConfig:function(a){try{for(var b={columnModel:{columnConfig:[]}},e=a.columnWidth?a.columnWidth:
c.getDefaultColumnWidth(a.subtype),f=0;f<a.columns;f++)b.columnModel.columnConfig.push({label:(f+1).toString(),dataIndex:f,width:{value:e,unit:"px"},renderer:new d({colClass:a.subtype})});return b}catch(g){}},getFormattedHtmlText:function(a,b){return g.create(b?"div":"span",{style:{color:"rgb(179, 179, 179)","font-family":"'Consolas', sans-serif","font-size":"12px"},textContent:a})},getRowConfig:function(a){return a.map(function(a){return{label:a}})},getHeaderLabelsFromColumnConfigObject:function(a){return a.columnModel.columnConfig.map(function(a){return a.label})},
getColumnClassesFromColumnConfigObject:function(a){return a.columnModel.columnConfig.map(function(a){return a.renderer.config.colClass})},getColumnSpanFromColumnConfigObject:function(a){return a.columnModel.columnConfig.map(function(a){return a.renderer&&a.renderer.config&&a.renderer.config.numCells?a.renderer.config.numCells:1})},getRowHeaderLabelsFromRowConfigObject:function(a){return a.map(function(a){return a.label})}}})},"liveeditor/plugin/variableeditor/InteractiveVariablePromptController":function(){define("dojo/_base/declare dojo/dom-construct dojo/dom-style dojo/query variableeditor_client/TableClassConstants MW/rtc/plugins/embeddedoutputs/outputhandlers/floatingpalette/controllers/SimpleFloatingElement".split(" "),
function(g,f,e,d,b,a){return g([a],{_SUMMARY_BAR_CONTAINER_CLASS:".summaryBarContainer",constructor:function(){this.paletteRegistryId="InteractiveVariablePopoutPalette"},getPreferredLeftPosition:function(){var a=d(b.TABLE_COMPONENT_QUERY_CLASS,this._outputDomNode),e=0;a&&1<=a.length&&(e=a[0].firstChild,e=e.offsetLeft+e.offsetWidth,(a=d(this._SUMMARY_BAR_CONTAINER_CLASS,this._outputDomNode))&&0<a.length&&(e=Math.max(e,a[0].offsetLeft+a[0].offsetWidth)));return e}})})},"variableeditor_client/TableClassConstants":function(){define("variableeditor_client/TableClassConstants",
[],function(){return{TABLE_COMPONENT_QUERY_CLASS:".mw-table-component",TABLE_HEADER_COMPONENT_QUERY_CLASS:".mw-table-header-wrapper"}})},"liveeditor/plugin/variableeditor/InteractiveVariableRunScriptPromptController":function(){define(["dojo/_base/declare","liveeditor/plugin/variableeditor/InteractiveVariablePromptController"],function(g,f){return g([f],{constructor:function(){this.paletteRegistryId="RunScriptPalette"},_setupPaletteListeners:function(){}})})},"liveeditor/plugin/variableeditor/LiveEditorCodePublishService":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect mw-messageservice/MessageService variableeditor_peer/PeerSortUndoRedoHandler dojo/domReady!".split(" "),
function(g,f,e,d,b){return g(null,{executionService:[],context:"",_document:null,enabled:!1,codeObj:[],_CODEPUBCHANNEL:"/DataToolsCodePubChannel/",constructor:function(a){this.executionService=a.executionService;this.context=a.context;this._document=a.document;a.enabled&&(this.enabled=a.enabled);d.subscribe(this._CODEPUBCHANNEL+this.context,"_publishCode",this)},unregister:function(){d.unsubscribe(this._CODEPUBCHANNEL+this.context,"_publishCode",this)},_publishCode:function(a){if(a&&a.data){a=JSON.parse(a.data);
if(!a.pop()){var c=this.executionService;this._document.undoable(function(a){a.appendCommand(new b(c))})}a[a.length-1]=a[a.length-1].slice(0,-1);this.codeObj=a;this.executionService.showCodeInOutput(this.codeObj)}}})})},"variableeditor_peer/PeerSortUndoRedoHandler":function(){define(["dojo/_base/declare","dojo/domReady!"],function(g){return g(null,{output:null,constructor:function(f){this.output=f},execute:function(){0<Object.getOwnPropertyNames(this.output._varDoc.clientPeerView).length&&this.output._varDoc.clientPeerView.redo()},
unexecute:function(){0<Object.getOwnPropertyNames(this.output._varDoc.clientPeerView).length&&this.output._varDoc.clientPeerView.undo()}})})},"liveeditor/plugin/variableeditor/InteractiveTableOutput":function(){define("dojo/_base/declare dojo/_base/lang dojo/dom-class dojo/dom-construct dojo/query dojo/string dojo/aspect dojo/i18n!liveeditor/l10n/nls/interactiveVariableOutput liveeditor/plugin/variableeditor/InteractiveVariableExports/TableDocbookWriter liveeditor/plugin/variableeditor/InteractiveVariableExports/TableHTMLWriter liveeditor/plugin/variableeditor/InteractiveVariableExports/TablePDFWriter liveeditor/plugin/variableeditor/InteractiveVariableExports/TableRTFWriter liveeditor/plugin/variableeditor/InteractiveVariableOutput".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n){return g([n],{_CSS_TAG:"embeddedOutputsVariableTableElement",_TIMEOUT_FOR_FETCH:300,_PLAINTEXT_ROW_START:0,_PLAINTEXT_ROW_END:10,_PLAINTEXT_COLUMN_START:0,_PLAINTEXT_COLUMN_END:50,_ROW_TRUNCATION_LIMIT:16,_plainString:"",_table_docbook_feature_on:!1,_viewContentChangedHandler:null,_SUMMARY_BAR_CLASS:"summaryBar",_focused:!1,_attachViewUpdatedListener:function(a){this.inherited(arguments);a.addEventListener("dataBufferCleared",this._handleDataBufferCleared,this);
this._viewContentChangedHandler=c.after(a,"viewContentChanged",f.hitch(this,this._handleViewContentChanged,a));this._filteringDoneHandler=c.after(a,"onFilteringDone",f.hitch(this,this._handleFilteringDone,a))},startup:function(){this.inherited(arguments);this._initializeGestureHandler()},_handleOutputSelectionChanges:function(a){a.focusedOutput===this&&!0!=this._focused?this._focused=!0:a.focusedOutput!==this&&!0===this._focused&&(this._focused=!1,this._varDoc.clientPeerView&&this._varDoc.clientPeerView.blurView&&
this._varDoc.clientPeerView.blurView())},_getInteractiveDocument:function(a,b,c,d,e,f,g,h,k,l,m,p){var n=this.inherited(arguments);this._data.isPreview&&n.handleStaticView();return n},_handleViewUpdatedCallback:function(a){this.inherited(arguments);a.data&&"stringDataUpdate"===a.data.type&&(this._plainString=a.data.data.data,this._varDoc.domNode.dataset.updatePlainTextString=!0)},_getValueString:function(){var a=this._plainString?this._plainString:this.inherited(arguments);a&&!this._tableHasContent()&&
(a=a.split("\n").slice(0,2).join("\n"));return a},_prefetchDataForExport:function(a){this.inherited(arguments);this._fetchPlainTextString()},_handleDataBufferCleared:function(a){this._exportReady=!1},_handleViewContentChanged:function(a){var b=this;setTimeout(function(){b._prefetchDataForExport(a)},this._TIMEOUT_FOR_FETCH)},_handleFilteringDone:function(){this.inherited(arguments)},_fetchPlainTextString:function(){if(this._varDoc.clientPeerView&&this._varDoc.domNode){var a=this._varDoc.clientPeerView._dataStore._dataStore,
b=this._PLAINTEXT_ROW_START,c=this.currentSize.columns?this.currentSize.columns.end:this._data.columns-1,d=Math.min(this.currentSize.rows?this.currentSize.rows.end:this._data.rows-1,this._PLAINTEXT_ROW_END-1),e=this._PLAINTEXT_COLUMN_START,c=Math.min(c,this._PLAINTEXT_COLUMN_END-1),b=a.getRangeObject(b,d,e,c);a.getStringData(b[0]);this._varDoc.domNode.dataset.updatePlainTextString=!1}},getText:function(){var a=this._getValueString(),b=this._createText(a),a=-1!==b.search("\n")?"\n":"",b=d.create("div",
{innerHTML:b}),c=this._getTableTruncationMessage();return this._createName(this._data.name)+a+b.textContent+c},_getTableTruncationMessage:function(){var b="";if(this._plainString&&this._tableHasContent()){var c=(this.currentSize.columns?this.currentSize.columns.end:this._data.columns)>this._PLAINTEXT_COLUMN_END,d=(this.currentSize.rows?this.currentSize.rows.end:this._data.rows)>this._PLAINTEXT_ROW_END;c&&d?b+="\n"+h.copyPlainTextTruncationInfo+a.substitute(h.copyPlainTextRowsAndColumns,{"0":this._PLAINTEXT_ROW_END,
1:this._PLAINTEXT_COLUMN_END}):d?b+="\n"+h.copyPlainTextTruncationInfo+a.substitute(h.copyPlainTextOnlyRows,{"0":this._PLAINTEXT_ROW_END}):c&&(b+="\n"+h.copyPlainTextTruncationInfo+a.substitute(h.copyPlainTextOnlyColumns,{"0":this._PLAINTEXT_COLUMN_END}))}return b},getPdfContent:function(a,b,c){a=this._getExportObject();return(new m).createElement(a,b,c)},getRTFContent:function(){var a=this._getExportObject();return(new p).createElement(a)},_createDomElement:function(){var a=this.inherited(arguments);
e.add(a,"tableElement");return a},getHTML:function(a,b){var c=this._getExportObject(),d=null;return d=(new l).createElement(c).outerHTML},getHTMLContent:function(){var a=this._getExportObject(),c=this._varDoc.domNode.cloneNode(!0),a=(new l).createElement(a),e=b(".mwTable",c),f=a.getElementsByTagName("table")[0];e&&0<e.length&&d.place(f,e[0],"replace");this._handleSummaryBarForExport(c,a);return c},_handleSummaryBarForExport:function(a,b){var c=a.getElementsByClassName(this._SUMMARY_BAR_CLASS),e=b.getElementsByClassName(this._SUMMARY_BAR_CLASS);
c&&0<c.length&&d.place(e[0],c[0],"replace")},getMetaSummary:function(){return this._varDoc._getMetaSummary()},getDocbookContent:function(){var a=this._varDoc,b=a.varSize,c=a.varType,e=null;if(this._table_docbook_feature_on)e=this._getExportObject(),e=(new k).createElement(e);else{var e=this._createText(this._valueStringData),f=this._data.rows>this._ROW_TRUNCATION_LIMIT;if(this._data.truncationInfo&&this._data.truncationInfo.wasTruncatedMidLine)var g=e.indexOf("\n"),e=e.substr(0,g)+" "+this._MIDLINE_HORIZONTAL_ELLIPSIS_UC+
e.substr(g);f&&(e+="      "+this._VERTICAL_ELLIPSIS_UC+"\n");f=-1!==e.search("\n")?"\n":"";e=d.create("div",{innerHTML:e});e=document.createTextNode(f+e.textContent+"\n");this._data.rows&&this._data.columns&&(b=this._data.rows+this._TIMES_SYMBOL+this._data.columns);this._data.subtype&&(c=this._data.subtype)}return{varName:a.varName,varSize:b,varType:c,docBookXML:e}},setDocBookForTablesOn:function(a){this._table_docbook_feature_on=a},destroy:function(){this._varDoc&&(this._varDoc.clientPeerView&&this._varDoc.clientPeerView.removeEventListener&&
this._viewUpdatedListener)&&this._varDoc.clientPeerView.removeEventListener("dataBufferCleared",this._handleDataBufferCleared,this);this._viewContentChangedHandler&&this._viewContentChangedHandler.remove();this._filteringDoneHandler&&this._filteringDoneHandler.remove();this.inherited(arguments)}})})},"liveeditor/plugin/variableeditor/InteractiveVariableExports/TableDocbookWriter":function(){define(["dojo/_base/declare","dojo/dom-attr","liveeditor/plugin/variableeditor/InteractiveVariableExports/TabularDocbookWriter"],
function(g,f,e){return g([e],{constructor:function(){this.initOptions()},initOptions:function(){this.options={showSummaryBar:!1,showEllipsis:!0,showBorders:!0,showHeaders:!0}},createColumnHeader:function(d,b,a,c,e){var f=this.inherited(arguments);if(1<b){var g=e+1;this._setNodeAttributes(f,{namest:"column"+g,nameend:"column"+(g+b-1)})}return f}})})},"liveeditor/plugin/variableeditor/InteractiveVariableExports/TabularDocbookWriter":function(){define(["dojo/_base/declare","variableeditor_client/VariableEditorUtils",
"liveeditor/plugin/variableeditor/InteractiveVariableExports/TabularBaseWriter"],function(g,f,e){return g([e],{constructColumnHeaderContainer:function(){var d=document.createElement("thead"),b=this.constructRowContainer();d.appendChild(b);return d},constructTableBodyContainer:function(){return document.createElement("tbody")},createRowHeader:function(d,b){var a=this._createHeaderEntry(b,d);this._setNodeAttributes(a,{align:this.LEFT_ALIGNMENT});return a},createColumnHeader:function(d,b,a,c){d=this._createHeaderEntry(c,
d);this._setNodeAttributes(d,{align:this.CENTER_ALIGNMENT});return d},_createHeaderEntry:function(d,b){var a=d.getElementsByTagName("row"),a=a&&a[0]?a[0]:d;return this.createCell(b,"",a,!0)},constructRowContainer:function(){return document.createElement("row")},createCell:function(d,b,a,c){var e=document.createElement("entry");c=this.getColumnAlignmentStyle(b,c);this._setNodeAttributes(e,{align:c});d=this._cleanCellContents(d);c=null;c=f.isHyperLink(b,d);c=f.isStrong(b,d)?this._getStrongXMLNode(b,
d):c?this._getHyperlinkXMLNode(b,d):document.createTextNode(d);e.appendChild(c);a.appendChild(e);return e},_getStrongXMLNode:function(d,b){var a=f.getContentFromHTMLCells(d,b),c=document.createElement("emphasis");this._setNodeAttributes(c,{role:"bold"});c.appendChild(document.createTextNode(a.textContent));return c},_getHyperlinkXMLNode:function(d,b){var a=f.getContentFromHTMLCells(d,b);"a"!==a.tagName.toLowerCase()&&(a=a.getElementsByTagName("a")[0]);var c=document.createElement("link");this._setNodeAttributes(c,
{"xlink:href":a.href});c.appendChild(document.createTextNode(a.textContent));return c},createSummaryBar:function(d){},_cleanCellContents:function(d){return f.formatString(d)},createTable:function(d){this._tGroupTag=document.createElement("tgroup");var b=this.getTotalColumnCount(d);this._setNodeAttributes(this._tGroupTag,{cols:b.columnCount+1,align:"char",colsep:"1",rowsep:"1"});this._addColumnSpec(b.columnCount);return this.inherited(arguments)},constructTableWithHeader:function(d,b){var a=document.createElement("table"),
c={rowheader:"firstcol"};this.options.showBorders||(c.border="none");this._setNodeAttributes(a,c);this.options.showHeaders&&this._tGroupTag.appendChild(d);this._tGroupTag.appendChild(b);a.appendChild(this._tGroupTag);return a},_addColumnSpec:function(d){for(var b=0,a=document.createDocumentFragment(),b=0;b<d+1;b+=1){var c="column"+b,e=document.createElement("colspec");this._setNodeAttributes(e,{colname:c,colwidth:"75"});a.appendChild(e)}this._tGroupTag.appendChild(a)},_setNodeAttributes:function(d,
b){for(var a in b)b.hasOwnProperty(a)&&d.setAttribute(a,b[a])},addRowContainerToBody:function(d,b){d.appendChild(b)}})})},"liveeditor/plugin/variableeditor/InteractiveVariableExports/TabularBaseWriter":function(){define(["dojo/_base/declare","liveeditor/plugin/variableeditor/InteractiveVariableExports/TabularExportUtils","variableeditor_client/VariableEditorUtils"],function(g,f,e){return g(null,{LEFT_ALIGNMENT:"left",CENTER_ALIGNMENT:"center",RIGHT_ALIGNMENT:"right",_TIMES_SYMBOL:"\u00d7",options:{},
constructor:function(){this.initOptions()},initOptions:function(){this.options={showEllipsis:!0,showHeaders:!0,showBorders:!0,showSummaryBar:!0}},createElement:function(d){d.headers=d.headers?d.headers.slice():[];d.rowHeaders=d.rowHeaders?d.rowHeaders.slice():[];d.data=d.data?d.data.slice():[];d.columnClass=d.columnClass?d.columnClass.slice():[];d.columnSpan=d.columnSpan?d.columnSpan.slice():[];return this.createTable(d)},createTable:function(d){var b=this.getTotalColumnCount(d),a=null,c=null;this.options.showHeaders&&
(a=this.createTableHeader(d,b.headerCount,b.columnCount));c=this.createTableBody(d,b.columnCount);return this.constructTableWithHeader(a,c)},getTotalColumnCount:function(d){var b=d.headers.length,a=d.columnCount;f.hasGroupedColumns(d.columnSpan)&&0<d.columnSpan.length&&(a=d.columnSpan.reduce(function(a,b){return a+b},0));return{headerCount:b,columnCount:a}},createTableHeader:function(d,b,a){var c=d.headers;d=d.columnSpan;var e,f=this.constructColumnHeaderContainer();if(c&&0<c.length){this.createRowHeader(" ",
f,!0);for(e=0;e<b;e+=1)this.createColumnHeader(c[e],0<d.length?d[e]:null,a,f,e)}return f},constructColumnHeaderContainer:function(){throw"constructColumnHeaderContainer must be implemented";},createRowHeader:function(d){throw"createRowHeader must be implemented";},createColumnHeader:function(d,b,a,c){throw"createColumnHeader must be implemented";},createTableBody:function(d,b){var a=0,c=d.data,e=this.constructTableBodyContainer();f.repeatWithinArray(d.columnSpan,d.columnClass);for(a=0;a<c.length;a+=
1){var g=c[a];this.options.showHeaders&&g.unshift(this._constructRowHeader(a,d.rowHeaders&&0<d.rowHeaders.length?d.rowHeaders[a]:null));g=this.createRow(g,d.columnClass,b);this.addRowContainerToBody(e,g)}return e},_constructRowHeader:function(d,b){var a=String(d+1);b&&(a+=" "+b);return a},createRow:function(d,b,a){var c=this.constructRowContainer(),e;d=d.reduce(function(a,b){var c=null;return c=Array.isArray(a)?a.concat(b):a},[]);this.options.showHeaders&&(e=d.shift(),this.createRowHeader(e,c));for(e=
0;e<a;e+=1)this.createCell(d[e],b[e],c);return c},addRowContainerToBody:function(d,b){throw"addRowContainerToBody must be implemented";},constructTableBodyContainer:function(d){throw"constructTableBodyContainer must be implemented";},constructTableWithHeader:function(d,b){throw"constructTableWithHeader must be implemented";},constructRowContainer:function(){throw"constructRowContainer must be implemented";},createCell:function(d,b,a){throw"createCell must be implemented";},createSummaryBar:function(d){throw"createSummaryBar must be implemented";
},getColumnAlignmentStyle:function(d,b){var a=this.LEFT_ALIGNMENT;if(b||"logical"===d)a=this.CENTER_ALIGNMENT;else if(e.isTypeNumeric(d)||e.isTypeTime(d))a=this.RIGHT_ALIGNMENT;return a}})})},"liveeditor/plugin/variableeditor/InteractiveVariableExports/TabularExportUtils":function(){define(["dojo/on"],function(g){return{hasGroupedColumns:function(f){return f.some(function(e){return 1<e})},repeatWithinArray:function(f,e,d){var b=0;f.map(function(a,c){if(1<a){for(var f=0,g=d||""===d?d:e[b],f=0;f<a-
1;f+=1)e.splice(b+1,0,g);b+=a}})}}})},"liveeditor/plugin/variableeditor/InteractiveVariableExports/TableHTMLWriter":function(){define(["dojo/_base/declare","dojo/dom-attr","liveeditor/plugin/variableeditor/InteractiveVariableExports/TabularHTMLWriter"],function(g,f,e){return g([e],{constructor:function(){this.initOptions()},initOptions:function(){this.options={showSummaryBar:!0,showEllipsis:!0,showBorders:!0,showHeaders:!0}},createColumnHeader:function(d,b,a,c){var e=this.inherited(arguments);1<b&&
f.set(e,"colSpan",b);return e}})})},"liveeditor/plugin/variableeditor/InteractiveVariableExports/TabularHTMLWriter":function(){define("dojo/_base/declare dojo/dom-class dojo/dom-construct dojo/dom-style dojo/query variableeditor_client/VariableEditorUtils liveeditor/plugin/variableeditor/InteractiveVariableExports/TabularBaseWriter".split(" "),function(g,f,e,d,b,a,c){var h=["0px","1px","0px","0px"],k=["1px","1px","0px","0px"],l=["0px","0px","1px","1px"],m=["1px","0px","1px","1px"],p={fontSize:"12px",
"font-family":"Consolas, Inconsolata, Menlo, monospace"},n={color:"#B3B3B3","font-style":"normal"},q={"border-spacing":"0px"},r={"text-overflow":"ellipsis","font-family":"Arial, sans-serif","font-size":"12px",overflow:"hidden"};return g([c],{createElement:function(a){this.showBorders=this.options.showBorders;this.showHeaders=this.options.showHeaders;var b=e.create("div"),c=this.inherited(arguments);e.place(c,b);this.options.showSummaryBar&&(c=this.createSummaryBar(a),e.place(c,b,"first"));return b},
constructColumnHeaderContainer:function(){var a=e.create("thead"),b=this.constructRowContainer();e.place(b,a);return a},constructTableBodyContainer:function(a){return e.create("tbody",null)},createRowHeader:function(a,b,c){a=this._createHeaderCell(b,a,!0);c&&(a.style.borderWidth=m.join(" "));return a},createColumnHeader:function(a,b,c,d){return this._createHeaderCell(d,a,!1,!0)},_createHeaderCell:function(a,b,c,d){var e=a.getElementsByTagName("tr"),e=e&&e[0]?e[0]:a;a=this.createCell(b,"",e,c,d);this.showBorders&&
(a.style.background="#f5f5f5");a.style.color="rgb(128,128,128)";a.style.padding="3px";a.style.fontSize="9px";return a},_addCellAlignment:function(a,b,c){a=this.getColumnAlignmentStyle(a,b);c.style.textAlign=a},constructRowContainer:function(){return e.create("tr")},createCell:function(a,b,c,d,f){var g=d||f?"th":"td",h=f?m:l;r.width=d?"34px":"75px";a=this._cleanCellContents(a);a=e.create(g,{innerHTML:"\x3cspan\x3e"+a+"\x3c/span\x3e",style:r},c);this._addCellAlignment(b,f,a);this.showBorders&&this._addBorders(a,
h);return a},createSummaryBar:function(a){var b=e.create("div",{style:p,"class":"summaryBar"}),c=e.create("span",{},b),d=e.create("span",{style:n},b);c.innerText=a.varName+" \x3d ";c=a.varSize;c=a.currentSize.rows&&a.currentSize.columns?a.currentSize.rows.end+1+this._TIMES_SYMBOL+(a.currentSize.columns.end+1):a.varSize;d.innerText=c+" "+a.varType+" "+a.metaSummary;return b},_cleanCellContents:function(b){b=b.replace(/</g,"\x26lt;");b=b.replace(/>/g,"\x26gt;");return b=a.formatString(b)},constructTableWithHeader:function(a,
b){var c=e.create("table",{style:q,cellspacing:"0"});this.showBorders&&this._addBorders(c,this.showHeaders?h:k);this.showHeaders&&e.place(a,c);e.place(b,c);return c},addRowContainerToBody:function(a,b){e.place(b,a)},_addBorders:function(a,b){if(a&&(a.style.border="1px solid #bfbfbf",b)){var c=b.join(" ");a.style.borderWidth=c}}})})},"liveeditor/plugin/variableeditor/InteractiveVariableExports/TablePDFWriter":function(){define(["dojo/_base/declare","liveeditor/plugin/variableeditor/InteractiveVariableExports/TabularPDFWriter",
"MW/rtc/plugins/saveaspdf/utils/XSLFOWriterUtilities"],function(g,f,e){return g([f],{constructor:function(){this.initOptions()},initOptions:function(){this.options={showSummaryBar:!0,showEllipsis:!0,showBorders:!0,showHeaders:!0}},createColumnHeader:function(d,b,a,c){var f=this.inherited(arguments);f&&b&&e.setAttribute(f,"number-columns-spanned",Math.min(a,b));return f}})})},"liveeditor/plugin/variableeditor/InteractiveVariableExports/TabularPDFWriter":function(){define("dojo/_base/declare liveeditor/plugin/variableeditor/InteractiveVariableExports/TabularBaseWriter liveeditor/plugin/variableeditor/InteractiveVariableExports/TabularPDFStyleConstants MW/rtc/plugins/saveaspdf/outputs/WriterUtils MW/rtc/plugins/saveaspdf/utils/XSLFOWriterUtilities variableeditor_client/VariableEditorUtils".split(" "),
function(g,f,e,d,b,a){var c={},h={};return g([f],{borderStyle:null,headerStyle:null,_addHorizontalEllipsis:!1,_tableContainer:null,_rowHeaderWidth:null,_columnCount:null,createElement:function(a,b,d){this._init(b,d);this.borderStyle=this.options.showBorders?e.BORDER_STYLE:null;this.headerStyle=this.options.showBorders?e.HEADER_STYLE:null;var f=this._getXMLElement(c.BLOCK);if(this.options.showSummaryBar){var g=this.createSummaryBar(a);f.appendChild(g)}g=this.inherited(arguments);f.appendChild(g);a.truncated&&
this.options.showEllipsis&&f.appendChild(this._getVerticalEllipsis());return f},_init:function(a,b){c=a;h=b},_getXMLElement:function(a){return b.createXMLElement(c,a)},_getXMLTag:function(a){return b.createTextTag(a)},createTable:function(a){var b=this._getXMLElement(c.BLOCK);this._tableContainer=this._getXMLElement("table");this._rowHeaderWidth=this._computeRowHeaderWidth(a);this.setStyle([e.TABLE_BODY_STYLE,this.borderStyle,e.POSITION_STYLE],this._tableContainer);this.inherited(arguments);var d=
this._rowHeaderWidth+75*this._columnCount.columnCount;this._addHorizontalEllipsis&&(this.options.showEllipsis&&0<a.data.length)&&b.appendChild(this._getHorizontalEllipsis(d));b.appendChild(this._tableContainer);return b},getTotalColumnCount:function(a){var b=0,c=0,d,e=this._getMaxColumnCount(a)-1;for(d=0;d<a.columnSpan.length;d+=1)if(c+=a.columnSpan[d],c>=e){0===d?(b=1,c=Math.min(e,a.columnSpan[d])):(b=c!==e?d:d+1,c=c!==e?c-a.columnSpan[d]:e);break}return this._columnCount={headerCount:b,columnCount:c}},
_getMaxColumnCount:function(a){a=a.columnSpan.reduce(function(a,b){return a+b},0)+1;var b=Math.floor((500-this._rowHeaderWidth)/75)+1;this._addHorizontalEllipsis=a>b;return Math.min(b,a)},constructTableWithHeader:function(a,b){a&&this._tableContainer.appendChild(a);this._tableContainer.appendChild(b);return this._tableContainer},_getHorizontalEllipsis:function(a){var d=this._getXMLElement("inline"),f=this._getXMLElement(c.BLOCK),g=this._getXMLElement(c.EXTERNAL_GRAPHIC);a-=10;b.setAttribute(g,h.SOURCE,
h.HORIZONTAL_ELLIPSIS);b.setAttribute(g,"padding-left",a.toString());f.appendChild(g);d.appendChild(f);this.setStyle([e.HORIZONTAL_ELLIPSIS_STYLE],d);return d},_getVerticalEllipsis:function(){return d._createVerticalEllipsisNode(c,h)},_createTableColumns:function(a){var b;for(b=0;b<a;b+=1){var c=this._getXMLElement("table-column");0===b?(this.setStyle([this.borderStyle,e.HEADER_FONT_STYLE],c),this._setStyleAttribute("column-width",this._rowHeaderWidth.toString(),c)):this.setStyle([this.borderStyle,
e.COLUMN_WIDTH],c);this._tableContainer.appendChild(c)}},_computeRowHeaderWidth:function(a){var b=30;a.rowHeaders&&a.rowHeaders.forEach(function(a){b=Math.min(250,Math.max(b,7.5*a.length))});return b},createTableHeader:function(a,b,c){this._createTableColumns(c+1);var d=this._getXMLElement("table-header");this.setStyle([e.HEADER_FONT_STYLE,this.headerStyle],d);var f=this.inherited(arguments);d.appendChild(f);return d},createTableBody:function(a,b){this.options.showHeaders||this._createTableColumns(b+
1);return this.inherited(arguments)},constructColumnHeaderContainer:function(){return this.constructRowContainer()},constructRowContainer:function(){var a=this._getXMLElement("table-row");this.setStyle([this.borderStyle],a);return a},createRowHeader:function(a,b){var c=this._createCellContainer(a,"",b,!1,!0,33);this.setStyle([this.borderStyle,e.HEADER_FONT_STYLE,this.headerStyle],c);return c},createColumnHeader:function(a,b,c,d){return this._createCellContainer(a,"",d,!0)},constructTableBodyContainer:function(){return this._getXMLElement("table-body")},
addRowContainerToBody:function(a,b){a.appendChild(b)},createCell:function(a,b,c){a=this._createCellContainer(a,b,c);this.setStyle([e.TABLE_CELL_STYLE],a);return a},_createCellContainer:function(a,b,d,f,g,h){var r=this._getXMLElement("table-cell"),s=this._getXMLElement(c.BLOCK);a=this._fitTextToCell(a.toString(),h||14);b=this.getColumnAlignmentStyle(b,f);this._setStyleAttribute("text-align",b,s);f||g?this.setStyle([e.TEXT_STYLE,e.HEADER_TEXT_STYLE],s):this.setStyle([e.CELL_TEXT_STYLE,e.EXCLUSIVE_CELL_TEXT_STYLE,
e.TEXT_STYLE],s);s.appendChild(this._getXMLTag(a));r.appendChild(s);d.appendChild(r);return r},_fitTextToCell:function(a,b){Array.isArray(a)&&(a=a.toString());return a=a.length>b?a.substr(0,b-3).concat("..."):a},createSummaryBar:function(a){var b=this._getXMLElement(c.BLOCK),d=a.varName+" \x3d ",f=a.varSize,f=a.currentSize.rows&&a.currentSize.columns?a.currentSize.rows.end+1+this._TIMES_SYMBOL+(a.currentSize.columns.end+1):a.varSize;a=f+" "+a.varType+" "+a.metaSummary;f=this._getXMLElement(c.BLOCK);
f.appendChild(this._getXMLTag(d));d=this._getXMLElement("inline");d.appendChild(this._getXMLTag(a));this.setStyle([e.INLINE_FONT_STYLE],d);f.appendChild(d);this.setStyle([e.SUMMARY_HEADER_FONT_STYLE],f);b.appendChild(f);return b},setStyle:function(a,c){0<a.length&&c&&a.forEach(function(a){var d=null;for(d in a)a.hasOwnProperty(d)&&b.setAttribute(c,d,a[d])})},_setStyleAttribute:function(a,c,d){b.setAttribute(d,a,c)}})})},"liveeditor/plugin/variableeditor/InteractiveVariableExports/TabularPDFStyleConstants":function(){define({BOLD:{"font-weight":"bold"},
TABLE_BODY_STYLE:{"z-index":"1",top:"0","wrap-option":"no-wrap"},POSITION_STYLE:{position:"absolute"},HEADER_STYLE:{"background-color":"#f5f5f5",color:"grey","vertical-align":"middle"},HEADER_TEXT_STYLE:{"start-indent":"2mm","padding-after":"4px"},CELL_TEXT_STYLE:{"start-indent":"0mm","padding-after":"3px"},EXCLUSIVE_CELL_TEXT_STYLE:{"linefeed-treatment":"preserve","white-space":"pre"},COLUMN_WIDTH:{"column-width":"75px"},TABLE_CELL_STYLE:{"font-family":"Arial, Helvetica, sans-serif, Arial Unicode MS",
"font-size":"9pt",margin:"0",padding:"1px 3px 1px 3px"},TEXT_STYLE:{"display-align":"after","padding-before":"4px"},HORIZONTAL_ELLIPSIS_STYLE:{"z-index":"2",top:"30in"},BORDER_STYLE:{border:"0.5px solid grey"},INLINE_FONT_STYLE:{"font-size":"9pt","font-style":"normal",color:"#b3b3b3"},HEADER_FONT_STYLE:{"font-family":"Arial, Helvetica, sans-serif","font-size":"6.75pt"},SUMMARY_HEADER_FONT_STYLE:{"font-family":'Menlo, Monaco, Consolas, "Courier New", monospace',"font-size":"9pt"}})},"liveeditor/plugin/variableeditor/InteractiveVariableExports/TableRTFWriter":function(){define(["dojo/_base/declare",
"liveeditor/plugin/variableeditor/InteractiveVariableExports/TabularRTFWriter","liveeditor/plugin/variableeditor/InteractiveVariableExports/TabularExportUtils"],function(g,f,e){var d=1;return g([f],{constructor:function(){this.initOptions()},initOptions:function(){this.options={showSummaryBar:!1,showEllipsis:!0,showBorders:!0,showHeaders:!0}},createTableHeader:function(b,a,c){this.hasGroupedColumns=e.hasGroupedColumns(b.columnSpan);var d=b.headers;this.hasGroupedColumns&&(e.repeatWithinArray(b.columnSpan,
d,""),e.repeatWithinArray(b.columnSpan.slice(0),b.columnSpan,""));return this.inherited(arguments)},createColumnHeader:function(b,a,c,e){1<d?(this.rowStyle+="\\clmrg",d-=1):this.hasGroupedColumns&&(this.rowStyle+="\\clmgf",d=a);this.inherited(arguments)}})})},"liveeditor/plugin/variableeditor/InteractiveVariableExports/TabularRTFWriter":function(){define(["dojo/_base/declare","liveeditor/plugin/variableeditor/InteractiveVariableExports/TabularBaseWriter","MW/rtc/plugins/view/exporters/RTFFormatUtils"],
function(g,f,e){return g([f],{initial_spacer:1E3,LEFT_ALIGNMENT:"\\ql",RIGHT_ALIGNMENT:"\\qr",CENTER_ALIGNMENT:"\\qc",table_container:"",rowStyle:"",hasGroupedColumns:!1,cellContent:"",bodyContainer:"",createElement:function(d,b){return this.inherited(arguments)},createTable:function(d){var b;return b="\n"+this.inherited(arguments)},getTotalColumnCount:function(d){var b=this.inherited(arguments);b.headerCount=b.columnCount;return b},createTableHeader:function(d,b,a){var c="\n\\trowd\\trgaph20\n";
this.cellContent=this.rowStyle="";this.inherited(arguments);c+=this.rowStyle+this.cellContent;this._resetRowAndCellContent();return c+"\\row\n"},_resetRowAndCellContent:function(){this.cellContent=this.rowStyle="";this.initial_spacer=1E3},constructRowContainer:function(){return""},constructColumnHeaderContainer:function(){return""},createRowHeader:function(d,b){this.createCell(d,"",b)},createColumnHeader:function(d,b,a,c){this.createCell(d,"",c,!0)},constructTableBodyContainer:function(){return this.bodyContainer},
addRowContainerToBody:function(d,b){this.bodyContainer+=b},createTableBody:function(){this.inherited(arguments);return this.bodyContainer},constructTableWithHeader:function(d,b){return d&&this.options.showHeaders?d+b:b},createSummaryBar:function(d){},createRow:function(d,b,a){var c="\\trowd\\trgaph20\n";this.inherited(arguments);c+=this.rowStyle+this.cellContent;this._resetRowAndCellContent();return c+"\\row\n"},createCell:function(d,b,a,c){this.options&&this.options.showBorders&&this._addBorders();
this.rowStyle+="\\clvertalc\\cellx"+this.initial_spacer+"\n";this.initial_spacer+=1E3;this.cellContent+=this.getColumnAlignmentStyle(b,c);d=e.getFormattedChars(d);this.cellContent+=" {"+d+"} \\intbl\\cell";this.cellContent+="\n"},_addBorders:function(){this.rowStyle+="\\clbrdrt\\brdrs\\clbrdrl\\brdrs\\clbrdrb\\brdrs\\clbrdrr\\brdrs\n"}})})},"liveeditor/plugin/variableeditor/InteractiveVariableExports/VariableMatrixElement2HTMLProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider",
"liveeditor/plugin/variableeditor/InteractiveVariableExports/VariableMatrixElement2HTML"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.embeddedoutputs"]}},createInstance:function(d){return new e(d)}})})},"liveeditor/plugin/variableeditor/InteractiveVariableExports/VariableMatrixElement2HTML":function(){define("dojo/_base/declare MW/rtc/plugins/export/html/HTMLOutputUtilities MW/rtc/plugins/export/OutputNodeExporterInterface dojo/text!MW/rtc/plugins/embeddedoutputs/view/css/matrixOutput.css dojo/text!MW/rtc/plugins/view/exporters/ellipses.css dojo/text!MW/rtc/plugins/embeddedoutputs/view/css/variableOutput.css".split(" "),
function(g,f,e,d,b,a){return g([e],{constructor:function(a){this._embeddedoutputs=a;this._firstVisit=!0},reset:function(){this._firstVisit=!0},getApplicableDomNodeClasses:function(){return["embeddedOutputsVariableMatrixElement"]},enter:function(c,e,g){this._firstVisit&&(c.addCSSToStyle(".variableValue { width: 100% !important; }\n"),c.addCSSToStyle(f.cleanUpCSS(d)),c.addCSSToStyle(f.cleanUpCSS(a)),c.addCSSToStyle(f.cleanUpCSS(b)),this._firstVisit=!1);g=e.cloneNode(!0);f.convertToInlineStyles(g,e);
g=f.removeElementsWithClass(g,".figureWidget");g=this._embeddedoutputs.getEmbeddedOutputsView().getOutputFromOutputDiv(e).getHTMLContent(g);c.addToBody(g.outerHTML);return!0}})})},"liveeditor/plugin/variableeditor/InteractiveVariableExports/TableElement2HTMLProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","liveeditor/plugin/variableeditor/InteractiveVariableExports/TableElement2HTML"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.embeddedoutputs"]}},
createInstance:function(d){return new e(d)}})})},"liveeditor/plugin/variableeditor/InteractiveVariableExports/TableElement2HTML":function(){define(["dojo/_base/declare","dojo/dom-construct","MW/rtc/plugins/export/html/HTMLOutputUtilities","MW/rtc/plugins/export/OutputNodeExporterInterface","dojo/text!MW/rtc/plugins/embeddedoutputs/view/css/variableTableOutput.css"],function(g,f,e,d,b){return g([d],{_CODEGEN_WIDGET_CLASS:".codeGen",_POPOUT_CLASS:".figurefloatingpalette",constructor:function(a){this._embeddedoutputs=
a;this.reset()},getApplicableDomNodeClasses:function(){return["embeddedOutputsVariableTableElement"]},reset:function(){this._firstVisit=!0},enter:function(a,c,d){this._firstVisit&&(a.addCSSToStyle(e.cleanUpCSS(b)),this._firstVisit=!1);d=e.removeElementsWithClass(c,this._CODEGEN_WIDGET_CLASS);c=d.cloneNode(!0);d=this._embeddedoutputs.getEmbeddedOutputsView().getOutputFromOutputDiv(d).getHTMLContent(c);d=e.removeElementsWithClass(d,this._POPOUT_CLASS);f.place(d,c.firstElementChild,"replace");a.addToBody(c.outerHTML);
return!0}})})},"liveeditor/plugin/variableeditor/InteractiveMatrixOutputHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","liveeditor/plugin/variableeditor/InteractiveMatrixOutputHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.id","rtc.view","rtc.embeddedoutputs.currentoutputservice","rtc.embeddedoutputs"]}},createInstance:function(d,b,a,c){return new e(d,b,a,c)}})})},"liveeditor/plugin/variableeditor/InteractiveMatrixOutputHandler":function(){define(["dojo/_base/declare",
"dojo/_base/lang","liveeditor/plugin/variableeditor/InteractiveVariableOutputHandler","liveeditor/plugin/variableeditor/MatrixOutput"],function(g,f,e,d){return g([e],{_createVariableOutput:function(b){return new d(b)}})})},"liveeditor/plugin/variableeditor/MatrixOutput":function(){define("dojo/_base/declare dojo/dom-construct dojo/dom-class dojo/dom-style dojo/_base/lang dojo/on dojo/dom-geometry dojo/query dojo/string liveeditor/plugin/variableeditor/InteractiveMatrixOutput dojo/i18n!liveeditor/l10n/nls/interactiveVariableOutput liveeditor/plugin/variableeditor/InteractiveVariableOutput liveeditor/plugin/variableeditor/StaticMatrixOutput liveeditor/plugin/variableeditor/InteractiveVariableExports/InteractiveVariableMatrixWriter liveeditor/plugin/variableeditor/InteractiveVariableOutputUtils liveeditor/plugin/variableeditor/InteractiveMatrixPromptController liveeditor/plugin/variableeditor/InteractiveMatrixRunScriptPromptController mw-html-utils/HtmlUtils MW/rtc/plugins/embeddedoutputs/outputhandlers/VariableUtilities MW/rtc/plugins/embeddedoutputs/outputhandlers/matrix/MatrixOutputUtility variableeditor_client/VariableEditorUtils".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x){return g([p],{_STATICVIEW_CLASSNAME:"valueContainer",_INTERACTIVEVIEW_CLASSNAME:"ClientDocument",_FOCUSEDOUTPUT_CLASSNAME:"focusedInteractiveOutput",_CSS_TAG:"embeddedOutputsVariableMatrixElement",_INTERACTIVE_SCROLLDIV:"mw-scrolling-div",_SUMMARYBAR_VIEWPORT_SPAN:"veViewportSummary",_VARIABLE_NAME_CLASS:"veVariableName",_ROW_HEIGHT:14,_COLUMN_WIDTH:82,_HIDE_ELLIPSES:"hideEllipses",LOGICAL_TYPE:"logical",_FOCUSED_CLASS:"focused",_SCALING_FACTOR_CLASS:"veScalingFactor",
_SCALING_EXPONENT_CLASS:"scaleExponent",_VALUE_SUMMARY_CLASS:"veVariableValueSummary",_SUPER_SCRIPT_TAG:"sup",_SCALING_FACTOR:"10",_MULTIPLIER:" \u00d7",_VARIABLE_VALUE_CLASS:".valueContainer .variableValue",_ROW_TITLE_TEXT:" "+m.rowTitleText+" ",_COLUMN_TITLE_TEXT:" "+m.columnTitleText+" ",_VIEWPORT_SEP:":",_SPACER_HTML:"\x26nbsp;\x26nbsp;\x26nbsp;\x26nbsp;",_VIEWPORT_TEXT_SEPARATOR:" |",_hideViewPortForExport:!1,constructor:function(a){this._scrolledStartRow=this._scrolledStartColumn=0},_createVariableDocument:function(){this._data.value=
this._removeScalingFactorFromDataString(this._data.value);this._data.columnWidth||(this._data.columnWidth=r.getColumnWidth(this._data),this.columnWidth=this._data.columnWidth);this._staticMatrixOutput=new n({data:this._data,outputMetaData:this._outputMetaData});this._varDoc={domNode:this._staticMatrixOutput.createStaticDocument()};this._isSaveLoad()||(this._interactiveMatrixOutput=new l)},_getPromptControllerTargetNode:function(){return this.getDomElement()},_createRunScriptPromptController:function(){return new t},
_removeScalingFactorFromDataString:function(a){var b="";return b=this._data.exponent&&"1"!==this._data.exponent?this._parseValueDataString(a).data:a},_parseValueDataString:function(a){a=a.split("\n");var b=a[0].trim();a.splice(0,2);return{data:a.join("\n"),exponent:b}},_createDomElement:function(){var a=this.inherited(arguments);e.add(a,"matrixElement veSpecifier");this._isSaveLoad()&&e.add(a,"saveLoad");this._prependScalingFactor(a);this._prependSummaryBar(a);this._staticMatrixOutput.addMatrixStyler(a);
this._displayEllipsesIfRequired(a);return a},_createPromptControllerInstance:function(){return new s},_createViewportSummary:function(){var a=document.createElement("span");e.add(a,this._SUMMARYBAR_VIEWPORT_SPAN);e.add(a,"hide");this._viewportSummaryDisplayed=!1;var b=document.createElement("span");b.innerText=this._ROW_TITLE_TEXT;var c=document.createElement("span");e.add(c,"startRow");c.innerText=1;var d=document.createElement("span");e.add(d,"endRow");var f=document.createElement("span");f.innerText=
" |";var g=document.createElement("span");g.innerText=this._COLUMN_TITLE_TEXT;var h=document.createElement("span");e.add(h,"startColumn");h.innerText=1;var k=document.createElement("span");e.add(k,"endColumn");var l=document.createElement("span");l.innerText=this._VIEWPORT_SEP;var m=document.createElement("span");m.innerText=this._VIEWPORT_SEP;1!=this._data.rows&&(a.appendChild(b),a.appendChild(c),a.appendChild(l),a.appendChild(d));1!=this._data.rows&&1!=this._data.columns&&a.appendChild(f);1!=this._data.columns&&
(a.appendChild(g),a.appendChild(h),a.appendChild(m),a.appendChild(k));return a},_addOverlay:function(a){},_prependSummaryBar:function(a){var b=w.createNameAndSummary(this._data.name,this._data.rows,this._data.columns,this._data.subtype,this._data.header),c=this._createViewportSummary();b.summary.appendChild(c);"double"===this._data.subtype&&this._getSummaryForDoubleDataType(b);this._metaSummaryInfo=b.metaSummary.textContent;a.insertBefore(b.summary,a.firstElementChild)},_preventMouseEventsOnElement:function(b){this._mouseDownListener=
a.pausable(b,"mousedown",x.preventEventDefaults,this);this._pointerDownListener=a.pausable(b,"pointerdown",x.preventEventDefaults,this)},getSummaryInfo:function(){return{metaSummary:this._metaSummaryInfo||""}},_getSummaryForDoubleDataType:function(a){e.add(a.summary,"double");a.metaSummary.textContent=this._data.rows+"\u00d7"+this._data.columns;e.add(a.metaSummary,"veMetaSummary")},_prependScalingFactor:function(a){if(this._data.exponent&&"1"!=this._data.exponent){var b=document.createElement("div");
e.add(b,"veScalingFactor");b.innerText=this._SCALING_FACTOR;var c=document.createElement("span");e.add(c,"scaleExponent");c.innerText=this._data.exponent;var d=document.createElement("span");e.add(d,"multiply");d.innerText=this._MULTIPLIER;b.appendChild(c);b.appendChild(d);a.insertBefore(b,a.firstElementChild)}},getSummaryBarStatus:function(){return!1},_openCallback:function(){this._interactiveMatrixOutput.interactiveVarDoc||this._interactiveMatrixOutput.createInteractiveDocument(this);this.inherited(arguments)},
_applyPromptController:function(){var a=1===this._data.rows&&1===this._data.columns;return this._data.subtype===this.LOGICAL_TYPE&&a?null:this.inherited(arguments)},_getPopoutCreationArgs:function(){var a=this.inherited(arguments),c=this.getSummaryInfo();return b.mixin(a,{title:this._data.name+" \x3d "+c.metaSummary})},_getDataFromBuffer:function(){},_handleOutputSelectionChanges:function(a){a.focusedOutput===this&&!0!=this._focused?(this._focused=!0,this._updateInteractiveViewDoc(a.focusedOutput)):
a.focusedOutput!==this&&!0===this._focused&&(this._focused=!1,this._interactiveMatrixOutput._saveDocumentPosition(),this._updateStaticViewDoc())},_toggleEventListenerState:function(){this._focused?(this._mouseDownListener.resume(),this._pointerDownListener.resume()):(this._mouseDownListener.pause(),this._pointerDownListener.pause())},_updateInteractiveViewDoc:function(a){a._interactiveMatrixOutput.interactiveVarDoc||this._interactiveMatrixOutput.createInteractiveDocument(a);this._resetViewportSummary();
this._updateCssOnDomElement(!0);var b=a._getUpdatedDom(a._interactiveMatrixOutput.interactiveVarDoc,this._STATICVIEW_CLASSNAME,this._INTERACTIVEVIEW_CLASSNAME);this._interactiveMatrixOutput._updateDocumentPosition(a._interactiveScrollTop,a._interactiveScrollLeft);this._mouseDownListener||this._preventMouseEventsOnElement(this.getDomElement());this._handleRefreshOnOutputChange(b);this._toggleEventListenerState()},_updateCssOnDomElement:function(a){var b=this.getDomElement();a?e.add(b,this._FOCUSED_CLASS):
e.remove(b,this._FOCUSED_CLASS)},_updateStaticViewDoc:function(){this._scrolledStartColumn=this._scrolledStartRow=1;if(this._outputScrolled||this._isOutputScrolled()){var a=this.columnWidth?this.columnWidth:this._COLUMN_WIDTH;this._scrolledStartRow=Math.min(this._data.rows,Math.floor(this._interactiveMatrixOutput._interactiveScrollTop/this._ROW_HEIGHT)+1);this._scrolledStartColumn=Math.min(this._data.columns,Math.floor(this._interactiveMatrixOutput._interactiveScrollLeft/a)+1);this._interactiveMatrixOutput._fetchStringData(this._getStartRow()-
1,this._scrolledStartColumn-1)}else this._currentStaticView=null,this._staticMatrixOutput._variableValue=this._staticMatrixOutput._initialStaticText;a=this._getUpdatedDom(this._staticMatrixOutput._initialStaticView,this._INTERACTIVEVIEW_CLASSNAME,this._STATICVIEW_CLASSNAME);if(this._viewportSummaryDisplayed||1!=this._getStartRow()||1!=this._scrolledStartColumn)this._displayViewportSummary(this._getStartRow(),this._scrolledStartColumn),this._hideEllipsis();this.updateStaticWidths(a);this._updateCssOnDomElement(!1);
this._handleRefreshOnOutputChange(a);this._staticMatrixOutput.updateViewportInfo(this._staticMatrixOutput._styler,this.getDomElement());this._toggleEventListenerState();this._hideViewPortForExport=!0},_getStartRow:function(){var a=this._scrolledStartRow;10<this._data.rows?(a=Math.min(this._scrolledStartRow+9,this._data.rows),a-=9):a=1;return a},_displayEllipsesIfRequired:function(a){0<arguments.length?this._staticMatrixOutput.displayEllipsisIfRequired(this._staticMatrixOutput._styler,a):this._staticMatrixOutput.displayEllipsisIfRequired(this._staticMatrixOutput._styler,
this.getDomElement())},_isOutputScrolled:function(){return this._outputScrolled=0!==this._interactiveMatrixOutput._interactiveScrollTop||0!==this._interactiveMatrixOutput._interactiveScrollLeft},_displayViewportSummary:function(a,b){var c=this.getDomElement().getElementsByClassName(this._SUMMARYBAR_VIEWPORT_SPAN)[0];e.remove(c,"hide");1<this._data.rows&&(c.getElementsByClassName("startRow")[0].innerText=a);1<this._data.columns&&(c.getElementsByClassName("startColumn")[0].innerText=b);this._viewportSummaryDisplayed=
!0},_hideEllipsis:function(){var a=this.getDomElement().getElementsByClassName(this._STATICVIEW_CLASSNAME)[0];a&&e.add(a,this._HIDE_ELLIPSES)},_resetViewportSummary:function(){var a=this.getDomElement().getElementsByClassName(this._SUMMARYBAR_VIEWPORT_SPAN)[0];e.add(a,"hide")},_getInteractiveDocument:function(a,b,c,d,e,f,g,h,k,l,m,p){return this._varDoc=a=this._interactiveMatrixOutput.getInteractiveDocument(a,b,c,d,e,f,g,h,k,l,m,p,this.columnWidth)},_getUpdatedDom:function(a,b,c){this._varDoc=a;return this._updateDom(b,
c,a)},_handleRefreshOnOutputChange:function(a){this._refreshOutput(a);this._refreshPromptControllerPosition()},_refreshOutput:function(b){b&&(a.emit(b,"startup",{bubbles:!0,cancelable:!0}),this._initializeGestureHandler(),this._embeddedOutputsView.outputChanged())},startup:function(){this.inherited(arguments);if(this._focused){var a=this._staticMatrixOutput.createStaticDocument();this._staticMatrixOutput._currentStaticView?this._staticMatrixOutput._currentStaticView={domNode:a}:this._staticMatrixOutput._initialStaticView=
{domNode:a};this.updateStaticWidths(a)}},updateStaticWidths:function(a){if(a){var b=h(".veVariableName",this.getDomElement())[0];d.set(b,"width",this._staticMatrixOutput._styler.getAvailableWidth(this.getDomElement().parentElement).toString()+"px");a=h(".variableValue",a)[0];d.set(a,"width",this._staticMatrixOutput.getTotalColumnWidth(this._staticMatrixOutput._styler,this.getDomElement().parentElement)+"px")}},_updateDom:function(a,b,c){var d=this.getDomElement();return d&&0<d.getElementsByClassName(a).length?
(d.removeChild(d.getElementsByClassName(a)[0]),d.appendChild(c.domNode),a=d.getElementsByClassName(b)[0],e.add(a,this._FOCUSEDOUTPUT_CLASSNAME),a):null},_refreshPromptControllerPosition:function(){this._promptController&&this._promptController.updatePalettePosition()},_attachViewUpdatedListener:function(a){this.inherited(arguments);var b=this;this._viewUpdatedWithDataString=a.addEventListener("viewUpdated",function(a){if("stringDataUpdate"===a.data.type){var c=a.data.data.data;if(b._interactiveMatrixOutput){var c=
b._removeScalingFactorFromDataString(c),d=this.columnWidth;b._interactiveMatrixOutput.interactiveVarDoc.clientPeerView._dataStore._dataStore.getLocalCellData(a.data.data.startRow,a.data.data.startColumn)&&(d=r.computeColumnWidth(c,{value:b._interactiveMatrixOutput.interactiveVarDoc.clientPeerView._dataStore._dataStore.getLocalCellData(a.data.data.startRow,a.data.data.startColumn)},b._data.subtype));a=b.getDomElement().getElementsByClassName(b._STATICVIEW_CLASSNAME)[0];w.updateLayoutInfo(d,b._data.columns,
b._data.rows,w._getCharsPerElement(c,b._data.exponent),a);b._staticMatrixOutput.updateViewportInfo(b._staticMatrixOutput._styler,b.getDomElement());b._staticMatrixOutput._updateCurrentStaticView(c)}b._staticMatrixOutput._variableValue=c;f.place(b._staticMatrixOutput._currentStaticView.domNode,b._domElement.getElementsByClassName(b._STATICVIEW_CLASSNAME)[0],"replace");b._varDoc=b._staticMatrixOutput._currentStaticView;b._varDoc.domNode.dataset.currentViewRange="startRow:"+b._getStartRow()+"|startColumn:"+
b._scrolledStartColumn;b._hideViewPortForExport=!1}})},getFocusedView:function(){return this._focused?this._interactiveMatrixOutput:this._staticMatrixOutput},getText:function(){var a=this._createName(this._data.name),b=this.getSummaryInfo(),c=this._getViewportForExport(),b=b.metaSummary+"    "+c,c=this._getScalingFactorForText(),d=this._getValueForExport(),e=this._createText(d),d=-1!==e.search("\n")?"\n":"",e=f.create("div",{innerHTML:e});return a+b+c+d+e.textContent},_getScalingFactorForText:function(){var a=
"";this._getScalingExponentValue()&&(a="\n"+this._parseValueDataString(this._valueStringData).exponent+"\n");return a},getHTML:function(){var a=u.treatHtmlLikeCommandWindow(w.createName(this._data.name)),b=this._getValueForExport(),b=u.treatHtmlLikeCommandWindow(b),c=this._getHeaderInfo(),d=this._getScalingFactorInfo();return"\x3cpre\x3e"+a+c+"\n"+d+b+"\x3c/pre\x3e"},_getHeaderInfo:function(){var a="",b=this.getSummaryInfo();b.metaSummary&&(a=r.getFormattedHtmlText(b.metaSummary).outerHTML);if(b=
this._getViewportForExport())b=r.getFormattedHtmlText(b),a+=this._SPACER_HTML+b.outerHTML;return a},_getScalingFactorInfo:function(){var a="",b=this._getScalingExponentValue();b&&(a+=this._SCALING_FACTOR,(b=this._getSuperScriptForExport(b))&&(a+=b.outerHTML+this._MULTIPLIER+"\n"));return a},_getScalingExponentValue:function(){var a=null;this._data.exponent&&"1"!==this._data.exponent&&(a=this._data.exponent);return a},_getValueForExport:function(){return(this._hideViewPortForExport?this._staticMatrixOutput._initialStaticText:
this._staticMatrixOutput._variableValue)||this._data.value},_getViewportForExport:function(){var a=h("."+this._SUMMARYBAR_VIEWPORT_SPAN,this.getDomElement()),b="";if(a&&0<a.length&&!e.contains(a[0],"hide")&&!this._hideViewPortForExport){var c="",d=a[0].getElementsByClassName("endRow"),a=a[0].getElementsByClassName("endColumn");0<d.length&&(b+=k.substitute(m.viewPortRowText,{"0":this._getStartRow(),1:d[0].textContent}),c=this._VIEWPORT_TEXT_SEPARATOR);0<a.length&&(b+=c+k.substitute(m.viewPortColumnText,
{"0":this._scrolledStartColumn,1:a[0].textContent}))}return b},_getSuperScriptForExport:function(a){var b=document.createElement(this._SUPER_SCRIPT_TAG);b.textContent=a;return b},getPdfContent:function(a,b,c){return(new q({data:this._getValueForExport(),hideViewPortSummary:this._hideViewPortForExport})).createElement(a,b,c)},getHTMLContent:function(a){a=a.cloneNode(!0);this._destroyDom(this._SUMMARYBAR_VIEWPORT_SPAN,a,this._hideViewPortForExport)||(h("."+this._VALUE_SUMMARY_CLASS,a)[0].innerHTML+=
this._SPACER_HTML);if(!this._destroyDom(this._SCALING_FACTOR_CLASS,a)){var b=this._getScalingExponentValue();if(b){var b=this._getSuperScriptForExport(b),c=h("."+this._SCALING_FACTOR_CLASS,a)[0].getElementsByClassName(this._SCALING_EXPONENT_CLASS)[0];f.place(b,c,"replace")}}return a},_destroyDom:function(a,b,c){return(a=h("."+a,b))&&0<a.length&&(c||e.contains(a[0],"hide"))?(f.destroy(a[0]),!0):!1},destroy:function(){this.inherited(arguments);this._mouseDownListener&&this._pointerDownListener&&(this._mouseDownListener.remove(),
this._pointerDownListener.remove())}})})},"liveeditor/plugin/variableeditor/InteractiveMatrixOutput":function(){define(["dojo/_base/declare","dojo/on","liveeditor/plugin/variableeditor/InteractiveVariablePromptController"],function(g,f,e){return g(null,{_INTERACTIVEVIEW_CLASSNAME:"ClientDocument",_INTERACTIVE_SCROLLDIV:"mw-scrolling-div",constructor:function(d){this.interactiveVarDoc=null;this._interactiveScrollLeft=this._interactiveScrollTop=0},createInteractiveDocument:function(d){this.interactiveVarDoc=
d.createInteractiveVariableDocument()},getInteractiveDocument:function(d,b,a,c,e,f,g,m,p,n,q,r,s){a={varName:a,varSize:c,varType:g,data:m,columnData:p,rowData:n,viewType:q,showSummaryBar:r,rows:e,columns:f,columnWidth:s||this.columnWidth};d=d.openDocument(b,a);(!d.clientPeerView.getView||!d.clientPeerView.getView().isResolved())&&d.createView(a);d.clientPeerView._setColumnWidth({columnWidth:s||this.columnWidth});return d},_saveDocumentPosition:function(){if(this.interactiveVarDoc&&this.interactiveVarDoc.domNode){var d=
this.interactiveVarDoc.domNode.getElementsByClassName(this._INTERACTIVE_SCROLLDIV)[0];d&&(this._interactiveScrollTop=d.scrollTop,this._interactiveScrollLeft=d.scrollLeft)}},_updateDocumentPosition:function(){if(this.interactiveVarDoc&&this.interactiveVarDoc.domNode){var d=this.interactiveVarDoc.domNode.getElementsByClassName(this._INTERACTIVE_SCROLLDIV)[0];d&&(d.scrollTop=this._interactiveScrollTop,d.scrollLeft=this._interactiveScrollLeft)}},_fetchStringData:function(d,b){if(0!==this._interactiveScrollTop||
0!==this._interactiveScrollLeft)try{var a=this.interactiveVarDoc.clientPeerView._dataStore._dataStore.getRangeObject(d,d+9,b,b+9);this.interactiveVarDoc.clientPeerView._dataStore._dataStore.getStringData(a[0])}catch(c){}}})})},"liveeditor/plugin/variableeditor/StaticMatrixOutput":function(){define("dojo/_base/declare dojo/_base/lang dojo/query MW/rtc/plugins/embeddedoutputs/view/EllipsisUtilities MW/rtc/plugins/embeddedoutputs/outputhandlers/matrix/MatrixOutputUtility MW/rtc/plugins/embeddedoutputs/outputhandlers/matrix/MatrixStyler MW/rtc/plugins/embeddedoutputs/outputhandlers/floatingpalette/controllers/matrix/MatrixPromptController".split(" "),
function(g,f,e,d,b,a,c){return g(null,{_STATICVIEW_CLASSNAME:"valueContainer",_REGEX_FOR_EXPONENT:/1.0e\+\d+ \*/,_DEFAULT_MAX_COLUMNS:50,_MAX_ROWS:10,constructor:function(a){this._currentStaticView=this._initialStaticView=null;this._data=a.data;this._outputMetaData=a.outputMetaData;this._initialStaticText=this._variableValue=""},createStaticDocument:function(){var a=b.createMatrixValue(this._data,this._REGEX_FOR_EXPONENT,this._outputMetaData);this._variableValue=a.value.textContent;this._initialStaticView=
{domNode:a.container};this._initialStaticText=a.value.textContent;return a.container},addMatrixStyler:function(b){this._styler=new a(this);b.getStyler=f.hitch(this,function(){return this._styler})},updateViewportInfo:function(a,b){var c=this._getValueContainerInfo(a,b);a.updateViewportInfo(b,this._MAX_ROWS,c.totalColumnsThatFit,c.matrixInfo.totalRows,c.matrixInfo.totalColumns)},displayEllipsisIfRequired:function(a,b){var c=this._getValueContainerInfo(a,b);d.updateEllipsesVisibility(c.valueContainer,
c.matrixInfo.totalColumns,c.matrixInfo.totalRows,Math.min(c.totalColumnsThatFit,c.matrixInfo.totalColumns),this._MAX_ROWS)},_getValueContainerInfo:function(a,b){var c=this._initialStaticView.domNode,d=a.getAvailableWidth(b),e=a.getMatrixInfo(c),f=a.getTotalColumnsThatFit(d,e,c);return{valueContainer:c,availableWidth:d,matrixInfo:e,totalColumnsThatFit:f,bufferColumnSpace:a.BUFFER_SPACE_FOR_COLUMN}},getTotalColumnWidth:function(a,b){var c=this._getValueContainerInfo(a,b);return Math.min(c.totalColumnsThatFit,
c.matrixInfo.totalColumns)*c.matrixInfo.columnWidth+c.bufferColumnSpace},_updateCurrentStaticView:function(a){this._currentStaticView||(this._currentStaticView={domNode:this._initialStaticView.domNode.cloneNode(!0)});this._currentStaticView.domNode.getElementsByClassName("variableValue")[0].textContent=a}})})},"liveeditor/plugin/variableeditor/InteractiveVariableExports/InteractiveVariableMatrixWriter":function(){define("dojo/_base/array dojo/_base/declare dojo/dom-class dojo/dom-construct MW/rtc/plugins/saveaspdf/outputs/MatrixWriter MW/rtc/plugins/saveaspdf/utils/XSLFOWriterUtilities".split(" "),
function(g,f,e,d,b,a){return f([b],{_MATRIX_ELEMENT_CLASS:"matrixElement",_VALUE_SUMMARY_CLASS:"veVariableValueSummary",_VIEWPORT_SUMMARY_CLASS:"veViewportSummary",_SCALE_EXPONENT_CLASS:"scaleExponent",_SCALING_FACTOR:"10",_VERTICAL_ALIGN_ATTR_VAL:"super",_SUPERSCRIPT_FONT_SIZE:"8pt",_MULTIPLIER_FONT_STYLE:"12pt",_SUMMARY_COLOR:"rgb(179, 179, 179)",_HIDE_CLASS:"hide",_LEADER_ATTRIBUTE_VAL:"space",_INLINE_XSLT_TAG:"fo:inline",_SUMMARY_FONT_FAMILY:"'Consolas', sans-serif",_MULTIPLIER_CLASS:"multiply",
_MARGIN_RIGHT_VAL:"146pt",constructor:function(a){this._data=a.data||"";this._ellipsisShown=!0;this._hideViewPort=a.hideViewPortSummary},_getValue:function(a){return this._data||a.textContent},_createMetaSummaryInfo:function(b,d,e){b=b.getElementsByClassName(this._VALUE_SUMMARY_CLASS)[0];d=a.createXMLElement(d,d.INLINE);var f=a.getCommonStyles(b);f[e.COLOR]=this._SUMMARY_COLOR;f[e.FONT_FAMILY]=this._SUMMARY_FONT_FAMILY;a.applyStyles(d,f);d.appendChild(a.createTextTag(b.textContent));return d},_getNameAndSummary:function(b,
d,f){var l=this.inherited(arguments),m=b.getElementsByClassName(this._VIEWPORT_SUMMARY_CLASS);if(0<m.length&&!e.contains(m[0],this._HIDE_CLASS)&&!this._hideViewPort){this._summaryBlockElement=l;var m=m[0].children,p=a.createXMLElement(d,d.INLINE);g.forEach(m,function(a){this._constructInlineElement(p,d,a.textContent,{color:this._SUMMARY_COLOR})},this);m=a.createXMLElement(d,d.LEADER);m.setAttribute(f.LEADER_PATTERN,this._LEADER_ATTRIBUTE_VAL);l.appendChild(m);l.appendChild(p);this._ellipsisShown=
!1}return l},_getScalingFactor:function(b,d,f){var g=a.createXMLElement(d,d.BLOCK);if(e.contains(b,this._HIDE_CLASS))g.appendChild(a.createTextTag(""));else{var m={},p={};this._constructInlineElement(g,d,this._SCALING_FACTOR);var n=b.getElementsByClassName(this._SCALE_EXPONENT_CLASS)[0];m[f.VERTICAL_ALIGN]=this._VERTICAL_ALIGN_ATTR_VAL;m[f.FONT_SIZE]=this._SUPERSCRIPT_FONT_SIZE;this._constructInlineElement(g,d,n.textContent,m);b=b.getElementsByClassName(this._MULTIPLIER_CLASS)[0];p[f.FONT_SIZE]=this._MULTIPLIER_FONT_STYLE;
this._constructInlineElement(g,d,b.textContent,p)}return g},_showEllipsis:function(){return this._ellipsisShown},_styleHeader:function(b,d){b>this.MAX_CHARACTERS&&!this._ellipsisShown&&(a.setAttribute(this._summaryBlockElement,d.TEXT_ALIGN_LAST,d.JUSTIFY),a.setAttribute(this._summaryBlockElement,d.MARGIN_RIGHT,this._MARGIN_RIGHT_VAL))},_constructInlineElement:function(b,d,e,f){var g=a.createXMLElement(d,d.INLINE);d=a.createTextTag(e);f&&Object.keys(f).forEach(function(b){a.setAttribute(g,b,f[b])});
g.appendChild(d);b.appendChild(g)}})})},"liveeditor/plugin/variableeditor/InteractiveMatrixPromptController":function(){define(["dojo/_base/declare","dojo/query","dijit/Destroyable","liveeditor/plugin/variableeditor/InteractiveVariablePromptController","MW/rtc/plugins/embeddedoutputs/outputhandlers/floatingpalette/controllers/SimpleFloatingElement"],function(g,f,e,d,b){return g([d,b,e],{constructor:function(){this.paletteRegistryId="MatrixPopoutPalette"},getPreferredLeftPosition:function(){var a=
this.inherited(arguments);if(0===a){var b=f(".variableValue",this._outputDomNode);b&&1<=b.length&&(a=b[0].offsetLeft+b[0].offsetWidth)}var b=f(".veVariableName",this._outputDomNode),d=0;b&&1<=b.length&&(d=b[0].offsetLeft+b[0].offsetWidth);return Math.max(a,d)+10}})})},"liveeditor/plugin/variableeditor/InteractiveMatrixRunScriptPromptController":function(){define(["dojo/_base/declare","liveeditor/plugin/variableeditor/InteractiveMatrixPromptController"],function(g,f){return g([f],{constructor:function(){this.paletteRegistryId=
"RunScriptPalette"},_setupPaletteListeners:function(){}})})},"liveeditor/plugin/variableeditor/MatrixOutputHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","liveeditor/plugin/variableeditor/MatrixOutputHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:"rtc.id rtc.outputhandlerservice rtc.executionservice rtc.domnode rtc.embeddedoutputs.matrixoutputhandler liveeditor.embeddedoutputs.interactivematrixoutputhandler".split(" ")}},
createInstance:function(d,b,a,c,f,g){d=new e(d,b,a,c,f,g);b.registerOutputPlugin(d);return d}})})},"liveeditor/plugin/variableeditor/MatrixOutputHandler":function(){define(["dojo/_base/declare","dojo/_base/lang","mw-messageservice/MessageService"],function(g,f,e){return g(null,{OUTPUT_TYPE:"matrix",_ISFEATUREON:!0,constructor:function(d,b,a,c,e,f){this._legacyMatrixOutputHandlerInstance=e;this._interactiveMatrixOutputHandlerInstance=f;b.registerOutputPlugin(this)},getOutputFromData:function(d,b){if(!d.subtype||
!1===this._ISFEATUREON)return this._legacyMatrixOutputHandlerInstance.getOutputFromData(d,b);var a=this._interactiveMatrixOutputHandlerInstance.getOutputFromData(d,b);a.getOutput().type=this.OUTPUT_TYPE;return a},destroy:function(){this._legacyMatrixOutputHandlerInstance.destroy();this._interactiveMatrixOutputHandlerInstance.destroy()},_subscribeFeatureSwitch:function(d){var b=this;e.subscribe("/LiveEditorNumerics",f.hitch(b,function(a){b._ISFEATUREON=a.data.status;!0===a.data.status&&d.registerOutputPlugin(b)}))}})})},
"liveeditor/plugin/variableeditor/VariableStringOutputHandlerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","liveeditor/plugin/variableeditor/VariableStringOutputHandler"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.outputhandlerservice","rtc.embeddedoutputs.variablestringoutputhandler","liveeditor.embeddedoutputs.interactivetableoutputhandler","liveeditor.embeddedoutputs.interactivematrixoutputhandler"]}},createInstance:function(d,
b,a,c){b=new e(d,b,a,c);d.registerOutputPlugin(b);return b}})})},"liveeditor/plugin/variableeditor/VariableStringOutputHandler":function(){define(["dojo/_base/declare","dojo/_base/lang","mw-messageservice/MessageService","MW/rtc/plugins/embeddedoutputs/outputhandlers/BaseOutputHandler"],function(g,f,e,d){return g([d],{OUTPUT_TYPE:"variableString",_ELLIPSIS:"...",_ISFEATUREON:!0,constructor:function(b,a,c,d){this._subscribeFeatureSwitch(b);this._legacyVariableStringOutputHandlerInstance=a;this._interactiveTableOutputHandlerInstance=
c;this._interactiveMatrixOutputHandlerInstance=d},getOutputFromData:function(b,a){var c=null;if(b.subtype||b.type){if("table"===b.subtype||"timetable"===b.subtype?c=this._interactiveTableOutputHandlerInstance.getOutputFromData(b,a):"logical"===b.type&&(c=this._interactiveMatrixOutputHandlerInstance.getOutputFromData(b,a)),c)return c.getOutput().type=this.OUTPUT_TYPE,c}else return this._legacyVariableStringOutputHandlerInstance.getOutputFromData(b)},_subscribeFeatureSwitch:function(b){var a=this;e.subscribe("/LiveEditorNumerics",
f.hitch(this,function(c){this._ISFEATUREON=c.data.status;!0===c.data.status&&b.registerOutputPlugin(a)}))}})})},"MW/rtc/margin/LineNumberDecoratorProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/margin/LineNumberDecorator"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.view","rtc.linenumberservice","rtc.cursorcontroller","liveeditor.showlinenumber"]}},createInstance:function(d,
b,a,c){return new e(d,b,a,"true"===c,!1)},priority:function(){return 3}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointStylerProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointStyler"],function(g,f,e,d){return g(e,{requires:function(){return{createInstance:["debug.breakpointmodel","debug.breakpointdirtyservice","rtc.view","rtc.linenumberservice"]}},createInstance:function(b,a,c,e){return new d(b,
a,c,e)},priority:function(){return 2}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointStyler":function(){define("dojo/_base/declare dojo/dom-construct dojo/dom-class dojo/dom-style dojo/i18n!l10n/nls/breakpoints dojo/string MW/rtc/plugins/breakpoint/AbstractBreakpointStyler MW/rtc/margin/MarginUtilities dojo/text!MW/rtc/plugins/breakpoint/matlab/images/breakpointtip.svg".split(" "),function(g,f,e,d,b,a,c,h,k){return g(c,{_BREAKPOINT_HEIGHT:18,_CONSECUTIVE_BREAKPOINT_PADDING_BOTTOM:1,constructor:function(a,
b,c,d){this._view=c;this._lineNumberService=d},buildTooltipString:function(c){var d="";this._showOutOfSyncBreakpoints()&&(d+="\x3cb\x3e"+b.dirtyFileTooltip+"\x3c/b\x3e\x3cbr\x3e");return d=c.isEnabled?c.hasExpression()?d+a.substitute(b.breakpointDescriptorLiveEditorTooltip.CONDITION,[c.zeroBasedLineNumber+1,c.expression]):d+a.substitute(b.breakpointDescriptorLiveEditorTooltip.ENABLED,[c.zeroBasedLineNumber+1]):d+a.substitute(b.breakpointDescriptorLiveEditorTooltip.DISABLED,[c.zeroBasedLineNumber+
1])},allowPartialBreakpoints:function(){return!1},shouldShowBreakpointsErrored:function(){return!1},applyStyle:function(a,b,c){this.inherited(arguments);f.create("div",{"class":"breakpointTip",innerHTML:k},a)},_shouldShowPartialBreakpoint:function(a){return!1},_showConditionalBreakpoint:function(a){return a&&a.hasExpression()&&a.isEnabled},_applyDisabledStyle:function(a,b){e.add(a,b)},_adjustAlignment:function(a,b){var c=this._lineNumberService.getLineNumberFromCodeLineNumber(b+1),c=h.getTopForMiddleAlignmentWithLineNumber(this._view,
c,this._BREAKPOINT_HEIGHT);a.style.top=c+"px";0===c&&this._shouldExtendToNextBreakpoint(b)&&0===this._getNextLineTop(b)&&(a.style.paddingBottom=this._CONSECUTIVE_BREAKPOINT_PADDING_BOTTOM+"px")},_shouldExtendToNextBreakpoint:function(a){if(!this._isNextLineAValidCodeLine(a)||!this._breakpointDataModel.hasBreakpointAtLine(a+1))return!1;a=this._breakpointDataModel.getBreakpoint(a+1);return!a.hasExpression()&&a.isEnabled},_isNextLineAValidCodeLine:function(a){var b=a+1;return b<this._lineNumberService.getNumberOfCodeLines()?
(a=this._lineNumberService.getLineNumberFromCodeLineNumber(a+1),1===this._lineNumberService.getLineNumberFromCodeLineNumber(b+1)-a):!1},_getNextLineTop:function(a){a=this._lineNumberService.getLineNumberFromCodeLineNumber(a+2);return h.getTopForMiddleAlignmentWithLineNumber(this._view,a,this._BREAKPOINT_HEIGHT)}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointDirtyServiceProvider":function(){define(["dojo/_base/declare","dojo/_base/lang","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointDirtyService"],
function(g,f,e,d){return g(e,{requires:function(){return{createInstance:["debug.documentdirtyservice","rtc.code.matlabfiletype","rtc.internaldocument"]}},createInstance:function(b,a,c){return new d(b,a,c)},priority:function(){return 2}})})},"MW/rtc/plugins/breakpoint/matlab/MatlabBreakpointDirtyService":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MW/rtc/model/DocumentConstants MW/rtc/plugins/breakpoint/AbstractBreakpointDirtyService MW/rtc/plugins/debug/DebugServicesFactory".split(" "),
function(g,f,e,d,b,a){return g(b,{constructor:function(b,d,g){this._documentDirtyDebugService=b;this._fileTypeService=d;this._internalDocument=g;this._debugServices=a.getInstance();this._unsavedDocument=this._documentDirtyWhileDebugging=!1;this.own(e.after(this._documentDirtyDebugService,"onDocumentDirtiedWhileDebugging",f.hitch(this,"_handleDocumentDirtiedWhileDebugging")));this.own(e.after(this._debugServices,"onDebugModeChanged",f.hitch(this,"_handleDebugModeChanged"),!0));this.own(e.after(this._internalDocument,
"onDocumentChanged",f.hitch(this,"_handleDocumentChange"),!0));this.own(e.after(this._fileTypeService,"onFileTypeChange",f.hitch(this,"_handleFileTypeChange")))},breakpointsRefreshed:function(a){a||(this._unsavedDocument=!1,this._updateBreakpointDirtyStatus())},breakpointsErrored:function(){this._unsavedDocument=!1;this._updateBreakpointDirtyStatus()},_handleDocumentDirtiedWhileDebugging:function(){this._documentDirtyWhileDebugging=!0;this._updateBreakpointDirtyStatus()},_handleDebugModeChanged:function(a){!1===
a&&(this._documentDirtyWhileDebugging=!1,this._updateBreakpointDirtyStatus())},_handleDocumentChange:function(a){0<this._filterDocumentEvents(a).length&&(this._unsavedDocument=!0,this._updateBreakpointDirtyStatus())},_handleFileTypeChange:function(){this._updateBreakpointDirtyStatus()},breakpointPositionUpdated:function(){this._debugServices.isDebugging&&(this._documentDirtyWhileDebugging=!0,this._updateBreakpointDirtyStatus())},_updateBreakpointDirtyStatus:function(){var a=this._isUnsavedFunctionFile()||
this._documentDirtyWhileDebugging;a!==this._areBreakpointsDirty&&(this._areBreakpointsDirty=a,this.breakpointDirtyStateChanged(this._areBreakpointsDirty))},_isUnsavedFunctionFile:function(){return this._unsavedDocument&&this._fileTypeService.isFunction()}})})},"MW/rtc/plugins/margin/LineNumberWithBreakpointsMarginProvider":function(){define("dojo/dom-attr dojo/dom-class dojo/_base/declare MW/rtc/core/provider/PluginProvider MW/rtc/datamodel/FileBackingStoreUtilities MW/rtc/margin/DecoratableLineMargin".split(" "),
function(g,f,e,d,b,a){return e(d,{isApplicable:function(a){return b.isPlainCodeFile(a)},requires:function(){return{isApplicable:["rtc.backingstore"],createInstance:"rtc.view rtc.internaldocument rtc.focusservice debug.contextmenumodelfactory rtc.contextmenu.generator margin.linenumberdecorator debug.margin.matlab.breakpoint rtc.view.decoration.margindecorator rtc.margin.sectionbreak".split(" ")}},createInstance:function(b,d,e,l,m,p,n,q,r){p=[q,r,n,p];l=l.getInstance();b=new a(b,d,e,p,300,l,m);f.add(b.getMarginElement(),
"lineNumberMargin");g.set(b.getMarginElement(),"data-testid","lineNumberWithBreakpointsMargin");return b},priority:function(){return 2}})})},"liveeditor/plugin/JavascriptToolstripManager":function(){define("dojo/_base/declare liveeditor/plugin/ToolstripManager MW/uiframework/uicontainer/ChildProperties mw-messageservice/MessageService dojo/dom MW/uiframework/UIBuilderFactory dojo/dom-attr dijit/registry".split(" "),function(g,f,e,d,b,a,c,h){return g(f,{_editorView:null,constructor:function(b){this._editorView=
b;this._namespace="/toolstrip/toolstriptabevent/"+b.getId();this._uiBuilder=a.getInstance();this._gallery_POPUP_ID=this._uiBuilder.tagToId("motwToolstrip.figureToolstripTab.annotations.galleryPopup");this._galleryID=this._uiBuilder.tagToId("motwToolstrip.figureToolstripTab.annotations.gallery");this._galleryPopupWidget=h.byId(this._gallery_POPUP_ID)},selectTab:function(a,b){b.focusedFigureProperties&&!0==b.showing&&(this._editorView.set(e.ACTIVE_CONTEXTS,["motwToolstrip."+a]),this._updateGallery(b.focusedFigureProperties),
d.publish(this._namespace,b))},setVisible:function(a,b,c){if(!b||c.selectedFigureProperties&&0!=c.selectedFigureProperties.length)this._editorView.set(e.ACTIVE_CONTEXTS,b?["motwToolstrip."+a]:null),this._updateGallery(c.selectedFigureProperties),d.publish(this._namespace,c)},replace:function(a,b){var c=this._uiBuilder.tagToId(a);if(b){var d=this._uiBuilder.tagToId(b),e=this._uiBuilder.indexOf(c);if(!(0>e)){var f=this._uiBuilder.getParentId(c);this._uiBuilder.remove(c);this._uiBuilder.add(d,f,e)}}else this._uiBuilder.remove(c)},
isParented:function(a){a=this._uiBuilder.tagToId(a);return null!==this._uiBuilder.getParentId(a)},_updateGallery:function(a){if(this._galleryPopupWidget){a=this._formatFigureProperties(a);for(var b in a){var c=this._uiBuilder.tagToId("motwToolstrip.figureToolstripTab.annotations."+b),d=this._uiBuilder.tagToId("motwToolstrip.figureToolstripTab.annotations.remove"+b);c&&this._toggleSingleItem(c,a[b].valueOf());d&&this._toggleSingleItem(d,a[b].valueOf())}this._uiBuilder.refreshGallery(this._galleryID)}},
_toggleSingleItem:function(a,b){this._uiBuilder.set(a,"enabled",b)},_formatFigureProperties:function(a){var b={};Array.isArray(a)?a.forEach(function(a){if(a&&a.hasOwnProperty("supportedActions")){a=a.supportedActions;for(var c in a)b.hasOwnProperty(c)?b[c]=b[c]&&a[c].valueOf():b[c]=a[c].valueOf()}}):a&&a.hasOwnProperty("supportedActions")&&(b=a.supportedActions);return b}})})},"liveeditor/plugin/ToolstripManager":function(){define(["dojo/_base/declare"],function(g){return g(null,{setVisible:function(f,
e,d){throw Error("clients should override this method");},selectTab:function(f,e){throw Error("clients should override this method");}})})},"MOTW/editor/EditorWidgetBase":function(){define("dojo/_base/declare dojo/_base/lang dijit/_FocusMixin dijit/_TemplatedMixin dijit/_WidgetBase dijit/_WidgetsInTemplateMixin mw-log/Log".split(" "),function(g,f,e,d,b,a,c){return g([b,e,d,a],{widgetsInTemplate:!0,constructor:function(a){c.assert(a.editorView,"editorView required");c.assert(a.actionService,"actionService required");
a.id&&(this.id=a.id);this.editorView=a.editorView;this.actionService=a.actionService;this._listeners=[]},postCreate:function(){this.inherited(arguments);this.editor=this._initializeEditor();this._listeners.push(this.connect(this.editor,"undoRedoStackUpdated",f.hitch(this.editorView,"undoRedoStackUpdated")))},startup:function(){this._checkEditor();this.editor.startup()},onBlur:function(){this._checkEditor();this.editor.blur()},onFocus:function(){this._checkEditor();this.editor.focus()},resize:function(){this._checkEditor();
this.editor.resize()},_initializeEditor:function(){},_checkEditor:function(){if(!this.editor)throw Error("Editor is invalid. Possibly this class has not been subclassed");},destroy:function(){this._listeners.forEach(function(a){a.remove()});this.editor.destroy();this.inherited(arguments)}})})},"MOTW/editor/plugins/filemodificationnotifier/MatlabOnlineFileModificationNotifier":function(){define(["dojo/_base/lang","dojo/_base/declare","liveeditor/plugin/filemodificationnotifier/FileModificationNotifier"],
function(g,f,e){return f(e,{constructor:function(d,b){this._fileDataService=d;this._file=b},destroy:function(){},setModified:function(){this._fileDataService.setFileModified(this._file)}})})},"liveeditor/plugin/filemodificationnotifier/FileModificationNotifier":function(){define(["dojo/_base/declare"],function(g){return g(null,{constructor:function(){},destroy:function(){},setModified:function(){throw Error("Unimplemented API: matlab.toolbox.matlab.codetools.liveeditor.liveeditor.plugin.filemodificationnotifier.FileModificationNotifier.setModified");
}})})},"MW/rtc/datamodel/RichTextBackingStore":function(){define(["dojo/_base/declare","MW/rtc/datamodel/FileBackingStore","mw-messageservice/MessageService"],function(g,f,e){return g(f,{FILE_NAME_UPDATED:"/liveeditor/event/FileNameUpdated/",constructor:function(d,b){this.inherited(arguments);this._filePath=d;this._load=this._save=null;this._rtcId=b;e.subscribe(this.FILE_NAME_UPDATED+this._rtcId,"_handleFileNameUpdatedResponse",this)},_handleFileNameUpdatedResponse:function(d){this._filePath=d.data.fileName;
this._updateFilePath(this._filePath)},getFilePath:function(){return this._filePath},save:function(d){return this._save(d)},load:function(d){return this._load(d)}})})},"MOTW/editor/plugins/contextmenu/ReconfigureContextMenuModelProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./ReconfigureContextMenuModel"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{createInstance:["rtc.contextmenu.model"]}},createInstance:function(d){return new e(d)}})})},
"MOTW/editor/plugins/contextmenu/ReconfigureContextMenuModel":function(){define(["dojo/_base/declare"],function(g){return g(null,{_COPY_PASTE_GROUP:"copyPaste",constructor:function(f){f.hideGroup(this._COPY_PASTE_GROUP)}})})},"MOTW/editor/plugins/settings/MatlabSettingSynchronizerProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./MatlabSettingSynchronizer"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.settings.service"]}},createInstance:function(d){return new e(d)}})})},
"MOTW/editor/plugins/settings/MatlabSettingSynchronizer":function(){define(["dojo/_base/declare","settings/settingsService","MW/rtc/abstract/AbstractPlugin","MW/rtc/plugins/settings/matlab/MatlabSettingsUtilities"],function(g,f,e,d){return g(e,{constructor:function(b){this._rtcSettingService=b;this._initialize()},_initialize:function(){d.syncSettingServiceWithMatlabSettings(this._rtcSettingService,f).then(function(b){b.forEach(function(a){this.own(a)},this)}.bind(this))}})})},"settings/settingsService":function(){define("dojo/Evented dojo/_base/declare dojo/Deferred mw-messageservice/MessageService mw-utils/Utils ./messageTypesToJava ./SettingsPeerModelSynchronizer".split(" "),
function(g,f,e,d,b,a,c){function h(a){for(var c=b.generateUuid();void 0!==a[c];)c=b.generateUuid();return c}g=new (f([g],{_deferredMap:{},_serviceStarted:!1,_queue:[],_peerModelSynchronizer:new c,constructor:function(){d.subscribe("/matlab/settings",this._handleServerMessages.bind(this))},start:function(){this.isStarted()||(this._peerModelSynchronizer.start(),d.publish("/matlab/settings",{type:a.START_SERVICE,uuid:h({})}))},_sendMessage:function(a,b){this.isStarted()?d.publish(a,b):this._queue.push({channel:a,
message:b})},_processQueuedMessages:function(){for(;0<this._queue.length;){var a=this._queue.pop();this._sendMessage(a.channel,a.message)}},_handleServerMessages:function(a){var b=a.data.type,c=a.data.uuid;"SERVICE_STARTED"===b?(this._serviceStarted=!0,this._processQueuedMessages()):this._deferredMap[c]&&("ERROR_RESPONSE"===b?this._deferredMap[c].reject(a.data.errorMessage):(this._deferredMap[c].resolve(a.data.settingData),delete this._deferredMap[c]))},isStarted:function(){return this._serviceStarted},
stop:function(){this._peerModelSynchronizer.stop();this._sendMessage("/matlab/settings",{type:a.STOP_SERVICE});this._serviceStarted=!1},getSetting:function(b,c){var d=new e,f=h(this._deferredMap);this._deferredMap[f]=d;this._sendMessage("/matlab/settings",{type:a.GET_SETTING,uuid:f,settingsGroup:b,setting:c});return d.promise},setSetting:function(b,c,d){var f=new e,g=h(this._deferredMap);this._deferredMap[g]=f;this._sendMessage("/matlab/settings",{type:a.SET_SETTING,uuid:g,settingsGroup:b,setting:c,
value:d});return f.promise},listenTo:function(a,b,c){return this._peerModelSynchronizer.listenTo(a,b,c)},getAllSettingsForSettingGroup:function(a){return this._peerModelSynchronizer.getAllSettingsForSettingGroup(a)}}));g.start();return g})},"settings/messageTypesToJava":function(){define([],function(){return{GET_SETTING:"GET_SETTING",SET_SETTING:"SET_SETTING",STOP_SERVICE:"STOP_SERVICE",START_SERVICE:"START_SERVICE"}})},"settings/SettingsPeerModelSynchronizer":function(){define(["dojo/Evented","dojo/_base/declare",
"dojo/_base/lang","dojo/Deferred","mw-peermodel/PeerModelManager"],function(g,f,e,d,b){return f([g],{_serviceStarted:!1,_settingsPeerModelManager:b.getInstance("/matlabsettingdatastore"),_rootSetEventListener:null,_propertySetListener:null,_rootSetPromise:null,constructor:function(){},isStarted:function(){return this._serviceStarted},start:function(){this.isStarted()||(this._initializePeerModelStore(),this._serviceStarted=!0)},stop:function(){this._settingsPeerModelManager.removeEventListener("rootSet",
this._rootSetEventListener);this._settingsPeerModelManager.hasRoot()&&this._settingsPeerModelManager.getRoot().removeEventListener("propertySet",this._propertySetListener);this._rootSetPromise.cancel();this._serviceStarted=!1},listenTo:function(a,b,d){a=e.partial(function(a,b,c,d){var e=a.join(".")+"."+b;d=d.data;e===d.key&&c({settingGroup:a,setting:b,newValue:d.newValue,oldValue:d.oldValue})},a,b,d);return this.on("settingChanged",a)},getAllSettingsForSettingGroup:function(a){var b=new d;this._rootSetPromise.then(function(b){var c=
[],d=a.join("."),e=this._settingsPeerModelManager.getRoot();Object.keys(e.getProperties()).forEach(function(a){if(0===a.indexOf(d)){a=a.split(".");var b=a.slice(0,a.length-1);c.push({settingsGroup:b,setting:a[a.length-1]})}});b.resolve(c)}.bind(this,b));return b.promise},_initializePeerModelStore:function(){this._rootSetPromise=new d;this._settingsPeerModelManager.isSyncEnabled()||this._settingsPeerModelManager.setSyncEnabled(!0);this._rootSetEventListener=function(){var a=this._settingsPeerModelManager.getRoot();
this._propertySetListener=this._handlePeerModelPropertySet.bind(this);a.addEventListener("propertySet",this._propertySetListener);this._rootSetPromise.resolve()}.bind(this);this._settingsPeerModelManager.addEventListener("rootSet",this._rootSetEventListener)},_handlePeerModelPropertySet:function(a){this.emit("settingChanged",a)}})})},"MW/rtc/plugins/settings/matlab/MatlabSettingsUtilities":function(){define(["mw-log/Log"],function(g){return{syncSettingServiceWithMatlabSettings:function(f,e){var d=
[],b=this._initializeSettingEntry.bind(this,f,e,d);return e.getAllSettingsForSettingGroup(["matlab"]).then(function(a){a.forEach(b);return d})},_initializeSettingEntry:function(f,e,d,b){var a=e.getSetting(b.settingsGroup,b.setting),c=b.settingsGroup.join(".")+"."+b.setting;a.then(function(a){f.set(c,a.value)}.bind(this),function(a){g.error("Could not sync setting: "+a)});e=e.listenTo(b.settingsGroup,b.setting,function(a){f.set(c,a.newValue)}.bind(this));d.push(e)}}})},"MOTW/editor/plugins/textstyletoolstrip/TextStyleToolstripProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","./TextStyleToolstrip"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{createInstance:["rtc.richtext","rtc.actionservice","rtc.cursor"]}},createInstance:function(d,b,a){return new e(d,b,a)}})})},"MOTW/editor/plugins/textstyletoolstrip/TextStyleToolstrip":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/i18n!MOTW/l10n/nls/liveeditor MW/rtc/plugins/richtext/ParagraphFormatsEnum MW/rtc/plugins/richtext/RichTextUtilities".split(" "),
function(g,f,e,d,b,a){return g(null,{constructor:function(a,b,d){this._actionDataService=b;this._cursor=d;this._richText=a;this._actionDataService.loadActions([{id:"rtc_paragraph_style",enabled:!1}]);e.after(this._cursor,"onChange",f.hitch(this,"_updateActions"))},_updateActions:function(){var c=this._richText.getFormatAndStyle(),e=b.NORMAL;a.isRichTextParagraphFormat(c.format)&&(e=c.format);var c="smallNormalTextStyle",f=d.normal;switch(e){case b.TITLE:c="smallTitleTextStyle";f=d.title;break;case b.HEADING1:c=
"smallHeadingTextStyle";f=d.heading;break;case b.HEADING2:c="smallHeading2TextStyle";f=d.heading2;break;case b.HEADING3:c="smallHeading3TextStyle",f=d.heading3}this._actionDataService.updateAction("rtc_paragraph_style",{enabled:this._richText.canSetFormat(),text:f,icon:c})}})})},"MW/rtc/plugins/images/SimpleInsertImageProvider":function(){define(["dojo/_base/declare","MW/rtc/core/provider/PluginProvider","./SimpleInsertImage"],function(g,f,e){return g(f,{requires:function(){return{createInstance:["rtc.cursor",
"rtc.view","rtc.scrollpane","rtc.actionservice","rtc.richtext.images"]}},createInstance:function(d,b,a,c,f){return new e(d,b,a,c,f)},priority:function(){return 2},destroyInstance:function(d){d.destroy()}})})},"MW/rtc/plugins/images/SimpleInsertImage":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/dom-construct dojo/dom-style dojo/on mw-log/Log MW/rtc/abstract/AbstractPlugin".split(" "),function(g,f,e,d,b,a,c,h){return g(h,{constructor:function(b,c,g,h,n){this._cursor=b;this._view=
c;this._imagesPlugin=n;this._actionService=h;this._actionService.loadActions([{id:"rtc_image",enabled:!1,callback:f.hitch(this,"_insertImage")}]);this._hiddenField=d.create("input",{type:"file",accept:"image/*",style:{display:"none"}});d.place(this._hiddenField,g);this.own(a(this._hiddenField,"change",f.hitch(this,"_handleImageFileInputChange")));this._fileReader=new FileReader;this.own(a(this._fileReader,"load",f.hitch(this,"_imageLoaded")));this.own(e.after(this._cursor,"onChange",f.hitch(this,
this._updateActions)))},_updateActions:function(){this._actionService.updateAction("rtc_image",{enabled:this._canInsertImage()})},_insertImage:function(){this._actionService.getAction("rtc_image").enabled&&(c.assert(this._canInsertImage(),"Insert image action called even though it should have been disabled."),this._hiddenField.click())},_handleImageFileInputChange:function(a){0>=this._hiddenField.files.length||this._fileReader.readAsDataURL(this._hiddenField.files[0])},_canInsertImage:function(){return this._imagesPlugin.canInsertImage()},
_imageLoaded:function(a){this._putImage({imgSrc:a.target.result,altText:this._hiddenField.value.replace(/^.*(\\|\/|\:)/,"")});this._hiddenField.value=""},_putImage:function(a){var b=this._imagesPlugin.getWidthToFitOnScreen();this._imagesPlugin.startImageChange();a=this._imagesPlugin.insertImageFromData(a);this._view.layoutNode(a);a.box.naturalWidth>b&&(a.width=b);this._imagesPlugin.endImageChange(a)},destroy:function(){d.destroy(this._hiddenField);this.inherited(arguments)}})})},"MOTW/editor/toolstrip/ExecutionControlsToolstripProvider":function(){define(["./ExecutionControlsToolstrip",
"dojo/_base/declare","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/debug/DebugServicesFactory"],function(g,f,e,d){return f(e,{isApplicable:function(){return!0},requires:function(){return{createInstance:["liveeditor.toolstripmanager","matlab.services.busyidle","rtc.featureinterface"]}},createInstance:function(b,a,c){var e=d.getInstance();return new g(b,a,c,e)}})})},"MOTW/editor/toolstrip/ExecutionControlsToolstrip":function(){define(["dojo/aspect","dojo/_base/declare","dojo/_base/lang","mw-log/Log",
"MW/rtc/abstract/AbstractPlugin"],function(g,f,e,d,b){var a=null;return f(b,{_RUN_TAG:"motwToolstrip.liveEditorTab.run.runAll",_PAUSE_TAG:"motwToolstrip.liveEditorTab.run.pause",_CONTINUE_TAG:"motwToolstrip.liveEditorTab.run.continue",constructor:function(b,d,f,l){this._toolstripManager=b;this._busyIdleManager=d;this._debugServices=l;a=this;this._setInitialState();this.own(g.after(this._busyIdleManager,"onIdleBusyStatusChange",e.hitch(this,"_handleBusyIdleStatusChange"),!0));this.own(g.after(this._debugServices,
"onDebugModeChanged",e.hitch(this,"_handleDebugModeChanged"),!0));this.own(g.after(f,"onActivated",e.hitch(this,"_handleActivated")))},_removeButtonsIfNeeded:function(){this._toolstripManager.isParented(this._RUN_TAG)&&(this._toolstripManager.isParented(this._CONTINUE_TAG)&&this._toolstripManager.isParented(this._PAUSE_TAG))&&(this._toolstripManager.replace(this._CONTINUE_TAG,null),this._toolstripManager.replace(this._PAUSE_TAG,null))},_setInitialState:function(){this._removeButtonsIfNeeded();this._debugServices.isDebugging&&
this._showContinue();this._busyIdleManager.isBusy()&&this._showPause()},_handleBusyIdleStatusChange:function(a){a?this._showPause():this._debugServices.isDebugging?this._showContinue():this._showRun()},_handleDebugModeChanged:function(a){a?this._showContinue():this._showRun()},_handleActivated:function(){a=this},_isActive:function(){return a===this},_showRun:function(){this._showTag(this._RUN_TAG)},_showContinue:function(){this._showTag(this._CONTINUE_TAG)},_showPause:function(){this._showTag(this._PAUSE_TAG)},
_showTag:function(a){if(this._isActive()){var b=this._getTagThatIsInToolstrip();b||d.assert("None of Run/Continue/Pause are showing in the toolstrip");b!==a&&this._toolstripManager.replace(b,a)}},_getTagThatIsInToolstrip:function(){return this._toolstripManager.isParented(this._RUN_TAG)?this._RUN_TAG:this._toolstripManager.isParented(this._PAUSE_TAG)?this._PAUSE_TAG:this._toolstripManager.isParented(this._CONTINUE_TAG)?this._CONTINUE_TAG:null},destroy:function(){this.inherited(arguments);a===this&&
(a=null)}})})},"MOTW/editor/plugins/busyidle/BusyIdleServicesProvider":function(){define(["dojo/_base/declare","MOTW/editor/plugins/busyidle/BusyIdleServices","MW/rtc/core/provider/PluginProvider","MW/rtc/plugins/debug/DebugServicesFactory","mw-messageservice/MessageService"],function(g,f,e,d,b){return g(e,{isApplicable:function(){return!0},requires:function(){return{isApplicable:[],createInstance:["rtc.executionservice"]}},createInstance:function(a){var c=d.getInstance();return new f(a,c,b)},priority:function(){return 100}})})},
"MOTW/editor/plugins/busyidle/BusyIdleServices":function(){define(["dojo/aspect","dojo/_base/declare","dojo/_base/lang","MW/rtc/plugins/execution/AbstractBusyIdleService"],function(g,f,e,d){return f(d,{EVAL_STARTED_CHANNEL:"/liveeditor/evaluation/eval-started",EVAL_ENDED_CHANNEL:"/liveeditor/evaluation/eval-ended",constructor:function(b,a,c){this._executionService=b;this._debugServices=a;this._messageService=c;this._isBusy=null;this._handleExecutionStateChange(this._executionService.executionState);
this.own(g.after(this._executionService,"onExecutionStateChange",e.hitch(this,"_handleExecutionStateChange"),!0));this.own(g.after(this._debugServices,"onDBCont",e.hitch(this,"_handleDBCont")));this.own(g.after(this._debugServices,"onDBStop",e.hitch(this,"_handleDBStop")));this._messageService.subscribe(this.EVAL_STARTED_CHANNEL,"_handleLiveEditorStarted",this);this._messageService.subscribe(this.EVAL_ENDED_CHANNEL,"_handleLiveEditorEnded",this)},isBusy:function(){return this._isBusy},_transitionToState:function(b){this._isBusy!==
b&&(this._isBusy=b,this.onIdleBusyStatusChange(b))},_handleExecutionStateChange:function(b){var a=!1;switch(b){case this._executionService.EXECUTION_STATES.BUSY:a=!0;break;case this._executionService.EXECUTION_STATES.READY:case this._executionService.EXECUTION_STATES.DEBUG:case this._executionService.EXECUTION_STATES.KEYBOARD:case this._executionService.EXECUTION_STATES.PAUSE:case this._executionService.EXECUTION_STATES.INPUT:case this._executionService.EXECUTION_STATES.COMPLETING_BLOCK:a=!1}this._transitionToState(a)},
_handleDBCont:function(){this._transitionToState(!0)},_handleDBStop:function(){this._transitionToState(!1)},_handleLiveEditorStarted:function(){this._transitionToState(!0)},_handleLiveEditorEnded:function(){this._transitionToState(!1)},destroy:function(){this.inherited(arguments);this._messageService.unsubscribe(this.EVAL_STARTED_CHANNEL,"_handleLiveEditorStarted",this);this._messageService.unsubscribe(this.EVAL_ENDED_CHANNEL,"_handleLiveEditorEnded",this)}})})},"MOTW/editor/plugins/save/MatlabOnlineSaveReadyPluginProvider":function(){define(["dojo/_base/declare",
"MW/rtc/core/provider/PluginProvider","MOTW/editor/plugins/save/MatlabOnlineSaveReadyPlugin"],function(g,f,e){return g(f,{isApplicable:function(){return!0},requires:function(){return{createInstance:["rtc.saveready.manager"]}},createInstance:function(d){return new e(d)}})})},"MOTW/editor/plugins/save/MatlabOnlineSaveReadyPlugin":function(){define("dojo/aspect dojo/Deferred dojo/_base/declare dojo/_base/lang MOTW/editor/plugins/save/MatlabOnlineSaveHandlerFactory MW/rtc/abstract/AbstractPlugin".split(" "),
function(g,f,e,d,b,a){return e([a],{constructor:function(a){this._saveReadyManager=a;b.getInstance().registerSaveReadyPlugin(this._saveReadyManager)},destroy:function(){this.inherited(arguments);b.getInstance().unregisterSaveReadyPlugin(this._saveReadyManager)}})})},"MOTW/editor/LiveEditorTabGroupFactory":function(){define(["dojo/_base/declare","MW/uiframework/uicontainer/UIComponentFactory","MOTW/editor/EditorFactoryUtils","./toolstrip/LiveEditorTabGroupConfig","./toolstrip/LiveEditorTabGroupPopupsConfig"],
function(g,f,e,d,b){return g([f],{modulePath:"MOTW/editor/LiveEditorTabGroupFactory",createWidget:function(a,c){e.ensureActionsLoaded(a);var f=a.uiBuilder;f.createPopupsFromConfig(b);f.addTabGroupFromConfig(d,"motwToolstrip.liveEditorTabGroup")}})})},"MOTW/editor/EditorFactoryUtils":function(){define(["MOTW/editor/actions/ActionProviderFactory","dojo/dom-style"],function(g,f){return{ensureActionsLoaded:function(e){var d=e.getRootUIContainer().application.editorService;d&&!d.hasActionProviders(window)&&
(e=g.createActionProviders(d,e.actionService),d.setActionProviders(e,window))}}})},"MOTW/editor/actions/ActionProviderFactory":function(){define("dojo/_base/lang MOTW/editor/actions/GlobalActionProvider MOTW/editor/language/matlab/ActionProvider MOTW/editor/language/matlab/EditSectionActionProvider MOTW/editor/language/matlab/MatlabActionProvider MOTW/editor/language/matlab/PublishTabActionProvider MOTW/editor/language/matlab/LiveEditorToolstripActionProvider".split(" "),function(g,f,e,d,b,a,c){return{createActionProviders:function(e,
g,l){return{globalActionProvider:new f(g),matlabActionProvider:new b(e,g,e.executionDataService),editSectionActionProvider:new d(e,g),publishTabActionProvider:new a(e,g,l),liveEditorActionProvider:new c(e,g),actionService:g}}}})},"MOTW/editor/actions/GlobalActionProvider":function(){define("dojo/_base/declare dojo/_base/lang MOTW/editor/language/matlab/ActionProvider MOTW/motw/ActionIdConstants MOTW/motw/CoreActions mw-log/Log".split(" "),function(g,f,e,d,b,a){return g(e,{constructor:function(c){a.assert(c,
"Must supply actionService");var e=[d.SAVE,d.NEW_FILE,d.NEW_FILE_LIVE_EDITOR,d.NEW_LIVE_SCRIPT,d.NEW_FUNCTION,d.NEW_LIVE_FUNCTION,d.NEW_EXAMPLE,d.NEW_CLASS,d.SAVE,d.FIND_FILES];b.setupComplete||b.setup();b.actions.forEach(function(a){0<=e.indexOf(a.id)&&!c.getAction(a.id)&&c.addAction(a)})}})})},"MOTW/editor/language/matlab/ActionProvider":function(){define(["dojo/_base/declare","mw-log/Log"],function(g,f){return g(null,{updateActions:function(e){throw Error("Unimplemented API: MW.editor.language.matlab.ActionProvider.updateActions");
}})})},"MOTW/editor/language/matlab/EditSectionActionProvider":function(){define("dojo/_base/declare dojo/_base/lang MOTW/editor/EditorFileUtils MOTW/editor/actions/ActionIdConstants MOTW/editor/actions/EditSectionActions MOTW/editor/language/matlab/ActionProvider MW/rtc/RichTextComponentFeatureEnum mw-log/Log".split(" "),function(g,f,e,d,b,a,c,h){return g(a,{constructor:function(a,c){h.assert(a,"Must supply editorService");h.assert(c,"Must supply actionService");this.editorService=a;this.actionService=
c;this.actionService.loadActions(b.actions)},updateActions:function(a){if(this.actionService){var b=e.isExtensionM(a),c=e.isNotSharedAndLatestAndEditable(a);a=e.isEditable(a)&&e.isExtensionMorMLN(a);this.actionService.updateAction(d.SMART_INDENT,{enabled:a,callback:f.hitch(this,this._reformatCodeAction)});this.actionService.updateAction(d.INDENT,{enabled:b&&c,callback:f.hitch(this,this._indent)});this.actionService.updateAction(d.OUTDENT,{enabled:b&&c,callback:f.hitch(this,this._outdent)});this.actionService.updateAction(d.INSERT_COMMENT,
{enabled:b&&c,callback:f.hitch(this,this._insertComment)});this.actionService.updateAction(d.UNCOMMENT,{enabled:b&&c,callback:f.hitch(this,this._uncomment)});this.actionService.updateAction(d.INSERT_SECTION,{enabled:b&&c,callback:f.hitch(this,this._insertSection)})}},_reformatCodeAction:function(){var a=this.editorService.getActiveEditor(window);a.editor.getActionDataService().executeAction(c.FORMAT_CODE.SMART_INDENT_ACTION);a.focus()},_indent:function(){var a=this.editorService.getActiveEditor(window);
a.editor.getActionDataService().executeAction(c.INDENT.INDENT_ACTION);a.editor.focus()},_outdent:function(){var a=this.editorService.getActiveEditor(window);a.editor.getActionDataService().executeAction(c.INDENT.OUTDENT_ACTION);a.editor.focus()},_insertComment:function(){var a=this.editorService.getActiveEditor(window);a.editor.getActionDataService().executeAction(c.COMMENT.COMMENT_ACTION);a.editor.focus()},_uncomment:function(){var a=this.editorService.getActiveEditor(window);a.editor.getActionDataService().executeAction(c.COMMENT.UNCOMMENT_ACTION);
a.editor.focus()},_insertSection:function(){var a=this.editorService.getActiveEditor(window);a.editor.getActionDataService().executeAction(c.SECTIONS.INSERT_SECTION_ACTION);a.editor.focus()}})})},"MOTW/editor/EditorFileUtils":function(){define(["mw-filename-utils/FileNameUtil"],function(g){return{isExtensionM:function(f){return this._isEditorHasExtension("m",f)},isExtensionMLN:function(f){return this._isEditorHasExtension("mln",f)},isExtensionMorMLN:function(f){return this.isExtensionM(f)||this.isExtensionMLN(f)},
isLatest:function(f){return f._isLatest},isShared:function(f){return(f=f.getFile().fileInfo.shareAttributes)&&f.isConsumed},isEditable:function(f){return f&&f.isEditable()},isNotSharedAndLatest:function(f){return this.isLatest(f)&&!this.isShared(f)},isNotSharedAndLatestAndEditable:function(f){return this.isEditable(f)&&this.isLatest(f)&&!this.isShared(f)},_isEditorHasExtension:function(f,e){return!e?!1:g.checkFileNameExtension(e.getFile().fileInfo.name,f)}}})},"MOTW/editor/actions/EditSectionActions":function(){define(["MOTW/editor/actions/ActionIdConstants",
"dojo/i18n!MOTW/l10n/nls/editor","mw-log/Log"],function(g,f,e){var d={};d.actions=[{id:g.INSERT_SECTION,enabled:!0,description:f.insertSectionDescription,text:f.insertSectionLabel,icon:"smallInsertSection",quickAccessIcon:"smallInsertSection",callback:function(){e.warn("Action "+g.INSERT_SECTION+" doesn't do anything yet.")}},{id:g.INSERT_COMMENT,shortcut:f.insertCommentShortcut,platformShortcut:{mac:"meta+/"},enabled:!0,description:f.insertCommentDescription,icon:"smallInsertComment",quickAccessIcon:"smallInsertComment",
callback:function(){e.warn("Action "+g.INSERT_COMMENT+" doesn't do anything yet.")}},{id:g.SMART_INDENT,shortcut:f.smartIndentShortcut,enabled:!0,description:f.smartIndentDescription,text:f.smartIndentLabel,icon:"smallSmartIndent",quickAccessIcon:"smallSmartIndent",callback:function(){e.warn("Action "+g.SMART_INDENT+" doesn't do anything yet.")}},{id:g.UNCOMMENT,enabled:!0,description:f.uncommentDescription,icon:"smallUncomment",quickAccessIcon:"smallUncomment",callback:function(){e.warn("Action "+
g.UNCOMMENT+" doesn't do anything yet.")}},{id:g.INDENT,shortcut:f.indentShortcut,enabled:!0,description:f.indentDescription,icon:"smallIndent",quickAccessIcon:"smallIndent",callback:function(){e.warn("Action "+g.INDENT+" doesn't do anything yet.")}},{id:g.OUTDENT,shortcut:f.outdentShortcut,enabled:!0,description:f.outdentDescription,icon:"smallOutdent",quickAccessIcon:"smallOutdent",callback:function(){e.warn("Action "+g.OUTDENT+" doesn't do anything yet.")}}];return d})},"MOTW/editor/language/matlab/MatlabActionProvider":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect MOTW/motw/ActionIdConstants mw-log/Log MOTW/editor/EditorFileUtils MOTW/editor/actions/ActionIdConstants MOTW/editor/actions/CoreActions MOTW/editor/language/matlab/ActionProvider".split(" "),
function(g,f,e,d,b,a,c,h,k){return g(k,{constructor:function(a,d,e){b.assert(a,"Must supply editorService");b.assert(d,"Must supply actionService");b.assert(e,"Must supply executionService");this.editorService=a;this.actionService=d;this.executionService=e;this.actionService.loadActions(h.actions);this.actionService.updateAction(c.RUN_CELL,{callback:f.hitch(this,this._evaluateActiveCell)});this.actionService.updateAction(c.ADVANCE_CELL,{callback:f.hitch(this,this._advanceCell,!1)});this.actionService.updateAction(c.RUN_CELL_ADVANCE,
{callback:f.hitch(this,this._evaluateActiveCellAndAdvance)});this.actionService.updateAction(c.GOTO_LINE,{callback:f.hitch(this,this._executeDialogActionCallback,"rtc_goTo_dialog")});this.actionService.updateAction(c.FIND,{callback:f.hitch(this,this._executeDialogActionCallback,"rtc_find_dialog")});this.actionService.updateAction(c.FIND_NEXT,{callback:f.hitch(this,this._executeDialogActionCallback,"rtc_find_dialog_find_next_key")});this.actionService.updateAction(c.FIND_PREVIOUS,{callback:f.hitch(this,
this._executeDialogActionCallback,"rtc_find_dialog_find_previous_key")});this.actionService.updateAction(c.FIND_SELECTION,{callback:f.hitch(this,this._executeDialogActionCallback,"rtc_find_dialog_find_selection_key")});this.actionService.updateAction(c.CLEAR_ALL_BREAKPOINTS,{callback:f.hitch(this,this._executeDialogActionCallback,"rtc_clear_all_breakpoints")});this.actionService.updateAction(c.TOGGLE_BREAKPOINT,{callback:f.hitch(this,this._executeDialogActionCallback,"rtc_toggle_breakpoint")});this.actionService.updateAction(c.TOGGLE_ENABLE_BREAKPOINT,
{callback:f.hitch(this,this._executeDialogActionCallback,"rtc_toggle_enable_breakpoint")});this.actionService.updateAction(c.RUN,{callback:f.hitch(this,function(){this.editorService.getActiveEditor(window).evaluate()})});this._isGoToSetup=!1},setupEditor:function(a){this._setupPlugins(a);this._setupActionDataService(a)},_setupActionDataService:function(a){a.editor.own(e.after(a.editor.localActionService,"onActionChange",f.hitch(this,function(a){var b={rtc_find_dialog:c.FIND,rtc_find_dialog_find_next_key:c.FIND_NEXT,
rtc_find_dialog_find_previous_key:c.FIND_PREVIOUS,rtc_find_dialog_find_selection_key:c.FIND_SELECTION};b[a.id]&&(a.id=b[a.id],this.actionService.onActionChange(a))}),!0))},updateActions:function(b){if(b){var e=a.isLatest(b),f=a.isExtensionM(b),g=a.isExtensionMLN(b),h=a.isExtensionMorMLN(b);this.actionService.updateAction(c.RUN,{enabled:h&&e&&!b.debugServices.isDebugging});this._updateGoToSectionsListState();this._updateBreakpointActions(f);f&&e?this._updateCellActions():(this.actionService.updateAction(c.RUN_CELL,
{enabled:!1}),this.actionService.updateAction(c.RUN_CELL_ADVANCE,{enabled:!1}),this.actionService.updateAction(c.ADVANCE_CELL,{enabled:!1}));this.actionService.updateAction(c.EXPORT_AS_MFILE,{enabled:g});this.actionService.updateAction(d.OPEN_AS_NOTEBOOK,{enabled:f})}},_evaluateActiveCell:function(){var c=this.editorService.getActiveEditor(window);b.assert(a.isExtensionM(c),"Evaluate cell is only valid for MATLAB files.");b.assert(this._cellModeActiveAndHasCell(),"Evaluate cell is only valid when cell mode is enabled and a cell exists.");
c.editor._pluginResolver.getDependency("rtc.code.sections").evaluateActiveSection();c.focus()},_updateGoToSectionsListState:function(){var a=this.editorService.getActiveEditor(window);a&&(a=a.editor._pluginResolver.getDependency("rtc.navigate.goto"))&&a.setActiveGoToHandlerInstance(a)},_setupPlugins:function(a){b.assert(a,"Editor instance can not be null or undefined");a=a.editor._pluginResolver.getDependency("rtc.navigate.goto");b.assert(a,"Current editor should have an active goto instance");this._isGoToSetup||
(a.setupGoToToolStripButton(),this._isGoToSetup=!0);a.setActiveGoToHandlerInstance(a)},_advanceCell:function(c){var d=this.editorService.getActiveEditor(window);b.assert(a.isExtensionM(d),"Advance cell is only valid for MATLAB files.");d.editor._pluginResolver.getDependency("rtc.code.sections").gotoNextSection(c);d.focus()},_evaluateActiveCellAndAdvance:function(){this._evaluateActiveCell();this._advanceCell(!0)},_updateCellActions:function(){var a=this._cellModeActiveAndHasCell(),b=this.actionService.getAction(c.RUN);
this.actionService.updateAction(c.RUN_CELL,{enabled:a&&b.enabled});this.actionService.updateAction(c.RUN_CELL_ADVANCE,{enabled:a&&b.enabled});this.actionService.updateAction(c.ADVANCE_CELL,{enabled:a&&b.enabled})},_updateBreakpointActions:function(a){this.actionService.updateAction(c.TOGGLE_BREAKPOINT,{enabled:a});this.actionService.updateAction(c.TOGGLE_ENABLE_BREAKPOINT,{enabled:a})},_cellModeActiveAndHasCell:function(){var a=this.editorService.getActiveEditor(window);if(!a)return!1;var b=!1;return(b=
(a=a.editor._pluginResolver.getDependency("rtc.code.sections"))&&a.hasSection())?!0:!1},_executeDialogActionCallback:function(a){this.editorService.getActiveEditor(window).editor.localActionService.executeAction(a)}})})},"MOTW/editor/actions/CoreActions":function(){define("MOTW/dialog/SaveAsDialog MOTW/dialog/SpecifyNewFilenameDialog MOTW/dialog/SupportedFileNameUtil MOTW/editor/actions/ActionIdConstants MOTW/editor/actions/SaveAsLiveScript MOTW/motw/MotwApp mw-dialog-utils/DialogDisplayUtilities mw-filename-utils/FileNameUtil dojo/i18n!MOTW/l10n/nls/motw dojo/i18n!MOTW/l10n/nls/editor dojo/_base/lang dojo/has dojo/on mw-log/Log".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q){var r={};r.actions=[{id:d.RUN,enabled:!1,key:"f5",platformKey:{mac:"meta_alt_r"},text:l.runLabel,description:l.runDescription,icon:"run_24",quickAccessIcon:"run_16",callback:function(){q.warn("Action "+d.RUN+" doesn't do anything yet.")}},{id:d.RUN_CELL,key:"ctrl_enter",shortcut:l.runCellShortcut,platformKey:{mac:"meta_enter"},enabled:!1,text:l.runCellLabel,description:l.runCellDescription,icon:"smallRunCell",quickAccessIcon:"smallRunCell",callback:function(){q.warn("Action "+
d.RUN_CELL+" doesn't do anything yet.")}},{id:d.RUN_CELL_ADVANCE,enabled:!1,key:"ctrl_shift_enter",platformKey:{mac:"meta_shift_enter"},text:l.runCellAdvanceLabel,description:l.runCellAdvanceDescription,icon:"bigRunCellAdvance",quickAccessIcon:"smallRunCellAdvance",callback:function(){q.warn("Action "+d.RUN_CELL_ADVANCE+" doesn't do anything yet.")}},{id:d.ADVANCE_CELL,key:"Ctrl_down",shortcut:l.advanceCellShortcut,platformKey:{mac:"meta_down"},enabled:!1,text:l.advanceCellLabel,description:l.advanceCellDescription,
icon:"smallAdvanceCell",quickAccessIcon:"smallAdvanceCell",callback:function(){q.warn("Action "+d.ADVANCE_CELL+" doesn't do anything yet.")}},{id:d.TOGGLE_STOP_IF_ERROR,enabled:!0,text:l.stopIfErrorText,description:l.stopIfErrorDescription,callback:function(){q.warn("Action "+d.TOGGLE_STOP_IF_ERROR+" doesn't do anything yet.")}},{id:d.TOGGLE_STOP_IF_WARNING,enabled:!0,text:l.stopIfWarningText,description:l.stopIfWarningDescription,callback:function(){q.warn("Action "+d.TOGGLE_STOP_IF_WARNING+" doesn't do anything yet.")}},
{id:d.TOGGLE_STOP_IF_NAN_INF,enabled:!0,text:l.stopIfNanInfText,description:l.stopIfNanInfDescription,callback:function(){q.warn("Action "+d.TOGGLE_STOP_IF_NAN_INF+" doesn't do anything yet.")}},{id:d.GOTO,enabled:!0,text:l.goToLabel,description:l.goToDescription,icon:"smallGoTo",quickAccessIcon:"smallGoTo",hasDynamicPopup:!0,popupTag:"motwToolstrip.editorTab.navigate.goTo.goToList",callback:function(){a.actionService.executeAction(d.GOTO_LINE)}},{id:d.GOTO_LINE,enabled:!0,text:l.goToLineLabel,shortcut:p("safari")?
"":l.goToShortcut,platformShortcut:{mac:p("safari")?"":"meta+l"},description:l.goToLineDescription,icon:"bigGoTo",quickAccessIcon:"smallGoTo",callback:function(){q.warn("Action "+d.GOTO+" doesn't do anything yet.")}},{id:d.FIND,enabled:!0,text:l.findLabel,shortcut:l.findShortcut,description:l.findDescription,icon:"smallFind",quickAccessIcon:"smallFind",popupTag:"motwToolstrip.editorTab.navigate.find.findList",callback:function(){q.warn("Action "+d.FIND+" doesn't do anything yet.")}},{id:d.FIND_NEXT,
enabled:!1,text:l.findNextLabel,shortcut:l.findNextShortcut,platformShortcut:{mac:"meta+g"},callback:function(){q.warn("Action "+d.FIND_NEXT+" doesn't do anything yet.")}},{id:d.FIND_PREVIOUS,enabled:!1,text:l.findPreviousLabel,shortcut:l.findPreviousShortcut,platformShortcut:{mac:"meta+shift+g"},callback:function(){q.warn("Action "+d.FIND_PREVIOUS+" doesn't do anything yet.")}},{id:d.FIND_SELECTION,enabled:!1,text:l.findSelectionLabel,shortcut:l.findSelectionShortcut,platformShortcut:{mac:"meta+e"},
callback:function(){q.warn("Action "+d.FIND_SELECTION+" doesn't do anything yet.")}},{id:d.CLEAR_ALL_BREAKPOINTS,enabled:!0,text:l.clearAllBreakpointsLabel,description:l.clearAllBreakpointsDescription,icon:"bigClearAllBreakpoints",quickAccessIcon:"smallClearAllBreakpoints",callback:function(){q.warn("Action "+d.CLEAR_ALL_BREAKPOINTS+" doesn't do anything yet.")}},{id:d.TOGGLE_BREAKPOINT,enabled:!0,text:l.toggleBreakpointLabel,description:l.toggleBreakpointDescription,shortcut:l.toggleBreakpointShortcut,
platformShortcut:{mac:l.toggleBreakpointShortcutMac},icon:"bigToggleBreakpoint",quickAccessIcon:"smallToggleBreakpoint",callback:function(){q.warn("Action "+d.TOGGLE_BREAKPOINT+" doesn't do anything yet.")}},{id:d.BREAKPOINTS,enabled:!0,text:l.breakpointsLabel,description:l.breakpointsDescription,icon:"bigBreakpoints",quickAccessIcon:"smallBreakpoints",popupTag:"motwToolstrip.editorTab.breakpoints.breakpointList",callback:function(){q.warn("Action "+d.CLEAR_ALL_BREAKPOINTS+" doesn't do anything yet.")}},
{id:d.TOGGLE_ENABLE_BREAKPOINT,enabled:!0,text:l.toggleEnableBreakpointLabel,description:l.toggleEnableBreakpointDescription,icon:"bigToggleEnableBreakpoint",quickAccessIcon:"smallToggleEnableBreakpoint",callback:function(){q.warn("Action "+d.TOGGLE_ENABLE_BREAKPOINT+" doesn't do anything yet.")}},{id:d.VERSION_LIST,enabled:!1,label:"displayName",items:[],selectedItem:"",editable:!1,callback:function(){var b=a.editorVersioningService.getActiveController();b&&b.versionDropDownOpen()}},{id:d.GET_OLDER_VERSION,
enabled:!1,text:l.getOlderVersionLabel,description:l.getOlderVersionDescription,icon:"icon_file_version_older_24",quickAccessIcon:"icon_file_version_older_16",callback:function(){var b=a.editorVersioningService.getActiveController();b&&b.olderButtonClick()}},{id:d.GET_NEWER_VERSION,enabled:!1,text:l.getNewerVersionLabel,description:l.getNewerVersionDescription,icon:"icon_file_version_newer_24",quickAccessIcon:"icon_file_version_newer_16",callback:function(){var b=a.editorVersioningService.getActiveController();
b&&b.newerButtonClick()}},{id:d.RESTORE_AS_LATEST,enabled:!1,text:l.restoreAsLatestLabel,description:l.restoreAsLatestDescription,icon:"icon_file_version_restore_24",quickAccessIcon:"icon_file_version_restore_16",callback:function(){var b=a.editorVersioningService.getActiveController();b&&b.restoreButtonClick()}},{id:d.SAVEAS,platformKey:{mac:"meta_shift_s"},enabled:!1,icon:"save_as_24",quickAccessIcon:"save_as_16",text:l.saveAsLabel,description:l.saveAsDescription,callback:function(){var c="",d=
"",l=a.fileDataService.currentWorkingFolder,m=function(){if(c&&""!==c){var e=h.pathFromFileInfo(l),f="",f=""!==d?h.createEmptyFileObject(e,d.getFileName()):h.createEmptyFileObject(e,c.getFileName());if(h.isLiveScriptFile(f.fileInfo.name)){var g=a.editorService.getActiveEditor(window).getFile().fileInfo.location,g=h.createFilePath(g,c.startValue),e=h.createFilePath(e,c.getFileName());b.doConvert(g,e).then(function(b){a.fileDataService.openedFilesDataStore.put(dojo.mixin(f,{modifiedDate:null,savePending:!1,
id:h.pathFromFileInfo(f.fileInfo)}));a.fileDataService.onFileOpen(f)})}else f.content=a.editorService.getActiveEditor(window).getFile().content,a.fileDataService.createFile(f,!1)}u("saveAs")},p=function(){u("saveAs");n.emit(document.body,"restorefocus",{bubbles:!0})},q=k.saveAsDialogTitle,r=a.editorService.getActiveEditor(window).getFile().fileInfo.name,s=-1===r.lastIndexOf(".")?r.length:r.lastIndexOf("."),c=new g({fileDataService:a.fileDataService,placeHolder:k.FileDialogPlaceholder,startValue:r,
fileLocation:h.pathFromFileInfo(l),numSelectedChars:s,saveAsNameLabel:k.saveAsFileNameLabel,okAction:function(){var b=c.getFileName();!e.SUPPORTED_FILENAME_PATTERN.test(b)||b.length>h.MATLAB_NAME_LENGTH?d=new f({fileDataService:a.fileDataService,filename:b,okAction:m,cancelAction:p,fileLocation:h.pathFromFileInfo(l)}):m()},cancelAction:p});c.onClose=function(){u("saveAs");n.emit(document.body,"restorefocus",{bubbles:!0})};t(c,{id:"saveAs",layoutId:"newDialog",title:q})}},{id:d.EXPORT_AS_MFILE,enabled:!1,
text:l.exportAsMFileLabel,description:l.exportAsMFileDescription,callback:function(){var b="",c=a.fileDataService.currentWorkingFolder,d=a.editorService.getActiveEditor(window);if(d){var e=d.getMatlabCellModeText(),d=k.saveAsDialogTitle,b=new g({fileDataService:a.fileDataService,placeHolder:k.FileDialogPlaceholder,fileLocation:h.pathFromFileInfo(c),saveAsNameLabel:k.saveAsFileNameLabel,okAction:function(){if(b&&""!==b){var d=h.pathFromFileInfo(c),d=h.createEmptyFileObject(d,b.getFileName());d.content=
e||"";a.fileDataService.createFile(d,!1)}u("exportAsM")},cancelAction:function(){u("exportAsM");n.emit(document.body,"restorefocus",{bubbles:!0})}});b.onClose=function(){u("exportAsM");n.emit(document.body,"restorefocus",{bubbles:!0})};t(b,{id:"exportAsM",layoutId:"newDialog",title:d})}else q.warn("Export to .m called with no active editor")}},{id:d.UNDO_EDITOR,shortcut:l.undoEditorShortcut,platformShortcut:{mac:"meta+z"},enabled:!1,text:l.undoEditorLabel,description:l.undoEditorDescription,quickAccessIcon:"undo_16",
callback:function(){a.editorService.getActiveEditor(window).undo()}},{id:d.REDO_EDITOR,shortcut:l.redoEditorShortcut,platformShortcut:{mac:"shift+meta+z"},enabled:!1,text:l.redoEditorLabel,description:l.redoEditorDescription,quickAccessIcon:"redo_16",callback:function(){a.editorService.getActiveEditor(window).redo()}}];var s,t=function(b,d){if(a.layoutService)a.layoutService.addWidget(d.id,d.layoutId,b,d);else{var e={widget:b,refocus:!1};m.mixin(e,d);s=(new c).createModalDialogWrapper(e);s.show();
b.startup()}},u=function(b){a.layoutService?a.layoutService.removeWidget(b):s&&(s.destroyRecursive(),s=null)};return r})},"MOTW/editor/actions/SaveAsLiveScript":function(){define(["dojo/_base/Deferred","mw-messageservice/MessageService"],function(g,f){return{_EVENT_CONVERT_CONTENT_REQUEST_CHANNEL_PREFIX:"/mlx/service/convertContentRequest",_EVENT_CONVERT_CONTENT_RESPONSE_CHANNEL_PREFIX:"/mlx/service/convertContentResponse",doConvert:function(e,d){f.subscribe(this._EVENT_CONVERT_CONTENT_RESPONSE_CHANNEL_PREFIX,
"_handleConvertContentResponse",this);this._loaddeferred=new g;f.publish(this._EVENT_CONVERT_CONTENT_REQUEST_CHANNEL_PREFIX,{source:e,target:d});return this._loaddeferred.promise},_handleConvertContentResponse:function(e){e.data.status?(f.unsubscribe(this._EVENT_CONVERT_CONTENT_RESPONSE_CHANNEL_PREFIX,"_handleConvertContentResponse",this),this._loaddeferred.resolve("success")):this._loaddeferred.reject(e.data.message)}}})},"MOTW/editor/language/matlab/PublishTabActionProvider":function(){define("dojo/_base/declare dojo/aspect dojo/_base/lang MOTW/editor/EditorFileUtils MOTW/editor/actions/ActionIdConstants MOTW/editor/actions/PublishActions MOTW/editor/language/matlab/ActionProvider MW/uiframework/FeatureDetectionService mw-filename-utils/FileNameUtil mw-log/Log".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return g(c,{constructor:function(b,c,d){l.assert(b,"Must supply editorService");l.assert(c,"Must supply actionService");this.editorService=b;this.actionService=c;this.fileDataService=d;this.actionService.loadActions(a.actions);this._setupPublishActions();f.after(this.editorService,"onActiveEditor",e.hitch(this,"updateActions"),!0)},_setupPublishActions:function(){this.publishingPDF=this.publishingHTML=!1;var a=e.partial(function(a,b,c){a.updateAction(b,{enabled:c})},
this.actionService);this.actionService.updateAction(b.PUBLISH_AS_HTML,{callback:e.hitch(this,function(){h.getFeatureStatus(h.FeatureNames.NATIVE_PUBLISH)?this._evalPublishAndOpenCommandOnActiveFile("html"):(a(b.PUBLISH_AS_HTML,!1),this.publishingHTML=!0,this.editorService.getActiveEditor(window).publishAsHTML(e.hitch(this,function(){a(b.PUBLISH_AS_HTML,!0);this.publishingHTML=!1})))})});this.actionService.updateAction(b.PUBLISH_AS_PDF,{callback:e.hitch(this,function(){h.getFeatureStatus(h.FeatureNames.NATIVE_PUBLISH)?
this._evalPublishAndOpenCommandOnActiveFile("pdf"):(a(b.PUBLISH_AS_PDF,!1),this.publishingPDF=!0,this.editorService.getActiveEditor(window).publishAsPDF(e.hitch(this,function(){a(b.PUBLISH_AS_PDF,!0);this.publishingPDF=!1})))})})},_evalPublishAndOpenCommandOnActiveFile:function(a){var b=this.fileDataService.getUserPublishLocation(),c=this.editorService.getActiveEditor(window).file.fileInfo,b="open(publish('"+k.getPathForPublish(c,b)+"'";"pdf"===a&&(b+=", 'pdf'");this.editorService.executionDataService.executionEval(b+
"))")},updateActions:function(a){if(this.actionService){var c=d.isExtensionM(a),e=d.isNotSharedAndLatestAndEditable(a),e=c&&e;this._updateInsertSectionActions(e);this._updateInsertInlineMarkupActions(e);this._updateInsertBlockMarkupActions(e);a=d.isLatest(a);e=c&&a&&!this.publishingPDF;this.actionService.updateAction(b.PUBLISH_AS_HTML,{enabled:c&&a&&!this.publishingHTML});this.actionService.updateAction(b.PUBLISH_AS_PDF,{enabled:e})}},_updateInsertSectionActions:function(a){this.actionService.updateAction(b.NEW_SECTION,
{enabled:a,callback:e.hitch(this,this._insertSection)});this.actionService.updateAction(b.INSERT_SECTION_WITH_TITLE,{enabled:a,callback:e.hitch(this,this._insertSectionWithTitle)})},_updateInsertInlineMarkupActions:function(a){this.actionService.updateAction(b.BOLD,{enabled:a,callback:e.hitch(this,this._insertBoldMarkup)});this.actionService.updateAction(b.ITALIC,{enabled:a,callback:e.hitch(this,this._insertItalicMarkup)});this.actionService.updateAction(b.MONOSPACED,{enabled:a,callback:e.hitch(this,
this._insertMonospacedMarkup)});this.actionService.updateAction(b.HYPERLINK,{enabled:a,callback:e.hitch(this,this._insertHyperlinkMarkup)});this.actionService.updateAction(b.INLINE_LATEX,{enabled:a,callback:e.hitch(this,this._insertInlineLatexMarkup)})},_updateInsertBlockMarkupActions:function(a){this.actionService.updateAction(b.BULLETED_LIST,{enabled:a,callback:e.hitch(this,this._insertBulletedListMarkup)});this.actionService.updateAction(b.NUMBERED_LIST,{enabled:a,callback:e.hitch(this,this._insertNumberedListMarkup)});
this.actionService.updateAction(b.IMAGE,{enabled:a,callback:e.hitch(this,this._insertImageMarkup)});this.actionService.updateAction(b.PREFORMATTED_TEXT,{enabled:a,callback:e.hitch(this,this._insertPreformattedTextMarkup)});this.actionService.updateAction(b.CODE,{enabled:a,callback:e.hitch(this,this._insertCodeMarkup)});this.actionService.updateAction(b.DISPLAY_LATEX,{enabled:a,callback:e.hitch(this,this._insertDisplayLatexMarkup)})},_disableActions:function(){for(var b=0;b<a.actions.length;b++)this.actionService.updateAction(a.actions[b].id,
{enabled:!1})},_getSectionPlugin:function(a){return a.editor._pluginResolver.getDependency("rtc.code.sections")},_insertSection:function(){var a=this.editorService.getActiveEditor(window);this._getSectionPlugin(a)._publishUtilities.insertSection();a.focus()},_insertSectionWithTitle:function(){var a=this.editorService.getActiveEditor(window);this._getSectionPlugin(a)._publishUtilities.insertSectionWithTitle();a.focus()},_insertBoldMarkup:function(){this._disableActions();var a=this.editorService.getActiveEditor(window);
this._getSectionPlugin(a)._publishUtilities.insertBoldMarkup();a.focus()},_insertItalicMarkup:function(){this._disableActions();var a=this.editorService.getActiveEditor(window);this._getSectionPlugin(a)._publishUtilities.insertItalicMarkup();a.focus()},_insertMonospacedMarkup:function(){var a=this.editorService.getActiveEditor(window);this._disableActions();this._getSectionPlugin(a)._publishUtilities.insertMonospacedMarkup();a.focus()},_insertHyperlinkMarkup:function(){var a=this.editorService.getActiveEditor(window);
this._disableActions();this._getSectionPlugin(a)._publishUtilities.insertHyperlinkMarkup();a.focus()},_insertInlineLatexMarkup:function(){var a=this.editorService.getActiveEditor(window);this._disableActions();this._getSectionPlugin(a)._publishUtilities.insertInlineLatexMarkup();a.focus()},_insertBulletedListMarkup:function(){var a=this.editorService.getActiveEditor(window);this._disableActions();this._getSectionPlugin(a)._publishUtilities.insertBulletedListMarkup();a.focus()},_insertNumberedListMarkup:function(){var a=
this.editorService.getActiveEditor(window);this._disableActions();this._getSectionPlugin(a)._publishUtilities.insertNumberedListMarkup();a.focus()},_insertImageMarkup:function(){var a=this.editorService.getActiveEditor(window);this._disableActions();this._getSectionPlugin(a)._publishUtilities.insertImageMarkup();a.focus()},_insertPreformattedTextMarkup:function(){var a=this.editorService.getActiveEditor(window);this._disableActions();this._getSectionPlugin(a)._publishUtilities.insertPreformattedTextMarkup();
a.focus()},_insertCodeMarkup:function(){var a=this.editorService.getActiveEditor(window);this._disableActions();this._getSectionPlugin(a)._publishUtilities.insertCodeMarkup();a.focus()},_insertDisplayLatexMarkup:function(){var a=this.editorService.getActiveEditor(window);this._disableActions();this._getSectionPlugin(a)._publishUtilities.insertDisplayLatexMarkup();a.focus()}})})},"MOTW/editor/actions/PublishActions":function(){define(["MOTW/editor/actions/ActionIdConstants","dojo/i18n!MOTW/l10n/nls/editor",
"mw-log/Log"],function(g,f,e){var d={};d.actions=[{id:g.NEW_SECTION,enabled:!0,text:f.newSectionLabel,description:f.newSectionDescription,icon:"bigNewSection",quickAccessIcon:"smallInsertSection",callback:function(){e.warn("Action "+g.NEW_SECTION+" doesn't do anything yet.")}},{id:g.INSERT_SECTION_WITH_TITLE,enabled:!0,text:f.insertSectionWithTitleLabel,description:f.insertSectionWithTitleDescription,icon:"bigInsertSectionWithTitle",quickAccessIcon:"smallInsertSection",callback:function(){e.warn("Action "+
g.INSERT_SECTION_WITH_TITLE+" doesn't do anything yet.")}},{id:g.BOLD,enabled:!0,text:f.boldLabel,description:f.boldDescription,icon:"smallBold",quickAccessIcon:"smallBold",callback:function(){e.warn("Action "+g.BOLD+" doesn't do anything yet.")}},{id:g.ITALIC,enabled:!0,text:f.italicLabel,description:f.italicDescription,icon:"smallItalic",quickAccessIcon:"smallItalic",callback:function(){e.warn("Action "+g.ITALIC+" doesn't do anything yet.")}},{id:g.MONOSPACED,enabled:!0,text:f.monospacedLabel,description:f.monospacedDescription,
icon:"smallMonospaced",quickAccessIcon:"smallMonospaced",callback:function(){e.warn("Action "+g.MONOSPACED+" doesn't do anything yet.")}},{id:g.HYPERLINK,enabled:!0,text:f.hyperlinkLabel,description:f.hyperlinkDescription,icon:"smallHyperlink",quickAccessIcon:"smallHyperlink",callback:function(){e.warn("Action "+g.HYPERLINK+" doesn't do anything yet.")}},{id:g.INLINE_LATEX,enabled:!0,text:f.inlineLatexLabel,description:f.inlineLatexDescription,icon:"smallInlineLatex",quickAccessIcon:"smallInlineLatex",
callback:function(){e.warn("Action "+g.INLINE_LATEX+" doesn't do anything yet.")}},{id:g.BULLETED_LIST,enabled:!0,text:f.bulletedListLabel,description:f.bulletedListDescription,icon:"smallBulletedList",quickAccessIcon:"smallBulletedList",callback:function(){e.warn("Action "+g.BULLETED_LIST+" doesn't do anything yet.")}},{id:g.NUMBERED_LIST,enabled:!0,text:f.numberedListLabel,description:f.numberedListDescription,icon:"smallNumberedList",quickAccessIcon:"smallNumberedList",callback:function(){e.warn("Action "+
g.NUMBERED_LIST+" doesn't do anything yet.")}},{id:g.IMAGE,enabled:!0,text:f.imageLabel,description:f.imageDescription,icon:"smallImage",quickAccessIcon:"smallImage",callback:function(){e.warn("Action "+g.IMAGE+" doesn't do anything yet.")}},{id:g.PREFORMATTED_TEXT,enabled:!0,text:f.preformattedTextLabel,description:f.preformattedTextDescription,icon:"smallPreformattedText",quickAccessIcon:"smallPreformattedText",callback:function(){e.warn("Action "+g.PREFORMATTED_TEXT+" doesn't do anything yet.")}},
{id:g.CODE,enabled:!0,text:f.codeLabel,description:f.codeDescription,icon:"smallCode",quickAccessIcon:"smallCode",callback:function(){e.warn("Action "+g.CODE+" doesn't do anything yet.")}},{id:g.DISPLAY_LATEX,enabled:!0,text:f.displayLatexLabel,description:f.displayLatexDescription,icon:"smallDisplayLatex",quickAccessIcon:"smallDisplayLatex",callback:function(){e.warn("Action "+g.DISPLAY_LATEX+" doesn't do anything yet.")}},{id:g.PUBLISH_AS_HTML,enabled:!1,text:f.publishAsHtmlLabel,description:f.publishAsHtmlDescription,
icon:"icon_publish_as_HTML_24",quickAccessIcon:"icon_publish_as_HTML_16",callback:function(){e.warn("Action "+g.PUBLISH_AS_HTML+" doesn't do anything yet.")}},{id:g.PUBLISH_AS_PDF,enabled:!1,text:f.publishAsPdfLabel,description:f.publishAsPdfDescription,icon:"icon_publish_as_PDF_24",quickAccessIcon:"icon_publish_as_PDF_16",callback:function(){e.warn("Action "+g.PUBLISH_AS_PDF+" doesn't do anything yet.")}}];return d})},"MOTW/editor/language/matlab/LiveEditorToolstripActionProvider":function(){define("dojo/aspect dojo/_base/declare dojo/_base/lang mw-log/Log MOTW/editor/actions/EquationEditorActions MOTW/editor/actions/LiveEditorActions MOTW/editor/actions/LiveEditorExportActions MOTW/editor/actions/LiveEditorExportActionIdConstants MOTW/editor/language/matlab/ActionProvider MW/uiframework/uicontainer/ChildProperties".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return f(k,{_SELECTED_PROPERTY_STRING:"selected",_SELECTED_ITEM_PROPERTY_STRING:"text",_ICON_PROPERTY_STRING:"icon",_EQN_INSERT_ACTION_PREFIX:"equationeditor.insert",_EQN_EDITOR_ACTIVE:"rtc.equationeditor-active",constructor:function(f,h){d.assert(f,"Must supply editorService");d.assert(h,"Must supply actionService");this.editorService=f;this.actionService=h;this.actionService.loadActions(b.motwActions);this.actionService.loadActions(a.actions);this.actionService.loadActions(c.actions);
this._liveEditorActions=a.actions.concat(b.motwActions);g.after(this.editorService,"onActiveEditor",e.hitch(this,"_handleOnActiveEditor"),!0);g.after(this.editorService,"onOpen",e.hitch(this,"_handleOnEditorOpen"),!0);g.after(this.editorService,"onClose",e.hitch(this,"_handleOnEditorClose"),!0)},_handleOnEditorOpen:function(a){if(a.isLiveEditor()){var b=a.editor.getActionDataService();b.addAction({id:this._EQN_EDITOR_ACTIVE,enabled:!1});b.addActionChangeCallback(this._EQN_EDITOR_ACTIVE,function(b){a.set(l.ACTIVE_CONTEXTS,
"enabled"===b.property&&!0===b.newValue?["motwToolstrip.equationEditorContext"]:null)})}},_handleOnActiveEditor:function(c,d){if(c.isLiveEditor()&&c!==d){d&&this._removeActionChangeListeners(d);var f=c.editor.getActionDataService();c.isLiveEditor()&&!f.getAction(b.rtcActions[0].id)&&f.loadActions(b.rtcActions);for(var h=this._actions(c),k=0;k<h.length;k++){var l=h[k],t=f.getAction(a.getRTCActionIdFromMotwActionId(l.id));t&&this._addActionChangeListeners(f,t,l,c)}g.before(f,"removeAction",e.hitch(this,
"_handleRTCActionRemoved",f),!0);g.after(f,"addAction",e.hitch(this,"_handleRTCActionAdded",f,c),!0);this._updateActions(c)}},_addActionChangeListeners:function(a,b,c,d){a.addActionChangeCallback(b.id,e.hitch(this,"_handleActionChanged",c.id));a.actionHasProperty(b.id,this._SELECTED_PROPERTY_STRING)&&this.actionService.addActionChangeCallback(c.id,e.hitch(this,"_handleToggleButtonActionChanged",c.id,d));a.actionHasProperty(b.id,this._SELECTED_ITEM_PROPERTY_STRING)&&this.actionService.addActionChangeCallback(c.id,
e.hitch(this,"_handleSelectedItemChanged",c.id,d))},_handleRTCActionRemoved:function(b,c){this.actionService.getAction(a.getMotwActionIdFromRTCActionId(c))&&b.removeActionChangeCallback(c)},_handleRTCActionAdded:function(b,c,d){var e=this.actionService.getAction(a.getMotwActionIdFromRTCActionId(d.id));e&&(this.actionService.updateAction(e.id,{enabled:!0}),this._addActionChangeListeners(b,d,e,c))},updateSaveActionState:function(a,b){this.actionService.updateAction(h.SAVE,{enabled:a});b?this.actionService.updateAction(h.SAVE,
{icon:"save_dirty_24",quickAccessIcon:"save_dirty_24"}):this.actionService.updateAction(h.SAVE,{icon:"save_24",quickAccessIcon:"save_16"})},_handleOnEditorClose:function(a){this._removeActionChangeListeners(a)},_removeActionChangeListeners:function(b){if(b.isLiveEditor()){var c=b.editor.getActionDataService();b=this._actions(b);for(var d=0;d<b.length;d++){var e=b[d],f=c.getAction(a.getRTCActionIdFromMotwActionId(e.id));f&&(c.removeActionChangeCallback(f.id),c.actionHasProperty(f.id,this._SELECTED_PROPERTY_STRING)&&
this.actionService.removeActionChangeCallback(e.id),c.actionHasProperty(f.id,this._SELECTED_ITEM_PROPERTY_STRING)&&this.actionService.removeActionChangeCallback(e.id))}}},_actions:function(b){return b.isLiveEditor()?this._liveEditorActions:a.actions},_handleActionChanged:function(a,b){var c={};c[b.property]=b.newValue;this.actionService.updateAction(a,c)},_handleToggleButtonActionChanged:function(b,c,d){c=c.editor.getActionDataService();d.property===this._SELECTED_PROPERTY_STRING&&(b=a.getRTCActionIdFromMotwActionId(b),
c.updateAction(b,{selected:d.newValue}))},_handleSelectedItemChanged:function(b,c,d){c=c.editor.getActionDataService();d.property===this._SELECTED_ITEM_PROPERTY_STRING&&(b=a.getRTCActionIdFromMotwActionId(b),c.updateAction(b,{selectedItem:d.newValue}))},_fireCallback:function(a,b){var c=b.editor.getActionDataService();b.focus();c.executeAction(a)},setActionPropertiesOnLoad:function(b){b=b.editor.getActionDataService();for(var c=0;c<a.actions.length;c++){var d=a.actions[c],e=b.getAction(a.getRTCActionIdFromMotwActionId(d.id));
if(e){for(var f={},g=Object.keys(e),h=0;h<g.length;h++){var k=g[h];"id"!==k&&(f[k]=e[k])}this.actionService.updateAction(d.id,f)}}},_updateAction:function(a,b,c,d){var f={enabled:b.enabled};a.actionHasProperty(b.id,this._SELECTED_PROPERTY_STRING)&&(f[this._SELECTED_PROPERTY_STRING]=b[this._SELECTED_PROPERTY_STRING]);a.actionHasProperty(b.id,this._ICON_PROPERTY_STRING)&&(f[this._ICON_PROPERTY_STRING]=b[this._ICON_PROPERTY_STRING]);a.actionHasProperty(b.id,this._SELECTED_ITEM_PROPERTY_STRING)&&(f[this._SELECTED_ITEM_PROPERTY_STRING]=
b[this._SELECTED_ITEM_PROPERTY_STRING]);f.callback=e.hitch(this,"_fireCallback",b.id,d);this.actionService.updateAction(c.id,f)},_updateActions:function(b){for(var c=b.editor.getActionDataService(),d=this._actions(b),e=0;e<d.length;e++){var f=d[e],g=c.getAction(a.getRTCActionIdFromMotwActionId(f.id));g?this._updateAction(c,g,f,b):this.actionService.updateAction(f.id,{enabled:!1})}}})})},"MOTW/editor/actions/EquationEditorActions":function(){define(["dojo/_base/lang","./ActionIdConstants","./EquationEditorActionIdConstants",
"./LiveEditorConstants","mw-log/Log"],function(g,f,e,d,b){var a={motwActions:[],rtcActions:[]},c=function(a,c){c=c||{};return g.mixin({id:a,enabled:!0,callback:function(){b.warn("Action "+a+" does not do anything yet")}},c)};Object.keys(e.ids).forEach(function(b){var f=e.ids[b],g=f.slice(d.MOTW_PREFIX.length);a.motwActions.push(c(f));a.rtcActions.push(c(g,e.rtcAttributes[b]))});return a})},"MOTW/editor/actions/LiveEditorActions":function(){define(["./ActionIdConstants","./FigureToolstripActionIdConstants",
"./LiveEditorActionIdConstants","./LiveEditorConstants","mw-log/Log"],function(g,f,e,d,b){g={actions:[],getRTCActionIdFromMotwActionId:function(a){return a.slice(16)},getMotwActionIdFromRTCActionId:function(a){return"motw.liveeditor."+a}};d=function(a){return{id:a,enabled:!0,callback:function(){b.warn("Action "+a+" does not do anything yet")}}};g.actions.push(d(e.GOTO));g.actions.push(d(e.PREVIOUS_SECTION));g.actions.push(d(e.NEXT_SECTION));g.actions.push(d(e.COMMENT));g.actions.push(d(e.UNCOMMENT));
g.actions.push(d(e.SMART_INDENT));g.actions.push(d(e.INDENT));g.actions.push(d(e.UNINDENT));g.actions.push(d(e.BOLD));g.actions.push(d(e.ITALIC));g.actions.push(d(e.UNDERLINE));g.actions.push(d(e.MONOSPACE));g.actions.push(d(e.INSERT_CODE));g.actions.push(d(e.INSERT_TEXT));g.actions.push(d(e.INSERT_SECTION_BREAK));g.actions.push(d(e.INSERT_EQUATION));g.actions.push(d(e.INSERT_EQUATION_EDITOR));g.actions.push(d(e.INSERT_HYPERLINK));g.actions.push(d(e.INSERT_IMAGE));g.actions.push(d(e.INSERT_SLIDER));
g.actions.push(d(e.INSERT_COMBO_BOX));g.actions.push(d(e.INSERT_TABLE_OF_CONTENTS));g.actions.push(d(e.INSERT_CODE_EXAMPLE));g.actions.push(d(e.INSERT_CODE_EXAMPLE_MATLAB));g.actions.push(d(e.INSERT_CODE_EXAMPLE_PLAIN));g.actions.push(d(e.NORMAL));g.actions.push(d(e.HEADING1));g.actions.push(d(e.HEADING2));g.actions.push(d(e.HEADING3));g.actions.push(d(e.TITLE));g.actions.push(d(e.BULLETED_LIST));g.actions.push(d(e.NUMBERED_LIST));g.actions.push(d(e.PARAGRAPH_STYLE));g.actions.push(d(e.ALIGN_LEFT));
g.actions.push(d(e.ALIGN_CENTER));g.actions.push(d(e.ALIGN_RIGHT));g.actions.push(d(e.RUN_ALL));g.actions.push(d(e.PAUSE));g.actions.push(d(e.CONTINUE));g.actions.push(d(e.STEP));g.actions.push(d(e.STOP));g.actions.push(d(e.RUN_SECTION));g.actions.push(d(e.RUN_AND_ADVANCE));g.actions.push(d(e.RUN_TO_END));g.actions.push(d(e.DATATIPS));g.actions.push(d(e.CLEAR_ALL_OUTPUT));g.actions.push(d(e.OUTPUT_INLINE));g.actions.push(d(e.OUTPUT_ON_RIGHT));g.actions.push(d(f.ADD_GRID));g.actions.push(d(f.ADD_COLORBAR));
g.actions.push(d(f.ADD_LEGEND));g.actions.push(d(f.REMOVE_GRID));g.actions.push(d(f.REMOVE_COLORBAR));g.actions.push(d(f.REMOVE_LEGEND));g.actions.push(d(f.ADD_XGRID));g.actions.push(d(f.ADD_YGRID));g.actions.push(d(f.ADD_TITLE));g.actions.push(d(f.ADD_XLABEL));g.actions.push(d(f.ADD_YLABEL));g.actions.push(d(f.ADD_LINE));g.actions.push(d(f.ADD_ARROW));g.actions.push(d(f.ADD_DOUBLE_ARROW));g.actions.push(d(f.ADD_TEXT_ARROW));return g})},"MOTW/editor/actions/LiveEditorActionIdConstants":function(){define([],
function(){return{GOTO:"motw.liveeditor.rtc_goTo_dialog",FIND:"motw.liveeditor.rtc_find_dialog",NEXT_SECTION:"motw.liveeditor.rtc_navigate_next_section",PREVIOUS_SECTION:"motw.liveeditor.rtc_navigate_previous_section",BOLD:"motw.liveeditor.rtc_toggle_bold",ITALIC:"motw.liveeditor.rtc_toggle_italic",UNDERLINE:"motw.liveeditor.rtc_toggle_underline",MONOSPACE:"motw.liveeditor.rtc_toggle_monospace",COMMENT:"motw.liveeditor.rtc_comment",UNCOMMENT:"motw.liveeditor.rtc_uncomment",SMART_INDENT:"motw.liveeditor.rtc_smart_indent",
INDENT:"motw.liveeditor.rtc_indent",UNINDENT:"motw.liveeditor.rtc_unindent",INSERT_CODE:"motw.liveeditor.rtc_insert_code",INSERT_TEXT:"motw.liveeditor.rtc_insert_text",INSERT_SECTION_BREAK:"motw.liveeditor.rtc_insert_sectionbreak",INSERT_EQUATION:"motw.liveeditor.rtc_equation",INSERT_EQUATION_EDITOR:"motw.liveeditor.rtc_equation_editor",INSERT_HYPERLINK:"motw.liveeditor.rtc_hyperlink",INSERT_IMAGE:"motw.liveeditor.rtc_image",INSERT_SLIDER:"motw.liveeditor.rtc_insert_slider",INSERT_COMBO_BOX:"motw.liveeditor.rtc_insert_combo_box",
INSERT_TABLE_OF_CONTENTS:"motw.liveeditor.rtc_table_of_contents",INSERT_CODE_EXAMPLE:"motw.liveeditor.rtc_codeexample",INSERT_CODE_EXAMPLE_MATLAB:"motw.liveeditor.rtc_codeexample_matlab",INSERT_CODE_EXAMPLE_PLAIN:"motw.liveeditor.rtc_codeexample_plain",NORMAL:"motw.liveeditor.rtc_paraformat_text",HEADING1:"motw.liveeditor.rtc_paraformat_heading",HEADING2:"motw.liveeditor.rtc_paraformat_heading2",HEADING3:"motw.liveeditor.rtc_paraformat_heading3",TITLE:"motw.liveeditor.rtc_paraformat_title",BULLETED_LIST:"motw.liveeditor.rtc_unordered_list",
NUMBERED_LIST:"motw.liveeditor.rtc_ordered_list",PARAGRAPH_STYLE:"motw.liveeditor.rtc_paragraph_style",ALIGN_LEFT:"motw.liveeditor.rtc_align_left",ALIGN_CENTER:"motw.liveeditor.rtc_align_center",ALIGN_RIGHT:"motw.liveeditor.rtc_align_right",RUN_ALL:"motw.liveeditor.rtc_refresh_all_outputs",PAUSE:"motw.liveeditor.rtc_pause",CONTINUE:"motw.liveeditor.rtc_continue",STEP:"motw.liveeditor.rtc_step",STOP:"motw.liveeditor.rtc_stop_execution",RUN_SECTION:"motw.liveeditor.rtc_run_section",RUN_AND_ADVANCE:"motw.liveeditor.rtc_run_section_advance",
RUN_TO_END:"motw.liveeditor.rtc_run_section_end",DATATIPS:"motw.liveeditor.rtc_datatips",CLEAR_ALL_OUTPUT:"motw.liveeditor.rtc_clear_all_output",OUTPUT_INLINE:"motw.liveeditor.rtc_inline_view",OUTPUT_ON_RIGHT:"motw.liveeditor.rtc_on_right_view"}})},"MOTW/editor/actions/LiveEditorExportActions":function(){define("dojo/_base/lang dojo/aspect dojo/_base/window dojo/on dojo/Deferred MOTW/dialog/SaveAsDialog MOTW/editor/actions/LiveEditorExportActionIdConstants MOTW/editor/actions/SaveAsLaTeX MOTW/editor/actions/SaveAsLiveScript MOTW/motw/CoreActions MOTW/motw/MotwApp MW/rtc/model/io/MDocumentWriter MW/rtc/plugins/saveaspdf/PDFRemoteService MW/rtc/plugins/saveaspdf/SaveAsPDF MW/rtc/plugins/view/exporters/HTMLWriter MW/rtc/plugins/view/exporters/HTMLRemoteService mw-filename-utils/FileNameUtil mw-log/Log dojo/i18n!MOTW/l10n/nls/liveeditor dojo/i18n!MOTW/l10n/nls/motw".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w){var x={actions:[{id:c.EXPORT_AS_HTML,enabled:!0,icon:"save_as_24",text:v.exportAsHTMLLabel,description:v.exportAsHTMLDescription,callback:function(a){x._exportToFile("html")}},{id:c.EXPORT_AS_PDF,enabled:!0,icon:"save_as_24",text:v.exportAsPDFLabel,description:v.exportAsPDFDescription,callback:function(a){x._exportToFile("pdf")}},{id:c.EXPORT_AS_LATEX,enabled:!0,icon:"save_as_24",text:v.exportAsLaTeXLabel,description:v.exportAsLaTeXDescription,callback:function(a){x._exportToFile("tex")}},
{id:c.SAVEAS,enabled:!0,icon:"save_as_24",text:v.saveAsLabel,description:v.saveAsDescription,callback:function(a){x._exportToFile(t.LIVE_SCRIPT_EXTENSION)}},{id:c.SAVE,key:"ctrl_s",shortcut:w.saveShortcut,platformKey:{mac:"meta_s"},icon:"save_24",quickAccessIcon:"save_16",text:w.saveLabel,description:w.saveDescription,popupTag:"motwToolstrip.liveEditorTab.file.save.saveList",enabled:!0,callback:function(){l.saveCallback()}}],_exportToFile:function(a){var b=m.editorService.getActiveEditor(window),
c=t.getFileNameNoExtension(b.getFile().fileInfo.name),c=c+("."+a);this._getExportFileName(c).then(g.hitch(this,function(a){var d=t.pathFromFileInfo(m.fileDataService.currentWorkingFolder),e=t.createEmptyFileObject(d,a),f=t.getFileNameExtension(a),h=b.editor._internalDocument,n=b.editor.localActionService;switch(f){case "html":this._toggleViewAndExport(n,g.hitch(this,"_exportToHTML",h,e));break;case "pdf":this._toggleViewAndExport(n,g.hitch(this,"_exportToPDF",h,e));break;case "tex":this._toggleViewAndExport(n,
g.hitch(this,"_exportToLaTeX",h,e));break;case t.MATLAB_CODE_FILE_EXTENSION:this._exportToM(h,e);break;case t.LIVE_SCRIPT_EXTENSION:f=m.editorService.getActiveEditor(window).getFile().fileInfo.location;f=t.createFilePath(f,c);a=t.createFilePath(d,a);l.saveCallback();k.doConvert(f,a).then(function(a){m.fileDataService.openedFilesDataStore.put(dojo.mixin(e,{modifiedDate:null,savePending:!1,id:t.pathFromFileInfo(e.fileInfo)}));m.fileDataService.onFileOpen(e)});break;default:u.assert(!1,"Attempted to export to unsupported file extension: "+
f)}}),function(){})},_exportToPDF:function(a,b){var c=m.editorService.getActiveEditor(window);this._notifyOnExport(c);var c=c.editor._pluginResolver.getDependency("rtc.pdfwriters"),c=new q(a,c),d=t.pathFromFileInfo(b.fileInfo);c.saveAsPDF().then(function(a){a=n.writeToPath(a,d);var c=m.fileDataService;a.then(function(a){c.refreshOpenFolders();e.global.open(t.constructUrlFromFileInfo(b.fileInfo,c.getUserIdForPublish()))},function(a){c.onFileMessageFault({messageFaults:[{message:v.exportAsPDFError}]})})})},
_exportToHTML:function(a,b){var c=new r,d=m.editorService.getActiveEditor(window);this._notifyOnExport(d);var f=null;(d=d.editor._pluginResolver.getDependency("rtc.embeddedoutputs"))&&d.getEmbeddedOutputsView&&(f=d.getEmbeddedOutputsView());c=c.write(a,"",f);b.content=c;t.assertIsFile(b);var f=t.remoteFile(b),c=s.writeToFile(c,f),g=m.fileDataService;c.then(function(a){g.refreshOpenFolders();e.global.open(t.constructUrlFromFileInfo(b.fileInfo,g.getUserIdForPublish()))},function(a){})},_exportToLaTeX:function(a,
b){var c=m.editorService.getActiveEditor(window);this._notifyOnExport(c);h.doExport(c,a,b)},_notifyOnExport:function(a){a.editor._pluginResolver.getDependency("rtc.exportnotifier").notifyExportStart()},_exportToM:function(a,b){var c=p.write(a);b.content=c;t.assertIsFile(b);c=t.remoteFile(b);m.fileDataService.createFile(c,!1)},_getExportFileName:function(c){var e="",h=new b,e=new a({fileDataService:m.fileDataService,fileLocation:t.pathFromFileInfo(m.fileDataService.currentWorkingFolder),saveAsNameLabel:w.saveAsFileNameLabel,
numSelectedChars:0,okAction:function(){""!==e&&e.deferred.resolve(e.getFileName());m.layoutService.removeWidget("saveAs")},cancelAction:function(){m.layoutService.removeWidget("saveAs");d.emit(document.body,"restorefocus",{bubbles:!0});e.deferred.reject()},deferred:h});e.inputBox.set("value",c);f.after(e,"onShow",g.hitch(e,"updateButtons"));m.layoutService.addWidget("saveAs","newDialog",e,{title:w.saveAsDialogTitle});return h.promise},_toggleViewAndExport:function(a,b){var c=a.getAction("rtc_inline_view"),
d=c&&c.enabled&&c.selected;c&&!d&&a.executeAction("rtc_inline_view_no_animation");b();c&&!d&&a.executeAction("_rtc_on_right_view_no_animation")}};return x})},"MOTW/editor/actions/LiveEditorExportActionIdConstants":function(){define(["./LiveEditorConstants"],function(g){return{SAVE:g.MOTW_PREFIX+"save",SAVEAS:g.MOTW_PREFIX+"saveas",EXPORT_AS_HTML:g.MOTW_PREFIX+"exportAsHTML",EXPORT_AS_PDF:g.MOTW_PREFIX+"exportAsPDF",EXPORT_AS_LATEX:g.MOTW_PREFIX+"exportAsLaTeX"}})},"MOTW/editor/actions/SaveAsLaTeX":function(){define("dojo/_base/declare dojo/Deferred MOTW/motw/MotwApp mw-messageservice/MessageService MW/rtc/model/io/LaTeXDocumentWriter MW/rtc/model/io/LaTeXRemoteService mw-filename-utils/FileNameUtil".split(" "),
function(g,f,e,d,b,a,c){return{_STYLESHEET_CONTENT:"",_STYLESHEET_NAME:"matlab.sty",_GET_STYLESHEET_CONTENT_PROMISE:null,_GET_STYLESHEET_CONTENT_REQUEST:"/liveeditor/widget/rtc/export/getStylesheetContentRequest",_GET_STYLESHEET_CONTENT_RESPONSE:"/liveeditor/widget/rtc/export/getStylesheetContentResponse",doExport:function(a,d,f){var g=f.fileInfo.location,p=f.fileInfo.name.replace(/\.tex$/,"_images/"),n=c.createEmptyFileObject(g,p);n.fileInfo.isDirectory=!0;var q=e.fileDataService;q.createFile(n,
!0);p=(g+p).replace(/\\/g,"/");a=a.editor._pluginResolver.getDependency("rtc.embeddedoutputs.model");b.write(d,a,p).then(function(a){q.doesFileExistAtLocation(this._STYLESHEET_NAME,g)?this._writeLaTeXFile(a,f,q):this._writeStylesheetThenLaTeXFile(a,f,q,g)}.bind(this),function(a){})},_writeStylesheetThenLaTeXFile:function(a,b,c,e){d.subscribe(this._GET_STYLESHEET_CONTENT_RESPONSE,"_handleGetLaTeXStylesheetContentResponse",this);this._getStylesheetContent().then(function(f){this._STYLESHEET_CONTENT=
f;d.unsubscribe(this._GET_STYLESHEET_CONTENT_RESPONSE,"_handleGetLaTeXStylesheetContentResponse",this);this._writeLaTeXStylesheet(f,e).then(function(){this._writeLaTeXFile(a,b,c)}.bind(this),function(a){})}.bind(this),function(a){d.unsubscribe(this._GET_STYLESHEET_CONTENT_RESPONSE,"_handleGetLaTeXStylesheetContentResponse",this)}.bind(this))},_getStylesheetContent:function(){if(0<this._STYLESHEET_CONTENT.length){var a=new f;a.resolve(this._STYLESHEET_CONTENT);return a.promise}this._GET_STYLESHEET_CONTENT_PROMISE=
new f;d.publish(this._GET_STYLESHEET_CONTENT_REQUEST,{});return this._GET_STYLESHEET_CONTENT_PROMISE.promise},_handleGetLaTeXStylesheetContentResponse:function(a){a.data.success?this._GET_STYLESHEET_CONTENT_PROMISE.resolve(a.data.content):this._GET_STYLESHEET_CONTENT_PROMISE.reject(a.data.error)},_writeLaTeXStylesheet:function(b,d){var e=c.createEmptyFileObject(d,this._STYLESHEET_NAME);e.content=b;e=c.remoteFile(e);return a.writeFile("",e)},_writeLaTeXFile:function(a,b,c){b.content=a;c.createFile(b,
!0);c.refreshOpenFolders()}}})},"MW/rtc/model/io/LaTeXRemoteService":function(){define(["mw-remote/Remote","dojo/Deferred"],function(g,f){g.registerResponseHandler("CreateFileResponse:WriteLaTeXToFile",function(e,d){1===e.length&&!e[0].isError?d.resolve():d.reject()},this);return{writeFile:function(e,d){var b=new f;g.sendMessage({CreateFile:{file:d,updateIfExists:!0}},b,"WriteLaTeXToFile");return b.promise}}})},"MW/rtc/plugins/saveaspdf/PDFRemoteService":function(){define(["mw-remote/Remote","dojo/Deferred"],
function(g,f){g.registerResponseHandler("FEvalResponse:WritePDFToPath",function(e,d){1===e.length?e[0].isError?d.reject(e[0]):d.resolve():d.reject("Error while writing PDF: Expected 1 result message back, received: "+e.length)},this);g.registerFaultHandler("FEval:WritePDFToPath",function(e,d){d.reject(e)},this);return{writeToPath:function(e,d){var b=new f;g.sendMessage({FEval:{"function":"javaMethod",arguments:["writeXSLToPDFWithPath","com.mathworks.mde.liveeditor.widget.rtc.export.PDFExporter",e,
d],nargout:0,priority:1}},b,"WritePDFToPath");return b.promise}}})},"MW/rtc/plugins/view/exporters/HTMLRemoteService":function(){define(["dojo/Deferred","mw-remote/Remote"],function(g,f){f.registerResponseHandler("CreateFileResponse:WriteHTMLToFile",function(e,d){1===e.length&&!e[0].isError?d.resolve():d.reject()},this);return{writeToFile:function(e,d){var b=new g;f.sendMessage({CreateFile:{file:d,updateIfExists:!0}},b,"WriteHTMLToFile");return b.promise}}})},"MOTW/editor/toolstrip/LiveEditorTabGroupConfig":function(){define(["./LiveEditorTabConfig",
"./LiveEditorInsertTabConfig","./LiveEditorViewTabConfig","MW/toolstrip/constants/TypeConstants"],function(g,f,e,d){return{tag:"motwToolstrip.liveEditorTabGroup",type:d.TAB_GROUP,children:[g,f,e]}})},"MOTW/editor/toolstrip/LiveEditorTabConfig":function(){define("MOTW/motw/ActionIdConstants MOTW/editor/actions/ActionIdConstants MOTW/editor/actions/LiveEditorActionIdConstants MOTW/editor/actions/LiveEditorExportActionIdConstants MW/toolstrip/constants/MiscConstants MW/toolstrip/constants/TypeConstants dojo/i18n!MOTW/l10n/nls/liveeditor dojo/i18n!MOTW/l10n/nls/motw dojo/i18n!MOTW/l10n/nls/toolstrip".split(" "),
function(g,f,e,d,b,a,c,h,k){return{tag:"motwToolstrip.liveEditorTab",type:a.TAB,title:h.liveEditorTabTitle,mnemonic:"L",children:[{tag:"motwToolstrip.liveEditorTab.file",type:a.SECTION,title:k.fileSectionTitle,children:[{type:a.COLUMN,children:[{tag:"motwToolstrip.liveEditorTab.file.newScript",type:a.SPLIT_BUTTON,actionId:g.NEW_FILE_LIVE_EDITOR,textOverride:h.newMenuLabel,description:h.newMenuDescription,iconOverride:"new_24",mnemonic:"N"}]},{type:a.COLUMN,children:[{tag:"motwToolstrip.liveEditorTab.file.save",
enabled:!0,icon:"save_24",text:h.saveLabel,actionId:d.SAVE,type:a.SPLIT_BUTTON,mnemonic:"S"}]},{tag:"motwToolstrip.liveEditorTab.file.column4",type:a.COLUMN,children:[{tag:"motwToolstrip.liveEditorTab.file.findFiles",type:a.PUSH_BUTTON,actionId:g.FIND_FILES,mnemonic:"FF",icon:"icon_find_files_24",quickAccessIcon:"icon_find_files_16"}]}]},{tag:"motwToolstrip.liveEditorTab.navigate",type:a.SECTION,title:h.navigateSectionTitle,children:[{type:a.COLUMN,children:[{tag:"motwToolstrip.liveEditorTab.navigate.goTo",
type:a.SPLIT_BUTTON,actionId:f.GOTO,mnemonic:"G"},{tag:"motwToolstrip.liveEditorTab.navigate.find",type:a.SPLIT_BUTTON,text:c.findLabel,actionId:f.FIND,description:c.findDescription,icon:"smallFind",quickAccessIcon:"smallFind",mnemonic:"FD"}]},{type:a.COLUMN,children:[{tag:"motwToolstrip.liveEditorTab.navigate.previous",type:a.PUSH_BUTTON,actionId:e.PREVIOUS_SECTION,description:c.previousSectionDescription,icon:"smallPrevious",quickAccessIcon:"smallPrevious",mnemonic:"Z"},{tag:"motwToolstrip.liveEditorTab.navigate.next",
type:a.PUSH_BUTTON,actionId:e.NEXT_SECTION,description:c.nextSectionDescription,icon:"smallNext",quickAccessIcon:"smallNext",mnemonic:"X"}]}]},{tag:"motwToolstrip.liveEditorTab.text",type:a.SECTION,title:k.textSectionTitle,children:[{type:a.COLUMN,children:[{tag:"motwToolstrip.liveEditorTab.insert.text",type:a.PUSH_BUTTON,text:c.text,description:c.textDescription,actionId:e.INSERT_TEXT,icon:"bigInsertText",quickAccessIcon:"smallInsertText",mnemonic:"T"}]},{type:a.COLUMN,width:110,children:[{tag:"motwToolstrip.liveEditorTab.style",
type:a.DROP_DOWN_BUTTON,actionId:e.PARAGRAPH_STYLE,popupTag:"motwToolstrip.liveEditorTab.text.paragraphStyle.paragraphStyleList",text:c.normal,icon:"smallNormalTextStyle",mnemonic:"H"},{type:a.PANEL,children:[{type:a.COLUMN,horizontalAlignment:"center",children:[{tag:"motwToolstrip.liveEditorTab.format.bold",type:a.TOGGLE_BUTTON,actionId:e.BOLD,description:c.boldDescription,textOverride:b.DO_NOT_DISPLAY,icon:"smallBold",quickAccessIcon:"smallBold",mnemonic:"FB"},{tag:"motwToolstrip.liveEditorTab.format.bulletedlist",
type:a.TOGGLE_BUTTON,actionId:e.BULLETED_LIST,description:c.bulletedList,textOverride:b.DO_NOT_DISPLAY,icon:"smallBulletedList",quickAccessIcon:"smallBulletedList",mnemonic:"LB"}]},{type:a.COLUMN,horizontalAlignment:"center",children:[{tag:"motwToolstrip.liveEditorTab.format.italics",type:a.TOGGLE_BUTTON,textOverride:b.DO_NOT_DISPLAY,actionId:e.ITALIC,description:c.italicDescription,icon:"smallItalic",quickAccessIcon:"smallItalic",mnemonic:"FI"},{tag:"motwToolstrip.liveEditorTab.format.numberedlist",
type:a.TOGGLE_BUTTON,actionId:e.NUMBERED_LIST,description:c.numberedList,textOverride:b.DO_NOT_DISPLAY,icon:"smallNumberedList",quickAccessIcon:"smallNumberedList",mnemonic:"LN"}]},{type:a.COLUMN,horizontalAlignment:"center",children:[{tag:"motwToolstrip.liveEditorTab.format.underline",type:a.TOGGLE_BUTTON,textOverride:b.DO_NOT_DISPLAY,actionId:e.UNDERLINE,description:c.underlineDescription,icon:"smallUnderline",quickAccessIcon:"smallUnderline",mnemonic:"FU"},{tag:"motwToolstrip.liveEditorTab.format.alignLeft",
type:a.TOGGLE_BUTTON,actionId:e.ALIGN_LEFT,description:c.alignLeftLabel,textOverride:b.DO_NOT_DISPLAY,icon:"smallAlignedLeft",quickAccessIcon:"smallAlignedLeft",mnemonic:"AL"}]},{type:a.COLUMN,horizontalAlignment:"center",children:[{tag:"motwToolstrip.liveEditorTab.format.monospace",type:a.TOGGLE_BUTTON,textOverride:b.DO_NOT_DISPLAY,actionId:e.MONOSPACE,description:c.monospacedDescription,icon:"smallMonospaced",quickAccessIcon:"smallMonospaced",mnemonic:"FM"},{tag:"motwToolstrip.liveEditorTab.format.alignCenter",
type:a.TOGGLE_BUTTON,actionId:e.ALIGN_CENTER,description:c.alignCenterLabel,textOverride:b.DO_NOT_DISPLAY,icon:"smallAlignedCenter",quickAccessIcon:"smallAlignedCenter",mnemonic:"AC"}]},{type:a.COLUMN,horizontalAlignment:"center",children:[{type:a.EMPTY_CONTROL},{tag:"motwToolstrip.liveEditorTab.format.alignRight",type:a.TOGGLE_BUTTON,actionId:e.ALIGN_RIGHT,description:c.alignRightLabel,textOverride:b.DO_NOT_DISPLAY,icon:"smallAlignedRight",quickAccessIcon:"smallAlignedRight",mnemonic:"AR"}]}]}]}]},
{tag:"motwToolstrip.liveEditorTab.code",type:a.SECTION,title:c.codeSectionTitle,children:[{type:a.COLUMN,children:[{tag:"motwToolstrip.liveEditorTab.insert.code",type:a.PUSH_BUTTON,text:c.code,description:c.codeDescription,actionId:e.INSERT_CODE,icon:"bigInsertCode",quickAccessIcon:"smallInsertCode",mnemonic:"K"}]},{type:a.COLUMN,horizontalAlignment:"center",children:[{tag:"motwToolstrip.liveEditorTab.format.comment",type:a.PUSH_BUTTON,textOverride:b.DO_NOT_DISPLAY,icon:"smallInsertComment",quickAccessIcon:"smallInsertComment",
description:c.commentDescription,actionId:e.COMMENT,mnemonic:"IC"},{tag:"motwToolstrip.liveEditorTab.format.smartIndent",type:a.PUSH_BUTTON,textOverride:b.DO_NOT_DISPLAY,icon:"smallSmartIndent",quickAccessIcon:"smallSmartIndent",description:c.smartIndentDescription,actionId:e.SMART_INDENT,mnemonic:"IS"}]},{type:a.COLUMN,horizontalAlignment:"center",children:[{tag:"motwToolstrip.liveEditorTab.format.uncomment",type:a.PUSH_BUTTON,textOverride:b.DO_NOT_DISPLAY,icon:"smallUncomment",quickAccessIcon:"smallUncomment",
description:c.uncommentDescription,actionId:e.UNCOMMENT,mnemonic:"IU"},{tag:"motwToolstrip.liveEditorTab.format.indent",type:a.PUSH_BUTTON,textOverride:b.DO_NOT_DISPLAY,icon:"smallIndent",quickAccessIcon:"smallIndent",description:c.indentDescription,actionId:e.INDENT,mnemonic:"II"}]},{type:a.COLUMN,horizontalAlignment:"center",children:[{type:a.EMPTY_CONTROL},{tag:"motwToolstrip.liveEditorTab.format.outdent",type:a.PUSH_BUTTON,textOverride:b.DO_NOT_DISPLAY,icon:"smallOutdent",quickAccessIcon:"smallOutdent",
description:c.unindentDescription,actionId:e.UNINDENT,mnemonic:"ID"}]},{type:a.COLUMN,horizontalAlignment:"center",children:[{type:a.EMPTY_CONTROL},{type:a.EMPTY_CONTROL}]}]},{tag:"motwToolstrip.liveEditorTab.section",type:a.SECTION,title:c.sectionTitle,children:[{type:a.COLUMN,children:[{tag:"motwToolstrip.liveEditorTab.insert.sectionBreak",type:a.PUSH_BUTTON,text:c.sectionBreak,description:c.sectionBreakDescription,actionId:e.INSERT_SECTION_BREAK,icon:"bigInsertSectionBreak",quickAccessIcon:"smallInsertSectionBreak",
mnemonic:"B"}]},{type:a.COLUMN,children:[{tag:"motwToolstrip.liveEditorTab.run.runSection",type:a.PUSH_BUTTON,text:c.runSection,description:c.runSectionDescription,mnemonic:"C",actionId:e.RUN_SECTION,icon:"smallRunSection",quickAccessIcon:"smallRunSection"},{tag:"motwToolstrip.liveEditorTab.run.runAndAdvance",type:a.PUSH_BUTTON,text:c.runAndAdvance,description:c.runAndAdvanceDescription,mnemonic:"V",actionId:e.RUN_AND_ADVANCE,icon:"smallRunAndAdvance",quickAccessIcon:"smallRunAndAdvance"},{tag:"motwToolstrip.liveEditorTab.run.runToEnd",
type:a.PUSH_BUTTON,text:c.runToEnd,description:c.runToEndDescription,mnemonic:"E",actionId:e.RUN_TO_END,icon:"smallRunToEnd",quickAccessIcon:"smallRunToEnd"}]}]},{tag:"motwToolstrip.liveEditorTab.run",type:a.SECTION,title:c.runSectionTitle,children:[{type:a.COLUMN,width:60,horizontalAlignment:"center",children:[{tag:"motwToolstrip.liveEditorTab.run.runAll",type:a.PUSH_BUTTON,text:c.runAll,description:c.runAllDescription,mnemonic:"R",actionId:e.RUN_ALL,icon:"run_24",quickAccessIcon:"run_16"},{tag:"motwToolstrip.liveEditorTab.run.pause",
type:a.PUSH_BUTTON,text:c.pause,description:c.pauseDescription,mnemonic:"R",actionId:e.PAUSE,icon:"bigPause",quickAccessIcon:"smallPause"},{tag:"motwToolstrip.liveEditorTab.run.continue",type:a.PUSH_BUTTON,text:c.continue,description:c.continue,mnemonic:"R",actionId:e.CONTINUE,icon:"bigContinue",quickAccessIcon:"smallContinue"}]},{type:a.COLUMN,children:[{tag:"motwToolstrip.liveEditorTab.run.step",type:a.PUSH_BUTTON,text:c.step,description:c.stepDescription,mnemonic:"DD",actionId:e.STEP,icon:"bigStep",
quickAccessIcon:"smallStep"}]},{type:a.COLUMN,children:[{tag:"motwToolstrip.liveEditorTab.run.stop",type:a.PUSH_BUTTON,text:c.stop,description:c.stopDescription,mnemonic:"Q",actionId:e.STOP,icon:"bigQuit",quickAccessIcon:"smallQuit"}]}]}]}})},"MOTW/editor/toolstrip/LiveEditorInsertTabConfig":function(){define(["MOTW/editor/actions/LiveEditorActionIdConstants","MW/toolstrip/constants/TypeConstants","dojo/i18n!MOTW/l10n/nls/liveeditor"],function(g,f,e){return{tag:"motwToolstrip.liveeditor.insertTab",
type:f.TAB,title:e.insertTabTitle,mnemonic:"I",children:[{type:f.SECTION,title:e.codeSectionTitle,children:[{type:f.COLUMN,children:[{tag:"motwToolstrip.liveeditor.insertTab.insert.code",type:f.PUSH_BUTTON,text:e.code,description:e.codeDescription,actionId:g.INSERT_CODE,icon:"bigInsertCode",quickAccessIcon:"smallInsertCode",mnemonic:"K"}]},{type:f.COLUMN,children:[{tag:"motwToolstrip.liveeditor.insertTab.insert.control",type:f.DROP_DOWN_BUTTON,text:e.control,popupTag:"motwToolstrip.liveeditor.insertTab.insert.control.controlList",
description:e.controlDescription,iconOverride:"bigControl",quickAccessIcon:"smallControl",mnemonic:"C",preventRestoreFocus:!0}]}]},{type:f.SECTION,title:e.sectionTitle,children:[{type:f.COLUMN,children:[{tag:"motwToolstrip.liveeditor.insertTab.insert.sectionBreak",type:f.PUSH_BUTTON,text:e.sectionBreak,description:e.sectionBreakDescription,actionId:g.INSERT_SECTION_BREAK,icon:"bigInsertSectionBreak",quickAccessIcon:"smallInsertSectionBreak",mnemonic:"B"}]}]},{type:f.SECTION,title:e.textSectionTitle,
children:[{type:f.COLUMN,children:[{tag:"motwToolstrip.liveeditor.insertTab.insert.text",type:f.PUSH_BUTTON,text:e.text,description:e.textDescription,actionId:g.INSERT_TEXT,icon:"bigInsertText",quickAccessIcon:"smallInsertText",mnemonic:"T"}]},{type:f.COLUMN,children:[{tag:"motwToolstrip.liveeditor.insertTab.insert.tableOfContents",type:f.PUSH_BUTTON,text:e.tableOfContents,description:e.tableOfContentsDescription,actionId:g.INSERT_TABLE_OF_CONTENTS,icon:"bigInsertToC",quickAccessIcon:"smallInsertToC",
mnemonic:"E"}]},{type:f.COLUMN,children:[{tag:"motwToolstrip.liveeditor.insertTab.insert.codeExample",type:f.SPLIT_BUTTON,text:e.codeExample,popupTag:"motwToolstrip.liveeditor.insertTab.insert.codeExample.codeExampleList",description:e.codeExampleDescription,actionId:g.INSERT_CODE_EXAMPLE,iconOverride:"bigInsertCodeExample",quickAccessIcon:"smallInsertCodeExample",mnemonic:"O"}]}]},{type:f.SECTION,title:e.imageSectionTitle,children:[{type:f.COLUMN,children:[{tag:"motwToolstrip.liveeditor.insertTab.insert.image",
type:f.PUSH_BUTTON,text:e.image,description:e.imageDescription,actionId:g.INSERT_IMAGE,icon:"bigImage",quickAccessIcon:"smallImage",mnemonic:"A"}]}]},{type:f.SECTION,title:e.linkSectionTitle,children:[{type:f.COLUMN,children:[{tag:"motwToolstrip.liveeditor.insertTab.insert.hyperlink",type:f.PUSH_BUTTON,text:e.hyperlink,description:e.hyperlinkDescription,actionId:g.INSERT_HYPERLINK,icon:"bigHyperlink",quickAccessIcon:"smallHyperlink",mnemonic:"H"}]}]},{type:f.SECTION,title:e.equationSectionTitle,children:[{type:f.COLUMN,
children:[{tag:"motwToolstrip.liveeditor.insertTab.insert.equation",type:f.SPLIT_BUTTON,text:e.equation,popupTag:"motwToolstrip.liveeditor.insertTab.insert.equation.equationList",description:e.equationDescription,actionId:g.INSERT_EQUATION_EDITOR,iconOverride:"bigEquation",quickAccessIcon:"smallEquation",mnemonic:"Q"}]}]}]}})},"MOTW/editor/toolstrip/LiveEditorViewTabConfig":function(){define(["MW/toolstrip/constants/TypeConstants","MOTW/editor/actions/LiveEditorActionIdConstants","dojo/i18n!MOTW/l10n/nls/liveeditor"],
function(g,f,e){return{tag:"motwToolstrip.liveeditor.viewTab",type:g.TAB,title:e.viewTabTitle,mnemonic:"W",children:[{tag:"motwToolstrip.liveeditor.viewTab.display",type:g.SECTION,title:e.displaySectionTitle,children:[{tag:"motwToolstrip.liveeditor.viewTab.display.column1",type:g.COLUMN,children:[{tag:"motwToolstrip.liveeditor.viewTab.display.dataTips",type:g.TOGGLE_BUTTON,text:e.dataTips,description:e.dataTipsDescription,actionId:f.DATATIPS,icon:"bigDataTips",quickAccessIcon:"smallDataTips",mnemonic:"DE"}]}]},
{tag:"motwToolstrip.liveeditor.viewTab.output",type:g.SECTION,title:e.outputSectionTitle,children:[{tag:"motwToolstrip.liveeditor.viewTab.output.column1",type:g.COLUMN,children:[{tag:"motwToolstrip.liveeditor.viewTab.output.clearOutput",type:g.PUSH_BUTTON,text:e.clearOutput,description:e.clearOutputDescription,actionId:f.CLEAR_ALL_OUTPUT,icon:"bigClearOutput",quickAccessIcon:"smallClearOutput",mnemonic:"C"}]}]},{tag:"motwToolstrip.liveeditor.viewTab.layout",type:g.SECTION,title:e.layoutSectionTitle,
children:[{type:g.COLUMN,children:[{tag:"motwToolstrip.liveeditor.viewTab.layout.outputInline",type:g.TOGGLE_BUTTON,text:e.outputInline,description:e.outputInlineDescription,actionId:f.OUTPUT_INLINE,buttonGroupName:"viewToggleButton",icon:"bigOutputInline",quickAccessIcon:"smallOutputInline",mnemonic:"OI"}]},{type:g.COLUMN,children:[{tag:"motwToolstrip.liveeditor.viewTab.layout.outputOnRight",type:g.TOGGLE_BUTTON,text:e.outputOnRight,description:e.outputOnRightDescription,actionId:f.OUTPUT_ON_RIGHT,
buttonGroupName:"viewToggleButton",icon:"bigOutputOnRight",quickAccessIcon:"smallOutputOnRight",mnemonic:"OR"}]}]}]}})},"MOTW/editor/toolstrip/LiveEditorTabGroupPopupsConfig":function(){define("../actions/ActionIdConstants MOTW/editor/actions/LiveEditorActionIdConstants MOTW/editor/actions/LiveEditorExportActionIdConstants MOTW/motw/ActionIdConstants MW/toolstrip/constants/TypeConstants dojo/i18n!MOTW/l10n/nls/liveeditor".split(" "),function(g,f,e,d,b,a){return{popups:[{tag:"motwToolstrip.liveEditorTab.file.save.saveList",
type:b.POPUP_LIST,children:[{tag:"motwToolstrip.liveEditorTab.file.save.newList.save",actionId:d.SAVE,type:b.LIST_ITEM},{tag:"motwToolstrip.liveEditorTab.file.save.newList.saveAs",actionId:e.SAVEAS,type:b.LIST_ITEM},{tag:"motwToolstrip.liveEditorTab.file.save.saveList.saveAsHTML",type:b.LIST_ITEM,actionId:e.EXPORT_AS_HTML},{tag:"motwToolstrip.liveEditorTab.file.save.saveList.saveAsPDF",type:b.LIST_ITEM,actionId:e.EXPORT_AS_PDF},{tag:"motwToolstrip.liveEditorTab.file.save.saveList.saveAsLaTeX",type:b.LIST_ITEM,
actionId:e.EXPORT_AS_LATEX}]},{tag:"motwToolstrip.liveEditorTab.text.paragraphStyle.paragraphStyleList",type:b.POPUP_LIST,children:[{tag:"motwToolstrip.liveEditorTab.text.paragraphStyle.paragraphStyleList.normal",actionId:f.NORMAL,type:b.LIST_ITEM,icon:"bigNormalTextStyle",text:a.normal},{tag:"motwToolstrip.liveEditorTab.text.paragraphStyle.paragraphStyleList.heading",actionId:f.HEADING1,type:b.LIST_ITEM,icon:"bigHeadingTextStyle",text:a.heading},{tag:"motwToolstrip.liveEditorTab.text.paragraphStyle.paragraphStyleList.heading2",
actionId:f.HEADING2,type:b.LIST_ITEM,icon:"bigHeading2TextStyle",text:a.heading2},{tag:"motwToolstrip.liveEditorTab.text.paragraphStyle.paragraphStyleList.heading3",actionId:f.HEADING3,type:b.LIST_ITEM,icon:"bigHeading3TextStyle",text:a.heading3},{tag:"motwToolstrip.liveEditorTab.text.paragraphStyle.paragraphStyleList.title",actionId:f.TITLE,type:b.LIST_ITEM,icon:"bigTitleTextStyle",text:a.title}]},{tag:"motwToolstrip.liveeditor.insertTab.insert.equation.equationList",type:b.POPUP_LIST,children:[{tag:"motwToolstrip.liveeditor.insertTab.insert.equation.equationList.defaultEquation",
type:b.LIST_ITEM,actionId:f.INSERT_EQUATION_EDITOR,text:a.defaultEquation,description:a.defaultEquationDescription,icon:"smallEquation"},{tag:"motwToolstrip.liveeditor.insertTab.insert.equation.equationList.texEquation",type:b.LIST_ITEM,actionId:f.INSERT_EQUATION,text:a.texEquation,description:a.texEquationDescription,icon:"smallEquation"}]},{tag:"motwToolstrip.liveeditor.insertTab.insert.codeExample.codeExampleList",type:b.POPUP_LIST,children:[{tag:"motwToolstrip.liveeditor.insertTab.insert.codeExample.codeExampleList.codeExampleMatlab",
type:b.LIST_ITEM,actionId:f.INSERT_CODE_EXAMPLE_MATLAB,text:a.codeExampleMatlab,description:a.codeExampleMatlabDescription},{tag:"motwToolstrip.liveeditor.insertTab.insert.codeExample.codeExampleList.codeExamplePlain",type:b.LIST_ITEM,actionId:f.INSERT_CODE_EXAMPLE_PLAIN,text:a.codeExamplePlain,description:a.codeExamplePlainDescription}]},{tag:"motwToolstrip.liveeditor.insertTab.insert.control.controlList",type:b.POPUP_LIST,children:[{tag:"motwToolstrip.liveeditor.insertTab.insert.control.controlList.slider",
type:b.LIST_ITEM,actionId:f.INSERT_SLIDER,text:a.slider,description:a.sliderDescription,icon:"smallSlider"},{tag:"motwToolstrip.liveeditor.insertTab.insert.control.controlList.comboBox",type:b.LIST_ITEM,actionId:f.INSERT_COMBO_BOX,text:a.comboBox,description:a.comboBoxDescription,icon:"smallComboBox"}]}]}})},"MOTW/editor/LiveEditorWidgetFactory":function(){define(["dojo/_base/declare","MOTW/editor/EditorFactoryUtils","MOTW/editor/LiveEditorWidget","MW/uiframework/uicontainer/UIComponentFactory"],
function(g,f,e,d){return g([d],{modulePath:"MOTW/editor/LiveEditorWidgetFactory",createWidget:function(b,a,c){a=b.getRootUIContainer();var d=a.application.fileDataService;f.ensureActionsLoaded(b);c.window=window;c.widget=new e({id:c.id,editorView:c,actionService:b.actionService,fileDataService:d});b==a&&a.application.editorService._setupDropTarget(c);return c.widget}})})},"MOTW/editor/PlainEditorTabGroupFactory":function(){define("dojo/_base/declare MW/toolstrip/constants/TypeConstants MW/uiframework/uicontainer/UIComponentFactory MOTW/editor/EditorFactoryUtils MOTW/motw/ActionIdConstants MOTW/toolstrip/configs/editor/EditorTabGroupConfig MOTW/toolstrip/configs/editor/EditorTabGroupPopupsConfig MOTW/toolstrip/qab/QABContextualControls".split(" "),
function(g,f,e,d,b,a,c,h){return g([e],{modulePath:"MOTW/editor/PlainEditorTabGroupFactory",createWidget:function(e,g,m){d.ensureActionsLoaded(e);g=e.uiBuilder;g.createPopupsFromConfig(c);g.addTabGroupFromConfig(a,"motwToolstrip.editorTabGroup");e.isChildContainer()&&(e=g.tagToId("motwToolstrip.editorTabGroup"),e=g.get(e,"QAGroupId"),g.create({tag:"qabSave",type:f.QAB_PUSH_BUTTON,actionId:b.SAVE,parentId:e}),g.create({tag:h.UNDO,type:f.QAB_PUSH_BUTTON,quickAccessIcon:"undo_16",parentId:e}),g.create({tag:h.REDO,
type:f.QAB_PUSH_BUTTON,quickAccessIcon:"redo_16",parentId:e}))}})})},"MOTW/toolstrip/configs/editor/EditorTabGroupConfig":function(){define("MW/toolstrip/constants/TypeConstants MOTW/motw/ActionIdConstants MOTW/editor/actions/ActionIdConstants dojo/i18n!MOTW/l10n/nls/editor dojo/i18n!MOTW/l10n/nls/motw dojo/i18n!MOTW/l10n/nls/toolstrip MW/toolstrip/constants/MiscConstants MW/uiframework/FeatureDetectionService".split(" "),function(g,f,e,d,b,a,c,h){f={tag:"motwToolstrip.editorTabGroup",type:g.TAB_GROUP,
children:[{tag:"motwToolstrip.editorTab",type:g.TAB,title:b.editorTabTitle,mnemonic:"E",children:[{tag:"motwToolstrip.editorTab.file",type:g.SECTION,title:a.fileSectionTitle,collapsePriority:3,children:[{tag:"motwToolstrip.editorTab.file.column1",type:g.COLUMN,children:[{tag:"motwToolstrip.editorTab.file.newScript",type:g.SPLIT_BUTTON,actionId:f.NEW_FILE,textOverride:b.newMenuLabel,description:b.newMenuDescription,iconOverride:"new_24",mnemonic:"N"}]},{tag:"motwToolstrip.editorTab.file.column2",type:g.COLUMN,
children:[{tag:"motwToolstrip.editorTab.file.save",actionId:f.SAVE,type:g.SPLIT_BUTTON,mnemonic:"S"}]},{tag:"motwToolstrip.editorTab.file.column4",type:g.COLUMN,children:[{tag:"motwToolstrip.editorTab.file.findFiles",type:g.PUSH_BUTTON,actionId:f.FIND_FILES,mnemonic:"FF",icon:"icon_find_files_24",quickAccessIcon:"icon_find_files_16"}]}]},{tag:"motwToolstrip.editorTab.edit",type:g.SECTION,collapsePriority:1,title:a.editSectionTitle,children:[{tag:"motwToolstrip.editorTab.edit.column1",type:g.COLUMN,
horizontalAlignment:"right",children:[{tag:"motwToolstrip.editorTab.edit.label.insert",type:g.LABEL,text:"Insert"},{tag:"motwToolstrip.editorTab.edit.label.comment",type:g.LABEL,text:"Comment"},{tag:"motwToolstrip.editorTab.edit.label.indent",type:g.LABEL,text:"Indent"}]},{tag:"motwToolstrip.editorTab.edit.column2",type:g.COLUMN,children:[{tag:"motwToolstrip.editorTab.edit.insertSection",actionId:e.INSERT_SECTION,type:g.PUSH_BUTTON,textOverride:c.DO_NOT_DISPLAY,mnemonic:"IN"},{tag:"motwToolstrip.editorTab.edit.insertComment",
actionId:e.INSERT_COMMENT,type:g.PUSH_BUTTON,mnemonic:"IC"},{tag:"motwToolstrip.editorTab.edit.smartIndent",actionId:e.SMART_INDENT,type:g.PUSH_BUTTON,textOverride:c.DO_NOT_DISPLAY,mnemonic:"IS"}]},{tag:"motwToolstrip.editorTab.edit.column3",type:g.COLUMN,children:[{type:g.EMPTY_CONTROL},{tag:"motwToolstrip.editorTab.edit.uncomment",actionId:e.UNCOMMENT,type:g.PUSH_BUTTON,mnemonic:"IU"},{tag:"motwToolstrip.editorTab.edit.indent",actionId:e.INDENT,type:g.PUSH_BUTTON,mnemonic:"II"}]},{tag:"motwToolstrip.editorTab.edit.column4",
type:g.COLUMN,children:[{type:g.EMPTY_CONTROL},{type:g.EMPTY_CONTROL},{tag:"motwToolstrip.editorTab.edit.outdent",actionId:e.OUTDENT,type:g.PUSH_BUTTON,mnemonic:"ID"}]}]},{tag:"motwToolstrip.editorTab.navigate",type:g.SECTION,collapsePriority:2,title:b.navigateSectionTitle,children:[{tag:"motwToolstrip.editorTab.navigate.column1",type:g.COLUMN,children:[{tag:"motwToolstrip.editorTab.navigate.goTo",actionId:e.GOTO,type:g.DROP_DOWN_BUTTON,mnemonic:"G"},{tag:"motwToolstrip.editorTab.navigate.find",actionId:e.FIND,
type:g.SPLIT_BUTTON,popupTag:"motwToolstrip.editorTab.navigate.find.findList",mnemonic:"FD"}]}]},{tag:"motwToolstrip.editorTab.breakpoints",type:g.SECTION,collapsePriority:4,title:b.breakpointsSectionTitle,children:[{tag:"motwToolstrip.editorTab.breakpoints.column1",type:g.COLUMN,children:[{tag:"motwToolstrip.editorTab.breakpoints.breakpoints",actionId:e.BREAKPOINTS,type:g.DROP_DOWN_BUTTON,mnemonic:"K"}]}]},{tag:"motwToolstrip.editorTab.run",type:g.SECTION,collapsePriority:4,title:b.runSectionTitle,
children:[{tag:"motwToolstrip.editorTab.run.column1",type:g.COLUMN,children:[{tag:"motwToolstrip.editorTab.run.run",actionId:e.RUN,type:g.SPLIT_BUTTON,popupTag:"motwToolstrip.editorTab.errorHandlingList",mnemonic:"R"}]},{tag:"motwToolstrip.editorTab.run.column2",type:g.COLUMN,children:[{tag:"motwToolstrip.editorTab.run.runCellAndAdvance",actionId:e.RUN_CELL_ADVANCE,type:g.PUSH_BUTTON,mnemonic:"V"}]},{tag:"motwToolstrip.editorTab.run.column3",type:g.COLUMN,children:[{tag:"motwToolstrip.editorTab.run.runCell",
actionId:e.RUN_CELL,type:g.PUSH_BUTTON,mnemonic:"C"},{tag:"motwToolstrip.editorTab.run.advanceCell",actionId:e.ADVANCE_CELL,type:g.PUSH_BUTTON,mnemonic:"A"}]}]}]},{tag:"motwToolstrip.publishTab",type:g.TAB,title:d.publishTabTitle,mnemonic:"B",children:[{tag:"motwToolstrip.publishTab.file",type:g.SECTION,title:a.fileSectionTitle,children:[{tag:"motwToolstrip.publishTab.file.column1",type:g.COLUMN,children:[{tag:"motwToolstrip.publishTab.file.save",actionId:f.SAVE,type:g.SPLIT_BUTTON,mnemonic:"S"}]}]},
{tag:"motwToolstrip.publishTab.insertSection",type:g.SECTION,title:d.insertSectionTitle,children:[{tag:"motwToolstrip.publishTab.insertSection.column1",type:g.COLUMN,children:[{tag:"motwToolstrip.publishTab.insertSection.newSection",actionId:e.NEW_SECTION,type:g.PUSH_BUTTON,mnemonic:"N"}]},{tag:"motwToolstrip.publishTab.insertSection.column2",type:g.COLUMN,children:[{tag:"motwToolstrip.publishTab.insertSection.insertSectionWithTitle",actionId:e.INSERT_SECTION_WITH_TITLE,type:g.PUSH_BUTTON,mnemonic:"T"}]}]},
{tag:"motwToolstrip.publishTab.insertInlineMarkupSection",type:g.SECTION,title:d.insertInlineMarkupTitle,children:[{tag:"motwToolstrip.publishTab.insertInlineMarkupSection.column1",type:g.COLUMN,children:[{tag:"motwToolstrip.publishTab.insertInlineMarkupSection.bold",actionId:e.BOLD,type:g.PUSH_BUTTON,mnemonic:"B"},{tag:"motwToolstrip.publishTab.insertInlineMarkupSection.italic",actionId:e.ITALIC,type:g.PUSH_BUTTON,mnemonic:"I"},{tag:"motwToolstrip.publishTab.insertInlineMarkupSection.monospaced",
actionId:e.MONOSPACED,type:g.PUSH_BUTTON,mnemonic:"O"}]},{tag:"motwToolstrip.publishTab.insertInlineMarkupSection.column2",type:g.COLUMN,children:[{tag:"motwToolstrip.publishTab.insertInlineMarkupSection.hyperlink",actionId:e.HYPERLINK,type:g.PUSH_BUTTON,mnemonic:"H"},{tag:"motwToolstrip.publishTab.insertInlineMarkupSection.inlineLatex",actionId:e.INLINE_LATEX,type:g.PUSH_BUTTON,mnemonic:"L"}]}]},{tag:"motwToolstrip.publishTab.insertBlockMarkupSection",type:g.SECTION,title:d.insertBlockMarkupTitle,
children:[{tag:"motwToolstrip.publishTab.insertBlockMarkupSection.column1",type:g.COLUMN,children:[{tag:"motwToolstrip.publishTab.insertBlockMarkupSection.bulletedList",actionId:e.BULLETED_LIST,type:g.PUSH_BUTTON,mnemonic:"U"},{tag:"motwToolstrip.publishTab.insertBlockMarkupSection.numberedList",actionId:e.NUMBERED_LIST,type:g.PUSH_BUTTON,mnemonic:"M"},{tag:"motwToolstrip.publishTab.insertBlockMarkupSection.image",actionId:e.IMAGE,type:g.PUSH_BUTTON,mnemonic:"G"}]},{tag:"motwToolstrip.publishTab.insertBlockMarkupSection.column2",
type:g.COLUMN,children:[{tag:"motwToolstrip.publishTab.insertBlockMarkupSection.preformattedText",actionId:e.PREFORMATTED_TEXT,type:g.PUSH_BUTTON,mnemonic:"F"},{tag:"motwToolstrip.publishTab.insertBlockMarkupSection.code",actionId:e.CODE,type:g.PUSH_BUTTON,mnemonic:"C"},{tag:"motwToolstrip.publishTab.insertBlockMarkupSection.displayLatex",actionId:e.DISPLAY_LATEX,type:g.PUSH_BUTTON,mnemonic:"X"}]}]},{tag:"motwToolstrip.publishTab.publish",type:g.SECTION,title:d.publishSectionTitle,children:[{tag:"motwToolstrip.publishTab.publish.column1",
type:g.COLUMN,children:[{tag:"motwToolstrip.publishTab.publish.publishAsHTML",actionId:e.PUBLISH_AS_HTML,type:g.PUSH_BUTTON,mnemonic:"PH"}]},{tag:"motwToolstrip.publishTab.publish.column2",type:g.COLUMN,children:[{tag:"motwToolstrip.publishTab.publish.publishAsPDF",actionId:e.PUBLISH_AS_PDF,type:g.PUSH_BUTTON,mnemonic:"PP"}]}]}]}]};g={tag:"motwToolstrip.fileHistoryTab",type:g.TAB,title:b.fileHistoryTabTitle,mnemonic:"V",children:[{tag:"motwToolstrip.fileHistoryTab.browse",type:g.SECTION,title:b.browseSectionTitle,
children:[{tag:"motwToolstrip.fileHistoryTab.browse.column1",type:g.COLUMN,children:[{tag:"motwToolstrip.fileHistoryTab.browse.older",actionId:e.GET_OLDER_VERSION,type:g.PUSH_BUTTON,mnemonic:"O"}]},{tag:"motwToolstrip.fileHistoryTab.browse.column2",type:g.COLUMN,children:[{tag:"motwToolstrip.fileHistoryTab.browse.newer",actionId:e.GET_NEWER_VERSION,type:g.PUSH_BUTTON,mnemonic:"N"}]}]},{tag:"motwToolstrip.fileHistoryTab.restore",type:g.SECTION,title:b.restoreSectionTitle,children:[{tag:"motwToolstrip.fileHistoryTab.restore.column1",
type:g.COLUMN,children:[{tag:"motwToolstrip.fileHistoryTab.restore.restoreAsLatest",actionId:e.RESTORE_AS_LATEST,type:g.PUSH_BUTTON,mnemonic:"R"}]}]},{tag:"motwToolstrip.fileHistoryTab.history",type:g.SECTION,title:b.historySectionTitle,children:[{tag:"motwToolstrip.fileHistoryTab.history.column1",type:g.COLUMN,width:230,children:[{tag:"motwToolstrip.fileHistoryTab.history.historyComboBox",actionId:e.VERSION_LIST,type:g.COMBO_BOX,mnemonic:"V"}]}]}]};h.isFeatureRegistered(h.FeatureNames.GDS)&&!0===
h.getFeatureStatus(h.FeatureNames.GDS)&&f.children.push(g);return f})},"MOTW/toolstrip/configs/editor/EditorTabGroupPopupsConfig":function(){define(["MOTW/editor/actions/ActionIdConstants","MW/toolstrip/constants/TypeConstants","MOTW/motw/ActionIdConstants","dojo/i18n!MOTW/l10n/nls/motw","dojo/i18n!MOTW/l10n/nls/editor"],function(g,f,e,d,b){return{popups:[{tag:"motwToolstrip.editorTab.file.save.newList",type:f.POPUP_LIST,children:[{tag:"motwToolstrip.editorTab.file.save.newList.save",actionId:e.SAVE,
type:f.LIST_ITEM},{tag:"motwToolstrip.editorTab.file.save.newList.saveAs",actionId:g.SAVEAS,type:f.LIST_ITEM}]},{tag:"motwToolstrip.editorTab.navigate.find.findList",type:f.POPUP_LIST,children:[{tag:"motwToolstrip.editorTab.navigate.find.findList.find",actionId:g.FIND,type:f.LIST_ITEM,textOverride:b.findListItemLabel,showIcon:!1,showDescription:!1},{tag:"motwToolstrip.editorTab.navigate.find.findList.findNext",type:f.LIST_ITEM,actionId:g.FIND_NEXT,showIcon:!1},{tag:"motwToolstrip.editorTab.navigate.find.findList.findPrevious",
type:f.LIST_ITEM,actionId:g.FIND_PREVIOUS,showIcon:!1},{tag:"motwToolstrip.editorTab.navigate.find.findList.findSelection",type:f.LIST_ITEM,actionId:g.FIND_SELECTION,showIcon:!1}]},{tag:"motwToolstrip.editorTab.navigate.goTo.goToList",type:f.POPUP_LIST,children:[{tag:"motwToolstrip.editorTab.navigate.goTo.goToList.sectionList",type:f.POPUP_LIST_HEADER,title:"LINE"},{tag:"motwToolstrip.editorTab.navigate.goTo.goToList.goToLine",type:f.LIST_ITEM,actionId:g.GOTO_LINE}]},{tag:"motwToolstrip.editorTab.breakpoints.breakpointList",
type:f.POPUP_LIST,children:[{tag:"motwToolstrip.editorTab.breakpoints.breakpointList.clearAllBreakpoints",type:f.LIST_ITEM,actionId:g.CLEAR_ALL_BREAKPOINTS},{tag:"motwToolstrip.editorTab.breakpoints.breakpointList.toggleBreakpoint",type:f.LIST_ITEM,actionId:g.TOGGLE_BREAKPOINT},{tag:"motwToolstrip.editorTab.breakpoints.breakpointList.toggleEnableBreakpoint",type:f.LIST_ITEM,actionId:g.TOGGLE_ENABLE_BREAKPOINT}]},{tag:"motwToolstrip.editorTab.errorHandlingList",type:f.POPUP_LIST,children:[{tag:"motwToolstrip.editorTab.errorHandlingList.errorHandlingTitle",
title:b.errorHandlingTitle,type:f.POPUP_LIST_HEADER},{tag:"motwToolstrip.editorTab.errorHandlingList.stopIfError",actionId:g.TOGGLE_STOP_IF_ERROR,type:f.LIST_ITEM_WITH_CHECKBOX,closePopupOnClick:!0},{tag:"motwToolstrip.editorTab.errorHandlingList.stopIfWarning",actionId:g.TOGGLE_STOP_IF_WARNING,type:f.LIST_ITEM_WITH_CHECKBOX,closePopupOnClick:!0},{tag:"motwToolstrip.editorTab.errorHandlingList.stopIfNanInf",actionId:g.TOGGLE_STOP_IF_NAN_INF,type:f.LIST_ITEM_WITH_CHECKBOX,closePopupOnClick:!0}]},{tag:"motwToolstrip.editorTab.file.new.newList",
type:f.POPUP_LIST,children:[{tag:"motwToolstrip.editorTab.file.new.newList.script",actionId:e.NEW_FILE,type:f.LIST_ITEM,iconOverride:"icon_new_script_24",showDescription:!1,textOverride:d.newFileListItemLabel},{tag:"motwToolstrip.matlabTab.file.new.newList.liveScript",actionId:e.NEW_LIVE_SCRIPT,type:f.LIST_ITEM,showDescription:!1,textOverride:d.newLiveScriptListItemLabel},{tag:"motwToolstrip.editorTab.file.new.newList.function",actionId:e.NEW_FUNCTION,type:f.LIST_ITEM},{tag:"motwToolstrip.editorTab.file.new.newList.liveFunction",
actionId:e.NEW_LIVE_FUNCTION,type:f.LIST_ITEM,showDescription:!1},{tag:"motwToolstrip.editorTab.file.new.newList.class",actionId:e.NEW_CLASS,type:f.LIST_ITEM}]},{tag:"motwToolstrip.liveEditorTab.file.new.newList",type:f.POPUP_LIST,children:[{tag:"motwToolstrip.editorTab.file.new.newList.script",actionId:e.NEW_FILE,type:f.LIST_ITEM,iconOverride:"icon_new_script_24",showDescription:!1,textOverride:d.newFileListItemLabel},{tag:"motwToolstrip.matlabTab.file.new.newList.liveScript",actionId:e.NEW_LIVE_SCRIPT,
type:f.LIST_ITEM,showDescription:!1,textOverride:d.newLiveScriptListItemLabel},{tag:"motwToolstrip.liveEditorTab.file.new.newList.function",actionId:e.NEW_FUNCTION,type:f.LIST_ITEM},{tag:"motwToolstrip.liveEditorTab.file.new.newList.liveFunction",actionId:e.NEW_LIVE_FUNCTION,type:f.LIST_ITEM,showDescription:!1},{tag:"motwToolstrip.editorTab.file.new.newList.class",actionId:e.NEW_CLASS,type:f.LIST_ITEM}]}]}})},"MOTW/editor/PlainEditorWidgetFactory":function(){define(["dojo/_base/declare","MOTW/editor/EditorFactoryUtils",
"MOTW/editor/PlainEditorWidget","MW/layout/LayoutUtils","MW/uiframework/uicontainer/UIComponentFactory"],function(g,f,e,d,b){return g([b],{modulePath:"MOTW/editor/PlainEditorWidgetFactory",createWidget:function(a,b,g){var k=a.getRootUIContainer(),l=k.application.fileDataService;b&&(g.initialDocumentText=b.content);f.ensureActionsLoaded(a);g.window=window;g.widget=new e({id:g.id,editorView:g,actionService:a.actionService,fileDataService:l});g.addDocumentChangeListener(function(){l.setFileModified(g.file)});
a==k&&k.application.editorService._setupDropTarget(g);b&&setTimeout(function(){d.setScrollPosition(g.widget,b.scrollPosition)},0);return g.widget},getState:function(a,b){return{content:b.file.content,scrollPosition:d.getScrollPosition(a)}}})})},"MOTW/editor/PlainEditorWidget":function(){define("dojo/_base/declare dojo/_base/lang MOTW/editor/EditorWidgetBase MOTW/editor/DebuggerToolstripFactory MOTW/editor/RunMenuDropdownEventHandlerFactory MOTW/editor/actions/ActionIdConstants dojo/text!MOTW/editor/plainEditorWindow.html MOTW/motw/ActionIdConstants MW/rtc/RichTextComponent MW/rtc/clipboardservice/ClipboardService MW/rtc/datamodel/FileBackingStore MW/uiframework/UIBuilderFactory mw-filename-utils/FileNameUtil mw-log/Log MOTW/editor/plugins/contextmenu/ReconfigureContextMenuModelProvider MOTW/editor/plugins/settings/MatlabSettingSynchronizerProvider".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q){return g([e],{templateString:c,postCreate:function(){this.inherited(arguments);this.editorView.setEditor(this.editor);this.editor.addDocumentChangeListener(f.hitch(this.editorView,"_updateFile"));this.domNode&&(this.domNode.focus=void 0)},_initializeEditor:function(){var a=this.editorView,c=n.checkFileNameExtension(a.file.fileInfo.name,"m"),e={};e["rtc.backingstore"]=new m(n.pathFromFileInfo(a.file.fileInfo));e["rtc.clipboard"]=l.getBrowserSyncedClipboard();e["rtc.executionservice"]=
a.executionDataService;e["rtc.columnselection.enabled"]=!0;e={"class":"rtePaneFixedSize",id:"internal_"+a.id,initialDocumentText:a.initialDocumentText,readOnly:!a.isFileEditable(),motwExecutionService:a.executionDataService,motwActionService:this.actionService,keyBindings:this._getKeyBindings(),dependencies:e,registry:[{id:"rtc.contextmenu.reconfiguremodel",path:"MOTW/editor/plugins/contextmenu/ReconfigureContextMenuModelProvider",family:"contextmenu"},{id:"rtc.code.codingui.helpicon",path:"MOTW/help/codingui/CodingUIHelpProvider"},
{id:"settings.matlabsynchronizer",path:"MOTW/editor/plugins/settings/MatlabSettingSynchronizerProvider"}],features:{plainText:!0,fixedSize:!0,enabled:"rtc.code.comment contextmenu currentlinehighlight rtc.contextualselection.evaluateselection rtc.contextualselection.openselection rtc.findandreplace rtc.navigate.goto margin.linenumber matlab.code.variables.rename debug.breakpointactions rtc.cutcopypaste rtc.draganddrop rtc.caseconverter rtc.helponselection settings.matlabsynchronizer rtc.linenumberpreference".split(" ")}};
c&&(e.features.enabled.push("matlab.tokens"),this.fileDataService.enableProgrammingAids?e.features.enabled.push("rtc.code.codingui"):(e.features.enabled.push("matlab.tabcompletion"),e.features.enabled.push("rtc.code.functionhints")),e.features.enabled.push("matlab.code.variables.highlighting"),e.features.enabled.push("rtc.code.syntaxhighlighter"),e.features.enabled.push("rtc.code.autoindent"),e.features.enabled.push("rtc.code.parenmatch"),e.features.enabled.push("rtc.code.sections"),e.features.enabled.push("rtc.code.formatcode"),
e.features.enabled.push("rtc.indent"),e.features.enabled.push("codeanalyzer"),e.features.enabled.push("messagebar"),e.features.enabled.push("rtc.margin.severitystatusbutton"),e.features.enabled.push("debugging"),e.features.enabled.push("folding"),c=p.getInstance(),d.getInstance(a.debugServices,c,this.actionService),b.getInstance(this.actionService,a.debugServices,c));e.features.enabled.push("rtc.smarttab");return new k(e,this.textEditorWindow)},_getKeyBindings:function(){var b=[];b.push(this._createShortcutWrapper(h.SAVE));
b.push(this._createShortcutWrapper(a.SAVEAS));b.push(this._createShortcutWrapper(a.INSERT_COMMENT));b.push(this._createShortcutWrapper(a.INDENT));b.push(this._createShortcutWrapper(a.OUTDENT));b.push(this._createShortcutWrapper(a.SMART_INDENT));b.push(this._createShortcutWrapper(a.RUN));b.push(this._createShortcutWrapper(a.RUN_CELL_ADVANCE));return b},_createShortcutWrapper:function(a){var b=this.actionService.getAction(a);b.callback=f.hitch(this.actionService,function(){this.executeAction(a)});return b}})})},
"MOTW/editor/DebuggerToolstripFactory":function(){define(["MOTW/editor/DebuggerToolstrip"],function(g){var f=null;return{getInstance:function(e,d,b){null===f&&(f=new g(e,d,b));return f}}})},"MOTW/editor/DebuggerToolstrip":function(){define("dojo/_base/declare dojo/_base/lang dojo/aspect dojo/i18n!l10n/nls/rtcDebug mw-messageservice/MessageService MOTW/editor/FunctionCallStackActions MOTW/motw/MotwApp MW/toolstrip/constants/TypeConstants".split(" "),function(g,f,e,d,b,a,c,h){return g(null,{RUN_SECTION_INDEX:4,
RUN_SECTION_TAG:"motwToolstrip.editorTab.run",EDITOR_TAB_TAG:"motwToolstrip.editorTab",RUN_BUTTON_TAG:"motwToolstrip.editorTab.run.run",DEBUG_CONTINUE_TAG:"motwToolstrip.editorTab.debugContinue",DEBUG_STEP_TAG:"motwToolstrip.editorTab.debugStep",DEBUG_STEP_IN_TAG:"motwToolstrip.editorTab.debugStepIn",DEBUG_STEP_OUT_TAG:"motwToolstrip.editorTab.debugStepOut",DEBUG_QUIT_TAG:"motwToolstrip.editorTab.debugExit",DEBUG_FUNCTION_STACK_TAG:"motwToolstrip.editorTab.debugFunctionStack",DEBUG_FUNCTION_STACK_LABEL_TAG:"motwToolstrip.editorTab.debugFunctionStackLabel",
DEBUG_CONTINUE_ACTION_ID:"rtc_debug_continue",DEBUG_STEP_ACTION_ID:"rtc_debug_step",DEBUG_STEP_IN_ACTION_ID:"rtc_debug_step_in",DEBUG_STEP_OUT_ACTION_ID:"rtc_debug_step_out",DEBUG_QUIT_ACTION_ID:"rtc_debug_quit",constructor:function(b,c,d){this._uiBuilder=c;this._debugServices=b;this._actionService=d;this._functionCallStackActions=new a(this._debugServices,this._actionService);this.DEBUG_SECTION_ID=this._createDebugSection();this._debuggerChanged(b.isDebugging);this._aspectHandles=[];this._aspectHandles.push(e.after(this._debugServices,
"onDebugModeChanged",f.hitch(this,"_debuggerChanged"),!0))},_debuggerChanged:function(a){var b=this._uiBuilder.tagToId(this.RUN_SECTION_TAG),c=this._uiBuilder.tagToId(this.EDITOR_TAB_TAG),d=this._uiBuilder.tagToId(this.RUN_BUTTON_TAG),e=this._uiBuilder.tagToId(this.DEBUG_CONTINUE_TAG),f=this._uiBuilder.tagToId(this.DEBUG_STEP_TAG),g=this._uiBuilder.tagToId(this.DEBUG_STEP_IN_TAG),h=this._uiBuilder.tagToId(this.DEBUG_STEP_OUT_TAG),t=this._uiBuilder.tagToId(this.DEBUG_QUIT_TAG),u=this._uiBuilder.tagToId(this.DEBUG_FUNCTION_STACK_LABEL_TAG),
v=this._uiBuilder.tagToId(this.DEBUG_FUNCTION_STACK_TAG);a&&this._isCurrentlyInToolstrip(b)?(this._uiBuilder.remove(b),this._uiBuilder.add(this.DEBUG_SECTION_ID,c,this.RUN_SECTION_INDEX),this._uiBuilder.set(d,"enabled",!1),this._uiBuilder.set(e,"enabled",!0),this._uiBuilder.set(f,"enabled",!0),this._uiBuilder.set(g,"enabled",!0),this._uiBuilder.set(h,"enabled",!0),this._uiBuilder.set(t,"enabled",!0),this._uiBuilder.set(u,"enabled",!0),this._uiBuilder.set(v,"enabled",!0)):!a&&this._isCurrentlyInToolstrip(this.DEBUG_SECTION_ID)&&
(this._uiBuilder.remove(this.DEBUG_SECTION_ID),this._uiBuilder.add(b,c,this.RUN_SECTION_INDEX),this._uiBuilder.set(d,"enabled",!0),this._uiBuilder.set(e,"enabled",!1),this._uiBuilder.set(f,"enabled",!1),this._uiBuilder.set(g,"enabled",!1),this._uiBuilder.set(h,"enabled",!1),this._uiBuilder.set(t,"enabled",!1),this._uiBuilder.set(u,"enabled",!1),this._uiBuilder.set(v,"enabled",!1))},_isCurrentlyInToolstrip:function(a){return-1!==this._uiBuilder.indexOf(a)},_createDebugSection:function(){var a=this._uiBuilder.create({tag:"motwToolstrip.editorTab.debugSection",
type:h.SECTION,title:d.debugSectionTitle}),b=this._uiBuilder.create({tag:"motwToolstrip.editorTab.debugContinueColumn",type:h.COLUMN,parentId:a}),b=this._uiBuilder.create({tag:this.DEBUG_CONTINUE_TAG,type:h.SPLIT_BUTTON,icon:"bigDebugContinue",quickAccessIcon:"smallDebugContinue",shortcut:d.debugContinueShortcut,text:d.debugContinueLabel,description:d.debugContinueDescription,parentId:b,popupTag:"motwToolstrip.editorTab.errorHandlingList"});this._uiBuilder.addEventCallback(b,f.hitch(this,this._performAction,
this.DEBUG_CONTINUE_ACTION_ID));b=this._uiBuilder.create({tag:"motwToolstrip.editorTab.debugStepColumn",type:h.COLUMN,parentId:a});b=this._uiBuilder.create({tag:this.DEBUG_STEP_TAG,type:h.PUSH_BUTTON,icon:"bigDebugStep",quickAccessIcon:"smallDebugStep",text:d.debugStepLabel,shortcut:d.debugStepShortcut,description:d.debugStepDescription,parentId:b});this._uiBuilder.addEventCallback(b,f.hitch(this,this._performAction,this.DEBUG_STEP_ACTION_ID));var b=this._uiBuilder.create({tag:"motwToolstrip.editorTab.debugStepInOutColumn",
type:h.COLUMN,parentId:a}),c=this._uiBuilder.create({tag:this.DEBUG_STEP_IN_TAG,type:h.PUSH_BUTTON,icon:"smallDebugStepIn",quickAccessIcon:"smallDebugStepIn",text:d.debugStepInLabel,shortcut:d.debugStepInShortcut,description:d.debugStepInDescription,parentId:b});this._uiBuilder.addEventCallback(c,f.hitch(this,this._performAction,this.DEBUG_STEP_IN_ACTION_ID));b=this._uiBuilder.create({tag:this.DEBUG_STEP_OUT_TAG,type:h.PUSH_BUTTON,icon:"smallDebugStepOut",quickAccessIcon:"smallDebugStepOut",text:d.debugStepOutLabel,
shortcut:d.debugStepOutShortcut,description:d.debugStepOutDescription,parentId:b});this._uiBuilder.addEventCallback(b,f.hitch(this,this._performAction,this.DEBUG_STEP_OUT_ACTION_ID));b=this._uiBuilder.create({tag:"motwToolstrip.editorTab.debugFunctionCallStackColumn",type:h.COLUMN,parentId:a});this._createFunctionStackDropdown(b);b=this._uiBuilder.create({tag:"motwToolstrip.editorTab.debugExitColumn",type:h.COLUMN,parentId:a});b=this._uiBuilder.create({tag:this.DEBUG_QUIT_TAG,type:h.PUSH_BUTTON,icon:"bigDebugExit",
quickAccessIcon:"smallDebugExit",text:d.debugExitLabel,shortcut:d.debugExitShortcut,description:d.debugExitDescription,parentId:b});this._uiBuilder.addEventCallback(b,f.hitch(this,this._performAction,this.DEBUG_QUIT_ACTION_ID));return a},_createFunctionStackDropdown:function(a){this._uiBuilder.create({tag:this.DEBUG_FUNCTION_STACK_LABEL_TAG,type:h.LABEL,text:d.debugFunctionStackLabel,parentId:a});this._uiBuilder.create({tag:this.DEBUG_FUNCTION_STACK_TAG,type:h.COMBO_BOX,actionId:this._functionCallStackActions.DEBUG_STACK_ACTION_ID,
items:[],selectedItem:"",parentId:a})},_performAction:function(a){c.editorService.getActiveEditor(window).editor.localActionService.executeAction(a)},destroy:function(){this._aspectHandles.forEach(function(a){a.remove()});this._aspectHandles=[];this._functionCallStackActions.destroy();this._functionCallStackActions=null;this._uiBuilder.destroy(this.DEBUG_SECTION_ID)}})})},"MOTW/editor/FunctionCallStackActions":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect"],function(g,f,e){return g(null,
{DEBUG_STACK_ACTION_ID:"rtc.functionStackList",constructor:function(d,b){this._debugServices=d;this._actionService=b;this._actions=[{id:this.DEBUG_STACK_ACTION_ID,enabled:!0}];this._actionService.loadActions(this._actions);this._actionService.addActionChangeCallback(this.DEBUG_STACK_ACTION_ID,f.hitch(this,"_handleItemSelected"));this._aspectHandles=[];this._aspectHandles.push(e.after(this._debugServices,"onStackChanged",f.hitch(this,"_handleStackChange"),!0))},destroy:function(){this._aspectHandles.forEach(function(d){d.remove()});
this._aspectHandles=[];this._actions.forEach(function(d){this._actionService.getAction(d.id)&&this._actionService.removeAction(d.id)},this)},_handleItemSelected:function(d){if(!("selectedItem"!==d.property||""===d.newValue||""===d.oldValue)){var b=parseInt(d.newValue,10);d=parseInt(d.oldValue,10);this._debugServices.dbUpDown(b-d)}},_handleStackChange:function(d,b){if(0===d.length)this._actionService.updateAction(this.DEBUG_STACK_ACTION_ID,{items:[],selectedItem:""});else{var a=[],c=d.map(function(b,
c){var d=b.getName(),d=this._createUniqueLabel(d,a);a.push(d);return{label:d,value:c.toString()}},this);this._actionService.updateAction(this.DEBUG_STACK_ACTION_ID,{items:c,selectedItem:b.toString()})}},_createUniqueLabel:function(d,b){for(var a=d;-1<b.indexOf(a);)a+=" ";return a}})})},"MOTW/editor/RunMenuDropdownEventHandlerFactory":function(){define(["MW/uiframework/UIBuilderFactory","./RunDropdownMenuEventHandler"],function(g,f){var e=null;return{getInstance:function(d,b,a){return e=new f(b,a)}}})},
"MOTW/editor/RunDropdownMenuEventHandler":function(){define(["dojo/_base/declare","dojo/_base/lang","dojo/aspect"],function(g,f,e){return g(null,{STOP_IF_ERROR_TAG:"motwToolstrip.editorTab.errorHandlingList.stopIfError",STOP_IF_WARNING_TAG:"motwToolstrip.editorTab.errorHandlingList.stopIfWarning",STOP_IF_NAN_INF_TAG:"motwToolstrip.editorTab.errorHandlingList.stopIfNanInf",constructor:function(d,b){this._uiBuilder=b;this._debugServices=d;this._setupCheckListeners();this._aspectHandles=[];this._aspectHandles.push(e.after(this._debugServices,
"onDbStopConditionsEvent",f.hitch(this,"_handleStopConditionChange"),!0))},_setupCheckListeners:function(){var d=this._uiBuilder.tagToId(this.STOP_IF_ERROR_TAG),b=this._uiBuilder.tagToId(this.STOP_IF_WARNING_TAG),a=this._uiBuilder.tagToId(this.STOP_IF_NAN_INF_TAG);d&&this._uiBuilder.addPropertySetCallback(d,f.hitch(this,"_toggleStopIfError"),!0);b&&this._uiBuilder.addPropertySetCallback(b,f.hitch(this,"_toggleStopIfWarning"),!0);a&&this._uiBuilder.addPropertySetCallback(a,f.hitch(this,"_toggleStopIfNanInf"),
!0)},_handleStopConditionChange:function(d){var b=this._uiBuilder.tagToId(this.STOP_IF_ERROR_TAG),a=this._uiBuilder.tagToId(this.STOP_IF_WARNING_TAG),c=this._uiBuilder.tagToId(this.STOP_IF_NAN_INF_TAG);this._uiBuilder.set(b,"selected",d.stopIfError);this._uiBuilder.set(a,"selected",d.stopIfWarning);this._uiBuilder.set(c,"selected",d.stopIfNanInf)},_toggleStopIfError:function(d){this._debugServices.setDBStopIfError(d.newValue)},_toggleStopIfWarning:function(d){this._debugServices.setDBStopIfWarning(d.newValue)},
_toggleStopIfNanInf:function(d){this._debugServices.setDBStopIfNanInf(d.newValue)},dispose:function(){}})})},"MOTW/editor/OpenAsLiveCodeService":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/Deferred MOTW/editor/actions/SaveAsLiveScript mw-filename-utils/FileNameUtil mw-messageservice/MessageService".split(" "),function(g,f,e,d,b,a){return g([],{_EVENT_OPEN_AS_LIVE_SCRIPT_CHANNEL_PREFIX:"/mlx/service/openAsLiveScript",constructor:function(b){this._fileDataService=b;a.subscribe(this._EVENT_OPEN_AS_LIVE_SCRIPT_CHANNEL_PREFIX,
"_handleOpenAsLiveCode",this)},_handleOpenAsLiveCode:function(a){var e=a.data.path;a=b.nameFromPath(e).replace(".m",".mlx");var g=e.replace(".m",".mlx"),g=d.doConvert(e,g),e=b.locationFromPath(e),l=b.createEmptyFileObject(e,a);g.then(f.hitch(this,function(a){this._fileDataService.openedFilesDataStore.put(dojo.mixin(l,{modifiedDate:null,savePending:!1,id:b.pathFromFileInfo(l.fileInfo)}));this._fileDataService.onFileOpen(l)}));return g}})})},"MOTW/toolstrip/configs/editor/FigureTabGroupConfig":function(){define(["MW/toolstrip/constants/TypeConstants",
"dojo/i18n!MOTW/l10n/nls/figuretoolstrip"],function(g,f){return{tag:"motwToolstrip.figureToolstripTabGroup",type:g.TAB_GROUP,children:[{tag:"motwToolstrip.figureToolstripTab",type:g.TAB,title:f.figure,mnemonic:"E",children:[{tag:"motwToolstrip.figureToolstripTab.annotations",type:g.SECTION,title:f.annotationsSectionTitle,children:[{tag:"motwToolstrip.figureToolstripTab.annotations.column1",type:g.COLUMN,children:[{tag:"motwToolstrip.figureToolstripTab.annotations.gallery",type:g.GALLERY,galleryPopupTag:"motwToolstrip.figureToolstripTab.annotations.galleryPopup",
minColumnCount:1,maxColumnCount:12,hideDisabledItems:!0}]}]}]}]}})},"MOTW/editor/EditorVersioningService":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/connect dojo/aspect dojo/_base/array MOTW/versioning/VersioningController".split(" "),function(g,f,e,d,b,a){return g(null,{constructor:function(a){this._connections=[];this._subscriptions=[];this._handles=[];this._versioningControllersForFile={};this._latestForEditor={};this._editorService=a.editorService;this._fileDataService=a.fileDataService;
this._actionService=a.actionService;this._versioningService=a.versioningService;this._connections.push(e.connect(this._fileDataService,"onFileClose",this,"_onFileClose"));this._handles.push(d.after(this._editorService,"onActiveEditor",f.hitch(this,"_createAndUpdateActiveController")));this._subscriptions.push(e.subscribe("/toolstrip/fileHistoryTabAdded",f.hitch(this,this._createAndUpdateActiveController)))},destroy:function(){b.forEach(this._connections,function(a){e.disconnect(a)});b.forEach(this._subscriptions,
function(a){e.unsubscribe(a)});b.forEach(this._versioningControllersForFile,function(a){a.destroy()});this._versioningControllersForFile=null},getActiveController:function(){var a=this._editorService.getActiveEditor(window);if(!a)return null;a=a.getFile().fileInfo;a=this._getFileName(a);return this._versioningControllersForFile[a]},_getFileName:function(a){return a.location+a.name},_onFileClose:function(a){a=this._getFileName(a);this._versioningControllersForFile[a]&&(this._versioningControllersForFile[a].destroy(),
delete this._versioningControllersForFile[a])},_createAndUpdateActiveController:function(){var a=this._editorService.getActiveEditor(window);if(a){var b=a.getFile(),d=this._getFileName(b.fileInfo),e=this._versioningControllersForFile[d];e||(e=this._createAndInitializeController(b,a),this._versioningControllersForFile[d]=e);this._purgeAndResetActiveState(e);e.updateState()}},_purgeAndResetActiveState:function(a){for(var b in this._versioningControllersForFile)this._versioningControllersForFile.hasOwnProperty(b)&&
this._versioningControllersForFile[b].setActiveState(!1);a.setActiveState(!0)},_createAndInitializeController:function(b,d){var f=new a({versioningService:this._versioningService,fileDataService:this._fileDataService,actionService:this._actionService,fileInfo:b?b.fileInfo:{},editor:d});this._connections.push(e.connect(f,"onVersionChanged",this,"_handleVersionChanged"));return f},_handleVersionChanged:function(){this._editorService._updateActions(this._editorService.getActiveEditor(window))}})})},
"MOTW/versioning/VersioningController":function(){define("dojo/window dojo/aspect dojo/_base/array dojo/_base/connect dojo/_base/declare dojo/_base/lang MOTW/editor/actions/ActionIdConstants MOTW/motw/ActionIdConstants mw-filename-utils/FileNameUtil MOTW/versioning/VersioningUtils".split(" "),function(g,f,e,d,b,a,c,h,k,l){return b(null,{constructor:function(a){this.versioningService=a.versioningService;this.fileDataService=a.fileDataService;this.actionService=a.actionService;this.fileInfo=a.fileInfo;
this._versionStore=null;this._editor=a.editor;this._latest=null;this._editor._isLatest=!0;this._storeConnections={};this.isActive=!1;this._initializeStore();this.versioningService&&this.versioningService.loadVersions(this.fileInfo);this._fileDataServiceConnection=d.connect(this.fileDataService,"onFileModificationChange",this,function(a,b){k.pathFromFileInfo(a)===k.pathFromFileInfo(this.fileInfo)&&b&&this.versioningService.loadVersions(this.fileInfo)})},updateRestoreAsLatest:function(){var a=this._versionStore.getCurrentItem();
this.actionService.updateAction(c.RESTORE_AS_LATEST,{enabled:a&&void 0!==a.file.content&&!a.isLatest})},destroy:function(){Object.keys(this._storeConnections).forEach(function(a){d.disconnect(this._storeConnections[a])},this);this._fileDataServiceConnection&&d.disconnect(this._fileDataServiceConnection);this._versionsloadedconnection&&d.disconnect(this._versionsloadedconnection)},_initializeStore:function(){var a;a=d.connect(this.versioningService,"versionsLoaded",this,function(b,c){this.updateState();
this._areFilesEqual(b,this.fileInfo)&&(d.disconnect(a),this._versionStore=c,this.updateState(),this._versionsloadedconnection=d.connect(this.versioningService,"versionsLoaded",this,function(a,b){this._areFilesEqual(a,this.fileInfo)&&this.updateState()}),this._storeConnections.onStoreFlushed||(this._storeConnections.onStoreFlushed=d.connect(this._versionStore,"onStoreFlushed",this,function(){this.updateRestoreAsLatest()})),this._storeConnections.onStoreLoaded||(this._storeConnections.onStoreLoaded=
d.connect(this._versionStore,"onFileContentChanged",this,function(){this.updateRestoreAsLatest()})))})},_areFilesEqual:function(a,b){return k.pathFromFileInfo(a)===k.pathFromFileInfo(b)},onVersionContentLoaded:function(a){a&&(!a.isLatest&&!this._editor._isLatest)&&(this._editor.resetEditor(a.file.content,{readOnly:!0,silentUpdate:!0,preserveUndoStack:!0}),this._editor.editor.focus())},onRestoreAsLatest:function(a,b){a&&(this.fileDataService.saveOpenFiles(b),this._editor.resetEditor(a.file.content),
this._editor._updateFile(),this._latest=null,this._editor._isLatest=!0,this._editor.editor.focus())},_onVersionSelected:function(a){a&&(a.isLatest?this._latest&&(this._editor.loadFromBackup(this._latest),this._latest=null,this._editor._isLatest=!0,this._editor.editor.focus()):(this._latest||(this._latest=this._editor.getBackup(),this._editor._isLatest=!1),this._setLoading()))},_setLoading:function(){var a=l.getLoadingMessage();this._editor.resetEditor(a,{readOnly:!0,silentUpdate:!0,preserveUndoStack:!0})},
_disableButtons:function(){this.actionService.updateAction(c.GET_OLDER_VERSION,{enabled:!1});this.actionService.updateAction(c.GET_NEWER_VERSION,{enabled:!1});this.actionService.updateAction(c.RESTORE_AS_LATEST,{enabled:!1});this.actionService.updateAction(c.VERSION_LIST,{enabled:!1})},updateState:function(){this.isActive&&(!this.fileInfo||!k.isVersioned(this.fileInfo)||!this._versionStore?(this._disableButtons(),this.actionService.updateAction(c.VERSION_LIST,{items:[]})):(this.actionService.addActionChangeCallback(c.VERSION_LIST,
a.hitch(this,function(a){if("selectedItem"===a.property){var b=this._versionStore.getCurrentItem();this._versionStore.isItemIdInStore(a.newValue)&&(b&&b.id!==a.newValue)&&this._versionStore.setCurrentItemById(a.newValue)}})),this.actionService.addActionCallback(c.VERSION_LIST,a.hitch(this,function(a){"dropDownPerformed"===a.eventType&&this.actionService.updateAction(c.VERSION_LIST,{items:this._versionStore.getItems()})})),this._storeConnections.onCurrentItemChanged||(this._storeConnections.onCurrentItemChanged=
f.after(this._versionStore,"onCurrentItemChanged",a.hitch(this,"handleCurrentItemChange"),!0)),this.handleCurrentItemChange()))},setActiveState:function(a){this.isActive=a},handleCurrentItemChange:function(){if(this._versionStore){var b=this._versionStore.getCurrentItem();b!==this._currentVersion&&(this._onVersionSelected(b),this.versioningService.getVersionContent(b,a.hitch(this,this.onVersionContentLoaded)),this._currentVersion=b);b=this._versionStore.isLatestVersion();this.actionService.updateAction(c.GET_OLDER_VERSION,
{enabled:!this._versionStore.isOldestVersion()});this.actionService.updateAction(c.GET_NEWER_VERSION,{enabled:!b});this.updateRestoreAsLatest();this.actionService.updateAction(c.VERSION_LIST,{items:this._versionStore.getItems()});this.actionService.updateAction(c.VERSION_LIST,{enabled:!0,selectedItem:this._versionStore.getCurrentItem().id});this.onVersionChanged(b)}},onVersionChanged:function(a){},versionDropDownOpen:function(){this._versionStore.refreshDisplayNames()},olderButtonClick:function(){this._versionStore.setToEarlierVersion();
this._editor.editor.focus()},newerButtonClick:function(){this._versionStore.setToLaterVersion();this._editor.editor.focus()},_saveCallback:function(a){this.versioningService.setActiveVersion(a.file.fileInfo)},restoreButtonClick:function(){this._disableButtons();this._initializeStore();var b=this._versionStore.getCurrentItem(),c=a.hitch(this,this._saveCallback,b);this.onRestoreAsLatest(b,c)}})})},"MOTW/editor/ProgrammingAidsFeature":function(){define(["dojo/_base/declare","MOTW/motw/MotwApp","MW/motw/feature/Feature"],
function(g,f,e){return g([e],{enableFeature:function(){f.fileDataService.enableProgrammingAids=!0},disableFeature:function(){f.fileDataService.enableProgrammingAids=!1}})})},"MOTW/editor/UntitledBufferFeature":function(){define(["dojo/_base/declare","MOTW/motw/MotwApp","MW/motw/feature/Feature"],function(g,f,e){return g([e],{enableFeature:function(){f.fileDataService.enableUntitledBuffer=!0},disableFeature:function(){f.fileDataService.enableUntitledBuffer=!1}})})},"MOTW/modules/ve/index":function(){define("dojo/Deferred dojo/_base/lang MW/uiframework/uicontainer/DocumentTypeProperties variableeditor/ClientPeerManagerFactory variableeditor/VariableEditorMain variableeditor/views/VariableEditorViews".split(" "),
function(g,f,e,d,b,a){return{initialize:function(a){var h=new g,k=b.getInstance({helpDataService:a.helpDataService,layoutService:a.layoutService,executionService:a.executionService,messageService:a.messageService}),l=new e({defaultRegion:"right",title:"Variables",collectiveLabel:"Variables",willReopen:!0,tabGroupTags:[]});a.uiContainer.registerDocumentType("variable",l);a.workerReady.then(f.hitch(this,"_start",{variableEditorFactory:d,variableEditor:k}));h.resolve({exports:{variableEditorFactory:d,
variableEditor:k}});return h.promise},_start:function(a){a.variableEditorFactory.start();a.variableEditor.start()}}})},"MOTW/modules/docService/index":function(){define(["dojo/Deferred"],function(g){return{_helpHandler:function(f,e){e=f.addMOQueryParameter(e);f.iframeContainer.showIframe({host:e,name:"MATLAB Online Help",maximizeUrl:f.getMaximizeUrl(e)})},_helpHtmlHandler:function(f){window.open("","_blank","resizable\x3dyes").document.write(f)},_registerMatlabColonMessageHandling:function(f){window.addEventListener("message",
function(e){/https:\/\/.*\.mathworks\.com/g.test(e.origin)&&e.data.domchannel&&"matlabcolon"===e.data.domchannel&&(e=e.data.matlabcommand)&&f.executionEval(e)})},_isSubscribed:!1,initialize:function(f){var e=new g,d=this;this.helpHandler=function(b){d._helpHandler(f.helpDataService,b.data)};this.helpHtmlHandler=function(b){d._helpHtmlHandler(b.data)};this._registerMatlabColonMessageHandling(f.executionService);f.messageService.subscribe("/web/doc",this.helpHandler);f.messageService.subscribe("/web/doc/htmltext",
this.helpHtmlHandler);this._isSubscribed=!0;e.resolve({exports:{docService:{}}});return e.promise},reset:function(f){this._isSubscribed&&(f.messageService.unsubscribe("/web/doc",this.helpHandler),f.messageService.unsubscribe("/web/doc/htmltext",this.helpHtmlHandler))}}})},"MOTW/modules/serverOnWorker/index":function(){define(["dojo/Deferred","mw-remote/Remote"],function(g,f){return{initialize:function(e){e=new g;f.setWorkerOnlyMessageTypes("Eval FEval Interrupt Variable VariableChange Workspace CodeAnalyzer FormatCode ListFolder CurrentFolder UpdateFile CreateFile CloseFile OpenFile DeleteFile MoveFile MoveMultipleFiles RenameFile SetActiveVersion ListVersion DisplayVersion TabCompletion SyntaxHighlighting SyntaxHighlightingColorMap LoadSession GetShareInfo UpdateShare CancelPendingLoadSession LoadClientSessionState SaveClientSessionState LoadSessionState SaveSessionState".split(" "));
f.enableServerOnWorker();e.resolve({exports:{serverOnWorker:{}}});return e.promise}}})},"academyinteractions/modules/academyModules/index":function(){define("dojo/on dojo/Deferred dojo/aspect dojo/_base/lang MOTW/motw/MotwApp academyinteractions/uiShims/toolstrip/AcademyGlobalTabGroupConfig academyinteractions/InteractionService academyinteractions/InteractionModule academyinteractions/SimulinkInteractionModule academyinteractions/extensions/InteractionExecutionDataService academyinteractions/extensions/InteractionFileDataService academyinteractions/InteractionMessageQueue academyinteractions/tasks/TaskActionProvider academyinteractions/WorkerInitializer academyinteractions/MATLABStandardInitializer academyinteractions/MATLABStateManager academyinteractions/MATLABStateService mw-actiondataservice/ActionDataService academyinteractions/serviceShims/ExecutionDataServiceShim academyinteractions/uiShims/ToolstripShim academyinteractions/uiShims/CommandHistoryShim academyinteractions/tasks/CodeFileTaskService academyinteractions/tasks/CommandLineTaskService academyinteractions/tasks/LiveEditorTaskService academyinteractions/tasks/SimulinkTaskService academyinteractions/tasks/FreeTaskService academyinteractions/tasks/CodeFileTaskUI academyinteractions/tasks/CommandLineTaskUI academyinteractions/tasks/LiveEditorTaskUI academyinteractions/toolEventCodes mw-messageservice/MessageService dojo/topic academyinteractions/serviceShims/FeedbackServiceShim".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w,x,y,B,D,E,F,I,L,C,M,G,N,P){return{initialize:function(b){var d=new f,e={},k=b.academyWidget;b.uiBuilder.addTabGroupFromConfig(a,"motwToolstrip.globalTabGroup");b.contextManager.register("TabGroups",{appId:"desktop",contextId:"global",tabGroupTags:["motwToolstrip.globalTabGroup"]});e.executionServiceShim=new v({executionService:b.executionService});e.toolstripShim=new w({uiBuilder:b.uiBuilder,contextManager:b.contextManager,layoutService:b.layoutService});
e.commandHistoryShim=new x({historyStore:b.executionService.historyStore});e.interactionService=new c;e.taskActionService=new u;e.interactionMessageQueue=new p({executionService:b.executionService,wraService:b.wraService});e.workerInitializer=new q({interactionMessageQueue:e.interactionMessageQueue});e.interactionExecutionService=new l({executionService:b.executionService,commandHistoryShim:e.commandHistoryShim,interactionMessageQueue:e.interactionMessageQueue});e.interactionFileDataService=new m({actionService:b.actionService,
fileDataService:b.fileDataService,editorService:b.editorService,interactionMessageQueue:e.interactionMessageQueue,workerInitializer:e.workerInitializer});e.matlabStateService=new t({interactionExecutionDataService:e.interactionExecutionService,interactionFileDataService:e.interactionFileDataService,interactionMessageQueue:e.interactionMessageQueue});e.matlabStandardInitializer=new r({interactionExecutionDataService:e.interactionExecutionService,interactionFileDataService:e.interactionFileDataService,
interactionMessageQueue:e.interactionMessageQueue,messageService:G,workerInitializer:e.workerInitializer});e.matlabStateManager=new s({interactionService:e.interactionService,interactionMessageQueue:e.interactionMessageQueue,matlabStandardInitializer:e.matlabStandardInitializer,matlabStateService:e.matlabStateService,mggGuiManager:b.mggGuiManager});e.taskActionProvider=new n({taskActionService:e.taskActionService,interactionService:e.interactionService});e.interactionModule=new h({actionService:b.actionService,
taskActionService:e.taskActionService,taskActionProvider:e.taskActionProvider,interactionService:e.interactionService,interactionWidget:k});var U=[];U.push(g(e.interactionService,"interaction_state_change",function(a){k._hideUnresponsiveWorkerMessage();a===e.interactionService.INTERACTION_STATES.COMPLETE&&(k._loadingIsComplete(),k.markComplete());a===e.interactionService.INTERACTION_STATES.GRADING&&k._loadingIsComplete();a===e.interactionService.INTERACTION_STATES.INITIALIZING&&(k._loadingHasBegun(),
k.reset())}));U.push(g(e.interactionService,"update_internal_progress",function(a){k.markInteractionProgress(a);e.interactionService.allTasksCompleted()&&k.markComplete()}));U.push(g(e.interactionService,"user_wants_to_move_to_next_section",function(){k.emit(M.COURSE.NEXT_SECTION)}));U.push(g(e.interactionService,"state_changes_unresponsive",function(){"computeResourceReady"===b.wraService.getCurrentState()&&k._showUnresponsiveWorkerMessage()}));e.codeFileTaskService=new y({editorService:b.editorService,
interactionService:e.interactionService,interactionMessageQueue:e.interactionMessageQueue,interactionExecutionDataService:e.interactionExecutionService,interactionFileDataService:e.interactionFileDataService,matlabStateService:e.matlabStateService});e.commandLineTaskService=new B({executionService:b.executionService,interactionMessageQueue:e.interactionMessageQueue,commandHistoryShim:e.commandHistoryShim,interactionService:e.interactionService,executionServiceShim:e.executionServiceShim,interactionExecutionDataService:e.interactionExecutionService,
interactionFileDataService:e.interactionFileDataService,matlabStateService:e.matlabStateService});e.liveEditorTaskService=new D({interactionService:e.interactionService,interactionMessageQueue:e.interactionMessageQueue,interactionExecutionDataService:e.interactionExecutionService,interactionFileDataService:e.interactionFileDataService,matlabStateService:e.matlabStateService,editorService:b.editorService,messageService:G,matlabStandardInitializer:e.matlabStandardInitializer});e.simulinkTaskService=
new E({interactionService:e.interactionService});e.freeTaskService=new F({matlabStateService:e.matlabStateService,interactionService:e.interactionService});e.codeFileTaskUI=new I({interactionFileDataService:e.interactionFileDataService,interactionExecutionDataService:e.interactionExecutionDataService,interactionService:e.interactionService,toolstripShim:e.toolstripShim,codeFileTaskService:e.codeFileTaskService,interactionModule:e.interactionModule,uiContainer:b.uiContainer});e.liveEditorTaskUI=new C({interactionFileDataService:e.interactionFileDataService,
interactionExecutionDataService:e.interactionExecutionDataService,interactionService:e.interactionService,toolstripShim:e.toolstripShim,liveEditorTaskService:e.liveEditorTaskService,interactionModule:e.interactionModule,uiContainer:b.uiContainer});e.commandLineTaskUI=new L({executionService:b.executionService,interactionService:e.interactionService,commandHistoryShim:e.commandHistoryShim,layoutService:b.layoutService,commandWindow:b.commandWindow,toolstripShim:e.toolstripShim,commandLineTaskService:e.commandLineTaskService,
interactionModule:e.interactionModule,uiContainer:b.uiContainer});e.interactionService.registerTaskType("commandLine",e.commandLineTaskService);e.interactionService.registerTaskType("script",e.codeFileTaskService);e.interactionService.registerTaskType("liveeditor",e.liveEditorTaskService);e.interactionService.registerTaskType("simulink",e.simulinkTaskService);e.interactionService.registerTaskType("function",e.codeFileTaskService);e.interactionService.registerTaskType("free",e.freeTaskService);e.commandLineTaskUI.setCommandWindow(b.commandWindow);
e.feedbackServiceShim=new P({feedbackService:b.feedbackService});N.subscribe("feedback/reportAProblem",function(){b.feedbackManager.openFeedbackDialog()});d.resolve({exports:e});return d.promise}}})},"academyinteractions/uiShims/toolstrip/AcademyGlobalTabGroupConfig":function(){define(["MW/toolstrip/constants/TypeConstants","MOTW/motw/ActionIdConstants","dojo/i18n!MOTW/l10n/nls/motw","dojo/i18n!MOTW/l10n/nls/toolstrip"],function(g,f,e,d){return{tag:"motwToolstrip.globalTabGroup",type:g.TAB_GROUP,
children:[{tag:"motwToolstrip.matlabTab",type:g.TAB,title:d.homeTabTitle,mnemonic:"H",children:[{tag:"motwToolstrip.matlabTab.code",type:g.SECTION,title:d.codeSectionTitle,children:[{tag:"motwToolstrip.matlabTab.code.column2",type:g.COLUMN,children:[{tag:"motwToolstrip.matlabTab.code.clearCommands",actionId:f.CLEAR_COMMAND_WINDOW,type:g.PUSH_BUTTON,mnemonic:"C"}]}]},{tag:"motwToolstrip.matlabTab.help",type:g.SECTION,title:d.resourcesSectionTitle,children:[{tag:"motwToolstrip.matlabTab.help.column1",
type:g.COLUMN,children:[{tag:"motwToolstrip.matlabTab.help.help",actionId:f.HELP,type:g.PUSH_BUTTON,mnemonic:"H"}]}]}]}]}})},"academyinteractions/InteractionService":function(){define("dojo/_base/declare dojo/_base/lang dojo/on dojo/Evented dojo/string dojo/Deferred mw-log/Log academyinteractions/InteractionLoader".split(" "),function(g,f,e,d,b,a,c,h){return g([d],{INTERACTION_STATES:{INACTIVE:"inactive",INITIALIZING:"initializing",GRADING:"grading",EVALUATING_SUBMISSION:"evaluating_submission",ALLOWING_USER_TO_PONDER_RESPONSE:"allowing_user_to_ponder_response",
MOVING_TO_ANOTHER_QUESTION:"moving_to_another_question",AWAITING_MOVE_TO_NEXT_QUESTION:"awaiting_move_to_next_question",COMPLETE:"complete"},INTERACTION_STATE_TIMEOUTS:{INACTIVE:null,INITIALIZING:5E4,GRADING:null,EVALUATING_SUBMISSION:3E4,ALLOWING_USER_TO_PONDER_RESPONSE:null,MOVING_TO_ANOTHER_QUESTION:2E4,AWAITING_MOVE_TO_NEXT_QUESTION:null,COMPLETE:null},RESPONSE_STATES:{CORRECT:"correct",INCORRECT:"incorrect",NOT_AVAILABLE:"not_available"},SKIP_STATES:{ALLOWED:"allowed",NOT_ALLOWED:"not_allowed"},
STRUGGLING_STATES:{NOT_AVAILABLE:"not_available",STRUGGLING:"struggling",REALLY_STRUGGLING:"really_struggling"},EVENTS:{USER_WANTS_TO_SKIP:"user_wants_to_skip",USER_WANTS_TO_SEE_SOLUTION:"user_wants_to_see_solution",USER_WANTS_TO_RESET:"user_wants_to_reset",USER_WANTS_TO_SEE_HINT:"display_default_hint",USER_WANTS_TO_MOVE_TO_NEXT_SECTION:"user_wants_to_move_to_next_section",SUBMISSION_GRADED:"submission_graded",DISPLAY_TASK:"display_question",INTERACTION_STATE_CHANGE:"interaction_state_change",RESPONSE_STATE_CHANGE:"response_state_change",
SKIP_STATE_CHANGE:"skip_state_change",STRUGGLING_STATE_CHANGE:"struggling_state_change",DISPLAY_SUPPORTING_INFO:"display_supporting_info",UPDATE_INTERNAL_PROGRESS:"update_internal_progress",INTERRUPT_REQUEST:"interrupt_request",STATE_CHANGES_UNRESPONSIVE:"state_changes_unresponsive",VIEWING_TASK:"viewing_task"},interactionState:null,responseState:null,skipState:null,strugglingState:null,currentTask:null,currentTaskNumber:null,_numFailedAttempts:0,_filesAdded:!1,_internalProgress:0,_numStateChangeFailures:0,
_registeredTasks:{},opts:{},constructor:function(a){this.interactionState=this.INTERACTION_STATES.INACTIVE;this.responseState=this.RESPONSE_STATES.NOT_AVAILABLE;this.skipState=this.SKIP_STATES.NOT_ALLOWED;this.strugglingState=this.STRUGGLING_STATES.NOT_AVAILABLE;this._interactionLoader=new h({interactionService:this})},registerTaskType:function(a,b){this._registeredTasks[a]=b},deregisterTaskType:function(a){delete this._registeredTasks[a]},getRegisteredTaskService:function(a){return this._registeredTasks[a]},
clearInteractionData:function(){this._setInteractionState(this.INTERACTION_STATES.INACTIVE);this._setResponseState(this.RESPONSE_STATES.NOT_AVAILABLE);this._setSkipState(this.SKIP_STATES.NOT_ALLOWED);this._setStrugglingState(this.STRUGGLING_STATES.NOT_AVAILABLE);this._interaction=null;this._setCurrentTask(null);this._internalProgress=0},setInteractionData:function(a,b){this._setInteractionState(this.INTERACTION_STATES.INACTIVE);this._setResponseState(this.RESPONSE_STATES.NOT_AVAILABLE);this._setSkipState(this.SKIP_STATES.NOT_ALLOWED);
this._setStrugglingState(this.STRUGGLING_STATES.NOT_AVAILABLE);this._interaction=this._interactionLoader.loadDataFromRawJson(a,b.fullPathToContent);this._setCurrentTask(null);this._internalProgress=0;this._updateTaskStatuses();this.opts=b?b:{}},startInteraction:function(a){this._internalProgress=a=this._ensureValidTaskNum(a);this._updateTaskStatuses();this._doStartInteraction(a)},_ensureValidTaskNum:function(a){a?1>a&&(a=1):a=1;return a},_doStartInteraction:function(a){a=this._ensureValidTaskNum(a);
this._setInteractionState(this.INTERACTION_STATES.INITIALIZING);this._setResponseState(this.RESPONSE_STATES.NOT_AVAILABLE);this._setSkipState(this.SKIP_STATES.NOT_ALLOWED);this._setStrugglingState(this.STRUGGLING_STATES.NOT_AVAILABLE);this._numFailedAttempts=0;this._gotoTaskNumber(a)},resetToQuestionNumber:function(a){this._setCurrentTask(null);this._emitInterruptRequest();a=this._ensureValidTaskNum(a);this._setResponseState(this.RESPONSE_STATES.NOT_AVAILABLE);this._setSkipState(this.SKIP_STATES.NOT_ALLOWED);
this._setStrugglingState(this.STRUGGLING_STATES.NOT_AVAILABLE);this._numFailedAttempts=0;this._gotoTaskNumber(a)},finishTheMoveToNextQuestion:function(){this.interactionState===this.INTERACTION_STATES.AWAITING_MOVE_TO_NEXT_QUESTION?this._gotoNextTask():c.warn("Unable to honor request to move to next task")},repeatCurrentQuestion:function(){this.currentTask&&(this.interactionState===this.INTERACTION_STATES.AWAITING_MOVE_TO_NEXT_QUESTION||this.interactionState===this.INTERACTION_STATES.ALLOWING_USER_TO_PONDER_RESPONSE?
this._gotoTaskNumber(this.currentTaskNumber):c.warn("Unable to honor request to repeat current question"))},_gotoNextTask:function(){var a;this.interactionState===this.INTERACTION_STATES.COMPLETE||this.interactionState===this.INTERACTION_STATES.INACTIVE||(a=null===this.currentTask?1:this.currentTaskNumber+1,this._gotoTaskNumber(a))},_gotoTaskNumber:function(a){var b=this.currentTask;this._setCurrentTask(this._interaction.tasks[a-1]);this._setInteractionState(this.INTERACTION_STATES.MOVING_TO_ANOTHER_QUESTION);
b!==this.currentTask&&this._setResponseState(this.RESPONSE_STATES.NOT_AVAILABLE)},getTasks:function(){var a=null;this._interaction&&(a=this._interaction.tasks);return a},failedToMoveToCurrentQuestion:function(){this._updateStateTimeout();this.emit(this.EVENTS.STATE_CHANGES_UNRESPONSIVE,{id:this._getCurrentTaskId()})},successfullyMovedToCurrentQuestion:function(){this.interactionState!==this.INTERACTION_STATES.MOVING_TO_ANOTHER_QUESTION?c.warn("You cannot move to another question when interaction service is not in that state."):
this.isLastTask(this.currentTask)?(this._setInteractionState(this.INTERACTION_STATES.COMPLETE),this._setResponseState(this.RESPONSE_STATES.NOT_AVAILABLE),this._setSkipState(this.SKIP_STATES.NOT_ALLOWED),this._setStrugglingState(this.STRUGGLING_STATES.NOT_AVAILABLE)):(this.currentTask.shouldShowSupportingInfo()&&(this.currentTask.setSupportingInfoDisplayedAlready(!0),this._emitSupportingInfoDisplay(this.currentTask.supportingInfo)),this._setInteractionState(this.INTERACTION_STATES.GRADING),this._updateSkipStateBasedOnAttemptFailures(),
this._updateStrugglingStateBasedOnAttemptFailures())},_setCurrentTask:function(a){this.currentTask&&this.currentTask===a||(this.currentTask&&this._registeredTasks[this.currentTask.type]&&this._registeredTasks[this.currentTask.type].disableTask(this.currentTask),a?(this.currentTask=a,this.currentTaskNumber=a.taskNumber):this.currentTaskNumber=this.currentTask=null,this.currentTask&&this._registeredTasks[this.currentTask.type]&&this._registeredTasks[this.currentTask.type].enableTask(this.currentTask),
this._updateTaskStatuses())},isLastTask:function(a){return a===this._interaction.tasks[this._interaction.tasks.length-1]},getNextTask:function(a){var b,c=null;if(this._interaction&&this._interaction.tasks)for(b=0;b<this._interaction.tasks.length;b++)a===this._interaction.tasks[b]&&this._interaction.tasks[b+1]&&(c=this._interaction.tasks[b+1]);return c},getPreviousTask:function(a){var b,c=null;if(this._interaction&&this._interaction.tasks)for(b=1;b<this._interaction.tasks.length;b++)a===this._interaction.tasks[b]&&
this._interaction.tasks[b-1]&&(c=this._interaction.tasks[b-1]);return c},clearResponse:function(){this._setResponseState(this.RESPONSE_STATES.NOT_AVAILABLE)},_doProcessSubmission:function(){this.interactionState===this.INTERACTION_STATES.GRADING||this.interactionState===this.INTERACTION_STATES.AWAITING_MOVE_TO_NEXT_QUESTION||this.interactionState===this.INTERACTION_STATES.ALLOWING_USER_TO_PONDER_RESPONSE?(this._setInteractionState(this.INTERACTION_STATES.EVALUATING_SUBMISSION),this._setResponseState(this.RESPONSE_STATES.NOT_AVAILABLE)):
c.warn("Unable to honor request to process submission")},successfullyProcessedSubmission:function(){this.interactionState===this.INTERACTION_STATES.EVALUATING_SUBMISSION?this._reactToProcessedSubmission():c.warn("Unable to recognize that submission was processed")},failedToProcessSubmission:function(){},userWantsToSubmit:function(){this.interactionState===this.INTERACTION_STATES.GRADING||this.interactionState===this.INTERACTION_STATES.AWAITING_MOVE_TO_NEXT_QUESTION||this.interactionState===this.INTERACTION_STATES.ALLOWING_USER_TO_PONDER_RESPONSE?
this._doProcessSubmission():c.warn("Unable to honor request to submit")},userWantsToSkip:function(){this.interactionState===this.INTERACTION_STATES.GRADING||this.interactionState===this.INTERACTION_STATES.AWAITING_MOVE_TO_NEXT_QUESTION||this.interactionState===this.INTERACTION_STATES.ALLOWING_USER_TO_PONDER_RESPONSE?this.emit(this.EVENTS.USER_WANTS_TO_SKIP,{id:this._getCurrentTaskId()}):c.warn("Unable to honor request to get solution")},userWantsToSeeSolution:function(){this.interactionState===this.INTERACTION_STATES.GRADING||
this.interactionState===this.INTERACTION_STATES.AWAITING_MOVE_TO_NEXT_QUESTION||this.interactionState===this.INTERACTION_STATES.ALLOWING_USER_TO_PONDER_RESPONSE?this.emit(this.EVENTS.USER_WANTS_TO_SEE_SOLUTION,{id:this._getCurrentTaskId()}):c.warn("Unable to honor request to see solution")},userWantsToReset:function(){this.interactionState===this.INTERACTION_STATES.GRADING||this.interactionState===this.INTERACTION_STATES.AWAITING_MOVE_TO_NEXT_QUESTION||this.interactionState===this.INTERACTION_STATES.ALLOWING_USER_TO_PONDER_RESPONSE?
this.emit(this.EVENTS.USER_WANTS_TO_RESET,{id:this._getCurrentTaskId()}):c.warn("Unable to honor request to reset code")},userWantsToSeeHint:function(){this.emit(this.EVENTS.USER_WANTS_TO_SEE_HINT,{id:this._getCurrentTaskId()})},userWantsToMoveToNextSection:function(){this.emit(this.EVENTS.USER_WANTS_TO_MOVE_TO_NEXT_SECTION)},getAddedFileData:function(a){var b=a;this._interaction.filesToAdd.forEach(function(c){c.name===a&&(b=c)},this);return b},isAllowedToSkip:function(){var a=!1;this.skipState===
this.SKIP_STATES.ALLOWED&&(a=!0);return a},_reactToProcessedSubmission:function(){var a=this.currentTask.isResponseCorrect();this.emit(this.EVENTS.SUBMISSION_GRADED,{id:this._getCurrentTaskId(),response:this.currentTask.getResponseSubmission(),question:this.currentTask.description,correct:a});a?(this._setResponseState(this.RESPONSE_STATES.CORRECT),this._setInteractionState(this.INTERACTION_STATES.AWAITING_MOVE_TO_NEXT_QUESTION),this._updateInternalProgress(),this._numFailedAttempts=0,this._setSkipState(this.SKIP_STATES.ALLOWED),
this._setStrugglingState(this.STRUGGLING_STATES.NOT_AVAILABLE)):(this._setResponseState(this.RESPONSE_STATES.INCORRECT),this._setInteractionState(this.INTERACTION_STATES.ALLOWING_USER_TO_PONDER_RESPONSE),this._numFailedAttempts++,this._updateSkipStateBasedOnAttemptFailures(),this._updateStrugglingStateBasedOnAttemptFailures())},_getCurrentTaskId:function(){return this._interaction.id+"\x26task\x3d"+this.currentTaskNumber},_updateSkipStateBasedOnAttemptFailures:function(){0<=this._numFailedAttempts?
this._setSkipState(this.SKIP_STATES.ALLOWED):this._setSkipState(this.SKIP_STATES.NOT_ALLOWED)},_updateStrugglingStateBasedOnAttemptFailures:function(){2>this._numFailedAttempts&&this._setStrugglingState(this.STRUGGLING_STATES.NOT_AVAILABLE);2<=this._numFailedAttempts&&4>this._numFailedAttempts&&this._setStrugglingState(this.STRUGGLING_STATES.STRUGGLING);4<=this._numFailedAttempts&&this._setStrugglingState(this.STRUGGLING_STATES.REALLY_STRUGGLING)},displayQuestionNumber:function(a){this.emit(this.EVENTS.DISPLAY_TASK,
a)},_updateInternalProgress:function(){var a;a=this.currentTaskNumber;a+1>this._internalProgress&&(this._internalProgress=a+1);this._updateTaskStatuses();this._emitUpdateInternalProgress(a+1)},getInternalProgress:function(){return this._internalProgress},allTasksCompleted:function(){var a=!1;this._interaction&&this._interaction.tasks&&this._internalProgress===this._interaction.tasks.length&&(a=!0);return a},_updateTaskStatuses:function(){var a,b,c;if(this._interaction&&this._interaction.tasks)for(a=
0;a<this._interaction.tasks.length;a++)b=a+1,c=this._interaction.tasks[a],b<=this._internalProgress?c.setStatus(c.STATUS.INACTIVE):c.setStatus(c.STATUS.NOTYETREACHED),b===this.currentTaskNumber&&c.setStatus(c.STATUS.ACTIVE)},isTaskComplete:function(a){return a.taskNumber<this._internalProgress},_stateTimeout:null,_updateStateTimeout:function(a){var b=this,c,d=null;this._stateTimeout&&(window.clearTimeout(this._stateTimeout),this._stateTimeout=null);for(c in this.INTERACTION_STATES)this.INTERACTION_STATES.hasOwnProperty(c)&&
a===this.INTERACTION_STATES[c]&&this.INTERACTION_STATE_TIMEOUTS[c]&&(d=this.INTERACTION_STATE_TIMEOUTS[c]);d&&(this._stateTimeout=window.setTimeout(function(){b.emit(b.EVENTS.STATE_CHANGES_UNRESPONSIVE,{id:b._getCurrentTaskId()})},d))},_setInteractionState:function(a){a!==this.interactionState&&(this.interactionState=a,this._updateStateTimeout(a),this.onInteractionStateChange())},onInteractionStateChange:function(){this.emit(this.EVENTS.INTERACTION_STATE_CHANGE,this.interactionState)},_setResponseState:function(a){this.responseState=
a;this.onResponseStateChange()},onResponseStateChange:function(){this.emit(this.EVENTS.RESPONSE_STATE_CHANGE,this.responseState)},_setSkipState:function(a){this.skipState=a;this.onSkipStateChange()},onSkipStateChange:function(){this.emit(this.EVENTS.SKIP_STATE_CHANGE,this.skipState)},_setStrugglingState:function(a){this.strugglingState=a;this.onStrugglingStateChange()},onStrugglingStateChange:function(){this.emit(this.EVENTS.STRUGGLING_STATE_CHANGE,this.strugglingState)},_emitSupportingInfoDisplay:function(a){this.emit(this.EVENTS.DISPLAY_SUPPORTING_INFO,
a)},_emitUpdateInternalProgress:function(a){this.emit(this.EVENTS.UPDATE_INTERNAL_PROGRESS,a)},_emitInterruptRequest:function(){this.emit(this.EVENTS.INTERRUPT_REQUEST)}})})},"academyinteractions/InteractionLoader":function(){define("dojo/_base/declare dojo/_base/lang dojo/string mw-log/Log academyinteractions/Task academyinteractions/util/MATLABPathUtil dojo/i18n!academyinteractions/l10n/nls/academyinteractions".split(" "),function(g,f,e,d,b,a,c){return g([],{constructor:function(a){this.interactionService=
a.interactionService},loadDataFromRawJson:function(a,b){return this._preprocessData(a,b)},_preprocessData:function(b,c){var e={},f,g,n;n=a.getWorkFolder();var q=a.getFileSeparator();e.id=b.id;e.initializationCode=b.initializationCode;e.filesToAdd=this._unifyFilesToAddFormat(b);for(f=0;f<e.filesToAdd.length;f++)g=e.filesToAdd[f],e.filesToAdd[f].srcFile&&!this._containsProtocolAndDomain(e.filesToAdd[f].srcFile)&&(e.filesToAdd[f].srcFile=c+e.filesToAdd[f].srcFile),g.destPath=n+g.destPath,"\\"===q&&(g.destPath=
g.destPath.replace(/\//g,"\\"));n={};for(f=0;f<b.questions.length;f++)g=b.questions[f],g.template&&(g.prevSolution=n[g.template],n[g.template]=g.solution);e.tasks=[];for(f=0;f<b.questions.length;f++)g=b.questions[f],(n=this.interactionService.getRegisteredTaskService(g.type))&&n.createTaskFromRawData?e.tasks[f]=n.createTaskFromRawData({data:g,taskNumber:f+1}):d.warn("No task service registered for task type '"+g.type+"'");e.tasks.push(this._getCompletionTask(b));for(f=0;f<e.tasks.length-1;f++)e.tasks[f].nextTask=
e.tasks[f+1];return e},_unifyFilesToAddFormat:function(a){var b=[];a.filesToAdd&&a.filesToAdd.forEach(function(a){var c="noName.m",d,e=null,f=null;"string"===typeof a?(e=a,a=a.split("/"),c=a.pop(),f=null,d=c):a.name&&(c=a.name,d=a.destPath?a.destPath+"/"+c:c,a.srcFile&&(e=a.srcFile),a.contents&&(f=a.contents),!f&&!e&&(f=""),e&&(f=null),f&&"[object Array]"===Object.prototype.toString.call(f)&&(f=f.join("\n")));d||(d="");b.push({name:c,contents:f,srcFile:e,destPath:d})},this);return b},_getCompletionTask:function(a){var b,
e,f=c.onComplete;a.completionText&&(f=a.completionText);e=a.questions.length+1;a=null;(b=this.interactionService.getRegisteredTaskService("free"))&&b.createTaskFromRawData?a=b.createTaskFromRawData({data:{type:"free",description:f},taskNumber:e}):d.warn("No task service registered for task type 'free'.");return a},_containsProtocolAndDomain:function(a){return/(http|https):\/\/.*/.test(a)}})})},"academyinteractions/Task":function(){define(["dojo/_base/declare","mw-utils/Utils"],function(g,f){return g([],
{STATUS:{ACTIVE:"active",INACTIVE:"inactive",NOTYETREACHED:"notyetreached"},constructor:function(e){this.type=e.type;this.description=e.description;this.taskNumber=e.taskNumber;this.background=e.background;this.supportingInfo=e.supportingInfo;this.hint=e.hint;this._disabledActions={};this._hiddenActions={};this.uuid=f.generateUuid()},shouldShowSupportingInfo:function(){var e=!1;this.supportingInfo&&!this.supportingInfoDisplayedAlready&&(e=!0);return e},setSupportingInfoDisplayedAlready:function(e){this.supportingInfoDisplayedAlready=
e},disableActionForTask:function(e){this._disabledActions[e]=!0},enableActionForTask:function(e){delete this._disabledActions[e]},hideActionButtonForTask:function(e){this._hiddenActions[e]=!0},showActionButtonForTask:function(e){delete this._hiddenActions[e]},isActionDisabledForTask:function(e){var d=!1;this._disabledActions[e]&&(d=!0);return d},isActionHiddenForTask:function(e){var d=!1;this._hiddenActions[e]&&(d=!0);return d},setStatus:function(e){if(e===this.STATUS.ACTIVE||e===this.STATUS.INACTIVE||
e===this.STATUS.NOTYETREACHED)this._status=e},getStatus:function(){return this._status},clearResponse:function(){this._response=null},setResponse:function(e,d,b){this._response={};this._response.correct=e;this._response.submission=d;this._response.hint=b},isResponseCorrect:function(){var e=!1;this._response&&this._response.correct&&(e=!0);return e},getResponseSubmission:function(){return this._response.submission},getResponseHint:function(){return this._response.hint}})})},"academyinteractions/util/MATLABPathUtil":function(){define(["dojo/Deferred",
"mw-remote/Remote"],function(g,f){var e=null,d="/tmp/",b=null,a=null,c=null;f.registerResponseHandler("EvalResponse:CurrentFolderPoll",function(g,k){a++;var l=g[0].responseStr.match(/[a-zA-Z\/\\0-9\:]*/)[0];if("/"===l[l.length-1]||"\\"===l[l.length-1])l=l.slice(0,-1);l&&"null"!==l?(-1!==l.indexOf("\\")?(l+="\\.training\\",c="\\"):(l+="/.training/",c="/"),1===a?e=l:d=l,2===a&&(b&&b.resolve(),a=null)):2===a&&(a=0,f.sendMessage({Eval:[{mcode:"disp(pwd)"},{mcode:"disp(tempdir)"}]},{},"CurrentFolderPoll"))},
this);f.registerFaultHandler("EvalResponse:CurrentFolderPoll",function(c,f){d=e=null;b&&b.resolve();a=0},this);return{acquireBasePath:function(){var c;b?c=b:(b=c=new g,c.promise.always(function(){b=null}),a=0,window.setTimeout(function(){b&&(b.isFulfilled()||b.cancel())},5E3),f.sendMessage({Eval:[{mcode:"disp(pwd)"},{mcode:"disp(tempdir)"}]},{},"CurrentFolderPoll"));return c.promise},unacquireBasePath:function(){d=e=null},getBasePath:function(){(null===e||"undefined"===typeof e)&&this.acquireBasePath();
return e},getTestFolder:function(){var a=null;d&&(a=d+".tests/");return a?a:"/tmp/"},getWorkFolder:function(){var a=null;e&&(a=e+".work/");return a?a:"/tmp/"},getFileSeparator:function(){return c}}})},"academyinteractions/InteractionModule":function(){define("dojo/_base/declare dojo/dom dojo/dom-construct dojo/dom-geometry dojo/dom-attr dojo/dom-style dojo/html dojo/_base/connect dojo/_base/fx dojo/on dojo/query dojo/dom-class academyinteractions/display/ColorCodedMessage dijit/layout/ContentPane academyinteractions/display/TaskNavigator academyinteractions/display/TaskDisplay academyinteractions/display/HintDisplay academyinteractions/display/SolutionDisplay academyinteractions/display/TaskQuickLinks dojo/i18n!academyinteractions/l10n/nls/academyinteractions".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v,w){return g(null,{listeners:[],_taskList:[],_taskWidgets:[],constructor:function(a){this.interactionService=a.interactionService;this.actionService=a.actionService;this.taskActionService=a.taskActionService;this.taskActionProvider=a.taskActionProvider;this.interactionWidget=a.interactionWidget;this.contentFormatter=a.contentFormatter;this._createWidgets();this._addListeners()},_createWidgets:function(){this.questionPane=new q({"class":"taskList",splitter:!0,
region:"center",title:"Tasks"});this.interactionWidget.leftPane.addChild(this.questionPane);this.taskNavigator=null},_addListeners:function(){var a=this;this.removeListeners();this.listeners.push(l(this.interactionService,"interaction_state_change",function(){a.interactionService.interactionState===a.interactionService.INTERACTION_STATES.INACTIVE?a._clearTaskList():a.interactionService.interactionState===a.interactionService.INTERACTION_STATES.INITIALIZING&&a._updateTaskList();if(a.interactionService.interactionState===
a.interactionService.INTERACTION_STATES.AWAITING_MOVE_TO_NEXT_QUESTION||a.interactionService.interactionState===a.interactionService.INTERACTION_STATES.GRADING||a.interactionService.interactionState===a.interactionService.INTERACTION_STATES.COMPLETE)a.clearHintWidget(),a.clearSolutionWidget();a._updateTaskContainerStatus()}));this.listeners.push(l(this.interactionService,this.interactionService.EVENTS.USER_WANTS_TO_SEE_HINT,function(){a._displayDefaultHint()}));this.listeners.push(l(this.interactionService,
this.interactionService.EVENTS.USER_WANTS_TO_SEE_SOLUTION,function(){"commandLine"===a.interactionService.currentTask.type&&a._displayEmbeddedSolution()}));this.listeners.push(l(this.interactionService,this.interactionService.EVENTS.DISPLAY_TASK,function(b){(b=a._taskList[b-1])&&a.taskNavigator.goToTask(b)}));this.listeners.push(l(this.interactionService,this.interactionService.EVENTS.VIEWING_TASK,function(b){a._matlabCover&&(e.destroy(a._matlabCover),a._matlabCover=null);b&&!b.isActive&&(a._matlabCover=
e.create("div",{"class":"matlabCover"},a.interactionWidget.rightPane.domNode),a._matlabCoverListener=l(a._matlabCover,"click",function(){a.taskNavigator.goToTask(a._taskList[a.interactionService.currentTaskNumber-1])}))}))},removeListeners:function(){this.listeners.forEach(function(a){a.remove()});this.listeners=[]},destroy:function(){this.questionPane.destroy();this.assessmentPane.destroy()},getWidgetForTask:function(a){return this._taskWidgets[a.taskNumber]},_updateTaskContainerStatus:function(){var a,
b,c,d;if(d=this.interactionService.getTasks())for(a=0;a<d.length;a++)if(b=d[a],c=this._taskList[a])switch(p.remove(c.domNode,"activeTask"),p.remove(c.domNode,"inactiveTask"),p.remove(c.domNode,"notYetReachedTask"),b.getStatus()){case b.STATUS.ACTIVE:p.add(c.domNode,"activeTask");this.taskNavigator.goToTask(c);break;case b.STATUS.INACTIVE:p.add(c.domNode,"inactiveTask");break;case b.STATUS.NOTYETREACHED:p.add(c.domNode,"notYetReachedTask")}},_updateTaskList:function(){if(0!==this._taskList.length)this._formatContent();
else{this.taskNavigator=new r({interactionService:this.interactionService,taskActionProvider:this.taskActionProvider});var a=this.interactionService.getTasks(),b,c,d,e;for(c=0;c<a.length;c++)d=a[c],b=new s({task:d,interactionService:this.interactionService,actionService:this.actionService,taskActionService:this.taskActionService,interactionWidget:this.interactionWidget}),e=new v({task:d,interactionService:this.interactionService,actionService:this.actionService,taskActionService:this.taskActionService}),
this._taskWidgets[d.taskNumber]=b,c===a.length-1?(d=this.taskNavigator.addTask(b,w.furtherPracticeText,e),p.add(d.domNode,"lastTitlePane"),b.setLastTask(!0),this._taskList.push(d)):this._taskList.push(this.taskNavigator.addTask(b,w.taskText+" "+(c+1),e));this._formatContent();this.questionPane.addChild(this.taskNavigator);this.taskNavigator.startup()}},_clearTaskList:function(){this._taskList=[];this._taskWidgets=[];this.questionPane.destroyDescendants(!1)},_displayDefaultHint:function(){this.clearHintWidget();
var a=this.interactionService.currentTask;this.hintWidget=new t({interactionService:this.interactionService});this.getWidgetForTask(a).addWidget(this.hintWidget);this.interactionWidget.reformatContent()},clearHintWidget:function(){this.hintWidget&&this.hintWidget.destroy()},_displayEmbeddedSolution:function(){this.clearSolutionWidget();var a=this.interactionService.currentTask;this.solutionWidget=new u({interactionService:this.interactionService});this.getWidgetForTask(a).addWidget(this.solutionWidget)},
clearSolutionWidget:function(){this.solutionWidget&&this.solutionWidget.destroy()},_formatContent:function(){this.contentFormatter&&this.contentFormatter.format()}})})},"academyinteractions/display/ColorCodedMessage":function(){define("dojo/_base/declare dojo/_base/fx dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/html dojo/on dijit/layout/ContentPane".split(" "),function(g,f,e,d,b,a,c,h,k){return g([k],{closeListener:null,touchListener:null,postCreate:function(){var a=this;
e.add(this.domNode,"colorCodedMessage");this.closeButton=d.create("div",{"class":"dijitDialogCloseIcon"},this.domNode,"last");this.colorBar=d.create("div",{"class":"colorBar"},this.domNode,"last");this.contentDiv=d.create("div",{"class":"messageContents"},this.domNode,"last");this.closeListener=h(this.closeButton,"click",function(b){a.destroy();b.preventDefault();b.stopPropagation()});this.touchListener=h(this.closeButton,"touchstart",function(b){a.destroy();b.preventDefault();b.stopPropagation()})},
showCloseButton:function(b){b?a.set(this.closeButton,"display",""):a.set(this.closeButton,"display","none")},destroy:function(a){this.closeListener.remove();this.touchListener.remove();this.inherited(arguments)}})})},"academyinteractions/display/TaskNavigator":function(){define("dojo/_base/declare dojo/query dojo/dom dojo/on dijit/TitlePane dijit/layout/ContentPane dojo/dom-class dojo/dom-construct".split(" "),function(g,f,e,d,b,a,c,h){return g(a,{_openCloseDuration:200,activeTask:null,constructor:function(a){this._currentTask=
null;this.interactionService=a.interactionService;this.taskActionProvider=a.taskActionProvider;this._taskList=[];this._taskQuickLinks=[];this.inherited(arguments)},postCreate:function(a){this.inherited(arguments);c.add(this.domNode,"taskNavigator");this._refreshListeners();this._addInteractionServiceListeners()},destroy:function(a){this._refreshListeners();this.inherited(arguments)},_updateActions:function(){var a,b;this.activeTask&&(this.taskActionProvider.updateActions(this.activeTask),this.activeTask.getStatus()===
this.activeTask.STATUS.ACTIVE?this.interactionService.emit(this.interactionService.EVENTS.VIEWING_TASK,{isActive:!0}):this.interactionService.emit(this.interactionService.EVENTS.VIEWING_TASK,{isActive:!1}));if(this._taskList)for(a=0;a<this._taskList.length;a++)b=this._taskList[a],b.content.updateButtonStatuses(),b=this._taskQuickLinks[a],b.updateLinkStatuses()},_addInteractionServiceListeners:function(){var a=this;this._temporaryListeners.push(d(a.interactionService,"interaction_state_change",function(){a._updateActions()}));
this._temporaryListeners.push(d(a.interactionService,"response_state_change",function(){a._updateActions()}));this._temporaryListeners.push(d(a.interactionService,"skip_state_change",function(){a._updateActions()}))},_refreshListeners:function(){this._temporaryListeners&&this._temporaryListeners.forEach(function(a){a.remove()});this._temporaryListeners=[]},addTask:function(a,c,e){var f=this,g=new b({title:"\x3cspan class\x3d'taskTitle'\x3e"+c+"\x3c/span\x3e",content:a,open:!1,baseClass:"titlePane",
duration:this._openCloseDuration});h.place(e.domNode,g.titleBarNode,"first");this._temporaryListeners.push(d(g.titleBarNode,"click",function(a){f._makeActiveTask(g)}));this.addChild(g);this._taskList.push(g);this._taskQuickLinks.push(e);this.resize();return g},goToTask:function(a){this._currentTask=a;a.get("open")||a.toggle();this._makeActiveTask(a);this._scrollToActiveTask()},_makeActiveTask:function(a){this._closeAllTitlePanesExcept(a);a.content&&a.content.task&&(this.activeTask=a.content.task,
this._updateActions())},_closeAllTitlePanesExcept:function(a){var b,c;for(c=0;c<this._taskList.length;c++)b=this._taskList[c],(b=b!==a)&&this._taskList[c].get("open")&&this._taskList[c].toggle()},_scrollToActiveTask:function(){var a=null,b=this._currentTask,c=this.domNode.parentNode;if(b){var d=c.offsetHeight,e=c.scrollTop,f=e+d,g=b.offsetTop,b=b.offsetTop+b.offsetHeight;g<e?(a=g-35,0>a&&(a=0)):b>f&&(a=b-d+35);if(null!==a)var h=(a-e)/20,t=0,u=window.setInterval(function(){t++;c.scrollTop+=h;20===
t&&window.clearInterval(u)},12.5)}}})})},"academyinteractions/display/TaskDisplay":function(){define("dojo/_base/declare dojo/query dojo/dom dojo/on dojo/touch dojo/_base/fx dijit/TitlePane dijit/layout/ContentPane dojo/dom-class dojo/dom-construct dojo/dom-attr dojo/dom-style academyinteractions/display/ModalOverlay academyinteractions/actions/LearningActionIdConstants dojo/i18n!academyinteractions/l10n/nls/academyinteractions".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r){return g(h,{constructor:function(a){this.task=
a.task;this.interactionService=a.interactionService;this.taskActionService=a.taskActionService;this.interactionWidget=a.interactionWidget;this.contentFormatter=a.contentFormatter;this.inherited(arguments)},postCreate:function(a){this.inherited(arguments);k.add(this.domNode,"taskItem");this._addTaskAndInfo();this._addButtons();this._addListeners()},destroy:function(a){this._destroyModalWindow();this._resetListeners();this.inherited(arguments)},setLastTask:function(a){a?k.add(this.domNode,"lastTask"):
k.remove(this.domNode,"lastTask")},_addTaskAndInfo:function(){var a,b;b=l.create("div",{"class":"taskAndInfo"},this.domNode,"last");a=l.create("div",{"class":"supportingInfoDiv"},b,"last");this.modalWindowLink=l.create("a",{"class":"supportingInfo",innerHTML:"\x3cspan\x3e"+r.modalWindowLinkText+"\x3cspan class\x3d'icon-link-external icon_24'\x3e\x3c/span\x3e\x3c/span\x3e"},a,"last");this.task.background&&l.create("div",{"class":"info",innerHTML:this.task.background},b,"last");a=l.create("div",{"class":"task",
innerHTML:this.task.description},b,"last");this.task.nextTask&&l.create("div",{"class":"taskLabel",innerHTML:r.taskText},a,"first")},_addButtons:function(){this._buttonPane=new h({"class":"buttonPane"});var a=l.create("table",{"class":"buttonTable"},this._buttonPane.domNode),b=l.create("tr",{},a),a=l.create("td",{},b),b=l.create("td",{},b);this._linksDiv=new h({"class":"linksDiv"});this._buttonsDiv=new h({"class":"buttonsDiv"});this._hintSolutionButtons=new h({"class":"hintSolutionButtons"});this._taskHelpLinkArea=
new h({"class":"taskHelpLink"});this._scriptFunctionButtons=new h({"class":"scriptFunctionButtons"});this._inactiveButtons=new h({"class":"inactiveButtons"});this._nextTaskButtons=new h({"class":"nextTaskButtons"});this._lastTaskButtons=new h({"class":"lastTaskButtons"});this.hintButton=l.create("div",{"class":"linkBtn hintButton",innerHTML:r.hintText},this._hintSolutionButtons.domNode,"last");this.getSolutionButton=l.create("div",{"class":"linkBtn skipButton",innerHTML:r.getSolutionText},this._hintSolutionButtons.domNode,
"last");this.seeSolutionButton=l.create("div",{"class":"linkBtn skipButton",innerHTML:r.seeSolutionText},this._hintSolutionButtons.domNode,"last");this.resetButton=l.create("div",{"class":"linkBtn resetButton",id:"resetLinkID",innerHTML:r.resetText},this._hintSolutionButtons.domNode,"last");this.quickReference=l.create("a",{innerHTML:r.quickReference,target:"qrg","class":"linkBtn",href:this.interactionService.opts.taskHelpLink},this._taskHelpLinkArea.domNode,"last");this.submitButton=l.create("button",
{"class":"btn btn-sm btn_color_blue add_indent_5 submitButton",innerHTML:r.submitText},this._scriptFunctionButtons.domNode,"last");this.goToTaskButton=l.create("button",{"class":"btn btn-sm btn_color_blue add_indent_5 goToTaskButton",innerHTML:r.tryAgainText},this._inactiveButtons.domNode,"last");this.nextTaskButton=l.create("button",{"class":"btn btn-sm btn_color_blue add_indent_5 nextTaskButton",innerHTML:r.nextTaskText},this._nextTaskButtons.domNode,"last");this.nextSectionButton=l.create("button",
{"class":"btn btn-sm btn_color_blue add_indent_5 nextSectionButton",innerHTML:r.nextSectiongtText},this._lastTaskButtons.domNode,"last");this._linksDiv.addChild(this._hintSolutionButtons);this._linksDiv.addChild(this._taskHelpLinkArea);this._buttonsDiv.addChild(this._inactiveButtons);this._buttonsDiv.addChild(this._scriptFunctionButtons);this._buttonsDiv.addChild(this._nextTaskButtons);this._buttonsDiv.addChild(this._lastTaskButtons);l.place(this._linksDiv.domNode,a);l.place(this._buttonsDiv.domNode,
b);this.addChild(this._buttonPane)},_showModalWindow:function(){var a;this._destroyModalWindow();if((a=this.interactionService.currentTask)&&a.taskNumber===this.task.taskNumber&&this.task.supportingInfo)a=this._getAnimationTargetDomElement(),this.supportingInfoOverlay=new n({animationTargetDomElement:a}),this.supportingInfoPane=new h({"class":"lectureContent supportingInfo"}),l.place(this.supportingInfoPane.domNode,this.supportingInfoOverlay.contentDiv,"last"),l.place(this.supportingInfoOverlay.domNode,
this.interactionWidget._leftRightBorderContainer.domNode),this.supportingInfoPane.set("content",this.task.supportingInfo),this._formatContent(),this.supportingInfoOverlay.show()},addWidget:function(a){var b=null,c,d=this.domNode.childNodes;for(c=0;c<d.length;c++)d[c]&&k.contains(d[c],"taskHelpLink")&&(b=c),d[c]&&k.contains(d[c],"assessmentPane")&&(b=c);this.addChild(a,b)},_destroyModalWindow:function(){this.supportingInfoOverlay&&this.supportingInfoOverlay.destroy();this.supportingInfoOverlay=null},
_getAnimationTargetDomElement:function(){return f(".icon-link-external",this.modalWindowLink)[0]},_addListeners:function(){var a=this;this._resetListeners();this._listeners.push(d(this.interactionService,"interaction_state_change",function(){a.updateButtonStatuses()}));this._listeners.push(d(this.interactionService,"response_state_change",function(){a.updateButtonStatuses()}));this._listeners.push(d(this.interactionService,"skip_state_change",function(){a._updateGetSolutionButtonStatus()}));this._listeners.push(d(this.interactionService,
"struggling_state_change",function(){a._updateButtonHighlights()}));this._listeners.push(d(this.interactionService,"display_supporting_info",function(){a._showModalWindow()}));this._listeners.push(d(a.submitButton,b.press,function(b){a.interactionService.userWantsToSubmit()}));this._listeners.push(d(a.hintButton,b.press,function(b){a.interactionService.userWantsToSeeHint()}));this._listeners.push(d(a.getSolutionButton,b.press,function(b){a.interactionService.userWantsToSkip()}));this._listeners.push(d(a.seeSolutionButton,
b.press,function(b){b.ctrlKey&&b.shiftKey?a.interactionService.userWantsToSkip():a.interactionService.userWantsToSeeSolution()}));this._listeners.push(d(a.resetButton,b.press,function(b){a.interactionService.userWantsToReset()}));this._listeners.push(d(a.goToTaskButton,b.press,function(b){a.interactionService.resetToQuestionNumber(a.task.taskNumber)}));this._listeners.push(d(a.nextSectionButton,b.press,function(b){a.interactionService.userWantsToMoveToNextSection()}));this._listeners.push(d(a.nextTaskButton,
b.press,function(b){a.interactionService.resetToQuestionNumber(a.interactionService.currentTaskNumber+1)}));this._listeners.push(d(a.modalWindowLink,b.press,function(){a._showModalWindow()}))},_resetListeners:function(){this._listeners&&this._listeners.forEach(function(a){a.remove()});this._listeners=[]},_updateTaskStatus:function(){k.remove(this.domNode,"activeTask");k.remove(this.domNode,"inactiveTask");k.remove(this.domNode,"notYetReachedTask");switch(this.task.getStatus()){case this.task.STATUS.ACTIVE:k.add(this.domNode,
"activeTask");break;case this.task.STATUS.INACTIVE:k.add(this.domNode,"inactiveTask");break;case this.task.STATUS.NOTYETREACHED:k.add(this.domNode,"notYetReachedTask")}},updateButtonStatuses:function(){this._updateTaskStatus();this._updateSubmitButtonStatus();this._updateNextTaskButtonStatus();this._updateGoToTaskButtonStatus();this._updateHintButtonStatus();this._updateGetSolutionButtonStatus();this._updateSeeSolutionButtonStatus();this._updateResetButtonStatus();this._updateNextSectionButtonStatus();
this._updateModalWindowLinkStatus();this._updateTaskHelpLinkArea()},_updateTaskHelpLinkArea:function(){var a=this.taskActionService.getAction(q.HELP_LINK);this._updateLink(this.quickReference,a)},_updateSubmitButtonStatus:function(){var a=this.taskActionService.getAction(q.SUBMIT);this._updateButton(this.submitButton,a)},_updateNextTaskButtonStatus:function(){var a=this.taskActionService.getAction(q.NEXT_TASK);this._updateButton(this.nextTaskButton,a)},_updateHintButtonStatus:function(){var a=this.taskActionService.getAction(q.HINT);
this._updateLink(this.hintButton,a)},_updateGetSolutionButtonStatus:function(){var a=this.taskActionService.getAction(q.GET_SOLUTION);this._updateLink(this.getSolutionButton,a)},_updateSeeSolutionButtonStatus:function(){var a=this.taskActionService.getAction(q.SEE_SOLUTION);this._updateLink(this.seeSolutionButton,a)},_updateResetButtonStatus:function(){var a=this.taskActionService.getAction(q.RESET);this._updateLink(this.resetButton,a)},_updateGoToTaskButtonStatus:function(){var a=this.taskActionService.getAction(q.GO_TO_TASK);
this._updateButton(this.goToTaskButton,a)},_updateNextSectionButtonStatus:function(){var a=this.taskActionService.getAction(q.NEXT_SECTION);this._updateButton(this.nextSectionButton,a)},_updateModalWindowLinkStatus:function(){var a=this.taskActionService.getAction(q.MODAL_WINDOW);this._updateLink(this.modalWindowLink,a)},_updateButtonHighlights:function(){var a,b;a=this.interactionService.strugglingState===this.interactionService.STRUGGLING_STATES.STRUGGLING;b=this.interactionService.strugglingState===
this.interactionService.STRUGGLING_STATES.REALLY_STRUGGLING;this._hiliteHintButton(a||b);this._hiliteSeeSolutionButton(b)},_hiliteHintButton:function(a){a?k.add(this.hintButton,"academyGlow"):k.remove(this.hintButton,"academyGlow")},_hiliteSeeSolutionButton:function(a){a?k.add(this.seeSolutionButton,"academyGlow"):k.remove(this.seeSolutionButton,"academyGlow")},_updateButton:function(a,b){b.enabled?m.remove(a,"disabled"):m.set(a,"disabled","");b.visible?p.set(a,"display",""):p.set(a,"display","none");
b.isCallToAction?k.remove(a,"companion_btn"):k.add(a,"companion_btn")},_updateLink:function(a,b){b.enabled?m.remove(a,"disabled"):m.set(a,"disabled","");b.visible?p.set(a,"display",""):p.set(a,"display","none")},_formatContent:function(){this.interactionWidget.reformatContent()}})})},"academyinteractions/actions/LearningActionIdConstants":function(){define([],function(){return{SUBMIT:"motw.learning.submit",HINT:"motw.learning.hint",RESET:"motw.learning.reset",GET_SOLUTION:"motw.learning.getSolution",
SEE_SOLUTION:"motw.learning.seeSolution",GO_TO_TASK:"motw.learning.goToTask",NEXT_SECTION:"motw.learning.nextSection",NEXT_TASK:"motw.learning.nextTask",MODAL_WINDOW:"motw.learning.modalWindow",HELP_LINK:"motw.learning.helplink"}})},"academyinteractions/display/HintDisplay":function(){define("dojo/_base/declare dojo/_base/fx dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/html dojo/query dijit/layout/ContentPane dojo/i18n!academyinteractions/l10n/nls/academyinteractions".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return g([k],{constructor:function(a){this.interactionService=a.interactionService;this.inherited(arguments)},postCreate:function(){e.add(this.domNode,"hintMessage");d.create("div",{"class":"hintMessageHeader",innerHTML:l.hintText},this.domNode,"last");this.contentDiv=d.create("div",{"class":"hintMessageContents"},this.domNode,"last");this.interactionService.currentTask&&this.interactionService.currentTask.hint&&c.set(this.contentDiv,this.interactionService.currentTask.hint)}})})},
"academyinteractions/display/SolutionDisplay":function(){define("dojo/_base/declare dojo/_base/fx dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/html dojo/query dijit/layout/ContentPane dojo/i18n!academyinteractions/l10n/nls/academyinteractions".split(" "),function(g,f,e,d,b,a,c,h,k,l){return g([k],{constructor:function(a){this.interactionService=a.interactionService;this.inherited(arguments)},postCreate:function(){var a,b;e.add(this.domNode,"hintMessage");d.create("div",
{"class":"hintMessageHeader",innerHTML:l.seeSolutionHeader},this.domNode,"last");this.contentDiv=d.create("div",{"class":"hintMessageContents"},this.domNode,"last");this.interactionService.currentTask&&this.interactionService.currentTask.solution&&(c.set(this.contentDiv,"\x3cpre\x3e"+this.interactionService.currentTask.solution+"\x3c/pre\x3e"),"undefined"!==typeof prettyPrint&&(a=h("pre",this.contentDiv),b=h("code",this.contentDiv),a.forEach(function(a){e.add(a,"prettyprint lang-matlab")}),b.forEach(function(a){e.add(a,
"prettyprint lang-matlab")}),prettyPrint()))}})})},"academyinteractions/display/TaskQuickLinks":function(){define("dojo/_base/declare dojo/query dojo/dom dojo/on dijit/_WidgetBase dojo/dom-class dojo/dom-construct dojo/dom-attr dojo/dom-style academyinteractions/actions/LearningActionIdConstants dojo/i18n!academyinteractions/l10n/nls/academyinteractions".split(" "),function(g,f,e,d,b,a,c,h,k,l,m){return g(b,{constructor:function(a){this.title=a.title;this.interactionService=a.interactionService;this.taskActionService=
a.taskActionService;this.task=a.task;this.taskNumber=this.task.taskNumber;this.inherited(arguments)},postCreate:function(a){this.inherited(arguments);this._addLinks();this._addListeners()},destroy:function(a){this._resetListeners();this.inherited(arguments)},_addLinks:function(){this.resetLink=c.create("a",{"class":"resetLink",id:"resetLinkID",innerHTML:m.resetText})},_addListeners:function(){var a=this;this._resetListeners();this._listeners.push(d(this.interactionService,"interaction_state_change",
function(){a.updateLinkStatuses()}));this._listeners.push(d(this.interactionService,"response_state_change",function(){a.updateLinkStatuses()}));this._listeners.push(d(a.resetLink,"click",function(b){b.stopPropagation?b.stopPropagation():b.cancelBubble=!0;a.interactionService.userWantsToReset()}))},_resetListeners:function(){this._listeners&&this._listeners.forEach(function(a){a.remove()});this._listeners=[]},updateLinkStatuses:function(){this._updateResetLinkStatus()},_updateResetLinkStatus:function(){var a=
this.taskActionService.getAction(l.RESET);this.interactionService.currentTaskNumber!==this.taskNumber&&(a.visible=!1);this._updateLink(this.resetLink,a)},_updateLink:function(b,c){c.enabled?h.remove(b,"disabled"):h.set(b,"disabled","");c.visible?k.set(b,"display",""):k.set(b,"display","none");c.isCallToAction?a.add(b,"callToAction"):a.remove(b,"callToAction")}})})},"academyinteractions/SimulinkInteractionModule":function(){define("dojo/_base/declare dojo/Deferred dojo/Evented dojo/dom-class dojo/on dijit/layout/ContentPane mw-actiondataservice/ActionDataService academyinteractions/InteractionService academyinteractions/tasks/TaskActionProvider academyinteractions/Task academyinteractions/display/TaskNavigator academyinteractions/display/TaskQuickLinks academyinteractions/display/TaskDisplay academyinteractions/display/HintDisplay academyinteractions/display/SimulinkSolutionDisplay mw-academy-web/lecture/SimpleContentFormatter academyinteractions/MessageServiceInterface academyinteractions/toolEventCodes dojo/i18n!academyinteractions/l10n/nls/academyinteractions".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v){return g([e],{listeners:[],_taskList:[],_taskWidgets:[],constructor:function(a){this.interactionService=a.interactionService;this.actionService=a.actionService;this.taskActionService=a.taskActionService;this.taskActionProvider=a.taskActionProvider;this.taskNavigator=a.taskNavigator;this.messageServiceInterface=new t({subscribeChannel:"",publishChannel:"toolEventCodes"});this._createWidgets();this._addListeners()},_createWidgets:function(){var a=document.getElementById("taskPanePreloader");
a.parentNode.replaceChild(this.taskNavigator.domNode,a)},_addListeners:function(){var a=this;this.removeListeners();this.listeners.push(b(this.interactionService,"interaction_state_change",function(){a.interactionService.interactionState===a.interactionService.INTERACTION_STATES.INACTIVE?a._clearTaskList():a.interactionService.interactionState===a.interactionService.INTERACTION_STATES.INITIALIZING&&a._updateTaskList();if(a.interactionService.interactionState===a.interactionService.INTERACTION_STATES.AWAITING_MOVE_TO_NEXT_QUESTION||
a.interactionService.interactionState===a.interactionService.INTERACTION_STATES.GRADING||a.interactionService.interactionState===a.interactionService.INTERACTION_STATES.COMPLETE)a.clearHintWidget(),a.clearSolutionWidget();a._updateTaskContainerStatus()}));this.listeners.push(b(this.interactionService,this.interactionService.EVENTS.USER_WANTS_TO_SEE_HINT,function(){a._displayDefaultHint()}));this.listeners.push(b(this.interactionService,this.interactionService.EVENTS.USER_WANTS_TO_SEE_SOLUTION,function(){"simulink"===
a.interactionService.currentTask.type&&a._displayEmbeddedSolution()}));this.listeners.push(b(this.interactionService,this.interactionService.EVENTS.DISPLAY_TASK,function(b){(b=a._taskList[b-1])&&a.taskNavigator.goToTask(b)}));this.listeners.push(b(this.interactionService,this.interactionService.EVENTS.USER_WANTS_TO_MOVE_TO_NEXT_SECTION,function(){a.messageServiceInterface.publishMessage({type:"toolEventCode",message:u.COURSE.NEXT_SECTION})}))},removeListeners:function(){this.listeners.forEach(function(a){a.remove()});
this.listeners=[]},_updateTaskContainerStatus:function(){var a,b,c,e;if(e=this.interactionService.getTasks())for(a=0;a<e.length;a++)if(b=e[a],c=this._taskList[a])switch(d.remove(c.domNode,"activeTask"),d.remove(c.domNode,"inactiveTask"),d.remove(c.domNode,"notYetReachedTask"),b.getStatus()){case b.STATUS.ACTIVE:d.add(c.domNode,"activeTask");this.taskNavigator.goToTask(c);break;case b.STATUS.INACTIVE:d.add(c.domNode,"inactiveTask");break;case b.STATUS.NOTYETREACHED:d.add(c.domNode,"notYetReachedTask")}},
_updateTaskList:function(){var a=this.interactionService.getTasks(),b,c,d;for(c=0;c<a.length;c++)b=new n({task:a[c],interactionService:this.interactionService,actionService:this.actionService,taskActionService:this.taskActionService}),d=new p({task:a[c],interactionService:this.interactionService,actionService:this.actionService,taskActionService:this.taskActionService}),this._taskWidgets[a[c].taskNumber]=b,c===a.length-1?(d=this.taskNavigator.addTask(b,v.furtherPracticeText,d),b.setLastTask(!0),this._taskList.push(d)):
this._taskList.push(this.taskNavigator.addTask(b,v.taskText+" "+(c+1),d));this.taskNavigator.startup()},getWidgetForTask:function(a){return this._taskWidgets[a.taskNumber]},_displayDefaultHint:function(){this.clearHintWidget();var a=this.interactionService.currentTask;this.hintWidget=new q({interactionService:this.interactionService});this.getWidgetForTask(a).addWidget(this.hintWidget);this._reformatContent()},clearHintWidget:function(){this.hintWidget&&this.hintWidget.destroy()},_displayEmbeddedSolution:function(){this.clearSolutionWidget();
var a=this.interactionService.currentTask;this.solutionWidget=new r({interactionService:this.interactionService});this.getWidgetForTask(a).addWidget(this.solutionWidget);this._reformatContent()},clearSolutionWidget:function(){this.solutionWidget&&this.solutionWidget.destroy()},_reformatContent:function(){this.emit(u.CONTENT.REFORMAT)}})})},"academyinteractions/tasks/TaskActionProvider":function(){define("dojo/_base/declare dojo/_base/lang dojo/on academyinteractions/actions/LearningActionIdConstants academyinteractions/actions/LearningActions mw-log/Log".split(" "),
function(g,f,e,d,b,a){return g([],{constructor:function(c){a.assert(c.interactionService,"Must supply interactionService");a.assert(c.taskActionService,"Must supply actionService");this.interactionService=c.interactionService;this.taskActionService=c.taskActionService;this.taskActionService.loadActions(b.actions)},updateActions:function(a){var b=this,e;this.taskActionService&&(e=this._getSubmitButtonStatus(a),this.taskActionService.updateAction(d.SUBMIT,{enabled:e.enabled,visible:e.visible,isCallToAction:e.isCallToAction,
callback:f.hitch(this,this.interactionService.userWantsToSubmit)}),e=this._getResetLinkStatus(a),this.taskActionService.updateAction(d.RESET,{enabled:e.enabled,visible:e.visible,isCallToAction:e.isCallToAction,callback:f.hitch(this,this.interactionService.userWantsToReset)}),e=this._getModalWindowLinkStatus(a),this.taskActionService.updateAction(d.MODAL_WINDOW,{enabled:e.enabled,visible:e.visible,isCallToAction:e.isCallToAction}),e=this._getHelpLinkStatus(a),this.taskActionService.updateAction(d.HELP_LINK,
{enabled:e.enabled,visible:e.visible,isCallToAction:e.isCallToAction}),e=this._getNextTaskButtonStatus(a),this.taskActionService.updateAction(d.NEXT_TASK,{enabled:e.enabled,visible:e.visible,isCallToAction:e.isCallToAction,callback:f.hitch(this,function(){b.interactionService.resetToQuestionNumber(b.interactionService.currentTaskNumber+1)})}),e=this._getHintButtonStatus(a),this.taskActionService.updateAction(d.HINT,{enabled:e.enabled,visible:e.visible,isCallToAction:e.isCallToAction,callback:f.hitch(this,
this.interactionService.userWantsToSeeHint)}),e=this._getGetSolutionButtonStatus(a),this.taskActionService.updateAction(d.GET_SOLUTION,{enabled:e.enabled,visible:e.visible,isCallToAction:e.isCallToAction,callback:f.hitch(this,this.interactionService.userWantsToSkip)}),e=this._getSeeSolutionButtonStatus(a),this.taskActionService.updateAction(d.SEE_SOLUTION,{enabled:e.enabled,visible:e.visible,isCallToAction:e.isCallToAction,callback:f.hitch(this,this.interactionService.userWantsToSeeSolution)}),e=
this._getGoToTaskButtonStatus(a),this.taskActionService.updateAction(d.GO_TO_TASK,{enabled:e.enabled,visible:e.visible,isCallToAction:e.isCallToAction,callback:f.hitch(this,function(){b.interactionService.resetToQuestionNumber(a.taskNumber)})}),e=this._getNextSectionButtonStatus(a),this.taskActionService.updateAction(d.NEXT_SECTION,{enabled:e.enabled,visible:e.visible,isCallToAction:e.isCallToAction,callback:f.hitch(this,this.interactionService.userWantsToMoveToNextSection)}))},_getSubmitButtonStatus:function(a){var b=
!1,e=!0,f=!1,f=this._getNextTaskButtonStatus(a);if(this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.GRADING||this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.AWAITING_MOVE_TO_NEXT_QUESTION||this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.ALLOWING_USER_TO_PONDER_RESPONSE)b=!0;a.getStatus()!==a.STATUS.ACTIVE&&(e=b=!1);b=b&&!a.isActionDisabledForTask(d.SUBMIT);e=e&&!a.isActionHiddenForTask(d.SUBMIT);
f=b&&e&&!f.isCallToAction;return{enabled:b,visible:e,isCallToAction:f}},_getResetLinkStatus:function(a){var b=!1,e=!0,f=!1,f=this._getNextTaskButtonStatus(a);if(this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.GRADING||this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.AWAITING_MOVE_TO_NEXT_QUESTION||this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.ALLOWING_USER_TO_PONDER_RESPONSE)b=!0;a.getStatus()!==
a.STATUS.ACTIVE&&(e=b=!1);b=b&&!a.isActionDisabledForTask(d.RESET);e=e&&!a.isActionHiddenForTask(d.RESET);f=b&&e&&!f.isCallToAction;return{enabled:b,visible:e,isCallToAction:f}},_getModalWindowLinkStatus:function(a){var b=!1,e=!1,f=this.interactionService.currentTask;if(this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.GRADING||this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.AWAITING_MOVE_TO_NEXT_QUESTION||this.interactionService.interactionState===
this.interactionService.INTERACTION_STATES.ALLOWING_USER_TO_PONDER_RESPONSE)b=!0;a.getStatus()!==a.STATUS.ACTIVE&&(e=b=!1);f&&(f.taskNumber===a.taskNumber&&a.supportingInfo)&&(e=!0);b=b&&!a.isActionDisabledForTask(d.MODAL_WINDOW);return{enabled:b,visible:e,isCallToAction:!1}},_getHelpLinkStatus:function(a){var b=!1,e=!1,f=this.interactionService.currentTask;if(this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.GRADING||this.interactionService.interactionState===
this.interactionService.INTERACTION_STATES.AWAITING_MOVE_TO_NEXT_QUESTION||this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.ALLOWING_USER_TO_PONDER_RESPONSE)b=!0;a.getStatus()!==a.STATUS.ACTIVE&&(e=b=!1);f&&(f.taskNumber===a.taskNumber&&this.interactionService.opts.taskHelpLink)&&(e=!0);b=b&&!a.isActionDisabledForTask(d.HELP_LINK);return{enabled:b,visible:e,isCallToAction:!1}},_getNextTaskButtonStatus:function(a){var b=!1,e=!0,f=this.interactionService.getNextTask(a);
if(this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.GRADING||this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.AWAITING_MOVE_TO_NEXT_QUESTION||this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.ALLOWING_USER_TO_PONDER_RESPONSE)b=!0;a.getStatus()!==a.STATUS.ACTIVE&&(e=b=!1);f?f.getStatus()===a.STATUS.NOTYETREACHED&&(e=b=!1):e=b=!1;b=b&&!a.isActionDisabledForTask(d.NEXT_TASK);e=e&&!a.isActionHiddenForTask(d.NEXT_TASK);
return{enabled:b,visible:e,isCallToAction:b&&e}},_getHintButtonStatus:function(a){var b=!1,e=!1;a&&a.hint&&(e=b=!0);a.getStatus()!==a.STATUS.ACTIVE&&(e=b=!1);b=b&&!a.isActionDisabledForTask(d.HINT);e=e&&!a.isActionHiddenForTask(d.HINT);return{enabled:b,visible:e,isCallToAction:!1}},_getSeeSolutionButtonStatus:function(a){var b=!0,e=this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.GRADING||this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.AWAITING_MOVE_TO_NEXT_QUESTION||
this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.ALLOWING_USER_TO_PONDER_RESPONSE;a.getStatus()!==a.STATUS.ACTIVE&&(b=e=!1);e=e&&!a.isActionDisabledForTask(d.SEE_SOLUTION);b=b&&!a.isActionHiddenForTask(d.SEE_SOLUTION);return{enabled:e,visible:b,isCallToAction:!1}},_getGetSolutionButtonStatus:function(a){return{enabled:!0,visible:!1,isCallToAction:!1}},_getGoToTaskButtonStatus:function(a){var b=!1,e=!1;a.getStatus()===a.STATUS.INACTIVE&&(e=b=!0);b=b&&!a.isActionDisabledForTask(d.GO_TO_TASK);
e=e&&!a.isActionHiddenForTask(d.GO_TO_TASK);return{enabled:b,visible:e,isCallToAction:!1}},_getNextSectionButtonStatus:function(a){var b=!1,e=!1;this.interactionService.isLastTask(a)&&(e=b=!0);b=b&&!a.isActionDisabledForTask(d.NEXT_SECTION);e=e&&!a.isActionHiddenForTask(d.NEXT_SECTION);return{enabled:b,visible:e,isCallToAction:!1}}})})},"academyinteractions/actions/LearningActions":function(){define(["academyinteractions/actions/LearningActionIdConstants","mw-log/Log","dojo/i18n!academyinteractions/l10n/nls/academyinteractions"],
function(g,f,e){var d={};d.actions=[{id:g.SUBMIT,enabled:!1,text:e.submitText,description:e.submitDesc,icon:"learningSubmit",callback:function(){f.warn("Action "+g.SUBMIT+" doesn't do anything yet.")}},{id:g.RESET,enabled:!1,text:e.resetText,description:e.resetDesc,icon:"learningReset",callback:function(){f.warn("Action "+g.RESET+" doesn't do anything yet.")}},{id:g.MODAL_WINDOW,enabled:!1,text:e.modalWindowLinkText,description:e.modalWindowLinkDesc,icon:"learningModalWindow",callback:function(){f.warn("Action "+
g.MODAL_WINDOW+" doesn't do anything yet.")}},{id:g.HELP_LINK,enabled:!1,text:e.quickReference,description:e.quickReference,icon:"learningModalWindow",callback:function(){f.warn("Action "+g.HELP_LINK+" doesn't do anything yet.")}},{id:g.HINT,enabled:!1,text:e.hintText,description:e.hintDesc,icon:"learningHint",callback:function(){f.warn("Action "+g.HINT+" doesn't do anything yet.")}},{id:g.GET_SOLUTION,enabled:!1,text:e.getSolutionText,description:e.getSolutionDesc,icon:"learningGetSolution",callback:function(){f.warn("Action "+
g.GET_SOLUTION+" doesn't do anything yet.")}},{id:g.SEE_SOLUTION,enabled:!1,text:e.seeSolutionText,description:e.seeSolutionDesc,icon:"learningGetSolution",callback:function(){f.warn("Action "+g.SEE_SOLUTION+" doesn't do anything yet.")}},{id:g.GO_TO_TASK,enabled:!1,text:e.tryAgainText,description:e.tryAgainDesc,icon:"learningGoToTask",callback:function(){f.warn("Action "+g.GO_TO_TASK+" doesn't do anything yet.")}},{id:g.NEXT_SECTION,enabled:!1,text:e.nextSectionText,description:e.nextSectionDesc,
icon:"learningNextSection",callback:function(){f.warn("Action "+g.NEXT_SECTION+" doesn't do anything yet.")}},{id:g.NEXT_TASK,enabled:!1,text:e.nextTaskText,description:e.nextTaskDesc,icon:"learningNextTask",callback:function(){f.warn("Action "+g.NEXT_TASK+" doesn't do anything yet.")}}];return d})},"academyinteractions/display/SimulinkSolutionDisplay":function(){define("dojo/_base/declare dojo/_base/fx dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/html dojo/query dijit/layout/ContentPane dojo/i18n!academyinteractions/l10n/nls/academyinteractions".split(" "),
function(g,f,e,d,b,a,c,h,k,l){return g([k],{constructor:function(a){this.interactionService=a.interactionService;this.inherited(arguments)},postCreate:function(){e.add(this.domNode,"hintMessage");d.create("div",{"class":"hintMessageHeader",innerHTML:l.seeSolutionHeader},this.domNode,"last");this.contentDiv=d.create("div",{"class":"hintMessageContents"},this.domNode,"last");this.interactionService.currentTask&&this.interactionService.currentTask.solution&&c.set(this.contentDiv,this.interactionService.currentTask.solution)}})})},
"academyinteractions/extensions/InteractionExecutionDataService":function(){define("dojo/_base/declare dojo/on dojo/_base/lang dojo/Evented mw-log/Log MW/cmdhistory/CommandHistoryStore MOTW/motw/ActionIdConstants mw-remote/Remote mw-remote/remoteFaultCodes MOTW/ExecutionDataService mw-utils/FileNameUtil academyinteractions/util/MATLABPathUtil".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p){return g([d],{cmdInteractionModel:null,submissionResponses:null,numSubmissionResponses:null,exercisesBeingProcessed:null,
initializationCommands:null,_workerResetCommands:"",_stateResetCommands:"",USER_CODE_TIMEOUT:50,constructor:function(a){this.executionService=a.executionService;this.msgQueue=a.interactionMessageQueue;this.commandHistoryShim=a.commandHistoryShim;this.inherited(arguments)},addWorkerResetCommandsToQueue:function(){this._workerResetCommands=["try, dbquit('all'), end","try, dbclear('all'), end","connector.internal.academy.graders.GraderUtils.emptyFolder('"+p.getWorkFolder()+"');","connector.internal.academy.graders.GraderUtils.emptyFolder('"+
p.getTestFolder()+"');"];this.addInvisibleCommandsToQueue(this._workerResetCommands)},addStateResetCommandsToQueue:function(){this._stateResetCommands=this.getStateResetCommands();this.addInvisibleCommandsToQueue(this._stateResetCommands)},getStateResetCommands:function(){return this._stateResetCommands=["try, dbquit('all'), end","try, dbclear('all'), end","cd('"+p.getWorkFolder()+"');","connector.internal.academy.state.cleanMATLABState;"]},addVisibleCommandsToQueue:function(a){var b=this;"string"===
typeof a&&(a=[a]);a.forEach(function(a){b.msgQueue.addEvalToQueue({mcode:a},function(c,d){var e;e={commandHistoryDivId:Date.now(),type:"request",value:a,visible:!0,historyVisible:!0,promptType:b.executionService.executionState,promptString:"\x3e\x3e ",isSessionData:!0};e=b.executionService.historyStore.newItem(e);b.executionService.onAuthoringEval(a,e.commandHistoryDivId);b._handleClc(c);b.executionService._isIntercepted(a)?b.executionService._handleInterceptedCommand(a):b.executionService.historyStore.newItem({type:"response",
value:c[0].responseStr,isError:!1,visible:!0,isSessionData:!0})})})},addInvisibleCommandsToQueue:function(a){var b=this,c=[];"string"===typeof a&&(a=[a]);this.msgQueue&&(a.forEach(function(a){c.push("try,eval("+b._jsCommandStringToMATLABCommandString(a)+");,end;")}),b.msgQueue.addEvalToQueue({mcode:c.join("\n")},null))},addSolutionCommandToQueue:function(a,b){var c,d,e,f=this;c=b.code;f.msgQueue.addEvalToQueue({mcode:c},function(a,b){d=Date.now();e={commandHistoryDivId:d,type:"request",value:c,visible:!0,
historyVisible:!0,promptType:f.executionService.executionState,promptString:"\x3e\x3e "};e=f.executionService.historyStore.newItem(e);f.executionService.onAuthoringEval(c,d);f._handleClc(a);f.executionService._isIntercepted(c)?f.executionService._handleInterceptedCommand(c):f.executionService.historyStore.newItem({type:"response",value:a[0].responseStr,isError:a[0].isError,visible:!0})})},addTestSuiteFilesForCodeFileTaskToQueue:function(a){var b,c,d,e,f=this;d=0;c=p.getTestFolder();a.exercises.forEach(function(a){d++;
b="test_exercise_"+d;e=a.code+"\n";a.assessments.forEach(function(a){e+="\n%% "+a.title+"\n";e+=a.code;e+="\n"});f.msgQueue.addCreateFileToQueue({file:{path:c+b+".m",fileInfo:m.fileInfoFromPath(c+b+".m"),content:e},updateIfExists:!0})})},addCommandLineGraderCommandsToQueue:function(a,b){var c,d,e,f,g=this,h=a.exercises[0].code;d=a.solution;h=this.executionService._normalizeCommand(h).matlabCode;d=this.executionService._normalizeCommand(d).matlabCode;e=this._jsCommandStringToMATLABCommandString(h);
f=this._jsCommandStringToMATLABCommandString(d);d=Date.now();b.code=this.executionService._normalizeCommand(h).matlabCode;b.width=this.executionService._normalizeCommand(h).width;c={commandHistoryDivId:d,type:"request",value:h,visible:!0,historyVisible:!0,promptType:this.executionService.executionState,promptString:"\x3e\x3e "};c=this.executionService.historyStore.newItem(c);g.executionService.onAuthoringEval(h,d);g.msgQueue.addEvalToQueue({mcode:"disp(connector.internal.academy.graders.CommandLineGrader.gradeSubmission("+
e+","+f+",'"+p.getTestFolder()+"'));",timeout:g.USER_CODE_TIMEOUT},function(b,d){var e=b[0].responseStr,e=g._filterDidYouMean(e);a.results=JSON.parse(e);g._handleClc(b);g.executionService._isIntercepted(h)||(g._exerciseResponseReceived(c,a.results.tests[0].codeOutput),a.results.tests[0].runTimeErrorFlag&&g._errorResponseReceived(c,a.results.tests[0].errorMessage))});g.msgQueue.addEvalToQueue({mcode:"delete(fullfile('"+p.getTestFolder()+"','*.*'));"},null)},addCodeFileGraderCommandsToQueue:function(a,
b,c,d){var e,f=this;e=this._jsCommandStringToMATLABCommandString(b);c=this._jsCommandStringToMATLABCommandString(c);f.msgQueue.addEvalToQueue({mcode:"disp(connector.internal.academy.graders.ScriptGrader.gradeSubmission("+e+","+c+",'"+p.getTestFolder()+"'));",timeout:f.USER_CODE_TIMEOUT},function(c,e){var g=c[0].responseStr,g=f._filterDidYouMean(g);a.results=JSON.parse(g);f._handleClc(c);d||a.results.tests.forEach(function(a){var c,d;c=Date.now();d=f.executionService._normalizeCommand(a.exerciseCode.trim()).matlabCode;
f.executionService._normalizeCommand(a.exerciseCode.trim());d={commandHistoryDivId:c,type:"request",value:d,visible:!0,historyVisible:!0,promptType:f.executionService.executionState,promptString:"\x3e\x3e "};d=f.executionService.historyStore.newItem(d);f.executionService.onAuthoringEval(b,c);f._exerciseResponseReceived(d,a.codeOutput);a.runTimeErrorFlag&&f._errorResponseReceived(d,a.errorMessage)})});f.msgQueue.addEvalToQueue({mcode:"delete(fullfile('"+p.getTestFolder()+"','*.*'));"},null)},_exerciseResponseReceived:function(a,
b){this.executionService._isIntercepted(a.value)||""!==b&&this.executionService.historyStore.newItem({type:"response",value:b,isError:!1,visible:!0,isSessionData:!0})},_errorResponseReceived:function(a,b){this.executionService.historyStore.newItem({type:"response",value:b,isError:!0,visible:!0,isSessionData:!0})},_handleClc:function(a){var b=this;a.forEach(function(a){a.clearCommandWindow&&b.clearCommandWindow()})},removeAllItemsFromHistory:function(){var a=this.executionService.historyStore;a.fetch({onItem:function(b){a.deleteItem(b)}})},
clearCommandWindow:function(){try{this.executionService._clearCommandWindow()}catch(a){}},_filterDidYouMean:function(a){var b=a.indexOf("Did you mean");0<=b&&(a=a.substr(0,b));return a},_jsCommandStringToMATLABCommandString:function(a){a=a.split("'").join("''");a=a.split("\n").join("' char(10) '");return"['"+a+"']"}})})},"mw-utils/FileNameUtil":function(){define(["dojo/_base/array"],function(g){return{MATLAB_FILE_PATTERN:/^[a-z][a-z0-9_]*\.m$/i,USER_DIR_PATH:"users/",USERS_DIR_PATH:"/users/",USER_PUBLISHED_DIR:"Published",
USER_PUBLISHED_DIR_PATH_PATTERN:"^/users/[a-zA-Z][a-zA-Z0-9]*/Published$",USER_SHARED_DIR_PATH_PATTERN:"^/users/[a-zA-Z][a-zA-Z0-9]*/Shared$",IN_USER_SHARED_DIR_PATTERN:"^/users/[a-zA-Z][a-zA-Z0-9]*/Shared/*",BROWSER_TYPES:"htm html pdf doc docx dot dotx rtf docm dotm xls asv dat exe dll xlsx zip".split(" "),LOAD_TYPES:["mat"],MATLAB_OPEN_TYPES:"fig tif png jpg jpeg gif au bmp mlx".split(" "),LIVE_SCRIPT_EXTENSION:"mlx",MATLAB_CODE_FILE_EXTENSION:"m",FILENAME_PATTERN:/^[^\"\/\*:><\?\\|]+$/,MATLAB_EXTENSION_PATTERN:/\.(m|mln|mlx)$/i,
SUPPORTED_EXTENSION_PATTERN:/\.(pdf|html|htm)$/i,SUPPORTED_FILENAME_PATTERN:/^[a-z][a-z0-9_]*\.(m|mln|mlx|pdf|html|htm)$/i,MATLAB_FILENAME_PATTERN:/^[a-z][a-z0-9_]*\.(m|mln|mlx)$/i,MATLAB_NAME_LENGTH:63,FILE_NAME_LENGTH:128,isMatlabFileInfo:function(f){return this._fileInfoNameMatchesRegExp(f,this.MATLAB_FILE_PATTERN)},isMatlabFileName:function(f){return this._fileNameMatchesRegExp(f,this.MATLAB_FILE_PATTERN)},isValidFileName:function(f){return this._fileNameMatchesRegExp(f,this.FILENAME_PATTERN)},
checkFileInfoExtension:function(f,e){return f&&f.name&&this.checkFileNameExtension(f.name,e)},checkFileNameExtension:function(f,e){e instanceof Array||(e=[e]);return g.some(e,function(d){return this.getFileNameExtension(f).toLocaleLowerCase()===d.toLocaleLowerCase()},this)},constructMatlabFilePath:function(f){f=this.pathFromFileInfo(f);f.replace(/'/g,"''");return"'"+f+"'"},constructUrlFromFileInfo:function(f,e){if(!e){var d=f.location.split(this.getFileSeparator(f.location));e=d[Math.min(2,d.length-
1)]}d="/"+f.location.substring(Math.min(f.location.indexOf(e)+e.length+1,f.location.length));return this.USER_DIR_PATH+e+d+f.name},getFileSeparator:function(f){return-1!==f.search(/^[a-z]:/i)||-1!==f.search(/^\\\\/i)?"\\":"/"},getFileNameNoExtension:function(f){if(!f||"string"!==typeof f)return f;var e=-1!==f.lastIndexOf(".")?f.lastIndexOf("."):f.length;return f.slice(0,e)},getFileNameExtension:function(f){if(!f||"string"!==typeof f)return f;var e=-1!==f.lastIndexOf(".")?f.lastIndexOf(".")+1:f.length;
return f.substring(e,f.length)},normalizePath:function(f){var e=this.getFileSeparator(f);return f.replace(/[\/\\]*$/,e)},parseHomeFolderFromPath:function(f,e){var d=f.indexOf(e),b="";0<d&&(b=f.substring(0,d+e.length)+this.getFileSeparator(f));return b},getPackageStartFromLocation:function(f){f=this.normalizeLocation(f);var e=this.getFileSeparator(f);"\\"===e&&(e+=e);return f.search("(\\"+e+"\\+[a-zA-Z][a-zA-Z0-9_]*)+\\"+e+"$")},getFullyQualifiedMatlabName:function(f){var e=this.convertLocationToPackage(f.location);
f=this.getFileNameNoExtension(f.name);return e+f},getPathForPublish:function(f){return-1<f.location.indexOf("+")?this.getFullyQualifiedMatlabName(f):f.location+f.name},areFilesEqual:function(f,e){return this.pathFromFileInfo(f)===this.pathFromFileInfo(e)},convertPathToRowClass:function(f){return f.replace(/[\/\.]/g,"_")},convertLocationToPackage:function(f){f=this.normalizeLocation(f);var e=this.getPackageStartFromLocation(f);if(0>e)return"";var d=this.getFileSeparator(f);"\\"===d&&(d+=d);return f.substring(e+
1,f.length).replace(/\+/g,"").replace(RegExp("\\"+d,"g"),".")},isShareable:function(f){return f.location===this.USERS_DIR_PATH||this.isUserPublishedDirectoryPath(f.path)?!1:f.shareAttributes&&void 0!==f.shareAttributes.canProduceShare?f.shareAttributes.canProduceShare:f.isDirectory&&!(f.parent&&"ROOT"===f.parent.pathId)},isUserSharedDirectoryPath:function(f){return f.match(this.USER_SHARED_DIR_PATH_PATTERN)},isInUsersSharedDirectory:function(f){return-1!==f.search(this.IN_USER_SHARED_DIR_PATTERN)},
isCurrentFolderInPath:function(f,e){return-1!==e.search(f)},isUserPublishedDirectoryPath:function(f){return f.match(this.USER_PUBLISHED_DIR_PATH_PATTERN)},isVersioned:function(f){return!f.isDirectory&&this.isWritable(f)&&this.isMatlabEditorOpenType(f)},isWritable:function(f){return f&&f.filePermissions&&f.filePermissions.canWrite},isLiveScriptFile:function(f){return this.getFileNameExtension(f)===this.LIVE_SCRIPT_EXTENSION},isPlainCodeFile:function(f){return this.getFileNameExtension(f)===this.MATLAB_CODE_FILE_EXTENSION},
canRename:function(f){return!f||f.parent&&"ROOT"===f.parent.pathId||f.parent&&f.name===this.USER_PUBLISHED_DIR&&"ROOT"===f.parent.parent.pathId?!1:this.isWritable(f)},canDelete:function(f){return this.canRename(f)},canDownload:function(f){return!f||f.name&&"mln"===this.getFileNameExtension(f.name).toLocaleLowerCase()?!1:!f.isDirectory},_fileInfoNameMatchesRegExp:function(f,e){var d=!1;f&&f.name&&(d=this._fileNameMatchesRegExp(f.name,e));return d},_fileNameMatchesRegExp:function(f,e){var d=!1,b=this._getCaseInsensitiveRegExp(e);
f&&("string"===typeof f&&-1!==f.search(b))&&(d=!0);return d},_getCaseInsensitiveRegExp:function(f){return f instanceof RegExp?RegExp(f.source,"i"):RegExp(f,"i")},assertIsFile:function(f){if(!this.isFile(f))throw Error("MW.utils.FileNameUtil: the object is not a 'File'.");},isFile:function(f){return f&&f.hasOwnProperty("content")&&f.hasOwnProperty("fileInfo")&&this.isFileInfo(f.fileInfo)},assertIsFileInfo:function(f){if(!this.isFileInfo(f))throw Error("MW.utils.FileNameUtil: the object is not a 'FileInfo'.");
},isFileInfo:function(f){return f&&f.hasOwnProperty("location")&&f.hasOwnProperty("name")&&f.hasOwnProperty("isDirectory")},normalizeLocation:function(f){if("string"===typeof f&&(0===f.length||f.lastIndexOf(this.getFileSeparator(f))!==f.length-1))f+=this.getFileSeparator(f);return f},createFilePath:function(f,e){return this.normalizeLocation(f)+e},folderInfoFromPath:function(f){f=this.fileInfoFromPath(f);f.isDirectory=!0;return f},fileInfoFromPath:function(f){return{location:this.locationFromPath(f),
name:this.nameFromPath(f),filePermissions:{canWrite:!0},isDirectory:!1,separator:this.getFileSeparator(f)}},pathFromFileInfo:function(f){if(!this.isFileInfo(f))throw Error("MW.utils.FileNameUtil: the object is not a 'FileInfo'.");return f.location+f.name},locationFromPath:function(f){var e,d=this.getFileSeparator(f),b=f.split(d);b[b.length-1]?(e=b[b.length-1],e=f.slice(0,f.length-e.length)):b[b.length-2]&&(e=b[b.length-2],e=f.slice(0,f.length-e.length-1));!e&&f===d&&(e=d);return e},getParentPath:function(f){f=
this.locationFromPath(f);return this._getPath(f)},_getPath:function(f){if(0===f.length)return f;var e=this.getFileSeparator(f);return f.charAt(f.length-1)!==e||3===f.length&&f.charAt(0).match(/[a-z]/i)&&":"===f.charAt(1)&&"\\"===f.charAt(2)||"/"===f?f:f.slice(0,f.length-1)},nameFromPath:function(f){var e="",d=this.getFileSeparator(f);f=f.replace(d+d,d);f=f.split(d);f[f.length-1]?e=f[f.length-1]:f[f.length-2]&&(e=f[f.length-2]);return e},createEmptyFileObject:function(f,e){return{content:"",fileInfo:this.fileInfoFromPath(this.createFilePath(f,
e))}},remoteFile:function(f){var e=f;this.isFile(f)&&this.isFileInfo(f.fileInfo)&&(e={content:f.content,fileInfo:this.remoteFileInfo(f.fileInfo)});return e},remoteFileInfo:function(f){var e=f;this.isFileInfo(f)&&(e={location:f.location,name:f.name,isDirectory:f.isDirectory});return e},extractSelectedFileName:function(f){if(!f||""===f||1>f.length)return"";var e=this.getFileSeparator(f);return 0>f.lastIndexOf(e)?f:f.substring(f.lastIndexOf(e)+1,f.length)},isBrowserType:function(f){return this.checkFileInfoExtension(f,
this.BROWSER_TYPES)?!0:!1},isLoadType:function(f){return this.checkFileInfoExtension(f,this.LOAD_TYPES)?!0:!1},isMatlabOpenType:function(f){return this.checkFileInfoExtension(f,this.MATLAB_OPEN_TYPES)?!0:!1},isMatlabEditorOpenType:function(f){return!(this.checkFileInfoExtension(f,this.BROWSER_TYPES)||this.checkFileInfoExtension(f,this.LOAD_TYPES)||this.checkFileInfoExtension(f,this.MATLAB_OPEN_TYPES))}}})},"academyinteractions/extensions/InteractionFileDataService":function(){define("dojo/_base/declare dojo/_base/lang dojo/Evented dojo/Deferred dojo/promise/all mw-remote/Remote mw-utils/FileNameUtil mw-log/Log MOTW/motw/ActionIdConstants".split(" "),
function(g,f,e,d,b,a,c,h,k){return g([e],{_numFilesSent:null,_numFilesReceived:null,editorService:null,constructor:function(a){this.actionService=a.actionService;this.fileDataService=a.fileDataService;this.editorService=a.editorService;this.msgQueue=a.interactionMessageQueue;this.workerInitializer=a.workerInitializer;this.inherited(arguments)},_decorateFilesToAdd:function(a){a&&a.filesToAdd.forEach(function(a){a.contents?(a.srcFile=null,a.file={path:a.destPath,fileInfo:c.fileInfoFromPath(a.destPath)},
a.createFileMessage={file:{path:a.destPath,fileInfo:c.fileInfoFromPath(a.destPath),content:a.contents},updateIfExists:!0}):(a.evalMessage={mcode:"connector.internal.academy.copyFileFromServer('"+a.srcFile+"','"+a.destPath+"')"},a.file={path:a.destPath,fileInfo:c.fileInfoFromPath(a.destPath)})})},sendServerFilesToWorker:function(a){var c=this,e=new d,f=[];c._decorateFilesToAdd(a);a.filesToAdd.forEach(function(a){var b,e=new d;f.push(e.promise);a.evalMessage?c.msgQueue.addEvalToQueue(a.evalMessage,
function(c){c&&c[0]&&c[0].responseStr&&0===c[0].responseStr.indexOf("Success")?e.resolve():(b="Error downloading file to worker: "+a.destPath,e.resolve(b))}):a.createFileMessage?c.msgQueue.addCreateFileToQueue(a.createFileMessage,function(a,b){c.fileDataService._handleCreateFileResponse(a,b);e.resolve()}):(b="Error downloading file to worker: "+a.destPath,e.resolve(b),h.log(b))});b(f).then(function(a){var b=!1;a.forEach(function(a){b=b||!!a});b?e.cancel(b):e.resolve()});c.msgQueue.flushQueue();return e.promise},
addOpenFileRequestToQueue:function(a){this.actionService.executeAction(k.OPEN_FILE,{fileInfo:a})},isFileOpen:function(a){return this.fileDataService._isFileOpen(a)},closeOpenedFiles:function(){var a=this;this.fileDataService.openedFilesDataStore.query().forEach(function(b){a.fileDataService.closeFile(b.fileInfo)})},getFileContents:function(a){var b=null;this.fileDataService.openedFilesDataStore.query().forEach(function(d){c.pathFromFileInfo(d.fileInfo)===a&&(b=d.content)});return b},setFileReadOnly:function(a,
b){var c;this.editorService&&(c=this._getEditorFromFile(a),c=c.getDocument(),c.setReadOnly(b))},setFileLayoutRegion:function(a,b){for(var c=this._getEditorFromFile(a).getParent(),d=c;d;){if(d.moveDocument){d.moveDocument(c,b);break}d=d.getParent?d.getParent():null}},setActiveFileWithFocus:function(a){if((a=this._getEditorFromFile(a))&&a&&a.onFocus)a.onFocus()},setFileContents:function(a,b){var d=this;this.fileDataService.openedFilesDataStore.query().forEach(function(e){var f=c.pathFromFileInfo(c.fileInfoFromPath(a)),
g=c.pathFromFileInfo(e.fileInfo);d.editorService&&g===f&&(e=d._getEditorFromFile(e),e=e.getDocument(),e.setText(b))})},_getEditorFromFile:function(a){return this.editorService._getEditorFromFileInfo(a.fileInfo).editor}})})},"academyinteractions/WorkerInitializer":function(){define("dojo/_base/declare dojo/_base/lang dojo/_base/kernel dojo/string dojo/Deferred mw-log/Log mw-utils/FileNameUtil mw-remote/Remote mw-notifications/Notifications academyinteractions/util/MATLABPathUtil dojo/i18n!academyinteractions/l10n/nls/academyinteractions".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m){return g([],{_initialized:!1,_initializingPromise:null,constructor:function(a){this.interactionMessageQueue=a.interactionMessageQueue},initialize:function(a,c){var d=this,e;this.initCode=a;this.folderHealthCheck=c;if(this._initializingPromise)return this._initializingPromise;e=new b;d._initializingPromise=e.promise;e.promise.always(function(){d._initializingPromise=null});d._initialized&&d.uninitialize();l.acquireBasePath().then(function(){d._performInitTasks().then(function(){d.interactionMessageQueue.setAllowInterrupts(!0);
d._initialized=!0;e.resolve()},function(){e.cancel()})},function(){e.cancel()});return e.promise},uninitialize:function(){l.unacquireBasePath();this.interactionMessageQueue.setAllowInterrupts(!1);this._initialized=!1},ensureInitialized:function(){var a,c;a=new b;c=a.promise;this._initialized?a.resolve():this.initialize(this.initCode,this.folderHealthCheck).then(function(){a.resolve()},function(){a.cancel()});return c},_performInitTasks:function(){this._makeWorkFolder();this._setupGraderFolders();
this._setLanguagePreference();this._performFolderHealthCheck();return this.interactionMessageQueue.flushQueue()},_performFolderHealthCheck:function(){var a=this.interactionMessageQueue;this.folderHealthCheck&&a.addFEvalToQueue({"function":"exist",arguments:[this.folderHealthCheck,"dir"],nargout:1,priority:1},function(b){var c=0;b&&b[0]&&(b=b[0].results)&&(b.length&&0<b.length)&&(c=b[0]);c||(k.displayAlertDialog(m.missingDataSets.title,m.missingDataSets.message),a.addFEvalToQueue({"function":"warning",
arguments:["Unable to locate course data set on worker."],nargout:0,priority:1}),a.flushQueue())})},_setupGraderFolders:function(){this.interactionMessageQueue.addEvalToQueue({mcode:"connector.internal.academy.graders.GraderUtils.createFoldersAndAddToPath;"});this.initCode&&this.interactionMessageQueue.addEvalToQueue({mcode:"function"===typeof this.initCode?this.initCode():this.initCode})},_makeWorkFolder:function(){this.interactionMessageQueue.addEvalToQueue({mcode:"try, rmdir('"+l.getWorkFolder()+
"','s'), end;mkdir('"+l.getWorkFolder()+"');"})},_getLangaugeFolder:function(){var a="en";switch(e.locale){case "ja-jp":a="ja";break;case "es-es":a="es";break;case "ko-kr":a="ko";break;case "zh-cn":a="zh"}return a},_setLanguagePreference:function(){this.interactionMessageQueue.addEvalToQueue({mcode:"connector.internal.academy.i18n.FeedbackTemplates.language.setLanguage('"+this._getLangaugeFolder()+"');"})}})})},"academyinteractions/MATLABStandardInitializer":function(){define("dojo/_base/declare dojo/_base/lang dojo/on dojo/Deferred dojo/Evented academyinteractions/functional/FunctionalUtils".split(" "),
function(g,f,e,d,b,a){return g([b],{constructor:function(a){this.interactionExecutionDataService=a.interactionExecutionDataService;this.interactionFileDataService=a.interactionFileDataService;this.interactionMessageQueue=a.interactionMessageQueue;this.workerInitializer=a.workerInitializer;this.messageService=a.messageService},cleanWorker:function(){return a.chainPromises([this._ensureInitialized.bind(this),this._resetWorker.bind(this)]).promise},initializeInteraction:function(b){return a.chainPromises([this._addFilesToWorker.bind(this,
b)]).promise},_ensureInitialized:function(){return this.workerInitializer.ensureInitialized()},_resetWorker:function(){this.messageService.publish("/editor/debugger/debug-exit",{});this.interactionFileDataService.closeOpenedFiles();this.interactionExecutionDataService.removeAllItemsFromHistory();this.interactionExecutionDataService.addWorkerResetCommandsToQueue();return this.interactionMessageQueue.flushQueue()},_addFilesToWorker:function(a){return this.interactionFileDataService.sendServerFilesToWorker(a)},
runInitializationCode:function(a,b){this.interactionExecutionDataService.addStateResetCommandsToQueue();a&&a.initializationCode&&("string"===typeof a.initializationCode&&(a.initializationCode=[a.initializationCode]),a.initializationCode.forEach(function(a){b?this.interactionExecutionDataService.addInvisibleCommandsToQueue(a):this.interactionExecutionDataService.addVisibleCommandsToQueue(a)},this));this.interactionExecutionDataService.executionService.turnOffStreamingEval();var d=this.interactionMessageQueue.flushQueue();
d.then(function(){window.setTimeout(function(){this.interactionExecutionDataService.executionService.turnOnStreamingEval()}.bind(this),100)}.bind(this));return d}})})},"academyinteractions/functional/FunctionalUtils":function(){define(["dojo/Deferred","mw-log/Log"],function(g,f){var e=function(b,a,c){b&&b.then?b.then(function(b){d(a,c,b)},function(b){b&&b.stack&&f.warn(b.stack);a.cancel(b)}):a.cancel("Invalid promise in sequence.")},d=function(b,a,c){if(!b.isFulfilled())if(a&&a[0])try{e(a[0](c),b,
a.splice(1))}catch(d){d&&d.stack&&f.warn(d.stack),b.cancel(d)}else b.resolve(c)};return{chainPromises:function(b){var a=new g;d(a,b);return a}}})},"academyinteractions/MATLABStateManager":function(){define(["dojo/_base/declare","dojo/on","dojo/Deferred","dojo/Evented","academyinteractions/functional/FunctionalUtils"],function(g,f,e,d,b){return g([d],{constructor:function(a){this.interactionService=a.interactionService;this.interactionMessageQueue=a.interactionMessageQueue;this.matlabStateService=
a.matlabStateService;this.mggGuiManager=a.mggGuiManager;this.matlabStandardInitializer=a.matlabStandardInitializer;this._addInteractionServiceListeners()},_addInteractionServiceListeners:function(){var a=this;f(a.interactionService,"interaction_state_change",function(c){var d,e;d=a.interactionService.currentTask;c===a.interactionService.INTERACTION_STATES.INACTIVE&&(a.matlabStateService.clearAssumedState(),a._cancelCurrentAction(),e=a._lastCleanupAction&&a._lastCleanupAction.promise?a._lastCleanupAction:
b.chainPromises([a._doInterrupt.bind(a),a.matlabStandardInitializer.cleanWorker.bind(a.matlabStandardInitializer)]),a._lastCleanupAction=e,e.promise.always(function(){e===a._lastCleanupAction&&(a._lastCleanupAction=null)}),a._setCurrentAction(e));c===a.interactionService.INTERACTION_STATES.INITIALIZING&&a.matlabStateService.clearAssumedState();c===a.interactionService.INTERACTION_STATES.MOVING_TO_ANOTHER_QUESTION&&(e=b.chainPromises([a._getCurrentPromise.bind(a),a._ensureInitialized.bind(a),a._resetToTask.bind(a,
d)]),a.setListenForUpdates(!1),e.then(function(){a.setListenForUpdates(!0);a.interactionService.successfullyMovedToCurrentQuestion()},function(b){a.setListenForUpdates(!0);a.matlabStateService.clearAssumedState();a.interactionService.failedToMoveToCurrentQuestion()}),a._setCurrentAction(e));c===a.interactionService.INTERACTION_STATES.EVALUATING_SUBMISSION&&(e=b.chainPromises([a._getCurrentPromise.bind(a),a._resetToTask.bind(a,d),a._submitTask.bind(a,d)]),a.setListenForUpdates(!1),e.then(function(){a.setListenForUpdates(!0);
a.matlabStateService.clearAssumedState();if(d.isResponseCorrect()){var b=a.interactionService.getNextTask(d),c=a.interactionService.getRegisteredTaskService(b.type);b&&c?c.saveTaskState(b).always(function(){a.interactionService.successfullyProcessedSubmission()}):a.interactionService.successfullyProcessedSubmission()}else a.interactionService.successfullyProcessedSubmission()},function(b){a.setListenForUpdates(!0);a.interactionService.failedToProcessSubmission()}),a._setCurrentAction(e))});f(a.interactionService,
"interrupt_request",function(){a._cancelCurrentAction();a._doInterrupt()})},_setCurrentAction:function(a){var b=this;this._currentDeferredAction=a;a.promise.always(function(d){b._currentDeferredAction===a&&(b._currentDeferredAction=null)})},_getCurrentPromise:function(){var a;this._currentDeferredAction?a=this._currentDeferredAction.promise:(a=new e,a.resolve(),a=a.promise);return a},_ensureInitialized:function(){var a,b=this.interactionService._interaction;b.initialized?(a=new e,a.resolve(),a=a.promise):
(a=this.matlabStandardInitializer.initializeInteraction(b),a.then(function(){b.initialized=!0}));return a},_cancelCurrentAction:function(){var a=this._currentDeferredAction;this._currentDeferredAction=null;a&&a.cancel()},_doInterrupt:function(){return this.interactionMessageQueue.interrupt()},_resetToTask:function(a){var c=this.interactionService.getRegisteredTaskService(a.type);return c.canResetToTask(a)?c.resetToTask(a):b.chainPromises([this._resetToAndSubmitPreviousTask.bind(this,a),c.transitionToTask.bind(c,
a)]).promise},_submitTask:function(a){return this.interactionService.getRegisteredTaskService(a.type).submitTask(a)},_resetToAndSubmitPreviousTask:function(a){var c;(a=this.interactionService.getPreviousTask(a))?(c=this.interactionService.getRegisteredTaskService(a.type),a=b.chainPromises([this._resetToTask.bind(this,a),c.submitTask.bind(c,a,!0)]).promise):(a=this.matlabStandardInitializer.runInitializationCode(this.interactionService._interaction,!!this.interactionService._interaction.initWasShown),
this.interactionService._interaction.initWasShown=!0);return a},setListenForUpdates:function(a){this._setListenForMggUpdates(a)},_setListenForMggUpdates:function(a){a&&this.mggGuiManager?(this.mggGuiManager.processDeferred(),this.mggGuiManager.manualProcessing=!1):this.mggGuiManager.manualProcessing=!0}})})},"academyinteractions/MATLABStateService":function(){define(["dojo/_base/declare","dojo/on","dojo/Deferred","dojo/Evented"],function(g,f,e,d){return g([d],{_savedMATLABStates:{},_assumedState:null,
constructor:function(b){this.interactionExecutionDataService=b.interactionExecutionDataService;this.interactionMessageQueue=b.interactionMessageQueue},clearSavedStates:function(){this._savedMATLABStates={};this.clearAssumedState()},restoreState:function(b){var a=this,c;this.isCurrentState(b)?(c=new e,c.resolve(),c=c.promise):(this.interactionExecutionDataService.addInvisibleCommandsToQueue("connector.internal.academy.state.restoreMATLABState('"+b+"');"),c=this.interactionMessageQueue.flushQueue(),
c.then(function(){a.setAssumedState(b)}));return c},saveState:function(b){var a=this,c;a.interactionExecutionDataService.addInvisibleCommandsToQueue("connector.internal.academy.state.saveMATLABState('"+b+"');");c=a.interactionMessageQueue.flushQueue();c.then(function(){a.setAssumedState(b);a._savedMATLABStates[b]="available"});return c},hasState:function(b){return!!this._savedMATLABStates[b]},saveEmptyState:function(b){this._savedMATLABStates[b]="empty"},isCurrentState:function(b){return b===this._assumedState},
setAssumedState:function(b){this._assumedState=b},getAssumedState:function(){return this._assumedState},clearAssumedState:function(){this._assumedState=null}})})},"academyinteractions/serviceShims/ExecutionDataServiceShim":function(){define(["dojo/_base/declare","dojo/aspect"],function(g,f){return g([],{_authoredCommandsHandler:null,constructor:function(e){this.executionService=e.executionService},interceptAuthoredCommands:function(e){this._authoredCommandsHandler=f.around(this.executionService,"authoringEval",
function(d){return function(b,a){e(b)}})},stopInterceptingAuthoredCommands:function(){this._authoredCommandsHandler&&(this._authoredCommandsHandler.remove(),this._authoredCommandsHandler=null)}})})},"academyinteractions/uiShims/ToolstripShim":function(){define(["dojo/_base/declare"],function(g){return g([],{constructor:function(f){this.uiBuilder=f.uiBuilder;this.toolstripWidget=this.uiBuilder.widgetByTag("motwToolstrip");this._initialize()},_initialize:function(){var f=this;"motwToolstrip.publishTab motwToolstrip.editorTab.file motwToolstrip.editorTab.edit motwToolstrip.editorTab.navigate motwToolstrip.liveEditorTab.file motwToolstrip.liveEditorTab.navigate motwToolstrip.liveeditor.insertTab".split(" ").forEach(function(e){e=
f.uiBuilder.tagToId(e);f.uiBuilder.remove(e)})},expandToolstrip:function(){"expanded"!==this.toolstripWidget.get("displayState")&&this.toolstripWidget.set("displayState","expanded")},collapseToolstrip:function(){"collapsed"!==this.toolstripWidget.get("displayState")&&this.toolstripWidget.set("displayState","collapsed")}})})},"academyinteractions/uiShims/CommandHistoryShim":function(){define("dojo/_base/declare dojo/_base/lang dojo/on dojo/Deferred dojo/Evented academyinteractions/display/TaskHeader dojo/i18n!academyinteractions/l10n/nls/academyinteractions".split(" "),
function(g,f,e,d,b,a,c){return g([b],{constructor:function(a){this.historyStore=a.historyStore},addTaskHeaderToHistory:function(a){return this.historyStore.newItem({commandHistoryDivId:Date.now(),type:"decoration",visible:!0,value:this._createTaskHeaderValue(a,0)})},_createTaskHeaderValue:function(a,b){var d,e=c.taskText+" "+a.taskNumber;switch(b){case 0:d=null;break;case 1:d=!0;break;case 2:d=!1}return{decorationType:"history_decoration_task_header",correct:d,text:e,trim:function(){return this}}},
_createTaskStatusValue:function(a,b){var d,e;switch(b){case 0:d="grey";e=null;break;case 1:d="green";e={spaceKey:c.correctMessage,escapeKey:c.alternativeSolutionMessage};break;case 2:d="red",e={escapeKey:c.inCorrectMessage}}return{decorationType:"history_decoration_status_container",color:d,content:a,keyActions:e,trim:function(){return this}}},markTaskHeaderAsCorrect:function(a,b){this.historyStore.setValue(a,"value",this._createTaskHeaderValue(b,1))},markTaskHeaderAsIncorrect:function(a,b){this.historyStore.setValue(a,
"value",this._createTaskHeaderValue(b,2))},markTaskHeaderAsUnanswered:function(a,b){this.historyStore.setValue(a,"value",this._createTaskHeaderValue(b,0))},addTaskResponseToHistory:function(a,b){return this.historyStore.newItem({commandHistoryDivId:Date.now(),type:"decoration",value:this._createTaskStatusValue(b,a?1:2),visible:!0,isTaskResponse:!0})},removeAllTaskResponses:function(){var a=this.historyStore;a.fetch({onComplete:function(b){b.forEach(function(b){!0===b.isTaskResponse&&a.setValue(b,
"visible",!1)})}})},removeAllUngradedTaskHeaders:function(){var a=this.historyStore;a.fetch({onComplete:function(b){b.forEach(function(b){var c=b.value;"history_decoration_task_header"===c.decorationType&&(!0!==c.correct&&!1!==c.correct)&&a.setValue(b,"visible",!1)})}})}})})},"academyinteractions/display/TaskHeader":function(){define("dojo/_base/declare dojo/_base/fx dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/html dojo/on ./ColorCodedMessage".split(" "),function(g,f,e,
d,b,a,c,h,k){return g([k],{constructor:function(a){this.inherited(arguments)},postCreate:function(){this.inherited(arguments)},destroy:function(a){this.inherited(arguments)}})})},"academyinteractions/tasks/CodeFileTaskService":function(){define("dojo/_base/declare dojo/aspect dojo/on dojo/request/xhr dojo/Deferred dojo/Evented academyinteractions/functional/FunctionalUtils academyinteractions/Task academyinteractions/util/InteractionUtil".split(" "),function(g,f,e,d,b,a,c,h,k){return g([a],{constructor:function(a){this.editorService=
a.editorService;this.interactionFileDataService=a.interactionFileDataService;this.interactionExecutionDataService=a.interactionExecutionDataService;this.interactionService=a.interactionService;this.interactionMessageQueue=a.interactionMessageQueue;this.matlabStateService=a.matlabStateService;this.inherited(arguments);this._resetListeners()},enableTask:function(a){this._startUp(a);this.emit("enabled",a)},disableTask:function(a){this.emit("disabled",a);this._cleanUp()},createTaskFromRawData:function(a){var b=
a.data,c=new h({type:b.type,description:b.description,taskNumber:a.taskNumber,background:b.background,supportingInfo:b.supportingInfo,hint:b.hint});c.template=b.template;c.solution=b.solution;c.exercises=k.extractExercisesFromCorrectnessAssessment(b.correctnessAssessment.join("\n"));c.exercises.forEach(function(a){"~execute user submission~"===a.code&&(a.code=c.template.split(".").shift())},this);return c},transitionToTask:function(a){return c.chainPromises([this._runCodeToTransitionToQuestion.bind(this,
a),this.saveTaskState.bind(this,a)]).promise},saveTaskState:function(a){var c=new b;this.matlabStateService.saveEmptyState(a.uuid);c.resolve();this._snapshotRestorePoint(a);return c.promise},canResetToTask:function(a){return this.matlabStateService.hasState(a.uuid)},resetToTask:function(a){this.canResetToTask(a)?a=this.transitionToTask(a):(a=new b,a.cancel(),a=a.promise);return a},submitTask:function(a,b){return c.chainPromises([this._obtainSolutionContents.bind(this,a,b),this._makeReadyToSubmit.bind(this,
a,b),this._runExercises.bind(this,a,b),this._finishProcessingSubmission.bind(this,a,b)]).promise},_startUp:function(a){this._resetListeners();this.interactionService.clearResponse();this._addEditorListeners(a)},_cleanUp:function(){this._resetListeners()},_resetListeners:function(){this._listeners&&this._listeners.forEach(function(a){a.remove()});this._listeners=[]},_addEditorListeners:function(a){var b=this;this._listeners.push(f.after(this.editorService,"onOpen",function(c){var d=b._getSolutionFile(a),
e=b._getTemplateFile(a);c&&c.file&&(c.file.id===d.path&&(b.interactionFileDataService.setFileReadOnly(d,!0),b.interactionFileDataService.setFileLayoutRegion(d,"right"),b.interactionFileDataService.setActiveFileWithFocus(e)),c.file.id===e.path&&(b.interactionFileDataService.setActiveFileWithFocus(e),a.restorePoint||(a.restorePoint=c.editor.getDocument().getText())))},!0))},_snapshotRestorePoint:function(a){if(!a.restorePoint){var b=this._getTemplateFile(a);if(b=this._getEditorForFileIfOpen(b))a.restorePoint=
b.editor.getDocument().getText()}},injectContentsIntoEditor:function(a,b){a.editor.getDocument().setText(b)},resetToLastRestorePoint:function(a){var b=this;a.restorePoint&&this.openExerciseFile(a).then(function(c){b.injectContentsIntoEditor(c,a.restorePoint)})},seeScriptSolutionWithoutEdit:function(a){a=this._getSolutionFile(a);this.interactionFileDataService.addOpenFileRequestToQueue(a.fileInfo,!1);this.interactionMessageQueue.flushQueue()},openExerciseFile:function(a){return this._openEditorFile(this._getTemplateFile(a))},
_openEditorFile:function(a){var c,d=new b;this.interactionFileDataService.isFileOpen(a.fileInfo)?d.resolve(this._getEditorForFileIfOpen(a)):(this.interactionFileDataService.addOpenFileRequestToQueue(a.fileInfo,!1),c=f.after(this.editorService,"onOpen",function(b){b&&b.file&&b.file.id===a.path&&(c.remove(),d.resolve(b))},!0),this.interactionMessageQueue.flushQueue(),this._listeners.push(c));return d.promise},setFocusToEditorWindow:function(a){this.interactionFileDataService.setActiveFileWithFocus(this._getTemplateFile(a))},
_runCodeToTransitionToQuestion:function(a){var c,d=new b,e=this._getTemplateFile(a);this.interactionFileDataService.isFileOpen(e.fileInfo)?d.resolve():(this.interactionFileDataService.addOpenFileRequestToQueue(e.fileInfo,!1),c=f.after(this.editorService,"onOpen",function(a){a&&a.file&&a.file.id===e.path&&(c.remove(),d.resolve())},!0),this.interactionMessageQueue.flushQueue(),this._listeners.push(c));return d.promise},_obtainSolutionContents:function(a,c){var e=this.interactionService.getAddedFileData(a.solution),
f=new b;!c||e.contents?f.resolve():d(e.srcFile,{handleAs:"text"}).then(function(a){e.contents=a;f.resolve()},function(){f.resolve()});return f.promise},_makeReadyToSubmit:function(a,b){b&&this._specifyFakeSubmission(a);return this._saveUsersSubmission(a)},_runExercises:function(a,b){this.interactionExecutionDataService.addTestSuiteFilesForCodeFileTaskToQueue(a);this.interactionExecutionDataService.addCodeFileGraderCommandsToQueue(a,a.template,a.solution);return this.interactionMessageQueue.flushQueue()},
_finishProcessingSubmission:function(a,c){var d;c||a.setResponse(a.results.correct,a.results.submissionCode,null);d=new b;d.resolve();return d.promise},_specifyFakeSubmission:function(a){var b;b=this.interactionService.getAddedFileData(a.solution).contents;a=this.interactionService.getAddedFileData(a.template).destPath;this.interactionFileDataService.setFileContents(a,b)},_saveUsersSubmission:function(a){var c=new b;this.interactionFileDataService.fileDataService.saveOpenFiles(function(){c.resolve()});
return c.promise},_getEditorForFileIfOpen:function(a){var b;this.interactionFileDataService.fileDataService._isFileOpen(a.fileInfo)&&(b=this.editorService._getEditorFromFileInfo(a.fileInfo));return b},_getTemplateFile:function(a){return this.interactionService.getAddedFileData(a.template).file},_getSolutionFile:function(a){return this.interactionService.getAddedFileData(a.solution).file}})})},"academyinteractions/util/InteractionUtil":function(){define(["dojo/string"],function(g){return{extractExercisesFromCorrectnessAssessment:function(f){var e=
/(?:%%(?=[^%])(.*))((?:.|[\r\n])*?)(%%%(?:.|[\r\n])*?(?=[\r\n]%%[^%]))/g,d=/(?:%%%(.*))((?:.|[\r\n])*?)(?=[\r\n]%%%)/g,b=[],a=null,c=[],h,k;f+="\n%% ";for(c=e.exec(f);c;){a={};a.title=g.trim(c[1]);a.code=g.trim(c[2]);k=c[3]+"\n%%%";c=[];for(h=d.exec(k);h;)c.push({title:g.trim(h[1]),code:g.trim(h[2])}),h=d.exec(k);a.assessments=c;b.push(a);c=e.exec(f)}return b}}})},"academyinteractions/tasks/CommandLineTaskService":function(){define("dojo/_base/declare dojo/on dojo/Deferred dojo/Evented academyinteractions/functional/FunctionalUtils academyinteractions/Task academyinteractions/util/InteractionUtil academyinteractions/actions/LearningActionIdConstants".split(" "),
function(g,f,e,d,b,a,c,h){return g([d],{constructor:function(a){this.executionService=a.executionService;this.executionServiceShim=a.executionServiceShim;this.commandHistoryShim=a.commandHistoryShim;this.interactionExecutionDataService=a.interactionExecutionDataService;this.interactionService=a.interactionService;this.interactionMessageQueue=a.interactionMessageQueue;this.matlabStateService=a.matlabStateService;this.inherited(arguments)},enableTask:function(a){this._resetListeners();this._addListeners(a);
this._startUp();this.emit("enabled",a)},disableTask:function(a){this.emit("disabled",a);this._resetListeners();this._cleanUp()},createTaskFromRawData:function(b){var d=b.data;b=new a({type:"commandLine",description:d.description,taskNumber:b.taskNumber,background:d.background,supportingInfo:d.supportingInfo,hint:d.hint});b.solution=d.solution;b.exercises=c.extractExercisesFromCorrectnessAssessment(d.correctnessAssessment.join("\n"));b.preventStateSerialization=d.preventStateSerialization;b.hideActionButtonForTask(h.SUBMIT);
b.hideActionButtonForTask(h.RESET);b.hideActionButtonForTask(h.NEXT_TASK);return b},transitionToTask:function(a){return this.saveTaskState(a)},saveTaskState:function(a){var b;a.preventStateSerialization?(b=new e,b.resolve(),b=b.promise,this.matlabStateService.setAssumedState(a.uuid)):b=this.matlabStateService.saveState(a.uuid);return b},canResetToTask:function(a){return this.matlabStateService.isCurrentState(a.uuid)||!a.preventStateSerialization&&this.matlabStateService.hasState(a.uuid)},resetToTask:function(a){this.canResetToTask(a)?
a=this.matlabStateService.restoreState(a.uuid):(a=new e,a.cancel(),a=a.promise);return a},submitTask:function(a,c){var d=this,e=[];c&&this._fillInExerciseWithSolution(a);a.exercises.forEach(function(b){e.push(d._runExercise.bind(d,a,b,c))});e.push(d._finishProcessingSubmission.bind(d,a,c));return b.chainPromises(e).promise},_addListeners:function(a){var b=this;this._listeners.push(f(b.interactionService,"interaction_state_change",function(a){(a===b.interactionService.INTERACTION_STATES.GRADING||a===
b.interactionService.INTERACTION_STATES.MOVING_TO_ANOTHER_QUESTION)&&b.interactionService.clearResponse()}));this._listeners.push(f(b.interactionService,"user_wants_to_skip",function(){b._fillInExerciseWithSolution(a)}))},_resetListeners:function(){this._listeners&&this._listeners.forEach(function(a){a.remove()});this._listeners=[]},_startUp:function(){var a=this;this.executionServiceShim.interceptAuthoredCommands(function(b){a.interactionService.interactionState===a.interactionService.INTERACTION_STATES.GRADING&&
a._authoringEval(b)})},_cleanUp:function(){this.executionServiceShim.stopInterceptingAuthoredCommands()},_authoringEval:function(a){a=this.executionService._normalizeCommand(a);this.executionService._isIntercepted(a.matlabCode)&&this.executionService._handleInterceptedCommand(a.matlabCode);this.interactionService.currentTask.exercises[0].code=a.matlabCode;this.interactionService.userWantsToSubmit()},_fillInExerciseWithSolution:function(a){a.exercises[0].code=a.solution},_runExercise:function(a,b,
c){c?a.preventStateSerialization?this.interactionMessageQueue.addEvalToQueue({mcode:b.code}):this.interactionExecutionDataService.addSolutionCommandToQueue(a,b):(this.interactionExecutionDataService.addTestSuiteFilesForCodeFileTaskToQueue(a,b),this.interactionExecutionDataService.addCommandLineGraderCommandsToQueue(a,b));return this.interactionMessageQueue.flushQueue()},_finishProcessingSubmission:function(a,b){var c;b||a.setResponse(a.results.correct,a.exercises[0].code,a.results.hint);c=new e;c.resolve();
return c.promise}})})},"academyinteractions/tasks/LiveEditorTaskService":function(){define("dojo/_base/declare dojo/aspect dojo/on dojo/Deferred dojo/Evented MW/rtc/model/io/OpcPackage MW/rtc/model/io/Reader MW/rtc/model/io/Writer mw-utils/FileNameUtil MOTW/editor/actions/SaveAsLiveScript academyinteractions/functional/FunctionalUtils academyinteractions/Task academyinteractions/util/InteractionUtil".split(" "),function(g,f,e,d,b,a,c,h,k,l,m,p,n){return g([b],{constructor:function(a){this.interactionFileDataService=
a.interactionFileDataService;this.interactionExecutionDataService=a.interactionExecutionDataService;this.interactionService=a.interactionService;this.interactionMessageQueue=a.interactionMessageQueue;this.matlabStateService=a.matlabStateService;this.editorService=a.editorService;this.messageService=a.messageService;this.matlabStandardInitializer=a.matlabStandardInitializer;this.inherited(arguments)},enableTask:function(a){this._resetListeners();this._addListeners(a);this._startUp();this.emit("enabled",
a)},disableTask:function(a){this.emit("disabled",a);this._resetListeners();this._cleanUp()},createTaskFromRawData:function(a){var b=a.data,c=new p({type:b.type,description:b.description,taskNumber:a.taskNumber,background:b.background,supportingInfo:b.supportingInfo,hint:b.hint});c.template=b.template;c.solution=b.solution;c.prevSolution=b.prevSolution;c.runLiveScriptSeparatelyFromGrading=!0;c.exercises=n.extractExercisesFromCorrectnessAssessment(b.correctnessAssessment.join("\n"));c.exercises.forEach(function(a){var b=
c.template.split(".").shift();a.origCode=a.code;a.templatedCode=a.origCode.replace("~execute user submission~",b).replace("~execute live script~","connector.internal.academy.graders.GraderUtils.runLiveScript('${1}', '${2}'); connector.internal.academy.graders.GraderUtils.bringBaseWorkspaceIntoCallingScope();");-1!==a.origCode.indexOf("~execute live script~")&&(c.runLiveScriptSeparatelyFromGrading=!1)});return c},transitionToTask:function(a){return m.chainPromises([this.openExerciseFile.bind(this,
a),this.saveTaskState.bind(this,a)]).promise},saveTaskState:function(a){var b=new d;this.matlabStateService.saveEmptyState(a.uuid);b.resolve();this._snapshotRestorePoint(a);return b.promise},canResetToTask:function(a){return this.matlabStateService.hasState(a.uuid)},resetToTask:function(a){if(this.matlabStateService.hasState(a.uuid))a=this.transitionToTask(a);else{var b=this._getTemplateFile(a);a=this._isMlxOpen(b.fileInfo)?this.saveTaskState(a):m.chainPromises([this._fillTemplateWithPreviousSolution.bind(this,
a),this.openExerciseFile.bind(this,a),this.saveTaskState.bind(this,a)]).promise}return a},submitTask:function(a,b){return m.chainPromises([this._makeReadyToSubmit.bind(this,a,b),this._runExercises.bind(this,a,b),this._finishProcessingSubmission.bind(this,a,b)]).promise},_addListeners:function(a){var b=this;this._listeners.push(f.after(b.editorService,"onOpen",function(c){var d=b._getSolutionFile(a);b._getTemplateFile(a);c.file.id===d.path&&(c.editor.getDocument().setReadOnly(!0),b.interactionFileDataService.setFileLayoutRegion(d,
"right"));b.setFocusToEditorWindow(a)},!0))},_resetListeners:function(){this._listeners&&this._listeners.forEach(function(a){a.remove()});this._listeners=[]},_startUp:function(){this.interactionService.clearResponse()},_cleanUp:function(){},fillInAnswerWithSolution:function(a){var b=this,c=this._getSolutionFile(a),d=this._getTemplateFile(a);a=this._copyCodeFile(c,d);a.then(function(a){b.interactionFileDataService.fileDataService.openedFilesDataStore.put(dojo.mixin(d,{modifiedDate:null,savePending:!1,
id:k.pathFromFileInfo(d.fileInfo)}));b.interactionFileDataService.fileDataService.onFileOpen(d)});return a},_fillTemplateWithPreviousSolution:function(a){if(!a.prevSolution)return this._createResolvedPromise();var b=this._getPrevSolutionFile(a);a=this._getTemplateFile(a);return this._copyCodeFile(b,a)},_copyCodeFile:function(a,b){return m.chainPromises([this._closeLiveEditorFile.bind(this,b),l.doConvert.bind(l,k.pathFromFileInfo(a.fileInfo),k.pathFromFileInfo(b.fileInfo))]).promise},openSolutionFile:function(a){return this._openLiveEditorFile(this._getSolutionFile(a))},
openExerciseFile:function(a){return this._openLiveEditorFile(this._getTemplateFile(a))},setFocusToEditorWindow:function(a){a=this._getTemplateFile(a);this._getEditorForFileIfOpen(a)&&this.interactionFileDataService.setActiveFileWithFocus(a)},_makeReadyToSubmit:function(a,b){if(b)return this.fillInAnswerWithSolution(a);var c=this._getTemplateFile(a),d=this._getEditorForFileIfOpen(c);a.exercises.forEach(function(a){a.code=a.templatedCode.replace("${1}",d.id).replace("${2}",d.file.id)});a.runLiveScriptSeparatelyFromGrading&&
this._refreshLiveEditorOutputs(d);return this._saveEditorContents(d,c)},_runExercises:function(a,b){b||(this.interactionMessageQueue.addEvalToQueue({mcode:"dbclear all; clear; close all; clc; set(0, 'DefaultFigureVisible', 'off');"}),this.interactionExecutionDataService.addTestSuiteFilesForCodeFileTaskToQueue(a),this.interactionExecutionDataService.addCodeFileGraderCommandsToQueue(a,a.template,a.solution,!0),this.interactionMessageQueue.addEvalToQueue({mcode:"close all; set(0, 'DefaultFigureVisible', 'on');"}));
return this.interactionMessageQueue.flushQueue()},_finishProcessingSubmission:function(a,b){b||a.setResponse(a.results.correct,a.results.submissionCode,null);return this._createResolvedPromise()},_saveEditorContents:function(a,b){var c=this,e=new d,f="/mlx/service/writeResponse/"+a.id,g=function(){e.resolve();c.messageService.unsubscribe(f,g);c.interactionFileDataService.fileDataService.setFileClean(b)};this.messageService.subscribe(f,g);this.editorService.onEditorSave(a.getFile().id);return e.promise},
_refreshLiveEditorOutputs:function(a){this.interactionMessageQueue.addEvalToQueue({mcode:"dbclear all;"});this.interactionMessageQueue.flushQueue().then(function(){a.editor.getActionDataService().executeAction("rtc_refresh_all_outputs")})},_snapshotRestorePoint:function(a){if(!a.restorePoint){var b=this._getTemplateFile(a);if(b=this._getEditorForFileIfOpen(b))a.restorePoint=this.readContentsFromEditor(b)}},readContentsFromEditor:function(b){var c=new a;h.write(b.editor.document._internalDocument,
c,b.editor._pluginResolver._injector.getDependency("rtc.serializers"));return a.toJson(c)},injectContentsIntoEditor:function(b,d){var e=a.fromJson(d);c.read(b.editor.document._internalDocument,e,b.editor._pluginResolver._injector.getDependency("rtc.serializers"))},resetToLastRestorePoint:function(a){var b=this;a.restorePoint&&this.openExerciseFile(a).then(function(c){b.injectContentsIntoEditor(c,a.restorePoint)})},_openLiveEditorFile:function(a){var b,c=new d;if(this._isMlxOpen(a.fileInfo)){var e=
this._getEditorForFileIfOpen(a);e&&c.resolve(e)}c.isResolved()||(this.interactionFileDataService.addOpenFileRequestToQueue(a.fileInfo,!1),b=f.after(this.editorService,"onOpen",function(d){b.remove();d&&d.file&&d.file.id===a.path&&c.resolve(d)},!0),this.interactionMessageQueue.flushQueue(),this._listeners.push(b));return c.promise},_closeLiveEditorFile:function(a){var b,c=new d;try{this._isMlxOpen(a.fileInfo)?(b=f.after(this.interactionFileDataService.fileDataService,"onFileClose",function(a){b.remove();
c.resolve()},!0),this.interactionFileDataService.fileDataService._doCloseFile(a.fileInfo,!1),this._listeners.push(b)):c.resolve()}catch(e){c.resolve()}return c.promise},_getEditorForFileIfOpen:function(a){var b;this.interactionFileDataService.fileDataService._isFileOpen(a.fileInfo)&&(b=this.editorService._getEditorFromFileInfo(a.fileInfo));return b},_isMlxOpen:function(a){return this.interactionFileDataService.fileDataService._isFileOpen(a)&&this.editorService._getEditorFromFileInfo(a)},_getTemplateFile:function(a){return this.interactionService.getAddedFileData(a.template).file},
_getSolutionFile:function(a){return this.interactionService.getAddedFileData(a.solution).file},_getPrevSolutionFile:function(a){return this.interactionService.getAddedFileData(a.prevSolution).file},_createResolvedPromise:function(){var a=new d;a.resolve();return a.promise}})})},"academyinteractions/tasks/SimulinkTaskService":function(){define("dojo/_base/declare dojo/on dojo/Deferred dojo/Evented academyinteractions/functional/FunctionalUtils academyinteractions/Task academyinteractions/InteractionMessageQueue".split(" "),
function(g,f,e,d,b,a,c){return g([d],{constructor:function(a){this.interactionService=a.interactionService;this.interactionMessageQueue=a.interactionMessageQueue;this.matlabStateService=a.matlabStateService;this.inherited(arguments)},enableTask:function(a){this._resetListeners();this._addListeners(a)},disableTask:function(a){this._resetListeners()},createTaskFromRawData:function(b){var c=b.data;b=new a({type:"simulink",description:c.description,taskNumber:b.taskNumber,background:c.background,supportingInfo:c.supportingInfo,
hint:c.hint});b.solution=c.solution;return b},_addListeners:function(a){var b=this;this._listeners.push(f(b.interactionService,"interaction_state_change",function(c){if(c===b.interactionService.INTERACTION_STATES.GRADING||c===b.interactionService.INTERACTION_STATES.MOVING_TO_ANOTHER_QUESTION)b.interactionService.clearResponse(),c===b.interactionService.INTERACTION_STATES.MOVING_TO_ANOTHER_QUESTION&&b._addAssessmentBlock(a).then(function(){b._updateAssessmentPaneFigure(a)});c===b.interactionService.INTERACTION_STATES.EVALUATING_SUBMISSION&&
b._submitUsingInteractionMessageQueue(a).then(function(){b._refreshAssessmentPane(a)})}));this._listeners.push(f(b.interactionService,"user_wants_to_reset",function(){b._resetTask(a)}))},_resetListeners:function(){this._listeners&&this._listeners.forEach(function(a){a.remove()});this._listeners=[]},_addAssessmentBlock:function(a){var b=this,d=new c;d.addFEvalToQueue({"function":"LearningApplication.setupTask",arguments:[a.taskNumber],nargout:0,priority:1},function(a){b.interactionService.successfullyMovedToCurrentQuestion()});
return d.flushQueue()},_updateAssessmentPaneFigure:function(a){a=new c;a.addFEvalToQueue({"function":"LearningApplication.updateAssessmentPane",nargout:0,priority:1},function(a){});return a.flushQueue()},_refreshAssessmentPane:function(a){a=new c;a.addEvalToQueue({mcode:"learning.simulink.refreshSignalWindows;"});return a.flushQueue()},_resetTask:function(a){a=new c;a.addFEvalToQueue({"function":"LearningApplication.resetTask",nargout:0,priority:1},function(a){});return a.flushQueue()},_submitUsingInteractionMessageQueue:function(a){var b=
this,d=null,e=new c;e.addFEvalToQueue({"function":"LearningApplication.submitTask",nargout:2,priority:1},function(c){function e(a){return!0===a}d=c[0].results;Array.isArray(d[0])?d[0].every(e)?a.setResponse(!0,"",""):a.setResponse(!1,"",""):d[0]?a.setResponse(!0,"",""):a.setResponse(!1,"","");b.interactionService.successfullyProcessedSubmission()});return e.flushQueue()},canResetToTask:function(a){return!1}})})},"academyinteractions/tasks/FreeTaskService":function(){define("dojo/_base/declare dojo/on dojo/Deferred dojo/Evented academyinteractions/Task academyinteractions/actions/LearningActionIdConstants".split(" "),
function(g,f,e,d,b,a){return g([d],{constructor:function(a){this.interactionService=a.interactionService;this.matlabStateService=a.matlabStateService;this.inherited(arguments)},enableTask:function(a){this.emit("enabled",a)},disableTask:function(a){this.emit("disabled",a)},createTaskFromRawData:function(c){var d=c.data;c=new b({type:d.type,description:d.description,taskNumber:c.taskNumber,background:d.background,supportingInfo:d.supportingInfo,hint:d.hint});c.hideActionButtonForTask(a.SUBMIT);c.disableActionForTask(a.SUBMIT);
c.hideActionButtonForTask(a.HINT);c.disableActionForTask(a.HINT);c.hideActionButtonForTask(a.GET_SOLUTION);c.disableActionForTask(a.GET_SOLUTION);c.hideActionButtonForTask(a.SEE_SOLUTION);c.disableActionForTask(a.SEE_SOLUTION);c.hideActionButtonForTask(a.RESET);c.disableActionForTask(a.RESET);return c},transitionToTask:function(a){return this.saveTaskState(a)},saveTaskState:function(a){var b=new e;this.matlabStateService.saveEmptyState(a.uuid);b.resolve();return b.promise},canResetToTask:function(a){return this.matlabStateService.hasState(a.uuid)},
resetToTask:function(a){this.canResetToTask(a)?a=this.transitionToTask(a):(a=new e,a.cancel(),a=a.promise);return a},submitTask:function(a,b){return this._noOp()},_noOp:function(){var a=new e;a.resolve();return a.promise}})})},"academyinteractions/tasks/CodeFileTaskUI":function(){define("dojo/_base/declare dojo/_base/fx dojo/dom-attr dojo/dom-class dojo/dom-style dojo/dom-construct dojo/query dojo/on dojo/html dojo/Evented dijit/layout/ContentPane dijit/Dialog dijit/form/Button academyinteractions/AcademyDefaultLayout academyinteractions/display/ColorCodedMessage academyinteractions/display/CodeFileResults spinner/spin dojo/i18n!academyinteractions/l10n/nls/academyinteractions".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u){return g([l],{constructor:function(a){var b=this;this.interactionFileDataService=a.interactionFileDataService;this.interactionService=a.interactionService;this.toolstripShim=a.toolstripShim;this.codeFileTaskService=a.codeFileTaskService;this.interactionModule=a.interactionModule;this.uiContainer=a.uiContainer;this.inherited(arguments);h(this.codeFileTaskService,"enabled",function(a){b.enableTask(a)});h(this.codeFileTaskService,"disabled",function(a){b.disableTask(a)})},
enableTask:function(a){this._resetListeners();this._addListeners(a);this._startUp()},disableTask:function(a){this._resetListeners();this._cleanUp()},_addListeners:function(a){var b=this;this._listeners.push(h(b.interactionService,"interaction_state_change",function(){b._updateEvaluatingSubmissionDisplay(a)}));this._listeners.push(h(b.interactionService,"response_state_change",function(){b._updateAssessmentResults(a)}));this._listeners.push(h(b.interactionService,"user_wants_to_skip",function(){b._fillInAnswerWithSolution(a)}));
this._listeners.push(h(b.interactionService,"user_wants_to_see_solution",function(){b._openScriptSolution()}));this._listeners.push(h(b.interactionService,"display_default_hint",function(){b.codeFileTaskService.setFocusToEditorWindow(a)}));this._listeners.push(h(b.interactionService,"user_wants_to_reset",function(){b._createResetDialog(a)}))},_resetListeners:function(){this._listeners&&this._listeners.forEach(function(a){a.remove()});this._listeners=[]},_startUp:function(a){this.toolstripShim.expandToolstrip();
this.uiContainer.set("layout",q.CMD_AND_WORKSPACE)},_cleanUp:function(a){this._clearEvaluatingSubmissionDisplay();this._clearAssessmentPane()},_fillInAnswerWithSolution:function(a){var b=this;b.codeFileTaskService._obtainSolutionContents(a,!0).then(function(){b.codeFileTaskService._makeReadyToSubmit(a,!0)})},_createResetDialog:function(b){var c=this,d,e,f,g;d=new p({id:"academyinteractions-reset",title:u.resetTitle,onCancel:function(){d.destroy()}});g=a.create("div");a.create("div",{"class":"mainText",
innerHTML:u.resetMsg},g,"last");e=a.create("div",null,g,"last");f=a.create("div",null,g,"last");new n({label:u.resetText,onClick:function(){c.codeFileTaskService.resetToLastRestorePoint(b);d.destroy()}},e);new n({label:u.cancelText,onClick:function(){d.destroy()}},f);d.set("content",g);d.show()},_openScriptSolution:function(){var a=this.interactionService.currentTask;a&&("script"===a.type||"function"===a.type)&&this.codeFileTaskService.seeScriptSolutionWithoutEdit(a)},_updateAssessmentResults:function(a){var c;
this._clearAssessmentPane();a=this.interactionModule.getWidgetForTask(a);this.interactionService.responseState!==this.interactionService.RESPONSE_STATES.NOT_AVAILABLE&&(this.assessmentPane=new m({"class":"assessmentPane"}),c=new s({task:this.interactionService.currentTask}),this.assessmentPane.addChild(c),a.addWidget(this.assessmentPane),b.set(this.assessmentPane.domNode,"opacity",0),f.fadeIn({node:this.assessmentPane.domNode}).play())},_clearAssessmentPane:function(){this.assessmentPane&&this.assessmentPane.destroy()},
_clearEvaluatingSubmissionDisplay:function(){this._evaluatingSubmissionMessage&&this._evaluatingSubmissionMessage.destroy()},_updateEvaluatingSubmissionDisplay:function(c){c=this.interactionModule.getWidgetForTask(c);var d=(new t).spin();this._clearEvaluatingSubmissionDisplay();this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.EVALUATING_SUBMISSION&&(this._evaluatingSubmissionMessage=new m({"class":"evaluatingSubmission"}),a.place(d.el,this._evaluatingSubmissionMessage.domNode,
"last"),c.addWidget(this._evaluatingSubmissionMessage),b.set(this._evaluatingSubmissionMessage.domNode,"opacity",0),f.fadeIn({node:this._evaluatingSubmissionMessage.domNode}).play())}})})},"academyinteractions/display/CodeFileResults":function(){define("dojo/_base/declare dojo/_base/fx dojo/dom-class dojo/dom-construct dojo/dom-geometry dojo/dom-style dojo/html dojo/on dijit/layout/ContentPane dijit/_WidgetBase academyinteractions/display/ColorCodedMessage academyinteractions/display/ModalOverlay mw-log/Log dojo/i18n!academyinteractions/l10n/nls/academyinteractions".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q){return g([l],{constructor:function(a){(this.task=a.task)||n.warn("No task specified for code file results.");this.task&&!("script"===this.task.type||"function"===this.task.type||"liveeditor"===this.task.type)&&n.warn("Task type should be 'script' or 'function' for code file results.");this.inherited(arguments)},postCreate:function(){var a=this,b=0;this._resetListeners();e.add(this.domNode,"codeFileResults");var c=d.create("div",{"class":"resultsCorrectness"},
this.domNode,"last");d.create("div",{innerHTML:q.testResults+": "},c);d.create("div",{"class":this.task.results.correct?"correct":"incorrect",innerHTML:this.task.results.correct?q.correct:q.incorrect},c);b=0;this.task.results.tests.forEach(function(c){b++;c=a._createTestPreview(c,b);d.place(c,a.domNode,"last")})},_hasMultipleTests:function(){return 1<this.task.results.tests.length},_createTestPreview:function(a,b){var c=this,e,f,g;f=d.create("div",{"class":"test preview test"+b});g=c._hasMultipleTests()?
"Test Suite "+b:"Test Suite";d.create("div",{"class":"testHint "+(a.correct?"correct":"incorrect"),innerHTML:"\x3ch3\x3e"+g+"\x3c/h3\x3e"+(a.correct?"":a.hint)});e=0;a.assessments.forEach(function(a){var g;e++;g=d.create("div",{"class":"testAssessment"},f,"last");g=d.create("div",{"class":"testAssessmentTitle",innerHTML:c.task.exercises[b-1].assessments[e-1].title},g,"last");d.create("div",{"class":"testStatusIndicator "+(a.Passed?"correct":"incorrect")},g,"last")});g=d.create("div",{"class":"testDetailsLink",
innerHTML:q.testSuiteDetails});this._listeners.push(h(g,"click",function(){c._showTestDetailInModalView(a,b)}));return f},_showTestDetailInModalView:function(a,b){this._resetOverlay();this._overlay=new p;var c=this._createTestDetails(a,b);d.place(c,this._overlay.contentDiv,"last");d.place(this._overlay.domNode,document.getElementsByTagName("body")[0]);this._overlay.show()},_resetOverlay:function(){this._overlay&&this._overlay.destroy();this._overlay=null},_createTestDetails:function(a,b){var f=this,
g,h,k,l;h=d.create("div",{"class":"codeFileResults"});k=d.create("div",{"class":"test detail test"+b},h,"last");d.create("div",{"class":"testCode",innerHTML:"\x3cpre class\x3d'prettyprint lang-matlab'\x3e"+f.task.exercises[b-1].code+"\x3c/pre\x3e"},k,"last");l=f._hasMultipleTests()?"Test Suite "+b:"Test Suite";d.create("div",{"class":"testHint "+(a.correct?"correct":"incorrect"),innerHTML:"\x3ch3\x3e"+l+"\x3c/h3\x3e"+(a.correct?"":a.hint)},k,"last");g=0;a.assessments.forEach(function(a){var h,l,n;
g++;h=d.create("div",{"class":"testAssessment"},k,"last");l=d.create("div",{"class":"testAssessmentTitle",innerHTML:"\x3cspan class\x3d'assessmentExpansionIndicator'\x3e\x3c/span\x3e"+f.task.exercises[b-1].assessments[g-1].title},h,"last");d.create("div",{"class":"testStatusIndicator "+(a.Passed?"correct":"incorrect")},l,"last");n=d.create("div",{"class":"testAssessmentBody",style:"display:none;",innerHTML:"\x3cpre class\x3d'prettyprint lang-matlab'\x3e"+f.task.exercises[b-1].assessments[g-1].code+
"\x3c/pre\x3e\x3cbr/\x3e"},h,"last");h=new m;h.showCloseButton(!1);c.set(h.contentDiv,a.Passed?"Passed":a.Diagnostics.split("\n").join("\x3cbr/\x3e"));d.place(h.domNode,n,"last");a.Passed?e.add(h.colorBar,"green"):e.add(h.colorBar,"red");f._addToggleDisplayListener(l,n)});return h},_addToggleDisplayListener:function(b,c){this._listeners.push(h(b,"click",function(d){"none"===a.get(c,"display")?(a.set(c,"display",""),e.add(b,"displayed")):(a.set(c,"display","none"),e.remove(b,"displayed"))}))},_resetListeners:function(){this._listeners&&
this._listeners.forEach(function(a){a.remove()});this._listeners=[]},destroy:function(a){this._resetListeners();this._resetOverlay();this.inherited(arguments)}})})},"academyinteractions/tasks/CommandLineTaskUI":function(){define("dojo/_base/declare dojo/aspect dojo/dom-class dojo/dom-construct dojo/html dojo/on dojo/Evented dojo/query dijit/layout/ContentPane mw-log/Log academyinteractions/AcademyDefaultLayout dojo/sniff dojo/i18n!academyinteractions/l10n/nls/academyinteractions".split(" "),function(g,
f,e,d,b,a,c,h,k,l,m,p,n){return g([c],{_keyListeners:null,_documentClickListeners:null,constructor:function(b){var c=this;this.interactionService=b.interactionService;this.commandHistoryShim=b.commandHistoryShim;this.executionService=b.executionService;this.layoutService=b.layoutService;this.toolstripShim=b.toolstripShim;this.interactionModule=b.interactionModule;this.commandLineTaskService=b.commandLineTaskService;this.uiContainer=b.uiContainer;this.inherited(arguments);a(this.commandLineTaskService,
"enabled",function(a){c.enableTask(a)});a(this.commandLineTaskService,"disabled",function(a){c.disableTask(a)})},enableTask:function(a){this._validateTaskIsReady();this._resetListeners();this._addListeners(a);this._startUp()},disableTask:function(a){this._resetListeners();this._cleanUp(a)},setCommandWindow:function(a){this.editor=a._rtcInstance},_validateTaskIsReady:function(){this.editor||l.error("Cannot enable command line task before command window is ready")},_addListeners:function(b){var c=this;
this._listeners.push(a(c.interactionService,"interaction_state_change",function(a){a===c.interactionService.INTERACTION_STATES.GRADING&&(c._setFocusToCommandWindow(),b.taskHeader=c.commandHistoryShim.addTaskHeaderToHistory(b));c._updatePromptVisibility();c._updateKeyboardListeners()}));this._listeners.push(a(c.interactionService,"response_state_change",function(){c._updateTaskHeader(b.taskHeader,b);c._updateCustomHint(b)}));this._listeners.push(a(c.interactionService,"user_wants_to_skip",function(){c._fillInAnswerWithSolution(b);
c._setFocusToCommandWindow()}))},_resetListeners:function(){this._listeners&&this._listeners.forEach(function(a){a.remove()});this._listeners=[];this._resetStateBasedListeners()},_resetStateBasedListeners:function(){this._keyListeners&&this._keyListeners.forEach(function(a){a.remove()});this._keyListeners=null;this._documentClickListeners&&this._documentClickListeners.forEach(function(a){a.remove()});this._documentClickListeners=null},_startUp:function(){this.toolstripShim.collapseToolstrip();this.uiContainer.set("layout",
m.CMD_AND_WORKSPACE)},_cleanUp:function(a){this._clearCustomHintContents();this._clearUngradedTaskHeaders();this._showPrompt();this._allowKeyPresses()},_clearCustomHintContents:function(){this.commandHistoryShim.removeAllTaskResponses()},_clearUngradedTaskHeaders:function(a){this.commandHistoryShim.removeAllUngradedTaskHeaders()},_updateKeyboardListeners:function(){var b=this,c=!1;b._resetStateBasedListeners();if(this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.AWAITING_MOVE_TO_NEXT_QUESTION)c=
!0;else if(this.interactionService.responseState===this.interactionService.RESPONSE_STATES.CORRECT||this.interactionService.responseState===this.interactionService.RESPONSE_STATES.INCORRECT)c=!0;if(c){var d=this._handleMouseDown.bind(this),c=this._keyPressHandler.bind(this);b._keyListeners=[];b._keyListeners.push(a(document,"keyup",c));b._keyListeners.push(a(document,"keydown",c));b._keyListeners.push(a(document,"keypress",c));b._documentClickListeners=[];b.editor.domNode.addEventListener("click",
d,!0);b._documentClickListeners.push({remove:function(){b.editor.domNode.removeEventListener("click",d)}})}},_keyPressHandler:function(a){var b=!1;if(this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.AWAITING_MOVE_TO_NEXT_QUESTION)32===a.keyCode&&(this.interactionService.finishTheMoveToNextQuestion(),b=!0),27===a.keyCode&&(this.interactionService.repeatCurrentQuestion(),b=!0);else if((this.interactionService.responseState===this.interactionService.RESPONSE_STATES.CORRECT||
this.interactionService.responseState===this.interactionService.RESPONSE_STATES.INCORRECT)&&27===a.keyCode)this.interactionService.repeatCurrentQuestion(),b=!0;if(b)try{a.preventDefault()}catch(c){}},_handleMouseDown:function(a){var b=!1;if(this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.AWAITING_MOVE_TO_NEXT_QUESTION)e.contains(a.target,"spaceKey")&&(this.interactionService.finishTheMoveToNextQuestion(),b=!0),e.contains(a.target,"escapeKey")&&(this.interactionService.repeatCurrentQuestion(),
b=!0);else if((this.interactionService.responseState===this.interactionService.RESPONSE_STATES.CORRECT||this.interactionService.responseState===this.interactionService.RESPONSE_STATES.INCORRECT)&&e.contains(a.target,"escapeKey"))this.interactionService.repeatCurrentQuestion(),b=!0;return b},_updatePromptVisibility:function(){this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.AWAITING_MOVE_TO_NEXT_QUESTION||this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.EVALUATING_SUBMISSION||
this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.MOVING_TO_ANOTHER_QUESTION||this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.ALLOWING_USER_TO_PONDER_RESPONSE?(this._hidePrompt(),this._hideCursor(),this._blockKeyPresses()):(this._showPrompt(),this._showCursor(),this._allowKeyPresses(),this.editor.focus())},_updateCustomHint:function(a){this._clearCustomHintContents();this.interactionService.responseState!==this.interactionService.RESPONSE_STATES.NOT_AVAILABLE&&
(a&&a.getResponseHint())&&(a=a.getResponseHint(),this.commandHistoryShim.addTaskResponseToHistory(this.interactionService.responseState===this.interactionService.RESPONSE_STATES.CORRECT,a))},_setFocusToCommandWindow:function(){this.layoutService.focusWidget("commandWindow");this.editor.focus()},_fillInAnswerWithSolution:function(a){this.editor._pluginResolver.getDependency("cw.core.promptinput").setPromptInput(a.solution)},_hidePrompt:function(){var a=this.editor._pluginResolver.getDependency("cw.core.prompt");
a.setCurrentPrompt("");a.updatePrompt()},_showPrompt:function(){var a=this.editor._pluginResolver.getDependency("cw.core.prompt");a.setCurrentPrompt("\x3e\x3e ");a.updatePrompt()},_hideCursor:function(){this.editor._pluginResolver.getDependency("rtc.cursor").hide()},_showCursor:function(){this.editor._pluginResolver.getDependency("rtc.cursor").show()},_blockKeyPresses:function(){var a=this.editor._pluginResolver.getDependency("rtc.keyhandler");a.keyCapture&&(p("ff")?a.keyCapture.readOnly=!0:a.keyCapture.disabled=
!0)},_allowKeyPresses:function(){var a=this.editor._pluginResolver.getDependency("rtc.keyhandler");a.keyCapture&&(p("ff")?a.keyCapture.readOnly=!1:a.keyCapture.disabled=!1)},_updateTaskHeader:function(a,b){if(a&&(this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.EVALUATING_SUBMISSION||this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.ALLOWING_USER_TO_PONDER_RESPONSE||this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.AWAITING_MOVE_TO_NEXT_QUESTION))switch(this.interactionService.responseState){case this.interactionService.RESPONSE_STATES.CORRECT:this.commandHistoryShim.markTaskHeaderAsCorrect(a,
b);break;case this.interactionService.RESPONSE_STATES.INCORRECT:this.commandHistoryShim.markTaskHeaderAsIncorrect(a,b);break;default:this.commandHistoryShim.markTaskHeaderAsUnanswered(a,b)}}})})},"academyinteractions/tasks/LiveEditorTaskUI":function(){define("dojo/_base/declare dojo/_base/fx dojo/dom-attr dojo/dom-class dojo/dom-style dojo/dom-construct dojo/query dojo/on dojo/html dojo/Evented dijit/layout/ContentPane dijit/Dialog dijit/form/Button MW/layout/LayoutContainerEvent academyinteractions/AcademyDefaultLayout academyinteractions/display/ColorCodedMessage academyinteractions/display/CodeFileResults spinner/spin dojo/i18n!academyinteractions/l10n/nls/academyinteractions".split(" "),
function(g,f,e,d,b,a,c,h,k,l,m,p,n,q,r,s,t,u,v){return g([l],{constructor:function(a){var b=this;this.interactionFileDataService=a.interactionFileDataService;this.interactionService=a.interactionService;this.toolstripShim=a.toolstripShim;this.liveEditorTaskService=a.liveEditorTaskService;this.interactionModule=a.interactionModule;this.uiContainer=a.uiContainer;this.inherited(arguments);h(this.liveEditorTaskService,"enabled",function(a){b.enableTask(a)});h(this.liveEditorTaskService,"disabled",function(a){b.disableTask(a)})},
enableTask:function(a){this._resetListeners();this._addListeners(a);this._startUp()},disableTask:function(a){this._resetListeners();this._cleanUp()},_addListeners:function(a){var b=this;this._listeners.push(h(b.interactionService,"interaction_state_change",function(){b._updateEvaluatingSubmissionDisplay(a)}));this._listeners.push(h(b.interactionService,"response_state_change",function(){b._updateAssessmentResults(a)}));this._listeners.push(h(b.interactionService,"user_wants_to_skip",function(){b.liveEditorTaskService.fillInAnswerWithSolution(a)}));
this._listeners.push(h(b.interactionService,"user_wants_to_see_solution",function(){b._openScriptSolution(a)}));this._listeners.push(h(b.interactionService,"display_default_hint",function(){b.liveEditorTaskService.setFocusToEditorWindow(a)}));this._listeners.push(h(b.interactionService,"user_wants_to_reset",function(){b._createResetDialog(a)}))},_resetListeners:function(){this._listeners&&this._listeners.forEach(function(a){a.remove()});this._listeners=[]},_startUp:function(a){this.toolstripShim.expandToolstrip();
this._startLiveEditorOnlyLayout()},_cleanUp:function(a){this._clearEvaluatingSubmissionDisplay();this._clearAssessmentPane();this._stopLiveEditorOnlyLayout()},_startLiveEditorOnlyLayout:function(){var a=this;a.uiContainer.set("layout",r.LIVE_EDITOR);this._uiContainerListener=this.uiContainer.on(q.CHILD_ADDED,function(){a.uiContainer.set("layout",r.LIVE_EDITOR)})},_stopLiveEditorOnlyLayout:function(){this._uiContainerListener&&this._uiContainerListener.remove()},_createResetDialog:function(b){var c=
this,d,e,f,g;d=new p({id:"academyinteractions-reset",title:v.resetTitle,onCancel:function(){d.destroy()}});g=a.create("div");a.create("div",{"class":"mainText",innerHTML:v.resetMsg},g,"last");e=a.create("div",null,g,"last");f=a.create("div",null,g,"last");new n({label:v.resetText,onClick:function(){c.liveEditorTaskService.resetToLastRestorePoint(b);d.destroy()}},e);new n({label:v.cancelText,onClick:function(){d.destroy()}},f);d.set("content",g);d.show()},_openScriptSolution:function(a){this.liveEditorTaskService.openSolutionFile(a)},
_updateAssessmentResults:function(a){var c;this._clearAssessmentPane();a=this.interactionModule.getWidgetForTask(a);this.interactionService.responseState!==this.interactionService.RESPONSE_STATES.NOT_AVAILABLE&&(this.assessmentPane=new m({"class":"assessmentPane"}),c=new t({task:this.interactionService.currentTask}),this.assessmentPane.addChild(c),a.addWidget(this.assessmentPane),b.set(this.assessmentPane.domNode,"opacity",0),f.fadeIn({node:this.assessmentPane.domNode}).play())},_clearAssessmentPane:function(){this.assessmentPane&&
this.assessmentPane.destroy()},_clearEvaluatingSubmissionDisplay:function(){this._evaluatingSubmissionMessage&&this._evaluatingSubmissionMessage.destroy()},_updateEvaluatingSubmissionDisplay:function(c){c=this.interactionModule.getWidgetForTask(c);var d=(new u).spin();this._clearEvaluatingSubmissionDisplay();this.interactionService.interactionState===this.interactionService.INTERACTION_STATES.EVALUATING_SUBMISSION&&(this._evaluatingSubmissionMessage=new m({"class":"evaluatingSubmission"}),a.place(d.el,
this._evaluatingSubmissionMessage.domNode,"last"),c.addWidget(this._evaluatingSubmissionMessage),b.set(this._evaluatingSubmissionMessage.domNode,"opacity",0),f.fadeIn({node:this._evaluatingSubmissionMessage.domNode}).play())}})})},"academyinteractions/serviceShims/FeedbackServiceShim":function(){define(["dojo/_base/declare","mw-log/Log"],function(g,f){return g([],{constructor:function(e){var d=this;this.feedbackService=e.feedbackService;this.feedbackService._submitFeedback?(this.feedbackService._shadowedSubmitFeedback=
this.feedbackService._submitFeedback,this.feedbackService._submitFeedback=function(b,a,c){d._submitFeedbackShim(b,a,c)}):f.warn("Feedback service no longer contains _submitFeedback method.")},_submitFeedbackShim:function(e,d,b){b.TYPE="matlab-academy";b.URL=window.location.href;this.feedbackService._shadowedSubmitFeedback(e,d,b)}})})},"academyinteractions/modules/academyLifecycle/index":function(){define(["dojo/Deferred"],function(g){return{initialize:function(f){f=new g;f.resolve({exports:{applicationLifecycle:{}}});
return f.promise}}})},"MOTW/modules/bootstrapService/index":function(){define(["dojo/on","dojo/Deferred","dojo/aspect","dojo/_base/lang","MOTW/motw/MotwApp"],function(g,f,e,d,b){return{initialize:function(a){var b=new f;a.iframeMessageService.start();a.iframeMessageService.postMessage("ready",!0);b.resolve({exports:{bootstrapService:{}}});return b.promise}}})},"url:dijit/templates/TooltipDialog.html":'\x3cdiv role\x3d"alertdialog" tabIndex\x3d"-1"\x3e\n\t\x3cdiv class\x3d"dijitTooltipContainer" role\x3d"presentation"\x3e\n\t\t\x3cdiv data-dojo-attach-point\x3d"contentsNode" class\x3d"dijitTooltipContents dijitTooltipFocusNode"\x3e\n\t\t\t\x3cdiv data-dojo-attach-point\x3d"containerNode"\x3e\x3c/div\x3e\n\t\t\t${!actionBarTemplate}\n\t\t\x3c/div\x3e\n\t\x3c/div\x3e\n\t\x3cdiv class\x3d"dijitTooltipConnector" role\x3d"presentation" data-dojo-attach-point\x3d"connectorNode"\x3e\x3c/div\x3e\n\x3c/div\x3e\n',
"url:dijit/form/templates/DropDownButton.html":'\x3cspan class\x3d"dijit dijitReset dijitInline"\n\t\x3e\x3cspan class\x3d\'dijitReset dijitInline dijitButtonNode\'\n\t\tdata-dojo-attach-event\x3d"ondijitclick:__onClick" data-dojo-attach-point\x3d"_buttonNode"\n\t\t\x3e\x3cspan class\x3d"dijitReset dijitStretch dijitButtonContents"\n\t\t\tdata-dojo-attach-point\x3d"focusNode,titleNode,_arrowWrapperNode,_popupStateNode"\n\t\t\trole\x3d"button" aria-haspopup\x3d"true" aria-labelledby\x3d"${id}_label"\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitIcon"\n\t\t\t\tdata-dojo-attach-point\x3d"iconNode"\n\t\t\t\x3e\x3c/span\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitButtonText"\n\t\t\t\tdata-dojo-attach-point\x3d"containerNode"\n\t\t\t\tid\x3d"${id}_label"\n\t\t\t\x3e\x3c/span\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitArrowButtonInner"\x3e\x3c/span\n\t\t\t\x3e\x3cspan class\x3d"dijitReset dijitInline dijitArrowButtonChar"\x3e\x26#9660;\x3c/span\n\t\t\x3e\x3c/span\n\t\x3e\x3c/span\n\t\x3e\x3cinput ${!nameAttrSetting} type\x3d"${type}" value\x3d"${value}" class\x3d"dijitOffScreen" tabIndex\x3d"-1"\n\t\tdata-dojo-attach-event\x3d"onclick:_onClick" data-dojo-attach-point\x3d"valueNode" aria-hidden\x3d"true"\n/\x3e\x3c/span\x3e\n',
"url:dijit/form/templates/ComboButton.html":'\x3ctable class\x3d"dijit dijitReset dijitInline dijitLeft"\n\tcellspacing\x3d\'0\' cellpadding\x3d\'0\' role\x3d"presentation"\n\t\x3e\x3ctbody role\x3d"presentation"\x3e\x3ctr role\x3d"presentation"\n\t\t\x3e\x3ctd class\x3d"dijitReset dijitStretch dijitButtonNode" data-dojo-attach-point\x3d"buttonNode" data-dojo-attach-event\x3d"ondijitclick:__onClick,onkeydown:_onButtonKeyDown"\n\t\t\x3e\x3cdiv id\x3d"${id}_button" class\x3d"dijitReset dijitButtonContents"\n\t\t\tdata-dojo-attach-point\x3d"titleNode"\n\t\t\trole\x3d"button" aria-labelledby\x3d"${id}_label"\n\t\t\t\x3e\x3cdiv class\x3d"dijitReset dijitInline dijitIcon" data-dojo-attach-point\x3d"iconNode" role\x3d"presentation"\x3e\x3c/div\n\t\t\t\x3e\x3cdiv class\x3d"dijitReset dijitInline dijitButtonText" id\x3d"${id}_label" data-dojo-attach-point\x3d"containerNode" role\x3d"presentation"\x3e\x3c/div\n\t\t\x3e\x3c/div\n\t\t\x3e\x3c/td\n\t\t\x3e\x3ctd id\x3d"${id}_arrow" class\x3d\'dijitReset dijitRight dijitButtonNode dijitArrowButton\'\n\t\t\tdata-dojo-attach-point\x3d"_popupStateNode,focusNode,_buttonNode"\n\t\t\tdata-dojo-attach-event\x3d"onkeydown:_onArrowKeyDown"\n\t\t\ttitle\x3d"${optionsTitle}"\n\t\t\trole\x3d"button" aria-haspopup\x3d"true"\n\t\t\t\x3e\x3cdiv class\x3d"dijitReset dijitArrowButtonInner" role\x3d"presentation"\x3e\x3c/div\n\t\t\t\x3e\x3cdiv class\x3d"dijitReset dijitArrowButtonChar" role\x3d"presentation"\x3e\x26#9660;\x3c/div\n\t\t\x3e\x3c/td\n\t\t\x3e\x3ctd style\x3d"display:none !important;"\n\t\t\t\x3e\x3cinput ${!nameAttrSetting} type\x3d"${type}" value\x3d"${value}" data-dojo-attach-point\x3d"valueNode"\n\t\t\t\tclass\x3d"dijitOffScreen" aria-hidden\x3d"true" data-dojo-attach-event\x3d"onclick:_onClick"\n\t\t/\x3e\x3c/td\x3e\x3c/tr\x3e\x3c/tbody\n\x3e\x3c/table\x3e\n',
"url:dijit/templates/CheckedMenuItem.html":'\x3ctr class\x3d"dijitReset" data-dojo-attach-point\x3d"focusNode" role\x3d"${role}" tabIndex\x3d"-1" aria-checked\x3d"${checked}"\x3e\n\t\x3ctd class\x3d"dijitReset dijitMenuItemIconCell" role\x3d"presentation"\x3e\n\t\t\x3cspan class\x3d"dijitInline dijitIcon dijitMenuItemIcon dijitCheckedMenuItemIcon" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/span\x3e\n\t\t\x3cspan class\x3d"dijitMenuItemIconChar dijitCheckedMenuItemIconChar"\x3e${!checkedChar}\x3c/span\x3e\n\t\x3c/td\x3e\n\t\x3ctd class\x3d"dijitReset dijitMenuItemLabel" colspan\x3d"2" data-dojo-attach-point\x3d"containerNode,labelNode,textDirNode"\x3e\x3c/td\x3e\n\t\x3ctd class\x3d"dijitReset dijitMenuItemAccelKey" style\x3d"display: none" data-dojo-attach-point\x3d"accelKeyNode"\x3e\x3c/td\x3e\n\t\x3ctd class\x3d"dijitReset dijitMenuArrowCell" role\x3d"presentation"\x3e\x26#160;\x3c/td\x3e\n\x3c/tr\x3e\n',
"url:dijit/templates/MenuSeparator.html":'\x3ctr class\x3d"dijitMenuSeparator" role\x3d"separator"\x3e\n\t\x3ctd class\x3d"dijitMenuSeparatorIconCell"\x3e\n\t\t\x3cdiv class\x3d"dijitMenuSeparatorTop"\x3e\x3c/div\x3e\n\t\t\x3cdiv class\x3d"dijitMenuSeparatorBottom"\x3e\x3c/div\x3e\n\t\x3c/td\x3e\n\t\x3ctd colspan\x3d"3" class\x3d"dijitMenuSeparatorLabelCell"\x3e\n\t\t\x3cdiv class\x3d"dijitMenuSeparatorTop dijitMenuSeparatorLabel"\x3e\x3c/div\x3e\n\t\t\x3cdiv class\x3d"dijitMenuSeparatorBottom"\x3e\x3c/div\x3e\n\t\x3c/td\x3e\n\x3c/tr\x3e\n',
"url:variableeditor/views/SummaryBar.html":'\x3cdiv class\x3d"summaryBar" data-dojo-attach-point\x3d"summaryBarOuterContainer"\x3e\n    \x3cdiv class\x3d"summaryBarContainer"\x3e\n        \x3cdiv class\x3d"summaryBarIcon"\x3e\x3c/div\x3e\n        \x3cdiv class\x3d"summaryBarSize"\x3e${size}\x3c/div\x3e\n        \x3cdiv class\x3d"summaryBarLink" data-dojo-attach-point\x3d"summaryBarLink"\x3e\x3ca class\x3d"summaryBarRef" href\x3d"#"\x3e${type}\x3c/a\x3e\x3c/div\x3e\n        \x3cdiv class\x3d"summaryBarSecondaryType"\x3e${secondaryType}\x3c/div\x3e\n        \x3cdiv class\x3d"summaryBarStatus"\x3e${status}\x3c/div\x3e\n        \x3cdiv class\x3d"summaryBarStatusLink" data-dojo-attach-point\x3d"summaryBarStatusLink"\x3e\x3ca class\x3d"summaryBarStatusRef" href\x3d"#"\x3e${status}\x3c/a\x3e\x3c/div\x3e\n    \x3c/div\x3e\n\x3c/div\x3e',
"url:variableeditor/ClientPeerDocument.html":'\x3cdiv class\x3d"clientPeerDocument" data-dojo-attach-point\x3d"clientPeerDocumentContainer"\x3e\n    \x3cdiv class\x3d"summaryBarDiv"\x3e\x3c/div\x3e\n    \x3cdiv class\x3d"clientPeerViewDiv"\x3e\x3c/div\x3e\n\x3c/div\x3e\n',"url:workspacebrowser/UploadWidget.html":'\x3cdiv class\x3d"filesUpload"\x3e\n\n    \x3cdiv class\x3d"uploadMessage" data-dojo-attach-point\x3d"message"\x3e\x3c/div\x3e\n    \x3ciframe class\x3d"iframe" data-dojo-attach-point\x3d"iframe"\x3e\x3c/iframe\x3e\n\n    \x3cdiv class\x3d"filesUploadProgressBar" data-dojo-attach-point\x3d"progressBarContainer"\x3e\n        \x3cdiv class\x3d"uploadProgressBar" data-dojo-attach-point\x3d"progressBar"\x3e\x3c/div\x3e\n    \x3c/div\x3e\n\n\x3c/div\x3e',
"url:dijit/form/templates/TextBox.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline dijitLeft" id\x3d"widget_${id}" role\x3d"presentation"\n\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitInputContainer"\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputInner" data-dojo-attach-point\x3d\'textbox,focusNode\' autocomplete\x3d"off"\n\t\t\t${!nameAttrSetting} type\x3d\'${type}\'\n\t/\x3e\x3c/div\n\x3e\x3c/div\x3e\n',"url:dijit/form/templates/ValidationTextBox.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline dijitLeft"\n\tid\x3d"widget_${id}" role\x3d"presentation"\n\t\x3e\x3cdiv class\x3d\'dijitReset dijitValidationContainer\'\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value\x3d"\x26#935; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\n\t/\x3e\x3c/div\n\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitInputContainer"\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputInner" data-dojo-attach-point\x3d\'textbox,focusNode\' autocomplete\x3d"off"\n\t\t\t${!nameAttrSetting} type\x3d\'${type}\'\n\t/\x3e\x3c/div\n\x3e\x3c/div\x3e\n',
"url:dijit/form/templates/DropDownBox.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline dijitLeft"\n\tid\x3d"widget_${id}"\n\trole\x3d"combobox"\n\taria-haspopup\x3d"true"\n\tdata-dojo-attach-point\x3d"_popupStateNode"\n\t\x3e\x3cdiv class\x3d\'dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer\'\n\t\tdata-dojo-attach-point\x3d"_buttonNode" role\x3d"presentation"\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitArrowButtonInner" value\x3d"\x26#9660; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"button presentation" aria-hidden\x3d"true"\n\t\t\t${_buttonInputDisabled}\n\t/\x3e\x3c/div\n\t\x3e\x3cdiv class\x3d\'dijitReset dijitValidationContainer\'\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value\x3d"\x26#935; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\n\t/\x3e\x3c/div\n\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitInputContainer"\n\t\t\x3e\x3cinput class\x3d\'dijitReset dijitInputInner\' ${!nameAttrSetting} type\x3d"${type}" autocomplete\x3d"off"\n\t\t\tdata-dojo-attach-point\x3d"textbox,focusNode" role\x3d"textbox"\n\t/\x3e\x3c/div\n\x3e\x3c/div\x3e\n',
"url:variableeditor/views/editors/templates/binaryToggleButtonEditor.html":'\x3cdiv class\x3d"binaryToggleButtonEditor" data-dojo-attach-point\x3d"binaryToggleButtonEditor" data-tag\x3d"datatools.variableeditor.views.editors.binaryToggleButtonEditor"\x3e\x3c/div\x3e\n',"url:variableeditor/views/editors/templates/toggleButtonGroupEditor.html":'\x3cdiv class\x3d"toggleButtonGroupEditor" data-dojo-attach-point\x3d"toggleButtonGroupEditor" data-tag\x3d"datatools.variableeditor.views.editors.toggleButtonGroupEditor"\x3e\x3c/div\x3e\n',
"url:variableeditor/views/editors/templates/ColorEditor.html":'\x3cdiv class\x3d"colorEditor" data-dojo-attach-point\x3d"colorEditor" data-tag\x3d"datatools.variableeditor.views.editors.colorEditor"\x3e\x3c/div\x3e\n',"url:variableeditor/views/editors/templates/ColorTextBoxEditor.html":'\x3cdiv class\x3d"colorTextBoxEditor" data-dojo-attach-point\x3d"colorTextBoxEditor" data-tag\x3d"datatools.variableeditor.views.editors.colorTextBoxEditor"\x3e\n    \x3cdiv class\x3d"colorValue" data-datatools-renderer-attach-point\x3d"colorValue" data-tag\x3d"datatools.variableeditor.views.editors.colorTextBoxEditor.colorValue"\x3e\x3c/div\x3e\n\x3c/div\x3e\n',
"url:variableeditor/views/renderers/templates/ColorOrderRenderer.html":'\x3cdiv class\x3d"colorOrderRenderer" data-dojo-attach-point\x3d"colorOrderRenderer" data-tag\x3d"datatools.variableeditor.views.renderers.colorOrderRenderer"\x3e\n    \x3cdiv class\x3d"colorSwatch" data-datatools-renderer-attach-point\x3d"colorSwatch" data-tag\x3d"datatools.variableeditor.views.renderers.colorOrderRenderer.colorSwatch"\x3e\x3c/div\x3e\n\x3c/div\x3e',"url:variableeditor/views/editors/templates/ColormapEditor.html":'\x3cdiv class\x3d"colormapEditor" data-tag\x3d"datatools.variableeditor.views.editors.ColormapEditor"\x3e\x3c/div\x3e',
"url:variableeditor/views/editors/templates/ColorDropDownEditor.html":'\x3cdiv class\x3d"colorDropDownEditor" data-tag\x3d"datatools.variableeditor.views.editors.colorDropDownEditor"\x3e\x3c/div\x3e\n',"url:variableeditor/views/editors/templates/RGBColorEditor.html":'\x3cdiv class\x3d"rgbColorEditor colorEditorWithTextBox" data-dojo-attach-point\x3d"rgbColorEditor" data-tag\x3d"datatools.variableeditor.views.editors.rgbColorEditor"\x3e\x3c/div\x3e\n',"url:variableeditor/views/editors/templates/ColorOrderEditor.html":'\x3cdiv class\x3d"colorOrderEditor" data-dojo-attach-point\x3d"colorOrderEditor" data-tag\x3d"datatools.variableeditor.views.editors.colorOrderEditor"\x3e\n    \x3cdiv class\x3d"colorOrderRendererDiv" data-datatools-renderer-attach-point\x3d"colorOrderRendererDiv" data-tag\x3d"datatools.variableeditor.views.editors.colorOrderEditor.colorOrderRendererDiv"\x3e\x3c/div\x3e\n    \x3cdiv class\x3d"colorListDiv" data-datatools-renderer-attach-point\x3d"colorListDiv" data-tag\x3d"datatools.variableeditor.views.editors.colorOrderEditor.colorListDiv"\x3e\n        \x3cul class\x3d"colorList container" data-datatools-renderer-attach-point\x3d"colorList" data-tag\x3d"datatools.variableeditor.views.editors.colorOrderEditor.colorList"\x3e\n        \x3c/ul\x3e\n    \x3c/div\x3e\n    \x3cdiv class\x3d"buttonPanel" data-datatools-renderer-attach-point\x3d"buttonPanel" data-tag\x3d"datatools.variableeditor.views.editors.colorOrderEditor.buttonPanel"\x3e\n        \x3cbutton type\x3d"button" class\x3d"colorAddButton" data-datatools-renderer-attach-point\x3d"colorAddButton" data-tag\x3d"datatools.variableeditor.views.editors.colorOrderEditor.colorAddButton"\x3e${AddNewLabel}\x3c/button\x3e\n    \x3c/div\x3e\n\x3c/div\x3e',
"url:variableeditor/views/editors/templates/FilePickerEditor.html":'\x3cdiv class\x3d"filePickerEditor cellRenderer" data-tag\x3d"datatools.variableeditor.views.editors.FilePickerEditor"\x3e\x3c/div\x3e',"url:variableeditor/views/table/DefaultHeaderTemplate.html":'\x3cdiv class\x3d"variableEditorHeaders" data-dojo-attach-point\x3d"variableEditorHeaders" data-tag\x3d"datatools.variableeditor.views.table.variableEditorHeaders"\x3e\n    \x3cdiv class\x3d"cell"\x3e\n        \x3cdiv class\x3d"Index"  style\x3d"display: none;" data-datatools-renderer-attach-point\x3d"headerIndex"\x3e\x3c/div\x3e\n        \x3cdiv class\x3d"Label"  style\x3d"display: none;"  data-datatools-renderer-attach-point\x3d"headerLabel"\x3e\x3c/div\x3e\n    \x3c/div\x3e\n\x3c/div\x3e',
"url:variableeditor/views/table/VariableEditorColumnHeader.html":'\x3cdiv class\x3d"cell column variableEditorColumnHeaders" data-datatools-renderer-attach-point\x3d"variableEditorColumnHeaders" data-tag\x3d"datatools.variableeditor.views.table.variableEditorColumnHeaders"\x3e\n    \x3cdiv class\x3d"header cell"\x3e\n        \x3cdiv class\x3d"columnIndex" style\x3d"display: none;" data-datatools-renderer-attach-point\x3d"headerIndex"\x3e\x3c/div\x3e\n        \x3cbr class\x3d"lineBreak" style\x3d"display: none;" data-datatools-renderer-attach-point\x3d"lineBreak"\x3e\n        \x3cdiv class\x3d"columnLabel" style\x3d"display: none;" data-datatools-renderer-attach-point\x3d"headerLabel"\x3e\x3c/div\x3e\n    \x3c/div\x3e\n    \x3cdiv class\x3d"drag" style\x3d"cursor: ew-resize;" data-datatools-renderer-attach-point\x3d"ColumnHeaderDrag"\x3e\n        \x3cdiv class\x3d"firstHalfOfDrag"\x3e\x3c/div\x3e\n        \x3cdiv class\x3d"dragBorder"\x3e\x3c/div\x3e\n        \x3cdiv class\x3d"secondHalfOfDrag"\x3e\x3c/div\x3e\n    \x3c/div\x3e\n\x3c/div\x3e',
"url:variableeditor/views/table/VariableEditorRowHeader.html":'\x3cdiv class\x3d"row variableEditorRowHeaders" data-datatools-renderer-attach-point\x3d"variableEditorRowHeaders" data-tag\x3d"datatools.variableeditor.views.table.variableEditorRowHeaders"\x3e\n    \x3cdiv class\x3d"cell" data-tag\x3d"datatools.variableeditor.views.table.variableEditorRowHeaders.cell"\x3e\n        \x3cdiv class\x3d"rowIndex"  style\x3d"display: none;" data-datatools-renderer-attach-point\x3d"headerIndex"\x3e\x3c/div\x3e\n        \x3cdiv class\x3d"rowLabel"  style\x3d"display: none;"  data-datatools-renderer-attach-point\x3d"headerLabel"\x3e\x3c/div\x3e\n    \x3c/div\x3e\n\x3c/div\x3e',
"url:variableeditor/views/table/VariableEditorTemplate.html":'\x3cdiv class\x3d"mw_type_Table mw_type_TableBase mw_type_ListBase"\x3e\n    \x3cdiv class\x3d"header nospacing preventDragSelection topHeaderWrapper"\x3e\n        \x3cdiv class\x3d"inline row cornerSpacer rowHeaderColumn rowHeadersWrapper topRowHeaderWrapper" data-dojo-attach-point\x3d"cornerSpacerNode"\x3e\n            \x3cdiv class\x3d"row cell"\x3e\x3c/div\x3e\n        \x3c/div\x3e\n        \x3cdiv class\x3d"inline wrapper headerWrapper"\x3e\n            \x3cdiv class\x3d"inline scrolled dataColumn columnHeaderScrollerNode" data-dojo-attach-point\x3d"columnHeaderScrollerNode"\x3e\n                \x3cdiv class\x3d"row dataWidth spacer columnHeaderNode" data-dojo-attach-point\x3d"columnHeaderNode"\x3e\n                    \x3cdiv class\x3d"cell spacer leftSpacer"\x3e\x3c/div\x3e\n                    \x3cdiv class\x3d"cell spacer rightSpacer"\x3e\x3c/div\x3e\n                \x3c/div\x3e\n            \x3c/div\x3e\n        \x3c/div\x3e\n        \x3cdiv class\x3d"inline row cornerSpacer verticalScrollSpacer"\x3e\x3c/div\x3e\n    \x3c/div\x3e\n    \x3cdiv class\x3d"body nospacing"\x3e\n        \x3cdiv class\x3d"inline wrapper rowHeadersWrapper preventDragSelection bottomRowHeaderWrapper"\x3e\n            \x3cdiv class\x3d"scrolled dataRow rowHeaderColumn rowHeaders rowHeaderScrollerNode" data-dojo-attach-point\x3d"rowHeaderScrollerNode"\x3e\n                \x3cdiv class\x3d"dataHeight spacer rowHeaderNode" data-dojo-attach-point\x3d"rowHeaderNode"\x3e\n                    \x3cdiv class\x3d"row spacer topSpacer"\x3e\x3c/div\x3e\n                    \x3cdiv class\x3d"spacer bottomSpacer"\x3e\x3c/div\x3e\n                \x3c/div\x3e\n            \x3c/div\x3e\n            \x3cdiv class\x3d"cornerSpacer horizontalScrollSpacer rowHeaderColumn"\x3e\x3c/div\x3e\n        \x3c/div\x3e\n        \x3cdiv class\x3d"inline wrapper dataBodyWrapper"\x3e\n            \x3cdiv class\x3d"scroller dataRow dataColumn dataScrollerNode" data-dojo-attach-point\x3d"dataScrollerNode"\x3e\n                \x3cdiv class\x3d"dataWidth dataHeight spacer dataBody" data-dojo-attach-point\x3d"dataNode"\x3e\n                    \x3cdiv class\x3d"row spacer topSpacer"\x3e\x3c/div\x3e\n                    \x3cdiv class\x3d"spacer bottomSpacer"\x3e\x3c/div\x3e\n                \x3c/div\x3e\n            \x3c/div\x3e\n        \x3c/div\x3e\n    \x3c/div\x3e\n    \x3cdiv class\x3d"columnResizer" data-dojo-attach-point\x3d"columnResizerNode"\x3e\x3c/div\x3e\n    \x3cdiv class\x3d"loading"\x3e\x3c/div\x3e\n\x3c/div\x3e\n',
"url:MOTW/dialog/NewFileFolderTemplate.html":'\x3cdiv class\x3d"fileFolderDialog" data-dojo-attach-event\x3d"onkeyup:onTextKeyup" data-testid\x3d"newFileFolderDialog"\x3e\n\n    \x3cdiv  class\x3d"input-row"\x3e\n        \x3clabel data-dojo-attach-point\x3d"nameInputLabel" for\x3d"name"\x3e\x3c/label\x3e\n        \x3cinput tabindex\x3d"0" data-dojo-attach-point\x3d"inputBox"\n              data-dojo-type\x3d"mw-form/TextField"\n              data-dojo-props\x3d"width:260"\n              data-dojo-attach-event\x3d"typing:onTyping"\n              id\x3d"name" data-testid\x3d"newFileFolderInput"/\x3e\n    \x3c/div\x3e\n\n    \x3cdiv class\x3d"actionButton"\n                data-dojo-type\x3d"mw-form/PushButton"\n                data-dojo-props\x3d"text: \'${_localization.cancel}\'"\n                data-dojo-attach-point\x3d"cancelButton"\n                data-dojo-attach-event\x3d"click:_doCancelAction"\n\t\t\t\tdata-testid\x3d"newFileFolderCancelButton"\x3e\n    \x3c/div\x3e\n\n    \x3cdiv class\x3d"actionButton"\n                data-dojo-type\x3d"mw-form/PushButton" style\x3d"padding: 2px 34px"\n                data-dojo-props\x3d"text: \'${_localization.ok}\'"\n                data-dojo-attach-point\x3d"okButton"\n                data-dojo-attach-event\x3d"click:_doOkAction"\n\t\t\t\tdata-testid\x3d"newFileFolderOkButton"\x3e\n    \x3c/div\x3e\n\n\x3c/div\x3e\n',
"url:MOTW/dialog/SaveAsTemplate.html":'\x3cdiv class\x3d"saveAsDialog" data-dojo-attach-event\x3d"onkeyup:onTextKeyup" data-testid\x3d"saveAsDialog"\x3e\n    \x3cdiv  class\x3d"input-row"\x3e\n        \x3clabel data-dojo-attach-point\x3d\'nameInputLabel\' for\x3d"name"\x3e\x3c/label\x3e\n        \x3cinput tabindex\x3d"0" data-dojo-attach-point\x3d\'inputBox\'\n              data-dojo-attach-event\x3d"typing:updateButtons"\n              data-dojo-props\x3d"width:260"\n              data-dojo-type\x3d"mw-form/TextField" id\x3d"name"/\x3e\n    \x3c/div\x3e\n    \x3c!-- div class\x3d"input-row"\x3e\n        \x3clabel dojoAttachPoint\x3d\'typeLabel\' for\x3d"typeSelection"\x3e\x3c/label\x3e\n        \x3cdiv dojoAttachPoint\x3d\'saveAsOptions\' id\x3d\'typeSelection\'  \x3e\x3c/div\x3e\n    \x3c/div--\x3e\n    \x3cdiv class\x3d"saveAsButton"\n         data-dojo-type\x3d"mw-form/PushButton"\n         data-dojo-props\x3d"text: \'${_localization.cancel}\'"\n         data-dojo-attach-event\x3d"click:cancelAction"\n         data-dojo-attach-point\x3d"cancelButton"\n\t\t data-testId\x3d"saveAsCancelButton"\x3e\x3c/div\x3e\n    \x3cdiv class\x3d"saveAsButton" style\x3d"padding: 2px 34px"\n         data-dojo-type\x3d"mw-form/PushButton"\n         data-dojo-props\x3d"text:\'${_localization.ok}\'"\n         data-dojo-attach-event\x3d"click:okAction"\n         data-dojo-attach-point\x3d"okButton"\n\t\t data-testId\x3d"saveAsOkButton"\x3e\x3c/div\x3e\n\x3c/div\x3e',
"url:MOTW/dialog/SpecifyNewFilenameTemplate.html":'\x3cdiv class\x3d"specifyNewFilenameDialog"\x3e\n    \x3cdiv class\x3d"filenameTitle"\x3e\x3c/div\x3e\n    \x3cdiv class\x3d"filenameDesc"\x3e\x3c/div\x3e\n    \x3cdiv class\x3d"fileInputRow"\x3e\n        \x3cspan class\x3d"filenameTextField"\x3e\x3c/span\x3e\n        \x3cspan class\x3d"fileExtension"\x3e\x3c/span\x3e\n    \x3c/div\x3e\n    \x3cdiv class\x3d"filenameErr"\x3e\x3c/div\x3e\n\x3c/div\x3e\n',"url:MOTW/motw/about.html":'\x3cdiv class\x3d"motw-about"\x3e\n\t\x3cdiv class\x3d"motw-versionInfo"\x3e\n\t\t\x3cdiv class\x3d"motw-matlabVersion"\x3e$matlabVersion$\x3c/div\x3e\n    \t\x3cdiv class\x3d"motw-versionText"\x3e$versionText$ $versionNumber$\x3c/div\x3e\n    \t\x3cdiv class\x3d"motw-buildInfo"\x3e$buildInfo$\x3c/div\x3e\n    \x3c/div\x3e\n    \x3cdiv class\x3d"motw-legalInfo"\x3e$legalInfo$\x3c/div\x3e\n\x3c/div\x3e\n',
"url:matlab_preferences/preferencesUI/widgets/templates/PreferenceUI.html":'\x3cdiv data-dojo-attach-point\x3d"preferenceUI"\x3e\n    \x3cdiv data-dojo-attach-point\x3d"leftPanel" class\x3d"leftPanel"\x3e\n    \x3c/div\x3e\n    \x3cdiv data-dojo-attach-point\x3d"centerPanel" class\x3d"centerPanel"\x3e\n    \x3c/div\x3e\n\x3c/div\x3e\n',"url:matlab_preferences/preferencesUI/widgets/templates/preferenceTree.html":'\x3cdiv class\x3d"leftPane"\x3e\n    \x3cdiv class\x3d"searchContainer preferenceSearchContainer" data-dojo-attach-point\x3d"searchContainer"\x3e\n\n    \x3c/div\x3e\n    \x3cdiv class\x3d"gridContainer" data-dojo-attach-point\x3d"gridContainer"\x3e\n\n    \x3c/div\x3e\n\n    \x3cdiv class\x3d"emptyGrid" data-dojo-attach-point\x3d"emptyGrid"\x3e\n    \x3c/div\x3e\n\x3c/div\x3e',
"url:MW/feedbackdialog/templates/FeedbackWithEmailContentTemplate.html":'\x3cdiv\x3e\n    \x3ch1 class\x3d"feedback-heading" data-test-id\x3d"feedback.headingLabel" data-dojo-attach-point\x3d"headingLabelNode"\x3e\x3c/h1\x3e\n    \x3cdiv class\x3d"feedback-input-row"\x3e\n        \x3cspan data-dojo-attach-point\x3d"subjectInputContainerNode"\x3e\x3c/span\x3e\n    \x3c/div\x3e\n    \x3cdiv class\x3d"feedback-input-row"\x3e\n        \x3cspan data-dojo-attach-point\x3d"feedbackInputContainerNode"\x3e\x3c/span\x3e\n        \x3cp data-test-id\x3d"feedback.feedbackBottomLabel" data-dojo-attach-point\x3d"feedbackBottomLabelNode"\x3e\x3c/p\x3e\n    \x3c/div\x3e\n    \x3cdiv class\x3d"feedback-input-row"\x3e\n        \x3cspan data-dojo-attach-point\x3d"emailInputContainerNode"\x3e\x3c/span\x3e\n        \x3cp data-test-id\x3d"feedback.emailBottomLabel" data-dojo-attach-point\x3d"emailBottomLabelNode"\x3e\x3c/p\x3e\n    \x3c/div\x3e\n\x3c/div\x3e',
"url:MW/feedbackdialog/templates/FeedbackDialogTemplate.html":'\x3cdiv data-test-id\x3d"feedback.feedbackDialog"\x3e\n    \x3cdiv class\x3d"feedback-content" data-dojo-attach-point\x3d"feedbackContentNode"\x3e\x3c/div\x3e\n    \x3cdiv class\x3d"feedback-status"\x3e\n        \x3cspan class\x3d"feedback-status-noIcon" data-test-id\x3d"feedback.statusIcon" data-dojo-attach-point\x3d"statusIconNode"\x3e\x3c/span\x3e\n        \x3cspan class\x3d"feedback-status-message" data-test-id\x3d"feedback.statusMessage" data-dojo-attach-point\x3d"statusMessageNode"\x3e\x3c/span\x3e\n    \x3c/div\x3e\n    \x3cdiv class\x3d"feedback-controls-row"\x3e\n        \x3ca href\x3d"http://www.mathworks.com/company/aboutus/policies_statements/" target\x3d"_blank"\n           data-test-id\x3d"feedback.privacyLink"\n           data-dojo-attach-point\x3d"privacyPolicyLinkNode"\x3e\n            Privacy Policy\n        \x3c/a\x3e\n        \x3cspan class\x3d"feedback-buttons" data-dojo-attach-point\x3d"buttonContainerNode"\x3e\x3c/span\x3e\n    \x3c/div\x3e\n\x3c/div\x3e',
"url:MOTW/dialog/PathUpdateTemplate.html":'\x3cdiv class\x3d"pathUpdateDialog"\x3e\n    \x3cdiv class\x3d"messageTitle"\x3e\x3c/div\x3e\n    \x3cdiv class\x3d"messageDesc"\x3e\x3c/div\x3e\n    \x3cspan class\x3d"messageDetails"\x3e\x3c/span\x3e\n\x3c/div\x3e\n',"url:MOTW/motw/motwFooter.html":'\x3cdiv class\x3d"matlabFooter"\x3e\n    \x3cdiv data-dojo-type\x3d"mw-form/PushButton"\n         data-dojo-attach-point\x3d"stopButton"\n         data-dojo-attach-event\x3d"click:stopExecution"\n         data-dojo-props\x3d"text:\'Busy\'"\n         disabled\x3d"true"\n         icon\x3d"smallBusy"\n         id\x3d"MW_FOOTER_STOP_BUTTON"\n         visibility\x3d"hidden"\x3e\n    \x3c/div\x3e\n\x3c/div\x3e',
"url:MOTW/mgg/components/clipboard.html":'\x3cdiv class\x3d"clipboard"\x3e\n    \x3cdiv class\x3d"message"\x3e${localization.clipboardMessage}\x3c/div\x3e\n    \x3ctextarea data-dojo-attach-point\x3d"textarea"\n              data-dojo-attach-event\x3d"focus:_handleFocus"\n              class\x3d"text" rows\x3d"4" cols\x3d"40" readonly\x3d"true"\x3e${text}\x3c/textarea\x3e\n\x3c/div\x3e',"url:MOTW/mgg/components/maxFiguresDialog.html":'\x3cdiv class\x3d"maxFiguresDialog"\x3e\n    \x3cdiv class\x3d"content" data-dojo-attach-point\x3d"content"\x3e\x3c/div\x3e\n    \x3cdiv class\x3d"radioButtons"\x3e\n        \x3cdiv class\x3d"radioButton"\x3e\n            \x3cinput data-dojo-type\x3d"dijit.form.RadioButton" data-dojo-attach-point\x3d"radioNone" checked name\x3d"group1" value\x3d"session" type\x3d"radio" /\x3e\n            \x3clabel data-dojo-attach-point\x3d"lblNone"\x3e\x3c/label\x3e\n        \x3c/div\x3e\n        \x3cdiv class\x3d"radioButton"\x3e\n            \x3cinput data-dojo-type\x3d"dijit.form.RadioButton" data-dojo-attach-point\x3d"radioSession" name\x3d"group1" value\x3d"session" type\x3d"radio" /\x3e\n            \x3clabel data-dojo-attach-point\x3d"lblSession"\x3e\x3c/label\x3e\n        \x3c/div\x3e\n        \x3cdiv class\x3d"radioButton"\x3e\n            \x3cinput data-dojo-type\x3d"dijit.form.RadioButton" data-dojo-attach-point\x3d"radioNever" name\x3d"group1" value\x3d"never" type\x3d"radio" /\x3e\n            \x3clabel data-dojo-attach-point\x3d"lblNever"\x3e\x3c/label\x3e\n        \x3c/div\x3e\n    \x3c/div\x3e\n\x3c/div\x3e',
"url:dijit/templates/MenuBar.html":'\x3cdiv class\x3d"dijitMenuBar dijitMenuPassive" data-dojo-attach-point\x3d"containerNode" role\x3d"menubar" tabIndex\x3d"${tabIndex}"\n\t \x3e\x3c/div\x3e\n',"url:dijit/templates/MenuBarItem.html":'\x3cdiv class\x3d"dijitReset dijitInline dijitMenuItem dijitMenuItemLabel" data-dojo-attach-point\x3d"focusNode"\n\t \trole\x3d"menuitem" tabIndex\x3d"-1"\x3e\n\t\x3cspan data-dojo-attach-point\x3d"containerNode,textDirNode"\x3e\x3c/span\x3e\n\x3c/div\x3e\n',"url:dijit/form/templates/Select.html":'\x3ctable class\x3d"dijit dijitReset dijitInline dijitLeft"\n\tdata-dojo-attach-point\x3d"_buttonNode,tableNode,focusNode,_popupStateNode" cellspacing\x3d\'0\' cellpadding\x3d\'0\'\n\trole\x3d"listbox" aria-haspopup\x3d"true"\n\t\x3e\x3ctbody role\x3d"presentation"\x3e\x3ctr role\x3d"presentation"\n\t\t\x3e\x3ctd class\x3d"dijitReset dijitStretch dijitButtonContents" role\x3d"presentation"\n\t\t\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitButtonText"  data-dojo-attach-point\x3d"containerNode,textDirNode" role\x3d"presentation"\x3e\x3c/div\n\t\t\t\x3e\x3cdiv class\x3d"dijitReset dijitValidationContainer"\n\t\t\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value\x3d"\x26#935; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\n\t\t\t/\x3e\x3c/div\n\t\t\t\x3e\x3cinput type\x3d"hidden" ${!nameAttrSetting} data-dojo-attach-point\x3d"valueNode" value\x3d"${value}" aria-hidden\x3d"true"\n\t\t/\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton dijitArrowButtonContainer"\n\t\t\tdata-dojo-attach-point\x3d"titleNode" role\x3d"presentation"\n\t\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitArrowButtonInner" value\x3d"\x26#9660; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\n\t\t\t\t${_buttonInputDisabled}\n\t\t/\x3e\x3c/td\n\t\x3e\x3c/tr\x3e\x3c/tbody\n\x3e\x3c/table\x3e\n',
"url:MOTW/mgg/components/Dropdown.html":'\x3cdiv class\x3d"dijitReset dijitButtonNode mw_type_Select"\n     data-dojo-attach-point\x3d"_buttonNode,tableNode,focusNode"\n     role\x3d"combobox" aria-haspopup\x3d"true"\x3e\n\n    \x3cspan class\x3d"dijitReset dijitButtonText"\n         data-dojo-attach-point\x3d"containerNode,_popupStateNode"\x3e\x3c/span\x3e\n\n    \x3cspan class\x3d"dijitReset dijitRight dijitButtonNode dijitArrowButton dijitDownArrowButton"\n        data-dojo-attach-point\x3d"titleNode"\x3e\n\n        \x3cdiv class\x3d"dijitReset dijitArrowButtonInner"\n            data-dojo-attach-point\x3d"arrowIcon"\x3e\x3c/div\x3e\n        \x3cdiv class\x3d"dijitReset dijitArrowButtonChar"\x3e\x26#9660;\x3c/div\x3e\n    \x3c/span\x3e\n\n    \x3cinput type\x3d"hidden" ${!nameAttrSetting} data-dojo-attach-point\x3d"valueNode" value\x3d"${value}" aria-hidden\x3d"true"\x3e\n\n\x3c/div\x3e\n',
"url:dijit/form/templates/HorizontalSlider.html":'\x3ctable class\x3d"dijit dijitReset dijitSlider dijitSliderH" cellspacing\x3d"0" cellpadding\x3d"0" border\x3d"0" rules\x3d"none" data-dojo-attach-event\x3d"onkeydown:_onKeyDown, onkeyup:_onKeyUp"\n\trole\x3d"presentation"\n\t\x3e\x3ctr class\x3d"dijitReset"\n\t\t\x3e\x3ctd class\x3d"dijitReset" colspan\x3d"2"\x3e\x3c/td\n\t\t\x3e\x3ctd data-dojo-attach-point\x3d"topDecoration" class\x3d"dijitReset dijitSliderDecoration dijitSliderDecorationT dijitSliderDecorationH"\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset" colspan\x3d"2"\x3e\x3c/td\n\t\x3e\x3c/tr\n\t\x3e\x3ctr class\x3d"dijitReset"\n\t\t\x3e\x3ctd class\x3d"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerH"\n\t\t\t\x3e\x3cdiv class\x3d"dijitSliderDecrementIconH" style\x3d"display:none" data-dojo-attach-point\x3d"decrementButton"\x3e\x3cspan class\x3d"dijitSliderButtonInner"\x3e-\x3c/span\x3e\x3c/div\n\t\t\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset"\n\t\t\t\x3e\x3cdiv class\x3d"dijitSliderBar dijitSliderBumper dijitSliderBumperH dijitSliderLeftBumper" data-dojo-attach-event\x3d"press:_onClkDecBumper"\x3e\x3c/div\n\t\t\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset"\n\t\t\t\x3e\x3cinput data-dojo-attach-point\x3d"valueNode" type\x3d"hidden" ${!nameAttrSetting}\n\t\t\t/\x3e\x3cdiv class\x3d"dijitReset dijitSliderBarContainerH" role\x3d"presentation" data-dojo-attach-point\x3d"sliderBarContainer"\n\t\t\t\t\x3e\x3cdiv role\x3d"presentation" data-dojo-attach-point\x3d"progressBar" class\x3d"dijitSliderBar dijitSliderBarH dijitSliderProgressBar dijitSliderProgressBarH" data-dojo-attach-event\x3d"press:_onBarClick"\n\t\t\t\t\t\x3e\x3cdiv class\x3d"dijitSliderMoveable dijitSliderMoveableH"\n\t\t\t\t\t\t\x3e\x3cdiv data-dojo-attach-point\x3d"sliderHandle,focusNode" class\x3d"dijitSliderImageHandle dijitSliderImageHandleH" data-dojo-attach-event\x3d"press:_onHandleClick" role\x3d"slider"\x3e\x3c/div\n\t\t\t\t\t\x3e\x3c/div\n\t\t\t\t\x3e\x3c/div\n\t\t\t\t\x3e\x3cdiv role\x3d"presentation" data-dojo-attach-point\x3d"remainingBar" class\x3d"dijitSliderBar dijitSliderBarH dijitSliderRemainingBar dijitSliderRemainingBarH" data-dojo-attach-event\x3d"press:_onBarClick"\x3e\x3c/div\n\t\t\t\x3e\x3c/div\n\t\t\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset"\n\t\t\t\x3e\x3cdiv class\x3d"dijitSliderBar dijitSliderBumper dijitSliderBumperH dijitSliderRightBumper" data-dojo-attach-event\x3d"press:_onClkIncBumper"\x3e\x3c/div\n\t\t\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerH"\n\t\t\t\x3e\x3cdiv class\x3d"dijitSliderIncrementIconH" style\x3d"display:none" data-dojo-attach-point\x3d"incrementButton"\x3e\x3cspan class\x3d"dijitSliderButtonInner"\x3e+\x3c/span\x3e\x3c/div\n\t\t\x3e\x3c/td\n\t\x3e\x3c/tr\n\t\x3e\x3ctr class\x3d"dijitReset"\n\t\t\x3e\x3ctd class\x3d"dijitReset" colspan\x3d"2"\x3e\x3c/td\n\t\t\x3e\x3ctd data-dojo-attach-point\x3d"containerNode,bottomDecoration" class\x3d"dijitReset dijitSliderDecoration dijitSliderDecorationB dijitSliderDecorationH"\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset" colspan\x3d"2"\x3e\x3c/td\n\t\x3e\x3c/tr\n\x3e\x3c/table\x3e\n',
"url:dijit/form/templates/VerticalSlider.html":'\x3ctable class\x3d"dijit dijitReset dijitSlider dijitSliderV" cellspacing\x3d"0" cellpadding\x3d"0" border\x3d"0" rules\x3d"none" data-dojo-attach-event\x3d"onkeydown:_onKeyDown,onkeyup:_onKeyUp"\n\trole\x3d"presentation"\n\t\x3e\x3ctr class\x3d"dijitReset"\n\t\t\x3e\x3ctd class\x3d"dijitReset"\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerV"\n\t\t\t\x3e\x3cdiv class\x3d"dijitSliderIncrementIconV" style\x3d"display:none" data-dojo-attach-point\x3d"decrementButton"\x3e\x3cspan class\x3d"dijitSliderButtonInner"\x3e+\x3c/span\x3e\x3c/div\n\t\t\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset"\x3e\x3c/td\n\t\x3e\x3c/tr\n\t\x3e\x3ctr class\x3d"dijitReset"\n\t\t\x3e\x3ctd class\x3d"dijitReset"\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset"\n\t\t\t\x3e\x3ccenter\x3e\x3cdiv class\x3d"dijitSliderBar dijitSliderBumper dijitSliderBumperV dijitSliderTopBumper" data-dojo-attach-event\x3d"press:_onClkIncBumper"\x3e\x3c/div\x3e\x3c/center\n\t\t\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset"\x3e\x3c/td\n\t\x3e\x3c/tr\n\t\x3e\x3ctr class\x3d"dijitReset"\n\t\t\x3e\x3ctd data-dojo-attach-point\x3d"leftDecoration" class\x3d"dijitReset dijitSliderDecoration dijitSliderDecorationL dijitSliderDecorationV"\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset dijitSliderDecorationC" style\x3d"height:100%;"\n\t\t\t\x3e\x3cinput data-dojo-attach-point\x3d"valueNode" type\x3d"hidden" ${!nameAttrSetting}\n\t\t\t/\x3e\x3ccenter class\x3d"dijitReset dijitSliderBarContainerV" role\x3d"presentation" data-dojo-attach-point\x3d"sliderBarContainer"\n\t\t\t\t\x3e\x3cdiv role\x3d"presentation" data-dojo-attach-point\x3d"remainingBar" class\x3d"dijitSliderBar dijitSliderBarV dijitSliderRemainingBar dijitSliderRemainingBarV" data-dojo-attach-event\x3d"press:_onBarClick"\x3e\x3c!--#5629--\x3e\x3c/div\n\t\t\t\t\x3e\x3cdiv role\x3d"presentation" data-dojo-attach-point\x3d"progressBar" class\x3d"dijitSliderBar dijitSliderBarV dijitSliderProgressBar dijitSliderProgressBarV" data-dojo-attach-event\x3d"press:_onBarClick"\n\t\t\t\t\t\x3e\x3cdiv class\x3d"dijitSliderMoveable dijitSliderMoveableV" style\x3d"vertical-align:top;"\n\t\t\t\t\t\t\x3e\x3cdiv data-dojo-attach-point\x3d"sliderHandle,focusNode" class\x3d"dijitSliderImageHandle dijitSliderImageHandleV" data-dojo-attach-event\x3d"press:_onHandleClick" role\x3d"slider"\x3e\x3c/div\n\t\t\t\t\t\x3e\x3c/div\n\t\t\t\t\x3e\x3c/div\n\t\t\t\x3e\x3c/center\n\t\t\x3e\x3c/td\n\t\t\x3e\x3ctd data-dojo-attach-point\x3d"containerNode,rightDecoration" class\x3d"dijitReset dijitSliderDecoration dijitSliderDecorationR dijitSliderDecorationV"\x3e\x3c/td\n\t\x3e\x3c/tr\n\t\x3e\x3ctr class\x3d"dijitReset"\n\t\t\x3e\x3ctd class\x3d"dijitReset"\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset"\n\t\t\t\x3e\x3ccenter\x3e\x3cdiv class\x3d"dijitSliderBar dijitSliderBumper dijitSliderBumperV dijitSliderBottomBumper" data-dojo-attach-event\x3d"press:_onClkDecBumper"\x3e\x3c/div\x3e\x3c/center\n\t\t\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset"\x3e\x3c/td\n\t\x3e\x3c/tr\n\t\x3e\x3ctr class\x3d"dijitReset"\n\t\t\x3e\x3ctd class\x3d"dijitReset"\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerV"\n\t\t\t\x3e\x3cdiv class\x3d"dijitSliderDecrementIconV" style\x3d"display:none" data-dojo-attach-point\x3d"incrementButton"\x3e\x3cspan class\x3d"dijitSliderButtonInner"\x3e-\x3c/span\x3e\x3c/div\n\t\t\x3e\x3c/td\n\t\t\x3e\x3ctd class\x3d"dijitReset"\x3e\x3c/td\n\t\x3e\x3c/tr\n\x3e\x3c/table\x3e\n',
"url:MOTW/mgg/components/VerticalSlider.html":'\x3cdiv class\x3d"dijit dijitReset dijitSlider dijitSliderV" data-dojo-attach-event\x3d"onkeydown:_onKeyDown,onkeyup:_onKeyUp,onmousedown:_onBarClick"\x3e\n    \x3cdiv class\x3d"dijitSliderContainer"\x3e\n        \x3cdiv class\x3d"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerV" style\x3d"display:none"\x3e\n            \x3cdiv class\x3d"dijitSliderIncrementIconV" tabIndex\x3d"-1"\n                 data-dojo-attach-point\x3d"decrementButton"\x3e\x3cspan class\x3d"dijitSliderButtonInner"\x3e+\x3c/span\x3e\n            \x3c/div\x3e\n        \x3c/div\x3e\n\n        \x3cdiv class\x3d"dijitSliderBar dijitSliderBumper dijitSliderBumperV dijitSliderTopBumper"\n             data-dojo-attach-event\x3d"onmousedown:_onClkIncBumper"\x3e\n        \x3c/div\x3e\n\n        \x3cdiv class\x3d"dijitReset outerSliderBarContainer" style\x3d"position: relative; height: 100%"\x3e\n            \x3cdiv class\x3d"dijitReset" style\x3d"height:100%; position: relative;"\x3e\n                \x3cinput data-dojo-attach-point\x3d"valueNode" type\x3d"hidden" ${!nameAttrSetting}/\x3e\n                \x3cdiv class\x3d"dijitReset dijitSliderBarContainerV" waiRole\x3d"presentation"\n                        data-dojo-attach-point\x3d"sliderBarContainer"\x3e\n                    \x3cdiv waiRole\x3d"presentation" data-dojo-attach-point\x3d"remainingBar"\n                         class\x3d"dijitSliderBar dijitSliderBarV dijitSliderRemainingBar dijitSliderRemainingBarV"\n                         data-dojo-attach-event\x3d"onmousedown:_onBarClick"\x3e\x3c!--#5629--\x3e\x3c/div\x3e\n\n                    \x3cdiv data-dojo-attach-point\x3d"sliderHandle,focusNode"\n                         class\x3d"dijitSliderImageHandle dijitSliderImageHandleV"\n                         data-dojo-attach-event\x3d"onmousedown:_onHandleClick" waiRole\x3d"slider"\n                         valuemin\x3d"${minimum}" valuemax\x3d"${maximum}"\x3e\x3c/div\x3e\n\n                    \x3cdiv waiRole\x3d"presentation" data-dojo-attach-point\x3d"progressBar"\n                         class\x3d"dijitSliderBar dijitSliderBarV dijitSliderProgressBar dijitSliderProgressBarV"\n                         data-dojo-attach-event\x3d"onmousedown:_onBarClick"\x3e\n                    \x3c/div\x3e\n                \x3c/div\x3e\n            \x3c/div\x3e\n        \x3c/div\x3e\n\n        \x3cdiv class\x3d"dijitSliderBar dijitSliderBumper dijitSliderBumperV dijitSliderBottomBumper"\n             data-dojo-attach-event\x3d"onmousedown:_onClkDecBumper"\x3e\n        \x3c/div\x3e\n\n        \x3cdiv class\x3d"dijitReset dijitSliderButtonContainer dijitSliderButtonContainerV" style\x3d"display:none"\x3e\n            \x3cdiv class\x3d"dijitSliderDecrementIconV" tabIndex\x3d"-1"\n                 data-dojo-attach-point\x3d"incrementButton"\x3e\x3cspan class\x3d"dijitSliderButtonInner"\x3e-\x3c/span\x3e\n            \x3c/div\x3e\n        \x3c/div\x3e\n    \x3c/div\x3e\n    \x3cdiv class\x3d"dijitSliderChildrenContainer" data-dojo-attach-point\x3d"containerNode"\x3e\x3c/div\x3e\n\x3c/div\x3e\n',
"url:MOTW/mgg/components/VerticalScrollBar.html":'\x3cdiv class\x3d"mw_type_VerticalScrollBar mw_type_ScrollBarBase"\x3e\n    \x3cdiv class\x3d"upButton button" data-dojo-attach-point\x3d"decrementNode"\x3e\x3c/div\x3e\x3cbr\x3e\n    \x3cdiv class\x3d"thumbContainerWrapper" data-dojo-attach-point\x3d"thumbContainerWrapperNode"\x3e\n        \x3cdiv class\x3d"thumbContainer" data-dojo-attach-point\x3d"thumbContainerNode"\x3e\n            \x3cdiv class\x3d"thumb button" data-dojo-attach-point\x3d"thumbNode" data-dojo-attach-event\x3d"mousedown:onThumbDown"\x3e\x3c/div\x3e\n        \x3c/div\x3e\n    \x3c/div\x3e\x3cbr\x3e\n    \x3cdiv class\x3d"downButton button" data-dojo-attach-point\x3d"incrementNode"\x3e\x3c/div\x3e\n\x3c/div\x3e\n',
"url:MOTW/mgg/components/HorizontalScrollBar.html":'\x3cdiv class\x3d"mw_type_HorizontalScrollBar mw_type_ScrollBarBase"\x3e\n    \x3cdiv class\x3d"leftButton button" data-dojo-attach-point\x3d"decrementNode"\x3e\x3c/div\x3e\n    \x3cdiv class\x3d"thumbContainerWrapper" data-dojo-attach-point\x3d"thumbContainerWrapperNode"\x3e\n        \x3cdiv class\x3d"thumbContainer" data-dojo-attach-point\x3d"thumbContainerNode"\x3e\n            \x3cdiv class\x3d"thumb button" data-dojo-attach-point\x3d"thumbNode" data-dojo-attach-event\x3d"mousedown:onThumbDown"\x3e\x3c/div\x3e\n        \x3c/div\x3e\n    \x3c/div\x3e\n    \x3cdiv class\x3d"rightButton button" data-dojo-attach-point\x3d"incrementNode"\x3e\x3c/div\x3e\n\x3c/div\x3e',
"url:dijit/form/templates/Spinner.html":'\x3cdiv class\x3d"dijit dijitReset dijitInline dijitLeft"\n\tid\x3d"widget_${id}" role\x3d"presentation"\n\t\x3e\x3cdiv class\x3d"dijitReset dijitButtonNode dijitSpinnerButtonContainer"\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitSpinnerButtonInner" type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\n\t\t/\x3e\x3cdiv class\x3d"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitUpArrowButton"\n\t\t\tdata-dojo-attach-point\x3d"upArrowNode"\n\t\t\t\x3e\x3cdiv class\x3d"dijitArrowButtonInner"\n\t\t\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField" value\x3d"\x26#9650; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\n\t\t\t\t\t${_buttonInputDisabled}\n\t\t\t/\x3e\x3c/div\n\t\t\x3e\x3c/div\n\t\t\x3e\x3cdiv class\x3d"dijitReset dijitLeft dijitButtonNode dijitArrowButton dijitDownArrowButton"\n\t\t\tdata-dojo-attach-point\x3d"downArrowNode"\n\t\t\t\x3e\x3cdiv class\x3d"dijitArrowButtonInner"\n\t\t\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField" value\x3d"\x26#9660; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\n\t\t\t\t\t${_buttonInputDisabled}\n\t\t\t/\x3e\x3c/div\n\t\t\x3e\x3c/div\n\t\x3e\x3c/div\n\t\x3e\x3cdiv class\x3d\'dijitReset dijitValidationContainer\'\n\t\t\x3e\x3cinput class\x3d"dijitReset dijitInputField dijitValidationIcon dijitValidationInner" value\x3d"\x26#935; " type\x3d"text" tabIndex\x3d"-1" readonly\x3d"readonly" role\x3d"presentation"\n\t/\x3e\x3c/div\n\t\x3e\x3cdiv class\x3d"dijitReset dijitInputField dijitInputContainer"\n\t\t\x3e\x3cinput class\x3d\'dijitReset dijitInputInner\' data-dojo-attach-point\x3d"textbox,focusNode" type\x3d"${type}" data-dojo-attach-event\x3d"onkeydown:_onKeyDown"\n\t\t\trole\x3d"spinbutton" autocomplete\x3d"off" ${!nameAttrSetting}\n\t/\x3e\x3c/div\n\x3e\x3c/div\x3e\n',
"url:dijit/templates/TreeNode.html":'\x3cdiv class\x3d"dijitTreeNode" role\x3d"presentation"\n\t\x3e\x3cdiv data-dojo-attach-point\x3d"rowNode" class\x3d"dijitTreeRow" role\x3d"presentation"\n\t\t\x3e\x3cspan data-dojo-attach-point\x3d"expandoNode" class\x3d"dijitInline dijitTreeExpando" role\x3d"presentation"\x3e\x3c/span\n\t\t\x3e\x3cspan data-dojo-attach-point\x3d"expandoNodeText" class\x3d"dijitExpandoText" role\x3d"presentation"\x3e\x3c/span\n\t\t\x3e\x3cspan data-dojo-attach-point\x3d"contentNode"\n\t\t\tclass\x3d"dijitTreeContent" role\x3d"presentation"\x3e\n\t\t\t\x3cspan role\x3d"presentation" class\x3d"dijitInline dijitIcon dijitTreeIcon" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/span\n\t\t\t\x3e\x3cspan data-dojo-attach-point\x3d"labelNode,focusNode" class\x3d"dijitTreeLabel" role\x3d"treeitem"\n\t\t\t\t   tabindex\x3d"-1" aria-selected\x3d"false" id\x3d"${id}_label"\x3e\x3c/span\x3e\n\t\t\x3c/span\n\t\x3e\x3c/div\x3e\n\t\x3cdiv data-dojo-attach-point\x3d"containerNode" class\x3d"dijitTreeNodeContainer" role\x3d"presentation"\n\t\t style\x3d"display: none;" aria-labelledby\x3d"${id}_label"\x3e\x3c/div\x3e\n\x3c/div\x3e\n',
"url:dijit/templates/Tree.html":'\x3cdiv role\x3d"tree"\x3e\n\t\x3cdiv class\x3d"dijitInline dijitTreeIndent" style\x3d"position: absolute; top: -9999px" data-dojo-attach-point\x3d"indentDetector"\x3e\x3c/div\x3e\n\t\x3cdiv class\x3d"dijitTreeExpando dijitTreeExpandoLoading" data-dojo-attach-point\x3d"rootLoadingIndicator"\x3e\x3c/div\x3e\n\t\x3cdiv data-dojo-attach-point\x3d"containerNode" class\x3d"dijitTreeContainer" role\x3d"presentation"\x3e\n\t\x3c/div\x3e\n\x3c/div\x3e\n',"url:filechooser-ui/fileChooser.html":'\x3cdiv class\x3d"fileChooser"\x3e\n    \x3cdiv data-dojo-attach-point\x3d"fileBrowser"\x3e\x3c/div\x3e\n    \x3cdiv class\x3d"bottom" data-dojo-attach-point\x3d"bottomNode"\x3e\n        \x3cdiv\x3e\n            \x3cdiv class\x3d"inputLabel"\n                 data-dojo-attach-point\x3d"fileNameLabel"\x3e${localization.saveAsFileNameLabel}\x3c/div\x3e\n\n            \x3cdiv class\x3d"fileName" data-dojo-attach-point\x3d"fileName"\n                 data-dojo-type\x3d"dijit.form.ValidationTextBox"\n                 data-dojo-props\x3d"required: true"\n                 data-dojo-attach-event\x3d"onKeyDown:_onNameKeyDown"\x3e\x3c/div\x3e\n\n        \x3c/div\x3e\n\n        \x3cdiv\x3e\n            \x3cdiv class\x3d"inputLabel"\n                 data-dojo-attach-point\x3d"fileTypeLabel"\x3e${localization.saveAsFileDropDownLabel}\x3c/div\x3e\n\n            \x3cdiv class\x3d"fileType"\n                 data-dojo-attach-point\x3d"fileType"\n                 data-dojo-type\x3d"dijit.form.Select"\x3e\x3c/div\x3e\n        \x3c/div\x3e\n\n        \x3cdiv class\x3d"buttons" data-dojo-attach-point\x3d"buttons"\x3e\n            \x3cdiv class\x3d"cancelButton" data-dojo-attach-point\x3d"cancelButton"\n                 data-dojo-type\x3d"dijit.form.Button"\n                 data-dojo-attach-event\x3d"onClick:_onCancelClick"\x3e${localization.cancel}\n            \x3c/div\x3e\n            \x3cdiv class\x3d"okButton" data-dojo-attach-point\x3d"okButton"\n                 data-dojo-type\x3d"dijit.form.Button"\n                 data-dojo-attach-event\x3d"onClick:_onOkClick"\x3e${localization.ok}\n            \x3c/div\x3e\n        \x3c/div\x3e\n    \x3c/div\x3e\n\x3c/div\x3e',
"url:MOTW/mgg/table/Table.html":'\x3cdiv class\x3d"mw_type_Table mw_type_TableBase mw_type_ListBase"\x3e\n    \x3cdiv class\x3d"header nospacing preventDragSelection"\x3e\n        \x3cdiv class\x3d"inline row cornerSpacer rowHeaderColumn rowHeadersWrapper"\x3e\n            \x3cdiv class\x3d"row cell"\x3e\x3c/div\x3e\n        \x3c/div\x3e\n        \x3cdiv class\x3d"inline wrapper headerWrapper"\x3e\n            \x3cdiv class\x3d"inline scrolled dataColumn" data-dojo-attach-point\x3d"columnHeaderScrollerNode"\x3e\n                \x3cdiv class\x3d"row dataWidth spacer" data-dojo-attach-point\x3d"columnHeaderNode"\x3e\n                    \x3cdiv class\x3d"cell spacer leftSpacer"\x3e\x3c/div\x3e\n                    \x3cdiv class\x3d"cell spacer rightSpacer"\x3e\x3c/div\x3e\n                \x3c/div\x3e\n            \x3c/div\x3e\n        \x3c/div\x3e\n        \x3cdiv class\x3d"inline row cornerSpacer verticalScrollSpacer"\x3e\x3c/div\x3e\n    \x3c/div\x3e\n    \x3cdiv class\x3d"body nospacing"\x3e\n        \x3cdiv class\x3d"inline wrapper rowHeadersWrapper preventDragSelection"\x3e\n            \x3cdiv class\x3d"scrolled dataRow rowHeaderColumn rowHeaders" data-dojo-attach-point\x3d"rowHeaderScrollerNode"\x3e\n                \x3cdiv class\x3d"dataHeight spacer" data-dojo-attach-point\x3d"rowHeaderNode"\x3e\n                    \x3cdiv class\x3d"row spacer topSpacer"\x3e\x3c/div\x3e\n                    \x3cdiv class\x3d"spacer bottomSpacer"\x3e\x3c/div\x3e\n                \x3c/div\x3e\n            \x3c/div\x3e\n            \x3cdiv class\x3d"cornerSpacer horizontalScrollSpacer rowHeaderColumn"\x3e\x3c/div\x3e\n        \x3c/div\x3e\n        \x3cdiv class\x3d"inline wrapper dataBodyWrapper"\x3e\n            \x3cdiv class\x3d"scroller dataRow dataColumn" data-dojo-attach-point\x3d"dataScrollerNode"\x3e\n                \x3cdiv class\x3d"dataWidth dataHeight spacer dataBody" data-dojo-attach-point\x3d"dataNode"\x3e\n                    \x3cdiv class\x3d"row spacer topSpacer"\x3e\x3c/div\x3e\n                    \x3cdiv class\x3d"spacer bottomSpacer"\x3e\x3c/div\x3e\n                \x3c/div\x3e\n            \x3c/div\x3e\n        \x3c/div\x3e\n    \x3c/div\x3e\n    \x3cdiv class\x3d"columnResizer" data-dojo-attach-point\x3d"columnResizerNode"\x3e\x3c/div\x3e\n    \x3cdiv class\x3d"loading"\x3e\x3c/div\x3e\n\x3c/div\x3e',
"url:MOTW/mgg/table/List.html":'\x3cdiv class\x3d"mw_type_List mw_type_ListBase"\x3e\n    \x3cdiv class\x3d"body nospacing"\x3e\n        \x3cdiv class\x3d"inline wrapper dataBodyWrapper"\x3e\n            \x3cdiv class\x3d"scroller dataRow dataColumn" data-dojo-attach-point\x3d"dataScrollerNode"\x3e\n                \x3cdiv class\x3d"dataWidth dataHeight spacer dataBody" data-dojo-attach-point\x3d"dataNode"\x3e\n                    \x3cdiv class\x3d"row spacer topSpacer"\x3e\x3c/div\x3e\n                    \x3cdiv class\x3d"spacer bottomSpacer"\x3e\x3c/div\x3e\n                \x3c/div\x3e\n            \x3c/div\x3e\n        \x3c/div\x3e\n    \x3c/div\x3e\n    \x3cdiv class\x3d"loading"\x3e\x3c/div\x3e\n\x3c/div\x3e',
"url:MOTW/cmd/view/commandWindow2.html":'\x3cdiv class\x3d"commandWindowView plainCode" tabindex\x3d"0"\x3e\n    \x3cdiv class\x3d"cmdEditorWindow dijitInline" dojoAttachPoint\x3d"cmdEditorWindow"\x3e\n    \x3c/div\x3e\n\x3c/div\x3e',"url:MW/rtc/plugins/view/banner/view/BannerTemplate.html":'\x3cdiv class\x3d"bannerWidget"\x3e\n    \x3cdiv class\x3d"icon" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/div\x3e\n    \x3cdiv type\x3d"button" class \x3d"closeButton" data-dojo-attach-point\x3d"closeButtonNode" data-dojo-attach-event\x3d"onClick:closeBanner"\x3e\x3c/div\x3e\n    \x3cdiv class\x3d"buttonsContainer" data-dojo-attach-point\x3d"buttonsContainer"\x3e\x3c/div\x3e\n    \x3cdiv class\x3d"bannerText" data-dojo-attach-point\x3d"bannerTextNode"\x3e\x3c/div\x3e\n\x3c/div\x3e',
"url:MW/rtc/templates/rtePane.html":'\x3cdiv data-dojo-attach-point\x3d"rtePane"\x3e\x3cdiv class\x3d"rteWindow" data-dojo-attach-point\x3d"rteWindow"\x3e\x3c/div\x3e\x3c/div\x3e\n',"url:MW/rtc/plugins/dialog/ConditionalBreakpointTemplate.html":'\x3cdiv class\x3d"rteConditionalBreakpointDialog" data-dojo-attach-point\x3d"contentNode" data-dojo-attach-event\x3d"onkeydown:onTextKeydown"\x3e\n    \x3cspan class\x3d"iconColumn"\x3e\n        \x3cdiv class\x3d"mwIconNode bigConditionalBreakpointDialog" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/div\x3e\n    \x3c/span\x3e\n    \x3cspan class\x3d"contentColumn"\x3e\n        \x3cdiv class\x3d"fileLabel"\x3e\n            \x3clabel data-dojo-attach-point\x3d"fileLabel"\x3e\x3c/label\x3e\n        \x3c/div\x3e\n        \x3cdiv class\x3d"condition"\x3e\n            \x3cdiv class\x3d"conditionLabel"\x3e\n                \x3clabel data-dojo-attach-point\x3d"conditionLabel"\x3e\x3c/label\x3e\n            \x3c/div\x3e\n            \x3cdiv  class\x3d"input-row"\x3e\n                \x3cdiv class\x3d"conditionTextBox" tabindex\x3d"1" data-dojo-attach-point\x3d"conditionInput"\n                     data-dojo-attach-event\x3d"onkeydown:onTextKeydown" data-dojo-type\x3d"dijit.form.TextBox" name\x3d"conditionInput" id\x3d"conditionInput"\x3e\n                \x3c/div\x3e\n            \x3c/div\x3e\n        \x3c/div\x3e\n        \x3cdiv class\x3d"noteLabel"\x3e\n            \x3clabel data-dojo-attach-point\x3d"noteLabel"\x3e\x3c/label\x3e\n        \x3c/div\x3e\n        \x3cdiv class\x3d"confirmButtons"\x3e\n            \x3cbutton class\x3d"helpButton" tabindex\x3d"2" data-dojo-type\x3d"dijit.form.Button" data-dojo-attach-point\x3d"helpButton" name\x3d"helpButton" id\x3d"helpButton"\x3e\x3c/button\x3e\n            \x3cbutton class\x3d"cancelButton" tabindex\x3d"3" data-dojo-type\x3d"dijit.form.Button" data-dojo-attach-point\x3d"cancelButton" name\x3d"cancelButton" id\x3d"cancelButton"\x3e\x3c/button\x3e\n            \x3cbutton class\x3d"okButton" tabindex\x3d"4" data-dojo-type\x3d"dijit.form.Button" data-dojo-attach-point\x3d"okButton" name \x3d "okButton" id\x3d"okButton"\x3e\x3c/button\x3e\n        \x3c/div\x3e\n    \x3c/span\x3e\n\x3c/div\x3e',
"url:MW/rtc/plugins/view/exporters/sectionrules.css":".CodeBlock {margin: 10px 0 10px 0; background-color: #F7F7F7;}.CodeBlock+.paragraphNode {margin-top: 10px;}.lineNode {padding-left: 10px; border-left: 1px solid #E9E9E9; border-right: 1px solid #E9E9E9;}.inlineWrapper:first-child .lineNode,.inlineWrapper.outputs+.inlineWrapper .lineNode {padding-top: 5px; border-top: 1px solid #E9E9E9;}.inlineWrapper:last-child .lineNode,.inlineWrapper.outputs .lineNode {padding-bottom: 5px; border-bottom: 1px solid #E9E9E9;}.lineNode .textBox {white-space: pre;}",
"url:MW/rtc/plugins/embeddedoutputs/outputhandlers/css/outputhandler.css":".rtePane .variableNameElement .headerElement {color: rgb(179, 179, 179); font-style: italic;}.rtePane .variableNameElement .headerElement .headerDataType {color: rgb(147, 176, 230);}","url:MW/rtc/plugins/embeddedoutputs/view/css/errorOutput.css":".rtePane .embeddedOutputsErrorElement {min-height: 18px; max-height: 250px; overflow: auto;}.rtePane .embeddedOutputsErrorElement.inlineElement {}.rtePane .embeddedOutputsErrorElement.rightPaneElement {}",
"url:MW/rtc/plugins/embeddedoutputs/view/css/matrixOutput.css":".rtePane .embeddedOutputsMatrixElement,.rtePane .eoOutputWrapper .matrixElement {min-height: 18px; box-sizing: border-box;}.rtePane .embeddedOutputsMatrixElement .matrixElement,.rtePane .eoOutputWrapper .matrixElement,.rtcDataTipElement .matrixElement {position: relative;}.rtePane .matrixElement .variableValue,.rtcDataTipElement .matrixElement .variableValue {white-space: pre; display: inline-block; vertical-align: top; overflow: hidden;}.rtePane .embeddedOutputsMatrixElement.inlineElement {}.rtePane .embeddedOutputsMatrixElement.inlineElement .topHeaderWrapper {display: none;}.rtePane .embeddedOutputsMatrixElement.inlineElement .veTable .body {padding-top: 0 !important; max-height: 100px;}.rtePane .inlineElement .matrixElement {max-height: 300px;}.rtePane .embeddedOutputsMatrixElement.rightPaneElement {}.rtePane .rightPaneElement .matrixElement,.rtcDataTipElement .matrixElement {overflow: hidden; padding-left: 9px;}.rtePane .rightPaneElement .matrixElement {margin-bottom: -1px;}.rtePane .embeddedOutputsMatrixElement .matrixElement .valueContainer,.rtePane .eoOutputWrapper .matrixElement .valueContainer,.rtcDataTipElement .matrixElement .valueContainer {white-space: nowrap; margin-bottom: 3px;}.rtePane .embeddedOutputsMatrixElement .matrixElement .valueContainer .horizontalEllipsis.hide,.rtePane .embeddedOutputsMatrixElement .matrixElement .verticalEllipsis.hide,.rtePane .eoOutputWrapper .matrixElement .valueContainer .horizontalEllipsis.hide,.rtePane .eoOutputWrapper .matrixElement .verticalEllipsis.hide,.rtcDataTipElement .matrixElement .valueContainer .horizontalEllipsis.hide,.rtcDataTipElement .matrixElement .verticalEllipsis.hide {display: none;}.embeddedOutputsVariableMatrixElement .matrixElement .valueContainer.hideEllipses .verticalEllipsis, .embeddedOutputsVariableMatrixElement .matrixElement .valueContainer.hideEllipses .horizontalEllipsis {display:none;}.rtePane .embeddedOutputsMatrixElement .matrixElement .valueContainer .horizontalEllipsis,.rtePane .eoOutputWrapper .matrixElement .valueContainer .horizontalEllipsis {margin-bottom: -3px;}.rtePane .eoOutputWrapper .embeddedOutputsVariableMatrixElement .matrixElement .valueContainer {cursor: default !important;}",
"url:MW/rtc/plugins/embeddedoutputs/view/css/variableTableOutput.css":".rtePane .embeddedOutputsVariableTableElement .ClientViewDiv table tr {height: 22px; white-space: nowrap;}.rtePane .embeddedOutputsVariableTableElement .ClientViewDiv table tr td,.rtePane .embeddedOutputsVariableTableElement .ClientViewDiv table tr th {min-width : 75px; max-width : 75px; background-color:white; text-overflow: ellipsis; font-family: 'Arial', sans-serif; font-size: 12px; overflow : hidden;}.rtePane .embeddedOutputsVariableTableElement .ClientViewDiv table tbody tr th {width: 34px; max-width: 100px;}.rtePane .embeddedOutputsVariableTableElement .ClientViewDiv table tr span {text-overflow: ellipsis; padding: 3px;}.rtePane .embeddedOutputsVariableTableElement .ClientViewDiv table tr th {color: rgba(0,0,0,0.5); padding: 3px; font-size: 9px;}.rtePane .embeddedOutputsVariableTableElement .ClientViewDiv table tr th:first-child {min-width: 28px; max-width: 250px;}",
"url:MW/rtc/plugins/embeddedoutputs/view/css/symbolicOutput.css":".rtePane .inlineElement .symbolicElement {margin-top: 1px; margin-bottom: 1px;}.rtePane .rightPaneElement .symbolicElement {padding-top: 3px; padding-left: 9px;}.rtePane .embeddedOutputsSymbolicElement .MathEquation {margin-top: 4px; margin-bottom: 4px;}.rtePane .embeddedOutputsSymbolicElement .MathEquation.displaySymbolicElement {margin-left: 15px;}.rtePane .embeddedOutputsSymbolicElement .MathEquation.inlineSymbolicElement {}.rtePane .embeddedOutputsSymbolicElement {overflow-x: auto; overflow-y: auto;}",
"url:MW/rtc/plugins/embeddedoutputs/view/css/textOutput.css":".rtePane .embeddedOutputsTextElement,.rtePane .embeddedOutputsVariableStringElement {white-space: pre; word-wrap: initial; min-height: 18px; max-height: 250px; overflow: auto;}.rtePane .textElement,.rtcDataTipElement .textElement {padding-top: 3px;}.rtePane .embeddedOutputsTextElement.inlineElement,.rtePane .embeddedOutputsVariableStringElement.inlineElement {}.rtePane .inlineElement .textElement {}.rtePane .embeddedOutputsTextElement.rightPaneElement,.rtePane .embeddedOutputsVariableStringElement.rightPaneElement {min-height: 16px;}.rtePane .rightPaneElement .textElement {padding-top: 2px; padding-left: 9px;}",
"url:MW/rtc/plugins/embeddedoutputs/view/css/variableEditor.css":'.rtePane .veSpecifier {}.rtePane .veContainer {}.rtePane .veSpecifierBox {height: 400px; width: 500px;}.rtePane .veSpecifier .veTable {padding-top: 3px; padding-bottom: 4px;}.rtePane .veSpecifierBox .veSpecifier .veContainer {position: relative; width: 100%; height: 370px;}.rtePane .veSpecifierBox .dijitDialogPaneContent {width: 97% !important; height: 88% !important;}.rtePane .veSpecifier .veTable .rowHeadersWrapper {padding-bottom: 0;}.rtePane .veSpecifier .veTable .scroller .variableEditorRenderers {padding-right: 3px; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none;}.rtePane .veSpecifier .veTable .topHeaderWrapper,.rtePane .veSpecifier .veTable .bottomRowHeaderWrapper {visibility: hidden; z-index: 0;}.rtePane .veMetaSummary {font-style: italic;}.rtePane .veSpecifier .veTable .scroller {overflow: hidden;}.rtePane .veSpecifier .veTable:hover .scroller {overflow: auto;}.rtePane .veSpecifier .veVariableName,.rtePane .veSpecifier .veDimensionFont {font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12px;}.rtePane .veSpecifier .veVariableName {padding-top: 2px;}.rtePane .veSpecifier .veDimensionFont {font-style: italic; color: #9A9A9A;}.rtePane .veSpecifier .scroller::-webkit-scrollbar-track {background-color: white;}.rtePane .veSpecifier .scroller::-webkit-scrollbar-corner {background-color: white;}.rtePane .veSpecifier .veTable .topRowHeaderWrapper {border: none; background-color: #F8F9FA;}.rtePane .veSpecifier .mw_type_ListBase.showCellBorders,.rtePane .veSpecifier .veTable .topHeaderWrapper,.rtePane .veSpecifier .veTable .bottomRowHeaderWrapper,.rtePane .veSpecifier .veTable .verticalScrollSpacer,.rtePane .veSpecifier .veTable .horizontalScrollSpacer {border: none;}.rtePane .veSpecifier .veTable .dataScrollerNode {border: 1px solid #BFBFBF;}.rtePane .veSpecifier .veTable .columnHeaderNode,.rtePane .veSpecifier .veTable .rowHeaderNode,.rtePane .veSpecifier .veTable .dataBody {font-family: Arial; font-size: 13px;}.rtePane .veSpecifier .veTable .columnHeaderNode,.rtePane .veSpecifier .veTable .rowHeaderNode {color: #7F7F7F;}.rtePane .veSpecifier .veTable .dataBody {color: #000000;}.rtePane .veSpecifier .veTable .columnHeaderNode .cell .drag,.rtePane .veSpecifier .veTable .columnHeaderNode .cell .header,.rtePane .veSpecifier .veTable .topHeaderWrapper,.rtePane .veSpecifier .veTable .bottomRowHeaderWrapper {background-color: #F8F9FA;}.rtePane .veSpecifier .veTable .columnHeaderNode .cell .dragBorder {border-right: 1px solid #F8F9FA;}.rtePane .veSpecifier .veTable .rowHeaderNode .cell {padding-top: 3px; text-align: center; border-bottom: 1px solid #F8F9FA;}.rtePane .veSpecifier .veTable .dataBody .cell .plainText {text-align: right;}.rtePane .veSpecifier .veTable .dataBody .row .cell {border-bottom: 1px solid #E9E9E9; border-right: 1px solid #E9E9E9;}',
"url:MW/rtc/plugins/embeddedoutputs/view/css/variableOutput.css":".rtePane .embeddedOutputsVariableElement {white-space: pre-wrap; word-wrap: break-word; min-height: 18px; max-height: 250px; overflow: auto;}.rtePane .variableElement {}.rtePane .embeddedOutputsVariableElement.inlineElement {}.rtePane .inlineElement .variableElement {}.rtePane .embeddedOutputsVariableElement.rightPaneElement {min-height: 16px;}.rtePane .rightPaneElement .variableElement {padding-top: 2px; padding-left: 9px;}.variableNameElement {margin-bottom: 3px; display: inline-block;}",
"url:MW/rtc/plugins/embeddedoutputs/view/css/warningOutput.css":".rtePane .embeddedOutputsWarningElement{min-height: 18px; max-height: 250px; overflow: auto;}.rtePane .embeddedOutputsWarningElement.inlineElement {}.rtePane .embeddedOutputsWarningElement.rightPaneElement {}","url:MW/rtc/plugins/embeddedoutputs/view/inline/css/inlineoutput.css":".rtePane .outputGroup {margin: 2px 0 2px 0; padding: 2px 2px 2px 4px;}.rtePane .outputRegion {}.rtePane .outputParagraph {color: rgba(64, 64, 64, 1); padding: 10px 0 6px 17px; background: white; overflow-x: hidden;}.rtePane .inlineWrapper:last-child .outputParagraph {border-bottom-left-radius: 4px; border-bottom-right-radius: 4px;}.rtePane .outputParagraph:empty {margin: 0;}",
"url:MW/rtc/plugins/language/matlab/alert/css/alertPlugin.css":".dijitTooltipDialog .dijitTooltipContainer .dijitTooltipContents .alertPlugin-alertMessage {min-width: 12px; max-width: 400px; max-height: 300px; overflow: auto;}.dijitTooltipDialog .alertPlugin-alertMessage::-webkit-scrollbar {width: 11px; height: 11px;}.dijitTooltipDialog .alertPlugin-alertMessage::-webkit-scrollbar-track {background-color: rgba(0, 0, 0, 0);}.dijitTooltipDialog .alertPlugin-alertMessage::-webkit-scrollbar-corner {background-color: rgba(0, 0, 0, 0);}.dijitTooltipDialog .alertPlugin-alertMessage::-webkit-scrollbar-thumb {border-radius: 7px; background-color: rgba(0, 0, 0, 0.1); border: 2px solid rgba(0, 0, 0, 0); background-clip: padding-box;}.dijitTooltipDialog .alertPlugin-alertMessage::-webkit-scrollbar-thumb:hover {background-color: rgba(0, 0, 0, 0.2);}.dijitTooltipDialog .alertPlugin-alertMessage::-webkit-scrollbar-thumb {background-color: rgba(0, 0, 0, 0);}.dijitTooltipDialog .alertPlugin-alertMessage:hover::-webkit-scrollbar-thumb {background-color: rgba(0, 0, 0, 0.1);}.dijitTooltipDialog .alertPlugin-alertMessage:hover::-webkit-scrollbar-thumb:hover {background-color: rgba(0, 0, 0, 0.2);}.alertPluginLayer {position: relative !important; z-index: 2;}.rtePane .alertPlugin-alertLine {position: absolute; display: initial; width: 40px; text-align: right; cursor: text;}.rtePane .alertPlugin-onTextLine {visibility: hidden;}.rtePane .alertPlugin-hasTooltip .alertPlugin-warningImg,.rtePane .alertPlugin-hasTooltip .alertPlugin-errorImg {cursor: pointer;}.rtePane .alertPlugin-alertLine .alertPlugin-warningElement,.rtePane .alertPlugin-alertLine .alertPlugin-errorElement {display: inline-block; margin-right: 4px;}.rtePane .alertPlugin-isStale {-webkit-filter: opacity(0.4) grayscale(80%); filter: opacity(0.4) grayscale(80%);}",
"url:MW/rtc/plugins/language/matlab/diagnosticmessage/css/diagnosticMessage.css":'.diagnosticMessage-wrapper {font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 12px;}.diagnosticMessage-wrapper.diagnosticMessage-warningType {color: rgb(255,100,0);}.diagnosticMessage-wrapper.diagnosticMessage-warningType a {color: rgb(255,100,0); text-decoration: underline;}.diagnosticMessage-wrapper.diagnosticMessage-errorType {color: rgb(230,0,0);}.diagnosticMessage-wrapper.diagnosticMessage-errorType a {color: rgb(230,0,0); text-decoration: underline;}.diagnosticMessage-wrapper .diagnosticMessage-messagePart {white-space: pre-wrap;}.diagnosticMessage-wrapper .diagnosticMessage-stackPart {white-space: pre;}',
"url:MW/rtc/plugins/view/exporters/ellipses.css":'.matrixElement .horizontalEllipsis,.rtcDataTipElement .matrixElement .horizontalEllipsis {display: inline-block; margin-top: 3px; width: 30px; height: 12px; background-repeat: no-repeat; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB0AAAAJCAYAAADO1CeCAAAAJUlEQVR42mP4//8/A70xw0i29BUDFPxnAEtTW37wWDqakIa4pQDvOOG89lHX2gAAAABJRU5ErkJggg\x3d\x3d");}.matrixElement .verticalEllipsis,.textElement .verticalEllipsis,.rtcDataTipElement .matrixElement .verticalEllipsis,.rtcDataTipElement .textElement .verticalEllipsis {margin-left: 35px; width: 12px; height: 30px; background-repeat: no-repeat; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAZCAYAAAAIcL+IAAAALklEQVR42mP4//8/AzGYgWyFMECMwv8QddRS+P//KyimlmcGUOFoOI6GI/UVAgDnd8Dd4+NCwgAAAABJRU5ErkJggg\x3d\x3d");}',
"url:mw-navigationbar/templates/navigationBar.html":'\x3cdiv class\x3d"navigationBarContainer" data-dojo-attach-point\x3d"navigationBarContainer"\x3e\n    \x3cdiv data-dojo-attach-point\x3d"navigationBarNode" class\x3d"navigationBarNode"\x3e\n        \x3cdiv class\x3d"locationNodeWithIcon" data-dojo-attach-point\x3d"locationNodeWithIcon"\x3e\n            \x3cdiv class\x3d"iconParentDiv" title\x3d""\x3e\n                \x3cdiv class\x3d"navBarIcon" data-dojo-attach-point\x3d"iconNode"\x3e\x3c/div\x3e\n            \x3c/div\x3e\n            \x3cdiv class\x3d"currentLocationNode" data-dojo-attach-point\x3d"currentLocationNode" data-tag\x3d""\x3e\x3c/div\x3e\n        \x3c/div\x3e\n    \x3c/div\x3e\n\x3c/div\x3e',
"url:MW/rtc/plugins/debug/css/run_here_14.svg":'\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" viewBox\x3d"0 0 14 14"\x3e\x3cg id\x3d"Layer_2" data-name\x3d"Layer 2"\x3e\x3cg id\x3d"Icons"\x3e\x3cg id\x3d"NEW"\x3e\x3cg id\x3d"CONTEXTUAL_MENU" data-name\x3d"CONTEXTUAL MENU"\x3e\x3cg id\x3d"run_here_14"\x3e\x3crect fill\x3d"#c2b59b" opacity\x3d"0" width\x3d"14" height\x3d"14"/\x3e\x3crect fill\x3d"#414042" x\x3d"9" y\x3d"2" width\x3d"2" height\x3d"10"/\x3e\x3cpolygon fill\x3d"#414042" points\x3d"3 2 3 12 8 7 3 2"/\x3e\x3c/g\x3e\x3c/g\x3e\x3c/g\x3e\x3c/g\x3e\x3c/g\x3e\x3c/svg\x3e',
"url:MW/rtc/plugins/debug/css/step_in_14.svg":'\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" viewBox\x3d"0 0 14 14"\x3e\x3cg id\x3d"Layer_2" data-name\x3d"Layer 2"\x3e\x3cg id\x3d"Icons"\x3e\x3cg id\x3d"NEW"\x3e\x3cg id\x3d"CONTEXTUAL_MENU" data-name\x3d"CONTEXTUAL MENU"\x3e\x3cg id\x3d"step_in_14"\x3e\x3crect fill\x3d"#c2b59b" fill-opacity\x3d"0" opacity\x3d"0.36" width\x3d"14" height\x3d"14"/\x3e\x3crect fill\x3d"#414042" x\x3d"2" y\x3d"8" width\x3d"7" height\x3d"2"/\x3e\x3crect fill\x3d"#414042" x\x3d"1" y\x3d"1" width\x3d"2" height\x3d"9"/\x3e\x3cpolygon fill\x3d"#414042" points\x3d"9 5 9 13 13 9 9 5"/\x3e\x3c/g\x3e\x3c/g\x3e\x3c/g\x3e\x3c/g\x3e\x3c/g\x3e\x3c/svg\x3e',
"url:MW/rtc/plugins/embeddedoutputs/view/templateError.html":'\x3cspan\x3e\n    \x3csvg class\x3d"errorImg" width\x3d"14" height\x3d"15" xmlns\x3d"http://www.w3.org/2000/svg" xmlns:svg\x3d"http://www.w3.org/2000/svg"\x3e\n        \x3ccircle id\x3d"error_circle" cx\x3d"7" cy\x3d"8" r\x3d"7" fill\x3d"rgb(204, 55, 41)"/\x3e\n        \x3crect id\x3d"top_bang" fill\x3d"white" x\x3d"6" y\x3d"3" width\x3d"2" height\x3d"6"/\x3e\n        \x3crect id\x3d"bottom_bang" fill\x3d"white" x\x3d"6" y\x3d"11" width\x3d"2" height\x3d"2"/\x3e\n    \x3c/svg\x3e\n\x3c/span\x3e',
"url:MW/rtc/plugins/embeddedoutputs/codegen/templates/CodeGenWidget.html":'\x3cdiv data-dojo-attach-point\x3d\'containerNode\' class\x3d"${baseClass} figureWidget"\x3e\n    \x3cdiv data-dojo-attach-point\x3d"codeDiv" class\x3d"codeexpander"\x3e\n        \x3cspan class\x3d"codepopuplabel" data-dojo-attach-point\x3d"codeLabel"\x3e${_codeLabel}\x3c/span\x3e\n        \x3cimg data-dojo-attach-point\x3d"arrowImgNode" class\x3d"codepopuparrow"\x3e\n    \x3c/div\x3e\n    \x3cdiv data-dojo-attach-point\x3d"codeGenArea" class\x3d"codegentoggle overlay"\x3e\n        \x3ctextarea name\x3d"codearea" data-dojo-attach-point\x3d"textarea" class\x3d"textcodepopup" readonly rows\x3d"${_MIN_TEXT_SIZE}" dojoType\x3d"dijit.form.Textarea"\x3e\x3c/textarea\x3e\n        \x3cbutton type\x3d"button" data-dojo-attach-point\x3d"updateBtn" class\x3d"codebtn" data-dojo-type\x3d"dijit.form.Button"\x3e${_updateCodeLabel}\x3c/button\x3e\n        \x3cbutton type\x3d"button" data-dojo-attach-point\x3d"copyBtn" class\x3d"codebtn copybutton" data-dojo-type\x3d"dijit.form.Button"\x3e${_copyLabel}\x3c/button\x3e\n    \x3c/div\x3e\n\x3c/div\x3e',
"url:MW/rtc/plugins/embeddedoutputs/outputhandlers/figure/floatingpalette/templates/Palette.html":'\x3cdiv data-dojo-attach-point\x3d\'containerNode\' class\x3d"${baseClass} figureWidget" data-tag\x3d"${dataTag}"\x3e\x3c/div \x3e\n',"url:MW/equations/editor/utils/Templates.xml":'\x3croot\x3e\n    \x3c!--\n        This file contains all available structures.\n\n        The \'id\' will be used to generated the action-id by prepending \'equationeditor.insert.\'.\n\n        If no command-id is given, the id will also be used as command-id\n        (for LaTeX-style backslash commands).\n    --\x3e\n\n    \x3c!-- Structures --\x3e\n    \x3c!-- Script --\x3e\n    \x3ctemplate id\x3d"superscript"\x3e\n        \x3cMathScript data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder" /\x3e\n            \x3cNull/\x3e\n            \x3cMathRow data-cursor\x3d"1" data-category\x3d"placeholder" /\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"subscript"\x3e\n        \x3cMathScript data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder" /\x3e\n            \x3cMathRow data-cursor\x3d"1" data-category\x3d"placeholder" /\x3e\n            \x3cNull/\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"subsuperscript"\x3e\n        \x3cMathScript data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder" /\x3e\n            \x3cMathRow data-cursor\x3d"1" data-category\x3d"placeholder" /\x3e\n            \x3cMathRow data-cursor\x3d"2" data-category\x3d"placeholder" /\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"multiscript"\x3e\n        \x3cMathMultiScript numPostPairs \x3d"1" data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder" /\x3e\n            \x3cMathRow data-cursor\x3d"1" data-category\x3d"placeholder" /\x3e\n            \x3cMathRow data-cursor\x3d"2" data-category\x3d"placeholder" /\x3e\n            \x3cMathRow data-cursor\x3d"3" data-category\x3d"placeholder" /\x3e\n            \x3cMathRow data-cursor\x3d"4" data-category\x3d"placeholder" /\x3e\n        \x3c/MathMultiScript\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"over"\x3e\n        \x3cMathScript limitStyle\x3d"stack" data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cNull/\x3e\n            \x3cMathRow data-cursor\x3d"1" data-category\x3d"placeholder" /\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"under"\x3e\n        \x3cMathScript limitStyle\x3d"stack" data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cMathRow data-cursor\x3d"1" data-category\x3d"placeholder" /\x3e\n            \x3cNull/\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"underover"\x3e\n        \x3cMathScript limitStyle\x3d"stack" data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cMathRow data-cursor\x3d"1" data-category\x3d"placeholder" /\x3e\n            \x3cMathRow data-cursor\x3d"2" data-category\x3d"placeholder" /\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n    \x3c!-- Fractions and Radicals --\x3e\n    \x3ctemplate id\x3d"frac"\x3e\n        \x3cMathFraction data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cMathRow data-cursor\x3d"1" data-category\x3d"placeholder"/\x3e\n        \x3c/MathFraction\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"fracbevelled"\x3e\n        \x3cMathFraction data-category\x3d"structure" bevelled\x3d"true"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cMathRow data-cursor\x3d"1" data-category\x3d"placeholder"/\x3e\n        \x3c/MathFraction\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"fracinline"\x3e\n        \x3cMathRow data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cMathText kind\x3d"symbol" text\x3d"\x26#x002F;" symbolName\x3d"slash" data-category\x3d"static" /\x3e\n            \x3cMathRow data-cursor\x3d"1" data-category\x3d"placeholder"/\x3e\n        \x3c/MathRow\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"sqrt"\x3e\n        \x3cMathRadical data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder" /\x3e\n            \x3cMathRow data-category\x3d"static" /\x3e\n        \x3c/MathRadical\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"root"\x3e\n        \x3cMathRadical data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder" /\x3e\n            \x3cMathRow data-cursor\x3d"1" data-category\x3d"placeholder" /\x3e\n        \x3c/MathRadical\x3e\n    \x3c/template\x3e\n\n    \x3c!-- Operators --\x3e\n    \x3ctemplate id\x3d"int"\x3e\n        \x3cMathRow data-category\x3d"structure"\x3e\n            \x3cMathText data-category\x3d"static" kind\x3d"symbol" text\x3d"\x26#x222B;" symbolName\x3d"intop" /\x3e\n            \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"0" /\x3e\n        \x3c/MathRow\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"intdef"\x3e\n        \x3cMathRow data-category\x3d"structure"\x3e\n            \x3cMathScript data-category\x3d"structure-part"\x3e\n                \x3cMathRow data-category\x3d"static"\x3e\n                    \x3cMathText kind\x3d"symbol" text\x3d"\x26#x222B;" symbolName\x3d"intop" /\x3e\n                \x3c/MathRow\x3e\n                \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"1" /\x3e\n                \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"2" /\x3e\n            \x3c/MathScript\x3e\n            \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"0" /\x3e\n        \x3c/MathRow\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"oint"\x3e\n        \x3cMathRow data-category\x3d"structure"\x3e\n            \x3cMathText data-category\x3d"static" kind\x3d"symbol" text\x3d"\x26#x222E;" symbolName\x3d"contourintop" /\x3e\n            \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"0" /\x3e\n        \x3c/MathRow\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"ointdef"\x3e\n        \x3cMathRow data-category\x3d"structure"\x3e\n            \x3cMathScript data-category\x3d"structure-part"\x3e\n                \x3cMathRow data-category\x3d"static"\x3e\n                    \x3cMathText kind\x3d"symbol" text\x3d"\x26#x222E;" symbolName\x3d"contourintop" /\x3e\n                \x3c/MathRow\x3e\n                \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"1" /\x3e\n                \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"2" /\x3e\n            \x3c/MathScript\x3e\n            \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"0" /\x3e\n        \x3c/MathRow\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"sum"\x3e\n        \x3cMathRow data-category\x3d"structure"\x3e\n            \x3cMathScript data-category\x3d"structure-part"\x3e\n                \x3cMathRow data-category\x3d"static"\x3e\n                    \x3cMathText kind\x3d"symbol" text\x3d"\x26#x2211;" symbolName\x3d"sum" /\x3e\n                \x3c/MathRow\x3e\n                \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"1" /\x3e\n                \x3cNull/\x3e\n            \x3c/MathScript\x3e\n            \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"0" /\x3e\n        \x3c/MathRow\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"sumdef"\x3e\n        \x3cMathRow data-category\x3d"structure"\x3e\n            \x3cMathScript data-category\x3d"structure-part"\x3e\n                \x3cMathRow data-category\x3d"static"\x3e\n                    \x3cMathText kind\x3d"symbol" text\x3d"\x26#x2211;" symbolName\x3d"sum" /\x3e\n                \x3c/MathRow\x3e\n                \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"1" /\x3e\n                \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"2" /\x3e\n            \x3c/MathScript\x3e\n            \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"0" /\x3e\n        \x3c/MathRow\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"prod"\x3e\n        \x3cMathRow data-category\x3d"structure"\x3e\n            \x3cMathScript data-category\x3d"structure-part"\x3e\n                \x3cMathRow data-category\x3d"static"\x3e\n                    \x3cMathText kind\x3d"symbol" text\x3d"\x26#x220F;" symbolName\x3d"prod" /\x3e\n                \x3c/MathRow\x3e\n                \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"1" /\x3e\n                \x3cNull/\x3e\n            \x3c/MathScript\x3e\n            \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"0" /\x3e\n        \x3c/MathRow\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"proddef"\x3e\n        \x3cMathRow data-category\x3d"structure"\x3e\n            \x3cMathScript data-category\x3d"structure-part"\x3e\n                \x3cMathRow data-category\x3d"static"\x3e\n                    \x3cMathText kind\x3d"symbol" text\x3d"\x26#x220F;" symbolName\x3d"prod" /\x3e\n                \x3c/MathRow\x3e\n                \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"1" /\x3e\n                \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"2" /\x3e\n            \x3c/MathScript\x3e\n            \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"0" /\x3e\n        \x3c/MathRow\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"lim"\x3e\n        \x3cMathRow data-category\x3d"structure"\x3e\n            \x3cMathScript limitStyle\x3d"stack" data-category\x3d"structure-part"\x3e\n                \x3cMathRow data-category\x3d"static"\x3e\n                    \x3cMathText kind\x3d"code" text\x3d"lim" /\x3e\n                \x3c/MathRow\x3e\n                \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"1" /\x3e\n                \x3cNull/\x3e\n            \x3c/MathScript\x3e\n            \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"0" /\x3e\n        \x3c/MathRow\x3e\n    \x3c/template\x3e\n\n\n\n    \x3c!-- Misc_Structures --\x3e\n    \x3ctemplate id\x3d"cases"\x3e\n        \x3cMathRow data-category\x3d"structure"\x3e\n            \x3cMathDelimiter symbolName\x3d"braceleft" data-category\x3d"static"/\x3e\n            \x3cMathMatrix data-category\x3d"structure-part" rows\x3d"2" cols\x3d"2"\x3e\n                \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n                \x3cMathRow data-cursor\x3d"1" data-category\x3d"placeholder"/\x3e\n                \x3cMathRow data-cursor\x3d"2" data-category\x3d"placeholder"/\x3e\n                \x3cMathRow data-cursor\x3d"3" data-category\x3d"placeholder"/\x3e\n            \x3c/MathMatrix\x3e\n        \x3c/MathRow\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"derivative"\x3e\n        \x3cMathRow data-category\x3d"structure"\x3e\n            \x3cMathFraction data-category\x3d"structure-part"\x3e\n                \x3cMathRow data-category\x3d"static"\x3e\n                    \x3cMathText kind\x3d"code" text\x3d"d" /\x3e\n                \x3c/MathRow\x3e\n                \x3cMathRow data-category\x3d"structure-part"\x3e\n                    \x3cMathText data-category\x3d"static" kind\x3d"code" text\x3d"d" /\x3e\n                    \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"1" /\x3e\n                \x3c/MathRow\x3e\n            \x3c/MathFraction\x3e\n            \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"0" /\x3e\n        \x3c/MathRow\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"derivativePrime"\x3e\n        \x3cMathScript data-category\x3d"structure"\x3e\n            \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"0" /\x3e\n            \x3cNull/\x3e\n            \x3cMathRow data-category\x3d"static"\x3e\n                \x3cMathText kind\x3d"symbol" symbolName\x3d"prime" /\x3e\n            \x3c/MathRow\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"derivativeN"\x3e\n        \x3cMathRow data-category\x3d"structure"\x3e\n            \x3cMathFraction data-category\x3d"structure-part"\x3e\n                \x3cMathRow data-category\x3d"structure-part"\x3e\n                    \x3cMathScript\x3e\n                        \x3cMathRow data-category\x3d"static"\x3e\n                            \x3cMathText kind\x3d"code" text\x3d"d" /\x3e\n                        \x3c/MathRow\x3e\n                        \x3cNull/\x3e\n                        \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"1" /\x3e\n                    \x3c/MathScript\x3e\n                \x3c/MathRow\x3e\n                \x3cMathRow data-category\x3d"structure-part"\x3e\n                    \x3cMathText kind\x3d"code" text\x3d"d" data-category\x3d"static" /\x3e\n                    \x3cMathScript\x3e\n                        \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"2" /\x3e\n                        \x3cNull/\x3e\n                        \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"3" /\x3e\n                    \x3c/MathScript\x3e\n                \x3c/MathRow\x3e\n            \x3c/MathFraction\x3e\n            \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"0" /\x3e\n        \x3c/MathRow\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"partialderivative"\x3e\n        \x3cMathRow data-category\x3d"structure"\x3e\n            \x3cMathFraction data-category\x3d"structure-part"\x3e\n                \x3cMathRow data-category\x3d"static"\x3e\n                    \x3cMathText kind\x3d"symbol" symbolName\x3d"partial" /\x3e\n                \x3c/MathRow\x3e\n                \x3cMathRow data-category\x3d"structure-part"\x3e\n                    \x3cMathText kind\x3d"symbol" symbolName\x3d"partial" data-category\x3d"static" /\x3e\n                    \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"1" /\x3e\n                \x3c/MathRow\x3e\n            \x3c/MathFraction\x3e\n            \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"0" /\x3e\n        \x3c/MathRow\x3e\n    \x3c/template\x3e\n\n\n    \x3ctemplate id\x3d"partialderivativeN"\x3e\n        \x3cMathRow data-category\x3d"structure"\x3e\n            \x3cMathFraction data-category\x3d"structure-part"\x3e\n                \x3cMathRow data-category\x3d"structure-part"\x3e\n                    \x3cMathScript\x3e\n                        \x3cMathRow data-category\x3d"static"\x3e\n                            \x3cMathText kind\x3d"symbol" symbolName\x3d"partial" /\x3e\n                        \x3c/MathRow\x3e\n                        \x3cNull/\x3e\n                        \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"1" /\x3e\n                    \x3c/MathScript\x3e\n                \x3c/MathRow\x3e\n                \x3cMathRow data-category\x3d"structure-part"\x3e\n                    \x3cMathText kind\x3d"symbol" symbolName\x3d"partial" data-category\x3d"static" /\x3e\n                    \x3cMathScript\x3e\n                        \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"2" /\x3e\n                        \x3cNull/\x3e\n                        \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"3" /\x3e\n                    \x3c/MathScript\x3e\n                \x3c/MathRow\x3e\n            \x3c/MathFraction\x3e\n            \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"0" /\x3e\n        \x3c/MathRow\x3e\n    \x3c/template\x3e\n\n\n    \x3c!-- Brackets --\x3e\n    \x3ctemplate id\x3d"parentheses"\x3e\n        \x3cMathRow data-category\x3d"structure"\x3e\n            \x3cMathDelimiter symbolName\x3d"parenleft" data-category\x3d"static" /\x3e\n            \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"0" /\x3e\n            \x3cMathDelimiter symbolName\x3d"parenright" data-category\x3d"static" /\x3e\n        \x3c/MathRow\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"brackets"\x3e\n        \x3cMathRow data-category\x3d"structure"\x3e\n            \x3cMathDelimiter symbolName\x3d"bracketleft" data-category\x3d"static" /\x3e\n            \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"0" /\x3e\n            \x3cMathDelimiter symbolName\x3d"bracketright" data-category\x3d"static" /\x3e\n        \x3c/MathRow\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"braces"\x3e\n        \x3cMathRow data-category\x3d"structure"\x3e\n            \x3cMathDelimiter symbolName\x3d"braceleft" data-category\x3d"static" /\x3e\n            \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"0" /\x3e\n            \x3cMathDelimiter symbolName\x3d"braceright" data-category\x3d"static" /\x3e\n        \x3c/MathRow\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"ceil"\x3e\n        \x3cMathRow data-category\x3d"structure"\x3e\n            \x3cMathDelimiter symbolName\x3d"ceilleft" data-category\x3d"static" /\x3e\n            \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"0" /\x3e\n            \x3cMathDelimiter symbolName\x3d"ceilright" data-category\x3d"static" /\x3e\n        \x3c/MathRow\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"floor"\x3e\n        \x3cMathRow data-category\x3d"structure"\x3e\n            \x3cMathDelimiter symbolName\x3d"floorleft" data-category\x3d"static" /\x3e\n            \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"0" /\x3e\n            \x3cMathDelimiter symbolName\x3d"floorright" data-category\x3d"static" /\x3e\n        \x3c/MathRow\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"anglebracket"\x3e\n        \x3cMathRow data-category\x3d"structure"\x3e\n            \x3cMathDelimiter symbolName\x3d"anglebracketleft" data-category\x3d"static" /\x3e\n            \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"0" /\x3e\n            \x3cMathDelimiter symbolName\x3d"anglebracketright" data-category\x3d"static" /\x3e\n        \x3c/MathRow\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"bars"\x3e\n        \x3cMathRow data-category\x3d"structure"\x3e\n            \x3cMathDelimiter symbolName\x3d"verticalbar" data-category\x3d"static" /\x3e\n            \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"0" /\x3e\n            \x3cMathDelimiter symbolName\x3d"verticalbar" data-category\x3d"static" /\x3e\n        \x3c/MathRow\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"doublebars"\x3e\n        \x3cMathRow data-category\x3d"structure"\x3e\n            \x3cMathDelimiter symbolName\x3d"dblverticalbar" data-category\x3d"static" /\x3e\n            \x3cMathRow data-category\x3d"placeholder" data-cursor\x3d"0" /\x3e\n            \x3cMathDelimiter symbolName\x3d"dblverticalbar" data-category\x3d"static" /\x3e\n        \x3c/MathRow\x3e\n    \x3c/template\x3e\n\n    \x3c!-- Accents --\x3e\n    \x3c!-- Accents above --\x3e\n    \x3ctemplate id\x3d"hat"\x3e\n        \x3cMathScript accent\x3d"true" data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cNull/\x3e\n            \x3cMathRow data-category\x3d"static"\x3e\n                \x3cMathText kind\x3d"symbol" symbolName\x3d"circumflex"/\x3e\n            \x3c/MathRow\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"breve"\x3e\n        \x3cMathScript limitStyle\x3d"stack" accent\x3d"true" data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cNull/\x3e\n            \x3cMathRow data-category\x3d"static"\x3e\n                \x3cMathText kind\x3d"symbol" symbolName\x3d"breve"/\x3e\n            \x3c/MathRow\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"grave"\x3e\n        \x3cMathScript limitStyle\x3d"stack" accent\x3d"true" data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cNull/\x3e\n            \x3cMathRow data-category\x3d"static"\x3e\n                \x3cMathText kind\x3d"symbol" symbolName\x3d"grave"/\x3e\n            \x3c/MathRow\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"bar"\x3e\n        \x3cMathScript limitStyle\x3d"stack" accent\x3d"true" data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cNull/\x3e\n            \x3cMathRow data-category\x3d"static"\x3e\n                \x3cMathText kind\x3d"symbol"  stretchy\x3d"false" symbolName\x3d"macron"/\x3e\n            \x3c/MathRow\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"dot"\x3e\n        \x3cMathScript limitStyle\x3d"stack" accent\x3d"true" data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cNull/\x3e\n            \x3cMathRow data-category\x3d"static"\x3e\n                \x3cMathText kind\x3d"symbol" symbolName\x3d"dotabove"/\x3e\n            \x3c/MathRow\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"check"\x3e\n        \x3cMathScript limitStyle\x3d"stack" accent\x3d"true" data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cNull/\x3e\n            \x3cMathRow data-category\x3d"static"\x3e\n                \x3cMathText kind\x3d"symbol" symbolName\x3d"caron"/\x3e\n            \x3c/MathRow\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"acute"\x3e\n        \x3cMathScript limitStyle\x3d"stack" accent\x3d"true" data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cNull/\x3e\n            \x3cMathRow data-category\x3d"static"\x3e\n                \x3cMathText kind\x3d"symbol" symbolName\x3d"acute"/\x3e\n            \x3c/MathRow\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"tilde"\x3e\n        \x3cMathScript limitStyle\x3d"stack" accent\x3d"true" data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cNull/\x3e\n            \x3cMathRow data-category\x3d"static"\x3e\n                \x3cMathText kind\x3d"symbol" symbolName\x3d"sim"/\x3e\n            \x3c/MathRow\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"vec"\x3e\n        \x3cMathScript limitStyle\x3d"stack" accent\x3d"true" data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cNull/\x3e\n            \x3cMathRow data-category\x3d"static"\x3e\n                \x3cMathText kind\x3d"symbol" symbolName\x3d"rightarrow"/\x3e\n            \x3c/MathRow\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"ddot"\x3e\n        \x3cMathScript limitStyle\x3d"stack" accent\x3d"true" data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cNull/\x3e\n            \x3cMathRow data-category\x3d"static"\x3e\n                \x3cMathText kind\x3d"symbol" symbolName\x3d"diaresis"/\x3e\n            \x3c/MathRow\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n\n    \x3ctemplate id\x3d"widehat"\x3e\n        \x3cMathScript limitStyle\x3d"stack" accent\x3d"true" data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cNull/\x3e\n            \x3cMathRow data-category\x3d"static"\x3e\n                \x3cMathDelimiter stretchy\x3d"true" symbolName\x3d"circumflex"/\x3e\n            \x3c/MathRow\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"widetilde"\x3e\n        \x3cMathScript limitStyle\x3d"stack" accent\x3d"true" data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cNull/\x3e\n            \x3cMathRow data-category\x3d"static"\x3e\n                \x3cMathDelimiter stretchy\x3d"true" symbolName\x3d"sim"/\x3e\n            \x3c/MathRow\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"overleftarrow"\x3e\n        \x3cMathScript limitStyle\x3d"stack" accent\x3d"true" data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cNull/\x3e\n            \x3cMathRow data-category\x3d"static"\x3e\n                \x3cMathDelimiter symbolName\x3d"leftarrow"/\x3e\n            \x3c/MathRow\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"overrightarrow"\x3e\n        \x3cMathScript limitStyle\x3d"stack" accent\x3d"true" data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cNull/\x3e\n            \x3cMathRow data-category\x3d"static"\x3e\n                \x3cMathDelimiter symbolName\x3d"rightarrow"/\x3e\n            \x3c/MathRow\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"overleftrightarrow"\x3e\n        \x3cMathScript limitStyle\x3d"stack" accent\x3d"true" data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cNull/\x3e\n            \x3cMathRow data-category\x3d"static"\x3e\n                \x3cMathDelimiter symbolName\x3d"leftrightarrow"/\x3e\n            \x3c/MathRow\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"overbrace"\x3e\n        \x3cMathScript limitStyle\x3d"stack" accent\x3d"true" data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cNull/\x3e\n            \x3cMathRow data-category\x3d"static"\x3e\n                \x3cMathDelimiter symbolName\x3d"overbrace"/\x3e\n            \x3c/MathRow\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"overline"\x3e\n        \x3cMathScript limitStyle\x3d"stack" accent\x3d"true" data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cNull/\x3e\n            \x3cMathRow data-category\x3d"static"\x3e\n                \x3cMathDelimiter symbolName\x3d"macron" stretchy\x3d"true"/\x3e\n            \x3c/MathRow\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n\n    \x3c!-- Accents below --\x3e\n    \x3ctemplate id\x3d"underbrace"\x3e\n        \x3cMathScript limitStyle\x3d"stack" accentunder\x3d"true" data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cMathRow data-category\x3d"static"\x3e\n                \x3cMathDelimiter symbolName\x3d"underbrace"/\x3e\n            \x3c/MathRow\x3e\n            \x3cNull/\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n    \x3ctemplate id\x3d"underline"\x3e\n        \x3cMathScript limitStyle\x3d"stack" accentunder\x3d"true" data-category\x3d"structure"\x3e\n            \x3cMathRow data-cursor\x3d"0" data-category\x3d"placeholder"/\x3e\n            \x3cMathRow data-category\x3d"static"\x3e\n                \x3cMathDelimiter symbolName\x3d"macron"/\x3e\n            \x3c/MathRow\x3e\n            \x3cNull/\x3e\n        \x3c/MathScript\x3e\n    \x3c/template\x3e\n\n\x3c/root\x3e\n',
"url:MW/rtc/plugins/completionpopup/CompletionPopupMenu.html":'\x3ctable class\x3d"tabCompletionPopupMenuTable" role\x3d"menu" tabIndex\x3d"${tabIndex}"\n       cellspacing\x3d"0"\x3e\n    \x3ctbody class\x3d"dijitReset" data-dojo-attach-point\x3d"containerNode"\x3e\x3c/tbody\x3e\n\x3c/table\x3e\n',"url:MW/rtc/plugins/equations/latexeditor/view/EquationDialogTemplate.html":'\x3cdiv class\x3d"rteEquationsDialog" data-dojo-attach-point\x3d"contentNode" data-dojo-attach-event\x3d"onkeyup:onTextKeyup"\x3e\n\n    \x3cdiv class\x3d"label"\x3e\n        \x3clabel data-dojo-attach-point \x3d\'equationCodeLabel\'\x3e\x3c/label\x3e\n    \x3c/div\x3e\n    \x3cdiv class\x3d"eqnCode"\x3e\n        \x3cspan class\x3d"codeTextarea" tabindex\x3d"1" data-dojo-attach-point\x3d"codeTextInput"\n              data-dojo-type\x3d"dijit.form.SimpleTextarea" name\x3d"codeTextInput" id\x3d"codeTextInput" \x3e\x3c/span\x3e\n     \x3c/div\x3e\n\n     \x3cdiv class\x3d"label"\x3e\n        \x3clabel data-dojo-attach-point \x3d\'previewLabel\'\x3e\x3c/label\x3e\n    \x3c/div\x3e\n    \x3cdiv class\x3d"preview"\x3e\n\n    \x3cdiv class\x3d"previewTextarea" data-dojo-attach-point\x3d"previewTextInput"\n               name\x3d"previewTextInput" id\x3d"previewTextInput"\x3e\x3c/div\x3e\n     \x3c/div\x3e\n\n\n    \x3cdiv class\x3d"linkButtons"\x3e\n        \x3cbutton class\x3d"okButton" data-dojo-attach-point \x3d"okButton" name\x3d"okButton"\n                tabIndex\x3d"2" data-dojo-type\x3d"dijit.form.Button"\x3e\x3c/button\x3e\n        \x3cbutton class\x3d"cancelButton" data-dojo-attach-point \x3d"cancelButton"\n                tabIndex\x3d"3" data-dojo-type\x3d"dijit.form.Button"\x3e\x3c/button\x3e\n        \x3cbutton class\x3d"helpButton" data-dojo-attach-point \x3d"helpButton" name\x3d"helpButton"\n                tabIndex\x3d"4" data-dojo-type\x3d"dijit.form.Button"\x3e\x3c/button\x3e\n    \x3c/div\x3e\n\n\x3c/div\x3e\n',
"url:MW/rtc/plugins/find/view/FindDialogTemplate.html":'\x3cdiv class\x3d"rteFindDialog" data-dojo-attach-point\x3d"contentNode" data-dojo-attach-event\x3d"onkeyup:onTextKeyup"\x3e\n    \x3cdiv class\x3d"find"\x3e\n         \x3cspan class\x3d"findLabel"\x3e\x3clabel data-dojo-attach-point\x3d"findTextLabel"\x3e\x3c/label\x3e\x3c/span\x3e\n         \x3cspan class\x3d"findTextBox" tabindex\x3d"1" data-dojo-attach-point\x3d"findTextInput"\n              data-dojo-type\x3d"dijit.form.TextBox" name\x3d"findTextInput" id\x3d"findTextInput"\x3e\x3c/span\x3e\n         \x3cspan class\x3d"findNextButton" tabindex\x3d"5" data-dojo-attach-point\x3d"findNextButton" data-dojo-type\x3d"dijit.form.Button" name\x3d "findNextButton" id\x3d"findNext"\x3e\x3c/span\x3e\n         \x3cspan class\x3d"findPreviousButton" tabindex\x3d"6" data-dojo-attach-point\x3d"findPreviousButton" data-dojo-type\x3d"dijit.form.Button" name\x3d "findPreviousButton" id\x3d"findPrevious"\x3e\n         \x3c/span\x3e\n     \x3c/div\x3e\n    \x3cdiv class\x3d"replace" data-dojo-attach-point\x3d"replace"\x3e\n         \x3cspan class\x3d"replaceLabel"\x3e\x3clabel data-dojo-attach-point\x3d"replaceTextLabel"\x3e\x3c/label\x3e\x3c/span\x3e\n         \x3cspan class\x3d"replaceTextBox" tabindex\x3d"2" data-dojo-attach-point\x3d"replaceTextInput"\n              data-dojo-type\x3d"dijit.form.TextBox" name\x3d"replaceTextInput" id\x3d"replaceTextInput"\x3e\x3c/span\x3e\n         \x3cspan class\x3d"replaceButton" tabindex\x3d"7" data-dojo-attach-point\x3d"replaceButton" data-dojo-type\x3d"dijit.form.Button" name\x3d "replaceButton" id\x3d"replaceButton"\x3e\x3c/span\x3e\n         \x3cspan class\x3d"replaceAllButton" tabindex\x3d"8" data-dojo-attach-point\x3d"replaceAllButton" data-dojo-type\x3d"dijit.form.Button" name\x3d "replaceAllButton" id\x3d"replaceAllButton"\x3e\x3c/span\x3e\n     \x3c/div\x3e\n    \x3cdiv class\x3d"options"\x3e\n        \x3cspan class\x3d"matchCase" tabindex\x3d"3"   data-dojo-attach-point\x3d"matchCaseCheckBox" data-dojo-props\x3d"checked: false" data-dojo-type\x3d"dijit.form.CheckBox" name\x3d "matchCaseCheckBox" id\x3d"matchCaseCheckBox"\x3e \x3c/span\x3e\n        \x3cspan class\x3d"matchCaseLabel"\x3e\x3clabel for \x3d "matchCaseCheckBox" data-dojo-attach-point\x3d"matchCaseLabel"\x3e\x3c/label\x3e\x3c/span\x3e\n        \x3cspan class\x3d"wholeWord" tabindex\x3d"4"   data-dojo-attach-point\x3d"wholeWordCheckBox"data-dojo-props\x3d"checked: false" data-dojo-type\x3d"dijit.form.CheckBox" name\x3d "wholeWordCheckBox" id\x3d"wholeWordCheckBox"\x3e \x3c/span\x3e\n        \x3cspan class\x3d"wholeWordLabel"\x3e\x3clabel for \x3d "wholeWordCheckBox" data-dojo-attach-point\x3d"wholeWordLabel"\x3e\x3c/label\x3e\x3c/span\x3e\n\n    \x3c/div\x3e\n\x3c/div\x3e\n',
"url:MW/rtc/plugins/goto/view/GotoDialogTemplate.html":'\x3cdiv class\x3d"rteGoToDialog" data-dojo-attach-point \x3d"contentNode"\x3e\n    \x3cdiv class\x3d"goToDetails" data-dojo-attach-point \x3d"goToDetails"\x3e\n        \x3cdiv class\x3d"input-row"\x3e\n            \x3cspan class\x3d"lineNumberLabel"\x3e\x3clabel data-dojo-attach-point \x3d\'lineNumberLabel\'\x3e\x3c/label\x3e\x3c/span\x3e\n            \x3cspan tabindex\x3d"1" data-dojo-attach-point \x3d"lineNumberInput"\n              data-dojo-type\x3d"dijit.form.NumberTextBox" data-dojo-props\x3d"constraints:{min:0, places:0}"\n              name\x3d"lineNumberInput" id\x3d"lineNumberInput"\x3e\x3c/span\x3e\n        \x3c/div\x3e\n    \x3c/div\x3e\n    \x3cdiv class\x3d"linkButtons"\x3e\n        \x3cbutton class\x3d"okButton" data-dojo-attach-point \x3d"okButton"\n                tabIndex\x3d"3" data-dojo-type\x3d"dijit.form.Button"\x3e\x3c/button\x3e\n        \x3cbutton class\x3d"cancelButton" data-dojo-attach-point \x3d"cancelButton"\n                tabIndex\x3d"2" data-dojo-type\x3d"dijit.form.Button"\x3e\x3c/button\x3e\n    \x3c/div\x3e\n\x3c/div\x3e',
"url:MW/rtc/plugins/hyperlink/view/HyperlinkDialogTemplate.html":'\x3cdiv class\x3d"rteHyperlinkDialog" data-dojo-attach-point \x3d"contentNode" data-dojo-attach-event\x3d"onkeyup:onTextKeyup"\x3e\n\n    \x3ctable class\x3d"hyperlinkDetails"\x3e\n        \x3ctr class\x3d"displaytext-row"\x3e\n            \x3ctd\x3e\n                \x3clabel data-dojo-attach-point \x3d"displayTextLabel" for\x3d"displayTextInput"\x3e\x3c/label\x3e\n            \x3c/td\x3e\n        \x3c/tr\x3e\n        \x3ctr class\x3d"displaytext-row"\x3e\n            \x3ctd\x3e\n                \x3cdiv class\x3d"hyperlinkTextInput"\x3e\x3c/div\x3e\n          \x3c/td\x3e\n        \x3c/tr\x3e\n        \x3ctr\x3e\n            \x3ctd class\x3d"radioButtons"\x3e\n                \x3cdiv class\x3d"toggleRadioButtonExternalURL"\x3e\x3c/div\x3e\n                \x3cdiv class\x3d"toggleRadioButtonInternalHyperlink"\x3e\x3c/div\x3e\n            \x3c/td\x3e\n        \x3c/tr\x3e\n    \x3c/table\x3e\n\n    \x3ctable class\x3d"hyperlinkDetails" data-dojo-attach-point \x3d"targetUrlTable"\x3e\n        \x3ctr\x3e\n            \x3ctd\x3e\x3clabel data-dojo-attach-point \x3d"urlTextLabel" for\x3d"urlTextInput"\x3e\x3c/label\x3e\x3c/td\x3e\n        \x3c/tr\x3e\n        \x3ctr class\x3d"urltext-row"\x3e\n            \x3ctd\x3e\n                \x3cdiv class\x3d"hyperlinkUrlInput"\x3e\x3c/div\x3e\n            \x3c/td\x3e\n        \x3c/tr\x3e\n    \x3c/table\x3e\n\n    \x3ctable class\x3d"hyperlinkDescription hidden" data-dojo-attach-point \x3d"targetInternalHyperlinkTable"\x3e\n        \x3ctr\x3e\n            \x3ctd width\x3d"120px"\x3e\n                \x3cp data-dojo-attach-point \x3d"internalTextLabel" for\x3d"internalSelection"\x3e\n                \x3c/p\x3e\n            \x3c/td\x3e\n        \x3c/tr\x3e\n    \x3c/table\x3e\n\x3c/div\x3e\n',
"url:MW/rtc/plugins/images/view/ImageDialogTemplate.html":'\x3cdiv class\x3d"rtcImageDialog" data-dojo-attach-point \x3d"contentNode" data-dojo-attach-event\x3d"onkeyup:onTextKeyup"\x3e\n    \n    \x3cdiv class\x3d"inputMode"\x3e\n      \x3cspan class\x3d"fileRadio" value\x3d"fromFile" data-dojo-attach-point\x3d"fileRadioBut" data-dojo-props\x3d"checked: true" data-dojo-type\x3d"dijit.form.RadioButton" name\x3d"inputRadioButGroup" id\x3d"fileRadioBut"\x3e \x3c/span\x3e\n      \x3clabel class\x3d"label" for\x3d"fileRadioBut" data-dojo-attach-point\x3d"fileRadioLabel"\x3e\x3c/label\x3e\n      \x3cspan class\x3d"urlRadio" value\x3d"fromWeb" data-dojo-attach-point\x3d"urlRadioBut" data-dojo-props\x3d"checked: false" data-dojo-type\x3d"dijit.form.RadioButton" name\x3d"inputRadioButGroup" id\x3d"urlRadioBut"\x3e \x3c/span\x3e\n      \x3clabel class\x3d"label" for\x3d"urlRadioBut" data-dojo-attach-point\x3d"urlRadioLabel"\x3e\x3c/label\x3e\n    \x3c/div\x3e\n\n    \x3cdiv class\x3d"inputField"\x3e     \n        \x3cdiv class\x3d"urlField" data-dojo-attach-point \x3d"urlField"\x3e\n            \x3clabel for\x3d"imageUrlTextInput" data-dojo-attach-point\x3d"imageUrlTextInputLabel"\x3eURL:\x3c/label\x3e\n            \x3cspan class\x3d"urlTextInput" data-dojo-attach-point \x3d"imageUrlTextInput" data-dojo-attach-event\x3d"onkeyup:onTextKeyup"\n              data-dojo-type\x3d"dijit.form.TextBox" name\x3d"imageUrlTextInput" id\x3d"imageUrlTextInput"\x3e\x3c/span\x3e\n        \x3c/div\x3e\n        \x3cdiv class\x3d"fileField" data-dojo-attach-point \x3d"fileField"\x3e\n            \x3cspan\x3e\x3cinput data-dojo-attach-point \x3d "imageFileInput" type\x3d"file" accept\x3d"image/*" id\x3d"imageFileInput"\x3e\x3c/span\x3e\n        \x3c/div\x3e    \n    \x3c/div\x3e\n\n\n    \x3cdiv class\x3d"imgPreview"\x3e\n        \x3cdiv class\x3d"noPreview" data-dojo-attach-point \x3d"noPreview"\x3eNo Preview\x3c/div\x3e\n        \x3cimg max-width\x3d"100%" max-height\x3d"100%" data-dojo-attach-point \x3d"imagePreview"/\x3e\n    \x3c/div\x3e\n\n\n    \x3cdiv class\x3d"label"\x3e\n        \x3cspan data-dojo-attach-point \x3d"detailsTriangle" class\x3d"detailTriangleCollapsed"\x3e\x3c/span\x3e\n        \x3clabel data-dojo-attach-point \x3d\'detailsLabel\'\x3e\x3c/label\x3e\n    \x3c/div\x3e\n\n    \x3cdiv class\x3d"detailArea" data-dojo-attach-point \x3d\'detailArea\'\x3e\n\n    \x3ctable class\x3d"detailTable"\x3e\n    \x3ctr\x3e\x3ctd\x3e\x3clabel for\x3d"altTextInput" data-dojo-attach-point\x3d"altTextInputLabel"\x3e\x3c/label\x3e\x3c/td\x3e\n        \x3ctd\x3e\x3cspan data-dojo-attach-point \x3d"altTextInput" data-dojo-type\x3d"dijit.form.TextBox" name\x3d"altTextInput" id\x3d"altTextInput"\x3e\x3c/span\x3e\x3c/td\x3e\n    \x3c/tr\x3e\n    \x3ctr\x3e\n        \x3ctd\x3e\x3clabel for\x3d"sizeTextInput" data-dojo-attach-point\x3d"sizeInputLabel"\x3e\x3c/label\x3e\x3c/td\x3e\n        \x3ctd\x3e\x3cspan class\x3d"sizeCombo" data-dojo-attach-point \x3d"sizeTextInput" data-dojo-type\x3d"dijit.form.ComboBox" autoComplete\x3d"false" name\x3d"sizeTextInput" id\x3d"sizeTextInput"\x3e\n        \x3coption\x3e25\x3c/option\x3e\n        \x3coption\x3e50\x3c/option\x3e\n        \x3coption selected\x3e100\x3c/option\x3e\n        \x3coption\x3e125\x3c/option\x3e\n        \x3coption\x3e150\x3c/option\x3e\n        \x3coption\x3e200\x3c/option\x3e\n        \x3c/span\x3e\x3cspan class\x3d"origSize" data-dojo-attach-point \x3d"origSize"\x3e\x3c/span\x3e\x3c/td\x3e\n    \x3c/tr\x3e\n    \x3ctr\x3e\n        \x3ctd\x3e\x3clabel for\x3d"alignInput" data-dojo-attach-point\x3d"alignInputLabel"\x3e\x3c/label\x3e\x3c/td\x3e\n        \x3ctd\x3e\x3cselect data-dojo-attach-point \x3d"alignInput" name\x3d"alignInput" id\x3d"alignInput"\x3e\n            \x3coption value\x3d"top"\x3eTop\x3c/option\x3e\n            \x3coption value\x3d"middle"\x3eMiddle\x3c/option\x3e\n            \x3coption selected value\x3d"bottom"\x3eBottom\x3c/option\x3e\n        \x3c/select\x3e\x3c/td\x3e\n    \x3c/tr\x3e\n    \x3c/table\x3e\n\n    \x3c/div\x3e\n\n    \x3ctable width\x3d"100%"\x3e\x3ctr\x3e\n    \x3ctd\x3e\n    \x3cdiv class\x3d"linkButtons"\x3e\n        \x3cbutton class\x3d"okButton" data-dojo-attach-point \x3d"okButton" name\x3d"okButton"\n                 tabIndex\x3d"2" data-dojo-type\x3d"dijit.form.Button"\x3e\x3c/button\x3e\n        \x3cbutton class\x3d"cancelButton" data-dojo-attach-point \x3d"cancelButton"\n                tabIndex\x3d"3" data-dojo-type\x3d"dijit.form.Button"\x3e\x3c/button\x3e\n    \x3c/div\x3e\n    \x3c/td\x3e\n    \x3c/tr\x3e\x3c/table\x3e\n\x3c/div\x3e',
"url:MW/rtc/plugins/language/matlab/alert/templateErrorAlert.html":'\x3cspan\x3e\n    \x3csvg class\x3d"alertPlugin-errorImg" width\x3d"14" height\x3d"15" xmlns\x3d"http://www.w3.org/2000/svg" xmlns:svg\x3d"http://www.w3.org/2000/svg"\x3e\n        \x3ccircle id\x3d"error_circle" cx\x3d"7" cy\x3d"8" r\x3d"7" fill\x3d"rgb(204, 55, 41)"/\x3e\n        \x3crect id\x3d"top_bang" fill\x3d"white" x\x3d"6" y\x3d"3" width\x3d"2" height\x3d"6"/\x3e\n        \x3crect id\x3d"bottom_bang" fill\x3d"white" x\x3d"6" y\x3d"11" width\x3d"2" height\x3d"2"/\x3e\n    \x3c/svg\x3e\n\x3c/span\x3e',
"url:MW/rtc/plugins/language/matlab/alert/templateWarningAlert.html":'\x3cspan\x3e\n\x3csvg class\x3d"alertPlugin-warningImg" width\x3d"14" height\x3d"15" xmlns\x3d"http://www.w3.org/2000/svg" xmlns:svg\x3d"http://www.w3.org/2000/svg"\x3e\n    \x3cpath id\x3d"warning_triangle" fill\x3d"rgb(255, 161, 0)" d\x3d"M 9.41,2.05 C 9.41,2.05 11.79,6.99 11.79,6.99 11.79,6.99 13.74,11.30 13.74,11.30 14.51,14.01 12.80,14.68 10.29,14.68 10.29,14.68 3.71,14.68 3.71,14.68 1.31,14.68 -0.40,14.17 0.21,11.51 0.40,10.67 1.18,9.06 1.60,8.22 1.60,8.22 3.86,3.49 3.86,3.49 4.50,2.20 4.95,1.06 6.18,0.21 7.88,-0.35 8.64,0.67 9.41,2.05 Z M -3.55,13.30M 18.47,12.60"/\x3e\n    \x3crect id\x3d"top_bang" fill\x3d"white" x\x3d"6" y\x3d"3" width\x3d"2" height\x3d"6"/\x3e\n    \x3crect id\x3d"bottom_bang" fill\x3d"white" x\x3d"6" y\x3d"11" width\x3d"2" height\x3d"2"/\x3e\n\x3c/svg\x3e\n\x3c/span\x3e',
"url:MW/rtc/plugins/language/matlab/codeanalyzer/tooltip/templates/CodeAnalyzerTooltipContent.html":'\x3cdiv data-dojo-attach-point\x3d"tooltipContentNode"\x3e\n\x3c/div\x3e',"url:MW/rtc/plugins/language/matlab/codingui/liveapps/widgets/LiveAppInlineWidgetTemplate.html":'\x3cdiv class\x3d"liveAppInlineWidget" tabindex\x3d"-1"\x3e\n    \x3cdiv class\x3d"liveAppSummary" data-dojo-attach-point\x3d"summaryContainer"\x3e\n        \x3cdiv class\x3d"liveAppSummaryName" data-dojo-attach-point\x3d"appName"\x3e\x3c/div\x3e\n        \x3cdiv class\x3d"liveAppSummaryDescription" data-dojo-attach-point\x3d"appDescription"\x3e\n            \x3cspan class\x3d"liveAppSummaryVariables" data-dojo-attach-point\x3d"appVariables"\x3e\x3cspan class\x3d"liveAppSummaryVariablesList liveAppCodeStyle" data-dojo-attach-point\x3d"appVariablesList"\x3e\x3c/span\x3e\x3c/span\x3e\x3cspan class\x3d"liveAppSummaryOperation" data-dojo-attach-point\x3d"appOperation"\x3e\x3c/span\x3e\n        \x3c/div\x3e\n    \x3c/div\x3e\n    \x3cdiv class\x3d"liveAppUIFigure" data-dojo-attach-point\x3d"uifigureContainer"\x3e\n    \x3c/div\x3e\n\x3c/div\x3e',
"url:MW/rtc/plugins/language/matlab/codingui/liveapps/widgets/LiveAppLineWidgetTemplate.html":'\x3cdiv class\x3d"liveAppLineWidget"\x3e\n    \x3cdiv class\x3d"liveAppCode" data-dojo-attach-point\x3d"codeContainer"\x3e\x3c/div\x3e\n\x3c/div\x3e',"url:MW/rtc/plugins/language/matlab/codingui/livecontrols/widgets/templates/Slider.html":'\x3cdiv data-dojo-attach-event\x3d"mousedown:_onTrackClick"\n\x3e\x3cdiv class\x3d"mwSliderTrack" data-dojo-attach-point\x3d"sliderTrackNode"\n\x3e\x3cdiv class\x3d"mwSliderThumb" data-dojo-attach-point\x3d"sliderThumbNode, focusNode"\x3e\x3c/div\n\x3e\x3c/div\n\x3e\x3cdiv class\x3d"mwSliderRuleAndLabelContainer" data-dojo-attach-point\x3d"containerNode"\x3e\x3c/div\n\x3e\x3c/div\x3e',
"url:MOTW/feedback/templates/FeedbackDialogTemplate.html":'\x3cdiv class\x3d"feedbackDialog"\n     data-dojo-attach-point\x3d"contentNode"\x3e\n\n    \x3cdiv class\x3d"submissionDetails"\n         data-dojo-attach-point\x3d"submissionDetails"\x3e\n        \x3cdiv class\x3d"input-row"\x3e\n            \x3clabel data-dojo-attach-point\x3d\'feedbackSummaryLabel\'\n                   for\x3d"feedbackSummary"\x3eSummary\x3c/label\x3e\n            \x3cinput id\x3d"feedbackSummary"\n                   tabindex\x3d"1"\n                   data-dojo-attach-point\x3d"feedbackSummaryInput"\n                   data-dojo-type\x3d"mw-form/TextField"\n                   data-dojo-props\x3d"width:300"\n                   data-dojo-attach-event\x3d"typing:onTyping"\n                   data-testid\x3d"feedbackSummary"/\x3e\n        \x3c/div\x3e\n\n        \x3cdiv class\x3d"input-row"\x3e\n            \x3clabel data-dojo-attach-point\x3d\'feedbackDetailsLabel\'\n                   for\x3d"feedbackDetails"\x3eDescription\x3c/label\x3e\n            \x3ctextarea id\x3d"feedbackDetails"\n                      tabindex\x3d"2"\n                      data-dojo-attach-point\x3d"feedbackDetailsInput"\n                      data-dojo-props\x3d"width:300,height:200"\n                      data-dojo-type\x3d"mw-form/TextArea"\x3e\x3c/textarea\x3e\n        \x3c/div\x3e\n    \x3c/div\x3e\n\n    \x3cdiv class\x3d"feedbackButtons"\n         data-dojo-attach-point\x3d"feedbackButtons"\x3e\n        \x3cbutton class\x3d"cancelButton" id\x3d"cancelFeedbackButton" tabIndex\x3d"4"\n                data-dojo-attach-point\x3d"cancelButton"\n                data-dojo-attach-event\x3d"click:onCancel"\n                data-dojo-props\x3d"text:\'Cancel\'"\n                data-dojo-type\x3d"mw-form/PushButton" data-testid\x3d"cancelFeedbackButton"\x3e\n        \x3c/button\x3e\n        \x3cbutton class\x3d"okButton" id\x3d"submitFeedbackButton" tabIndex\x3d"3"\n\t\t\t\tdata-dojo-type\x3d"mw-form/PushButton"\n                data-dojo-attach-event\x3d"click:onOk"\n                data-dojo-props\x3d"text:\'Submit\'"\n\t\t\t\tdata-dojo-attach-point\x3d"okButton" data-testid\x3d"submitFeedbackButton"\x3e\n        \x3c/button\x3e\n    \x3c/div\x3e\n\n    \x3cdiv class\x3d"submissionMessage"\n         data-dojo-attach-point\x3d"submissionMessage"\x3e\n        \x3cp class\x3d"submittedMessage"\n           data-dojo-attach-point\x3d"submittedMessage"\n                data-testid\x3d"submittedMessage"\x3eFeedback message\x3c/p\x3e\n\n        \x3cp style\x3d"text-align: center;"\x3e\n            \x3cbutton class\x3d"doneButton" id\x3d"doneFeedbackButton"\n\t\t\t\t\tdata-dojo-type\x3d"mw-form/PushButton"\n                    data-dojo-attach-point\x3d"doneButton"\n                    data-dojo-attach-event\x3d"click:onDone"\n                    data-dojo-props\x3d"text:\'Done\'"\n\t\t\t\t\tdata-testid\x3d"doneFeedbackButton"\x3e\n            \x3c/button\x3e\n        \x3c/p\x3e\n    \x3c/div\x3e\n\x3c/div\x3e',
"url:MOTW/iframecontainer/IframeWidgetTemplate.html":'\x3cdiv class\x3d"iframecontainer"\x3e\n    \x3ciframe data-dojo-attach-point\x3d"frame"\x3e\x3c/iframe\x3e\n    \x3cdiv data-dojo-attach-point\x3d"transparentDiv" class\x3d"transparentDiv"\x3e\x3c/div\x3e\n\x3c/div\x3e',"url:MOTW/iframecontainer/IframeWidgetUnsupportedBrowserTemplate.html":'\x3cdiv\x3e\n    \x3cdiv style\x3d"vertical-align: middle; text-align: center; display: table-cell"\x3e\n        This content cannot be displayed in the browser you are using, please use latest version of Google Chrome.\n    \x3c/div\x3e\n\x3cdiv data-dojo-attach-point\x3d"transparentDiv" class\x3d"transparentDiv"\x3e\x3c/div\x3e\n\x3c/div\x3e',
"url:MOTW/editor/liveEditorWindow.html":'\x3cdiv class\x3d"editorWindow liveCode" dojoAttachPoint\x3d"editorWindow" tabindex\x3d"0"\x3e\n    \x3cdiv class\x3d"textEditorWindow dijitInline" dojoAttachPoint\x3d"liveEditorWindow"\x3e\x3c/div\x3e\n\x3c/div\x3e',"url:graphics/SceneWidgets/templates/SceneView.html":'\x3ccanvas class\x3d"${baseClass}" data-dojo-attach-point\x3d"sceneViewNode,backgroundColorNode" height\x3d"${canvasHeight}" width\x3d"${canvasWidth}"\x3e\x3c/canvas\x3e',"url:graphics/SceneWidgets/templates/ImageView.html":'\x3cimage class\x3d${baseClass} data-dojo-attach-point\x3d"imageViewNode" draggable\x3d"false" ondragstart\x3d"return false;"\x3e\x3c/image\x3e',
"url:graphics/SceneWidgets/templates/GraphicsView.html":'\x3cdiv class\x3d${baseClass} data-dojo-attach-point\x3d"graphicsViewNode,backgroundColorNode"\x3e\x3c/div\x3e',"url:variableeditor_client/SummaryBar.html":'\x3cdiv class\x3d"summaryBar" data-dojo-attach-point\x3d"summaryBarOuterContainer"\x3e\n    \x3cdiv class\x3d"summaryBarContainer veVariableName variableNameElement"\x3e\n        \x3cdiv class\x3d"summaryBarVarName"\x3e${size}\x3c/div\x3e\n        \x3cdiv class\x3d"headerElement"\x3e\n            \x3cdiv class\x3d"summaryBarSize"\x3e${size}\x3c/div\x3e\n            \x3cdiv class\x3d"summaryBarType"\x3e\x3ca class\x3d"summaryBarType"\x3e${type}\x3c/a\x3e\x3c/div\x3e\n        \x3c/div\x3e\n        \x3cdiv class\x3d"filterSummaryData hide" data-dojo-attach-point\x3d"FilteredSummary"\x3eFiltering Placeholders\x3c/div\x3e\n    \x3c/div\x3e\n\x3c/div\x3e\n',
"url:variableeditor_peer/HeaderMenus/NumericHeaderMenu.html":'\x3cdiv class\x3d"NumericHeaderMenu"\x3e\n    \x3cdiv class\x3d"FilteredRange" data-dojo-attach-point\x3d"filteredRange"\x3e\x3c/div\x3e\n    \x3cdiv class\x3d"FilteredHistogram" data-dojo-attach-point\x3d"filteredHistogram"\x3e\x3c/div\x3e\n    \x3cdiv class\x3d"SelectedRange" data-dojo-attach-point\x3d"selectedRange"\x3e\x3c/div\x3e\n    \x3cdiv class\x3d"IncludeMissing" data-dojo-attach-point\x3d"includeMissing"\x3e\x3c/div\x3e\n\x3c/div\x3e\n',
"url:MW/rtc/plugins/breakpoint/matlab/images/breakpointtip.svg":'\x3csvg xmlns\x3d"http://www.w3.org/2000/svg" viewBox\x3d"0 0 8 18"\x3e\x3ctitle\x3eBreakpoint\x3c/title\x3e\x3cg id\x3d"Layer_2" data-name\x3d"Layer 2"\x3e\x3cpolygon points\x3d"0,0 0,18 8,9"/\x3e\x3c/g\x3e\x3c/svg\x3e',"url:MOTW/editor/plainEditorWindow.html":'\x3cdiv class\x3d"editorWindow plainCode" tabindex\x3d"0"\x3e\n    \x3cdiv class\x3d"textEditorWindow dijitInline" dojoAttachPoint\x3d"textEditorWindow"\x3e\x3c/div\x3e\n\x3c/div\x3e',
"*now":function(g){g(['dojo/i18n!*preload*academyinteractions/nls/AcademyModules*["ar","ca","cs","da","de","el","en-gb","en-us","es-es","fi-fi","fr-fr","he-il","hu","it-it","ja-jp","ko-kr","nl-nl","nb","pl","pt-br","pt-pt","ru","sk","sl","sv","th","tr","zh-tw","zh-cn","ROOT"]'])}}});define("academyinteractions/AcademyModules",[],function(){return{loadModules:function(g,f){g.initialize({appModuleRegistry:f})}}});
//# sourceMappingURL=AcademyModules.js.map